From patchwork Fri Mar 21 17:27:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 26857 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 33154203AB for ; Fri, 21 Mar 2014 17:33:00 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id f11sf5442081qae.11 for ; Fri, 21 Mar 2014 10:32:59 -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=aBpyWRIuRoFDgr+4ztwKQLAp8nCALQw17Dr6+5E4NFo=; b=X9EaMbo2IEcfXnPcwRE7C/9UgZM0nOa+tbpLD0FtAcE26cHSgZiil9Gy0JKILfnele p2/2Fd1zeHVcKRluBYE2SeYwUjVIOnTC/kc4HRgXP6+F4FYN2+4hWaWxuMz+rWx9tda8 4Zi8uAe63X03/XDSdnfqBFJTv05iYRZpDmjwlgvqECwkCKUJVlH8tRVy+WtnfzUMAsIz ZMm1weWb12o3kdBmGS+KZsAkeWnLVAz9PwGlaTRVsKbrS3iTDxD8gslMFqDp2Zz4xA27 UFSFFAY6CBzWrInkN3rz192Chhmkajdu34ldDyCH2WV+FLRcwX+b1rrtL1gFZSFJm7XQ Svpw== X-Gm-Message-State: ALoCoQnQMkEbbEW/djDjsTPJqNo694Fv0gD9Qv8ocNyygneXextK9m+vq/hC23BzZA3n8QCbTqRO X-Received: by 10.58.58.41 with SMTP id n9mr10228787veq.23.1395423179842; Fri, 21 Mar 2014 10:32:59 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.14 with SMTP id 14ls741966qgs.58.gmail; Fri, 21 Mar 2014 10:32:59 -0700 (PDT) X-Received: by 10.58.23.6 with SMTP id i6mr3129362vef.12.1395423179663; Fri, 21 Mar 2014 10:32:59 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id iz10si1275689vec.60.2014.03.21.10.32.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Mar 2014 10:32:59 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.182 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id ks9so3021009vcb.13 for ; Fri, 21 Mar 2014 10:32:59 -0700 (PDT) X-Received: by 10.220.106.84 with SMTP id w20mr38113583vco.18.1395423179586; Fri, 21 Mar 2014 10:32:59 -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.78.9 with SMTP id i9csp47568vck; Fri, 21 Mar 2014 10:32:59 -0700 (PDT) X-Received: by 10.180.219.44 with SMTP id pl12mr3402446wic.12.1395423178576; Fri, 21 Mar 2014 10:32:58 -0700 (PDT) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id qa8si1794803wic.27.2014.03.21.10.32.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Mar 2014 10:32:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:770:15f::2 as permitted sender) client-ip=2001:770:15f::2; Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WR3Hz-0003yc-0M; Fri, 21 Mar 2014 17:31:27 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WR3HT-00056Z-6h; Fri, 21 Mar 2014 17:30:55 +0000 Received: from bombadil.infradead.org ([2001:1868:205::9]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WR3HI-00055q-Dn for linux-arm-kernel@merlin.infradead.org; Fri, 21 Mar 2014 17:30:44 +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 1WR3HG-0000QD-E4 for linux-arm-kernel@lists.infradead.org; Fri, 21 Mar 2014 17:30:43 +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:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1WR3FY-0001GZ-7T; Fri, 21 Mar 2014 17:28:57 +0000 Received: from broonie by debutante.sirena.org.uk with local (Exim 4.82) (envelope-from ) id 1WR3FP-0002cY-3L; Fri, 21 Mar 2014 17:28:47 +0000 From: Mark Brown To: Lorenzo Pieralisi , Catalin Marinas , Will Deacon , Mark Rutland Date: Fri, 21 Mar 2014 17:27:58 +0000 Message-Id: <1395422881-10029-1-git-send-email-broonie@kernel.org> X-Mailer: git-send-email 1.9.1 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-20140321_103042_593850_9092E466 X-CRM114-Status: GOOD ( 11.51 ) X-Spam-Score: 3.7 (+++) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (3.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record 3.7 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.220.182 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 --- 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); } }