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

Commit 234fb61a authored by Catalin Marinas's avatar Catalin Marinas Committed by Ian Maund
Browse files

arm64: Fix !CONFIG_SMP kernel build



Commit fb4a96029c8a (arm64: kernel: fix per-cpu offset restore on
resume) uses per_cpu_offset() unconditionally during CPU wakeup,
however, this is only defined for the SMP case.

Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Reported-by: default avatarDave P Martin <Dave.Martin@arm.com>
Git-commit: b57fc9e80692043e2a3a74e1d2c047eb700dcd0c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarIan Maund <imaund@codeaurora.org>
parent 2a63def9
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@
#ifndef __ASM_PERCPU_H
#define __ASM_PERCPU_H

#ifdef CONFIG_SMP

static inline void set_my_cpu_offset(unsigned long off)
{
	asm volatile("msr tpidr_el1, %0" :: "r" (off) : "memory");
@@ -36,6 +38,12 @@ static inline unsigned long __my_cpu_offset(void)
}
#define __my_cpu_offset __my_cpu_offset()

#else	/* !CONFIG_SMP */

#define set_my_cpu_offset(x)	do { } while (0)

#endif /* CONFIG_SMP */

#include <asm-generic/percpu.h>

#endif /* __ASM_PERCPU_H */