From patchwork Wed Mar 30 15:43:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 8699111 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 51702C0553 for ; Wed, 30 Mar 2016 15:52:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 711BC2037F for ; Wed, 30 Mar 2016 15:52:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3FEA320379 for ; Wed, 30 Mar 2016 15:52:31 +0000 (UTC) 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 1alIOa-0005me-1z; Wed, 30 Mar 2016 15:51:00 +0000 Received: from mail-wm0-f48.google.com ([74.125.82.48]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1alIHT-0005Vo-7V for linux-arm-kernel@lists.infradead.org; Wed, 30 Mar 2016 15:43:58 +0000 Received: by mail-wm0-f48.google.com with SMTP id r72so105178362wmg.0 for ; Wed, 30 Mar 2016 08:43:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XaDtBwrXhf5NfPoCryXXjNWqPglvtIswdBwR1qnW1T8=; b=UQzd1srFZbyzLmf7upbaPTe14ctyTmEr7Jk/1obiKaRU2x9MJyjxIMKOPCccJbpkdg MU69sQTLs4d2wwL1GFi5pN0y0Ybm8xjhEGt0sSBmNKXK+AtRx3cSTF8P1afgUHnhtfQE c9Bul12hCcAs3pwGiHEt3AJusPwP4PsJjZW94= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XaDtBwrXhf5NfPoCryXXjNWqPglvtIswdBwR1qnW1T8=; b=at66apOauogkHYbpb22bcxMgFYA1g+wCV55/H5TUVft/tKCbzMCCqiak6euyaPmdBg B0Dib/ns9kYBKgQ8EvNoRygIfumw+bNOwIxQ8MWdFmNsP3ELU3hEzOXgcmvwNtk5itLo u8ooEd9hTk/9KO/5he8CeLTCOH1a4lvFnajcj8fCpGi0utagXdVIICqmrFI6x0xvn91M aZRlYrUIt/9ER+/MV8vIx7oc3Vc5w8WpXyC/gPduB+Q3I+5XztuXlSXkP/D9IGuL5XTz MqkA81lWY8yPphFnV7ahsibN5ZPGViRjI4TYZl4c7Dpm86+OZ/viQbEYLqO4n1LRWeTy b7pA== X-Gm-Message-State: AD7BkJIkuytJ+RVdRaIX64+L5OkA3JKWcJtCHBE+y5I/vG+0nPjcKrBoSilyL1gpw5Se5MHg X-Received: by 10.28.45.132 with SMTP id t126mr10490790wmt.86.1459352596096; Wed, 30 Mar 2016 08:43:16 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id h7sm20330403wmf.9.2016.03.30.08.43.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 30 Mar 2016 08:43:15 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will.deacon@arm.com, mark.rutland@arm.com, jeremy.linton@arm.com Subject: [PATCH v2 1/4] arm64: use 'segment' rather than 'chunk' to describe mapped kernel regions Date: Wed, 30 Mar 2016 17:43:06 +0200 Message-Id: <1459352589-28721-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1459352589-28721-1-git-send-email-ard.biesheuvel@linaro.org> References: <1459352589-28721-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160330_084340_293984_0F088A51 X-CRM114-Status: GOOD ( 12.20 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Replace the poorly defined term chunk with segment, which is a term that is already used by the ELF spec to describe contiguous mappings with the same permission attributes of statically allocated ranges of an executable. Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland --- arch/arm64/mm/mmu.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index f3e5c74233f3..9be2065f8ddb 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -471,8 +471,8 @@ void fixup_init(void) unmap_kernel_range((u64)__init_begin, (u64)(__init_end - __init_begin)); } -static void __init map_kernel_chunk(pgd_t *pgd, void *va_start, void *va_end, - pgprot_t prot, struct vm_struct *vma) +static void __init map_kernel_segment(pgd_t *pgd, void *va_start, void *va_end, + pgprot_t prot, struct vm_struct *vma) { phys_addr_t pa_start = __pa(va_start); unsigned long size = va_end - va_start; @@ -499,11 +499,11 @@ static void __init map_kernel(pgd_t *pgd) { static struct vm_struct vmlinux_text, vmlinux_rodata, vmlinux_init, vmlinux_data; - map_kernel_chunk(pgd, _stext, __start_rodata, PAGE_KERNEL_EXEC, &vmlinux_text); - map_kernel_chunk(pgd, __start_rodata, _etext, PAGE_KERNEL, &vmlinux_rodata); - map_kernel_chunk(pgd, __init_begin, __init_end, PAGE_KERNEL_EXEC, - &vmlinux_init); - map_kernel_chunk(pgd, _data, _end, PAGE_KERNEL, &vmlinux_data); + map_kernel_segment(pgd, _stext, __start_rodata, PAGE_KERNEL_EXEC, &vmlinux_text); + map_kernel_segment(pgd, __start_rodata, _etext, PAGE_KERNEL, &vmlinux_rodata); + map_kernel_segment(pgd, __init_begin, __init_end, PAGE_KERNEL_EXEC, + &vmlinux_init); + map_kernel_segment(pgd, _data, _end, PAGE_KERNEL, &vmlinux_data); if (!pgd_val(*pgd_offset_raw(pgd, FIXADDR_START))) { /*