Re: mmap from 0xFFFF0000 -> 0xFFFFFFFF does not work, why?!

David Howells (David.Howells@nexor.co.uk)
Wed, 12 May 1999 08:52:04 BST


Even better, how about:

diff -uNr linux-2.2.3/arch/i386/mm/ioremap.c linux-2.2.3-cmgr/arch/i386/mm/ioremap.c
--- linux-2.2.3/arch/i386/mm/ioremap.c Fri Nov 27 23:03:14 1998
+++ linux-2.2.3-cmgr/arch/i386/mm/ioremap.c Sun Mar 21 11:42:42 1999
@@ -117,7 +117,7 @@
/*
* Don't allow mappings that wrap..
*/
- if (!size || size > phys_addr + size)
+ if (!size || size-1 > ~phys_addr)
return NULL;

/*

This will work for any value of phys_addr and any non-zero value of size (which
the first part of the condition guards against).

David Howells

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/