From patchwork Fri May 27 09:09:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 823362 Received: from bombadil.infradead.org (173-166-109-252-newengland.hfc.comcastbusiness.net [173.166.109.252]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4R9Fq78030990 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 27 May 2011 09:16:13 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QPt3a-0008OS-9p; Fri, 27 May 2011 09:10:10 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QPt3W-0000ud-4N; Fri, 27 May 2011 09:10:06 +0000 Received: from service87.mimecast.com ([94.185.240.25]) by canuck.infradead.org with smtp (Exim 4.76 #1 (Red Hat Linux)) id 1QPt3S-0000uI-BJ for linux-arm-kernel@lists.infradead.org; Fri, 27 May 2011 09:10:03 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 27 May 2011 10:09:59 +0100 Received: from e102109-lin.cambridge.arm.com ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 27 May 2011 10:10:08 +0100 Date: Fri, 27 May 2011 10:09:49 +0100 From: Catalin Marinas To: Russell King - ARM Linux Subject: Re: [PATCH v5 00/19] ARM: Add support for the Large Physical Address Extensions Message-ID: <20110527090948.GB21100@e102109-lin.cambridge.arm.com> References: <1304859098-10760-1-git-send-email-catalin.marinas@arm.com> <20110523165412.GF15138@n2100.arm.linux.org.uk> <1306231448.19557.23.camel@e102109-lin.cambridge.arm.com> <20110526214449.GK24876@n2100.arm.linux.org.uk> MIME-Version: 1.0 In-Reply-To: <20110526214449.GK24876@n2100.arm.linux.org.uk> User-Agent: Mutt/1.5.20 (2009-06-14) X-OriginalArrivalTime: 27 May 2011 09:10:08.0159 (UTC) FILETIME=[DFE99AF0:01CC1C4D] X-MC-Unique: 111052710095901601 Content-Disposition: inline X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110527_051002_605966_17176AE5 X-CRM114-Status: GOOD ( 21.56 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [94.185.240.25 listed in list.dnswl.org] Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 27 May 2011 09:16:13 +0000 (UTC) On Thu, May 26, 2011 at 10:44:49PM +0100, Russell King - ARM Linux wrote: > On Thu, May 26, 2011 at 10:15:49PM +0100, Catalin Marinas wrote: > > On 24 May 2011 11:04, Catalin Marinas wrote: > > > On Mon, 2011-05-23 at 17:54 +0100, Russell King - ARM Linux wrote: > > >> FYI, I'm going to drop the pgt patch because the warnings are still there > > > > I'd like to fix those warning but I can't reproduce them (maybe > > different compiler versions?). > > They're certainly not compiler version dependent (or if they are, your > compiler is broken). It'll probably be because you're building for > SMP, in which case the affected code is not built: OK. Since the smp-on-up feature I don't check UP builds regularly. > arch/arm/mm/ioremap.c: In function unmap_area_sections: > arch/arm/mm/ioremap.c:86: warning: passing argument 1 of pmd_offset from > incompatible pointer type > arch/arm/mm/ioremap.c: In function remap_area_sections: > arch/arm/mm/ioremap.c:136: warning: passing argument 1 of pmd_offset from > incompatible pointer type > arch/arm/mm/ioremap.c: In function remap_area_supersections: > arch/arm/mm/ioremap.c:173: warning: passing argument 1 of pmd_offset from > incompatible pointer type The patch below fixes the warnings. Tested on VE in UP configuration. Later we can change the loops to walking the pmd using PMD_SIZE for consistency with the LPAE patches where we consider PMD to be the section in both cases. There is no functional change since the pmd is folded into pud which is folded into the pgd and PMD_SIZE == PGDIR_SIZE with the classic page tables. diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index ab50627..0da0091 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c @@ -83,7 +83,8 @@ static void unmap_area_sections(unsigned long virt, unsigned long size) flush_cache_vunmap(addr, end); pgd = pgd_offset_k(addr); do { - pmd_t pmd, *pmdp = pmd_offset(pgd, addr); + pud_t *pud = pud_offset(pgd, addr); + pmd_t pmd, *pmdp = pmd_offset(pud, addr); pmd = *pmdp; if (!pmd_none(pmd)) { @@ -133,7 +134,8 @@ remap_area_sections(unsigned long virt, unsigned long pfn, pgd = pgd_offset_k(addr); do { - pmd_t *pmd = pmd_offset(pgd, addr); + pud_t *pud = pud_offset(pgd, addr); + pmd_t *pmd = pmd_offset(pud, addr); pmd[0] = __pmd(__pfn_to_phys(pfn) | type->prot_sect); pfn += SZ_1M >> PAGE_SHIFT; @@ -170,7 +172,8 @@ remap_area_supersections(unsigned long virt, unsigned long pfn, super_pmd_val |= ((pfn >> (32 - PAGE_SHIFT)) & 0xf) << 20; for (i = 0; i < 8; i++) { - pmd_t *pmd = pmd_offset(pgd, addr); + pud_t *pud = pud_offset(pgd, addr); + pmd_t *pmd = pmd_offset(pud, addr); pmd[0] = __pmd(super_pmd_val); pmd[1] = __pmd(super_pmd_val);