From patchwork Thu Jul 24 13:00:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 4618051 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A389CC0514 for ; Thu, 24 Jul 2014 13:07:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BAACB20107 for ; Thu, 24 Jul 2014 13:07:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A05F2200E5 for ; Thu, 24 Jul 2014 13:07:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XAIge-0002Ep-W0; Thu, 24 Jul 2014 13:03:56 +0000 Received: from mail-pd0-f171.google.com ([209.85.192.171]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XAIfb-0000IY-PW for linux-arm-kernel@lists.infradead.org; Thu, 24 Jul 2014 13:02:57 +0000 Received: by mail-pd0-f171.google.com with SMTP id z10so3637696pdj.16 for ; Thu, 24 Jul 2014 06:02:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TXZ/H59Zd9bMk8eTnW87i7f1icbMRMoZIEDZ6k6v+lY=; b=iyU2PYlXSRtWXhF/92cY7e9fFpR3dB0wst4sJbPb9f2T2PRzQsRtqe6lDS9At0FJax DAvUq0NBWkaWBUnp9xO6Jedi5S9+7MDv8nuaNJ4o3+nMTL+3OTToVmrfPsdUQ77qETVW iSxLK6RuMxnNVAAmO4qg17/bC+fIjjPVuvUqmiUjLi5zTlnlhiS5ue/+JaGPHHeKaSTg nsHQypckXW88vBshAhRX1jJbGBtLi7L4hg/lx/ENH7x/uymntARPUGjhC/sNZ3A7fku4 3F4/LdxW2W0wnQ62l5tdM4dIAU6z3k/dO1C65oZlGimlrzIAlWLXEqAQ5xbjCY7Ok9IX SHVw== X-Gm-Message-State: ALoCoQn2IlBOhRhIIp45NlQTD1CQt74de2LLuQDZlJOtGSZlSw4BuSzcvVjTNh3wqxqstZ72vvU4 X-Received: by 10.66.66.133 with SMTP id f5mr9926132pat.81.1406206951176; Thu, 24 Jul 2014 06:02:31 -0700 (PDT) Received: from localhost ([183.247.163.231]) by mx.google.com with ESMTPSA id xy4sm20587484pac.19.2014.07.24.06.02.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 24 Jul 2014 06:02:30 -0700 (PDT) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Mark Rutland Subject: [PATCH 09/19] ARM64 / ACPI: Move the initialization of cpu_logical_map(0) before acpi_boot_init() Date: Thu, 24 Jul 2014 21:00:15 +0800 Message-Id: <1406206825-15590-10-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1406206825-15590-1-git-send-email-hanjun.guo@linaro.org> References: <1406206825-15590-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140724_060251_869985_2D5099A0 X-CRM114-Status: GOOD ( 10.22 ) X-Spam-Score: -0.7 (/) Cc: Mark Brown , Liviu Dudau , Lv Zheng , Lorenzo Pieralisi , Daniel Lezcano , Robert Moore , linux-acpi@vger.kernel.org, Grant Likely , Charles.Garcia-Tobin@arm.com, Robert Richter , Jason Cooper , Arnd Bergmann , Marc Zyngier , Will Deacon , linaro-acpi-private@linaro.org, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Graeme Gregory , Randy Dunlap , linux-kernel@vger.kernel.org, Hanjun Guo , Sudeep Holla X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move the initialization of cpu_logical_map(0) before acpi_boot_init() to remove the duplicated initialization of cpu_logical_map(0). Signed-off-by: Hanjun Guo --- arch/arm64/kernel/acpi.c | 3 --- arch/arm64/kernel/setup.c | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index 801e268..ff0f6a0 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -244,9 +244,6 @@ int __init acpi_boot_init(void) if (err) pr_err("Can't find FADT\n"); - /* Get the boot CPU's MPIDR before MADT parsing */ - cpu_logical_map(0) = read_cpuid_mpidr() & MPIDR_HWID_BITMASK; - err = acpi_parse_madt_gic_cpu_interface_entries(); return err; diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index e00d40c..17ab98e 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -394,13 +394,14 @@ void __init setup_arch(char **cmdline_p) efi_idmap_init(); + /* Get the boot CPU's MPIDR before cpu logical map is built */ + cpu_logical_map(0) = read_cpuid_mpidr() & MPIDR_HWID_BITMASK; acpi_boot_init(); unflatten_device_tree(); psci_init(); - cpu_logical_map(0) = read_cpuid_mpidr() & MPIDR_HWID_BITMASK; cpu_read_bootcpu_ops(); #ifdef CONFIG_SMP smp_init_cpus();