From: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: hpa@linux.intel.com, ebiederm@xmission.com,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
bp@alien8.de, akpm@linux-foundation.org, fengguang.wu@intel.com,
jingbai.ma@hp.com
Subject: Re: [PATCH v6 2/3] x86, apic: Add disable_cpu_apicid kernel parameter
Date: Fri, 22 Nov 2013 09:42:28 +0900 [thread overview]
Message-ID: <528EA874.9010609@jp.fujitsu.com> (raw)
In-Reply-To: <20131121213300.GR16208@redhat.com>
(2013/11/22 6:33), Vivek Goyal wrote:
> On Thu, Nov 21, 2013 at 11:00:44AM +0900, HATAYAMA Daisuke wrote:
>
> [..]
>> @@ -2122,6 +2129,19 @@ void generic_processor_info(int apicid, int version)
>> bool boot_cpu_detected = physid_isset(boot_cpu_physical_apicid,
>> phys_cpu_present_map);
>>
>> + if (disabled_cpu_apicid != BAD_APICID &&
>> + disabled_cpu_apicid != boot_cpu_physical_apicid &&
>
> Hi Hatayama,
>
> So we are comparing disabled_cpu_apicid with boot_cpu_physical_apicid
> to make sure that one can not disable the cpu we are booting on. Can
> we just read the apic id of booting cpu in local variable and compare
> against that?
>
> Something like as follows.
>
> if (disabled_cpu_apicid != BAD_APICID &&
> disabled_cpu_apicid == apicid &&
> disabled_cpu_apicid != read_apic_id()) {
> /* Disable cpu */
> }
>
> If above works, you will not need first patch in the series?
>
Yes, I came up with the idea, too. But doing this means we leave two different
ways boot_cpu_physical_apicid is used at boot, which seemed incomplete as a
patch. Also, then we could even lost the reason why boot_cpu_physical_apicid
exists.
But, it's true that the 1st patch causes one more reviewing point. I'll
remove it and fix the 2nd patch just as you suggested here.
--
Thanks.
HATAYAMA, Daisuke
next prev parent reply other threads:[~2013-11-22 0:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 2:00 [PATCH v6 0/3] x86, apic, kexec: Add disable_cpu_apic kernel parameter HATAYAMA Daisuke
2013-11-21 2:00 ` [PATCH v6 1/3] x86, apic: add bios_bsp_physical_apicid HATAYAMA Daisuke
2013-11-21 2:00 ` [PATCH v6 2/3] x86, apic: Add disable_cpu_apicid kernel parameter HATAYAMA Daisuke
2013-11-21 21:33 ` Vivek Goyal
2013-11-22 0:42 ` HATAYAMA Daisuke [this message]
2013-11-22 1:59 ` Vivek Goyal
2013-11-21 2:00 ` [PATCH v6 3/3] Documentation, x86, apic, kexec: " HATAYAMA Daisuke
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=528EA874.9010609@jp.fujitsu.com \
--to=d.hatayama@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=ebiederm@xmission.com \
--cc=fengguang.wu@intel.com \
--cc=hpa@linux.intel.com \
--cc=jingbai.ma@hp.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@redhat.com \
/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