Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751771AbdITLR0 (ORCPT ); Wed, 20 Sep 2017 07:17:26 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:47887 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751537AbdITLRY (ORCPT ); Wed, 20 Sep 2017 07:17:24 -0400 X-Google-Smtp-Source: AOwi7QDsZIHc2rBjfIPlYWviB527AJfYXhb6lLnwYy0pM6yvzjsT51UVJ/hjlLmpa6UElMt0lT87Pw== Subject: Re: [PATCH v2] arm64: dts: foundation-v8: Enable PSCI mode To: Sudeep Holla , Liviu Dudau , Lorenzo Pieralisi , Mark Rutland Cc: Rob Herring , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, patches@linaro.org References: <20170918153832.16356-1-daniel.thompson@linaro.org> <20170919183204.12751-1-daniel.thompson@linaro.org> From: Daniel Thompson Message-ID: <9a542b9a-3c37-ed8a-04e6-de41493f4b0d@linaro.org> Date: Wed, 20 Sep 2017 12:17:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3072 Lines: 72 On 20/09/17 10:42, Sudeep Holla wrote: > > > On 19/09/17 19:32, Daniel Thompson wrote: >> Currently if the Foundation model is running ARM Trusted Firmware then >> the kernel, which is configured to use spin tables, cannot start secondary >> processors or "power off" the simulation. >> >> After adding a couple of labels to the include file and splitting out the >> spin-table configuration into a header, we add a couple of new headers >> together with two new DTs (GICv2+PSCI and GICv3+PSCI). >> >> The new GICv3+PSCI DT has been boot tested, the remaining three (two of >> which existed prior to this patch) have been "tested" by decompiling the >> blobs and comparing them against a reference. >> > > How different are these from the ones hosted in [1] ? They look like they were either independently written or diverged a long time ago. The existing kernel DTs describe hardware absent from the ARM TF ones and vice versa. With specific reference to PSCI it looks like my patches could perhaps be improved by adding idle-state support. > On argument is that we want to take the DTS out of device tree as > firmware is responsible for generating them. Alternatively, we may be > duplicating resulting in discrepancies over time by coping it into kernel. The general problem is copying from where? The kernel DTs are a well maintained centralized repository which is *really* useful. git grep across the kernel DTs is a hugely powerful tool when trying to better understand an ecosystem as sprawling and diverse as ARMs. In fact I've even seen those sort of searchs used as a basis to clean up unused code. Seeing that centralized repository splinter into separate per-vendor silos would be a huge loss for kernel developers. > Since users of ARM TF must be able to access these, I am not sure if it > makes sense to merge these. Or we remove it from ARM TF to avoid any > conflicts/discrepancies. > > Thoughts ? I kind of agree that maintaining DTs and DT documentation in the kernel is a little odd given that the kernel is not the only player here (FreeBSD, u-boot, etc). However it is sufficiently well maintained that projects are content(ish) to regard the kernel as the canonical source for these things (u-boot, for example, seeks to shadow kernel DTs without modifying them). However regardless of the above I'd say they should be removed from ARM TF. ARM TF does not use, modify, pass on or in any way consume DT... it has no skin in the game here. Why does it want to own a few of blobs for a small subset of the platforms it supports? I'm afraid that makes no sense to me, to the extent that it didn't even occur to me to *look* in the ARM TF sources to find any DTs for FVP until you pointed them out. In other words, whilst people could discuss alternative ways to manage DTs[1], I can't see any universe where ARM TF would be a logical place to keep them. Daniel. [1] ... and I'd further suggest that only perhaps people who are prepared to put resources into fixing it should convene such a discussion.