Skip to content

Commit

Permalink
Automatic merge of 'next' into merge (2023-08-17 10:20)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpe committed Aug 17, 2023
2 parents 198165d + fe8aa8e commit d774975
Show file tree
Hide file tree
Showing 89 changed files with 411 additions and 425 deletions.
1 change: 1 addition & 0 deletions Documentation/ABI/testing/sysfs-devices-system-cpu
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ Description: Control Symmetric Multi Threading (SMT)
================ =========================================
"on" SMT is enabled
"off" SMT is disabled
"<N>" SMT is enabled with N threads per core.
"forceoff" SMT is force disabled. Cannot be changed.
"notsupported" SMT is not supported by the CPU
"notimplemented" SMT runtime toggling is not
Expand Down
4 changes: 2 additions & 2 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3874,10 +3874,10 @@
nosmp [SMP] Tells an SMP kernel to act as a UP kernel,
and disable the IO APIC. legacy for "maxcpus=0".

nosmt [KNL,MIPS,S390] Disable symmetric multithreading (SMT).
nosmt [KNL,MIPS,PPC,S390] Disable symmetric multithreading (SMT).
Equivalent to smt=1.

[KNL,X86] Disable symmetric multithreading (SMT).
[KNL,X86,PPC] Disable symmetric multithreading (SMT).
nosmt=force: Force disable SMT, cannot be undone
via the sysfs control file.

Expand Down
3 changes: 3 additions & 0 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ config ARCH_HAS_SUBPAGE_FAULTS
config HOTPLUG_SMT
bool

config SMT_NUM_THREADS_DYNAMIC
bool

# Selected by HOTPLUG_CORE_SYNC_DEAD or HOTPLUG_CORE_SYNC_FULL
config HOTPLUG_CORE_SYNC
bool
Expand Down
8 changes: 2 additions & 6 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ config PPC
select HAVE_SYSCALL_TRACEPOINTS
select HAVE_VIRT_CPU_ACCOUNTING
select HAVE_VIRT_CPU_ACCOUNTING_GEN
select HOTPLUG_SMT if HOTPLUG_CPU
select SMT_NUM_THREADS_DYNAMIC
select HUGETLB_PAGE_SIZE_VARIABLE if PPC_BOOK3S_64 && HUGETLB_PAGE
select IOMMU_HELPER if PPC64
select IRQ_DOMAIN
Expand Down Expand Up @@ -1144,12 +1146,6 @@ config FSL_GTM
help
Freescale General-purpose Timers support

config PCI_8260
bool
depends on PCI && 8260
select PPC_INDIRECT_PCI
default y

config FSL_RIO
bool "Freescale Embedded SRIO Controller support"
depends on RAPIDIO = y && HAVE_RAPIDIO
Expand Down
3 changes: 2 additions & 1 deletion arch/powerpc/configs/pmac32_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,9 @@ CONFIG_MOUSE_APPLETOUCH=y
# CONFIG_SERIO_I8042 is not set
# CONFIG_SERIO_SERPORT is not set
CONFIG_SERIAL_8250=m
CONFIG_SERIAL_PMACZILOG=m
CONFIG_SERIAL_PMACZILOG=y
CONFIG_SERIAL_PMACZILOG_TTYS=y
CONFIG_SERIAL_PMACZILOG_CONSOLE=y
CONFIG_NVRAM=y
CONFIG_I2C_CHARDEV=m
CONFIG_APM_POWER=y
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/include/asm/8xx_immap.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,5 +560,7 @@ typedef struct immap {
cpm8xx_t im_cpm; /* Communication processor */
} immap_t;

extern immap_t __iomem *mpc8xx_immr;

#endif /* __IMMAP_8XX__ */
#endif /* __KERNEL__ */
1 change: 0 additions & 1 deletion arch/powerpc/include/asm/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ generated-y += syscall_table_32.h
generated-y += syscall_table_64.h
generated-y += syscall_table_spu.h
generic-y += agp.h
generic-y += export.h
generic-y += kvm_types.h
generic-y += mcs_spinlock.h
generic-y += qrwlock.h
Expand Down
3 changes: 3 additions & 0 deletions arch/powerpc/include/asm/cpm2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,9 @@ typedef struct im_idma {
#define FCC2_MEM_OFFSET FCC_MEM_OFFSET(1)
#define FCC3_MEM_OFFSET FCC_MEM_OFFSET(2)

/* Pipeline Maximum Depth */
#define MPC82XX_BCR_PLDP 0x00800000

/* Clocks and GRG's */

enum cpm_clk_dir {
Expand Down
22 changes: 0 additions & 22 deletions arch/powerpc/include/asm/fs_pd.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,6 @@
#include <sysdev/fsl_soc.h>
#include <asm/time.h>

#ifdef CONFIG_CPM2
#include <asm/cpm2.h>

#if defined(CONFIG_8260)
#include <asm/mpc8260.h>
#endif

#define cpm2_map(member) (&cpm2_immr->member)
#define cpm2_map_size(member, size) (&cpm2_immr->member)
#define cpm2_unmap(addr) do {} while(0)
#endif

#ifdef CONFIG_PPC_8xx
#include <asm/8xx_immap.h>

extern immap_t __iomem *mpc8xx_immr;

#define immr_map(member) (&mpc8xx_immr->member)
#define immr_map_size(member, size) (&mpc8xx_immr->member)
#define immr_unmap(addr) do {} while (0)
#endif

static inline int uart_baudrate(void)
{
return get_baudrate();
Expand Down
22 changes: 0 additions & 22 deletions arch/powerpc/include/asm/mpc8260.h

This file was deleted.

2 changes: 2 additions & 0 deletions arch/powerpc/include/asm/ppc-opcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@
#define PPC_RAW_RFCI (0x4c000066)
#define PPC_RAW_RFDI (0x4c00004e)
#define PPC_RAW_RFMCI (0x4c00004c)
#define PPC_RAW_TLBILX_LPID (0x7c000024)
#define PPC_RAW_TLBILX(t, a, b) (0x7c000024 | __PPC_T_TLB(t) | __PPC_RA0(a) | __PPC_RB(b))
#define PPC_RAW_WAIT_v203 (0x7c00007c)
#define PPC_RAW_WAIT(w, p) (0x7c00003c | __PPC_WC(w) | __PPC_PL(p))
Expand Down Expand Up @@ -616,6 +617,7 @@
#define PPC_TLBILX(t, a, b) stringify_in_c(.long PPC_RAW_TLBILX(t, a, b))
#define PPC_TLBILX_ALL(a, b) PPC_TLBILX(0, a, b)
#define PPC_TLBILX_PID(a, b) PPC_TLBILX(1, a, b)
#define PPC_TLBILX_LPID stringify_in_c(.long PPC_RAW_TLBILX_LPID)
#define PPC_TLBILX_VA(a, b) PPC_TLBILX(3, a, b)
#define PPC_WAIT_v203 stringify_in_c(.long PPC_RAW_WAIT_v203)
#define PPC_WAIT(w, p) stringify_in_c(.long PPC_RAW_WAIT(w, p))
Expand Down
2 changes: 0 additions & 2 deletions arch/powerpc/include/asm/reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1414,11 +1414,9 @@ static inline void mtmsr_isync(unsigned long val)
#define mfspr(rn) ({unsigned long rval; \
asm volatile("mfspr %0," __stringify(rn) \
: "=r" (rval)); rval;})
#ifndef mtspr
#define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : \
: "r" ((unsigned long)(v)) \
: "memory")
#endif
#define wrtspr(rn) asm volatile("mtspr " __stringify(rn) ",2" : : : "memory")

static inline void wrtee(unsigned long val)
Expand Down
15 changes: 15 additions & 0 deletions arch/powerpc/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,20 @@ static inline int cpu_to_coregroup_id(int cpu)
#endif
#endif

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

static inline bool topology_is_primary_thread(unsigned int cpu)
{
return cpu == cpu_first_thread_sibling(cpu);
}

static inline bool topology_smt_thread_allowed(unsigned int cpu)
{
return cpu_thread_in_core(cpu) < cpu_smt_num_threads;
}
#endif

#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_TOPOLOGY_H */
1 change: 0 additions & 1 deletion arch/powerpc/kernel/entry_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <asm/asm-offsets.h>
#include <asm/unistd.h>
#include <asm/ptrace.h>
#include <asm/export.h>
#include <asm/feature-fixups.h>
#include <asm/barrier.h>
#include <asm/kup.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/epapr_hcalls.S
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright (C) 2012 Freescale Semiconductor, Inc.
*/

#include <linux/export.h>
#include <linux/threads.h>
#include <asm/epapr_hcalls.h>
#include <asm/reg.h>
Expand All @@ -12,7 +13,6 @@
#include <asm/ppc_asm.h>
#include <asm/asm-compat.h>
#include <asm/asm-offsets.h>
#include <asm/export.h>

#ifndef CONFIG_PPC64
/* epapr_ev_idle() was derived from e500_idle() */
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/fpu.S
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* Copyright (C) 1997 Dan Malek ([email protected]).
*/

#include <linux/export.h>
#include <asm/reg.h>
#include <asm/page.h>
#include <asm/mmu.h>
Expand All @@ -18,7 +19,6 @@
#include <asm/ppc_asm.h>
#include <asm/asm-offsets.h>
#include <asm/ptrace.h>
#include <asm/export.h>
#include <asm/asm-compat.h>
#include <asm/feature-fixups.h>

Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/kernel/head_40x.S
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <asm/ppc_asm.h>
#include <asm/asm-offsets.h>
#include <asm/ptrace.h>
#include <asm/export.h>

#include "head_32.h"

Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/kernel/head_44x.S
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <asm/asm-offsets.h>
#include <asm/ptrace.h>
#include <asm/synch.h>
#include <asm/export.h>
#include <asm/code-patching-asm.h>
#include "head_booke.h"

Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/kernel/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include <asm/hw_irq.h>
#include <asm/cputhreads.h>
#include <asm/ppc-opcode.h>
#include <asm/export.h>
#include <asm/feature-fixups.h>
#ifdef CONFIG_PPC_BOOK3S
#include <asm/exception-64s.h>
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/kernel/head_85xx.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include <asm/asm-offsets.h>
#include <asm/cache.h>
#include <asm/ptrace.h>
#include <asm/export.h>
#include <asm/feature-fixups.h>
#include "head_booke.h"

Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/kernel/head_8xx.S
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <asm/ppc_asm.h>
#include <asm/asm-offsets.h>
#include <asm/ptrace.h>
#include <asm/export.h>
#include <asm/code-patching-asm.h>
#include <asm/interrupt.h>

Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/kernel/head_book3s_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <asm/ptrace.h>
#include <asm/bug.h>
#include <asm/kvm_book3s_asm.h>
#include <asm/export.h>
#include <asm/feature-fixups.h>
#include <asm/interrupt.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/misc.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
*
* setjmp/longjmp code by Paul Mackerras.
*/
#include <linux/export.h>
#include <asm/ppc_asm.h>
#include <asm/unistd.h>
#include <asm/asm-compat.h>
#include <asm/asm-offsets.h>
#include <asm/export.h>

.text

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/misc_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*
*/

#include <linux/export.h>
#include <linux/sys.h>
#include <asm/unistd.h>
#include <asm/errno.h>
Expand All @@ -22,7 +23,6 @@
#include <asm/processor.h>
#include <asm/bug.h>
#include <asm/ptrace.h>
#include <asm/export.h>
#include <asm/feature-fixups.h>

.text
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/misc_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* PPC64 updates by Dave Engebretsen ([email protected])
*/

#include <linux/export.h>
#include <linux/linkage.h>
#include <linux/sys.h>
#include <asm/unistd.h>
Expand All @@ -23,7 +24,6 @@
#include <asm/kexec.h>
#include <asm/ptrace.h>
#include <asm/mmu.h>
#include <asm/export.h>
#include <asm/feature-fixups.h>

.text
Expand Down
8 changes: 7 additions & 1 deletion arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ static int __init init_big_cores(void)

void __init smp_prepare_cpus(unsigned int max_cpus)
{
unsigned int cpu;
unsigned int cpu, num_threads;

DBG("smp_prepare_cpus\n");

Expand Down Expand Up @@ -1155,6 +1155,12 @@ void __init smp_prepare_cpus(unsigned int max_cpus)

if (smp_ops && smp_ops->probe)
smp_ops->probe();

// Initalise the generic SMT topology support
num_threads = 1;
if (smt_enabled_at_boot)
num_threads = smt_enabled_at_boot;
cpu_smt_set_num_threads(num_threads, threads_per_core);
}

void smp_prepare_boot_cpu(void)
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/tm.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
* Copyright 2012 Matt Evans & Michael Neuling, IBM Corporation.
*/

#include <linux/export.h>
#include <asm/asm-offsets.h>
#include <asm/ppc_asm.h>
#include <asm/ppc-opcode.h>
#include <asm/ptrace.h>
#include <asm/reg.h>
#include <asm/bug.h>
#include <asm/export.h>
#include <asm/feature-fixups.h>

#ifdef CONFIG_VSX
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/kernel/trace/ftrace_64_pg.S
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <asm/asm-offsets.h>
#include <asm/ftrace.h>
#include <asm/ppc-opcode.h>
#include <asm/export.h>

_GLOBAL_TOC(ftrace_caller)
lbz r3, PACA_FTRACE_ENABLED(r13)
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/trace/ftrace_low.S
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* Split from entry_64.S
*/

#include <linux/export.h>
#include <linux/magic.h>
#include <asm/ppc_asm.h>
#include <asm/asm-offsets.h>
#include <asm/ftrace.h>
#include <asm/ppc-opcode.h>
#include <asm/export.h>

#ifdef CONFIG_PPC64
.pushsection ".tramp.ftrace.text","aw",@progbits;
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/kernel/trace/ftrace_mprofile.S
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <asm/asm-offsets.h>
#include <asm/ftrace.h>
#include <asm/ppc-opcode.h>
#include <asm/export.h>
#include <asm/thread_info.h>
#include <asm/bug.h>
#include <asm/ptrace.h>
Expand Down
Loading

0 comments on commit d774975

Please sign in to comment.