lkml.org 
[lkml]   [2011]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/30] amd64_edac: Cleanup chipselect handling
On Tue, Mar 29, 2011 at 10:56:26AM -0400, Mauro Carvalho Chehab wrote:
> Em 10-02-2011 15:15, Borislav Petkov escreveu:
> > From: Borislav Petkov <borislav.petkov@amd.com>
> >
> > Add a struct representing the DRAM chip select base/limit register
> > pairs. Concentrate all CS handling in a single function. Also, add CS
> > looping macros for cleaner, more readable code. While at it, adjust code
> > to F15h. Finally, do smaller macro names cleanups (remove family names
> > from register macros) and debug messages clarification.
> >
> > No functional change.
> >
> > Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
>
> Hi Borislav,
>
> > --- a/drivers/edac/amd64_edac.h
> > +++ b/drivers/edac/amd64_edac.h
> > @@ -160,6 +160,14 @@
> > #define OFF false
> >
> > /*
> > + * Create a contiguous bitmask starting at bit position @lo and ending at
> > + * position @hi. For example
> > + *
> > + * GENMASK(21, 39) gives us the 64bit vector 0x000000ffffe00000.
> > + */
> > +#define GENMASK(lo, hi) (((1ULL << ((hi) - (lo) + 1)) - 1) << (lo))
> > +
>
> This is a nice macro that could be useful outside amd64. It is probably a good
> idea to move it to include/linux/bitops.h.

I'd suggest rather <drivers/edac/edac_core.h> if you want to use it in
EDAC. But if we have more users, I don't have a problem with putting
it there (or somewhere else generic enough if people have a better
suggestion).

--
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632


\
 
 \ /
  Last update: 2011-03-29 17:19    [W:0.104 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site