Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1096778rdh; Fri, 27 Oct 2023 04:55:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEvxD40LmFrRJedh//OFcxs1BHGXMjo6ed82agGkQK9V+iy8gBHa/ZhwK7pZYC5r3zoSges X-Received: by 2002:a05:6808:114c:b0:3b2:e9ab:68e2 with SMTP id u12-20020a056808114c00b003b2e9ab68e2mr2724635oiu.7.1698407724548; Fri, 27 Oct 2023 04:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698407724; cv=none; d=google.com; s=arc-20160816; b=h0M8LfzH6BNpcgeifYEsYFCD6LoGbYJ571U0nkqtd+uwUkKU3yHFW8ThNqA4WnZl56 VxEgKDFXW/qoyoPA/0RQ0e/sIQoe1D5GFTzU+pwtEE5cd/5UHKipOIGpScbsjJqwr80b 8Yb6kjq7hEaJJcZzDg71JJ4DOqGotw8JWNN2hbcqEBanu3W7spnfE3usRfhUOGSwP37O gECZv3iszXUljA50Td8lStv3OxA3M5l3GiSrZUSt3G8wDLyfWNZA5tF3Uf/BqkxyQn+h pl+n5S0XDiU3wQA31SMsDUg1JzdieW2xHU8IL2wMuJ8DiHgIYAw/c87PMmMmxOCnNVkV OzxA== 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 :references:message-id:subject:cc:to:from:date:dkim-signature; bh=e5FujhKIaH/uwx0lIrEstVD0nII/dzmNIeNJ8ebqYu0=; fh=U+L6H2Iabh4xdi9P7tKrqfSzWqWVFB+uYyqZvAYy2io=; b=un1S5SeBtOOhtAXGf3Ih8sS7Cf9D3exi6XtUSvOe40OJ+tRczTxjfYf2k7HJc+I17o rktA5j++PMF2soqpeYnk1/KZojppgj+hQG3ZZjBmhIXJdy3cQLLRReIdxKaUsinQnaPs Jaj3ClnC14Qn5v3TnFv3V/Gj11h2szF3ApNjdgTvIJqLaP0pkVvZeoGOwZKTtSJJlWVb u+I7EWjDMwAFnrQXorgXRFYoSLxBBjZiqJJD7M9I3ct4AIToOllNS46n5gFQuUi4JXii jFs3Lqk9na2Htba8zwztoSI+zV6hwnNV8HtGxh/TEhO6w7myS2KwEol+qhLMAvVOU0UH oOXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=StVDK6iW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id 191-20020a2508c8000000b00d9cc11ca55esi2236315ybi.215.2023.10.27.04.55.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 04:55:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=StVDK6iW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 0711882EA155; Fri, 27 Oct 2023 04:55:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345804AbjJ0LzL (ORCPT + 99 others); Fri, 27 Oct 2023 07:55:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345801AbjJ0LzJ (ORCPT ); Fri, 27 Oct 2023 07:55:09 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4262BD57 for ; Fri, 27 Oct 2023 04:55:04 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1c8a1541232so17720285ad.0 for ; Fri, 27 Oct 2023 04:55:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1698407703; x=1699012503; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=e5FujhKIaH/uwx0lIrEstVD0nII/dzmNIeNJ8ebqYu0=; b=StVDK6iWENOIw4cbhc1kGnRGHoFOc+mmrjv3JwtRZMaGFn6+6vv1FCNwb9w+V1F9lF X+fCT1jk9DSxIIMBWzhcis5IcSUn6wvFM2mgb+hDXzkEEddNoSnXJ5seAJG3sIMafw70 GXzinIDEgB3EJ/ka2nAJzSjgTFE6xIC1bx/qpxBSNOCoD+OdKQM3INsvkQc55IaqodfW vyY8uLyrndhYDr/4vpABnT00QCaw9BLbck4k2IoRC2RYdeoVdTqd6/MSd+iUqq408SDK fofxJnHChiqm/zSWNkBCj017d+6VVAMtLPob7rXYl/fuNwX6jCMqdrKfLG4kdW61d0qS 1njQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698407703; x=1699012503; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=e5FujhKIaH/uwx0lIrEstVD0nII/dzmNIeNJ8ebqYu0=; b=NQNZ8cTLaWQbOKQCHCpUZaFmlRpGp91131K0Jh39Meslh38xaDXOeFx+2QwuC4LH+T vjwrBTV63+dy7GyQLHNOipBGU4C8jETqf45ulyMyZjwqMF5o4BUPASaZemlavSQ8Og54 yGsIef3aMDf+xZ5Ph2/7AT7nVw6mUlenaBE+dJdkbCEjaBXTOzuc0VH7v532Iwe6BFZi +hCazwxuh8ZqUcDTsqCmHOPG+w5PjmB1Xg3o922I9pJT9cl+koRwzXdCByA6CWmpj5iq m/kV03PcvBP88+3cN7clo+ZQvCbZ5pND4E7aXBeqJdTRrNS7GA2dhZIaUnKbG3p2JEq7 Jfgw== X-Gm-Message-State: AOJu0YxQVWWruaniegMFfN366PHdtFUT+qOUEqpAR3dg2FUwl82HWGtF dRbiHbtwL9Zmg4OCBaF8JPE5Lw== X-Received: by 2002:a17:902:cf41:b0:1ca:7086:60f7 with SMTP id e1-20020a170902cf4100b001ca708660f7mr3256113plg.28.1698407703704; Fri, 27 Oct 2023 04:55:03 -0700 (PDT) Received: from sunil-laptop ([106.51.188.78]) by smtp.gmail.com with ESMTPSA id f12-20020a170902684c00b001b9f032bb3dsm1424132pln.3.2023.10.27.04.54.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 04:55:03 -0700 (PDT) Date: Fri, 27 Oct 2023 17:24:51 +0530 From: Sunil V L To: Bjorn Helgaas Cc: 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, linux-serial@vger.kernel.org, Catalin Marinas , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Anup Patel , Thomas Gleixner , Greg Kroah-Hartman , Jiri Slaby , Conor Dooley , Andrew Jones , Atish Kumar Patra , Haibo Xu Subject: Re: [RFC PATCH v2 13/21] irqchip: riscv-intc: Add ACPI support for AIA Message-ID: References: <20231025202344.581132-14-sunilvl@ventanamicro.com> <20231026165150.GA1825130@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 27 Oct 2023 04:55:22 -0700 (PDT) On Fri, Oct 27, 2023 at 04:59:31PM +0530, Sunil V L wrote: > Hi Bjorn, > > On Thu, Oct 26, 2023 at 11:51:50AM -0500, Bjorn Helgaas wrote: > > On Thu, Oct 26, 2023 at 01:53:36AM +0530, Sunil V L wrote: > > > The RINTC subtype structure in MADT also has information about other > > > interrupt controllers like MMIO. So, save those information and provide > > > interfaces to retrieve them when required by corresponding drivers. > > > > > @@ -218,7 +306,19 @@ static int __init riscv_intc_acpi_init(union acpi_subtable_headers *header, > > > > > + * MSI controller (IMSIC) in RISC-V is optional. So, unless > > > + * IMSIC is discovered, set system wide MSI support as > > > + * unsupported. Once IMSIC is probed, MSI support will be set. > > > + */ > > > + pci_no_msi(); > > > > It doesn't seem like we should have to tell the PCI core about > > functionality we *don't* have. > > > > I would think IMSIC would be detected before enumerating PCI devices > > that might use it, and if we *haven't* found an IMSIC by the time we > > get to pci_register_host_bridge(), would/should we set > > PCI_BUS_FLAGS_NO_MSI there? > > > The check in pci_register_host_bridge() is like below. > > if (bridge->msi_domain && !dev_get_msi_domain(&bus->dev) && > !pci_host_of_has_msi_map(parent)) > bus->bus_flags |= PCI_BUS_FLAGS_NO_MSI; > > When there is no IMSIC, bridge->msi_domain is 0 and hence > PCI_BUS_FLAGS_NO_MSI will never be set. Do you recommend to set > PCI_BUS_FLAGS_NO_MSI if bridge->msi_domain is 0? Let me know if I am > missing something. > What seems to work is, setting bridge->msi_domain = true in pci_create_root_bus() similar to how pci_host_common_probe() sets for OF framework. Would that be better solution? Thanks, Sunil