From patchwork Tue Mar 10 15:39:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 45600 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 84245214BF for ; Tue, 10 Mar 2015 15:43:40 +0000 (UTC) Received: by wivr20 with SMTP id r20sf2683942wiv.0 for ; Tue, 10 Mar 2015 08:43:39 -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=VZWas9RhfpFFeImqtSR2PEK0BNPNptoVabXtaxj9JjI=; b=OlIhYlfccOMZ3sQLnjJzCICxQL+L/uhWqczS82H0tJigJBRwt/CBZtoxrHklZUf5eS 583Ifo1zDJbLBp4CEZjWd2cjY0vLyLLSVu7kBSAPoLUysTtlntesM/77LD1GvWMP7zU0 ePTqMBXSOMlr915zbgMJLByAk+4u7DZTwequrp1SowWW+ppJqJdv0ZWV6XEwk1uau0xv 15ZMPpy/b76kuf1dHkKfLBP2asrOoJ5AUS09v9blT1Tnoz6YkU+jsQ7HYq0pnrZM6tth rwagR9BN+8eFieuI1vIbopiMa3mJiAJ/dRTE6nR/xLcOeo6Enkgs5JeFWGgFpFm3tx36 zL+A== X-Gm-Message-State: ALoCoQkXdSS84wLodIA1A1S2rY9oa5XWObH84EsTecBAXICfJcB5oo3xVLV2RVOUeZBzmYzcwi66 X-Received: by 10.180.208.12 with SMTP id ma12mr2531856wic.6.1426002219807; Tue, 10 Mar 2015 08:43:39 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.130 with SMTP id v2ls36578lae.98.gmail; Tue, 10 Mar 2015 08:43:39 -0700 (PDT) X-Received: by 10.152.4.136 with SMTP id k8mr30954380lak.103.1426002219518; Tue, 10 Mar 2015 08:43:39 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id k2si561020lah.93.2015.03.10.08.43.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Mar 2015 08:43:39 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by lamq1 with SMTP id q1so2570349lam.12 for ; Tue, 10 Mar 2015 08:43:39 -0700 (PDT) X-Received: by 10.112.185.66 with SMTP id fa2mr30299402lbc.117.1426002219414; Tue, 10 Mar 2015 08:43:39 -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 h5csp2213888lbj; Tue, 10 Mar 2015 08:43:38 -0700 (PDT) X-Received: by 10.66.151.5 with SMTP id um5mr66456890pab.43.1426002216762; Tue, 10 Mar 2015 08:43:36 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ey5si1459444pab.172.2015.03.10.08.43.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Mar 2015 08:43:36 -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 1YVMHl-00051i-Sq; Tue, 10 Mar 2015 15:41:33 +0000 Received: from mail-wi0-f169.google.com ([209.85.212.169]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YVMGb-000391-RN for linux-arm-kernel@lists.infradead.org; Tue, 10 Mar 2015 15:40:24 +0000 Received: by wivr20 with SMTP id r20so31281260wiv.5 for ; Tue, 10 Mar 2015 08:39:59 -0700 (PDT) X-Received: by 10.180.77.199 with SMTP id u7mr10662651wiw.42.1426001999473; Tue, 10 Mar 2015 08:39:59 -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.57 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Mar 2015 08:39:58 -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 4/5] arm64: remove __lookup_processor_type_data object from head.S Date: Tue, 10 Mar 2015 16:39:41 +0100 Message-Id: <1426001982-20047-5-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_084022_063187_55A8C839 X-CRM114-Status: UNSURE ( 7.94 ) 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 [209.85.212.169 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.212.169 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.49 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 This removes __lookup_processor_type_data, replacing the original user with a simple PC-relative address load. Reviewed-by: Catalin Marinas Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/head.S | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index 2b60b587a70f..cd3b94cb597f 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -709,15 +709,9 @@ ENDPROC(__error) * This function gets the processor ID in w0 and searches the cpu_table[] for * a match. It returns a pointer to the struct cpu_info it found. The * cpu_table[] must end with an empty (all zeros) structure. - * - * This routine can be called via C code and it needs to work with the MMU - * both disabled and enabled (the offset is calculated automatically). */ ENTRY(lookup_processor_type) - adr x1, __lookup_processor_type_data - ldp x2, x3, [x1] - sub x1, x1, x2 // get offset between VA and PA - add x3, x3, x1 // convert VA to PA + adr_l x3, cpu_table 1: ldp w5, w6, [x3] // load cpu_id_val and cpu_id_mask cbz w5, 2f // end of list? @@ -732,10 +726,3 @@ ENTRY(lookup_processor_type) mov x0, x3 ret ENDPROC(lookup_processor_type) - - .align 3 - .type __lookup_processor_type_data, %object -__lookup_processor_type_data: - .quad . - .quad cpu_table - .size __lookup_processor_type_data, . - __lookup_processor_type_data