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

Pull powerpc fixes from Michael Ellerman:

- Fix unnecessary copy to 0 when kernel is booted at address 0

- Fix usercopy crash when dumping dtl via debugfs

- Avoid possible crash when PCI hotplug races with error handling

- Fix kexec crash caused by scv being disabled before other CPUs
call-in

- Fix powerpc selftests build with USERCFLAGS set

Thanks to Anjali K, Ganesh Goudar, Gautam Menghani, Jinglin Wen,
Nicholas Piggin, Sourabh Jain, Srikar Dronamraju, and Vishal Chourasia.

* tag 'powerpc-6.10-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
selftests/powerpc: Fix build with USERCFLAGS set
powerpc/pseries: Fix scv instruction crash with kexec
powerpc/eeh: avoid possible crash when edev->pdev changes
powerpc/pseries: Whitelist dtl slub object for copying to userspace
powerpc/64s: Fix unnecessary copy to 0 when kernel is booted at address 0

+22 -20
+5 -2
arch/powerpc/kernel/eeh_pe.c
··· 849 849 { 850 850 struct eeh_dev *edev; 851 851 struct pci_dev *pdev; 852 + struct pci_bus *bus = NULL; 852 853 853 854 if (pe->type & EEH_PE_PHB) 854 855 return pe->phb->bus; ··· 860 859 861 860 /* Retrieve the parent PCI bus of first (top) PCI device */ 862 861 edev = list_first_entry_or_null(&pe->edevs, struct eeh_dev, entry); 862 + pci_lock_rescan_remove(); 863 863 pdev = eeh_dev_to_pci_dev(edev); 864 864 if (pdev) 865 - return pdev->bus; 865 + bus = pdev->bus; 866 + pci_unlock_rescan_remove(); 866 867 867 - return NULL; 868 + return bus; 868 869 }
+3 -2
arch/powerpc/kernel/head_64.S
··· 647 647 * Note: This process overwrites the OF exception vectors. 648 648 */ 649 649 LOAD_REG_IMMEDIATE(r3, PAGE_OFFSET) 650 - mr. r4,r26 /* In some cases the loader may */ 651 - beq 9f /* have already put us at zero */ 650 + mr r4,r26 /* Load the virtual source address into r4 */ 651 + cmpld r3,r4 /* Check if source == dest */ 652 + beq 9f /* If so skip the copy */ 652 653 li r6,0x100 /* Start offset, the first 0x100 */ 653 654 /* bytes were copied earlier. */ 654 655
+11
arch/powerpc/kexec/core_64.c
··· 27 27 #include <asm/paca.h> 28 28 #include <asm/mmu.h> 29 29 #include <asm/sections.h> /* _end */ 30 + #include <asm/setup.h> 30 31 #include <asm/smp.h> 31 32 #include <asm/hw_breakpoint.h> 32 33 #include <asm/svm.h> ··· 317 316 318 317 if (!kdump_in_progress()) 319 318 kexec_prepare_cpus(); 319 + 320 + #ifdef CONFIG_PPC_PSERIES 321 + /* 322 + * This must be done after other CPUs have shut down, otherwise they 323 + * could execute the 'scv' instruction, which is not supported with 324 + * reloc disabled (see configure_exceptions()). 325 + */ 326 + if (firmware_has_feature(FW_FEATURE_SET_MODE)) 327 + pseries_disable_reloc_on_exc(); 328 + #endif 320 329 321 330 printk("kexec: Starting switchover sequence.\n"); 322 331
-8
arch/powerpc/platforms/pseries/kexec.c
··· 61 61 } else 62 62 xics_kexec_teardown_cpu(secondary); 63 63 } 64 - 65 - void pseries_machine_kexec(struct kimage *image) 66 - { 67 - if (firmware_has_feature(FW_FEATURE_SET_MODE)) 68 - pseries_disable_reloc_on_exc(); 69 - 70 - default_machine_kexec(image); 71 - }
-1
arch/powerpc/platforms/pseries/pseries.h
··· 38 38 #endif 39 39 40 40 extern void pseries_kexec_cpu_down(int crash_shutdown, int secondary); 41 - void pseries_machine_kexec(struct kimage *image); 42 41 43 42 extern void pSeries_final_fixup(void); 44 43
+2 -3
arch/powerpc/platforms/pseries/setup.c
··· 343 343 { 344 344 void (*ctor)(void *) = get_dtl_cache_ctor(); 345 345 346 - dtl_cache = kmem_cache_create("dtl", DISPATCH_LOG_BYTES, 347 - DISPATCH_LOG_BYTES, 0, ctor); 346 + dtl_cache = kmem_cache_create_usercopy("dtl", DISPATCH_LOG_BYTES, 347 + DISPATCH_LOG_BYTES, 0, 0, DISPATCH_LOG_BYTES, ctor); 348 348 if (!dtl_cache) { 349 349 pr_warn("Failed to create dispatch trace log buffer cache\n"); 350 350 pr_warn("Stolen time statistics will be unreliable\n"); ··· 1159 1159 .machine_check_exception = pSeries_machine_check_exception, 1160 1160 .machine_check_log_err = pSeries_machine_check_log_err, 1161 1161 #ifdef CONFIG_KEXEC_CORE 1162 - .machine_kexec = pseries_machine_kexec, 1163 1162 .kexec_cpu_down = pseries_kexec_cpu_down, 1164 1163 #endif 1165 1164 #ifdef CONFIG_MEMORY_HOTPLUG
+1 -4
tools/testing/selftests/powerpc/flags.mk
··· 5 5 export GIT_VERSION 6 6 endif 7 7 8 - ifeq ($(CFLAGS),) 9 - CFLAGS := -std=gnu99 -O2 -Wall -Werror -DGIT_VERSION='"$(GIT_VERSION)"' -I$(selfdir)/powerpc/include $(CFLAGS) 8 + CFLAGS := -std=gnu99 -O2 -Wall -Werror -DGIT_VERSION='"$(GIT_VERSION)"' -I$(selfdir)/powerpc/include $(USERCFLAGS) 10 9 export CFLAGS 11 - endif 12 -