Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1474102

[PATCH v8 05/16] arm64/numa: avoid inconsistent information to be printed

From Zhen Lei <thunder.leizhen@huawei.com>
Newsgroups linux.kernel
Subject [PATCH v8 05/16] arm64/numa: avoid inconsistent information to be printed
Date 2016-09-01 09:00 +0200
Message-ID <scu8G-5sK-25@gated-at.bofh.it> (permalink)
References <scu8F-5sK-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


numa_init may return error because of numa configuration error. So "No
NUMA configuration found" is inaccurate. In fact, specific configuration
error information should be immediately printed by the testing branch.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 arch/arm64/kernel/acpi_numa.c | 4 +++-
 arch/arm64/mm/numa.c          | 6 +++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/kernel/acpi_numa.c b/arch/arm64/kernel/acpi_numa.c
index f85149c..f01fab6 100644
--- a/arch/arm64/kernel/acpi_numa.c
+++ b/arch/arm64/kernel/acpi_numa.c
@@ -105,8 +105,10 @@ int __init arm64_acpi_numa_init(void)
 	int ret;

 	ret = acpi_numa_init();
-	if (ret)
+	if (ret) {
+		pr_info("Failed to initialise from firmware\n");
 		return ret;
+	}

 	return srat_disabled() ? -EINVAL : 0;
 }
diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c
index 5bb15ea..d97c6e2 100644
--- a/arch/arm64/mm/numa.c
+++ b/arch/arm64/mm/numa.c
@@ -335,8 +335,10 @@ static int __init numa_init(int (*init_func)(void))
 	if (ret < 0)
 		return ret;

-	if (nodes_empty(numa_nodes_parsed))
+	if (nodes_empty(numa_nodes_parsed)) {
+		pr_info("No NUMA configuration found\n");
 		return -EINVAL;
+	}

 	ret = numa_register_nodes();
 	if (ret < 0)
@@ -367,8 +369,6 @@ static int __init dummy_numa_init(void)

 	if (numa_off)
 		pr_info("NUMA disabled\n"); /* Forced off on command line. */
-	else
-		pr_info("No NUMA configuration found\n");
 	pr_info("NUMA: Faking a node at [mem %#018Lx-%#018Lx]\n",
 	       0LLU, PFN_PHYS(max_pfn) - 1);

--
2.5.0

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v8 00/16] fix some type infos and bugs for arm64/of numa Zhen Lei <thunder.leizhen@huawei.com> - 2016-09-01 09:00 +0200
  [PATCH v8 05/16] arm64/numa: avoid inconsistent information to be printed Zhen Lei <thunder.leizhen@huawei.com> - 2016-09-01 09:00 +0200
  [PATCH v8 07/16] of_numa: Use pr_fmt() Zhen Lei <thunder.leizhen@huawei.com> - 2016-09-01 09:00 +0200
  [PATCH v8 04/16] of/numa: remove a duplicated warning Zhen Lei <thunder.leizhen@huawei.com> - 2016-09-01 09:00 +0200
  [PATCH v8 10/16] mm/memblock: add a new function memblock_alloc_near_nid Zhen Lei <thunder.leizhen@huawei.com> - 2016-09-01 09:00 +0200
    Re: [PATCH v8 10/16] mm/memblock: add a new function  memblock_alloc_near_nid "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com> - 2016-09-09 06:00 +0200
  [PATCH v8 12/16] arm64/numa: remove some useless code Zhen Lei <thunder.leizhen@huawei.com> - 2016-09-01 09:00 +0200
  [PATCH v8 06/16] of_numa: Use of_get_next_parent to simplify code Zhen Lei <thunder.leizhen@huawei.com> - 2016-09-01 09:00 +0200
  [PATCH v8 16/16] arm64/numa: define numa_distance as array to simplify code Zhen Lei <thunder.leizhen@huawei.com> - 2016-09-01 09:00 +0200
  [PATCH v8 01/16] of/numa: remove a duplicated pr_debug information Zhen Lei <thunder.leizhen@huawei.com> - 2016-09-01 09:10 +0200
  [PATCH v8 02/16] of/numa: fix a memory@ node can only contains one memory block Zhen Lei <thunder.leizhen@huawei.com> - 2016-09-01 09:10 +0200
  Re: [PATCH v8 00/16] fix some type infos and bugs for arm64/of numa Will Deacon <will.deacon@arm.com> - 2016-09-08 13:10 +0200
    Re: [PATCH v8 00/16] fix some type infos and bugs for arm64/of numa "Leizhen (ThunderTown)" <thunder.leizhen@huawei.com> - 2016-09-09 04:10 +0200

csiph-web