Commit a4049322 authored by Andrew Jones's avatar Andrew Jones Committed by Marcelo Tosatti
Browse files

arm/arm64: processor.[ch] cleanups



Add 'const' to a few global arrays that are constant. Also,
no need for default_vector_handler to be static. unittests
may want to reset vector handlers to it.
Signed-off-by: Andrew Jones's avatarAndrew Jones <drjones@redhat.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent d140ad48
......@@ -20,7 +20,7 @@ static const char *processor_modes[] = {
"UK12_32", "UK13_32", "UK14_32", "SYS_32"
};
static char *vector_names[] = {
static const char *vector_names[] = {
"rst", "und", "svc", "pabt", "dabt", "addrexcptn", "irq", "fiq"
};
......
......@@ -47,6 +47,8 @@ typedef void (*exception_fn)(struct pt_regs *regs, unsigned int esr);
extern void install_vector_handler(enum vector v, vector_fn fn);
extern void install_exception_handler(enum vector v, unsigned int ec,
exception_fn fn);
extern void default_vector_handler(enum vector v, struct pt_regs *regs,
unsigned int esr);
extern void show_regs(struct pt_regs *regs);
extern void *get_sp(void);
......
......@@ -10,7 +10,7 @@
#include <asm/processor.h>
#include <asm/esr.h>
static char *vector_names[] = {
static const char *vector_names[] = {
"el1t_sync",
"el1t_irq",
"el1t_fiq",
......@@ -29,7 +29,7 @@ static char *vector_names[] = {
"el0_error_32",
};
static char *ec_names[EC_MAX] = {
static const char *ec_names[EC_MAX] = {
[ESR_EL1_EC_UNKNOWN] = "UNKNOWN",
[ESR_EL1_EC_WFI] = "WFI",
[ESR_EL1_EC_CP15_32] = "CP15_32",
......@@ -142,8 +142,8 @@ void install_exception_handler(enum vector v, unsigned int ec, exception_fn fn)
exception_handlers[v][ec] = fn;
}
static void default_vector_handler(enum vector v, struct pt_regs *regs,
unsigned int esr)
void default_vector_handler(enum vector v, struct pt_regs *regs,
unsigned int esr)
{
unsigned int ec = esr >> ESR_EL1_EC_SHIFT;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment