Commit b08e281b authored by Mark Nelson's avatar Mark Nelson Committed by Benjamin Herrenschmidt

powerpc/pseries: Rename RAS_VECTOR_OFFSET to RTAS_VECTOR_EXTERNAL_INTERRUPT and move to rtas.h

The RAS code has a #define, RAS_VECTOR_OFFSET, that's used in the
check-exception RTAS call for the vector offset of the exception.

We'll be using this same vector offset for the upcoming IO Event interrupts
code (0x500) so let's move it to include/asm/rtas.h and call it
RTAS_VECTOR_EXTERNAL_INTERRUPT.
Signed-off-by: default avatarMark Nelson <markn@au1.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent ae01f84b
...@@ -145,6 +145,9 @@ struct rtas_suspend_me_data { ...@@ -145,6 +145,9 @@ struct rtas_suspend_me_data {
#define RTAS_TYPE_PMGM_CONFIG_CHANGE 0x70 #define RTAS_TYPE_PMGM_CONFIG_CHANGE 0x70
#define RTAS_TYPE_PMGM_SERVICE_PROC 0x71 #define RTAS_TYPE_PMGM_SERVICE_PROC 0x71
/* RTAS check-exception vector offset */
#define RTAS_VECTOR_EXTERNAL_INTERRUPT 0x500
struct rtas_error_log { struct rtas_error_log {
unsigned long version:8; /* Architectural version */ unsigned long version:8; /* Architectural version */
unsigned long severity:3; /* Severity level of error */ unsigned long severity:3; /* Severity level of error */
......
...@@ -61,7 +61,6 @@ static int ras_check_exception_token; ...@@ -61,7 +61,6 @@ static int ras_check_exception_token;
#define EPOW_SENSOR_TOKEN 9 #define EPOW_SENSOR_TOKEN 9
#define EPOW_SENSOR_INDEX 0 #define EPOW_SENSOR_INDEX 0
#define RAS_VECTOR_OFFSET 0x500
static irqreturn_t ras_epow_interrupt(int irq, void *dev_id); static irqreturn_t ras_epow_interrupt(int irq, void *dev_id);
static irqreturn_t ras_error_interrupt(int irq, void *dev_id); static irqreturn_t ras_error_interrupt(int irq, void *dev_id);
...@@ -121,7 +120,7 @@ static irqreturn_t ras_epow_interrupt(int irq, void *dev_id) ...@@ -121,7 +120,7 @@ static irqreturn_t ras_epow_interrupt(int irq, void *dev_id)
spin_lock(&ras_log_buf_lock); spin_lock(&ras_log_buf_lock);
status = rtas_call(ras_check_exception_token, 6, 1, NULL, status = rtas_call(ras_check_exception_token, 6, 1, NULL,
RAS_VECTOR_OFFSET, RTAS_VECTOR_EXTERNAL_INTERRUPT,
irq_map[irq].hwirq, irq_map[irq].hwirq,
RTAS_EPOW_WARNING | RTAS_POWERMGM_EVENTS, RTAS_EPOW_WARNING | RTAS_POWERMGM_EVENTS,
critical, __pa(&ras_log_buf), critical, __pa(&ras_log_buf),
...@@ -156,7 +155,7 @@ static irqreturn_t ras_error_interrupt(int irq, void *dev_id) ...@@ -156,7 +155,7 @@ static irqreturn_t ras_error_interrupt(int irq, void *dev_id)
spin_lock(&ras_log_buf_lock); spin_lock(&ras_log_buf_lock);
status = rtas_call(ras_check_exception_token, 6, 1, NULL, status = rtas_call(ras_check_exception_token, 6, 1, NULL,
RAS_VECTOR_OFFSET, RTAS_VECTOR_EXTERNAL_INTERRUPT,
irq_map[irq].hwirq, irq_map[irq].hwirq,
RTAS_INTERNAL_ERROR, 1 /*Time Critical */, RTAS_INTERNAL_ERROR, 1 /*Time Critical */,
__pa(&ras_log_buf), __pa(&ras_log_buf),
......
Markdown is supported
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