From patchwork Mon Jan 8 15:38:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Morse X-Patchwork-Id: 10149891 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1B665602CA for ; Mon, 8 Jan 2018 15:58:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22A3A28514 for ; Mon, 8 Jan 2018 15:58:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16E8F2879C; Mon, 8 Jan 2018 15:58:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9C53C286E1 for ; Mon, 8 Jan 2018 15:58:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=JhloMCDr8RGlyaBBKSJZvZbnaBHQRWsnFbv+rWSIjmE=; b=TaS/exbLVfPAaYpv9UnBcY/ibu VlpOb0DQvOM0U2aSD1a3hJYnX8UgiynujhKl9iiZuvCfdHcXsk1LVGgHmOeitjqC6lKrhOd22AX/9 T3vrEH3qsT4NJaPNWCm5yHrFZqk3CkNrSeM/n0WYE0b17eTUzxqop/Tizja2uA8lBK5GKMPelmCN3 lLmhRp4Bce1whjSm/aD7W7ijFjleAbuYSAcN6yU8G4rjcai4aHJwQo2LcHYgWWUz4RHFgk/SP0gQK Fh0kcr+TopAzs1ZSqxs7ykFYVyrFYWUZbwGgVDERq8JPpu7dA5wfupaWBY7vquz7/F6rKRSCMrNnT zEENZnWA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYZoj-0008WG-ID; Mon, 08 Jan 2018 15:58:29 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYZnZ-0007QE-0Z for linux-arm-kernel@bombadil.infradead.org; Mon, 08 Jan 2018 15:57:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=OuTEY+Ww6gdLF/M8XAdjxTY/B5a/7KvbPPZKQSqXPrg=; b=saxikbq0X4fOAiF2x21srAOQ/ YIVR5BTcxW3ifL9P4owtNGjEUaagM0oJDhlflcEGCrqJjAJVLdydxTv1UU9NApPhMEFFYoKK74ExI buvplFUnxrMpUuimri8r6R1HpbQvr6PztaMHVVH+NkehhWArxm0JUmu+03y3/p0kZIkVfm+3BDHnU O0GZyno4KT+qS7EjvJgWpRJZoMlXenspLhIbIN95KNmojMOsqR+2eFD8dh1tdA808RfQFuKKosgdH WBVYGmsEcgvttJyu1+nuibNVjtbrguWDgUZY+AsAAKNGxs3Bpg5SC92ZJNDxS2iU+mxM+QttB3ErX KVjU3IVwA==; Received: from foss.arm.com ([217.140.101.70]) by casper.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYZYF-0000DV-Kd for linux-arm-kernel@lists.infradead.org; Mon, 08 Jan 2018 15:41:29 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 636091529; Mon, 8 Jan 2018 07:41:27 -0800 (PST) Received: from melchizedek.cambridge.arm.com (melchizedek.cambridge.arm.com [10.1.207.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B43703F581; Mon, 8 Jan 2018 07:41:24 -0800 (PST) From: James Morse To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v6 15/16] arm64: mmu: add the entry trampolines start/end section markers into sections.h Date: Mon, 8 Jan 2018 15:38:17 +0000 Message-Id: <20180108153818.22743-16-james.morse@arm.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20180108153818.22743-1-james.morse@arm.com> References: <20180108153818.22743-1-james.morse@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180108_154127_821622_86504227 X-CRM114-Status: GOOD ( 10.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Lorenzo Pieralisi , Marc Zyngier , Catalin Marinas , Will Deacon , Rob Herring , Loc Ho , Heyi Guo , kvmarm@lists.cs.columbia.edu, Christoffer Dall MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP SDEI needs to calculate an offset in the trampoline page too. Move the extern char[] to sections.h. This patch just moves code around. Signed-off-by: James Morse --- (fixed typo in commit message) arch/arm64/include/asm/sections.h | 1 + arch/arm64/mm/mmu.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/sections.h b/arch/arm64/include/asm/sections.h index 941267caa39c..caab039d6305 100644 --- a/arch/arm64/include/asm/sections.h +++ b/arch/arm64/include/asm/sections.h @@ -28,5 +28,6 @@ extern char __initdata_begin[], __initdata_end[]; extern char __inittext_begin[], __inittext_end[]; extern char __irqentry_text_start[], __irqentry_text_end[]; extern char __mmuoff_data_start[], __mmuoff_data_end[]; +extern char __entry_tramp_text_start[], __entry_tramp_text_end[]; #endif /* __ASM_SECTIONS_H */ diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 916d9ced1c3f..9d21835c99d9 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -528,8 +528,6 @@ early_param("rodata", parse_rodata); #ifdef CONFIG_UNMAP_KERNEL_AT_EL0 static int __init map_entry_trampoline(void) { - extern char __entry_tramp_text_start[]; - pgprot_t prot = rodata_enabled ? PAGE_KERNEL_ROX : PAGE_KERNEL_EXEC; phys_addr_t pa_start = __pa_symbol(__entry_tramp_text_start);