How about share all PFN_* ?
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
Signature · 2 lines
Coywolf Qi Hunt Admin of http://GreatCN.org and http://LoveCN.org
PATCH 1/1 share all PFN_*
Quoted 9 lines · Coywolf Qi Hunt
Hello all,
There's too many macros definitions
PFN_UPPFN_DOWNPFN_PHYSPFN_ALIGNscattered all over. How about a patch move them all into one header file(kernel.h orinit.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
Signature · 2 lines
Coywolf Qi Hunt Admin of http://GreatCN.org and http://LoveCN.org