Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp207632ybk; Tue, 19 May 2020 20:08:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0x2HRxDFBh3AlDsSugV+BKQVlxZqquuow/GRJjNRioCDa9wb3eMf3RWyRpvZYqruVfqFt X-Received: by 2002:aa7:cd0e:: with SMTP id b14mr1499757edw.319.1589944125813; Tue, 19 May 2020 20:08:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589944125; cv=none; d=google.com; s=arc-20160816; b=FxaDwPbvsgT3UufUqpOu2UxcyYBz/tmJIV6Kva6xZkI4rj026OYrVQQzoBx/Te7zIh GfC6gHlh4DXnsfjSkdwrw9l078mcjB86QvjnCP+Hl6zXdMtNZI1BUEur5XrRCR9oSxxc SADewnY4Qm8DZIhAj+FvmV9/H/QoVS3mPVbUcQL1ow174NNVnfQkDM/WEQeqD7KpPtLu ROIk0PpVgPlJLK4uCSgh7LqDu6+Fmtgqze44nQOrlL1CsCVePG0Fcrg0U9JP0+AOOH9E +F3MoCZSAoQAQZ90RfDtEAKIp40y9LGvV+Vfn9w/HFDRijLx0ZkCsFX6XB/VJTghu0lT ed8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=gR34f2/WePbseRPzzeVBI1MwVnt23DHEqTki15FsJk8=; b=MIYc8fq7fwOZdI29HB/zzSAGSX0KQFkfLDUlyJhDXJdJAACUup4D/LD91iUOft0PYW I1UqUJyppdNF6180Rx2z1VEfSiOHtfye1d8r4Ye4D0pH3IUtFs0+WyTc2sheZ6SQmtdy WKm2uT9Earena3LOz2+Dg4D6DWWDJsnGr9cBRLn5BAIekmXOYDlo3revUld0i8Vb01NR G8dbYNomT663kiElqZ03dGcFmvEJy2M4+udzoZ3N4Ws2m6ZulA8OHhzq8R75N5uMd6Kw v8nPDvZpOR0dhzkMo1kv3PPkwr+aZwR8uH0MUr4ZxOxcsYtpBqQ7FR0hisEnKAk2paYG ldhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr19si1376464ejc.90.2020.05.19.20.08.23; Tue, 19 May 2020 20:08:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728635AbgETDGs (ORCPT + 99 others); Tue, 19 May 2020 23:06:48 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:55408 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726379AbgETDGs (ORCPT ); Tue, 19 May 2020 23:06:48 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 94CA74A8013FC1636D76; Wed, 20 May 2020 11:06:45 +0800 (CST) Received: from [127.0.0.1] (10.166.215.101) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Wed, 20 May 2020 11:06:40 +0800 Subject: Re: [PATCH] firmware: arm_sdei: remove unused interfaces To: James Morse , Christoph Hellwig CC: , References: <20200504164224.2842960-1-hch@lst.de> <7c127e49-b1c6-c7ac-69bf-9fc0a6dba4c4@arm.com> <6d0adc02-bcd8-2217-c145-d609528fbe77@huawei.com> <0ac1444b-bbdf-1efb-54e6-db90fe6ac707@arm.com> From: Xiongfeng Wang Message-ID: Date: Wed, 20 May 2020 11:06:40 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <0ac1444b-bbdf-1efb-54e6-db90fe6ac707@arm.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.166.215.101] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi James, On 2020/5/19 23:47, James Morse wrote: > Hi Xiongfeng, > > On 05/05/2020 03:08, Xiongfeng Wang wrote: >> On 2020/5/5 1:14, James Morse wrote: >>> Hi Christoph, >>> >>> (CC: +Xiongfeng) >>> >>> Thanks for the reminder - I was just searching for who was using this. >> >> Thanks for CC me. We do have a driver that are using it. > >>> On 04/05/2020 17:42, Christoph Hellwig wrote: >>>> The export symbols to register/unregister and enable/disable events >>>> aren't ever used outside of arm_sdei.c, so mark them static. >>> >>> Xiongfeng, you have drivers using this, could they be posted upstream. Or can we stop >>> exporting these? >> >> It's the SDEI Wathchdog which is used for hardlockup detection. But I wasn't >> able to push it upstream because we have Pseudo-NMI in mainline. > > Hmm, that shouldn't be directly relevant, unless your SDEI watchdog is using the > bindable-irq thing? Yes, we are using the bindable-irq thing. It's easier for the UEFI team. Firmware doesn't need to too much modification. > > > If your firmware offers an event-id for the watchdog, please upstream the driver. Half of > the event-id space is reserved for vendor stuff like this. My origin thought is using a new event-id. But the firmware guys are new to SDEI and don't know how to add a new event-id. > > If firmware needs to be told to re-configure the watchdog irq to make this work, then pNMI > is a much better fit. Having firmware and linux modifying the irqchip hardware is a > nightmare best avoided. > Yes, we are using the secure timer irq as the watchdog irq. So the firmware needs to disable and enable the irq when we disable and enable the event. But linux don't need to modify the irqchip hardware about the secure timer irq. All works well except the kdump situation. Because in sdei_handler the secure timer irq, which is routed to EL3, remains active. We clear the EOI when we complete the event. So when we panic and start kdump in sdei_handler, the EL2 interrupt of the second kernel can not be taken. We add a hack to clear the EOI before start kdump. Yes, the pNMI is a much better fit. We don't need such a hack. But the product department seems to have get used to the SDEI watchdog method. It works well and they don't want much change. Thanks, Xiongfeng > >>> (they were originally added for the GHES RAS thing, but by the time it was all merged >>> upstream, it wasn't possible to build it as a module) >> >> The SDEI Watchdog driver also can't be built as a module. We still need to >> modify the origin kernel. So I think this patch doesn't affect me. Thanks for CC me. > > Okay, I'll pick this up to drop the module exports. > > I'd prefer not to make all this static as these register/unregister calls are the > interface that is supposed to be used. If we are going to gut it, we should do it completely. > > > Thanks, > > James > > . >