Do not pass MAP_FIXED to mmap() to avoid EINVAL

devmem sets the flag MAP_FIXED on calls to mmap(). MAP_FIXED is defined
as "Don't interpret addr as a hint: place the mapping at exactly that
address." At the same time, devmem passes 0 for addr basically asking to
map the requested page at virtual address 0 which is doomed to failure.
You cannot map things at VA 0 on ARM because that's where the interrupt
vector is located (citation needed). The kernel would return EINVAL (at
least on ARM).

Interestingly, it works on our MIPS platform because you actually can
map things at address 0. See below.

110120914169# cat /proc/24232/maps
00000000-00002000 rw-s 00000000 00:05 1026       /dev/mem

Change-Id: Ide2edd053b5ca799b122575a537db72d3e914840
diff --git a/devmem.c b/devmem.c
index 0771912..11b4516 100644
--- a/devmem.c
+++ b/devmem.c
@@ -64,7 +64,7 @@
   base = mmap(NULL, 2*pagesize, PROT_READ | PROT_WRITE,
-              MAP_SHARED | MAP_FIXED, mem_fd, addr & ~(pagesize-1));
+              MAP_SHARED, mem_fd, addr & ~(pagesize-1));
   if (base == MAP_FAILED) {
     perror("mmap failed");