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 tag 'powerpc-4.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

"One notable fix for kexec on Power9, where we were not clearing MMU
PID properly which sometimes leads to hangs. Finally debugged to a
root cause by Nick.

A revert of a patch which tried to rework our panic handling to get
more output on the console, but inadvertently broke reporting the
panic to the hypervisor, which apparently people care about.

Then a fix for an oops in the PMU code, and finally some s/%p/%px/ in
xmon.

Thanks to: David Gibson, Nicholas Piggin, Ravi Bangoria"

* tag 'powerpc-4.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/xmon: Don't print hashed pointers in xmon
powerpc/64s: Initialize ISAv3 MMU registers before setting partition table
Revert "powerpc: Do not call ppc_md.panic in fadump panic notifier"
powerpc/perf: Fix oops when grouping different pmu events

+54 -29
+1
arch/powerpc/include/asm/machdep.h
··· 76 76 77 77 void __noreturn (*restart)(char *cmd); 78 78 void __noreturn (*halt)(void); 79 + void (*panic)(char *str); 79 80 void (*cpu_die)(void); 80 81 81 82 long (*time_init)(void); /* Optional, may be NULL */
+1
arch/powerpc/include/asm/setup.h
··· 24 24 25 25 void check_for_initrd(void); 26 26 void initmem_init(void); 27 + void setup_panic(void); 27 28 #define ARCH_PANIC_TIMEOUT 180 28 29 29 30 #ifdef CONFIG_PPC_PSERIES
+2
arch/powerpc/kernel/cpu_setup_power.S
··· 102 102 li r0,0 103 103 mtspr SPRN_PSSCR,r0 104 104 mtspr SPRN_LPID,r0 105 + mtspr SPRN_PID,r0 105 106 mfspr r3,SPRN_LPCR 106 107 LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE | LPCR_HEIC) 107 108 or r3, r3, r4 ··· 127 126 li r0,0 128 127 mtspr SPRN_PSSCR,r0 129 128 mtspr SPRN_LPID,r0 129 + mtspr SPRN_PID,r0 130 130 mfspr r3,SPRN_LPCR 131 131 LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE | LPCR_HEIC) 132 132 or r3, r3, r4
-22
arch/powerpc/kernel/fadump.c
··· 1462 1462 return; 1463 1463 } 1464 1464 1465 - static int fadump_panic_event(struct notifier_block *this, 1466 - unsigned long event, void *ptr) 1467 - { 1468 - /* 1469 - * If firmware-assisted dump has been registered then trigger 1470 - * firmware-assisted dump and let firmware handle everything 1471 - * else. If this returns, then fadump was not registered, so 1472 - * go through the rest of the panic path. 1473 - */ 1474 - crash_fadump(NULL, ptr); 1475 - 1476 - return NOTIFY_DONE; 1477 - } 1478 - 1479 - static struct notifier_block fadump_panic_block = { 1480 - .notifier_call = fadump_panic_event, 1481 - .priority = INT_MIN /* may not return; must be done last */ 1482 - }; 1483 - 1484 1465 /* 1485 1466 * Prepare for firmware-assisted dump. 1486 1467 */ ··· 1493 1512 else if (fw_dump.reserve_dump_area_size) 1494 1513 init_fadump_mem_struct(&fdm, fw_dump.reserve_dump_area_start); 1495 1514 fadump_init_files(); 1496 - 1497 - atomic_notifier_chain_register(&panic_notifier_list, 1498 - &fadump_panic_block); 1499 1515 1500 1516 return 1; 1501 1517 }
+27
arch/powerpc/kernel/setup-common.c
··· 704 704 } 705 705 EXPORT_SYMBOL(check_legacy_ioport); 706 706 707 + static int ppc_panic_event(struct notifier_block *this, 708 + unsigned long event, void *ptr) 709 + { 710 + /* 711 + * If firmware-assisted dump has been registered then trigger 712 + * firmware-assisted dump and let firmware handle everything else. 713 + */ 714 + crash_fadump(NULL, ptr); 715 + ppc_md.panic(ptr); /* May not return */ 716 + return NOTIFY_DONE; 717 + } 718 + 719 + static struct notifier_block ppc_panic_block = { 720 + .notifier_call = ppc_panic_event, 721 + .priority = INT_MIN /* may not return; must be done last */ 722 + }; 723 + 724 + void __init setup_panic(void) 725 + { 726 + if (!ppc_md.panic) 727 + return; 728 + atomic_notifier_chain_register(&panic_notifier_list, &ppc_panic_block); 729 + } 730 + 707 731 #ifdef CONFIG_CHECK_CACHE_COHERENCY 708 732 /* 709 733 * For platforms that have configurable cache-coherency. This function ··· 871 847 872 848 /* Probe the machine type, establish ppc_md. */ 873 849 probe_machine(); 850 + 851 + /* Setup panic notifier if requested by the platform. */ 852 + setup_panic(); 874 853 875 854 /* 876 855 * Configure ppc_md.power_save (ppc32 only, 64-bit machines do
+2 -2
arch/powerpc/perf/core-book3s.c
··· 1415 1415 int n = 0; 1416 1416 struct perf_event *event; 1417 1417 1418 - if (!is_software_event(group)) { 1418 + if (group->pmu->task_ctx_nr == perf_hw_context) { 1419 1419 if (n >= max_count) 1420 1420 return -1; 1421 1421 ctrs[n] = group; ··· 1423 1423 events[n++] = group->hw.config; 1424 1424 } 1425 1425 list_for_each_entry(event, &group->sibling_list, group_entry) { 1426 - if (!is_software_event(event) && 1426 + if (event->pmu->task_ctx_nr == perf_hw_context && 1427 1427 event->state != PERF_EVENT_STATE_OFF) { 1428 1428 if (n >= max_count) 1429 1429 return -1;
+15
arch/powerpc/platforms/ps3/setup.c
··· 104 104 ps3_sys_manager_halt(); /* never returns */ 105 105 } 106 106 107 + static void ps3_panic(char *str) 108 + { 109 + DBG("%s:%d %s\n", __func__, __LINE__, str); 110 + 111 + smp_send_stop(); 112 + printk("\n"); 113 + printk(" System does not reboot automatically.\n"); 114 + printk(" Please press POWER button.\n"); 115 + printk("\n"); 116 + 117 + while(1) 118 + lv1_pause(1); 119 + } 120 + 107 121 #if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \ 108 122 defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE) 109 123 static void __init prealloc(struct ps3_prealloc *p) ··· 269 255 .probe = ps3_probe, 270 256 .setup_arch = ps3_setup_arch, 271 257 .init_IRQ = ps3_init_IRQ, 258 + .panic = ps3_panic, 272 259 .get_boot_time = ps3_get_boot_time, 273 260 .set_dabr = ps3_set_dabr, 274 261 .calibrate_decr = ps3_calibrate_decr,
+1
arch/powerpc/platforms/pseries/setup.c
··· 726 726 .pcibios_fixup = pSeries_final_fixup, 727 727 .restart = rtas_restart, 728 728 .halt = rtas_halt, 729 + .panic = rtas_os_term, 729 730 .get_boot_time = rtas_get_boot_time, 730 731 .get_rtc_time = rtas_get_rtc_time, 731 732 .set_rtc_time = rtas_set_rtc_time,
+5 -5
arch/powerpc/xmon/xmon.c
··· 1590 1590 printf("kernel BUG at %s:%u!\n", 1591 1591 bug->file, bug->line); 1592 1592 #else 1593 - printf("kernel BUG at %p!\n", (void *)bug->bug_addr); 1593 + printf("kernel BUG at %px!\n", (void *)bug->bug_addr); 1594 1594 #endif 1595 1595 #endif /* CONFIG_BUG */ 1596 1596 } ··· 2329 2329 2330 2330 p = &paca[cpu]; 2331 2331 2332 - printf("paca for cpu 0x%x @ %p:\n", cpu, p); 2332 + printf("paca for cpu 0x%x @ %px:\n", cpu, p); 2333 2333 2334 2334 printf(" %-*s = %s\n", 20, "possible", cpu_possible(cpu) ? "yes" : "no"); 2335 2335 printf(" %-*s = %s\n", 20, "present", cpu_present(cpu) ? "yes" : "no"); ··· 2945 2945 (tsk->exit_state & EXIT_DEAD) ? 'E' : 2946 2946 (tsk->state & TASK_INTERRUPTIBLE) ? 'S' : '?'; 2947 2947 2948 - printf("%p %016lx %6d %6d %c %2d %s\n", tsk, 2948 + printf("%px %016lx %6d %6d %c %2d %s\n", tsk, 2949 2949 tsk->thread.ksp, 2950 2950 tsk->pid, tsk->parent->pid, 2951 2951 state, task_thread_info(tsk)->cpu, ··· 2988 2988 2989 2989 if (setjmp(bus_error_jmp) != 0) { 2990 2990 catch_memory_errors = 0; 2991 - printf("*** Error dumping pte for task %p\n", tsk); 2991 + printf("*** Error dumping pte for task %px\n", tsk); 2992 2992 return; 2993 2993 } 2994 2994 ··· 3074 3074 3075 3075 if (setjmp(bus_error_jmp) != 0) { 3076 3076 catch_memory_errors = 0; 3077 - printf("*** Error dumping task %p\n", tsk); 3077 + printf("*** Error dumping task %px\n", tsk); 3078 3078 return; 3079 3079 } 3080 3080