public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/acpi: Use proper macro for invalid node
@ 2016-12-12 19:29 Boris Ostrovsky
  2016-12-12 19:29 ` [PATCH] ACPI/NUMA: Do not map pxm to node when NUMA is turned off Boris Ostrovsky
  2016-12-15 11:52 ` [tip:x86/urgent] x86/acpi: Use proper macro for invalid node tip-bot for Boris Ostrovsky
  0 siblings, 2 replies; 4+ messages in thread
From: Boris Ostrovsky @ 2016-12-12 19:29 UTC (permalink / raw)
  To: rjw, len.brown, pavel, tglx, mingo, hpa
  Cc: linux-kernel, linux-acpi, x86, Boris Ostrovsky

Use NUMA_NO_NODE instead of -1.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 arch/x86/kernel/acpi/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 931ced8..db5bcd1 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -713,7 +713,7 @@ int acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
 	int nid;
 
 	nid = acpi_get_node(handle);
-	if (nid != -1) {
+	if (nid != NUMA_NO_NODE) {
 		set_apicid_to_node(physid, nid);
 		numa_set_node(cpu, nid);
 	}
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ACPI/NUMA: Do not map pxm to node when NUMA is turned off
  2016-12-12 19:29 [PATCH] x86/acpi: Use proper macro for invalid node Boris Ostrovsky
@ 2016-12-12 19:29 ` Boris Ostrovsky
  2016-12-13  0:11   ` kbuild test robot
  2016-12-15 11:52 ` [tip:x86/urgent] x86/acpi: Use proper macro for invalid node tip-bot for Boris Ostrovsky
  1 sibling, 1 reply; 4+ messages in thread
From: Boris Ostrovsky @ 2016-12-12 19:29 UTC (permalink / raw)
  To: rjw, len.brown, pavel, tglx, mingo, hpa
  Cc: linux-kernel, linux-acpi, x86, Boris Ostrovsky

Otherwise we may unexpectedly reference a non-zero node via, for example,
acpi_get_node() while other parts of the kernel assume that only node 0
(which is what NUMA_NO_NODE is supposed to be converted to) is
available.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 drivers/acpi/numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index ce3a7a1..edb0c79 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -70,7 +70,7 @@ int acpi_map_pxm_to_node(int pxm)
 {
 	int node;
 
-	if (pxm < 0 || pxm >= MAX_PXM_DOMAINS)
+	if (pxm < 0 || pxm >= MAX_PXM_DOMAINS || numa_off)
 		return NUMA_NO_NODE;
 
 	node = pxm_to_node_map[pxm];
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ACPI/NUMA: Do not map pxm to node when NUMA is turned off
  2016-12-12 19:29 ` [PATCH] ACPI/NUMA: Do not map pxm to node when NUMA is turned off Boris Ostrovsky
@ 2016-12-13  0:11   ` kbuild test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2016-12-13  0:11 UTC (permalink / raw)
  To: Boris Ostrovsky
  Cc: kbuild-all, rjw, len.brown, pavel, tglx, mingo, hpa, linux-kernel,
	linux-acpi, x86, Boris Ostrovsky

[-- Attachment #1: Type: text/plain, Size: 1173 bytes --]

Hi Boris,

[auto build test WARNING on pm/linux-next]
[also build test WARNING on v4.9 next-20161212]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Boris-Ostrovsky/ACPI-NUMA-Do-not-map-pxm-to-node-when-NUMA-is-turned-off/20161213-045302
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-allyesdebian (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

>> WARNING: vmlinux.o(.text+0x8acd33): Section mismatch in reference from the function acpi_map_pxm_to_node() to the variable .init.data:numa_off
   The function acpi_map_pxm_to_node() references
   the variable __initdata numa_off.
   This is often because acpi_map_pxm_to_node lacks a __initdata
   annotation or the annotation of numa_off is wrong.

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37778 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip:x86/urgent] x86/acpi: Use proper macro for invalid node
  2016-12-12 19:29 [PATCH] x86/acpi: Use proper macro for invalid node Boris Ostrovsky
  2016-12-12 19:29 ` [PATCH] ACPI/NUMA: Do not map pxm to node when NUMA is turned off Boris Ostrovsky
@ 2016-12-15 11:52 ` tip-bot for Boris Ostrovsky
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Boris Ostrovsky @ 2016-12-15 11:52 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: mingo, linux-kernel, boris.ostrovsky, tglx, hpa

Commit-ID:  4370a3ef39f3d07342a1ae9967701bd697c8d9df
Gitweb:     http://git.kernel.org/tip/4370a3ef39f3d07342a1ae9967701bd697c8d9df
Author:     Boris Ostrovsky <boris.ostrovsky@oracle.com>
AuthorDate: Mon, 12 Dec 2016 14:29:52 -0500
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 15 Dec 2016 11:32:32 +0100

x86/acpi: Use proper macro for invalid node

Use NUMA_NO_NODE instead of -1.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: len.brown@intel.com
Cc: rjw@rjwysocki.net
Cc: linux-acpi@vger.kernel.org
Cc: pavel@ucw.cz
Link: http://lkml.kernel.org/r/1481570993-13941-1-git-send-email-boris.ostrovsky@oracle.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 arch/x86/kernel/acpi/boot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 4764fa5..6f65b0e 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -715,7 +715,7 @@ int acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
 	int nid;
 
 	nid = acpi_get_node(handle);
-	if (nid != -1) {
+	if (nid != NUMA_NO_NODE) {
 		set_apicid_to_node(physid, nid);
 		numa_set_node(cpu, nid);
 	}

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-15 11:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-12 19:29 [PATCH] x86/acpi: Use proper macro for invalid node Boris Ostrovsky
2016-12-12 19:29 ` [PATCH] ACPI/NUMA: Do not map pxm to node when NUMA is turned off Boris Ostrovsky
2016-12-13  0:11   ` kbuild test robot
2016-12-15 11:52 ` [tip:x86/urgent] x86/acpi: Use proper macro for invalid node tip-bot for Boris Ostrovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox