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 'parisc-4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parisc fixes from Helge Deller:

- Many small fixes to show the real physical addresses of devices
instead of hashed addresses.

- One important fix to unbreak 32-bit SMP support: We forgot to 16-byte
align the spinlocks in the assembler code.

- Qemu support: The host will get a chance to sleep when the parisc
guest is idle. We use the same mechanism as the power architecture by
overlaying the "or %r10,%r10,%r10" instruction which is simply a nop
on real hardware.

* 'parisc-4.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: qemu idle sleep support
parisc: Fix alignment of pa_tlb_lock in assembly on 32-bit SMP kernel
parisc: Show unhashed EISA EEPROM address
parisc: Show unhashed HPA of Dino chip
parisc: Show initial kernel memory layout unhashed
parisc: Show unhashed hardware inventory

+71 -16
+2
arch/parisc/include/asm/ldcw.h
··· 12 12 for the semaphore. */ 13 13 14 14 #define __PA_LDCW_ALIGNMENT 16 15 + #define __PA_LDCW_ALIGN_ORDER 4 15 16 #define __ldcw_align(a) ({ \ 16 17 unsigned long __ret = (unsigned long) &(a)->lock[0]; \ 17 18 __ret = (__ret + __PA_LDCW_ALIGNMENT - 1) \ ··· 30 29 ldcd). */ 31 30 32 31 #define __PA_LDCW_ALIGNMENT 4 32 + #define __PA_LDCW_ALIGN_ORDER 2 33 33 #define __ldcw_align(a) (&(a)->slock) 34 34 #define __LDCW "ldcw,co" 35 35
+1 -1
arch/parisc/kernel/drivers.c
··· 870 870 static int count; 871 871 872 872 print_pa_hwpath(dev, hw_path); 873 - printk(KERN_INFO "%d. %s at 0x%p [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }", 873 + printk(KERN_INFO "%d. %s at 0x%px [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }", 874 874 ++count, dev->name, (void*) dev->hpa.start, hw_path, dev->id.hw_type, 875 875 dev->id.hversion_rev, dev->id.hversion, dev->id.sversion); 876 876
+11 -2
arch/parisc/kernel/entry.S
··· 35 35 #include <asm/pgtable.h> 36 36 #include <asm/signal.h> 37 37 #include <asm/unistd.h> 38 + #include <asm/ldcw.h> 38 39 #include <asm/thread_info.h> 39 40 40 41 #include <linux/linkage.h> ··· 47 46 #endif 48 47 49 48 .import pa_tlb_lock,data 49 + .macro load_pa_tlb_lock reg 50 + #if __PA_LDCW_ALIGNMENT > 4 51 + load32 PA(pa_tlb_lock) + __PA_LDCW_ALIGNMENT-1, \reg 52 + depi 0,31,__PA_LDCW_ALIGN_ORDER, \reg 53 + #else 54 + load32 PA(pa_tlb_lock), \reg 55 + #endif 56 + .endm 50 57 51 58 /* space_to_prot macro creates a prot id from a space id */ 52 59 ··· 466 457 .macro tlb_lock spc,ptp,pte,tmp,tmp1,fault 467 458 #ifdef CONFIG_SMP 468 459 cmpib,COND(=),n 0,\spc,2f 469 - load32 PA(pa_tlb_lock),\tmp 460 + load_pa_tlb_lock \tmp 470 461 1: LDCW 0(\tmp),\tmp1 471 462 cmpib,COND(=) 0,\tmp1,1b 472 463 nop ··· 489 480 /* Release pa_tlb_lock lock. */ 490 481 .macro tlb_unlock1 spc,tmp 491 482 #ifdef CONFIG_SMP 492 - load32 PA(pa_tlb_lock),\tmp 483 + load_pa_tlb_lock \tmp 493 484 tlb_unlock0 \spc,\tmp 494 485 #endif 495 486 .endm
+7 -2
arch/parisc/kernel/pacache.S
··· 36 36 #include <asm/assembly.h> 37 37 #include <asm/pgtable.h> 38 38 #include <asm/cache.h> 39 + #include <asm/ldcw.h> 39 40 #include <linux/linkage.h> 40 41 41 42 .text ··· 334 333 335 334 .macro tlb_lock la,flags,tmp 336 335 #ifdef CONFIG_SMP 337 - ldil L%pa_tlb_lock,%r1 338 - ldo R%pa_tlb_lock(%r1),\la 336 + #if __PA_LDCW_ALIGNMENT > 4 337 + load32 pa_tlb_lock + __PA_LDCW_ALIGNMENT-1, \la 338 + depi 0,31,__PA_LDCW_ALIGN_ORDER, \la 339 + #else 340 + load32 pa_tlb_lock, \la 341 + #endif 339 342 rsm PSW_SM_I,\flags 340 343 1: LDCW 0(\la),\tmp 341 344 cmpib,<>,n 0,\tmp,3f
+39
arch/parisc/kernel/process.c
··· 39 39 #include <linux/kernel.h> 40 40 #include <linux/mm.h> 41 41 #include <linux/fs.h> 42 + #include <linux/cpu.h> 42 43 #include <linux/module.h> 43 44 #include <linux/personality.h> 44 45 #include <linux/ptrace.h> ··· 183 182 memcpy(r, tsk->thread.regs.fr, sizeof(*r)); 184 183 return 1; 185 184 } 185 + 186 + /* 187 + * Idle thread support 188 + * 189 + * Detect when running on QEMU with SeaBIOS PDC Firmware and let 190 + * QEMU idle the host too. 191 + */ 192 + 193 + int running_on_qemu __read_mostly; 194 + 195 + void __cpuidle arch_cpu_idle_dead(void) 196 + { 197 + /* nop on real hardware, qemu will offline CPU. */ 198 + asm volatile("or %%r31,%%r31,%%r31\n":::); 199 + } 200 + 201 + void __cpuidle arch_cpu_idle(void) 202 + { 203 + local_irq_enable(); 204 + 205 + /* nop on real hardware, qemu will idle sleep. */ 206 + asm volatile("or %%r10,%%r10,%%r10\n":::); 207 + } 208 + 209 + static int __init parisc_idle_init(void) 210 + { 211 + const char *marker; 212 + 213 + /* check QEMU/SeaBIOS marker in PAGE0 */ 214 + marker = (char *) &PAGE0->pad0; 215 + running_on_qemu = (memcmp(marker, "SeaBIOS", 8) == 0); 216 + 217 + if (!running_on_qemu) 218 + cpu_idle_poll_ctrl(1); 219 + 220 + return 0; 221 + } 222 + arch_initcall(parisc_idle_init); 186 223 187 224 /* 188 225 * Copy architecture-specific thread state
+5 -5
arch/parisc/mm/init.c
··· 631 631 mem_init_print_info(NULL); 632 632 #ifdef CONFIG_DEBUG_KERNEL /* double-sanity-check paranoia */ 633 633 printk("virtual kernel memory layout:\n" 634 - " vmalloc : 0x%p - 0x%p (%4ld MB)\n" 635 - " memory : 0x%p - 0x%p (%4ld MB)\n" 636 - " .init : 0x%p - 0x%p (%4ld kB)\n" 637 - " .data : 0x%p - 0x%p (%4ld kB)\n" 638 - " .text : 0x%p - 0x%p (%4ld kB)\n", 634 + " vmalloc : 0x%px - 0x%px (%4ld MB)\n" 635 + " memory : 0x%px - 0x%px (%4ld MB)\n" 636 + " .init : 0x%px - 0x%px (%4ld kB)\n" 637 + " .data : 0x%px - 0x%px (%4ld kB)\n" 638 + " .text : 0x%px - 0x%px (%4ld kB)\n", 639 639 640 640 (void*)VMALLOC_START, (void*)VMALLOC_END, 641 641 (VMALLOC_END - VMALLOC_START) >> 20,
+5 -5
drivers/parisc/dino.c
··· 303 303 struct dino_device *dino_dev = irq_data_get_irq_chip_data(d); 304 304 int local_irq = gsc_find_local_irq(d->irq, dino_dev->global_irq, DINO_LOCAL_IRQS); 305 305 306 - DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, d->irq); 306 + DBG(KERN_WARNING "%s(0x%px, %d)\n", __func__, dino_dev, d->irq); 307 307 308 308 /* Clear the matching bit in the IMR register */ 309 309 dino_dev->imr &= ~(DINO_MASK_IRQ(local_irq)); ··· 316 316 int local_irq = gsc_find_local_irq(d->irq, dino_dev->global_irq, DINO_LOCAL_IRQS); 317 317 u32 tmp; 318 318 319 - DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, d->irq); 319 + DBG(KERN_WARNING "%s(0x%px, %d)\n", __func__, dino_dev, d->irq); 320 320 321 321 /* 322 322 ** clear pending IRQ bits ··· 396 396 if (mask) { 397 397 if (--ilr_loop > 0) 398 398 goto ilr_again; 399 - printk(KERN_ERR "Dino 0x%p: stuck interrupt %d\n", 399 + printk(KERN_ERR "Dino 0x%px: stuck interrupt %d\n", 400 400 dino_dev->hba.base_addr, mask); 401 401 return IRQ_NONE; 402 402 } ··· 553 553 struct pci_dev *dev; 554 554 struct dino_device *dino_dev = DINO_DEV(parisc_walk_tree(bus->bridge)); 555 555 556 - DBG(KERN_WARNING "%s(0x%p) bus %d platform_data 0x%p\n", 556 + DBG(KERN_WARNING "%s(0x%px) bus %d platform_data 0x%px\n", 557 557 __func__, bus, bus->busn_res.start, 558 558 bus->bridge->platform_data); 559 559 ··· 854 854 res->flags = IORESOURCE_IO; /* do not mark it busy ! */ 855 855 if (request_resource(&ioport_resource, res) < 0) { 856 856 printk(KERN_ERR "%s: request I/O Port region failed " 857 - "0x%lx/%lx (hpa 0x%p)\n", 857 + "0x%lx/%lx (hpa 0x%px)\n", 858 858 name, (unsigned long)res->start, (unsigned long)res->end, 859 859 dino_dev->hba.base_addr); 860 860 return 1;
+1 -1
drivers/parisc/eisa_eeprom.c
··· 106 106 return retval; 107 107 } 108 108 109 - printk(KERN_INFO "EISA EEPROM at 0x%p\n", eisa_eeprom_addr); 109 + printk(KERN_INFO "EISA EEPROM at 0x%px\n", eisa_eeprom_addr); 110 110 return 0; 111 111 } 112 112