From patchwork Fri Sep 12 13:59:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 37324 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 D31AE203EE for ; Fri, 12 Sep 2014 14:01:25 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf372871wib.6 for ; Fri, 12 Sep 2014 07:01:25 -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=pbgnIMpqzQhy/6m+KMTXwuQkQkj3lP9Wgd4cso8M74c=; b=mPw8qdaL2V0PPrXA7yGpQMbvUpIUe2Ol6Pr+sJKuqsgLxJvLaMhSY27nAfjVGr27wF yS3GULy1o7dcprsG0gRoCqLcNuU9prG6nLZ9bdicnIPmx8ipDL3DGORSglmlETRSFYw7 meYvDR69Z2x0vIZZtoXwSEY22E07HjbGMANtKm36wb2HhXJQLfq3HnypBu+IqE5+i6/j HNEE1hA88c0KGtQ0AjcczJc0F+NGiZXEeiirmAsuKkOn7MxqFlUxlafnetW/PuuVH0+g Pnr7Pc7wD3lUFuq4xTU93lstEHTecLKU7+r65KyvfySpZBGBV9ZlVfbnKas+v8vB6iF5 ft/Q== X-Gm-Message-State: ALoCoQkIRjJ3XFL13eCsSRj0NRQ9uWQc1SvhU5c6ODbzPOv2DCu+RTXCJq58LsrGMLPXFsTlcar/ X-Received: by 10.152.21.137 with SMTP id v9mr2341802lae.1.1410530484678; Fri, 12 Sep 2014 07:01:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.18.227 with SMTP id z3ls170808lad.44.gmail; Fri, 12 Sep 2014 07:01:24 -0700 (PDT) X-Received: by 10.113.3.139 with SMTP id bw11mr8709178lbd.98.1410530484404; Fri, 12 Sep 2014 07:01:24 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com [209.85.217.180]) by mx.google.com with ESMTPS id s6si6611626las.121.2014.09.12.07.01.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Sep 2014 07:01:24 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by mail-lb0-f180.google.com with SMTP id b12so945784lbj.39 for ; Fri, 12 Sep 2014 07:01:24 -0700 (PDT) X-Received: by 10.152.5.168 with SMTP id t8mr8996760lat.67.1410530483954; Fri, 12 Sep 2014 07:01:23 -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.141.42 with SMTP id rl10csp737558lbb; Fri, 12 Sep 2014 07:01:23 -0700 (PDT) X-Received: by 10.68.194.66 with SMTP id hu2mr12677743pbc.19.1410530482321; Fri, 12 Sep 2014 07:01:22 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id iv3si8220138pbd.30.2014.09.12.07.01.21 for ; Fri, 12 Sep 2014 07:01:22 -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 S1754891AbaILOAx (ORCPT + 27 others); Fri, 12 Sep 2014 10:00:53 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:54063 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754837AbaILOAu (ORCPT ); Fri, 12 Sep 2014 10:00:50 -0400 Received: by mail-pd0-f170.google.com with SMTP id fp1so1299205pdb.1 for ; Fri, 12 Sep 2014 07:00:49 -0700 (PDT) X-Received: by 10.70.132.37 with SMTP id or5mr9725000pdb.149.1410530449352; Fri, 12 Sep 2014 07:00:49 -0700 (PDT) Received: from localhost ([111.140.73.43]) by mx.google.com with ESMTPSA id db2sm4080216pbc.16.2014.09.12.07.00.48 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 12 Sep 2014 07:00:48 -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, 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 v4 01/18] ARM64: Move the init of cpu_logical_map(0) before unflatten_device_tree() Date: Fri, 12 Sep 2014 21:59:59 +0800 Message-Id: <1410530416-30200-2-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1410530416-30200-1-git-send-email-hanjun.guo@linaro.org> References: <1410530416-30200-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.180 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. Signed-off-by: Hanjun Guo Acked-by: Olof Johansson Acked-by: Mark Rutland --- 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();