From patchwork Wed Feb 12 20:56:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Salter X-Patchwork-Id: 24559 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 E517820143 for ; Wed, 12 Feb 2014 20:57:17 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id w8sf19146039qac.4 for ; Wed, 12 Feb 2014 12:57:16 -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=QjlNdMYN/dcl2P2tY/moFNdj+2+xgRkoL+jkLrSP3qI=; b=YK0Ew5xGEsFcbX8NRzyKQf1X04KmcQOpWSp0EnGLl5PxqTsdVFcSQIYMBw7pR7ppkS 0FD6ux3um4reqJMHrd4IFsiYbL4LPlsbPDEius0O7Zlnx9X5FGOeF4ala9hYPXWrQjp9 gMS4Bbk4ublfBdsh1xVds4YzjdNHJaVFdI/AaqMkuAtwC4nr+mkkIbECsz7fI1/WnG/C lIybJzs1kZzWbzXwobea85niNDJIhJraJwf/oapJCq9rQMNjTw33vy1Hi0cZD+oratdC 2EHjEmBD8nLuvA8JRclarOXXGZ/xcCMmKoSZ7266NG0THPaqqPGAMbGJ1fw90u8l/wgU fg/Q== X-Gm-Message-State: ALoCoQkolq1X1vwMOfvzzZk82gwLk9V8GWbdmCd/tDCWQXhHR54Bj3rANDu/TxXJs5GhuPqM8TZN X-Received: by 10.58.38.137 with SMTP id g9mr2590719vek.6.1392238636806; Wed, 12 Feb 2014 12:57:16 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.37.135 with SMTP id r7ls3148203qgr.25.gmail; Wed, 12 Feb 2014 12:57:16 -0800 (PST) X-Received: by 10.52.167.73 with SMTP id zm9mr6515vdb.82.1392238636645; Wed, 12 Feb 2014 12:57:16 -0800 (PST) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by mx.google.com with ESMTPS id sq4si7747769vdc.119.2014.02.12.12.57.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 12:57:16 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.43; Received: by mail-vb0-f43.google.com with SMTP id p5so7592938vbn.30 for ; Wed, 12 Feb 2014 12:57:16 -0800 (PST) X-Received: by 10.59.1.102 with SMTP id bf6mr7935ved.69.1392238636553; Wed, 12 Feb 2014 12:57:16 -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.174.196 with SMTP id u4csp29974vcz; Wed, 12 Feb 2014 12:57:16 -0800 (PST) X-Received: by 10.224.34.71 with SMTP id k7mr71494263qad.15.1392238636020; Wed, 12 Feb 2014 12:57:16 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTP id s1si7154453qci.33.2014.02.12.12.57.15 for ; Wed, 12 Feb 2014 12:57:16 -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-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1CKvAQa011919 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 12 Feb 2014 15:57:11 -0500 Received: from deneb.redhat.com (ovpn-113-111.phx2.redhat.com [10.3.113.111]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s1CKuadE031530; Wed, 12 Feb 2014 15:57:08 -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 v4 5/6] arm64: initialize pgprot info earlier in boot Date: Wed, 12 Feb 2014 15:56:14 -0500 Message-Id: <1392238575-10000-6-git-send-email-msalter@redhat.com> In-Reply-To: <1392238575-10000-1-git-send-email-msalter@redhat.com> References: <1392238575-10000-1-git-send-email-msalter@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 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.212.43 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 --- 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(); /*