Whoops. I didn't say _current_ kernels, did I? 8) (Don't write mails at
2am...)
We got rid of it later as we cleaned up the kernel mappings to use ioremap
instead of static device mappings. Hence 2.4/2.5 don't contain them any
more. However, from 2.3.35:
diff -urN linux-orig/include/asm-arm/arch-sa1100/memory.h linux/include/asm-arm/arch-sa1100/memory.h
...
/*
* The following gives a maximum memory size of 128MB (32MB in each bank).
- *
- * Does this still need to be optimised for one bank machines?
*/
-#define __virt_to_phys(x) (((x) & 0xe0ffffff) | ((x) & 0x06000000) << 2)
-#define __phys_to_virt(x) (((x) & 0xe7ffffff) | ((x) & 0x30000000) >> 2)
+#define __virt_to_phys(x) (((x) & 0xf9ffffff) | ((x) & 0x06000000) << 2)
+#define __phys_to_virt(x) (((x) & 0xe7ffffff) | ((x) & 0x18000000) >> 2)
This type of mapping went away in 2.4.0-test9, which is after this
particular platform got discontig mem support in 2.3.99-pre2-rmk1.
An example is right up to date, and was the subject of the first mail
is:
+#define __virt_to_phys(vpage) (((vpage) + ((vpage) & 0x18000000)) & \
+ ~0x40000000)
+
+#define __phys_to_virt(ppage) (((ppage) & ~0x30000000) | \
+ (((ppage) & 0x30000000) >> 1) | \
+ 0x40000000)
You won't find this one in my patches nor Linus' kernel tree though.
-- Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/