From patchwork Wed Jul 13 01:14:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 647682 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rq1GQ4wrKz9sds for ; Wed, 13 Jul 2016 11:19:58 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=xH1otWLA; dkim-atps=neutral Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3rq1GQ3pzQzDqK1 for ; Wed, 13 Jul 2016 11:19:58 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=xH1otWLA; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-yw0-x243.google.com (mail-yw0-x243.google.com [IPv6:2607:f8b0:4002:c05::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rq19F4N3VzDqH0 for ; Wed, 13 Jul 2016 11:15:29 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=xH1otWLA; dkim-atps=neutral Received: by mail-yw0-x243.google.com with SMTP id y188so2167644ywf.3 for ; Tue, 12 Jul 2016 18:15:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5MK+nVAhkJNUG8xwVFhBST1hUVIqeEzwkv5bmBVGy8E=; b=xH1otWLAifxLW3oZujYX+0fo6v0gVaJz7zxQ/Sixgvp2DL8WkZpHSNSplBeQ+/aoYJ OJLgJ7E2RCy53Z1OFZB9TGH6tSzSV+cuf2nRFZveWltpGixV/rE9mxCrq7Efde1pBhAE WY6XBEUxgEE/E29W/TxwdWr7m3bSGjCVKlEf6i58XYlRykGeUSJv2f+O5HmMn0FU1HsH DW8p63bVa8FdhO4yFBL5p/+iSTgVPYCrebzr9rP3TnuZC7BNLk99yY9/hmrpFmiW/hp9 k3BWHXw+JAdRfcalq3xnqYe3/WE0AQ4Sp6qr1ONUsV79/SX/DYj/SHcekwFWfDTQZqi4 6ZSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5MK+nVAhkJNUG8xwVFhBST1hUVIqeEzwkv5bmBVGy8E=; b=VtVfFRF57EXUqYzen5YNsPJj6GNKTn8TyeraRaaMkqrmwDoMaiNd1PYXRD90Sp2PQ5 gdPQYoKVnfegV0RC/kb23inOaQQcSr8Qib580wowgFjb4dZ9ZV2NQSRXmvP2mlGWcusj DVTj2ikDiACyvhD6NzG8W6AtKHIKXKAHOfO9SStcBxHHD+pmmsEVzrfohjYEgs2niafD Do89VPmUrgGS27rT9cClJDf06enUyJ4DUXTcsL08LI/jKelTu1RyJaX1PFuicjQaSQw7 9WTkLuyETczNR/VjxxX6ce1XFpLobNTAfjUqVVoKbDOey8dhQz0YUuTBEN+YZNAkX6Qa 7vew== X-Gm-Message-State: ALyK8tLdY+R+GOIb4d3kj0brsFbW/vt6VGDmAp9RQzQ8V3mLjMJuZHlryf4Ajkz0b2wxhQ== X-Received: by 10.13.213.3 with SMTP id x3mr4045218ywd.253.1468372527805; Tue, 12 Jul 2016 18:15:27 -0700 (PDT) Received: from pek-khao-d1.wrs.com ([106.120.101.38]) by smtp.gmail.com with ESMTPSA id n18sm8418830ywn.36.2016.07.12.18.15.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jul 2016 18:15:21 -0700 (PDT) From: Kevin Hao To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH v2 2/3] powerpc: merge the RELOCATABLE config entries for ppc32 and ppc64 Date: Wed, 13 Jul 2016 09:14:39 +0800 Message-Id: <1468372480-6453-3-git-send-email-haokexin@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1468372480-6453-1-git-send-email-haokexin@gmail.com> References: <1468372480-6453-1-git-send-email-haokexin@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Scott Wood , Paul Mackerras MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" It makes no sense to keep two separate RELOCATABLE config entries for ppc32 and ppc64 respectively. Merge them into one and move it to a common place. Signed-off-by: Kevin Hao --- arch/powerpc/Kconfig | 65 ++++++++++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 38 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index cb7910b9f10f..a9d847c8a20d 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -458,6 +458,33 @@ config KEXEC interface is strongly in flux, so no good recommendation can be made. +config RELOCATABLE + bool "Build a relocatable kernel" + depends on (PPC64 && !COMPILE_TEST) || (FLATMEM && (44x || FSL_BOOKE)) + select NONSTATIC_KERNEL + help + This builds a kernel image that is capable of running at the + location the kernel is loaded at. For ppc32, there is no any + alignment restrictions, and this feature is a superset of + DYNAMIC_MEMSTART and hence overrides it. For ppc64, we should use + 16k-aligned base address. The kernel is linked as a + position-independent executable (PIE) and contains dynamic relocations + which are processed early in the bootup process. + + One use is for the kexec on panic case where the recovery kernel + must live at a different physical address than the primary + kernel. + + Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address + it has been loaded at and the compile time physical addresses + CONFIG_PHYSICAL_START is ignored. However CONFIG_PHYSICAL_START + setting can still be useful to bootwrappers that need to know the + load address of the kernel (eg. u-boot/mkimage). + +config RELOCATABLE_PPC32 + def_bool y + depends on PPC32 && RELOCATABLE + config CRASH_DUMP bool "Build a kdump crash kernel" depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP) @@ -950,29 +977,6 @@ config DYNAMIC_MEMSTART This option is overridden by CONFIG_RELOCATABLE -config RELOCATABLE - bool "Build a relocatable kernel" - depends on FLATMEM && (44x || FSL_BOOKE) - select NONSTATIC_KERNEL - help - This builds a kernel image that is capable of running at the - location the kernel is loaded at, without any alignment restrictions. - This feature is a superset of DYNAMIC_MEMSTART and hence overrides it. - - One use is for the kexec on panic case where the recovery kernel - must live at a different physical address than the primary - kernel. - - Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address - it has been loaded at and the compile time physical addresses - CONFIG_PHYSICAL_START is ignored. However CONFIG_PHYSICAL_START - setting can still be useful to bootwrappers that need to know the - load address of the kernel (eg. u-boot/mkimage). - -config RELOCATABLE_PPC32 - def_bool y - depends on PPC32 && RELOCATABLE - config PAGE_OFFSET_BOOL bool "Set custom page offset address" depends on ADVANCED_OPTIONS @@ -1063,21 +1067,6 @@ config PIN_TLB_IMMR endmenu if PPC64 -config RELOCATABLE - bool "Build a relocatable kernel" - depends on !COMPILE_TEST - select NONSTATIC_KERNEL - help - This builds a kernel image that is capable of running anywhere - in the RMA (real memory area) at any 16k-aligned base address. - The kernel is linked as a position-independent executable (PIE) - and contains dynamic relocations which are processed early - in the bootup process. - - One use is for the kexec on panic case where the recovery kernel - must live at a different physical address than the primary - kernel. - # This value must have zeroes in the bottom 60 bits otherwise lots will break config PAGE_OFFSET hex