Skip to content

Commit b19e8c6

Browse files
committed
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Will Deacon: "Summary below, but it's all reasonably straightforward. There are some more fixes on the horizon, but nothing disastrous yet. Summary: - Fix build when KASLR is enabled but CONFIG_ARCH_RANDOM is not set - Fix context-switching of SSBS state on systems that implement it - Fix spinlock compiler warning introduced during the merge window - Fix incorrect header inclusion (linux/clk-provider.h) - Use SYSCTL_{ZERO,ONE} instead of rolling our own static variables - Don't scream if optional SMMUv3 PMU irq is missing - Remove some unused function prototypes" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: time: Replace <linux/clk-provider.h> by <linux/of_clk.h> arm64: Fix CONFIG_ARCH_RANDOM=n build perf/smmuv3: Use platform_get_irq_optional() for wired interrupt arm64/spinlock: fix a -Wunused-function warning arm64: ssbs: Fix context-switch when SSBS is present on all CPUs arm64: use shared sysctl constants arm64: Drop do_el0_ia_bp_hardening() & do_sp_pc_abort() declarations
2 parents 1d40890 + d917718 commit b19e8c6

File tree

6 files changed

+17
-11
lines changed

6 files changed

+17
-11
lines changed

arch/arm64/include/asm/exception.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ static inline u32 disr_to_esr(u64 disr)
3333

3434
asmlinkage void enter_from_user_mode(void);
3535
void do_mem_abort(unsigned long addr, unsigned int esr, struct pt_regs *regs);
36-
void do_sp_pc_abort(unsigned long addr, unsigned int esr, struct pt_regs *regs);
3736
void do_undefinstr(struct pt_regs *regs);
3837
asmlinkage void bad_mode(struct pt_regs *regs, int reason, unsigned int esr);
3938
void do_debug_exception(unsigned long addr_if_watchpoint, unsigned int esr,
@@ -47,7 +46,4 @@ void bad_el0_sync(struct pt_regs *regs, int reason, unsigned int esr);
4746
void do_cp15instr(unsigned int esr, struct pt_regs *regs);
4847
void do_el0_svc(struct pt_regs *regs);
4948
void do_el0_svc_compat(struct pt_regs *regs);
50-
void do_el0_ia_bp_hardening(unsigned long addr, unsigned int esr,
51-
struct pt_regs *regs);
52-
5349
#endif /* __ASM_EXCEPTION_H */

arch/arm64/include/asm/spinlock.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
* See:
1919
* https://lore.kernel.org/lkml/[email protected]
2020
*/
21-
#define vcpu_is_preempted(cpu) false
21+
#define vcpu_is_preempted vcpu_is_preempted
22+
static inline bool vcpu_is_preempted(int cpu)
23+
{
24+
return false;
25+
}
2226

2327
#endif /* __ASM_SPINLOCK_H */

arch/arm64/kernel/kaslr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/sched.h>
1212
#include <linux/types.h>
1313

14+
#include <asm/archrandom.h>
1415
#include <asm/cacheflush.h>
1516
#include <asm/fixmap.h>
1617
#include <asm/kernel-pgtable.h>

arch/arm64/kernel/process.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,13 @@ static void ssbs_thread_switch(struct task_struct *next)
466466
if (unlikely(next->flags & PF_KTHREAD))
467467
return;
468468

469+
/*
470+
* If all CPUs implement the SSBS extension, then we just need to
471+
* context-switch the PSTATE field.
472+
*/
473+
if (cpu_have_feature(cpu_feature(SSBS)))
474+
return;
475+
469476
/* If the mitigation is enabled, then we leave SSBS clear. */
470477
if ((arm64_get_ssbd_state() == ARM64_SSBD_FORCE_ENABLE) ||
471478
test_tsk_thread_flag(next, TIF_SSBD))
@@ -608,8 +615,6 @@ long get_tagged_addr_ctrl(void)
608615
* only prevents the tagged address ABI enabling via prctl() and does not
609616
* disable it for tasks that already opted in to the relaxed ABI.
610617
*/
611-
static int zero;
612-
static int one = 1;
613618

614619
static struct ctl_table tagged_addr_sysctl_table[] = {
615620
{
@@ -618,8 +623,8 @@ static struct ctl_table tagged_addr_sysctl_table[] = {
618623
.data = &tagged_addr_disabled,
619624
.maxlen = sizeof(int),
620625
.proc_handler = proc_dointvec_minmax,
621-
.extra1 = &zero,
622-
.extra2 = &one,
626+
.extra1 = SYSCTL_ZERO,
627+
.extra2 = SYSCTL_ONE,
623628
},
624629
{ }
625630
};

arch/arm64/kernel/time.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <linux/irq.h>
2424
#include <linux/delay.h>
2525
#include <linux/clocksource.h>
26-
#include <linux/clk-provider.h>
26+
#include <linux/of_clk.h>
2727
#include <linux/acpi.h>
2828

2929
#include <clocksource/arm_arch_timer.h>

drivers/perf/arm_smmuv3_pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ static int smmu_pmu_probe(struct platform_device *pdev)
771771
smmu_pmu->reloc_base = smmu_pmu->reg_base;
772772
}
773773

774-
irq = platform_get_irq(pdev, 0);
774+
irq = platform_get_irq_optional(pdev, 0);
775775
if (irq > 0)
776776
smmu_pmu->irq = irq;
777777

0 commit comments

Comments
 (0)