mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
Merge tag 'powerpc-7.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Madhavan Srinivasan: - Enable CONFIG_VPA_PMU to be used with KVM - Initialize starttime at boot for native accounting - Set CPU_FTR_P11_PVR for Power11 and later processors - fix memory leak on krealloc failure in papr_init - Misc fixes and cleanups Thanks to Amit Machhiwal, Christophe Leroy (CS GROUP), Ethan Nelson-Moore, Gautam Menghani, Harsh Prateek Bora, Junrui Luo, Mukesh Kumar Chaurasiya (IBM), Ritesh Harjani (IBM), Rosen Penev, Shrikanth Hegde, Thorsten Blum, and Yuhao Jiang * tag 'powerpc-7.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Remove dead non-preemption code powerpc/dt_cpu_ftrs: Set CPU_FTR_P11_PVR for Power11 and later processors powerpc/pseries: fix memory leak on krealloc failure in papr_init powerpc/uaccess: correct check for CONFIG_PPC_E500 in mask_user_address() powerpc/vtime: Initialize starttime at boot for native accounting powerpc/85xx: Add fsl,ifc to common device ids powerpc/spufs: fix out-of-bounds access in spufs_mem_mmap_access() powerpc/pseries/Kconfig: Enable CONFIG_VPA_PMU to be used with KVM
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __ASM_POWERPC_PREEMPT_H
|
||||
#define __ASM_POWERPC_PREEMPT_H
|
||||
|
||||
#include <asm-generic/preempt.h>
|
||||
|
||||
#if defined(CONFIG_PREEMPT_DYNAMIC)
|
||||
#include <linux/jump_label.h>
|
||||
DECLARE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched);
|
||||
#define need_irq_preemption() \
|
||||
(static_branch_unlikely(&sk_dynamic_irqentry_exit_cond_resched))
|
||||
#else
|
||||
#define need_irq_preemption() (IS_ENABLED(CONFIG_PREEMPTION))
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_POWERPC_PREEMPT_H */
|
||||
@@ -537,7 +537,7 @@ static inline void __user *mask_user_address(const void __user *ptr)
|
||||
|
||||
if (IS_ENABLED(CONFIG_PPC64))
|
||||
return mask_user_address_simple(ptr);
|
||||
if (IS_ENABLED(CONFIG_E500))
|
||||
if (IS_ENABLED(CONFIG_PPC_E500))
|
||||
return mask_user_address_isel(ptr);
|
||||
if (TASK_SIZE <= UL(SZ_2G) && border >= UL(SZ_2G))
|
||||
return mask_user_address_simple(ptr);
|
||||
|
||||
@@ -704,6 +704,15 @@ static void __init cpufeatures_setup_start(u32 isa)
|
||||
if (isa >= ISA_V3_1) {
|
||||
cur_cpu_spec->cpu_features |= CPU_FTR_ARCH_31;
|
||||
cur_cpu_spec->cpu_user_features2 |= PPC_FEATURE2_ARCH_3_1;
|
||||
|
||||
/*
|
||||
* CPU_FTR_P11_PVR is a kernel-internal flag to identify
|
||||
* Power11 and later processors. While ISA v3.1 is supported
|
||||
* by Power10+, this flag specifically indicates Power11+
|
||||
* for code that needs to distinguish between P10 and P11.
|
||||
*/
|
||||
if (PVR_VER(mfspr(SPRN_PVR)) >= PVR_POWER11)
|
||||
cur_cpu_spec->cpu_features |= CPU_FTR_P11_PVR;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -377,7 +377,6 @@ void vtime_task_switch(struct task_struct *prev)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NO_HZ_COMMON
|
||||
/**
|
||||
* vtime_reset - Fast forward vtime entry clocks
|
||||
*
|
||||
@@ -394,6 +393,7 @@ void vtime_reset(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NO_HZ_COMMON
|
||||
/**
|
||||
* vtime_dyntick_start - Inform vtime about entry to idle-dynticks
|
||||
*
|
||||
@@ -933,6 +933,7 @@ static void __init set_decrementer_max(void)
|
||||
static void __init init_decrementer_clockevent(void)
|
||||
{
|
||||
register_decrementer_clockevent(smp_processor_id());
|
||||
vtime_reset();
|
||||
}
|
||||
|
||||
void secondary_cpu_time_init(void)
|
||||
@@ -948,6 +949,7 @@ void secondary_cpu_time_init(void)
|
||||
/* FIME: Should make unrelated change to move snapshot_timebase
|
||||
* call here ! */
|
||||
register_decrementer_clockevent(smp_processor_id());
|
||||
vtime_reset();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -46,7 +46,7 @@ int exit_vmx_usercopy(void)
|
||||
* set and we are preemptible. The hack here is to schedule a
|
||||
* decrementer to fire here and reschedule for us if necessary.
|
||||
*/
|
||||
if (need_irq_preemption() && need_resched())
|
||||
if (need_resched())
|
||||
set_dec(1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ static const struct of_device_id mpc85xx_common_ids[] __initconst = {
|
||||
{ .compatible = "fsl,qoriq-pcie-v2.3", },
|
||||
{ .compatible = "fsl,qoriq-pcie-v2.2", },
|
||||
{ .compatible = "fsl,fman", },
|
||||
/* IFC NAND and NOR controllers */
|
||||
{ .compatible = "fsl,ifc", },
|
||||
{},
|
||||
};
|
||||
|
||||
|
||||
@@ -268,10 +268,12 @@ static int spufs_mem_mmap_access(struct vm_area_struct *vma,
|
||||
|
||||
if (write && !(vma->vm_flags & VM_WRITE))
|
||||
return -EACCES;
|
||||
if (offset >= LS_SIZE)
|
||||
return -EFAULT;
|
||||
if (spu_acquire(ctx))
|
||||
return -EINTR;
|
||||
if ((offset + len) > vma->vm_end)
|
||||
len = vma->vm_end - offset;
|
||||
if ((offset + len) > LS_SIZE)
|
||||
len = LS_SIZE - offset;
|
||||
local_store = ctx->ops->get_ls(ctx);
|
||||
if (write)
|
||||
memcpy_toio(local_store + offset, buf, len);
|
||||
|
||||
@@ -154,6 +154,7 @@ config HV_PERF_CTRS
|
||||
config VPA_PMU
|
||||
tristate "VPA PMU events"
|
||||
depends on KVM_BOOK3S_64_HV && HV_PERF_CTRS
|
||||
default m
|
||||
help
|
||||
Enable access to the VPA PMU counters via perf. This enables
|
||||
code that support measurement for KVM on PowerVM(KoP) feature.
|
||||
|
||||
@@ -271,11 +271,9 @@ static int __init papr_init(void)
|
||||
esi_buf_size = ESI_HDR_SIZE + (CURR_MAX_ESI_ATTRS * max_esi_attrs);
|
||||
|
||||
temp_esi_buf = krealloc(esi_buf, esi_buf_size, GFP_KERNEL);
|
||||
if (temp_esi_buf)
|
||||
esi_buf = temp_esi_buf;
|
||||
else
|
||||
return -ENOMEM;
|
||||
|
||||
if (!temp_esi_buf)
|
||||
goto out_free_esi_buf;
|
||||
esi_buf = temp_esi_buf;
|
||||
goto retry;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user