LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Wu, Bryan" <bryan.wu@analog.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: bryan.wu@analog.com, Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm 1/5] Blackfin: blackfin architecture patch update
Date: Mon, 05 Mar 2007 15:34:51 +0800	[thread overview]
Message-ID: <1173080091.5264.178.camel@roc-desktop> (raw)
In-Reply-To: <200703032330.50116.arnd@arndb.de>

On Sat, 2007-03-03 at 17:30 -0500, Arnd Bergmann wrote:
> On Thursday 01 March 2007 05:14:40 Wu, Bryan wrote:
> > Here is the update version of blackfin-arch.patch in -mm tree.
> > simply add support to utrace and it was tested on blackfin STAMP
> board
> > as well as other following patches.
> 
> Wow, this has come a long way since I looked at the patches last
> year, good work!

Yeah, old friend comes back. Thanks a lot for your review.
We fixed lots of things according to your review since last year.
> 
> I've gone through the complete patch again now, and these are the
> issues I've found in it. None of these are show-stoppers and I'd
> like to see it all go in during the next merge window. There should
> be enough time until then to address these points:

Lots of valuable comments got from you, we will get things done soon.
So could please give us some information about the merge window
schedule, we may try to catch this.

>  +
> > +/* Clock and System Control (0xFFC0 0400-0xFFC0 07FF) */
> > +#define bfin_read_PLL_CTL()                  bfin_read16(PLL_CTL)
> > +#define bfin_write_PLL_CTL(val)
> bfin_write16(PLL_CTL,val)
> > +#define bfin_read_PLL_STAT()                 bfin_read16(PLL_STAT)
> > +#define bfin_write_PLL_STAT(val)
> bfin_write16(PLL_STAT,val)
> > +#define bfin_read_PLL_LOCKCNT()
> bfin_read16(PLL_LOCKCNT)
> > +#define bfin_write_PLL_LOCKCNT(val)
> bfin_write16(PLL_LOCKCNT,val)
> > +#define bfin_read_CHIPID()                   bfin_read32(CHIPID)
> > +#define bfin_read_SWRST()                    bfin_read16(SWRST)
> > +#define bfin_write_SWRST(val)
> bfin_write16(SWRST,val)
> 
> I remember that we have discussed these macro abstractions before, but
> don't
> recall the result of the discussion. You have around 5000 such macros,
> and I still think it's not a helpful abstraction. It is much more
> common
> for device drivers to just use the read/write accessors directly. IIRC
> the objections that were raised (and my replies to them) were roughly:
> 
> > the driver writer doesn't want to know the size of the variable, and
> > if it changes, they need to change every instance in the code, not
> > just the macro.
> 
> A driver writer should better know the type of variable he is
> changing,
> e.g. because of the type he passes in and out. Also, hardware
> registers
> don't suddenly change in size.
> 
> > These macros allow us to work around hardware bugs when accessing
> the
> > registers by simply redefining the accessor to do something more
> > complex.
> 
> If there is a bug in the hardware, the workaround belongs into the
> driver. You can then still define a special inline function to
> access that particular register.
> 
Oh, if we should fix this issue, there are lots of work to do because
tons of drivers rely on this. Maybe after some team internal discussion,
we will give a solution to this.

Thanks again
Best Regards,
-Bryan Wu


  parent reply	other threads:[~2007-03-05  7:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-01  4:14 Wu, Bryan
2007-03-03 20:38 ` Arnd Bergmann
2007-03-05  7:13   ` Wu, Bryan
2007-03-03 22:30 ` Arnd Bergmann
2007-03-03 22:50   ` bert hubert
2007-03-03 23:05     ` Arnd Bergmann
2007-03-05  6:54   ` Aubrey Li
2007-03-05  8:47     ` Arnd Bergmann
2007-03-05  9:19       ` Wu, Bryan
2007-03-05 16:43         ` Arnd Bergmann
2007-03-05  7:34   ` Wu, Bryan [this message]
2007-03-05  8:10     ` Arnd Bergmann
2007-03-06  2:09   ` Mike Frysinger
2007-03-05  9:23 ` Paul Mundt
2007-03-05 12:32   ` Bernd Schmidt
2007-03-05 12:39     ` Paul Mundt
2007-03-05 13:26       ` Robin Getz
2007-03-05 14:00         ` Paul Mundt
2007-03-05 16:29           ` Robin Getz
2007-03-05 17:32             ` Paul Mundt
2007-03-05 22:06               ` Robin Getz
2007-03-06  2:04   ` Mike Frysinger
2007-03-21 15:44   ` Mike Frysinger
2007-03-21 23:42     ` Paul Mundt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1173080091.5264.178.camel@roc-desktop \
    --to=bryan.wu@analog.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH -mm 1/5] Blackfin: blackfin architecture patch update' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).