Commit 587f83e8 authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt

powerpc/pseries: Use rtas_get_sensor in RAS code

We have rtas_get_sensor so we may as well use it.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 55fc0c56
...@@ -59,7 +59,6 @@ static DEFINE_SPINLOCK(ras_log_buf_lock); ...@@ -59,7 +59,6 @@ static DEFINE_SPINLOCK(ras_log_buf_lock);
static char global_mce_data_buf[RTAS_ERROR_LOG_MAX]; static char global_mce_data_buf[RTAS_ERROR_LOG_MAX];
static DEFINE_PER_CPU(__u64, mce_data_buf); static DEFINE_PER_CPU(__u64, mce_data_buf);
static int ras_get_sensor_state_token;
static int ras_check_exception_token; static int ras_check_exception_token;
#define EPOW_SENSOR_TOKEN 9 #define EPOW_SENSOR_TOKEN 9
...@@ -77,7 +76,6 @@ static int __init init_ras_IRQ(void) ...@@ -77,7 +76,6 @@ static int __init init_ras_IRQ(void)
{ {
struct device_node *np; struct device_node *np;
ras_get_sensor_state_token = rtas_token("get-sensor-state");
ras_check_exception_token = rtas_token("check-exception"); ras_check_exception_token = rtas_token("check-exception");
/* Internal Errors */ /* Internal Errors */
...@@ -213,8 +211,7 @@ static irqreturn_t ras_epow_interrupt(int irq, void *dev_id) ...@@ -213,8 +211,7 @@ static irqreturn_t ras_epow_interrupt(int irq, void *dev_id)
int state; int state;
int critical; int critical;
status = rtas_call(ras_get_sensor_state_token, 2, 2, &state, status = rtas_get_sensor(EPOW_SENSOR_TOKEN, EPOW_SENSOR_INDEX, &state);
EPOW_SENSOR_TOKEN, EPOW_SENSOR_INDEX);
if (state > 3) if (state > 3)
critical = 1; /* Time Critical */ critical = 1; /* Time Critical */
......
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