Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2512574imm; Thu, 7 Jun 2018 11:55:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLsxYQahzCdWxa/p0ZHYYpkf2WKsDsRinsJSP3wUKdeZjQya2qInUKSMT+WFm78mcQBjA1S X-Received: by 2002:a65:508d:: with SMTP id r13-v6mr2548963pgp.143.1528397748614; Thu, 07 Jun 2018 11:55:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528397748; cv=none; d=google.com; s=arc-20160816; b=KLgxtFis3C5tSBcp1MVJ5/Q85HSceyYhpUJzQpwh+7Pn2AocqvroBmxXh8zFNClDHR L1pVu3NF2KPPJeigTwThOgqy9+hcAGz/HhhBPFg0c+6a1qzhJC6N6gDgnYmDMg3u0q1P Q9ZahaEXdSZUr0Sij3kaRCp+53MhvaxhoMN+MKV19UtyKIDpZARg4kPoDTosr4skAaHo 5Tmr/EVwBldG8OV115qFTd6q3G1riDejYf1/nBYN6wqVeI/0YnYgtuEQCB7ZZyUGiC+M Xdnw0+8cw9bG3/bI2z8Lssis6LP9sR5L5LcfBSKsJYXNuaiHGHgrswCgb7cayp0bzADE 9B2w== 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=zL5p2MeWUukB+FbWoaL5po0GVoz9YF2UjcZu2aDU5hQ=; b=r7jwPNaYoR5B8zJVw0XUR9BDAGQzJaEBB1cV78CUADKo7r61FfMbeUoe2DMP3Q6cyn Cy/HThZ7GB0naFXbRm/BOfDckRKwpKUl0zvJZMpZgOOMhJTzm3jHSjXz9KnxHDqHPt/w qV/sjdktxVhCq1khi3V/oLiroBGC+gCHFH6HL9sGgXJSTpQWCE1EnI5PbtEHsimdU+xh Zzx4Xy6pEICsM/U/mYWNXH/MFh1pFVLu3T7ioiWNfJTiRy4dMbVouF+MBzF6aYRWpBh1 I2+1S6jY26Ew6E1Kg8lC60N0knEwvipTpDSYubBn+ums/2/IGlAepfy542eD3JWAUww5 x+aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ba8iDx5v; 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 a38-v6si14193015pla.541.2018.06.07.11.55.34; Thu, 07 Jun 2018 11:55:48 -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=Ba8iDx5v; 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 S934413AbeFGPzR (ORCPT + 99 others); Thu, 7 Jun 2018 11:55:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:49792 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933699AbeFGPzO (ORCPT ); Thu, 7 Jun 2018 11:55:14 -0400 Received: from mail-it0-f54.google.com (mail-it0-f54.google.com [209.85.214.54]) (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 BB0C52086E; Thu, 7 Jun 2018 15:55:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528386913; bh=Ahv9R/0mGB6aQf9bAECV3z+yofIjl9XWQv8aQD0sgiE=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=Ba8iDx5v6rSm1WYhrFUOMPeIzl0GDU/11lZR4mvCwk5qN9BlP8GMoYulOa9tXu1Kg UIo7Nf3dz8ntnBrvfTPFkuzFQLDm2GQVyQk+UwyykyL17LZKHgR9gv3I2zZwrEn7qR yiiA83g8972lnvznoWMg9Sx6rIy5Iixs8ltRgnqw= Received: by mail-it0-f54.google.com with SMTP id n7-v6so13516104itn.1; Thu, 07 Jun 2018 08:55:13 -0700 (PDT) X-Gm-Message-State: APt69E08R+Kgas4/v/DUvM8oo5VlCmDFEr12R2/dP4H4a5FmhYQVAfkW jDSRYiv1rA5m4vxAdeJzoiQwU5rcD6e+yz9K+Q== X-Received: by 2002:a24:ec44:: with SMTP id g65-v6mr2654124ith.18.1528386913189; Thu, 07 Jun 2018 08:55:13 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:5505:0:0:0:0:0 with HTTP; Thu, 7 Jun 2018 08:54:52 -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> <9cef7124-3020-5741-f3a2-6925a6c8f0f3@gmail.com> <79c0899e-7df1-1fe7-9681-ad3bd51feda7@gmail.com> From: Rob Herring Date: Thu, 7 Jun 2018 10:54:52 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 2/3] arm: shmobile: Add the R9A06G032 SMP enabler driver To: Michel Pollet Cc: Frank Rowand , "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 Thu, Jun 7, 2018 at 1:59 AM, Michel Pollet wrote: > On 06 June 2018 22:53, Frank wrote: >> On 06/06/18 14:48, Frank Rowand wrote: >> > On 06/05/18 23:36, Michel Pollet wrote: >> >> Hi Frank, >> >> >> >> 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. [...] >> >>>> + * 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. >> > >> > If the correct answer is for cpu-release-addr to be 64 bits in certain >> > cases (that discussion is ongoing further downthread) then one >> > approach to maintain compatibility _and_ to fix the devicetree source >> > files is to change the source code that currently gets >> > cpu-release-addr as a >> > 32 bit object to check the size of the property and get it as either a >> > 32 bit or 64 bit object, based on the actual size of the property in >> > the device tree and then change the value in the devicetree source >> > files to be two cells. BUT this does not consider the bootloader >> > complication. arch/arm/boot/dts/axm5516-cpus.dtsi has a note "// >> > Fixed by the boot loader", so the boot loader also has to be modified >> > to be able to handle the possibility that the property could be either >> > 32 bits or 64 bits. I don't know how to maintain compatibility with >> > the boot loader since we can't force it to change synchronously with >> > changes in the kernel. >> > >> > You can consider this comment to be a drive-by observation. I think >> > Rob and Geert and people like that are likely to be more helpful with >> > what to actually do, and you can treat my comment more as pointing out >> > the issue than as providing the perfect solution. >> >> Darn it, hit too quickly. >> >> I meant to mention that there are several devicetree source files that have a >> single cell value for cpu-release-addr, and thus potentially face the same >> situation, depending on what the final decision is on the proper size for cpu- >> release-addr. As of v4.17, a git grep shows one cell values in: >> >> arch/arm/boot/dts/axm5516-cpus.dtsi >> arch/arm/boot/dts/stih407-family.dtsi >> arch/arm/boot/dts/stih418.dtsi > > Yes, I had grepped before I used 32 bits on mine... > > Now, what is the decision here? Our bootloader is already modified to set it to 32 bits, so I propose that And too late to fix the bootloader? > > + I change the driver to handle 32 and 64 bits properties That's fine if you can't fix the bootloader. > + I add this to the cpu.txt, as a separate patch: > # On other systems, the property can be either > 32 bits or 64 bits, it is the driver's responsibility > to deal with either sizes. That is definitely not what we want to say. Use of 32-bit should be considered out of spec. Yes, we have a few platforms in that category, but they already handle that themselves. Would be nice to fix them, but at least the STi platforms don't seem too active. IMO, we should delete whatever text we can here and at most just refer to the spec. Rob