From patchwork Sun Mar 9 17:00:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Salter X-Patchwork-Id: 25944 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f70.google.com (mail-pb0-f70.google.com [209.85.160.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B06EA206A6 for ; Sun, 9 Mar 2014 17:01:07 +0000 (UTC) Received: by mail-pb0-f70.google.com with SMTP id rp16sf15864623pbb.5 for ; Sun, 09 Mar 2014 10:01:06 -0700 (PDT) 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=dTBm2bwj8hF9DXV/WIdKqLbSZRvC1ejCCVxDes9Wuxa4F1NR39xxESP7r+3DH8LmRu piV1f8HnpBqiUGAE2GFWW5NK1YpnxxCDMLjZZYAYZAWmQlGyUl4BnxkmbuIEYTS0dDuA izYaQTimVeKny2U2WDjoBIMRlDVQhZM7ULb8qNoREQMg3g7mdMB/15hr2GLjMtvxWFKw EERS68GnhIEqOOwqW8HMcnLO3IkjHGw8HEn4kXUyakdp1idqIQJDR08wUhOL1FrfjCvu Hhy4/IzUuHEWyIu9U49p6K8e+n2A3NwoPwpkX27tTRT0kKNCt7AY5pf7VKMVxmCtcMwG hehA== X-Gm-Message-State: ALoCoQm6EB3g3ULyt9LO+JvuFs2RWinfh1POPZ3Dyg4U+S0bk15IkoNj9Rto/yn2IjAmB1Hdyi8/ X-Received: by 10.66.122.69 with SMTP id lq5mr12621349pab.17.1394384466963; Sun, 09 Mar 2014 10:01:06 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.81.209 with SMTP id f75ls1924205qgd.48.gmail; Sun, 09 Mar 2014 10:01:06 -0700 (PDT) X-Received: by 10.52.171.68 with SMTP id as4mr19722302vdc.0.1394384466782; Sun, 09 Mar 2014 10:01:06 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id x3si3965232vcn.9.2014.03.09.10.01.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 09 Mar 2014 10:01:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id la4so2696696vcb.3 for ; Sun, 09 Mar 2014 10:01:06 -0700 (PDT) X-Received: by 10.220.164.80 with SMTP id d16mr18833343vcy.15.1394384466634; Sun, 09 Mar 2014 10:01:06 -0700 (PDT) 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.78.9 with SMTP id i9csp68970vck; Sun, 9 Mar 2014 10:01:06 -0700 (PDT) X-Received: by 10.224.22.147 with SMTP id n19mr1436363qab.93.1394384466072; Sun, 09 Mar 2014 10:01:06 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTP id f67si8207130qgf.46.2014.03.09.10.01.05 for ; Sun, 09 Mar 2014 10:01:06 -0700 (PDT) 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-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s29H11Lg015171 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 9 Mar 2014 13:01:01 -0400 Received: from deneb.redhat.com (ovpn-113-45.phx2.redhat.com [10.3.113.45]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s29H0rcC030039; Sun, 9 Mar 2014 13:01:00 -0400 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 v6 4/6] arm64: initialize pgprot info earlier in boot Date: Sun, 9 Mar 2014 13:00:42 -0400 Message-Id: <1394384444-23182-5-git-send-email-msalter@redhat.com> In-Reply-To: <1394384444-23182-1-git-send-email-msalter@redhat.com> References: <1394384444-23182-1-git-send-email-msalter@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 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.220.172 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(); /*