From patchwork Sat Jan 23 09:39:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 60258 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp358322lbb; Sat, 23 Jan 2016 01:44:43 -0800 (PST) X-Received: by 10.98.17.79 with SMTP id z76mr10989856pfi.16.1453542282650; Sat, 23 Jan 2016 01:44:42 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id da6si16177271pad.156.2016.01.23.01.44.42; Sat, 23 Jan 2016 01:44:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756027AbcAWJoj (ORCPT + 30 others); Sat, 23 Jan 2016 04:44:39 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:49926 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751866AbcAWJo1 (ORCPT ); Sat, 23 Jan 2016 04:44:27 -0500 Received: from 172.24.1.51 (EHLO szxeml428-hub.china.huawei.com) ([172.24.1.51]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BVC83054; Sat, 23 Jan 2016 17:40:36 +0800 (CST) Received: from localhost (10.177.17.188) by szxeml428-hub.china.huawei.com (10.82.67.183) with Microsoft SMTP Server id 14.3.235.1; Sat, 23 Jan 2016 17:40:27 +0800 From: Hanjun Guo To: "Rafael J. Wysocki" , Will Deacon , Catalin Marinas CC: , , , Ganapatrao Kulkarni , Lorenzo Pieralisi , Shannon Zhao , "Steve Capper" , Mark Rutland , Robert Richter , Hanjun Guo Subject: [PATCH v3 11/12] acpi, numa: remove unneeded acpi_numa=1 Date: Sat, 23 Jan 2016 17:39:26 +0800 Message-ID: <1453541967-3744-12-git-send-email-guohanjun@huawei.com> X-Mailer: git-send-email 1.7.10.msysgit.1 In-Reply-To: <1453541967-3744-1-git-send-email-guohanjun@huawei.com> References: <1453541967-3744-1-git-send-email-guohanjun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.17.188] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.56A34A94.00D5, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 1054ec90540afb0bde74bb41faf994d2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hanjun Guo acpi_numa is default to 0, it's set to -1 when disable acpi numa or when a bad SRAT is parsed, and it's only consumed in srat_disabled() (compare it with 0) to continue parse the SRAT or not, so we don't need to set acpi_numa to 1 when we get a valid SRAT entry. Signed-off-by: Hanjun Guo --- arch/arm64/kernel/acpi_numa.c | 1 - arch/x86/mm/srat.c | 2 -- 2 files changed, 3 deletions(-) -- 1.9.1 diff --git a/arch/arm64/kernel/acpi_numa.c b/arch/arm64/kernel/acpi_numa.c index fb1556f..03ac1b9 100644 --- a/arch/arm64/kernel/acpi_numa.c +++ b/arch/arm64/kernel/acpi_numa.c @@ -132,7 +132,6 @@ void __init acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa) early_node_cpu_hwid[cpus_in_srat].node_id = node; early_node_cpu_hwid[cpus_in_srat].cpu_hwid = mpidr; node_set(node, numa_nodes_parsed); - acpi_numa = 1; cpus_in_srat++; pr_info("SRAT: PXM %d -> MPIDR 0x%Lx -> Node %d cpu %d\n", pxm, mpidr, node, cpus_in_srat); diff --git a/arch/x86/mm/srat.c b/arch/x86/mm/srat.c index 7078b3f..af1dc14 100644 --- a/arch/x86/mm/srat.c +++ b/arch/x86/mm/srat.c @@ -59,7 +59,6 @@ acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa) } set_apicid_to_node(apic_id, node); node_set(node, numa_nodes_parsed); - acpi_numa = 1; printk(KERN_INFO "SRAT: PXM %u -> APIC 0x%04x -> Node %u\n", pxm, apic_id, node); } @@ -101,7 +100,6 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) set_apicid_to_node(apic_id, node); node_set(node, numa_nodes_parsed); - acpi_numa = 1; printk(KERN_INFO "SRAT: PXM %u -> APIC 0x%02x -> Node %u\n", pxm, apic_id, node); }