2019-06-03 07:44:50 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2012-03-05 11:49:34 +00:00
|
|
|
/*
|
|
|
|
* Based on arch/arm/include/asm/system_misc.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2012 ARM Ltd.
|
|
|
|
*/
|
|
|
|
#ifndef __ASM_SYSTEM_MISC_H
|
|
|
|
#define __ASM_SYSTEM_MISC_H
|
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
|
|
|
#include <linux/compiler.h>
|
|
|
|
#include <linux/linkage.h>
|
|
|
|
#include <linux/irqflags.h>
|
2015-06-19 15:28:03 +01:00
|
|
|
#include <linux/signal.h>
|
|
|
|
#include <linux/ratelimit.h>
|
2013-07-11 12:13:00 +01:00
|
|
|
#include <linux/reboot.h>
|
2012-03-05 11:49:34 +00:00
|
|
|
|
|
|
|
struct pt_regs;
|
|
|
|
|
2022-09-13 11:17:29 +01:00
|
|
|
void die(const char *msg, struct pt_regs *regs, long err);
|
2012-03-05 11:49:34 +00:00
|
|
|
|
|
|
|
struct siginfo;
|
|
|
|
void arm64_notify_die(const char *str, struct pt_regs *regs,
|
2020-11-20 12:33:46 -08:00
|
|
|
int signo, int sicode, unsigned long far,
|
arm64: Treat ESR_ELx as a 64-bit register
In the initial release of the ARM Architecture Reference Manual for
ARMv8-A, the ESR_ELx registers were defined as 32-bit registers. This
changed in 2018 with version D.a (ARM DDI 0487D.a) of the architecture,
when they became 64-bit registers, with bits [63:32] defined as RES0. In
version G.a, a new field was added to ESR_ELx, ISS2, which covers bits
[36:32]. This field is used when the Armv8.7 extension FEAT_LS64 is
implemented.
As a result of the evolution of the register width, Linux stores it as
both a 64-bit value and a 32-bit value, which hasn't affected correctness
so far as Linux only uses the lower 32 bits of the register.
Make the register type consistent and always treat it as 64-bit wide. The
register is redefined as an "unsigned long", which is an unsigned
double-word (64-bit quantity) for the LP64 machine (aapcs64 [1], Table 1,
page 14). The type was chosen because "unsigned int" is the most frequent
type for ESR_ELx and because FAR_ELx, which is used together with ESR_ELx
in exception handling, is also declared as "unsigned long". The 64-bit type
also makes adding support for architectural features that use fields above
bit 31 easier in the future.
The KVM hypervisor will receive a similar update in a subsequent patch.
[1] https://github.com/ARM-software/abi-aa/releases/download/2021Q3/aapcs64.pdf
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220425114444.368693-4-alexandru.elisei@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2022-04-25 12:44:42 +01:00
|
|
|
unsigned long err);
|
2012-03-05 11:49:34 +00:00
|
|
|
|
|
|
|
struct mm_struct;
|
|
|
|
extern void __show_regs(struct pt_regs *);
|
|
|
|
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
|
|
|
|
#endif /* __ASM_SYSTEM_MISC_H */
|