From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752221AbcFIWZ2 (ORCPT ); Thu, 9 Jun 2016 18:25:28 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:42367 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751193AbcFIWZ0 (ORCPT ); Thu, 9 Jun 2016 18:25:26 -0400 Subject: Re: [PATCH v3] mailbox: pcc: Support HW-Reduced Communication Subspace type 2 To: Hoan Tran References: <1463704347-22550-1-git-send-email-hotran@apm.com> <0f07c6dc-76b7-ab28-541b-090f6a2432a6@codeaurora.org> Cc: Ashwin Chaugule , Jassi Brar , "Rafael J. Wysocki" , Robert Moore , Alexey Klimov , lkml , linux acpi , Loc Ho , Duc Dang From: "Prakash, Prashanth" Message-ID: <4652800c-b518-6b9a-967f-bb31e6a496b0@codeaurora.org> Date: Thu, 9 Jun 2016 16:25:20 -0600 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/9/2016 2:47 PM, Hoan Tran wrote: > Hi Ashwin and Prashanth, > > On Wed, Jun 8, 2016 at 5:41 PM, Hoan Tran wrote: >> Hi Prashanth, >> >> >> On Wed, Jun 8, 2016 at 5:32 PM, Prakash, Prashanth >> wrote: >>> >>> On 6/8/2016 10:24 AM, Hoan Tran wrote: >>>> Hi Ashwin, >>>> >>>> On Wed, Jun 8, 2016 at 5:18 AM, Ashwin Chaugule >>>> wrote: >>>>> + Prashanth (Can you please have a look as well?) >>>>> >>>>> On 31 May 2016 at 15:35, Hoan Tran wrote: >>>>>> Hi Ashwin, >>>>> Hi, >>>>> >>>>> Sorry about the delay. I'm in the middle of switching jobs and >>>>> locations, so its been a bit crazy lately. >>>> It's ok and hope you're doing well. >>>> >>>>> I dont have any major >>>>> concerns with this code, although there could be subtle issues with >>>>> this IRQ thing. In this patchset, your intent is to add support for >>>>> PCC subspace type 2. But you're also adding support for tx command >>>>> completion which is not specific to Type 2. We could support that even >>>>> in Type 1. Hence I wanted to separate the two, not just for review, >>>>> but also the async IRQ completion has subtle issues esp. in the case >>>>> of async platform notification, where you could have a PCC client in >>>>> the OS writing to the cmd bit and the platform sending an async >>>>> notification by writing to some bits in the same 8byte address as the >>>>> cmd bit. So we need some mutual exclusivity there, otherwise the OS >>>>> and platform could step on each other. Perhaps Prashanth has better >>>>> insight into this. >>>> I think, this mutual exclusivity could be in another patch. >>> Ashwin, >>> Sorry, I am not sure how we can prevent platform and OSPM from stepping on >>> each other. There is a line is spec that says "all operations on status field >>> must be made using interlocked operations", but not sure what these >>> interlocked operation translates to. >> Yes, I had the same question about how to prevent it. > For platform notification, if the hardware doesn't support interlocked > operations. I think we can use a workaround that, platform triggers > interrupt to OSPM without touching status field. The OSPM PCC client > will decide what to do with this interrupt. For example, OSPM sends a > consumer command to check it. How do we decide which platform can support this interlocked operation? and how do we decide between a completion notification and platform notification? I think the ACPI spec on platform notification is quite ambiguous and it is best to get the necessary clarification and/or correction before implementing anything related to platform notification. With respect to to this patch, since we are not doing anything specific to platform notification and the interrupt can be used only for notification of completion, I suppose we should be okay. Thanks, Prashanth > Thanks > Hoan > >>> Hoan, >>> Even if we are not using platform notification, we still need to clear the doorbell >>> interrupt bit in the PCC interrupt handler (Section14.2.2 and 14.4). I didn't see >>> clearing the doorbell interrupt bit in this patch (and platform is supposed to set >>> it again when it is sending the interrupt again). Did I miss it? or is it intentionally >>> left out to avoid the race that Ashwin mentioned above? >>> >> The PCC client driver is supposed to do that. Which mean, the >> mbox_chan_received_data() function should clear it. >> >> Thanks >> Hoan >> >>> Thanks, >>> Prashanth >>> >>> > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html