On 10/13/06, Atsushi Nemoto <anemo@xxxxxxxxxxxxx> wrote:
On Fri, 13 Oct 2006 14:39:00 +0200, Franck Bui-Huu <vagabon.xyz@xxxxxxxxx> wrote: > -#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) > -#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) > +#define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr))) > +#define virt_addr_valid(kaddr) pfn_valid(PFN_DOWN(virt_to_phys(kaddr))) It seems "#include <linux/pfn.h>" (and "#include <asm/io.h>" perhaps) required.
Well it just compiles fine for me and to be honest I have no strong feeling here. So I'm following your recommendation. thanks -- Franck