Skip to content

Commit 420f51f

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: "A few arm64 fixes came in this week, specifically fixing some nasty truncation of return values from firmware calls and resolving a VM_BUG_ON due to accessing uninitialised struct pages corresponding to NOMAP pages. Summary: - Fix typos in SVE documentation - Fix type-checking and implicit truncation for SMCCC calls - Force CONFIG_HOLES_IN_ZONE=y so that SLAB doesn't fall over NOMAP regions" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mm: always enable CONFIG_HOLES_IN_ZONE arm/arm64: smccc-1.1: Handle function result as parameters arm/arm64: smccc-1.1: Make return values unsigned long Documentation/arm64/sve: Couple of improvements and typos
2 parents 4290d5b + f52bb98 commit 420f51f

File tree

3 files changed

+26
-17
lines changed

3 files changed

+26
-17
lines changed

Documentation/arm64/sve.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ prctl(PR_SVE_SET_VL, unsigned long arg)
200200
thread.
201201

202202
* Changing the vector length causes all of P0..P15, FFR and all bits of
203-
Z0..V31 except for Z0 bits [127:0] .. Z31 bits [127:0] to become
203+
Z0..Z31 except for Z0 bits [127:0] .. Z31 bits [127:0] to become
204204
unspecified. Calling PR_SVE_SET_VL with vl equal to the thread's current
205205
vector length, or calling PR_SVE_SET_VL with the PR_SVE_SET_VL_ONEXEC
206206
flag, does not constitute a change to the vector length for this purpose.
@@ -500,7 +500,7 @@ References
500500
[2] arch/arm64/include/uapi/asm/ptrace.h
501501
AArch64 Linux ptrace ABI definitions
502502

503-
[3] linux/Documentation/arm64/cpu-feature-registers.txt
503+
[3] Documentation/arm64/cpu-feature-registers.txt
504504

505505
[4] ARM IHI0055C
506506
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055c/IHI0055C_beta_aapcs64.pdf

arch/arm64/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,6 @@ config NEED_PER_CPU_EMBED_FIRST_CHUNK
763763

764764
config HOLES_IN_ZONE
765765
def_bool y
766-
depends on NUMA
767766

768767
source kernel/Kconfig.hz
769768

include/linux/arm-smccc.h

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -199,47 +199,57 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
199199

200200
#define __declare_arg_0(a0, res) \
201201
struct arm_smccc_res *___res = res; \
202-
register u32 r0 asm("r0") = a0; \
202+
register unsigned long r0 asm("r0") = (u32)a0; \
203203
register unsigned long r1 asm("r1"); \
204204
register unsigned long r2 asm("r2"); \
205205
register unsigned long r3 asm("r3")
206206

207207
#define __declare_arg_1(a0, a1, res) \
208+
typeof(a1) __a1 = a1; \
208209
struct arm_smccc_res *___res = res; \
209-
register u32 r0 asm("r0") = a0; \
210-
register typeof(a1) r1 asm("r1") = a1; \
210+
register unsigned long r0 asm("r0") = (u32)a0; \
211+
register unsigned long r1 asm("r1") = __a1; \
211212
register unsigned long r2 asm("r2"); \
212213
register unsigned long r3 asm("r3")
213214

214215
#define __declare_arg_2(a0, a1, a2, res) \
216+
typeof(a1) __a1 = a1; \
217+
typeof(a2) __a2 = a2; \
215218
struct arm_smccc_res *___res = res; \
216-
register u32 r0 asm("r0") = a0; \
217-
register typeof(a1) r1 asm("r1") = a1; \
218-
register typeof(a2) r2 asm("r2") = a2; \
219+
register unsigned long r0 asm("r0") = (u32)a0; \
220+
register unsigned long r1 asm("r1") = __a1; \
221+
register unsigned long r2 asm("r2") = __a2; \
219222
register unsigned long r3 asm("r3")
220223

221224
#define __declare_arg_3(a0, a1, a2, a3, res) \
225+
typeof(a1) __a1 = a1; \
226+
typeof(a2) __a2 = a2; \
227+
typeof(a3) __a3 = a3; \
222228
struct arm_smccc_res *___res = res; \
223-
register u32 r0 asm("r0") = a0; \
224-
register typeof(a1) r1 asm("r1") = a1; \
225-
register typeof(a2) r2 asm("r2") = a2; \
226-
register typeof(a3) r3 asm("r3") = a3
229+
register unsigned long r0 asm("r0") = (u32)a0; \
230+
register unsigned long r1 asm("r1") = __a1; \
231+
register unsigned long r2 asm("r2") = __a2; \
232+
register unsigned long r3 asm("r3") = __a3
227233

228234
#define __declare_arg_4(a0, a1, a2, a3, a4, res) \
235+
typeof(a4) __a4 = a4; \
229236
__declare_arg_3(a0, a1, a2, a3, res); \
230-
register typeof(a4) r4 asm("r4") = a4
237+
register unsigned long r4 asm("r4") = __a4
231238

232239
#define __declare_arg_5(a0, a1, a2, a3, a4, a5, res) \
240+
typeof(a5) __a5 = a5; \
233241
__declare_arg_4(a0, a1, a2, a3, a4, res); \
234-
register typeof(a5) r5 asm("r5") = a5
242+
register unsigned long r5 asm("r5") = __a5
235243

236244
#define __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res) \
245+
typeof(a6) __a6 = a6; \
237246
__declare_arg_5(a0, a1, a2, a3, a4, a5, res); \
238-
register typeof(a6) r6 asm("r6") = a6
247+
register unsigned long r6 asm("r6") = __a6
239248

240249
#define __declare_arg_7(a0, a1, a2, a3, a4, a5, a6, a7, res) \
250+
typeof(a7) __a7 = a7; \
241251
__declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res); \
242-
register typeof(a7) r7 asm("r7") = a7
252+
register unsigned long r7 asm("r7") = __a7
243253

244254
#define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
245255
#define __declare_args(count, ...) ___declare_args(count, __VA_ARGS__)

0 commit comments

Comments
 (0)