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: 34210 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C634420C7F for ; Thu, 24 Jul 2014 13:02:57 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id hi2sf2700361wib.6 for ; Thu, 24 Jul 2014 06:02:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=W681urkU5oLzYQ6Io4XUdqRg8TKz3440ErmwCQF4DsE=; b=DBtxoZ9a3vy8r5hrGYMuKcpM/jrrHaO+ve3wtRE5C8R9RfGtHdvlkItb6FkV6oRQYi GxTjPb+nT4EQiJkV8kQJjNTWtUxK5eqF+R1ME0xrTrhc2r4YkboXSNsdKja+vIKDQKy+ bOWMCuITJ3m0Q3zTO3lz2ncYVp3eKKZKDcinduazpYBA4OtWn4Q4J+ed8eOLiIevysWv y6j6P/pgWKDhrZjAY73E+8TCflybfpFyHXm8DTQMGgDOXBhhau8hMg1gOlp6r8Aa+PTE rBOpdlPYoBEe4Aa0pg3hXytat02lqRLDy6xu5B1W7j+Cmd+X7pfv70hu6gVIuv9w0ANk 5y7Q== X-Gm-Message-State: ALoCoQmqLcA1nCSmnbrEMyf7ijbT7GAW6wqJgXye7wfCsf2+jXXkV7/F/P8HzgTZs5rduXxDjeC9 X-Received: by 10.152.20.199 with SMTP id p7mr734113lae.3.1406206976806; Thu, 24 Jul 2014 06:02:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.169 with SMTP id x38ls795914qgx.28.gmail; Thu, 24 Jul 2014 06:02:56 -0700 (PDT) X-Received: by 10.220.94.135 with SMTP id z7mr12113195vcm.46.1406206976570; Thu, 24 Jul 2014 06:02:56 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id w6si4845894vco.104.2014.07.24.06.02.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Jul 2014 06:02:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id hu12so4724056vcb.6 for ; Thu, 24 Jul 2014 06:02:56 -0700 (PDT) X-Received: by 10.221.47.9 with SMTP id uq9mr12101194vcb.48.1406206974836; Thu, 24 Jul 2014 06:02:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp362964vcb; Thu, 24 Jul 2014 06:02:54 -0700 (PDT) X-Received: by 10.66.168.204 with SMTP id zy12mr4983643pab.19.1406206973965; Thu, 24 Jul 2014 06:02:53 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wt2si5940461pbc.82.2014.07.24.06.02.49 for ; Thu, 24 Jul 2014 06:02:50 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759237AbaGXNCf (ORCPT + 13 others); Thu, 24 Jul 2014 09:02:35 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:58388 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759219AbaGXNCc (ORCPT ); Thu, 24 Jul 2014 09:02:32 -0400 Received: by mail-pd0-f180.google.com with SMTP id y13so3612315pdi.25 for ; Thu, 24 Jul 2014 06:02:31 -0700 (PDT) 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 Cc: Graeme Gregory , Arnd Bergmann , Grant Likely , Sudeep Holla , Will Deacon , Jason Cooper , Marc Zyngier , Bjorn Helgaas , Daniel Lezcano , Mark Brown , Robert Richter , Lv Zheng , Robert Moore , Lorenzo Pieralisi , Liviu Dudau , Randy Dunlap , Charles.Garcia-Tobin@arm.com, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linaro-acpi-private@linaro.org, Hanjun Guo 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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();