public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Dou Liyang <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, hpa@zytor.com, tglx@linutronix.de,
	linux-kernel@vger.kernel.org, douly.fnst@cn.fujitsu.com
Subject: [tip:x86/urgent] x86/apic: Avoid wrong warning when parsing 'apic=' in X86-32 case
Date: Thu, 28 Dec 2017 03:36:44 -0800	[thread overview]
Message-ID: <tip-4fcab6693445cfb84f2b65868c58043535090e52@git.kernel.org> (raw)
In-Reply-To: <20171204040313.24824-1-douly.fnst@cn.fujitsu.com>

Commit-ID:  4fcab6693445cfb84f2b65868c58043535090e52
Gitweb:     https://git.kernel.org/tip/4fcab6693445cfb84f2b65868c58043535090e52
Author:     Dou Liyang <douly.fnst@cn.fujitsu.com>
AuthorDate: Mon, 4 Dec 2017 12:03:12 +0800
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 28 Dec 2017 12:32:06 +0100

x86/apic: Avoid wrong warning when parsing 'apic=' in X86-32 case

There are two consumers of apic=:
  apic_set_verbosity() for setting the APIC debug level;
  parse_apic() for registering APIC driver by hand.

X86-32 supports both of them, but sometimes, kernel issues a weird warning.
eg: when kernel was booted up with 'apic=bigsmp' in command line,
early_param would warn like that:

...
[    0.000000] APIC Verbosity level bigsmp not recognised use apic=verbose or apic=debug
[    0.000000] Malformed early option 'apic'
...

Wrap the warning code in CONFIG_X86_64 case to avoid this.

Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: peterz@infradead.org
Cc: rdunlap@infradead.org
Cc: corbet@lwn.net
Link: https://lkml.kernel.org/r/20171204040313.24824-1-douly.fnst@cn.fujitsu.com

---
 arch/x86/kernel/apic/apic.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 6e272f3..880441f 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -2626,11 +2626,13 @@ static int __init apic_set_verbosity(char *arg)
 		apic_verbosity = APIC_DEBUG;
 	else if (strcmp("verbose", arg) == 0)
 		apic_verbosity = APIC_VERBOSE;
+#ifdef CONFIG_X86_64
 	else {
 		pr_warning("APIC Verbosity level %s not recognised"
 			" use apic=verbose or apic=debug\n", arg);
 		return -EINVAL;
 	}
+#endif
 
 	return 0;
 }

      parent reply	other threads:[~2017-12-28 11:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04  4:03 [PATCH v2 1/2] x86/apic: Avoid wrong warning when parsing 'apic=' in X86-32 case Dou Liyang
2017-12-04  4:03 ` [PATCH v2 2/2] x86/apic: Update the 'apic=' description of setting APIC driver Dou Liyang
2017-12-28 11:37   ` [tip:x86/urgent] " tip-bot for Dou Liyang
2017-12-28 11:36 ` tip-bot for Dou Liyang [this message]

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=tip-4fcab6693445cfb84f2b65868c58043535090e52@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=douly.fnst@cn.fujitsu.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox