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
--
Coywolf Qi Hunt
Admin of http://GreatCN.org and http://LoveCN.org
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