From patchwork Wed Oct 25 20:23:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil V L X-Patchwork-Id: 13436742 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 306CAC25B6B for ; Wed, 25 Oct 2023 20:26:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=itLcs24a6ezjDbsmJJuV9J16wOD4QUYRMvmXWnZ/vf0=; b=Ak1fuL2vtfIz9d yarHgztjGHIHrxp1JQR6W3d3PS9oXEoAtAf3JCON1kCyzo/99IejzxW7DG08YC6Js4LkVVP0jN7Q1 g4Qa0L4fA759O23LWlIkNaTzFS9Eoodsx+CV0VyNcB0QcG4yeT4WMKh6IAIJYa+3Id1viIDosRqQa I5cPp+UqHpgKusgJ4yvdV9BrNm7Vpu2fy9BF6tdI1sfHzlCEN4aW70A10vqMKqxKZKXJQaSzVd4V1 Jcx8fEdBmWBRjhBZny6NH/huDhCfJDbhZB+gd2J0KLrzW70oCb0QJw9A1d3atk9U06Br/0vS2rcO5 OJ2jzmVfKDpKMrdattQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvkRw-00D3gg-0Q; Wed, 25 Oct 2023 20:25:56 +0000 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qvkRG-00D36X-04 for linux-arm-kernel@lists.infradead.org; Wed, 25 Oct 2023 20:25:15 +0000 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6bd73395bceso116947b3a.0 for ; Wed, 25 Oct 2023 13:25:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1698265513; x=1698870313; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ksJT9a6E7b+AgWOW+0QqZAQKxEPs+GfkSTk4Wygp/9k=; b=jLcyAYhWtSv+vNzEATJ1S9hqFJrTjg89uY+BsZeaPunCRAhvwFkIo0WH5kZA/q7ss7 +5bdvOToHeeGQJACB981qyWcGWch/UUAsufUY3nTRt+xdGSmJtNMUYYugkeTR4eULGYp keheaYVHZmhaxd/ziMqF6jrJYbvm5BtR1kIh5xfosQmWAe/l4pIMOFTPnR8hmGQw7LE2 /+tJ7suTe67CRwnpRiezXO+JIrcACOpNtB/EeIeKJV0SwU+E6m7c5XuEgASWzljOLBpH vDTkdPO0N3ohYVuSg4cp3CdG//eFhzYyEDvgkkVinCpH+KjwgC20pzEFws8uuYGC7p8p gjCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698265513; x=1698870313; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ksJT9a6E7b+AgWOW+0QqZAQKxEPs+GfkSTk4Wygp/9k=; b=pL2yJ4C2UVwDdfZt6gTOLj5dHY4RJ8HS5MdaKEVgwdtcEMJb/d24DzZHMHOUs7v70f GdEP6iHdG/HCTrb/tAh2IOtY2D/IE5lOt/wlGAbK7fRx5p5hzXSgNN5T/LO4DAqGjRFS e4WxXQoHmhfPXGGX9PPRXp2Wigraqlh9YGhPmLkSXeFWXnYyx9it4VQBRUO0kvnX/CM/ SiD0cEk6Q1l3F21IK4ukrgkWsPqHCWVzUIM589WVpXeRhTjHWf6IJ5cTcEq9Rj9GOG2i F+x8L2nQJnT/0Rn0wBOkERXM6huPQ9lhUEu13r7VYrcI5KuDf6vMVCy7jynAQa5d6ewT 4X6Q== X-Gm-Message-State: AOJu0YzPgaUjfKIggp1oDKqRtPAlue0tx4fUCfu673fv9ApOI/mqe7Aq 24PaHEX1tbG1SpvW4QCCmlDUCTZqeXybA0us4qNHow== X-Google-Smtp-Source: AGHT+IEV/ROdZJJDw08iKQqN+bmgqdHT2tEV8SRCTGnJc4fD81is4j8SLEFb3dBe1vSckHTdkPvdfA== X-Received: by 2002:a05:6a00:478c:b0:6b4:64ac:eab2 with SMTP id dh12-20020a056a00478c00b006b464aceab2mr801836pfb.1.1698265512788; Wed, 25 Oct 2023 13:25:12 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.188.78]) by smtp.gmail.com with ESMTPSA id y3-20020aa79423000000b006b84ed9371esm10079590pfo.177.2023.10.25.13.25.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 13:25:12 -0700 (PDT) From: Sunil V L To: 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 Cc: 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 , Sunil V L Subject: [RFC PATCH v2 11/21] PCI: MSI: Add helper function to set system wide MSI support Date: Thu, 26 Oct 2023 01:53:34 +0530 Message-Id: <20231025202344.581132-12-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231025202344.581132-1-sunilvl@ventanamicro.com> References: <20231025202344.581132-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231025_132514_058908_694215C5 X-CRM114-Status: GOOD ( 12.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Like pci_no_msi() used to disable MSI support, add a function to enable system wide MSI support. Signed-off-by: Sunil V L --- drivers/pci/msi/msi.c | 5 +++++ drivers/pci/pci.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c index ef1d8857a51b..e76ccb8b5f0b 100644 --- a/drivers/pci/msi/msi.c +++ b/drivers/pci/msi/msi.c @@ -913,3 +913,8 @@ void pci_no_msi(void) { pci_msi_enable = 0; } + +void pci_set_msi(void) +{ + pci_msi_enable = 1; +} diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 39a8932dc340..2f876c29f75c 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -167,8 +167,10 @@ extern unsigned int pci_pm_d3hot_delay; #ifdef CONFIG_PCI_MSI void pci_no_msi(void); +void pci_set_msi(void); #else static inline void pci_no_msi(void) { } +static inline void pci_set_msi(void) { } #endif void pci_realloc_get_opt(char *);