Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1079d3a authored by Michael Ellerman's avatar Michael Ellerman
Browse files

Merge branch 'fixes' into next

We ended up with an ugly conflict between fixes and next in ftrace.h
involving multiple nested ifdefs, and the automatic resolution is
wrong. So merge fixes into next so we can fix it up.
parents b5240b14 faf37c44
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -246,3 +246,11 @@ Description: read only
                Returns 1 if the psl timebase register is synchronized
                with the core timebase register, 0 otherwise.
Users:          https://github.com/ibm-capi/libcxl

What:           /sys/class/cxl/<card>/tunneled_ops_supported
Date:           May 2018
Contact:        linuxppc-dev@lists.ozlabs.org
Description:    read only
                Returns 1 if tunneled operations are supported in capi mode,
                0 otherwise.
Users:          https://github.com/ibm-capi/libcxl
+24 −9
Original line number Diff line number Diff line
@@ -65,19 +65,34 @@ struct dyn_arch_ftrace {
#endif /* CONFIG_FUNCTION_TRACER */

#ifndef __ASSEMBLY__
#if defined(CONFIG_FTRACE_SYSCALLS) && defined(PPC64_ELF_ABI_v1)
#ifdef CONFIG_FTRACE_SYSCALLS
/*
 * Some syscall entry functions on powerpc start with "ppc_" (fork and clone,
 * for instance) or ppc32_/ppc64_. We should also match the sys_ variant with
 * those.
 */
#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
#ifdef PPC64_ELF_ABI_v1
static inline bool arch_syscall_match_sym_name(const char *sym, const char *name)
{
	/*
	 * Compare the symbol name with the system call name. Skip the .sys or .SyS
	 * prefix from the symbol name and the sys prefix from the system call name and
	 * just match the rest. This is only needed on ppc64 since symbol names on
	 * 32bit do not start with a period so the generic function will work.
	 */
	return !strcmp(sym + 4, name + 3);
	/* We need to skip past the initial dot, and the __se_sys alias */
	return !strcmp(sym + 1, name) ||
		(!strncmp(sym, ".__se_sys", 9) && !strcmp(sym + 6, name)) ||
		(!strncmp(sym, ".ppc_", 5) && !strcmp(sym + 5, name + 4)) ||
		(!strncmp(sym, ".ppc32_", 7) && !strcmp(sym + 7, name + 4)) ||
		(!strncmp(sym, ".ppc64_", 7) && !strcmp(sym + 7, name + 4));
}
#else
static inline bool arch_syscall_match_sym_name(const char *sym, const char *name)
{
	return !strcmp(sym, name) ||
		(!strncmp(sym, "__se_sys", 8) && !strcmp(sym + 5, name)) ||
		(!strncmp(sym, "ppc_", 4) && !strcmp(sym + 4, name + 4)) ||
		(!strncmp(sym, "ppc32_", 6) && !strcmp(sym + 6, name + 4)) ||
		(!strncmp(sym, "ppc64_", 6) && !strcmp(sym + 6, name + 4));
}
#endif /* CONFIG_FTRACE_SYSCALLS && PPC64_ELF_ABI_v1 */
#endif /* PPC64_ELF_ABI_v1 */
#endif /* CONFIG_FTRACE_SYSCALLS */

#ifdef CONFIG_PPC64
#include <asm/paca.h>
+0 −1
Original line number Diff line number Diff line
@@ -165,7 +165,6 @@ struct paca_struct {
	u64 saved_msr;			/* MSR saved here by enter_rtas */
	u16 trap_save;			/* Used when bad stack is encountered */
	u8 irq_soft_mask;		/* mask for irq soft masking */
	u8 soft_enabled;		/* irq soft-enable flag */
	u8 irq_happened;		/* irq happened while soft-disabled */
	u8 io_sync;			/* writel() needs spin_unlock sync */
	u8 irq_work_pending;		/* IRQ_WORK interrupt while soft-disable */
+5 −8
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ extern int start_topology_update(void);
extern int stop_topology_update(void);
extern int prrn_is_enabled(void);
extern int find_and_online_cpu_nid(int cpu);
extern int timed_topology_update(int nsecs);
#else
static inline int start_topology_update(void)
{
@@ -108,16 +109,12 @@ static inline int find_and_online_cpu_nid(int cpu)
{
	return 0;
}
static inline int timed_topology_update(int nsecs)
{
	return 0;
}
#endif /* CONFIG_NUMA && CONFIG_PPC_SPLPAR */

#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_NEED_MULTIPLE_NODES)
#if defined(CONFIG_PPC_SPLPAR)
extern int timed_topology_update(int nsecs);
#else
#define	timed_topology_update(nsecs)
#endif /* CONFIG_PPC_SPLPAR */
#endif /* CONFIG_HOTPLUG_CPU || CONFIG_NEED_MULTIPLE_NODES */

#include <asm-generic/topology.h>

#ifdef CONFIG_SMP
+6 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ _GLOBAL(__setup_cpu_power7)
	beqlr
	li	r0,0
	mtspr	SPRN_LPID,r0
	mtspr	SPRN_PCR,r0
	mfspr	r3,SPRN_LPCR
	li	r4,(LPCR_LPES1 >> LPCR_LPES_SH)
	bl	__init_LPCR_ISA206
@@ -41,6 +42,7 @@ _GLOBAL(__restore_cpu_power7)
	beqlr
	li	r0,0
	mtspr	SPRN_LPID,r0
	mtspr	SPRN_PCR,r0
	mfspr	r3,SPRN_LPCR
	li	r4,(LPCR_LPES1 >> LPCR_LPES_SH)
	bl	__init_LPCR_ISA206
@@ -57,6 +59,7 @@ _GLOBAL(__setup_cpu_power8)
	beqlr
	li	r0,0
	mtspr	SPRN_LPID,r0
	mtspr	SPRN_PCR,r0
	mfspr	r3,SPRN_LPCR
	ori	r3, r3, LPCR_PECEDH
	li	r4,0 /* LPES = 0 */
@@ -78,6 +81,7 @@ _GLOBAL(__restore_cpu_power8)
	beqlr
	li	r0,0
	mtspr	SPRN_LPID,r0
	mtspr	SPRN_PCR,r0
	mfspr   r3,SPRN_LPCR
	ori	r3, r3, LPCR_PECEDH
	li	r4,0 /* LPES = 0 */
@@ -99,6 +103,7 @@ _GLOBAL(__setup_cpu_power9)
	mtspr	SPRN_PSSCR,r0
	mtspr	SPRN_LPID,r0
	mtspr	SPRN_PID,r0
	mtspr	SPRN_PCR,r0
	mfspr	r3,SPRN_LPCR
	LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE  | LPCR_HEIC)
	or	r3, r3, r4
@@ -123,6 +128,7 @@ _GLOBAL(__restore_cpu_power9)
	mtspr	SPRN_PSSCR,r0
	mtspr	SPRN_LPID,r0
	mtspr	SPRN_PID,r0
	mtspr	SPRN_PCR,r0
	mfspr   r3,SPRN_LPCR
	LOAD_REG_IMMEDIATE(r4, LPCR_PECEDH | LPCR_PECE_HVEE | LPCR_HVICE | LPCR_HEIC)
	or	r3, r3, r4
Loading