diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-01 11:26:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-01 11:26:44 -0500 |
commit | 0d9ccfe1b5321b8d27117817b9ae4d3288c8b015 (patch) | |
tree | 0fb1cd938d72785e7df7a29a2025771c7784e496 /arch | |
parent | f13a48bd798a159291ca583b95453171b88b7448 (diff) | |
parent | f133f22dd6f413bdf71ebf7e00ce441d98ac7c87 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
MIPS: Loongson: Switch from flatmem to sparsemem
MIPS: Loongson: Disallow 4kB pages
MIPS: Add missing definition for MADV_HWPOISON.
MIPS: Fix build error if __xchg() is not getting inlined.
MIPS: IP22/IP28 Disable early printk to fix boot problems on some systems.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/Kconfig | 21 | ||||
-rw-r--r-- | arch/mips/include/asm/mman.h | 1 | ||||
-rw-r--r-- | arch/mips/include/asm/system.h | 15 |
3 files changed, 28 insertions, 9 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 1aad0d9f5074..fd7620f025fa 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -358,7 +358,14 @@ config SGI_IP22 | |||
358 | select SWAP_IO_SPACE | 358 | select SWAP_IO_SPACE |
359 | select SYS_HAS_CPU_R4X00 | 359 | select SYS_HAS_CPU_R4X00 |
360 | select SYS_HAS_CPU_R5000 | 360 | select SYS_HAS_CPU_R5000 |
361 | select SYS_HAS_EARLY_PRINTK | 361 | # |
362 | # Disable EARLY_PRINTK for now since it leads to overwritten prom | ||
363 | # memory during early boot on some machines. | ||
364 | # | ||
365 | # See http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=20091119164009.GA15038%40deprecation.cyrius.com | ||
366 | # for a more details discussion | ||
367 | # | ||
368 | # select SYS_HAS_EARLY_PRINTK | ||
362 | select SYS_SUPPORTS_32BIT_KERNEL | 369 | select SYS_SUPPORTS_32BIT_KERNEL |
363 | select SYS_SUPPORTS_64BIT_KERNEL | 370 | select SYS_SUPPORTS_64BIT_KERNEL |
364 | select SYS_SUPPORTS_BIG_ENDIAN | 371 | select SYS_SUPPORTS_BIG_ENDIAN |
@@ -410,7 +417,14 @@ config SGI_IP28 | |||
410 | select SGI_HAS_ZILOG | 417 | select SGI_HAS_ZILOG |
411 | select SWAP_IO_SPACE | 418 | select SWAP_IO_SPACE |
412 | select SYS_HAS_CPU_R10000 | 419 | select SYS_HAS_CPU_R10000 |
413 | select SYS_HAS_EARLY_PRINTK | 420 | # |
421 | # Disable EARLY_PRINTK for now since it leads to overwritten prom | ||
422 | # memory during early boot on some machines. | ||
423 | # | ||
424 | # See http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=20091119164009.GA15038%40deprecation.cyrius.com | ||
425 | # for a more details discussion | ||
426 | # | ||
427 | # select SYS_HAS_EARLY_PRINTK | ||
414 | select SYS_SUPPORTS_64BIT_KERNEL | 428 | select SYS_SUPPORTS_64BIT_KERNEL |
415 | select SYS_SUPPORTS_BIG_ENDIAN | 429 | select SYS_SUPPORTS_BIG_ENDIAN |
416 | help | 430 | help |
@@ -1439,6 +1453,7 @@ choice | |||
1439 | 1453 | ||
1440 | config PAGE_SIZE_4KB | 1454 | config PAGE_SIZE_4KB |
1441 | bool "4kB" | 1455 | bool "4kB" |
1456 | depends on !CPU_LOONGSON2 | ||
1442 | help | 1457 | help |
1443 | This option select the standard 4kB Linux page size. On some | 1458 | This option select the standard 4kB Linux page size. On some |
1444 | R3000-family processors this is the only available page size. Using | 1459 | R3000-family processors this is the only available page size. Using |
@@ -1763,7 +1778,7 @@ config SYS_SUPPORTS_SMARTMIPS | |||
1763 | 1778 | ||
1764 | config ARCH_FLATMEM_ENABLE | 1779 | config ARCH_FLATMEM_ENABLE |
1765 | def_bool y | 1780 | def_bool y |
1766 | depends on !NUMA | 1781 | depends on !NUMA && !CPU_LOONGSON2 |
1767 | 1782 | ||
1768 | config ARCH_DISCONTIGMEM_ENABLE | 1783 | config ARCH_DISCONTIGMEM_ENABLE |
1769 | bool | 1784 | bool |
diff --git a/arch/mips/include/asm/mman.h b/arch/mips/include/asm/mman.h index a2250f390a29..c892bfb3e2c1 100644 --- a/arch/mips/include/asm/mman.h +++ b/arch/mips/include/asm/mman.h | |||
@@ -75,6 +75,7 @@ | |||
75 | 75 | ||
76 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ | 76 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ |
77 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ | 77 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ |
78 | #define MADV_HWPOISON 100 /* poison a page for testing */ | ||
78 | 79 | ||
79 | /* compatibility flags */ | 80 | /* compatibility flags */ |
80 | #define MAP_FILE 0 | 81 | #define MAP_FILE 0 |
diff --git a/arch/mips/include/asm/system.h b/arch/mips/include/asm/system.h index fcf5f98d90cc..83b5509e09e8 100644 --- a/arch/mips/include/asm/system.h +++ b/arch/mips/include/asm/system.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #ifndef _ASM_SYSTEM_H | 12 | #ifndef _ASM_SYSTEM_H |
13 | #define _ASM_SYSTEM_H | 13 | #define _ASM_SYSTEM_H |
14 | 14 | ||
15 | #include <linux/kernel.h> | ||
15 | #include <linux/types.h> | 16 | #include <linux/types.h> |
16 | #include <linux/irqflags.h> | 17 | #include <linux/irqflags.h> |
17 | 18 | ||
@@ -193,10 +194,6 @@ extern __u64 __xchg_u64_unsupported_on_32bit_kernels(volatile __u64 * m, __u64 v | |||
193 | #define __xchg_u64 __xchg_u64_unsupported_on_32bit_kernels | 194 | #define __xchg_u64 __xchg_u64_unsupported_on_32bit_kernels |
194 | #endif | 195 | #endif |
195 | 196 | ||
196 | /* This function doesn't exist, so you'll get a linker error | ||
197 | if something tries to do an invalid xchg(). */ | ||
198 | extern void __xchg_called_with_bad_pointer(void); | ||
199 | |||
200 | static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) | 197 | static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) |
201 | { | 198 | { |
202 | switch (size) { | 199 | switch (size) { |
@@ -205,11 +202,17 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
205 | case 8: | 202 | case 8: |
206 | return __xchg_u64(ptr, x); | 203 | return __xchg_u64(ptr, x); |
207 | } | 204 | } |
208 | __xchg_called_with_bad_pointer(); | 205 | |
209 | return x; | 206 | return x; |
210 | } | 207 | } |
211 | 208 | ||
212 | #define xchg(ptr, x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) | 209 | #define xchg(ptr, x) \ |
210 | ({ \ | ||
211 | BUILD_BUG_ON(sizeof(*(ptr)) & ~0xc); \ | ||
212 | \ | ||
213 | ((__typeof__(*(ptr))) \ | ||
214 | __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))); \ | ||
215 | }) | ||
213 | 216 | ||
214 | extern void set_handler(unsigned long offset, void *addr, unsigned long len); | 217 | extern void set_handler(unsigned long offset, void *addr, unsigned long len); |
215 | extern void set_uncached_handler(unsigned long offset, void *addr, unsigned long len); | 218 | extern void set_uncached_handler(unsigned long offset, void *addr, unsigned long len); |