Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1083628rdh; Fri, 27 Oct 2023 04:29:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGOowjfTTJE0+v3FqWGdNPYmtsRwwhOcUfybp8QKbOW0YcpeLLRaenoh7o+Ov4y2veOQNrt X-Received: by 2002:a25:cb17:0:b0:da0:c8d1:5c5 with SMTP id b23-20020a25cb17000000b00da0c8d105c5mr2259788ybg.41.1698406183953; Fri, 27 Oct 2023 04:29:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698406183; cv=none; d=google.com; s=arc-20160816; b=g5GF6ktMkczWH7+NXrGuwZsODChnjQmCPyAGuIb1mS0Y/rIm/g3rorXNVbQ57CK9Qt PFz4vG5xNWT3HysRCjJbdhe3IRnmkiY1gX3zTEH1XFMxamVQ3XLYKu6u8n4rZI1epQVV YmfKbNjex+MFlyZ+S8pMcEYLdjqhtHubT5L59VZLzE+BG5zmebxn0H/eMPfPo+wt3rv1 zJAVO/wR1ZR/QcUR/bHsh7oDVJQRC2K7IVNvwOIyRtUDlybxpYDQFJ4k4ksoslOns2CS tg3QiVJGaVrfX0fJj6XQkG7r8ICI9g9+tpRgy8L6CDAmNQKqWUUcZsv6UiIIJVZtyRLZ udug== 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=vI28YtitrNIniIpGPiCXYWH3fIICBsHFcX18SbMwXaI=; fh=U+L6H2Iabh4xdi9P7tKrqfSzWqWVFB+uYyqZvAYy2io=; b=gcuwMtF5N2Fdpy8gH1adaiYKCAjB4ImJ/B2NHg2VCsb/pf6IesKaaPXA4Xensjfjp1 ibzy42BMyURTTTHSWGP0UaN1n8Po52a6Vyds8fXsLtvsZYmkbUvgOcKeFYgnF6Ckb9gQ C0ik1fhPSudndwFv6mgukllVUMEv4+R5JgLJAZms6NN2+V3rb+Tc7XGKpjD3DUztXAPT KewIoJjA4r0iMH/IVm9uOWOTlbzh7vPzadqINExzyFjCI1ArpX/wpIwVJU1UTBxClnum EQG2U9LJzAvOahg4tx5cA0cjYjwVNPG8BIecAhT+1ltXhQ0vV1DVGQA5cD+/iI8lysIr CPIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=FkLUCTFa; 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 l84-20020a252557000000b00d9a5b63cdecsi2381988ybl.105.2023.10.27.04.29.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 04:29:43 -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=FkLUCTFa; 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 6A50A80E0A73; Fri, 27 Oct 2023 04:29:41 -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 S1345770AbjJ0L3g (ORCPT + 99 others); Fri, 27 Oct 2023 07:29:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345735AbjJ0L3e (ORCPT ); Fri, 27 Oct 2023 07:29:34 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60418128 for ; Fri, 27 Oct 2023 04:29:32 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-27d129e2e7cso1708293a91.3 for ; Fri, 27 Oct 2023 04:29:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1698406172; x=1699010972; 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=vI28YtitrNIniIpGPiCXYWH3fIICBsHFcX18SbMwXaI=; b=FkLUCTFaZcySOAam9iz6DHlyvMFgwb0dciaQzfdEKzSevC6tu7bXghqDN03SvNdfXI TpVwftwoRNylOP52CRKkfEd+HY6JOQtmKcnBIu1bAyG/Ld23VYJTHCS830eXVN/+1WBM kaAWuFHIbGb+5FObTqY8EYp0t1xctpoP6eFlbLuTew1V6TZOKIBp1igLyRcrviXNXMzZ sLDZszDFDI7J368kdHkZ+dvHbQnlRjH9r8pmTeCi5gny46waklCU9d/weTWNNrqjP2wr EkuRxqDu1n98QeIm87t0zIce4WfpuNi1WOKztgx7E1VzD51Vg5wY81r+AEulrqMDvYHq c9aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698406172; x=1699010972; 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=vI28YtitrNIniIpGPiCXYWH3fIICBsHFcX18SbMwXaI=; b=NA+D1M6sXq4PzZt6mZ4UVVOgOAC8FZfLHS4uRjY9S0jx44kDZTnXTEgPV4hK/mgW8p RN0Zs/6FiMb5SogI+NDC+ND86zG4gZpcQt8tLQU8//ZhLG8wX/jSsNBiRIs9m2tMChKR ATe7jMv0oAwe3Pw3Ny03JQ6BhH/YoxQ+brW2Vl6t2xL+YP2NGK/uvTve56l8mmM6uQoE UQn4kgfae5kJ6kG96jhaX35TXfGXeZRuunaOdLkIpnovoDe5SUgSsCsBsW1KIeZOcv1Z y6qnY3Om1TFD+LEsXqielH3Z4nHOzW2TpuMt6jqIKfBRlK5uzYJ18VpLmLgGiVupGMz+ Hjyg== X-Gm-Message-State: AOJu0Ywd83THoqR117xOrubykGE70v+/7iHsey/jONtE8YGFvRaI5xB6 thssy+GVB4F5FrRFTPhv8tLA7w== X-Received: by 2002:a17:90b:100b:b0:27d:1051:83c4 with SMTP id gm11-20020a17090b100b00b0027d105183c4mr2196967pjb.12.1698406171798; Fri, 27 Oct 2023 04:29:31 -0700 (PDT) Received: from sunil-laptop ([106.51.188.78]) by smtp.gmail.com with ESMTPSA id r65-20020a17090a43c700b0028018af8dc2sm252642pjg.23.2023.10.27.04.29.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 04:29:31 -0700 (PDT) Date: Fri, 27 Oct 2023 16:59:19 +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: <20231026165150.GA1825130@bhelgaas> 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:29:41 -0700 (PDT) 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. Thanks, Sunil