From: Pingfan Liu <kernelfans@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Andy Lutomirski <luto@kernel.org>,
x86@kernel.org
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>,
Baoquan He <bhe@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
kexec@lists.infradead.org,
Dave Hansen <dave.hansen@linux.intel.com>,
Michal Hocko <mhocko@suse.com>,
linux-kernel@vger.kernel.org, Pingfan Liu <kernelfans@gmail.com>,
Daniel Drake <drake@endlessm.com>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Masami Hiramatsu <mhiramat@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>, Qian Cai <cai@lca.pw>,
Dave Young <dyoung@redhat.com>, Vlastimil Babka <vbabka@suse.cz>,
Eric Biederman <ebiederm@xmission.com>
Subject: [PATCH 1/4] x86/apic: correct the ENO in generic_processor_info()
Date: Mon, 5 Aug 2019 16:58:56 +0800 [thread overview]
Message-ID: <1564995539-29609-2-git-send-email-kernelfans@gmail.com> (raw)
In-Reply-To: <1564995539-29609-1-git-send-email-kernelfans@gmail.com>
When capped by nr_cpu_ids, the current code return -EINVAL or -ENODEV. It
is better to return -EINVAL for both cases.
Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
To: Andy Lutomirski <luto@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
To: x86@kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Qian Cai <cai@lca.pw>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Daniel Drake <drake@endlessm.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: linux-kernel@vger.kernel.org
Cc: Dave Young <dyoung@redhat.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: kexec@lists.infradead.org
---
arch/x86/kernel/apic/apic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index f529136..f4f603a 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -2346,7 +2346,7 @@ int generic_processor_info(int apicid, int version)
" Processor %d/0x%x ignored.\n", max, thiscpu, apicid);
disabled_cpus++;
- return -ENODEV;
+ return -EINVAL;
}
if (num_processors >= nr_cpu_ids) {
--
2.7.5
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: Pingfan Liu <kernelfans@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Andy Lutomirski <luto@kernel.org>,
x86@kernel.org
Cc: Pingfan Liu <kernelfans@gmail.com>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Masami Hiramatsu <mhiramat@kernel.org>, Qian Cai <cai@lca.pw>,
Vlastimil Babka <vbabka@suse.cz>,
Daniel Drake <drake@endlessm.com>,
Jacob Pan <jacob.jun.pan@linux.intel.com>,
Michal Hocko <mhocko@suse.com>,
Eric Biederman <ebiederm@xmission.com>,
linux-kernel@vger.kernel.org, Dave Young <dyoung@redhat.com>,
Baoquan He <bhe@redhat.com>,
kexec@lists.infradead.org
Subject: [PATCH 1/4] x86/apic: correct the ENO in generic_processor_info()
Date: Mon, 5 Aug 2019 16:58:56 +0800 [thread overview]
Message-ID: <1564995539-29609-2-git-send-email-kernelfans@gmail.com> (raw)
In-Reply-To: <1564995539-29609-1-git-send-email-kernelfans@gmail.com>
When capped by nr_cpu_ids, the current code return -EINVAL or -ENODEV. It
is better to return -EINVAL for both cases.
Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
To: Andy Lutomirski <luto@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
To: x86@kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Qian Cai <cai@lca.pw>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Daniel Drake <drake@endlessm.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: linux-kernel@vger.kernel.org
Cc: Dave Young <dyoung@redhat.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: kexec@lists.infradead.org
---
arch/x86/kernel/apic/apic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index f529136..f4f603a 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -2346,7 +2346,7 @@ int generic_processor_info(int apicid, int version)
" Processor %d/0x%x ignored.\n", max, thiscpu, apicid);
disabled_cpus++;
- return -ENODEV;
+ return -EINVAL;
}
if (num_processors >= nr_cpu_ids) {
--
2.7.5
next prev parent reply other threads:[~2019-08-05 8:59 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-05 8:58 [PATCH 0/4] x86/mce: protect nr_cpus from rebooting by broadcast mce Pingfan Liu
2019-08-05 8:58 ` Pingfan Liu
2019-08-05 8:58 ` Pingfan Liu [this message]
2019-08-05 8:58 ` [PATCH 1/4] x86/apic: correct the ENO in generic_processor_info() Pingfan Liu
2019-08-05 8:58 ` [PATCH 2/4] x86/apic: record capped cpu " Pingfan Liu
2019-08-05 8:58 ` Pingfan Liu
2019-08-08 0:17 ` kbuild test robot
2019-08-08 0:17 ` kbuild test robot
2019-08-08 0:17 ` [RFC PATCH] x86/apic: __cpu_capped_mask can be static kbuild test robot
2019-08-08 0:17 ` kbuild test robot
2019-08-05 8:58 ` [PATCH 3/4] x86/smp: send capped cpus to a stable state when smp_init() Pingfan Liu
2019-08-05 8:58 ` Pingfan Liu
2019-08-08 1:20 ` kbuild test robot
2019-08-08 1:20 ` kbuild test robot
2019-08-08 1:20 ` [RFC PATCH] x86/smp: __cpu_capped_done_mask can be static kbuild test robot
2019-08-08 1:20 ` kbuild test robot
2019-08-08 2:36 ` [PATCH 3/4] x86/smp: send capped cpus to a stable state when smp_init() kbuild test robot
2019-08-08 2:36 ` kbuild test robot
2019-08-08 5:18 ` kbuild test robot
2019-08-08 5:18 ` kbuild test robot
2019-08-05 8:58 ` [PATCH 4/4] x86/smp: disallow MCE handler on rebooting AP Pingfan Liu
2019-08-05 8:58 ` Pingfan Liu
2019-08-07 3:00 ` [PATCH 0/4] x86/mce: protect nr_cpus from rebooting by broadcast mce Dave Young
2019-08-07 3:00 ` Dave Young
2019-08-07 7:52 ` Pingfan Liu
2019-08-07 7:52 ` Pingfan Liu
2019-08-07 13:07 ` Thomas Gleixner
2019-08-07 13:07 ` Thomas Gleixner
2019-08-08 5:41 ` Pingfan Liu
2019-08-08 5:41 ` Pingfan Liu
2019-08-08 6:51 ` Thomas Gleixner
2019-08-08 6:51 ` Thomas Gleixner
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=1564995539-29609-2-git-send-email-kernelfans@gmail.com \
--to=kernelfans@gmail.com \
--cc=bhe@redhat.com \
--cc=bp@alien8.de \
--cc=cai@lca.pw \
--cc=dave.hansen@linux.intel.com \
--cc=drake@endlessm.com \
--cc=dyoung@redhat.com \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=jacob.jun.pan@linux.intel.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mhiramat@kernel.org \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vbabka@suse.cz \
--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.