Commit 810996a3 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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'
parents e0fac5fc 227bbaab
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -562,7 +562,8 @@ Description: Control Symmetric Multi Threading (SMT)
			 ================ =========================================

			 If control status is "forceoff" or "notsupported" writes
			 are rejected.
			 are rejected. Note that enabling SMT on PowerPC skips
			 offline cores.

What:		/sys/devices/system/cpu/cpuX/power/energy_perf_bias
Date:		March 2019
+13 −0
Original line number Diff line number Diff line
@@ -145,6 +145,7 @@ static inline int cpu_to_coregroup_id(int cpu)

#ifdef CONFIG_HOTPLUG_SMT
#include <linux/cpu_smt.h>
#include <linux/cpumask.h>
#include <asm/cputhreads.h>

static inline bool topology_is_primary_thread(unsigned int cpu)
@@ -156,6 +157,18 @@ static inline bool topology_smt_thread_allowed(unsigned int cpu)
{
	return cpu_thread_in_core(cpu) < cpu_smt_num_threads;
}

#define topology_is_core_online topology_is_core_online
static inline bool topology_is_core_online(unsigned int cpu)
{
	int i, first_cpu = cpu_first_thread_sibling(cpu);

	for (i = first_cpu; i < first_cpu + threads_per_core; ++i) {
		if (cpu_online(i))
			return true;
	}
	return false;
}
#endif

#endif /* __KERNEL__ */
+1 −0
Original line number Diff line number Diff line
@@ -959,6 +959,7 @@ void __init setup_arch(char **cmdline_p)
	mem_topology_setup();
	/* Set max_mapnr before paging_init() */
	set_max_mapnr(max_pfn);
	high_memory = (void *)__va(max_low_pfn * PAGE_SIZE);

	/*
	 * Release secondary cpus out of their spinloops at 0x60 now that
+2 −2
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ void setup_kup(void)

#define CTOR(shift) static void ctor_##shift(void *addr) \
{							\
	memset(addr, 0, sizeof(void *) << (shift));	\
	memset(addr, 0, sizeof(pgd_t) << (shift));	\
}

CTOR(0); CTOR(1); CTOR(2); CTOR(3); CTOR(4); CTOR(5); CTOR(6); CTOR(7);
@@ -117,7 +117,7 @@ EXPORT_SYMBOL_GPL(pgtable_cache); /* used by kvm_hv module */
void pgtable_cache_add(unsigned int shift)
{
	char *name;
	unsigned long table_size = sizeof(void *) << shift;
	unsigned long table_size = sizeof(pgd_t) << shift;
	unsigned long align = table_size;

	/* When batching pgtable pointers for RCU freeing, we store
+0 −2
Original line number Diff line number Diff line
@@ -290,8 +290,6 @@ void __init mem_init(void)
	swiotlb_init(ppc_swiotlb_enable, ppc_swiotlb_flags);
#endif

	high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);

	kasan_late_init();

	memblock_free_all();
Loading