From patchwork Fri Oct 17 13:36:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 38858 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6CBA12054E for ; Fri, 17 Oct 2014 13:38:38 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id b13sf489426wgh.8 for ; Fri, 17 Oct 2014 06:38:37 -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=q4VjvI2gniu0my8ysH6Jaqw9LlSfNhFBuHhS8jYAA+I=; b=KKDjjH7iB9IkyGTyWg1N0VqutTdtujPfe8BvgHnMGb/7NuuIO4gENaxaLmUxtraNA5 ERc/KcLaUyLJRlr571U0GhrLFQQYTatHnUQmaHzIe/FQ2ZUcRs2Yqz4s57aEax84sdrr KbuMS6D5R8j0EdE9nJqMPC8GSUsJSevLdZn2We9DJdelDwkviKuT6K0LqjZJfnfcPfeA cwy5WEzbgkw4G0fwDoaB33WANZ5m7ujZRrh7YDFRvWybKO7xF+8Oc5hVJ1rVTSjMtZTj IiS5bWDk719ec5l7whNt8Y2jXc2cieL/Cpz3gtgNz/Gsk7Q0YeDrOUN/KbpBSIRKrWmI Ukxw== X-Gm-Message-State: ALoCoQl08uDtqtP/T69qnRkftbv/XRfPLXuNWUcqnP+7lekrou1DE6qviz9wjXRw1GAvaRthvx4m X-Received: by 10.181.27.135 with SMTP id jg7mr2026892wid.5.1413553117624; Fri, 17 Oct 2014 06:38:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.45.101 with SMTP id l5ls237981lam.103.gmail; Fri, 17 Oct 2014 06:38:37 -0700 (PDT) X-Received: by 10.112.173.69 with SMTP id bi5mr8835994lbc.61.1413553117432; Fri, 17 Oct 2014 06:38:37 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id t18si2092634laz.81.2014.10.17.06.38.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 06:38:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by mail-lb0-f170.google.com with SMTP id u10so704229lbd.1 for ; Fri, 17 Oct 2014 06:38:37 -0700 (PDT) X-Received: by 10.152.202.135 with SMTP id ki7mr8988250lac.40.1413553116707; Fri, 17 Oct 2014 06:38:36 -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.112.84.229 with SMTP id c5csp228227lbz; Fri, 17 Oct 2014 06:38:35 -0700 (PDT) X-Received: by 10.66.237.165 with SMTP id vd5mr8724217pac.34.1413553114914; Fri, 17 Oct 2014 06:38:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ru9si1142685pab.173.2014.10.17.06.38.04 for ; Fri, 17 Oct 2014 06:38:34 -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 S1752813AbaJQNhy (ORCPT + 27 others); Fri, 17 Oct 2014 09:37:54 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:63719 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752638AbaJQNhv (ORCPT ); Fri, 17 Oct 2014 09:37:51 -0400 Received: by mail-pd0-f174.google.com with SMTP id y13so807681pdi.33 for ; Fri, 17 Oct 2014 06:37:50 -0700 (PDT) X-Received: by 10.68.246.229 with SMTP id xz5mr8409798pbc.131.1413553070569; Fri, 17 Oct 2014 06:37:50 -0700 (PDT) Received: from localhost ([220.202.153.90]) by mx.google.com with ESMTPSA id m4sm1603873pdr.82.2014.10.17.06.37.45 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 17 Oct 2014 06:37:49 -0700 (PDT) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Mark Rutland , Olof Johansson , Grant Likely , Will Deacon Cc: Graeme Gregory , Arnd Bergmann , Sudeep Holla , Jon Masters , Jason Cooper , Marc Zyngier , Bjorn Helgaas , Daniel Lezcano , Mark Brown , Rob Herring , Robert Richter , Lv Zheng , Robert Moore , Lorenzo Pieralisi , Liviu Dudau , Randy Dunlap , Charles.Garcia-Tobin@arm.com, Kangkang.Shen@huawei.com, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, Hanjun Guo Subject: [PATCH v5 01/18] ARM64: Move the init of cpu_logical_map(0) before unflatten_device_tree() Date: Fri, 17 Oct 2014 21:36:57 +0800 Message-Id: <1413553034-20956-2-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1413553034-20956-1-git-send-email-hanjun.guo@linaro.org> References: <1413553034-20956-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.217.170 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: , It always make sense to initialize CPU0's logical map entry from the hardware values, so move the initialization of cpu_logical_map(0) before unflatten_device_tree() which is needed by ACPI code later. Acked-by: Olof Johansson Acked-by: Mark Rutland Signed-off-by: Hanjun Guo Acked-by: Catalin Marinas --- arch/arm64/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index edb146d..8f33f72 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -393,11 +393,11 @@ void __init setup_arch(char **cmdline_p) efi_idmap_init(); + cpu_logical_map(0) = read_cpuid_mpidr() & MPIDR_HWID_BITMASK; 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();