From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7035FC77B7F for ; Tue, 16 May 2023 14:35:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id 533C3C4339E; Tue, 16 May 2023 14:35:38 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.kernel.org (Postfix) with ESMTP id D283BC433EF; Tue, 16 May 2023 14:35:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org D283BC433EF Authentication-Results: smtp.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E064C1FB; Tue, 16 May 2023 07:36:19 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BCE423F7BD; Tue, 16 May 2023 07:35:32 -0700 (PDT) Date: Tue, 16 May 2023 15:35:30 +0100 From: Sudeep Holla To: "lihuisong (C)" List-Id: Cc: Arnd Bergmann , Bjorn Andersson , Matthias Brugger , AngeloGioacchino Del Regno , Shawn Guo , linux-kernel@vger.kernel.org, soc@kernel.org, wanghuiqiang@huawei.com, tanxiaofei@huawei.com, liuyonglong@huawei.com, huangdaode@huawei.com, Sudeep Holla , linux-acpi@vger.kernel.org, Len Brown , "Rafael J. Wysocki" , devicetree@vger.kernel.org, Rob Herring , Frank Rowand , Krzysztof Kozlowski Subject: Re: [PATCH] soc: hisilicon: Support HCCS driver on Kunpeng SoC Message-ID: <20230516143530.venhj4gax6stinah@bogus> References: <20230424073020.4039-1-lihuisong@huawei.com> <20230425103040.znv66k364ant6klq@bogus> <20230425131918.5tf5vot4h7jf54xk@bogus> <20230515130807.pdvx7bxwjkfdsmsr@bogus> <20230516122931.il4ai7fyxdo5gsff@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, May 16, 2023 at 10:13:58PM +0800, lihuisong (C) wrote: [...] > > But I still need the device-flags to report if use PCC operation Region. > If so I have to dig one address register from comm subspace, right? [...] > Thanks for you bringing it up. > Indeed, this HCCS_DEV_FLAGS_INTR_B is not good. > I'm going to replace it with PCC operation Region flag. >From the above 2, I am getting a sense that all these flags dance is for sharing a PCC subspace ID between this driver and the firmware PCC Opregion ? If so that may not work as the current implementation of PCC Opregion assumes the exclusive access to the channel. Since it is initialised quite early, Opregion must succeed to get the mbox channel acquired and this driver must fail if they are sharing the channel. Making the sharing across firmware and this driver may need changes in the PCC Opregion support code. One possible way is to acquire and release the channel for each transaction which will be definitely overhead. -- Regards, Sudeep