Skip to content

Commit

Permalink
Automatic merge of 'next-test' into merge-test (2023-08-25 00:23)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpe committed Aug 24, 2023
2 parents a8160a4 + ccd62d2 commit bd4ee20
Show file tree
Hide file tree
Showing 50 changed files with 141 additions and 150 deletions.
4 changes: 1 addition & 3 deletions arch/powerpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@ endif
CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += -mcpu=$(CONFIG_TARGET_CPU)
AFLAGS-$(CONFIG_TARGET_CPU_BOOL) += -mcpu=$(CONFIG_TARGET_CPU)

CFLAGS-$(CONFIG_POWERPC64_CPU) += $(call cc-option,-mtune=power10, \
$(call cc-option,-mtune=power9, \
$(call cc-option,-mtune=power8)))
CFLAGS-y += $(CONFIG_TUNE_CPU)

asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1)

Expand Down
12 changes: 6 additions & 6 deletions arch/powerpc/boot/dts/fsl/c293si-post.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@
reg = <0x80000 0x20000>;
ranges = <0x0 0x80000 0x20000>;

jr@1000{
jr@1000 {
interrupts = <45 2 0 0>;
};
jr@2000{
jr@2000 {
interrupts = <57 2 0 0>;
};
};
Expand All @@ -140,10 +140,10 @@
reg = <0xa0000 0x20000>;
ranges = <0x0 0xa0000 0x20000>;

jr@1000{
jr@1000 {
interrupts = <49 2 0 0>;
};
jr@2000{
jr@2000 {
interrupts = <50 2 0 0>;
};
};
Expand All @@ -156,10 +156,10 @@
reg = <0xc0000 0x20000>;
ranges = <0x0 0xc0000 0x20000>;

jr@1000{
jr@1000 {
interrupts = <55 2 0 0>;
};
jr@2000{
jr@2000 {
interrupts = <56 2 0 0>;
};
};
Expand Down
10 changes: 5 additions & 5 deletions arch/powerpc/boot/dts/fsl/p1022rdk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,23 @@
compatible = "st,m41t62";
reg = <0x68>;
};
adt7461@4c{
adt7461@4c {
compatible = "adi,adt7461";
reg = <0x4c>;
};
zl6100@21{
zl6100@21 {
compatible = "isil,zl6100";
reg = <0x21>;
};
zl6100@24{
zl6100@24 {
compatible = "isil,zl6100";
reg = <0x24>;
};
zl6100@26{
zl6100@26 {
compatible = "isil,zl6100";
reg = <0x26>;
};
zl6100@29{
zl6100@29 {
compatible = "isil,zl6100";
reg = <0x29>;
};
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/boot/dts/fsl/p1022si-post.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
fsl,has-rstcr;
};

power@e0070{
power@e0070 {
compatible = "fsl,mpc8536-pmc", "fsl,mpc8548-pmc";
reg = <0xe0070 0x20>;
};
Expand Down
4 changes: 2 additions & 2 deletions arch/powerpc/boot/dts/fsl/p3041ds.dts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#size-cells = <2>;
interrupt-parent = <&mpic>;

aliases{
aliases {
phy_rgmii_0 = &phy_rgmii_0;
phy_rgmii_1 = &phy_rgmii_1;
phy_sgmii_1c = &phy_sgmii_1c;
Expand Down Expand Up @@ -165,7 +165,7 @@
};
};

fman@400000{
fman@400000 {
ethernet@e0000 {
phy-handle = <&phy_sgmii_1c>;
phy-connection-type = "sgmii";
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/boot/dts/fsl/p5040ds.dts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#size-cells = <2>;
interrupt-parent = <&mpic>;

aliases{
aliases {
phy_sgmii_slot2_1c = &phy_sgmii_slot2_1c;
phy_sgmii_slot2_1d = &phy_sgmii_slot2_1d;
phy_sgmii_slot2_1e = &phy_sgmii_slot2_1e;
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/boot/dts/fsl/t4240qds.dts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#size-cells = <2>;
interrupt-parent = <&mpic>;

aliases{
aliases {
phy_rgmii1 = &phyrgmii1;
phy_rgmii2 = &phyrgmii2;
phy_sgmii3 = &phy3;
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/boot/dts/mpc5121.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
};

/* Power Management Controller */
pmc@1000{
pmc@1000 {
compatible = "fsl,mpc5121-pmc";
reg = <0x1000 0x100>;
interrupts = <83 0x8>;
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/boot/dts/mpc5125twr.dts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
clock-names = "osc";
};

pmc@1000{ // Power Management Controller
pmc@1000 { // Power Management Controller
compatible = "fsl,mpc5121-pmc";
reg = <0x1000 0x100>;
interrupts = <83 0x2>;
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/configs/skiroot_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ CONFIG_LIBCRC32C=y
# CONFIG_XZ_DEC_SPARC is not set
CONFIG_PRINTK_TIME=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_SLUB_DEBUG_ON=y
CONFIG_SCHED_STACK_END_CHECK=y
CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_PANIC_ON_OOPS=y
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/include/asm/dtl.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,5 @@ extern rwlock_t dtl_access_lock;

extern void register_dtl_buffer(int cpu);
extern void alloc_dtl_buffers(unsigned long *time_limit);
extern long hcall_vphn(unsigned long cpu, u64 flags, __be32 *associativity);

#endif /* _ASM_POWERPC_DTL_H */
37 changes: 12 additions & 25 deletions arch/powerpc/include/asm/lppaca.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,6 @@
#ifndef _ASM_POWERPC_LPPACA_H
#define _ASM_POWERPC_LPPACA_H

/*
* The below VPHN macros are outside the __KERNEL__ check since these are
* used for compiling the vphn selftest in userspace
*/

/* The H_HOME_NODE_ASSOCIATIVITY h_call returns 6 64-bit registers. */
#define VPHN_REGISTER_COUNT 6

/*
* 6 64-bit registers unpacked into up to 24 be32 associativity values. To
* form the complete property we have to add the length in the first cell.
*/
#define VPHN_ASSOC_BUFSIZE (VPHN_REGISTER_COUNT*sizeof(u64)/sizeof(u16) + 1)

/*
* The H_HOME_NODE_ASSOCIATIVITY hcall takes two values for flags:
* 1 for retrieving associativity information for a guest cpu
* 2 for retrieving associativity information for a host/hypervisor cpu
*/
#define VPHN_FLAG_VCPU 1
#define VPHN_FLAG_PCPU 2

#ifdef __KERNEL__

/*
Expand All @@ -45,6 +23,7 @@
#include <asm/types.h>
#include <asm/mmu.h>
#include <asm/firmware.h>
#include <asm/paca.h>

/*
* The lppaca is the "virtual processor area" registered with the hypervisor,
Expand Down Expand Up @@ -127,13 +106,23 @@ struct lppaca {
*/
#define LPPACA_OLD_SHARED_PROC 2

static inline bool lppaca_shared_proc(struct lppaca *l)
#ifdef CONFIG_PPC_PSERIES
/*
* All CPUs should have the same shared proc value, so directly access the PACA
* to avoid false positives from DEBUG_PREEMPT.
*/
static inline bool lppaca_shared_proc(void)
{
struct lppaca *l = local_paca->lppaca_ptr;

if (!firmware_has_feature(FW_FEATURE_SPLPAR))
return false;
return !!(l->__old_status & LPPACA_OLD_SHARED_PROC);
}

#define get_lppaca() (get_paca()->lppaca_ptr)
#endif

/*
* SLB shadow buffer structure as defined in the PAPR. The save_area
* contains adjacent ESID and VSID pairs for each shadowed SLB. The
Expand All @@ -149,8 +138,6 @@ struct slb_shadow {
} save_area[SLB_NUM_BOLTED];
} ____cacheline_aligned;

extern long hcall_vphn(unsigned long cpu, u64 flags, __be32 *associativity);

#endif /* CONFIG_PPC_BOOK3S */
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_LPPACA_H */
5 changes: 0 additions & 5 deletions arch/powerpc/include/asm/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@

typedef pte_t *pgtable_t;

#ifdef CONFIG_PPC_E500
#include <asm/percpu.h>
DECLARE_PER_CPU(int, next_tlbcam_idx);
#endif

enum {
MMU_FTRS_POSSIBLE =
#if defined(CONFIG_PPC_BOOK3S_604)
Expand Down
3 changes: 3 additions & 0 deletions arch/powerpc/include/asm/nohash/mmu-e500.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ extern int book3e_htw_mode;

#endif

#include <asm/percpu.h>
DECLARE_PER_CPU(int, next_tlbcam_idx);

#endif /* !__ASSEMBLY__ */

#endif /* _ASM_POWERPC_MMU_BOOK3E_H_ */
6 changes: 1 addition & 5 deletions arch/powerpc/include/asm/paca.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <linux/cache.h>
#include <linux/string.h>
#include <asm/types.h>
#include <asm/lppaca.h>
#include <asm/mmu.h>
#include <asm/page.h>
#ifdef CONFIG_PPC_BOOK3E_64
Expand Down Expand Up @@ -47,14 +46,11 @@ extern unsigned int debug_smp_processor_id(void); /* from linux/smp.h */
#define get_paca() local_paca
#endif

#ifdef CONFIG_PPC_PSERIES
#define get_lppaca() (get_paca()->lppaca_ptr)
#endif

#define get_slb_shadow() (get_paca()->slb_shadow_ptr)

struct task_struct;
struct rtas_args;
struct lppaca;

/*
* Defines the layout of the paca.
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/paravirt.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <asm/smp.h>
#ifdef CONFIG_PPC64
#include <asm/paca.h>
#include <asm/lppaca.h>
#include <asm/hvcall.h>
#endif

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/include/asm/plpar_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <asm/hvcall.h>
#include <asm/paca.h>
#include <asm/lppaca.h>
#include <asm/page.h>

static inline long poll_pending(void)
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/include/asm/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
extern void ppc_printk_progress(char *s, unsigned short hex);

extern unsigned long long memory_limit;
extern void *zalloc_maybe_bootmem(size_t size, gfp_t mask);

struct device_node;

Expand Down
24 changes: 24 additions & 0 deletions arch/powerpc/include/asm/vphn.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef _ASM_POWERPC_VPHN_H
#define _ASM_POWERPC_VPHN_H

/* The H_HOME_NODE_ASSOCIATIVITY h_call returns 6 64-bit registers. */
#define VPHN_REGISTER_COUNT 6

/*
* 6 64-bit registers unpacked into up to 24 be32 associativity values. To
* form the complete property we have to add the length in the first cell.
*/
#define VPHN_ASSOC_BUFSIZE (VPHN_REGISTER_COUNT*sizeof(u64)/sizeof(u16) + 1)

/*
* The H_HOME_NODE_ASSOCIATIVITY hcall takes two values for flags:
* 1 for retrieving associativity information for a guest cpu
* 2 for retrieving associativity information for a host/hypervisor cpu
*/
#define VPHN_FLAG_VCPU 1
#define VPHN_FLAG_PCPU 2

long hcall_vphn(unsigned long cpu, u64 flags, __be32 *associativity);

#endif // _ASM_POWERPC_VPHN_H
15 changes: 12 additions & 3 deletions arch/powerpc/kernel/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,26 @@ static int fail_iommu_bus_notify(struct notifier_block *nb,
return 0;
}

static struct notifier_block fail_iommu_bus_notifier = {
/*
* PCI and VIO buses need separate notifier_block structs, since they're linked
* list nodes. Sharing a notifier_block would mean that any notifiers later
* registered for PCI buses would also get called by VIO buses and vice versa.
*/
static struct notifier_block fail_iommu_pci_bus_notifier = {
.notifier_call = fail_iommu_bus_notify
};

static struct notifier_block fail_iommu_vio_bus_notifier = {

Check warning on line 184 in arch/powerpc/kernel/iommu.c

View workflow job for this annotation

GitHub Actions / kernel (ppc64, ppc64_book3e_allmodconfig, fedora-37)

'fail_iommu_vio_bus_notifier' defined but not used [-Wunused-variable]
.notifier_call = fail_iommu_bus_notify
};

static int __init fail_iommu_setup(void)
{
#ifdef CONFIG_PCI
bus_register_notifier(&pci_bus_type, &fail_iommu_bus_notifier);
bus_register_notifier(&pci_bus_type, &fail_iommu_pci_bus_notifier);
#endif
#ifdef CONFIG_IBMVIO
bus_register_notifier(&vio_bus_type, &fail_iommu_bus_notifier);
bus_register_notifier(&vio_bus_type, &fail_iommu_vio_bus_notifier);
#endif

return 0;
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ struct pci_controller *pcibios_alloc_controller(struct device_node *dev)
{
struct pci_controller *phb;

phb = zalloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
phb = kzalloc(sizeof(struct pci_controller), GFP_KERNEL);
if (phb == NULL)
return NULL;

Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/pmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void release_pmc_hardware(void)
}
EXPORT_SYMBOL_GPL(release_pmc_hardware);

#ifdef CONFIG_PPC64
#ifdef CONFIG_PPC_BOOK3S_64
void power4_enable_pmcs(void)
{
unsigned long hid0;
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kvm/book3s_hv_ras.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <linux/kvm.h>
#include <linux/kvm_host.h>
#include <linux/kernel.h>
#include <asm/lppaca.h>
#include <asm/opal.h>
#include <asm/mce.h>
#include <asm/machdep.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ endif
CFLAGS_code-patching.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
CFLAGS_feature-fixups.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)

obj-y += alloc.o code-patching.o feature-fixups.o pmem.o
obj-y += code-patching.o feature-fixups.o pmem.o

obj-$(CONFIG_CODE_PATCHING_SELFTEST) += test-code-patching.o

Expand Down
Loading

0 comments on commit bd4ee20

Please sign in to comment.