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 git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

Pull sparc fixes from David Miller:
"A small bunch of bug fixes, in particular:

1) On older cpus we need a different chunk of virtual address space
to map the huge page TSB.

2) Missing memory barrier in Niagara2 memcpy.

3) trinity showed some places where fault validation was
unnecessarily loud on sparc64

4) Some sysfs printf's need a type adjustment, from Toralf Förster"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
sparc64: fix format string mismatch in arch/sparc/kernel/sysfs.c
sparc64: Add membar to Niagara2 memcpy code.
sparc64: Fix huge TSB mapping on pre-UltraSPARC-III cpus.
sparc64: Don't bark so loudly about 32-bit tasks generating 64-bit fault addresses.

+20 -19
+4 -2
arch/sparc/include/asm/pgtable_64.h
··· 24 24 25 25 /* The kernel image occupies 0x4000000 to 0x6000000 (4MB --> 96MB). 26 26 * The page copy blockops can use 0x6000000 to 0x8000000. 27 - * The TSB is mapped in the 0x8000000 to 0xa000000 range. 27 + * The 8K TSB is mapped in the 0x8000000 to 0x8400000 range. 28 + * The 4M TSB is mapped in the 0x8400000 to 0x8800000 range. 28 29 * The PROM resides in an area spanning 0xf0000000 to 0x100000000. 29 30 * The vmalloc area spans 0x100000000 to 0x200000000. 30 31 * Since modules need to be in the lowest 32-bits of the address space, ··· 34 33 * 0x400000000. 35 34 */ 36 35 #define TLBTEMP_BASE _AC(0x0000000006000000,UL) 37 - #define TSBMAP_BASE _AC(0x0000000008000000,UL) 36 + #define TSBMAP_8K_BASE _AC(0x0000000008000000,UL) 37 + #define TSBMAP_4M_BASE _AC(0x0000000008400000,UL) 38 38 #define MODULES_VADDR _AC(0x0000000010000000,UL) 39 39 #define MODULES_LEN _AC(0x00000000e0000000,UL) 40 40 #define MODULES_END _AC(0x00000000f0000000,UL)
+1 -1
arch/sparc/kernel/sysfs.c
··· 151 151 size_t count) 152 152 { 153 153 unsigned long val, err; 154 - int ret = sscanf(buf, "%ld", &val); 154 + int ret = sscanf(buf, "%lu", &val); 155 155 156 156 if (ret != 1) 157 157 return -EINVAL;
+1
arch/sparc/lib/NG2memcpy.S
··· 236 236 */ 237 237 VISEntryHalf 238 238 239 + membar #Sync 239 240 alignaddr %o1, %g0, %g0 240 241 241 242 add %o1, (64 - 1), %o4
+1 -15
arch/sparc/mm/fault_64.c
··· 281 281 show_regs(regs); 282 282 } 283 283 284 - static void noinline __kprobes bogus_32bit_fault_address(struct pt_regs *regs, 285 - unsigned long addr) 286 - { 287 - static int times; 288 - 289 - if (times++ < 10) 290 - printk(KERN_ERR "FAULT[%s:%d]: 32-bit process " 291 - "reports 64-bit fault address [%lx]\n", 292 - current->comm, current->pid, addr); 293 - show_regs(regs); 294 - } 295 - 296 284 asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) 297 285 { 298 286 enum ctx_state prev_state = exception_enter(); ··· 310 322 goto intr_or_no_mm; 311 323 } 312 324 } 313 - if (unlikely((address >> 32) != 0)) { 314 - bogus_32bit_fault_address(regs, address); 325 + if (unlikely((address >> 32) != 0)) 315 326 goto intr_or_no_mm; 316 - } 317 327 } 318 328 319 329 if (regs->tstate & TSTATE_PRIV) {
+13 -1
arch/sparc/mm/tsb.c
··· 133 133 mm->context.tsb_block[tsb_idx].tsb_nentries = 134 134 tsb_bytes / sizeof(struct tsb); 135 135 136 - base = TSBMAP_BASE; 136 + switch (tsb_idx) { 137 + case MM_TSB_BASE: 138 + base = TSBMAP_8K_BASE; 139 + break; 140 + #if defined(CONFIG_HUGETLB_PAGE) || defined(CONFIG_TRANSPARENT_HUGEPAGE) 141 + case MM_TSB_HUGE: 142 + base = TSBMAP_4M_BASE; 143 + break; 144 + #endif 145 + default: 146 + BUG(); 147 + } 148 + 137 149 tte = pgprot_val(PAGE_KERNEL_LOCKED); 138 150 tsb_paddr = __pa(mm->context.tsb_block[tsb_idx].tsb); 139 151 BUG_ON(tsb_paddr & (tsb_bytes - 1UL));