[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1566874943-4449-2-git-send-email-kernelfans@gmail.com>
Date: Tue, 27 Aug 2019 11:02:20 +0800
From: Pingfan Liu <kernelfans@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>,
Andy Lutomirski <luto@...nel.org>, x86@...nel.org
Cc: Pingfan Liu <kernelfans@...il.com>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
Masami Hiramatsu <mhiramat@...nel.org>, Qian Cai <cai@....pw>,
Vlastimil Babka <vbabka@...e.cz>,
Daniel Drake <drake@...lessm.com>,
Jacob Pan <jacob.jun.pan@...ux.intel.com>,
Michal Hocko <mhocko@...e.com>,
Eric Biederman <ebiederm@...ssion.com>,
linux-kernel@...r.kernel.org, Dave Young <dyoung@...hat.com>,
Baoquan He <bhe@...hat.com>, kexec@...ts.infradead.org
Subject: [PATCHv2 1/4] x86/apic: correct the ENO in generic_processor_info()
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@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>
To: Andy Lutomirski <luto@...nel.org>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: Peter Zijlstra <peterz@...radead.org>
To: x86@...nel.org
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Qian Cai <cai@....pw>
Cc: Vlastimil Babka <vbabka@...e.cz>
Cc: Daniel Drake <drake@...lessm.com>
Cc: Jacob Pan <jacob.jun.pan@...ux.intel.com>
Cc: Michal Hocko <mhocko@...e.com>
Cc: Eric Biederman <ebiederm@...ssion.com>
Cc: linux-kernel@...r.kernel.org
Cc: Dave Young <dyoung@...hat.com>
Cc: Baoquan He <bhe@...hat.com>
Cc: kexec@...ts.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
Powered by blists - more mailing lists