From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Wed, 20 Aug 2014 13:15:15 -0600 Subject: [U-Boot] [PATCH 2/9] ARM: cache-cp15: Use unsigned long for address and size In-Reply-To: <1408348852-30894-3-git-send-email-thierry.reding@gmail.com> References: <1408348852-30894-1-git-send-email-thierry.reding@gmail.com> <1408348852-30894-3-git-send-email-thierry.reding@gmail.com> Message-ID: <53F4F3C3.4000809@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 08/18/2014 02:00 AM, Thierry Reding wrote: > From: Thierry Reding > > size is always non-negative, so it should be unsigned, whereas the > address and size can be larger than 32 bit on 64-bit architectures. > Change the mmu_set_region_dcache_behaviour() to use these types in > anticipation of making the API available on other architectures. > diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h > -void mmu_set_region_dcache_behaviour(u32 start, int size, > +void mmu_set_region_dcache_behaviour(unsigned long start, unsigned long size, > enum dcache_option option); If we were to use LPAE on a 32-bit system, physical addresses could be more than 32-bit. That would imply we should create a physaddr_t type rather than relying on unsigned long. Still, I suppose since U-Boot just maps RAM (and everything else) 1:1, we'd never use RAM beyond 4GiB, so LPAE actually isn't that interesting...