From: Borislav Petkov <bp@amd64.org>
To: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"x86@kernel.org" <x86@kernel.org>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
"Luck, Tony" <tony.luck@intel.com>
Subject: Re: [PATCH 4/8] x86, mce: rename bootparam parser
Date: Fri, 17 Jun 2011 17:41:43 +0200 [thread overview]
Message-ID: <20110617154143.GC20010@aftab> (raw)
In-Reply-To: <4DFB13E2.4080909@jp.fujitsu.com>
On Fri, Jun 17, 2011 at 04:44:18AM -0400, Hidetoshi Seto wrote:
> Rename them with comprehensible prefix mcheck_setup.
The relocation is causing unneeded churn for no apparent reason.
> (at least it looks better than current misleading name)
> And relocate to put together setup codes.
>
> Before: After:
> mcheck_enable mcheck_setup
Nah, let's call it mcheck_parse_boot_param...
> mcheck_disable mcheck_setup_old
and leave this like this. "nomce" is the same as "mce=off" and frankly,
I'd like to remove this redundancy, thus no need to do the code
relocation. In addition, I don't think there are lots of systems running
with "nomce" so I really think we should drop it.
So Ingo, hpa, what is the proper way to remove early setup params? Maybe
through Documentation/feature-removal-schedule.txt?
>
> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
> ---
> arch/x86/kernel/cpu/mcheck/mce.c | 91 +++++++++++++++++++-------------------
> 1 files changed, 45 insertions(+), 46 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
> index c3dad64..ad0e9fb 100644
> --- a/arch/x86/kernel/cpu/mcheck/mce.c
> +++ b/arch/x86/kernel/cpu/mcheck/mce.c
> @@ -1662,50 +1662,6 @@ static struct miscdevice mce_chrdev_device = {
> &mce_chrdev_ops,
> };
>
> -/*
> - * mce=off Disables machine check
> - * mce=no_cmci Disables CMCI
> - * mce=dont_log_ce Clears corrected events silently, no log created for CEs.
> - * mce=ignore_ce Disables polling and CMCI, corrected events are not cleared.
> - * mce=TOLERANCELEVEL[,monarchtimeout] (number, see above)
> - * monarchtimeout is how long to wait for other CPUs on machine
> - * check, or 0 to not wait
> - * mce=bootlog Log MCEs from before booting. Disabled by default on AMD.
Please remove "Disabled by default on AMD." while you're at it, since
this is not true anymore.
> - * mce=nobootlog Don't log MCEs from before booting.
> - */
> -static int __init mcheck_enable(char *str)
> -{
> - if (*str == 0) {
> - enable_p5_mce();
> - return 1;
> - }
> - if (*str == '=')
> - str++;
> - if (!strcmp(str, "off"))
> - mce_disabled = 1;
> - else if (!strcmp(str, "no_cmci"))
> - mce_cmci_disabled = 1;
> - else if (!strcmp(str, "dont_log_ce"))
> - mce_dont_log_ce = 1;
> - else if (!strcmp(str, "ignore_ce"))
> - mce_ignore_ce = 1;
> - else if (!strcmp(str, "bootlog") || !strcmp(str, "nobootlog"))
> - mce_bootlog = (str[0] == 'b');
> - else if (isdigit(str[0])) {
> - get_option(&str, &tolerant);
> - if (*str == ',') {
> - ++str;
> - get_option(&str, &monarch_timeout);
> - }
> - } else {
> - printk(KERN_INFO "mce argument %s ignored. Please use /sys\n",
> - str);
> - return 0;
> - }
> - return 1;
> -}
> -__setup("mce", mcheck_enable);
> -
> int __init mcheck_init(void)
> {
> mcheck_intel_therm_init();
> @@ -2120,14 +2076,57 @@ static __init int mcheck_init_device(void)
> device_initcall(mcheck_init_device);
>
> /*
> + * mce=off Disables machine check
> + * mce=no_cmci Disables CMCI
> + * mce=dont_log_ce Clears corrected events silently, no log created for CEs.
> + * mce=ignore_ce Disables polling and CMCI, corrected events are not cleared.
> + * mce=TOLERANCELEVEL[,monarchtimeout] (number, see above)
> + * monarchtimeout is how long to wait for other CPUs on machine
> + * check, or 0 to not wait
> + * mce=bootlog Log MCEs from before booting. Disabled by default on AMD.
> + * mce=nobootlog Don't log MCEs from before booting.
> + */
> +static int __init mcheck_setup(char *str)
> +{
> + if (*str == 0) {
> + enable_p5_mce();
> + return 1;
> + }
> + if (*str == '=')
> + str++;
> + if (!strcmp(str, "off"))
> + mce_disabled = 1;
> + else if (!strcmp(str, "no_cmci"))
> + mce_cmci_disabled = 1;
> + else if (!strcmp(str, "dont_log_ce"))
> + mce_dont_log_ce = 1;
> + else if (!strcmp(str, "ignore_ce"))
> + mce_ignore_ce = 1;
> + else if (!strcmp(str, "bootlog") || !strcmp(str, "nobootlog"))
> + mce_bootlog = (str[0] == 'b');
> + else if (isdigit(str[0])) {
> + get_option(&str, &tolerant);
> + if (*str == ',') {
> + ++str;
> + get_option(&str, &monarch_timeout);
> + }
> + } else {
> + pr_info("mce argument %s ignored. Please use /sys\n", str);
> + return 0;
> + }
> + return 1;
> +}
> +__setup("mce", mcheck_setup);
> +
> +/*
> * Old style boot options parsing. Only for compatibility.
> */
> -static int __init mcheck_disable(char *str)
> +static int __init mcheck_setup_old(char *str)
> {
> mce_disabled = 1;
> return 1;
> }
> -__setup("nomce", mcheck_disable);
> +__setup("nomce", mcheck_setup_old);
>
> #ifdef CONFIG_DEBUG_FS
> struct dentry *mce_get_debugfs_dir(void)
> --
> 1.7.1
>
>
>
--
Regards/Gruss,
Boris.
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
next prev parent reply other threads:[~2011-06-17 15:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-17 8:37 [PATCH 0/8] x86, mce: misc fix/cleanups, cont Hidetoshi Seto
2011-06-17 8:40 ` [PATCH 1/8] x86, mce: stop calling del_timer_sync() from interrupt Hidetoshi Seto
2011-06-17 13:56 ` Borislav Petkov
2011-06-20 4:46 ` Hidetoshi Seto
2011-06-20 7:36 ` Borislav Petkov
2011-08-26 10:50 ` Borislav Petkov
2011-06-17 8:42 ` [PATCH 2/8] x86, mce: remove redundant mce_available() checks Hidetoshi Seto
2011-06-17 14:39 ` Borislav Petkov
2011-06-20 4:47 ` Hidetoshi Seto
2011-06-20 7:44 ` Borislav Petkov
2011-06-17 8:43 ` [PATCH 3/8] x86, mce: introduce mce_timer_add() Hidetoshi Seto
2011-06-17 15:11 ` Borislav Petkov
2011-06-17 8:44 ` [PATCH 4/8] x86, mce: rename bootparam parser Hidetoshi Seto
2011-06-17 15:41 ` Borislav Petkov [this message]
2011-06-17 22:25 ` Luck, Tony
2011-06-18 8:38 ` Borislav Petkov
2011-06-20 4:48 ` Hidetoshi Seto
2011-06-17 8:45 ` [PATCH 5/8] x86, mce: introduce mce_sysdev_init() Hidetoshi Seto
2011-06-17 16:32 ` Borislav Petkov
2011-06-20 4:48 ` Hidetoshi Seto
2011-06-17 8:46 ` [PATCH 6/8] x86, mce: introduce mce_memory_failure_process() Hidetoshi Seto
2011-06-17 16:59 ` Borislav Petkov
2011-06-17 8:49 ` [PATCH 7/8] x86, mce: rework use of TIF_MCE_NOTIFY Hidetoshi Seto
2011-06-17 8:50 ` [PATCH 8/8] x86, mce, edac: call edac_mce_parse() once per a record Hidetoshi Seto
2011-06-17 17:10 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110617154143.GC20010@aftab \
--to=bp@amd64.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.