From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: Physical memory start contraints in the Linux kernel (Was: Re: Xen osstest on Calxeda midway progress (Was: Re: [Xen-devel] [xen-unstable test] 21486: tolerable FAIL - PUSHED)) Date: Tue, 12 Nov 2013 14:41:28 +0000 Message-ID: <20131112144128.GL16735@n2100.arm.linux.org.uk> References: <1384250005.1883.35.camel@kazak.uk.xensource.com> <201311121437.55826.arnd@arndb.de> <52823C9E.2010007@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <52823C9E.2010007@linaro.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Julien Grall Cc: Andre Przywara , Ian Campbell , Arnd Bergmann , Stefano Stabellini , "xen.org" , xen-devel@lists.xensource.com, Stefano Stabellini , Olof Johansson , linux-arm-kernel@lists.infradead.org List-Id: xen-devel@lists.xenproject.org On Tue, Nov 12, 2013 at 02:35:10PM +0000, Julien Grall wrote: > During some debugging on the Arndale and Midway, I found another > constraint with CONFIG_ARM_PATCH_PHYS_VIRT. > I have noticed that all the kernel physical addresses must be lower than > the corresponding virtual addresses. So the delta offset compute in > __fixup_pv_table (arch/arm/kernel/head.S) must always be negative. > If this assertion is not validated, when the kernel will browse the > memory bank (sanity_check_info in arch/arm/mm/mmu.c), __phys(...) will > compute a wrong address and will result to consider all memory bank as > highmem. > > After digging in the code, it seems it's due to some optimization during > opcode fixup in __fixup_a_pvtable. Is it a wanted constraint? Are you talking about the code in v3.12 or the code in -next ?