Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1322426imm; Wed, 6 Jun 2018 14:09:44 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI06Ebr0ueSKkylxxSwF83+iZRblsydsnbJepEc7/a4IMenbGQfTHhmujqH9IlEN+0+sxpB X-Received: by 2002:a62:c4dd:: with SMTP id h90-v6mr4002494pfk.86.1528319384641; Wed, 06 Jun 2018 14:09:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528319384; cv=none; d=google.com; s=arc-20160816; b=LoPOY/FewLWXiOzldrL5gmkIiOdppHICuoA5QnqDCN6Jh7yTrRFFwEO72RzuFDkpRp Dp+Gi0dp4uWNLVTIyfBYu9MwiOkqquVXRqXv3Dzx/Ukn0zxBa+gJT29bjSPAVk9CCxGu y+ylCsJm75OGIM4Z2ZOa6/8vco5x9NFE7GUI7fTGzkmn96jCda+qKySCcIbZP0LyyKPX coUBKYzN8/zZphmexVWKxiKm3Q4XG0IXroUimELClAyzb7kmPbi4iW3xWYMh1S0Mdh1Z F/mLyPnPlm29/VPvhtbDDQJwd7CQhg+N7HwLCHcAUyJQdZ9Nj3VRDZ/N92DVUJa76kvO 297A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=rxklkYyqGmnL6XDbxVL4uKCwrpGplukOFzx17Qvu53w=; b=KiBLwQoTEoJBTkzcvrm+kzVJP8oC7yRno1jw/RuNH/A9lLXB2MTiSuvIwOVKs9ysSI XK1YM2YUhlKOUCu2JikNQZVYLMqlKURhSYFpkC+ln0FPhuhMKuAFY0KQQhNTx+6QBkEh sZdgrIa0wKQ4cZJq3YP5HvCwc/GZreOTUQMY4lcrJy70jruKOPwYYTikMfpi3TfDZsaY KBYkI8WFg6N/0Iua4e5NTJQO9Y6NhVYvjcjQ8TGRhvtCqLJ0U0Rrz5+BYx80dd9CnQbg qGISzqw1/dU6GlmiFVl/6VOYnkE3VmNcd/0+gCCwwnWWDUSt8Iywlg5d3VBm2pzdiXyr 4Ipg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Gk1iYUls; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x7-v6si16376081pfd.124.2018.06.06.14.09.29; Wed, 06 Jun 2018 14:09:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Gk1iYUls; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752734AbeFFU3A (ORCPT + 99 others); Wed, 6 Jun 2018 16:29:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:34782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752369AbeFFU26 (ORCPT ); Wed, 6 Jun 2018 16:28:58 -0400 Received: from mail-io0-f171.google.com (mail-io0-f171.google.com [209.85.223.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C38DB208A0; Wed, 6 Jun 2018 20:28:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528316937; bh=RsI/8j70vSe5YuUghAqVUDQOXn+pTDzp0gQY9n0cxRU=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=Gk1iYUls4Ud6gMvZHQ0Vw6+raWYLHZxY7tbR6Gk+P3d8M+RUoHSh91GYNEE9DtXHC Eh5qQb9qI9+pm3iZu7+sOAM/ME3LsZlARz3p96PBoYxtIbq+AghvkxF+CZMKNbLn9H pKGelGSSoqIJPhcThW+BolBB3Nvmz2HKgFUOAeiM= Received: by mail-io0-f171.google.com with SMTP id t5-v6so9167950ioa.8; Wed, 06 Jun 2018 13:28:57 -0700 (PDT) X-Gm-Message-State: APt69E0AzGIK5+J2aJyaBGJg34t6AsFgWbjg1wiQfImkgD9MvHXkPM09 JUWGAEQ4qgQYuxqlQ9WnmvKhpGV9HC0LAXZL2A== X-Received: by 2002:a6b:c689:: with SMTP id w131-v6mr4350051iof.79.1528316936995; Wed, 06 Jun 2018 13:28:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:5505:0:0:0:0:0 with HTTP; Wed, 6 Jun 2018 13:28:36 -0700 (PDT) In-Reply-To: References: <1528198148-23308-1-git-send-email-michel.pollet@bp.renesas.com> <1528198148-23308-3-git-send-email-michel.pollet@bp.renesas.com> <0481173f-6384-98d6-707c-89dc5ef103f0@gmail.com> From: Rob Herring Date: Wed, 6 Jun 2018 15:28:36 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 2/3] arm: shmobile: Add the R9A06G032 SMP enabler driver To: Geert Uytterhoeven Cc: Frank Rowand , Michel Pollet , "linux-renesas-soc@vger.kernel.org" , Simon Horman , Michel Pollet , Mark Rutland , Phil Edworthy , Florian Fainelli , Rajendra Nayak , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Stefan Wahren , Magnus Damm , Russell King , Douglas Anderson , Chen-Yu Tsai , Carlo Caione , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Frank Rowand , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 6, 2018 at 2:42 PM, Geert Uytterhoeven wrote: > Hi Rob, > > On Wed, Jun 6, 2018 at 9:35 PM, Rob Herring wrote: >> On Wed, Jun 6, 2018 at 2:30 PM, Frank Rowand wrote: >>> On 06/05/18 23:36, Michel Pollet wrote: >>>> On 05 June 2018 18:34, Frank wrote: >>>>> On 06/05/18 04:28, Michel Pollet wrote: >>>>>> The Renesas R9A06G032 second CA7 is parked in a ROM pen at boot time, >>>>>> it requires a special enable method to get it started. >>>>>> >>>>>> Signed-off-by: Michel Pollet > >>>>>> --- /dev/null >>>>>> +++ b/arch/arm/mach-shmobile/smp-r9a06g032.c > >>>>>> +/* >>>>>> + * The second CPU is parked in ROM at boot time. It requires waking >>>>>> +it after >>>>>> + * writing an address into the BOOTADDR register of sysctrl. >>>>>> + * >>>>>> + * So the default value of the "cpu-release-addr" corresponds to >>>>> BOOTADDR... >>>>>> + * >>>>>> + * *However* the BOOTADDR register is not available when the kernel >>>>>> + * starts in NONSEC mode. >>>>>> + * >>>>>> + * So for NONSEC mode, the bootloader re-parks the second CPU into a >>>>>> +pen >>>>>> + * in SRAM, and changes the "cpu-release-addr" of linux's DT to a >>>>>> +SRAM address, >>>>>> + * which is not restricted. >>>>> >>>>> The binding document for cpu-release-addr does not have a definition for 32 >>>>> bit arm. The existing definition is only 64 bit arm. Please add the definition >>>>> for 32 bit arm to patch 1. >>>> >>>> Hmmm I do find a definition in >>>> Documentation/devicetree/bindings/arm/cpus.txt -- just under where I >>>> added my 'enable-method' -- And it is already used as 32 bits in at least >>>> arch/arm/boot/dts/stih407-family.dtsi. >>> >>> From cpus.txt: >>> >>> - cpu-release-addr >>> Usage: required for systems 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 identifying a 64-bit zero-initialised >>> memory location. >>> >>> The definition specifies a two cell property for 64-bit systems. >>> >>> Please add to the definition that cpu-release-addr is a one cell property >>> for 32-bit systems. >> >> Actually, this is all already documented in the DT spec and it is >> always 2 cells[1]. We should perhaps just remove whatever is >> duplicated from the spec. >> >> Rob >> >> [1] >> ``cpu-release-addr`` | SD | ```` The >> cpu-release-addr property is required for >> cpu nodes that have >> an enable-method property >> value of >> ``"spin-table"``. The value specifies the >> physical address of >> a spin table entry that >> releases a >> secondary CPU from its spin loop. > > Interesting. But why is this , and not just following #address-cells? As you said in your other email, it's not the same. > Due to the ePAPR-spec being 64-bit Power System-centric? Other than #address-cells already having another defined purpose in /cpus, my guess is 64-bit works for either and 32-bit SMP systems didn't predate 64-bit (for the ePAPR author's perspective). > There's also "initial-mapped-area", which must use 64-bit values for effective > and physical addresses, according to ePAPR. I would have thought that followed #{size,address}-cells being /memory. Though, I guess the bootloader fills this in and it is much easier to work with fixed sizes. Rob