Commit 1020bcbc authored by Hidetoshi Seto's avatar Hidetoshi Seto Committed by H. Peter Anvin

x86, mce: rename static variables around trigger

"trigger" is not straight forward name for valiable that holds name
of user mode helper program which triggered by machine check events.

This patch renames this valiable and kins to more recognizable names.

	trigger		=> mce_helper
	trigger_argv	=> mce_helper_argv
	notify_user	=> mce_need_notify

No functional changes.
Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 4e5b3e69
...@@ -88,9 +88,10 @@ int mce_cmci_disabled __read_mostly; ...@@ -88,9 +88,10 @@ int mce_cmci_disabled __read_mostly;
int mce_ignore_ce __read_mostly; int mce_ignore_ce __read_mostly;
int mce_ser __read_mostly; int mce_ser __read_mostly;
static unsigned long notify_user; /* User mode helper program triggered by machine check event */
static char trigger[128]; static unsigned long mce_need_notify;
static char *trigger_argv[2] = { trigger, NULL }; static char mce_helper[128];
static char *mce_helper_argv[2] = { mce_helper, NULL };
static unsigned long dont_init_banks; static unsigned long dont_init_banks;
...@@ -180,7 +181,7 @@ void mce_log(struct mce *mce) ...@@ -180,7 +181,7 @@ void mce_log(struct mce *mce)
wmb(); wmb();
mce->finished = 1; mce->finished = 1;
set_bit(0, &notify_user); set_bit(0, &mce_need_notify);
} }
static void print_mce(struct mce *m) static void print_mce(struct mce *m)
...@@ -1122,7 +1123,7 @@ static void mcheck_timer(unsigned long data) ...@@ -1122,7 +1123,7 @@ static void mcheck_timer(unsigned long data)
static void mce_do_trigger(struct work_struct *work) static void mce_do_trigger(struct work_struct *work)
{ {
call_usermodehelper(trigger, trigger_argv, NULL, UMH_NO_WAIT); call_usermodehelper(mce_helper, mce_helper_argv, NULL, UMH_NO_WAIT);
} }
static DECLARE_WORK(mce_trigger_work, mce_do_trigger); static DECLARE_WORK(mce_trigger_work, mce_do_trigger);
...@@ -1139,7 +1140,7 @@ int mce_notify_irq(void) ...@@ -1139,7 +1140,7 @@ int mce_notify_irq(void)
clear_thread_flag(TIF_MCE_NOTIFY); clear_thread_flag(TIF_MCE_NOTIFY);
if (test_and_clear_bit(0, &notify_user)) { if (test_and_clear_bit(0, &mce_need_notify)) {
wake_up_interruptible(&mce_wait); wake_up_interruptible(&mce_wait);
/* /*
...@@ -1147,7 +1148,7 @@ int mce_notify_irq(void) ...@@ -1147,7 +1148,7 @@ int mce_notify_irq(void)
* work_pending is always cleared before the function is * work_pending is always cleared before the function is
* executed. * executed.
*/ */
if (trigger[0] && !work_pending(&mce_trigger_work)) if (mce_helper[0] && !work_pending(&mce_trigger_work))
schedule_work(&mce_trigger_work); schedule_work(&mce_trigger_work);
if (__ratelimit(&ratelimit)) if (__ratelimit(&ratelimit))
...@@ -1664,9 +1665,9 @@ static ssize_t set_bank(struct sys_device *s, struct sysdev_attribute *attr, ...@@ -1664,9 +1665,9 @@ static ssize_t set_bank(struct sys_device *s, struct sysdev_attribute *attr,
static ssize_t static ssize_t
show_trigger(struct sys_device *s, struct sysdev_attribute *attr, char *buf) show_trigger(struct sys_device *s, struct sysdev_attribute *attr, char *buf)
{ {
strcpy(buf, trigger); strcpy(buf, mce_helper);
strcat(buf, "\n"); strcat(buf, "\n");
return strlen(trigger) + 1; return strlen(mce_helper) + 1;
} }
static ssize_t set_trigger(struct sys_device *s, struct sysdev_attribute *attr, static ssize_t set_trigger(struct sys_device *s, struct sysdev_attribute *attr,
...@@ -1675,10 +1676,10 @@ static ssize_t set_trigger(struct sys_device *s, struct sysdev_attribute *attr, ...@@ -1675,10 +1676,10 @@ static ssize_t set_trigger(struct sys_device *s, struct sysdev_attribute *attr,
char *p; char *p;
int len; int len;
strncpy(trigger, buf, sizeof(trigger)); strncpy(mce_helper, buf, sizeof(mce_helper));
trigger[sizeof(trigger)-1] = 0; mce_helper[sizeof(mce_helper)-1] = 0;
len = strlen(trigger); len = strlen(mce_helper);
p = strchr(trigger, '\n'); p = strchr(mce_helper, '\n');
if (*p) if (*p)
*p = 0; *p = 0;
......
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