Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp353415rdb; Thu, 1 Feb 2024 10:14:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IGztYXE9KjV96sFNtRQPlpYVOhjN1L5+i3hqQyggzHROQKzclG6PAv03tv1OyfosqCpseHU X-Received: by 2002:a17:90a:3009:b0:293:f954:5407 with SMTP id g9-20020a17090a300900b00293f9545407mr5805731pjb.15.1706811285957; Thu, 01 Feb 2024 10:14:45 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWaLZsoy3zUc6di8L9N7Jw/PBPt3O2SwPB0AhZv3/D+ivjl+RNxf2BNXs0UxNHcwC3MIlxBMxvjogkqHFlVtDZcw6rtwqVg9Nl+a/EK4Q== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id gt21-20020a17090af2d500b0029615f63409si1807252pjb.174.2024.02.01.10.14.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 10:14:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48670-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-48670-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48670-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3EB8728E7D0 for ; Thu, 1 Feb 2024 18:13:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53DCB85293; Thu, 1 Feb 2024 18:10:43 +0000 (UTC) Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F004912FB05; Thu, 1 Feb 2024 18:10:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706811042; cv=none; b=H5NT471wBlpX4FR34nVXhHV1Qton3FCVZrBamA9LyJUa/0tTjDO2h35EfHY+kPDJUM7ePZyvcHY4ZejCbE6GfEzqmAwMeqJpQrWwZOZYxK7mnQ87q/PLo25CoC+0b5RzgZnelUEQHhVwK7v0pjTgQDk/0DBHM24R/UN582AruFM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706811042; c=relaxed/simple; bh=dNRmWLW4qsaW4MOpb+pEVEKn4Tx40C4u33xEP6L33ic=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=P8NzgCZg0cZ6ZwFUoMQt8Of4E0njZycQH9J3sfRFb1qm4j9SSAeGBr0QiS6xS5e0B2Q2gRkM01acnIIoogL+7tA11IQ+Nf8EXEWCiPcpgPdyfv/7YuQzaEuK8U0n1bMAvZp2l9G892QKN6NEqCluLpM5jQr3Nja0b6Lk8kDy3BQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.167.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-3be2ba0ffd8so165092b6e.0; Thu, 01 Feb 2024 10:10:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706811040; x=1707415840; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t7K2m1hjkCVzp42ssBbLht83KsIxMJIS717mDSy4hWI=; b=Ea+CSqkJza18DzkVs56PzokWhnV4mQxxhjlHhs2LhhRJt9taK0ELNYI+l7AXXSh7HQ mLOAUc33Ul6UluF2A8u7utLENr31FNSPvkH/+en53jsbBHcViJJHOfgvvz+B3aZIQ6L/ jp/zcLfAE5YUz2jZtzVqJHFctcnEvbXdHTRziAdzINtVLVOqX+Z9v762+q89FQYeKth7 TKqEIXdRD3QyIoalsIcPfjIOzhIVbNy/vt69zPAjau/YL0U5ASCdXkAsBvCTfvHR+pkR NG/o7iQ6iAAD8BsAJX4MuyUyYMxYsXY8m7E2+2csCWO/IIMdetwOVXlbgMbjA14Y+MM8 Hd3Q== X-Gm-Message-State: AOJu0YzThAUKPyNkXdcbE+KzKx8zwp5r18epDi7Hr2Y9U2F3TdO73zKO qPgdI2YoMavoj1mUelljpNvIx3wJM5IAl5zaG1IaTL68G0ib4BYnNnNGKIg/eOMj3R9VVJqn7tl iErPEiMaZmkmEIdy208vg4OyMzx0= X-Received: by 2002:a05:6870:828a:b0:218:d68f:fe29 with SMTP id q10-20020a056870828a00b00218d68ffe29mr3483142oae.3.1706811039953; Thu, 01 Feb 2024 10:10:39 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231219174526.2235150-1-sunilvl@ventanamicro.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Thu, 1 Feb 2024 19:10:28 +0100 Message-ID: Subject: Re: [RFC PATCH v3 00/17] RISC-V: ACPI: Add external interrupt controller support To: Sunil V L Cc: "Rafael J. Wysocki" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, Catalin Marinas , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , Len Brown , Anup Patel , Thomas Gleixner , Bjorn Helgaas , Haibo Xu , Conor Dooley , Andrew Jones , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Marc Zyngier Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 30, 2024 at 7:02=E2=80=AFAM Sunil V L wrote: > > On Tue, Dec 19, 2023 at 06:50:19PM +0100, Rafael J. Wysocki wrote: > > On Tue, Dec 19, 2023 at 6:45=E2=80=AFPM Sunil V L wrote: > > > > > > This series adds support for the below ECR approved by ASWG. > > > 1) MADT - https://drive.google.com/file/d/1oMGPyOD58JaPgMl1pKasT-VKsI= Kia7zR/view?usp=3Dsharing > > > > > > The series primarily enables irqchip drivers for RISC-V ACPI based > > > platforms. > > > > > > The series can be broadly categorized like below. > > > > > > 1) PCI ACPI related functions are migrated from arm64 to common file = so > > > that we don't need to duplicate them for RISC-V. > > > > > > 2) Introduced support for fw_devlink for ACPI nodes for IRQ dependenc= y. > > > This helps to support deferred probe of interrupt controller drivers. > > > > > > 3) Modified pnp_irq() to try registering the IRQ again if it sees it= in > > > disabled state. This solution is similar to how > > > platform_get_irq_optional() works for regular platform devices. > > > > > > 4) Added support for re-ordering the probe of interrupt controllers w= hen > > > IRQCHIP_ACPI_DECLARE is used. > > > > > > 5) ACPI support added in RISC-V interrupt controller drivers. > > > > > > This series is based on Anup's AIA v11 series. Since Anup's AIA v11 i= s > > > not merged yet and first time introducing fw_devlink, deferred probe = and > > > reordering support for IRQCHIP probe, this series is still kept as RF= C. > > > Looking forward for the feedback! > > > > > > Changes since RFC v2: > > > 1) Introduced fw_devlink for ACPI nodes for IRQ dependency. > > > 2) Dropped patches in drivers which are not required due to > > > fw_devlink support. > > > 3) Dropped pci_set_msi() patch and added a patch in > > > pci_create_root_bus(). > > > 4) Updated pnp_irq() patch so that none of the actual PNP > > > drivers need to change. > > > > > > Changes since RFC v1: > > > 1) Abandoned swnode approach as per Marc's feedback. > > > 2) To cope up with AIA series changes which changed irqchip d= river > > > probe from core_initcall() to platform_driver, added patch= es > > > to support deferred probing. > > > 3) Rebased on top of Anup's AIA v11 and added tags. > > > > > > To test the series, > > > > > > 1) Qemu should be built using the riscv_acpi_b2_v8 branch at > > > https://github.com/vlsunil/qemu.git > > > > > > 2) EDK2 should be built using the instructions at: > > > https://github.com/tianocore/edk2/blob/master/OvmfPkg/RiscVVirt/READM= E.md > > > > > > 3) Build Linux using this series on top of Anup's AIA v11 series. > > > > > > Run Qemu: > > > qemu-system-riscv64 \ > > > -M virt,pflash0=3Dpflash0,pflash1=3Dpflash1,aia=3Daplic-imsic \ > > > -m 2G -smp 8 \ > > > -serial mon:stdio \ > > > -device virtio-gpu-pci -full-screen \ > > > -device qemu-xhci \ > > > -device usb-kbd \ > > > -blockdev node-name=3Dpflash0,driver=3Dfile,read-only=3Don,filename= =3DRISCV_VIRT_CODE.fd \ > > > -blockdev node-name=3Dpflash1,driver=3Dfile,filename=3DRISCV_VIRT_VA= RS.fd \ > > > -netdev user,id=3Dnet0 -device virtio-net-pci,netdev=3Dnet0 \ > > > -kernel arch/riscv/boot/Image \ > > > -initrd rootfs.cpio \ > > > -append "root=3D/dev/ram ro console=3DttyS0 rootwait earlycon=3Duart= 8250,mmio,0x10000000" > > > > > > To boot with APLIC only, use aia=3Daplic. > > > To boot with PLIC, remove aia=3D option. > > > > > > This series is also available in acpi_b2_v3_riscv_aia_v11 branch at > > > https://github.com/vlsunil/linux.git > > > > > > Based-on: 20231023172800.315343-1-apatel@ventanamicro.com > > > (https://lore.kernel.org/lkml/20231023172800.315343-1-apatel@ventanam= icro.com/) > > > > > > Sunil V L (17): > > > arm64: PCI: Migrate ACPI related functions to pci-acpi.c > > > RISC-V: ACPI: Implement PCI related functionality > > > PCI: Make pci_create_root_bus() declare its reliance on MSI domains > > > ACPI: Add fw_devlink support for ACPI fwnode for IRQ dependency > > > ACPI: irq: Add support for deferred probe in acpi_register_gsi() > > > pnp.h: Reconfigure IRQ in pnp_irq() to support deferred probe > > > ACPI: scan.c: Add weak arch specific function to reorder the IRQCHI= P > > > probe > > > ACPI: RISC-V: Implement arch function to reorder irqchip probe entr= ies > > > irqchip: riscv-intc: Add ACPI support for AIA > > > irqchip: riscv-imsic: Add ACPI support > > > irqchip: riscv-aplic: Add ACPI support > > > irqchip: irq-sifive-plic: Add ACPI support > > > ACPI: bus: Add RINTC IRQ model for RISC-V > > > ACPI: bus: Add acpi_riscv_init function > > > ACPI: RISC-V: Create APLIC platform device > > > ACPI: RISC-V: Create PLIC platform device > > > irqchip: riscv-intc: Set ACPI irqmodel > > > > JFYI, I have no capacity to provide any feedback on this till 6.8-rc1 i= s out. > > > Hi Rafael, > > Gentle ping. > > Could you please provide feedback on the series? Patches 4, 5, 6, 7 and > 8 are bit critical IMO. So, I really look forward for your and other > ACPI experts!. There was quite a bit of discussion on patch [6/21] and it still seems relevant to me. ACPI actually has a way to at least indicate what the probe ordering should be which is _DEP. The current handling of _DEP in the kernel may not be covering this particular use case, but I would rather extend it (if necessary) instead of doing all of the -EPROBE_DEFER dance which seems fragile to me. Thanks!