From patchwork Wed Mar 4 11:23:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 45409 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 5ABB121486 for ; Wed, 4 Mar 2015 11:28:21 +0000 (UTC) Received: by lbiv13 with SMTP id v13sf16753087lbi.1 for ; Wed, 04 Mar 2015 03:28:20 -0800 (PST) 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=8WTeJyZHam86mxKVDHEzMOQ6KOx7/MlWpGwgmqWDZnU=; b=DdOgPAf6qt3DzOiuc76dnn/0YO0yJVDM4zxd9EfqyNcj+JLv+dyUKlaboekWLaBw/v s3KTm/Qf/4bsRCT4m4CFMT0ppJxWdCfGpmpPHh9MpkBIOxSnlzqbznimmwgXacY+vucL JSpO7kvOzn5uBCKtrqufaMVB8xofx36GHxWycmi3fz6MfS3UeZ/eQwFZ8TuhB3/vLYWR LNKFdi9ZZpgp7IpvYO3jWisH7b+zv37jGKAAleBOKJi7sqsus1d+7meCOgQDFyOCppxb kl4kncdymWcQMxnZ3zzQpcNfoRw7p6tRoBXWLzWHXYMZ5zcElZMV3Ctalf0tpfP6eUDX nV0Q== X-Gm-Message-State: ALoCoQl0cSSTMp0Y6B77r8DS7ZYGv/ufVdijIvu1mgsHSyr9jB0Dhb4/de+zkQxj4c48JpUVE89w X-Received: by 10.112.222.131 with SMTP id qm3mr564714lbc.1.1425468500244; Wed, 04 Mar 2015 03:28:20 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.4.5 with SMTP id ca5ls149026lad.96.gmail; Wed, 04 Mar 2015 03:28:20 -0800 (PST) X-Received: by 10.152.225.167 with SMTP id rl7mr3066321lac.54.1425468500107; Wed, 04 Mar 2015 03:28:20 -0800 (PST) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id e8si2281218lae.135.2015.03.04.03.28.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2015 03:28:20 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbvp9 with SMTP id p9so8357736lbv.10 for ; Wed, 04 Mar 2015 03:28:20 -0800 (PST) X-Received: by 10.112.162.167 with SMTP id yb7mr2922337lbb.76.1425468499993; Wed, 04 Mar 2015 03:28:19 -0800 (PST) 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 h5csp1156668lbj; Wed, 4 Mar 2015 03:28:19 -0800 (PST) X-Received: by 10.70.91.75 with SMTP id cc11mr6053089pdb.150.1425468498179; Wed, 04 Mar 2015 03:28:18 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id h3si4687981pdi.120.2015.03.04.03.28.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2015 03:28:18 -0800 (PST) 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 1YT7Rq-0002it-Jr; Wed, 04 Mar 2015 11:26:42 +0000 Received: from mail-we0-f180.google.com ([74.125.82.180]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YT7P7-0000CS-Ik for linux-arm-kernel@lists.infradead.org; Wed, 04 Mar 2015 11:23:54 +0000 Received: by wesw55 with SMTP id w55so45611811wes.4 for ; Wed, 04 Mar 2015 03:23:31 -0800 (PST) X-Received: by 10.194.239.65 with SMTP id vq1mr6861653wjc.98.1425468211014; Wed, 04 Mar 2015 03:23:31 -0800 (PST) Received: from ards-macbook-pro.local ([213.143.61.51]) by mx.google.com with ESMTPSA id q10sm3965332wjr.41.2015.03.04.03.23.29 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Mar 2015 03:23:30 -0800 (PST) From: Ard Biesheuvel To: catalin.marinas@arm.com, will.deacon@arm.com, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/3] arm64: remove __lookup_processor_type_data object from head.S Date: Wed, 4 Mar 2015 12:23:17 +0100 Message-Id: <1425468197-22377-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1425468197-22377-1-git-send-email-ard.biesheuvel@linaro.org> References: <1425468197-22377-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150304_032353_818643_C229DDA0 X-CRM114-Status: UNSURE ( 8.61 ) 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.180 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.180 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -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.217.174 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 use with a simple PC-relative address load. Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/head.S | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index e6216b56257a..89444070f96b 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -714,15 +714,10 @@ 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 + adrp x3, cpu_table + add x3, x3, :lo12:cpu_table 1: ldp w5, w6, [x3] // load cpu_id_val and cpu_id_mask cbz w5, 2f // end of list? @@ -737,10 +732,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