From: Ingo Molnar <mingo@elte.hu>
To: Rakib Mullick <rakib.mullick@gmail.com>,
Cyrill Gorcunov <gorcunov@openvz.org>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] x86,apic: Checking kernel option before detect_init_APIC()
Date: Wed, 8 Apr 2009 16:50:41 +0200 [thread overview]
Message-ID: <20090408145041.GL12931@elte.hu> (raw)
In-Reply-To: <b9df5fa10903271825g62b95e62p6e7006f0594e2c4b@mail.gmail.com>
* Rakib Mullick <rakib.mullick@gmail.com> wrote:
> Impact: cleanup
>
> Before calling detect_init_APIC(), check whether apic is disabled
> from kernel option or not.
>
> Thanks.
>
> Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
>
> --- linus/arch/x86/kernel/apic.c 2009-03-26 06:26:31.000000000 +0600
> +++ rakib/arch/x86/kernel/apic.c 2009-03-26 20:47:50.116376200 +0600
> @@ -1429,10 +1429,6 @@ static int __init detect_init_APIC(void)
> {
> u32 h, l, features;
>
> - /* Disabled by kernel option? */
> - if (disable_apic)
> - return -1;
> -
> switch (boot_cpu_data.x86_vendor) {
> case X86_VENDOR_AMD:
> if ((boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model > 1) ||
> @@ -1543,8 +1539,9 @@ void __init init_apic_mappings(void)
> * If no local APIC can be found then set up a fake all
> * zeroes page to simulate the local APIC and another
> * one for the IO-APIC.
> + * Check apic is disabled from kernel option or not.
> */
> - if (!smp_found_config && detect_init_APIC()) {
> + if (!smp_found_config && (disable_apic || detect_init_APIC())) {
> apic_phys = (unsigned long) alloc_bootmem_pages(PAGE_SIZE);
> apic_phys = __pa(apic_phys);
> } else
Hm, are you sure this is a cleanup only? (i.e. no side-effects)
Also, even if it's a pure cleanup, wouldnt it be even cleaner to
propagate this check into detect_init_APIC() - and thus get rid of
the open-coded disable_apic check altogether?
Ingo
next prev parent reply other threads:[~2009-04-08 14:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-28 1:25 [PATCH] x86,apic: Checking kernel option before detect_init_APIC() Rakib Mullick
2009-04-08 14:50 ` Ingo Molnar [this message]
2009-04-09 5:08 ` Rakib Mullick
2009-04-09 20:00 ` Cyrill Gorcunov
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=20090408145041.GL12931@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=gorcunov@openvz.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rakib.mullick@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).