From patchwork Wed Mar 4 19:11:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 45443 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 464C42055F for ; Wed, 4 Mar 2015 19:15:31 +0000 (UTC) Received: by lbiz11 with SMTP id z11sf15269464lbi.2 for ; Wed, 04 Mar 2015 11:15:30 -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=VZWas9RhfpFFeImqtSR2PEK0BNPNptoVabXtaxj9JjI=; b=Jx1Y7frD5RjJhCXql3lgELeMPym3WKueksHQT7XILO5b6olBQFuO/j9O6SWrWHjBsb 1XwB2jqJ7Q9djnYbI1OtWukxrbgsu68U3DJ3m9uCAdl/+GB+l1gRp9vOpJCb5skGGR7Q t4VQYIjfz9N1JG3OqrluZQpiAQznM40IIYisYUsN4jzA3yzP2CjhwD6me7YKYAirQ8FU eOq2vuO/RM02xUSOsHJEj6gKSyj4BCgyqI91sjx6i4zyUTzusqdTgOGHjbLuxTjqZa3F Vmu6JaA+uQt582NdW+IYS0L+0ZHLpAw7rz8ehyBtTmJz4bts84dQzW6gzyPS3/U8aoTA /wDQ== X-Gm-Message-State: ALoCoQm9aR3lZ15drIZHlPbwWYDhuzI1w4C+86Jl6OeSOkwOXLfMQc9hrUwT5RSqUNY7SK1yP6HT X-Received: by 10.152.6.232 with SMTP id e8mr946563laa.2.1425496530258; Wed, 04 Mar 2015 11:15:30 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.197.2 with SMTP id iq2ls224518lac.100.gmail; Wed, 04 Mar 2015 11:15:30 -0800 (PST) X-Received: by 10.112.201.69 with SMTP id jy5mr4982115lbc.78.1425496530110; Wed, 04 Mar 2015 11:15:30 -0800 (PST) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id q3si1437600lag.1.2015.03.04.11.15.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2015 11:15:30 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbiw7 with SMTP id w7so7154541lbi.7 for ; Wed, 04 Mar 2015 11:15:30 -0800 (PST) X-Received: by 10.152.1.135 with SMTP id 7mr4732726lam.41.1425496530021; Wed, 04 Mar 2015 11:15:30 -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 h5csp32373lbj; Wed, 4 Mar 2015 11:15:29 -0800 (PST) X-Received: by 10.70.46.230 with SMTP id y6mr9392573pdm.96.1425496529016; Wed, 04 Mar 2015 11:15:29 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id id10si1150475pbc.99.2015.03.04.11.15.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2015 11:15:29 -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 1YTEjI-0006OZ-LC; Wed, 04 Mar 2015 19:13:12 +0000 Received: from mail-wi0-f174.google.com ([209.85.212.174]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YTEiH-0005gM-Iq for linux-arm-kernel@lists.infradead.org; Wed, 04 Mar 2015 19:12:10 +0000 Received: by wivr20 with SMTP id r20so1444427wiv.3 for ; Wed, 04 Mar 2015 11:11:46 -0800 (PST) X-Received: by 10.180.98.131 with SMTP id ei3mr15477533wib.62.1425496306011; Wed, 04 Mar 2015 11:11:46 -0800 (PST) Received: from ards-macbook-pro.local ([213.143.60.151]) by mx.google.com with ESMTPSA id ch6sm7224104wjc.3.2015.03.04.11.11.44 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Mar 2015 11:11:45 -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 v3 4/4] arm64: remove __lookup_processor_type_data, object from head.S Date: Wed, 4 Mar 2015 20:11:28 +0100 Message-Id: <1425496288-14483-5-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1425496288-14483-1-git-send-email-ard.biesheuvel@linaro.org> References: <1425496288-14483-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_111209_837014_53097644 X-CRM114-Status: UNSURE ( 8.07 ) 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.174 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.174 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.217.171 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