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

Pull powerpc fixes from Michael Ellerman:

- Fix crashes on 85xx with some configs since the recent hugepd rework.

- Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL on some
platforms.

- Don't enable offline cores when changing SMT modes, to match existing
userspace behaviour.

Thanks to Christophe Leroy, Dr. David Alan Gilbert, Guenter Roeck, Nysal
Jan K.A, Shrikanth Hegde, Thomas Gleixner, and Tyrel Datwyler.

* tag 'powerpc-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
powerpc/topology: Check if a core is online
cpu/SMT: Enable SMT only if a core is online
powerpc/mm: Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL
powerpc/mm: Fix size of allocated PGDIR
soc: fsl: qbman: remove unused struct 'cgr_comp'

+29 -11
+2 -1
Documentation/ABI/testing/sysfs-devices-system-cpu
··· 562 562 ================ ========================================= 563 563 564 564 If control status is "forceoff" or "notsupported" writes 565 - are rejected. 565 + are rejected. Note that enabling SMT on PowerPC skips 566 + offline cores. 566 567 567 568 What: /sys/devices/system/cpu/cpuX/power/energy_perf_bias 568 569 Date: March 2019
+13
arch/powerpc/include/asm/topology.h
··· 145 145 146 146 #ifdef CONFIG_HOTPLUG_SMT 147 147 #include <linux/cpu_smt.h> 148 + #include <linux/cpumask.h> 148 149 #include <asm/cputhreads.h> 149 150 150 151 static inline bool topology_is_primary_thread(unsigned int cpu) ··· 156 155 static inline bool topology_smt_thread_allowed(unsigned int cpu) 157 156 { 158 157 return cpu_thread_in_core(cpu) < cpu_smt_num_threads; 158 + } 159 + 160 + #define topology_is_core_online topology_is_core_online 161 + static inline bool topology_is_core_online(unsigned int cpu) 162 + { 163 + int i, first_cpu = cpu_first_thread_sibling(cpu); 164 + 165 + for (i = first_cpu; i < first_cpu + threads_per_core; ++i) { 166 + if (cpu_online(i)) 167 + return true; 168 + } 169 + return false; 159 170 } 160 171 #endif 161 172
+1
arch/powerpc/kernel/setup-common.c
··· 959 959 mem_topology_setup(); 960 960 /* Set max_mapnr before paging_init() */ 961 961 set_max_mapnr(max_pfn); 962 + high_memory = (void *)__va(max_low_pfn * PAGE_SIZE); 962 963 963 964 /* 964 965 * Release secondary cpus out of their spinloops at 0x60 now that
+2 -2
arch/powerpc/mm/init-common.c
··· 73 73 74 74 #define CTOR(shift) static void ctor_##shift(void *addr) \ 75 75 { \ 76 - memset(addr, 0, sizeof(void *) << (shift)); \ 76 + memset(addr, 0, sizeof(pgd_t) << (shift)); \ 77 77 } 78 78 79 79 CTOR(0); CTOR(1); CTOR(2); CTOR(3); CTOR(4); CTOR(5); CTOR(6); CTOR(7); ··· 117 117 void pgtable_cache_add(unsigned int shift) 118 118 { 119 119 char *name; 120 - unsigned long table_size = sizeof(void *) << shift; 120 + unsigned long table_size = sizeof(pgd_t) << shift; 121 121 unsigned long align = table_size; 122 122 123 123 /* When batching pgtable pointers for RCU freeing, we store
-2
arch/powerpc/mm/mem.c
··· 290 290 swiotlb_init(ppc_swiotlb_enable, ppc_swiotlb_flags); 291 291 #endif 292 292 293 - high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); 294 - 295 293 kasan_late_init(); 296 294 297 295 memblock_free_all();
-5
drivers/soc/fsl/qbman/qman.c
··· 2546 2546 } 2547 2547 EXPORT_SYMBOL(qman_delete_cgr); 2548 2548 2549 - struct cgr_comp { 2550 - struct qman_cgr *cgr; 2551 - struct completion completion; 2552 - }; 2553 - 2554 2549 static void qman_delete_cgr_smp_call(void *p) 2555 2550 { 2556 2551 qman_delete_cgr((struct qman_cgr *)p);
+11 -1
kernel/cpu.c
··· 2689 2689 return ret; 2690 2690 } 2691 2691 2692 + /** 2693 + * Check if the core a CPU belongs to is online 2694 + */ 2695 + #if !defined(topology_is_core_online) 2696 + static inline bool topology_is_core_online(unsigned int cpu) 2697 + { 2698 + return true; 2699 + } 2700 + #endif 2701 + 2692 2702 int cpuhp_smt_enable(void) 2693 2703 { 2694 2704 int cpu, ret = 0; ··· 2709 2699 /* Skip online CPUs and CPUs on offline nodes */ 2710 2700 if (cpu_online(cpu) || !node_online(cpu_to_node(cpu))) 2711 2701 continue; 2712 - if (!cpu_smt_thread_allowed(cpu)) 2702 + if (!cpu_smt_thread_allowed(cpu) || !topology_is_core_online(cpu)) 2713 2703 continue; 2714 2704 ret = _cpu_up(cpu, 0, CPUHP_ONLINE); 2715 2705 if (ret)