[PATCH] arm's arch_local_page_offset() fix against 2.6.17-rc1

[PATCH] arm's arch_local_page_offset() fix against 2.6.17-rc1

Post by KAMEZAWA H » Tue, 04 Apr 2006 18:20:15


This patch fixes arch_local_page_offset(pfn,nid) in arm.
This new one (added by unify_pfn_to_page patches) is obviously buggy.

This macro calculate page offset in a node.

Note: about LOCAL_MAP_NR()
comment in arm's sub-archs says...

/*
* Given a kaddr, LOCAL_MAP_NR finds the owning node of the memory
* and returns the index corresponding to the appropriate page in the
* node's mem_map.
*/

but LOCAL_MAP_NR() is designed to be able to take both paddr and kaddr.
In this case, paddr is better.

Signed-Off-By:KAMEZAWA Hiroyuki < XXXX@XXXXX.COM >

Index: linux-2.6.17-rc1/include/asm-arm/memory.h
===================================================================
--- linux-2.6.17-rc1.orig/include/asm-arm/memory.h
+++ linux-2.6.17-rc1/include/asm-arm/memory.h
@@ -188,7 +188,7 @@ static inline __deprecated void *bus_to_
*/
#include <linux/numa.h>
#define arch_pfn_to_nid(pfn) (PFN_TO_NID(pfn))
-#define arch_local_page_offset(pfn, nid) (LOCAL_MAP_NR((pfn) << PAGE_OFFSET))
+#define arch_local_page_offset(pfn, nid) LOCAL_MAP_NR((pfn) << PAGE_SHIFT)

#define pfn_valid(pfn) \
({ \

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

1. [PATCH] 2.6.17-rc1-mm2/ia64 compile acpi_memhotplug as module fix.

2. [PATCH] 2.6.17-rc1-mm2/ia64 compile acpi_memhotplug as module fix.


This export was necessary to compile acpi_memhotplug.c as module.


Signed-Off-By: KAMEZAWA Hiroyuki < XXXX@XXXXX.COM >
Index: linux-2.6.17-rc1-mm2/arch/ia64/mm/init.c
===================================================================
--- linux-2.6.17-rc1-mm2.orig/arch/ia64/mm/init.c 2006-04-10 18:09:39.000000000 +0900
+++ linux-2.6.17-rc1-mm2/arch/ia64/mm/init.c 2006-04-10 18:22:32.000000000 +0900
@@ -671,9 +671,11 @@

return ret;
}
+EXPORT_SYMBOL(add_memory);

int remove_memory(u64 start, u64 size)
{
return -EINVAL;
}
+EXPORT_SYMBOL(remove_memory);
#endif

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/

3. [GIT PATCH] Driver Core and sysfs patches for 2.6.17-rc1

4. [PATCH 2.6.17-rc5-mm2 05/18] raw1394: fix whitespace after x86_64 compat patch

5. [PATCH 2.6.17-rc4 5/6] Add kmemleak support for ARM

6. [patch, 2.6.17-rc3-mm1] swap-prefetch-fix.patch

7. kernel 2.6.17-rc1, rc1 meaning?

8. [PATCH 2.6.17-rc6 6/9] Add kmemleak support for ARM

9. [PATCH 2.6.17-rc6 6/8] Add kmemleak support for ARM

10. [PATCH 2.6.17-rc5 6/8] Add kmemleak support for ARM

11. [PATCH 2.6.17-rc5 5/7] Add kmemleak support for ARM

12. [patch 2.6.17-rc1] Reinstate const in next_thread()

13. 2.6.17-rc1-mm3: time-i386-clocksource-drivers*.patch brokeuserspace apps

14. [PATCH 2.6.17-rc1] [SERIAL] DCC(JTAG) serial and the console emulation support(revised#4)

15. [PATCH] Staircase cpu scheduler v15 for 2.6.17-rc1*