From patchwork Tue Apr 22 20:21:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 28832 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 01BCC203C3 for ; Tue, 22 Apr 2014 20:23:55 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id j7sf22408764qaq.6 for ; Tue, 22 Apr 2014 13:23:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject:cc :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=JAUr7c0CdWewRlwV6LBQK+X57Cz4F2U6eLDqXY441q0=; b=GOrwwyd9TLOGHyLc2FDrjV6ajM0pgXaJSlzCKskDoBaHYzRN6C44t0j3WNwHqi5jh0 SJ2do/6O7VALKpNvZK0zc1yTaTBHSmTjcMfxmK39WajqaIHFIFgVs/pf7gzk2umS7UUW TrDyiRIheESF/2obJKNiPMHlKPTfmoQsayK1kaQmZpZg1d0ofMLrY3VnO2P+T3zhKvyF /fVEZvYdmGl41m/yIsAwHWKAIsuczyBTY1OPew1D2FkDj3rSmKboEmd4Kqz9n7/CRIy9 nwukVrhWBsfVqnL5swIXovXqefGMtsw6uFMEf7Hbawa6j+AaD2HqdW3B6wl4jtKlBhur IcBw== X-Gm-Message-State: ALoCoQkmHsfNv2S1qN86ucd3prWdcEdeMqVV83kuNxOUXy4XflVgpVO9slRVRqO0Xt33AoF2T5UC X-Received: by 10.58.22.70 with SMTP id b6mr24011046vef.13.1398198235706; Tue, 22 Apr 2014 13:23:55 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.94.184 with SMTP id g53ls318955qge.76.gmail; Tue, 22 Apr 2014 13:23:55 -0700 (PDT) X-Received: by 10.52.73.40 with SMTP id i8mr34917vdv.53.1398198235545; Tue, 22 Apr 2014 13:23:55 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id sn5si7070398vdc.101.2014.04.22.13.23.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Apr 2014 13:23:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id db11so10010646veb.21 for ; Tue, 22 Apr 2014 13:23:55 -0700 (PDT) X-Received: by 10.58.107.65 with SMTP id ha1mr42192835veb.1.1398198235456; Tue, 22 Apr 2014 13:23:55 -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.220.221.72 with SMTP id ib8csp52574vcb; Tue, 22 Apr 2014 13:23:55 -0700 (PDT) X-Received: by 10.224.73.136 with SMTP id q8mr26699675qaj.54.1398198234918; Tue, 22 Apr 2014 13:23:54 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id s6si17490099qaj.62.2014.04.22.13.23.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Apr 2014 13:23:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; 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 1WchCu-0003q1-AR; Tue, 22 Apr 2014 20:22:20 +0000 Received: from mezzanine.sirena.org.uk ([2400:8900::f03c:91ff:fedb:4f4]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WchCa-0003Vv-Cs for linux-arm-kernel@lists.infradead.org; Tue, 22 Apr 2014 20:22:00 +0000 Received: from cpc11-sgyl31-2-0-cust672.sgyl.cable.virginm.net ([94.175.94.161] helo=debutante.sirena.org.uk) by mezzanine.sirena.org.uk with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1WchC6-0005iU-HU; Tue, 22 Apr 2014 20:21:35 +0000 Received: from broonie by debutante.sirena.org.uk with local (Exim 4.82) (envelope-from ) id 1WchBx-0001xB-2O; Tue, 22 Apr 2014 21:21:21 +0100 From: Mark Brown To: Lorenzo Pieralisi , Catalin Marinas , Will Deacon , Mark Rutland Date: Tue, 22 Apr 2014 21:21:15 +0100 Message-Id: <1398198078-7473-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 1.9.2 X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mezzanine.sirena.org.uk X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, RISK_FREE autolearn=ham version=3.3.2 Subject: [PATCH 1/4] arm64: topology: Initialise default topology state immediately X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140422_132200_545237_F58DF6C8 X-CRM114-Status: GOOD ( 13.51 ) X-Spam-Score: 1.9 (+) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record 2.6 RISK_FREE No risk! Cc: linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.org, Mark Brown X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: broonie@kernel.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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 From: Mark Brown As a legacy of the way 32 bit ARM did things the topology code uses a null topology map by default and then overwrites it by mapping cores with no information to a cluster by themselves later. In order to make it simpler to reset things as part of recovering from parse failures in firmware information directly set this configuration on init. A core will always be its own sibling so there should be no risk of confusion with firmware provided information. Signed-off-by: Mark Brown Reviewed-by: Lorenzo Pieralisi --- arch/arm64/kernel/topology.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c index 3e06b0be4ec8..ff662b23af5f 100644 --- a/arch/arm64/kernel/topology.c +++ b/arch/arm64/kernel/topology.c @@ -43,9 +43,6 @@ static void update_siblings_masks(unsigned int cpuid) * reset it to default behaviour */ pr_debug("CPU%u: No topology information configured\n", cpuid); - cpuid_topo->core_id = 0; - cpumask_set_cpu(cpuid, &cpuid_topo->core_sibling); - cpumask_set_cpu(cpuid, &cpuid_topo->thread_sibling); return; } @@ -87,9 +84,12 @@ void __init init_cpu_topology(void) struct cpu_topology *cpu_topo = &cpu_topology[cpu]; cpu_topo->thread_id = -1; - cpu_topo->core_id = -1; + cpu_topo->core_id = 0; cpu_topo->cluster_id = -1; + cpumask_clear(&cpu_topo->core_sibling); + cpumask_set_cpu(cpu, &cpu_topo->core_sibling); cpumask_clear(&cpu_topo->thread_sibling); + cpumask_set_cpu(cpu, &cpu_topo->thread_sibling); } }