lkml.org 
[lkml]   [2008]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 02/34] AMD IOMMU: add header file for driver data structures and defines
    On Thu, 10 Jul 2008 14:12:22 +0200 Joerg Roedel <joerg.roedel@amd.com> wrote:

    > On Wed, Jul 09, 2008 at 07:36:01PM -0700, Andrew Morton wrote:
    > > On Wed, 9 Jul 2008 18:50:55 -0700 Arjan van de Ven <arjan@infradead.org> wrote:
    > >
    > > > On Wed, 9 Jul 2008 18:38:23 -0700
    > > > Andrew Morton <akpm@linux-foundation.org> wrote:
    > > >
    > > > > On Thu, 26 Jun 2008 21:27:38 +0200 Joerg Roedel
    > > > > <joerg.roedel@amd.com> wrote:
    > > > >
    > > > > > +/* helper macros */
    > > > > > +#define LOW_U32(x) ((x) & ((1ULL << 32)-1))
    > > > > > +#define HIGH_U32(x) (LOW_U32((x) >> 32))
    > > > >
    > > > > Please avoid putting general-purpose helpers into private header
    > > > > files.
    > > >
    > > > especially broken helpers.
    > > >
    > > > A >> 32 on something that may be a 32 bit entry is bad; int32 >> 32...
    > > > gcc can (and does!) optimize that out.
    > > >
    > > > (because it first gets translated into a SHR x86 instruction which then
    > > > notices it's encoded as a zero shift.. which then gets deleted)
    > > >
    > >
    > > Well yeah. upper_32_bits() gets it all corect. We could do a
    > > lower_32_bits() I suppose, if it's useful.
    >
    > Ok cool, I agree. I will replace the HIGH_U32 macro with the
    > upper_32_bits() function and the other one with lower_32_bits() if it
    > exists. Who will take the patch for the introduction of that function?
    >

    I can do that. We can slip it into mainline as soon as it's ready so that
    the for-2.6.27 patches contine to work.

    Or we can just do it later, as a followup thing. Probably this is better.


    \
     
     \ /
      Last update: 2008-07-10 15:07    [W:3.598 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site