From patchwork Tue Mar 10 15:39:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 45598 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 585D7214BF for ; Tue, 10 Mar 2015 15:42:43 +0000 (UTC) Received: by lbvp9 with SMTP id p9sf2164243lbv.0 for ; Tue, 10 Mar 2015 08:42:42 -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:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=y8lmVOGEvo1kS+AHEcs/yZmhfGkDE3gIpXZrtlN7nkQ=; b=Mqoq44qGVsKXr2xQS/V5GmUs25zsHZsRM0wnGyIfpC9Cy2vjgHn3zBIwEL7Sl9FwTT JA25a9FUQevK88D61fUPwnkCFq+eJzAKlbaD6q/rz9Hl+4Kdls8A8aAevQptAHpnvXIv 6QhrIVb4El4XEzK7fR6jOfGSjv61DTd1clgKVYLS+M5n0JiiXLCFVml3qbVDT900TQBj CyMP06DETQrIDul0LMUJrVwem6NOTs4lob3v3bUdrx0i+HCLmpmRvM4nPX/6KNj1IxjS dWxcDxW46KxA6Meab2jamBLscXX/eQl/r3fc826rd9XccgkPVzFFjoe97c+LVuOlJlbM Rztg== X-Gm-Message-State: ALoCoQn+O/cGgTdre7A0kX/ve0/sYXDdkfIjenbYX+DFH/8FlqGbvgvurmzmzA4Vi3+ZwHp8UjrV X-Received: by 10.180.11.34 with SMTP id n2mr5278034wib.2.1426002162279; Tue, 10 Mar 2015 08:42:42 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.36 with SMTP id n4ls37688laj.27.gmail; Tue, 10 Mar 2015 08:42:42 -0700 (PDT) X-Received: by 10.152.26.136 with SMTP id l8mr31106557lag.109.1426002162116; Tue, 10 Mar 2015 08:42:42 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id vs2si564573lac.87.2015.03.10.08.42.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Mar 2015 08:42:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by labmn12 with SMTP id mn12so2673031lab.0 for ; Tue, 10 Mar 2015 08:42:42 -0700 (PDT) X-Received: by 10.112.212.106 with SMTP id nj10mr12283477lbc.36.1426002161987; Tue, 10 Mar 2015 08:42:41 -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.35.133 with SMTP id h5csp2213333lbj; Tue, 10 Mar 2015 08:42:41 -0700 (PDT) X-Received: by 10.66.65.169 with SMTP id y9mr67146915pas.60.1426002159955; Tue, 10 Mar 2015 08:42:39 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ox7si1824466pdb.30.2015.03.10.08.42.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Mar 2015 08:42:39 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) 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 1YVMHI-0004lP-N1; Tue, 10 Mar 2015 15:41:04 +0000 Received: from mail-wg0-f45.google.com ([74.125.82.45]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YVMGX-00036f-IM for linux-arm-kernel@lists.infradead.org; Tue, 10 Mar 2015 15:40:18 +0000 Received: by wghl18 with SMTP id l18so2722454wgh.5 for ; Tue, 10 Mar 2015 08:39:55 -0700 (PDT) X-Received: by 10.180.39.139 with SMTP id p11mr20240010wik.61.1426001995230; Tue, 10 Mar 2015 08:39:55 -0700 (PDT) Received: from ards-macbook-pro.local ([213.143.60.209]) by mx.google.com with ESMTPSA id ei3sm7381208wib.4.2015.03.10.08.39.52 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Mar 2015 08:39:53 -0700 (PDT) From: Ard Biesheuvel To: will.deacon@arm.com, mark.rutland@arm.com, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 2/5] arm64: remove processor_id Date: Tue, 10 Mar 2015 16:39:39 +0100 Message-Id: <1426001982-20047-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1426001982-20047-1-git-send-email-ard.biesheuvel@linaro.org> References: <1426001982-20047-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150310_084017_769158_9B4FE040 X-CRM114-Status: UNSURE ( 9.40 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.45 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.45 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Ard Biesheuvel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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: ard.biesheuvel@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.215.43 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 The global processor_id is assigned the MIDR_EL1 value of the boot CPU in the early init code, but is never referenced afterwards. As the relevance of the MIDR_EL1 value of the boot CPU is debatable anyway, especially under big.LITTLE, let's remove it before anyone starts using it. Reviewed-by: Mark Rutland Reviewed-by: Catalin Marinas Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/head.S | 10 +++------- arch/arm64/kernel/setup.c | 3 --- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index 8ce88e08c030..003db2eadd7a 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -244,8 +244,7 @@ ENTRY(stext) bl el2_setup // Drop to EL1, w20=cpu_boot_mode bl __calc_phys_offset // x24=PHYS_OFFSET, x28=PHYS_OFFSET-PAGE_OFFSET bl set_cpu_boot_mode_flag - mrs x22, midr_el1 // x22=cpuid - mov x0, x22 + mrs x0, midr_el1 bl lookup_processor_type mov x23, x0 // x23=current cpu_table /* @@ -439,7 +438,6 @@ __switch_data: .quad __mmap_switched .quad __bss_start // x6 .quad __bss_stop // x7 - .quad processor_id // x4 .quad __fdt_pointer // x5 .quad memstart_addr // x6 .quad init_thread_union + THREAD_START_SP // sp @@ -457,11 +455,10 @@ __mmap_switched: str xzr, [x6], #8 // Clear BSS b 1b 2: - ldp x4, x5, [x3], #16 + ldr x5, [x3], #8 ldr x6, [x3], #8 ldr x16, [x3] mov sp, x16 - str x22, [x4] // Save processor ID str x21, [x5] // Save FDT pointer str x24, [x6] // Save PHYS_OFFSET mov x29, #0 @@ -633,8 +630,7 @@ ENTRY(secondary_startup) /* * Common entry point for secondary CPUs. */ - mrs x22, midr_el1 // x22=cpuid - mov x0, x22 + mrs x0, midr_el1 bl lookup_processor_type mov x23, x0 // x23=current cpu_table cbz x23, __error_p // invalid processor (x23=0)? diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index e8420f635bd4..8b82ef19b81b 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -63,9 +63,6 @@ #include #include -unsigned int processor_id; -EXPORT_SYMBOL(processor_id); - unsigned long elf_hwcap __read_mostly; EXPORT_SYMBOL_GPL(elf_hwcap);