From patchwork Fri Aug 15 19:48:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geoff Levand X-Patchwork-Id: 4729321 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1DDD1C0338 for ; Fri, 15 Aug 2014 19:52:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1F434201F2 for ; Fri, 15 Aug 2014 19:52:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 05C1C201EF for ; Fri, 15 Aug 2014 19:52:39 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XINUb-0008Ex-Mv; Fri, 15 Aug 2014 19:48:53 +0000 Received: from 107-1-141-74-ip-static.hfc.comcastbusiness.net ([107.1.141.74] helo=[192.168.254.170]) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1XINUY-0008Ed-SM; Fri, 15 Aug 2014 19:48:50 +0000 Message-ID: <1408132130.22761.64.camel@smoke> Subject: [RFC] arm64: Add new cpu-return-addr device tree binding From: Geoff Levand To: Grant Likely , Rob Herring Date: Fri, 15 Aug 2014 12:48:50 -0700 X-Mailer: Evolution 3.10.4-0ubuntu1 Mime-Version: 1.0 Cc: Mark Rutland , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a new device tree binding cpu-return-addr. This binding is required for all ARM v8 CPUs that have an "enable-method" property value of "spin-table". The value is a 64 bit read-only physical address that secondary CPU execution will transfer to upon CPU shutdown. Signed-off-by: Geoff Levand --- Hi All, We currently have no way for arm64 spin-table CPUs to re-enter the spin table code, and some way to do so is needed to implement a hot-plug cpu_die() for these CPUs. I just wanted to get this binding patch out for review now. I have other patches that implement the spin-table hot-plug in my kexec repo [1]. Please consider. -Geoff [1] https://git.linaro.org/people/geoff.levand/linux-kexec.git Documentation/devicetree/bindings/arm/cpus.txt | 26 ++++++++++++++++++++++ Documentation/devicetree/bindings/arm/topology.txt | 16 +++++++++++++ 2 files changed, 42 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt index 1fe72a0..24b98a9 100644 --- a/Documentation/devicetree/bindings/arm/cpus.txt +++ b/Documentation/devicetree/bindings/arm/cpus.txt @@ -201,6 +201,16 @@ nodes to be present and contain the properties described below. property identifying a 64-bit zero-initialised memory location. + - cpu-return-addr + Usage: required for all ARM v8 CPUs that have an "enable-method" + property value of "spin-table". + Value type: + Definition: + # On ARM v8 64-bit systems must be a two cell property. + The value is a 64 bit read-only physical address that + secondary CPU execution will transfer to upon CPU + shutdown. + - qcom,saw Usage: required for systems that have an "enable-method" property value of "qcom,kpss-acc-v1" or @@ -285,6 +295,7 @@ cpus { reg = <0x0 0x0>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; cpu@1 { @@ -293,6 +304,7 @@ cpus { reg = <0x0 0x1>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; cpu@100 { @@ -301,6 +313,7 @@ cpus { reg = <0x0 0x100>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; cpu@101 { @@ -309,6 +322,7 @@ cpus { reg = <0x0 0x101>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; cpu@10000 { @@ -317,6 +331,7 @@ cpus { reg = <0x0 0x10000>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; cpu@10001 { @@ -325,6 +340,7 @@ cpus { reg = <0x0 0x10001>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; cpu@10100 { @@ -333,6 +349,7 @@ cpus { reg = <0x0 0x10100>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; cpu@10101 { @@ -341,6 +358,7 @@ cpus { reg = <0x0 0x10101>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; cpu@100000000 { @@ -349,6 +367,7 @@ cpus { reg = <0x1 0x0>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; cpu@100000001 { @@ -357,6 +376,7 @@ cpus { reg = <0x1 0x1>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; cpu@100000100 { @@ -365,6 +385,7 @@ cpus { reg = <0x1 0x100>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; cpu@100000101 { @@ -373,6 +394,7 @@ cpus { reg = <0x1 0x101>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; cpu@100010000 { @@ -381,6 +403,7 @@ cpus { reg = <0x1 0x10000>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; cpu@100010001 { @@ -389,6 +412,7 @@ cpus { reg = <0x1 0x10001>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; cpu@100010100 { @@ -397,6 +421,7 @@ cpus { reg = <0x1 0x10100>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; cpu@100010101 { @@ -405,6 +430,7 @@ cpus { reg = <0x1 0x10101>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; }; diff --git a/Documentation/devicetree/bindings/arm/topology.txt b/Documentation/devicetree/bindings/arm/topology.txt index 1061faf..29e2193 100644 --- a/Documentation/devicetree/bindings/arm/topology.txt +++ b/Documentation/devicetree/bindings/arm/topology.txt @@ -260,6 +260,7 @@ cpus { reg = <0x0 0x0>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; CPU1: cpu@1 { @@ -268,6 +269,7 @@ cpus { reg = <0x0 0x1>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; CPU2: cpu@100 { @@ -276,6 +278,7 @@ cpus { reg = <0x0 0x100>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; CPU3: cpu@101 { @@ -284,6 +287,7 @@ cpus { reg = <0x0 0x101>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; CPU4: cpu@10000 { @@ -292,6 +296,7 @@ cpus { reg = <0x0 0x10000>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; CPU5: cpu@10001 { @@ -300,6 +305,7 @@ cpus { reg = <0x0 0x10001>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; CPU6: cpu@10100 { @@ -308,6 +314,7 @@ cpus { reg = <0x0 0x10100>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; CPU7: cpu@10101 { @@ -316,6 +323,7 @@ cpus { reg = <0x0 0x10101>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; CPU8: cpu@100000000 { @@ -324,6 +332,7 @@ cpus { reg = <0x1 0x0>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; CPU9: cpu@100000001 { @@ -332,6 +341,7 @@ cpus { reg = <0x1 0x1>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; CPU10: cpu@100000100 { @@ -340,6 +350,7 @@ cpus { reg = <0x1 0x100>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; CPU11: cpu@100000101 { @@ -348,6 +359,7 @@ cpus { reg = <0x1 0x101>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; CPU12: cpu@100010000 { @@ -356,6 +368,7 @@ cpus { reg = <0x1 0x10000>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; CPU13: cpu@100010001 { @@ -364,6 +377,7 @@ cpus { reg = <0x1 0x10001>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; CPU14: cpu@100010100 { @@ -372,6 +386,7 @@ cpus { reg = <0x1 0x10100>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; CPU15: cpu@100010101 { @@ -380,6 +395,7 @@ cpus { reg = <0x1 0x10101>; enable-method = "spin-table"; cpu-release-addr = <0 0x20000000>; + cpu-return-addr = <0 0x20001000> }; };