Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,NICE_REPLY_A,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC744C433E3 for ; Tue, 28 Jul 2020 02:57:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 769C020825 for ; Tue, 28 Jul 2020 02:57:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aJg7hMWQ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ovf2kb18" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 769C020825 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:Reply-To:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fwhEaqH1Anj3XLUAFgTz4jG2cgM9lWD/YHjhaolZijA=; b=aJg7hMWQvmRMX8 2Hn5u+1zvskFYs/0d24dzRtbmH/W10x3RlKkavRzGuH38eefezuuL/yoRfN8PPJxGRsky99zULUT2 3yWjLF0YzppSG+F+jWpBB4l8WTsD5uRhZhNqmMAYSSHYQ0DMFAdiZWADaWusgmgdwNu4Dyx1YKsnY 290/dS4IflRjRNbDft7biWuzW/q/fs5MEXaxHSOJmIbVyCCi2YnHMbkEBu2iaRjFriioQvb6JSAzd ZAohhCkc4D2vKBejk6PSjg5rIkAvUzIMI/r1/SzhxAGLsrDWJky0E0PYglNzlDSu/wlTebw8O3hOo 723A9CWov+xiKDgcs9pQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0FnA-00042V-Hk; Tue, 28 Jul 2020 02:56:36 +0000 Received: from us-smtp-2.mimecast.com ([205.139.110.61] helo=us-smtp-delivery-1.mimecast.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0Fn5-00040D-0I for linux-arm-kernel@lists.infradead.org; Tue, 28 Jul 2020 02:56:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595904990; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z2evABJ9gW0I0SZupRXVClPX9AeLRp/Y0G7e4jD9d4w=; b=Ovf2kb185hWgHSfUVUySQQm0uRh7tuVlnQLzWlDUxp2EAQgSCfYROG5t5C0LO3e/0NqzgM /Xofs82QRhlpyKwoJyld22KCod/tcoaSrAHAauBdwCkWuNznOB85lIenCLdQM/GuzBR1Rt r1vfQOZukn/t9Blo8oxU2y7mVMUk21s= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-326-IhmMexq6Onep6U9W8y-3IA-1; Mon, 27 Jul 2020 22:56:27 -0400 X-MC-Unique: IhmMexq6Onep6U9W8y-3IA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B47E2186A83E; Tue, 28 Jul 2020 02:56:25 +0000 (UTC) Received: from [10.64.54.117] (vpn2-54-117.bne.redhat.com [10.64.54.117]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DE1B871D06; Tue, 28 Jul 2020 02:56:23 +0000 (UTC) Subject: Re: [PATCH v2 16/17] drivers/firmware/sdei: Retrieve event signaled property on registration To: Jonathan Cameron References: <20200722095740.28560-1-gshan@redhat.com> <20200722095740.28560-17-gshan@redhat.com> <20200723162423.000019ea@Huawei.com> <20200727100414.00000ee2@Huawei.com> <20200727145654.00000063@huawei.com> From: Gavin Shan Message-ID: Date: Tue, 28 Jul 2020 12:56:21 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: <20200727145654.00000063@huawei.com> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200727_225631_207575_D08D4D3C X-CRM114-Status: GOOD ( 24.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Gavin Shan Cc: mark.rutland@arm.com, catalin.marinas@arm.com, james.morse@arm.com, shan.gavin@gmail.com, will@kernel.org, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Jonathan, On 7/27/20 11:56 PM, Jonathan Cameron wrote: > On Mon, 27 Jul 2020 20:03:32 +1000 > Gavin Shan wrote: >> On 7/27/20 7:04 PM, Jonathan Cameron wrote: >>> On Mon, 27 Jul 2020 10:53:27 +1000 >>> Gavin Shan wrote: >>>> On 7/24/20 1:24 AM, Jonathan Cameron wrote: >>>>> On Wed, 22 Jul 2020 19:57:39 +1000 >>>>> Gavin Shan wrote: >>>>> >>>>>> This retrieves the event signaled property when it's created for the >>>>>> first time. The property will be needed when SDEI virtualization is >>>>>> supported. >>>>>> >>>>>> Signed-off-by: Gavin Shan >>>>> >>>>> These last two patches are probably fine but hard to tell without a user. >>>>> >>>> >>>> Good question. Let me explain the background and please let me know >>>> if you have more questions. SDEI was suggested by Marc to deliver >>>> the notification during the asynchronous page fault, so that the >>>> process can be rescheduled in guest. Unfortunately, we don't have >>>> SDEI (or virtualized SDEI) supported yet. So the additional event >>>> information is needed when SDEI virtualization is supported. >>>> >>>> The code of SDEI virtualization can be checked out from github: >>>> >>>> https://github.com/gwshan/linux/tree/sdei (branch: "sdei") >>> Thanks. >>> >>> I'd be tempted to move these two patches to the next series >>> that includes the users. >>> >>> I forgot to say, I'm fine with all the patches I didn't comment on. >>> >> >> Yes, it's fine to move the last two patches to where we need >> them. Thanks for your review and comments. May I have your >> reviewed-by on those patches you didn't comment on? I would >> like to pick the reviwed-by in v3 :) >> > Sure FWIW (I'm far from an expert in this area!) > > Reviewed-by: Jonathan Cameron > for patches > 1-7,13,15 as is > 8-10 with trivial changes as discussed. > 12 already given > > Given postponing 16 and 17, that just leaves 11 and 14 that I'd > like to take a quick look at in v3. > Thanks for your confirmation. Except PATCH[11] and PATCH[14], all other patches in v3 will include your r-b. Thanks again for your time and comments :) >>>> >>>>>> --- >>>>>> drivers/firmware/arm_sdei.c | 6 ++++++ >>>>>> include/linux/arm_sdei.h | 1 + >>>>>> 2 files changed, 7 insertions(+) >>>>>> >>>>>> diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c >>>>>> index cf10fec57f2a..7518d3febf53 100644 >>>>>> --- a/drivers/firmware/arm_sdei.c >>>>>> +++ b/drivers/firmware/arm_sdei.c >>>>>> @@ -204,6 +204,12 @@ static struct sdei_event *sdei_event_create(u32 event_num, >>>>>> goto fail; >>>>>> event->type = result; >>>>>> >>>>>> + err = sdei_api_event_get_info(event_num, SDEI_EVENT_INFO_EV_SIGNALED, >>>>>> + &result); >>>>>> + if (err) >>>>>> + goto fail; >>>>>> + event->signaled = result; >>>>>> + >>>>>> if (event->type == SDEI_EVENT_TYPE_SHARED) { >>>>>> reg = kzalloc(sizeof(*reg), GFP_KERNEL); >>>>>> if (!reg) { >>>>>> diff --git a/include/linux/arm_sdei.h b/include/linux/arm_sdei.h >>>>>> index 11af6410dd52..7f3ed7e4b680 100644 >>>>>> --- a/include/linux/arm_sdei.h >>>>>> +++ b/include/linux/arm_sdei.h >>>>>> @@ -51,6 +51,7 @@ struct sdei_event { >>>>>> u32 event_num; >>>>>> u8 type; >>>>>> u8 priority; >>>>>> + u8 signaled; >>>>>> >>>>>> /* This pointer is handed to firmware as the event argument. */ >>>>>> union { >>>> Thanks, Gavin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel