Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2896680imw; Wed, 6 Jul 2022 13:40:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tdzaT8drV6ImTYtUlwMhGovic6L4A9tdZ4tUu+Demo5t5XfFzi4gGVg5jVebYRDy7P2HPF X-Received: by 2002:a05:6a00:b49:b0:525:9ffb:a26f with SMTP id p9-20020a056a000b4900b005259ffba26fmr49756212pfo.33.1657140009349; Wed, 06 Jul 2022 13:40:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657140009; cv=none; d=google.com; s=arc-20160816; b=oMLG8gNVoslOCT8q1Z8l9x4TsX97Nhr60a5IakaFW3GltGRsakxO3RP3g7PGBFkOkQ MF/2RcZHhvg3Gji8fAW83aymDW/6ky1HcqEDBEVoovr6OVh+tqK16FR1rTTrAhrBpXe+ P8UfWqGzu2UyiFQOcqInEjiPEnKPLn3U8gw9vg8SDy3aoGqzvzu63nk8ag1KSCQ2bSas XmEFMMeVojud/cgFXNs4AdPAUDmPvBPySzZ556A4GaWZD/Lbxs6U2NhOh0shjuzOmGe5 P1i8p+hOmPgVy/AcVlpNqhSDI2uIuS9K5IxLZ1I4wKjhp+kzTjXBmVWHmWYu20PRRu4w h/yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=0U+oj3nskdVXo6rEftBkEg/utfKCjDxIjjgtG3KrgRY=; b=r9I5ztHmLtpNgvt3L+SYvJ4HimtoVOOKzm5KRWQZUqe0axrdG4+FA+kZ78CAHhmhob YV//C7jNbkFhx/eJmTLWEp5Vqh7s8xM7HH1Zyn8fjGFimtDDoQ6y0j2fnU5tpWWLBXgh 4s+Wl+35uK+xVj/U3Rb3P8ZzeNe9ddvPY7avTKNd8+GpnlHzSBJhCNJUeRiR7+k+ULZb nh2W0SiAFhJNocMd3g8P0Wqby9f+sYJszF6b2HQ5xARWzQas2FBJbtlsUIvaKDpxhXlb V/+wYB9kKbE8SAOHX6/oRlPRhA9sWH60zFkrYjkl4Kz29XbvHbqU3/9UEycpWfv+txi4 QzVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SPWDMNZb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk6-20020a17090b4a0600b001eee0c42b51si34622876pjb.190.2022.07.06.13.39.56; Wed, 06 Jul 2022 13:40:09 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SPWDMNZb; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234418AbiGFUVl (ORCPT + 99 others); Wed, 6 Jul 2022 16:21:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231916AbiGFUVh (ORCPT ); Wed, 6 Jul 2022 16:21:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FD6020F77; Wed, 6 Jul 2022 13:21:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2D2CFB81ECC; Wed, 6 Jul 2022 20:21:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93301C341C0; Wed, 6 Jul 2022 20:21:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657138893; bh=gOcE8HPlzWbrrVF7KpH0louwUHrwrtqqE+BWqbjxFQg=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=SPWDMNZbK0/XjRSnLQOxqLWkLpqI/1rDlyOvfopFPr/oagPQAbxHsApeJAjQGKPvY mWJ9UoUz0D0URe53P+Rsy0Aj8v8exukL0e3cGmwCS/fkTBCRffl69ZNE/yHeQmvYMN TbhdJpEX8hHIAUPJMZMg+A6/A5vmttfMObCxsZZoLYf3wJloH4cZLJSxBgiwHZaFdG BtuUEuJ5motTuKyZp20CNwuHiBBu4eOwJ+O79oE3ljhP9eyVNpzvnC22l5kvrNJpEd 3yt1CNi04owS5mOaTyM6J4kSV9fVMMqmV0T57BLo4YvaxftGXT4YzIAx+uko9iZeO4 +dyzDVuUMKHNw== Date: Wed, 6 Jul 2022 15:21:31 -0500 From: Bjorn Helgaas To: Pierre Gondois Cc: linux-kernel@vger.kernel.org, Bjorn Helgaas , "Rafael J. Wysocki" , Len Brown , linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH RESEND v1 1/2] ACPI/PCI: Make _SRS optional for link device Message-ID: <20220706202131.GA218207@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <35de3948-d8f2-c2da-05f9-995eecf275ce@arm.com> X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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, Jul 06, 2022 at 11:52:56AM +0200, Pierre Gondois wrote: > On 7/5/22 19:29, Bjorn Helgaas wrote: > > On Fri, Jul 01, 2022 at 06:16:23PM +0200, Pierre Gondois wrote: > > > From: Pierre Gondois > > > > > > In ACPI 6.4, s6.2.13 "_PRT (PCI Routing Table)", PCI legacy > > > interrupts can be described though a link device (first model). > > > From s6.2.16 "_SRS (Set Resource Settings)": > > > "This optional control method [...]" > > > > > > Make it optional to have a _SRS method for link devices. > > > > I think it would be helpful to outline the reason for wanting these > > changes in the commit log. Otherwise we don't know the benefit and > > it's harder to justify making the change since it's not an obvious > > cleanup. > > > > IIRC from [1] there *is* a good reason: you need to use Interrupt Link > > devices so you can specify "level triggered, active high". > > > > Without an Interrupt Link, you would get the default "level triggered, > > active low" setting, which apparently isn't compatible with GICv2. > > > > I assume this fixes a device that previously didn't work correctly, > > but I don't see the details of that in the bugzilla. I'm a little > > confused about this. Isn't GICv2 widely used already? How are things > > working now? Or are there just a lot of broken devices? > > It was unsure which of the 2 models described in ACPI 6.4, s6.2.13 > "_PRT (PCI Routing Table)" would be used for UEFI for kvmtool. > > Remainder: > The first model allows to accurately describe interrupts: level/edge > triggered and active high/low. Interrupts are also configurable with > _CRS/_PRS/_SRS/_DIS methods > The second model allows to describe hardwired interrupts, and are > by default level triggered, active low. > > The kernel is aware that GivV2 interrupts are active high, so there > was actually no need to accurately describe them. Thus the second > model was used. > While experimenting, we temporarily had a configuration using > the first model, and only had a _CRS method (no _PRS/_SRS), which > triggered some warnings. OK, thanks. So it sounds like there is some existing kernel code that special-cases GICv2 interrupts to make them level/high, and that code would not have been necessary if _PRS/_SRS had been optional from the beginning. I don't think we could ever *remove* that code because there's firmware in the field that relies on it, and that firmware will never be updated. > So these patches are not fixes for existing platforms, but merely > to make _PRS/_SRS methods optional. > > In [1] I said I would submit patches to change that. If you think > this is not necessary as the configuration is non-existing, I am > perfectly fine to drop the patches. > > Also as Rafael noted, the _DIS method should also be taken into > consideration if _PRS/_SRS are made optional. But that said, I'm not opposed to making _PRS/_SRS optional if that makes legal and reasonable _PRT descriptions work, and if all the considerations Rafael mentioned are taken care of. Bjorn