Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 61226DE20A for ; Wed, 16 Apr 2008 01:24:09 +1000 (EST) Message-Id: <3AA4D778-0529-4DF0-B2EC-35EFC7896584@kernel.crashing.org> From: Kumar Gala To: Paul Mackerras In-Reply-To: <18436.35348.316368.332336@cargo.ozlabs.ibm.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: [PATCH 12/12] [POWERPC] 85xx: Add support for relocatble kernel (and booting at non-zero) Date: Tue, 15 Apr 2008 10:24:03 -0500 References: <1207824531-27168-1-git-send-email-galak@kernel.crashing.org> <1207824531-27168-2-git-send-email-galak@kernel.crashing.org> <1207824531-27168-3-git-send-email-galak@kernel.crashing.org> <1207824531-27168-4-git-send-email-galak@kernel.crashing.org> <1207824531-27168-5-git-send-email-galak@kernel.crashing.org> <1207824531-27168-6-git-send-email-galak@kernel.crashing.org> <1207824531-27168-7-git-send-email-galak@kernel.crashing.org> <1207824531-27168-8-git-send-email-galak@kernel.crashing.org> <1207824531-27168-9-git-send-email-galak@kernel.crashing.org> <1207824531-27168-10-git-send-email-galak@kernel.crashing.org> <1207824531-27168-11-git-send-email-galak@kernel.crashing.org> <1207824531-27168-12-git-send-email-galak@kernel.crashing.org> <1207824531-27168-13-git-send-email-galak@kernel.crashing.org> <18436.35348.316368.332336@cargo.ozlabs.ibm.com> Cc: linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Apr 15, 2008, at 5:57 AM, Paul Mackerras wrote: > Kumar Gala writes: > >> Added support to allow an 85xx kernel to be run from a non-zero >> physical >> address (useful for cooperative asymmetric multiprocessing >> situations) and >> kdump. The support can either be at compile time or runtime >> (CONFIG_RELOCATABLE). >> >> Currently we are limited to running at a physical address that is >> module >> 256M. This is due to how we map TLBs to cover lowmem and should be >> fixed >> up to allow 64M or maybe even 16M alignment in the future. > > The first 11 patches look pretty reasonable, but I think I want a bit > more time to digest this one. At the least it needs a bit more > description, saying for instance why you remove USER_PGD_PTRS and > KERNEL_PGD_PTRS (yes they are unused now but why does this patch need > to remove them?). No reason. I'll separate their removal into their own patch. > Also, given that we changed from using a > PPC_MEMSTART #define to a memstart_addr variable earlier in the patch > series, why do we need to change back to a #define (MEMORY_START) now? I re-introduced it because I wanted ARCH_PFN_OFFSET to be a compile time define if !CONFIG_RELOCATABLE I can easily move the ARCH_PFN_OFFSET define inside the CONFIG_RELOCATABLE ifdef. > I take it that with CONFIG_RELOCATABLE set, the kernel won't touch any > RAM below the point where it's loaded? that's correct. > Is CONFIG_PHYSICAL_START used > at all if CONFIG_RELOCATABLE is set, and if so what does it mean? its not used for anything but as a 'hint' for setting the physical address of the PHDR. > What happens if CONFIG_KERNEL_START != CONFIG_PAGE_OFFSET and the > kernel is loaded at some address != CONFIG_PHYSICAL_START? > Are we sure that ARCH_PFN_OFFSET only gets applied to normal memory > pages, not any I/O? What happens to /dev/mem when ARCH_PFN_OFFSET != > 0? I need to think on these two. > Also, since you're changing pmd_page(), it would be better to make it > use pfn_to_page or something similar rather than using mem_map + xxx. I'll change it to: pfn_to_page(__pa(pmd_val(pmd)) >> PAGE_SHIFT) (I'll move this into a cleanup patch with the removal of USER_PGD_PTRS and KERNEL_PGD_PTRS) - k