lkml.org 
[lkml]   [2004]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[PATCH] share all PFN_*
Coywolf Qi Hunt wrote:

> Hello all,
>
> There's too many macros definitions PFN_UP PFN_DOWN PFN_PHYS PFN_ALIGN
> scattered all over.
> How about a patch move them all into one header file(kernel.h or init.h)
> and share only one copy of them like what min and max. I'd like to
> make it.
>
>
> coywolf
>
This patch splits out asm-generic/page.h and includes it at the bottom
of all arch specific page.h's.

This approach is more easy and *safe* than move the macros into kernel.h
or other, and also prepares for future. By nested into page.h, we can make
sure it's no problem to simply remove those definitions without adding new
include statements.

Here is it. http://greatcn.org/~coywolf/patches/2.6/share-PFN.patch


btw, these are all identical replacements, except on arm26(Matt Heler
told me).
Arm26 implementation has done too much on this point.

On arm26: #define PFN_UP(x) (PAGE_ALIGN(x) >> PAGE_SHIFT)
PAGE_ALIGN is no use here since >> followed

--
Coywolf Qi Hunt
Admin of http://GreatCN.org and http://LoveCN.org

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:1.148 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site