Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2636574rwb; Sat, 8 Oct 2022 11:17:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4aNwrzOWF3kQs2FNnf0W1pzKN4rvcwc1nmj/3IcR3EgHpsNw/3tXcDJyV6N6/yN3m2kZuQ X-Received: by 2002:a17:902:ecc2:b0:17f:9022:e00b with SMTP id a2-20020a170902ecc200b0017f9022e00bmr11103204plh.87.1665253041032; Sat, 08 Oct 2022 11:17:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665253041; cv=none; d=google.com; s=arc-20160816; b=uRR0h23/DU+vlcO5En84m3LN588a/tm3mfF979GZ/Pib1a0zqXg4X6P16l8DTam/+w /oujMq30GyPII4/HXLJLYiRlLLTxCsUdkPKQpMEu96geWBROktQz1m9Z6O1l8+lh0q3k +0nECkEwnp5tVo3e9tbMCAGCVRdA8i6Bal1Ee5abN0cOH/NbrRqigul0KhSBjbXS8apf oIMNfbEKFh7cnEFM64XnKkrR4TDhKf+qmSJZjflMwJl4uSmS06m3yvrlODEp1WiMkrtK fGUt6DBeBzfYKRmw7Tb+0qGx9Vu740BIJ1z90jNUW+dwOVKpV83JdsbMS8nRmWNjbBKo iv3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id; bh=FWg90C81JTGF6SRtaBAsrjrDHyP4Ajg7rSMUvoNvS6I=; b=daLAerWo/OvzO1n1sNEoTKbRZx3eJNA42p9WVlGJcy8zOZjSyBkJ/Fb8kknuqbNlCk ujq6tidevY94Zk+hQsJl/kW6xxEh6VMmRPyfzeVPOb2OZVoaft9J1LxQGvdrwwmeV+97 ByV0Bn0tmKJ8tadIEXRAhSimvbBo0Ib9TICMg3fcDmIUQWFmWQ4DqbgG1I+GQ/q9aFLL 0SNLQSdVEHP5w1wZPP79PBzMd9cB1udiT1D/G/JqeFuq1Mc/8hnNHk0PwcHE6PO5+7mx noBp6tl6gV0KMCdIWBjCsm/GPNJry2wy6cP+gNd+XCpixDohGQyoMySkZcVpYwKO7A3m q97g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c68-20020a621c47000000b0053bafb8e916si6074917pfc.162.2022.10.08.11.17.09; Sat, 08 Oct 2022 11:17:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230505AbiJHSIf (ORCPT + 99 others); Sat, 8 Oct 2022 14:08:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230498AbiJHSIe (ORCPT ); Sat, 8 Oct 2022 14:08:34 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.221.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49D7D3FEF3; Sat, 8 Oct 2022 11:08:32 -0700 (PDT) X-QQ-mid: bizesmtp80t1665252455teb5lj67 Received: from [192.168.0.179] ( [113.85.219.225]) by bizesmtp.qq.com (ESMTP) with id ; Sun, 09 Oct 2022 02:07:32 +0800 (CST) X-QQ-SSF: 0100000000000070B000B00A0000000 X-QQ-FEAT: jbaoaN/hLKIC5Yj0V619849HMTLVRPFKWybSzNavB7OliimAOyl1ZwZtGg9e8 qwWewiQWj4ugjzP4iZ12K1krk/nn6bbb+Ux+60fHDpHJM/NUhqM+kKexBclIBdU89f1f3OE 73escGs/FVIiTvhkD34943Am9PYMQz3B6NZViXJ4ZhpmLBLK6tOUXEtKoTIHQnfE/cKuZZS r38BoyBxUZeLJ3PtCiJTg718u3cK0WWXtfO6zmuj/OCuzK8BaSuD3IFd4znibi33aAM7tzz uEb7iiBfn6JzoYVED9oKy4CqhzNzlsFDdF84vKrNmOlDX8CyCz70DLtbLIYfZ02W355lSGY v9s88bVWo1NYpOWs8N/yQAA+I+C6SXNGXBsIdx/ X-QQ-GoodBg: 0 Message-ID: Date: Sun, 9 Oct 2022 02:07:31 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH v1 05/30] soc: sifive: l2 cache: Convert to platform driver Content-Language: en-US To: Conor Dooley Cc: Emil Renner Berthing , Ben Dooks , Ben Dooks , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Daniel Lezcano , Thomas Gleixner , Marc Zyngier , Philipp Zabel , Stephen Boyd , Michael Turquette , Linus Walleij , Emil Renner Berthing , linux-kernel@vger.kernel.org, Zong Li References: <20220929143225.17907-1-hal.feng@linux.starfivetech.com> <20220929143225.17907-6-hal.feng@linux.starfivetech.com> <40d0abb6-88dc-d315-f768-27a623f60986@sifive.com> <4d8a199b-f22a-a421-aae4-64e538cb97f4@codethink.co.uk> From: Hal Feng In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:linux.starfivetech.com:qybglogicsvr:qybglogicsvr2 X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA, NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 5 Oct 2022 15:05:03 +0100, Conor Dooley wrote: > On Wed, Oct 05, 2022 at 03:55:17PM +0200, Emil Renner Berthing wrote: > > On Wed, 5 Oct 2022 at 15:48, Ben Dooks wrote: > > > > > > On 05/10/2022 14:44, Emil Renner Berthing wrote: > > > > On Thu, 29 Sept 2022 at 19:59, Ben Dooks wrote: > > > >> > > > >> On 29/09/2022 15:32, Hal Feng wrote: > > > >>> From: Emil Renner Berthing > > > >>> > > > >>> This converts the driver to use the builtin_platform_driver_probe macro > > > >>> to initialize the driver. This macro ends up calling device_initcall as > > > >>> was used previously, but also allocates a platform device which gives us > > > >>> access to much nicer APIs such as platform_ioremap_resource, > > > >>> platform_get_irq and dev_err_probe. > > > >> > > > >> This is useful, but also there are other changes currently being sorted > > > >> out by Zong Li (cc'd into this message) which have already been reviewed > > > >> and are hopefully queued for the next kernel release. > > > >> > > > >>> Signed-off-by: Emil Renner Berthing > > > >>> Signed-off-by: Hal Feng > > > > > > > > I'm ok with something like this being merged, but please note that if > > > > we ever want to support the JH7100 which uses registers in this > > > > peripheral to flush the cache for its non-coherent DMAs then this > > > > driver needs to be loaded before other peripherals or we will trigger > > > > the 2nd warning in arch/riscv/mm/dma-noncoherent.c. I'm not sure we > > > > can do that when it's a platform driver. See this patch for an > > > > alternative to support the JH71x0s: > > > > https://github.com/esmil/linux/commit/9c5b29da56ae29159c9572c5bb195fe3a1b535c5 > > > > > > > > /Emil > > > > > > Are you replying to your own patch that does the conversion to > > > platform driver and then saying that it could actually cause > > > issues? > > > > Yes, I can see it seems odd, but this patch lived for a while in the > > kernel repo for the JH7100 until I rebased on 6.0-rc1 and realized the > > above. > > Hal Feng must have based his patches on a version of the code before > > that when preparing this series. > > > > > I'm all for dropping this for the moment and keeping the old > > > early init for the ccache. > > > > Cool. > > FWIW, if converting to a platform driver will inhibit using the driver > for doing non-coherent stuff I would like to NAK the patch :) > Yeah, I agree, and this patch will be dropped on the next version.