On Mon, Aug 15, 2005 at 09:33:07PM +0200, Olaf Hering wrote: > ARCH=um doesnt like your version, but mine. > > drivers/char/mem.c:267: error: invalid operands to binary << > > pfn = (__pa((u64)vma->vm_pgoff) << PAGE_SHIFT) >> PAGE_SHIFT; My page.h was missing some parens. Try the patch below. Jeff Index: linux-2.6.13-rc6/include/asm-um/page.h =================================================================== --- linux-2.6.13-rc6.orig/include/asm-um/page.h 2005-08-15 16:57:55.000000000 -0400 +++ linux-2.6.13-rc6/include/asm-um/page.h 2005-08-15 17:16:57.000000000 -0400 @@ -104,8 +104,8 @@ * casting is the right thing, but 32-bit UML can't have 64-bit virtual * addresses */ -#define __pa(virt) to_phys((void *) (unsigned long) virt) -#define __va(phys) to_virt((unsigned long) phys) +#define __pa(virt) to_phys((void *) (unsigned long) (virt)) +#define __va(phys) to_virt((unsigned long) (phys)) #define page_to_pfn(page) ((page) - mem_map) #define pfn_to_page(pfn) (mem_map + (pfn)) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- [question] What's the difference between /dev/kmem and /dev/mem
- From: Steven Rostedt <[email protected]>
- [PATCH] Fix mmap_kmem (was: [question] What's the difference between /dev/kmem and /dev/mem)
- From: Steven Rostedt <[email protected]>
- Re: [PATCH] Fix mmap_kmem (was: [question] What's the difference between /dev/kmem and /dev/mem)
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] Fix mmap_kmem (was: [question] What's the difference between /dev/kmem and /dev/mem)
- From: Arjan van de Ven <[email protected]>
- Re: [PATCH] Fix mmap_kmem (was: [question] What's the difference between /dev/kmem and /dev/mem)
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] Fix mmap_kmem (was: [question] What's the difference between /dev/kmem and /dev/mem)
- From: Arjan van de Ven <[email protected]>
- Re: [PATCH] Fix mmap_kmem (was: [question] What's the difference between /dev/kmem and /dev/mem)
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] Fix mmap_kmem (was: [question] What's the difference between /dev/kmem and /dev/mem)
- From: Olaf Hering <[email protected]>
- [question] What's the difference between /dev/kmem and /dev/mem
- Prev by Date: [PATCH 4/4] cciss 2.4: fixes a warning from cciss_scsi.c during compile
- Next by Date: [-mm PATCH] remove use of pci_find_device in watchdog driver for Intel 6300ESB chipset
- Previous by thread: Re: [PATCH] Fix mmap_kmem (was: [question] What's the difference between /dev/kmem and /dev/mem)
- Next by thread: Re: [PATCH] Fix mmap_kmem (was: [question] What's the difference between /dev/kmem and /dev/mem)
- Index(es):