Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Mark Nelson <markn@au1.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Mark Nelson and committed by
Benjamin Herrenschmidt
b08e281b ae01f84b

+5 -3
+3
arch/powerpc/include/asm/rtas.h
··· 145 145 #define RTAS_TYPE_PMGM_CONFIG_CHANGE 0x70 146 146 #define RTAS_TYPE_PMGM_SERVICE_PROC 0x71 147 147 148 + /* RTAS check-exception vector offset */ 149 + #define RTAS_VECTOR_EXTERNAL_INTERRUPT 0x500 150 + 148 151 struct rtas_error_log { 149 152 unsigned long version:8; /* Architectural version */ 150 153 unsigned long severity:3; /* Severity level of error */
+2 -3
arch/powerpc/platforms/pseries/ras.c
··· 61 61 62 62 #define EPOW_SENSOR_TOKEN 9 63 63 #define EPOW_SENSOR_INDEX 0 64 - #define RAS_VECTOR_OFFSET 0x500 65 64 66 65 static irqreturn_t ras_epow_interrupt(int irq, void *dev_id); 67 66 static irqreturn_t ras_error_interrupt(int irq, void *dev_id); ··· 120 121 spin_lock(&ras_log_buf_lock); 121 122 122 123 status = rtas_call(ras_check_exception_token, 6, 1, NULL, 123 - RAS_VECTOR_OFFSET, 124 + RTAS_VECTOR_EXTERNAL_INTERRUPT, 124 125 irq_map[irq].hwirq, 125 126 RTAS_EPOW_WARNING | RTAS_POWERMGM_EVENTS, 126 127 critical, __pa(&ras_log_buf), ··· 155 156 spin_lock(&ras_log_buf_lock); 156 157 157 158 status = rtas_call(ras_check_exception_token, 6, 1, NULL, 158 - RAS_VECTOR_OFFSET, 159 + RTAS_VECTOR_EXTERNAL_INTERRUPT, 159 160 irq_map[irq].hwirq, 160 161 RTAS_INTERNAL_ERROR, 1 /*Time Critical */, 161 162 __pa(&ras_log_buf),