compile error: invalid operands for binary >> for pgd_index(addr) macro
I am writing a driver for a pci device and am trying to translate a virtual address to locate its page table entry using the set of macros in asm/pgtable.h
I am giving a void * to pgd_index(addr) macro to give me a relative position in Page global directory.
But instead while compiling, it gives me an error saying:
error: invalid operands to binary >> (have void * and 'int')
I don't understand what is wrong because as I know, I am supposed to pass a virtual address to the macro to get the pgd index.
Thanks for help.