From patchwork Tue Mar 4 20:08:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Salter X-Patchwork-Id: 25715 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 80A6F206F9 for ; Tue, 4 Mar 2014 20:09:23 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id w5sf68583qac.4 for ; Tue, 04 Mar 2014 12:09:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=RqSntSrByE2qvRHiAjElqTjhjzufjW1A7P78syL2uNU=; b=aRamJbMX9Du5UMKL6TyGocaXjXoXPonM1NM2dGxSQBP4xMvkQdJkrAkS4ReNkn4cqd 50RrW5/tEAr/ExAx6ydjX3kc1KP2UbUMxr5/BFM97tcfvbxLa9xXxRjoJmdswUPc76OS V9c57YNrruePfO6mvdqkPNX78GwDJxf9TYoRAksFnQzzshIhNQflfRG/bjsTcPblDxZs 3X5WBkrk9gjNwoxZVgHwYZenIMfL2L1vsTgCmCUoavan/NqfP9jhocRnAdyaefIkCFvJ WPUeWVl7/nfvAKvWD1QSWJzhZnO5NtL38axz53ObtH8G5cnBMtbPi6iGlYJICW6gc+51 TmNw== X-Gm-Message-State: ALoCoQlb2vQHLELwraUX++4MuPDaJhHcJ3o2iHLqsXDibnHHCsZ/KKKl/lCymcIHukAg/TD6jN8E X-Received: by 10.58.46.172 with SMTP id w12mr691943vem.24.1393963763256; Tue, 04 Mar 2014 12:09:23 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.33 with SMTP id c30ls14925qge.9.gmail; Tue, 04 Mar 2014 12:09:23 -0800 (PST) X-Received: by 10.52.89.230 with SMTP id br6mr974008vdb.20.1393963763147; Tue, 04 Mar 2014 12:09:23 -0800 (PST) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id tr5si4924276vdc.52.2014.03.04.12.09.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Mar 2014 12:09:23 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id cz12so32831veb.2 for ; Tue, 04 Mar 2014 12:09:22 -0800 (PST) X-Received: by 10.220.147.16 with SMTP id j16mr1122270vcv.28.1393963762787; Tue, 04 Mar 2014 12:09:22 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.130.193 with SMTP id u1csp151613vcs; Tue, 4 Mar 2014 12:09:22 -0800 (PST) X-Received: by 10.140.41.74 with SMTP id y68mr1714863qgy.105.1393963762273; Tue, 04 Mar 2014 12:09:22 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTP id f67si8529783qgf.196.2014.03.04.12.09.21 for ; Tue, 04 Mar 2014 12:09:22 -0800 (PST) Received-SPF: pass (google.com: domain of msalter@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s24K9HsW011585 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 4 Mar 2014 15:09:17 -0500 Received: from deneb.redhat.com (ovpn-113-45.phx2.redhat.com [10.3.113.45]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s24K9Aih021187; Tue, 4 Mar 2014 15:09:16 -0500 From: Mark Salter To: Catalin Marinas Cc: Mark Salter , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, patches@linaro.org Subject: [PATCH 4/5] arm64: initialize pgprot info earlier in boot Date: Tue, 4 Mar 2014 15:08:57 -0500 Message-Id: <1393963738-9210-5-git-send-email-msalter@redhat.com> In-Reply-To: <1393963738-9210-1-git-send-email-msalter@redhat.com> References: <1393963738-9210-1-git-send-email-msalter@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: msalter@redhat.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Presently, paging_init() calls init_mem_pgprot() to initialize pgprot values used by macros such as PAGE_KERNEL, PAGE_KERNEL_EXEC, etc. The new fixmap and early_ioremap support also needs to use these macros before paging_init() is called. This patch moves the init_mem_pgprot() call out of paging_init() and into setup_arch() so that pgprot_default gets initialized in time for fixmap and early_ioremap. Signed-off-by: Mark Salter Acked-by: Catalin Marinas --- arch/arm64/include/asm/mmu.h | 1 + arch/arm64/kernel/setup.c | 2 ++ arch/arm64/mm/mmu.c | 3 +-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h index 2494fc0..f600d40 100644 --- a/arch/arm64/include/asm/mmu.h +++ b/arch/arm64/include/asm/mmu.h @@ -27,5 +27,6 @@ typedef struct { extern void paging_init(void); extern void setup_mm_for_reboot(void); extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt); +extern void init_mem_pgprot(void); #endif diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index c8e9eff..1c66cfb 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -327,6 +327,8 @@ void __init setup_arch(char **cmdline_p) *cmdline_p = boot_command_line; + init_mem_pgprot(); + parse_early_param(); arm64_memblock_init(); diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index f8dc7e8..ba259a0 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -125,7 +125,7 @@ early_param("cachepolicy", early_cachepolicy); /* * Adjust the PMD section entries according to the CPU in use. */ -static void __init init_mem_pgprot(void) +void __init init_mem_pgprot(void) { pteval_t default_pgprot; int i; @@ -357,7 +357,6 @@ void __init paging_init(void) { void *zero_page; - init_mem_pgprot(); map_mem(); /*