Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

+28 -9
+18 -3
arch/mips/Kconfig
··· 358 358 select SWAP_IO_SPACE 359 359 select SYS_HAS_CPU_R4X00 360 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 369 select SYS_SUPPORTS_32BIT_KERNEL 363 370 select SYS_SUPPORTS_64BIT_KERNEL 364 371 select SYS_SUPPORTS_BIG_ENDIAN ··· 417 410 select SGI_HAS_ZILOG 418 411 select SWAP_IO_SPACE 419 412 select SYS_HAS_CPU_R10000 420 - select SYS_HAS_EARLY_PRINTK 413 + # 414 + # Disable EARLY_PRINTK for now since it leads to overwritten prom 415 + # memory during early boot on some machines. 416 + # 417 + # See http://www.linux-mips.org/cgi-bin/mesg.cgi?a=linux-mips&i=20091119164009.GA15038%40deprecation.cyrius.com 418 + # for a more details discussion 419 + # 420 + # select SYS_HAS_EARLY_PRINTK 421 421 select SYS_SUPPORTS_64BIT_KERNEL 422 422 select SYS_SUPPORTS_BIG_ENDIAN 423 423 help ··· 1453 1439 1454 1440 config PAGE_SIZE_4KB 1455 1441 bool "4kB" 1442 + depends on !CPU_LOONGSON2 1456 1443 help 1457 1444 This option select the standard 4kB Linux page size. On some 1458 1445 R3000-family processors this is the only available page size. Using ··· 1778 1763 1779 1764 config ARCH_FLATMEM_ENABLE 1780 1765 def_bool y 1781 - depends on !NUMA 1766 + depends on !NUMA && !CPU_LOONGSON2 1782 1767 1783 1768 config ARCH_DISCONTIGMEM_ENABLE 1784 1769 bool
+1
arch/mips/include/asm/mman.h
··· 75 75 76 76 #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ 77 77 #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ 78 + #define MADV_HWPOISON 100 /* poison a page for testing */ 78 79 79 80 /* compatibility flags */ 80 81 #define MAP_FILE 0
+9 -6
arch/mips/include/asm/system.h
··· 12 12 #ifndef _ASM_SYSTEM_H 13 13 #define _ASM_SYSTEM_H 14 14 15 + #include <linux/kernel.h> 15 16 #include <linux/types.h> 16 17 #include <linux/irqflags.h> 17 18 ··· 194 193 #define __xchg_u64 __xchg_u64_unsupported_on_32bit_kernels 195 194 #endif 196 195 197 - /* This function doesn't exist, so you'll get a linker error 198 - if something tries to do an invalid xchg(). */ 199 - extern void __xchg_called_with_bad_pointer(void); 200 - 201 196 static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) 202 197 { 203 198 switch (size) { ··· 202 205 case 8: 203 206 return __xchg_u64(ptr, x); 204 207 } 205 - __xchg_called_with_bad_pointer(); 208 + 206 209 return x; 207 210 } 208 211 209 - #define xchg(ptr, x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) 212 + #define xchg(ptr, x) \ 213 + ({ \ 214 + BUILD_BUG_ON(sizeof(*(ptr)) & ~0xc); \ 215 + \ 216 + ((__typeof__(*(ptr))) \ 217 + __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))); \ 218 + }) 210 219 211 220 extern void set_handler(unsigned long offset, void *addr, unsigned long len); 212 221 extern void set_uncached_handler(unsigned long offset, void *addr, unsigned long len);