From patchwork Thu Apr 11 01:32:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1922322 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VFMdy25Svz1yYQ for ; Thu, 11 Apr 2024 11:33:10 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rujJI-0004jp-0e; Thu, 11 Apr 2024 01:33:04 +0000 Received: from mail-oa1-f46.google.com ([209.85.160.46]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rujJG-0004ht-3l for kernel-team@lists.ubuntu.com; Thu, 11 Apr 2024 01:33:02 +0000 Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-22efc6b8dc5so3126496fac.0 for ; Wed, 10 Apr 2024 18:33:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712799180; x=1713403980; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=+6X/77bQlIuKIqoqBh8UNVxuA7UAn62EVxr9gH94c4U=; b=FRsZ5Lm/jXfqyyAbEp5zlf5CU021+kynrBV/464MrykPaQWRCpsZ616yS1nrrYzTfN QuOIuDLQ8oYlsW1dUAshQ2VT+YCjQrZRNb9MLkuJ18kWu/FvRyrDhZPVdOQu5sQQNGfL EaVYGVZiuKcdu+XQ8ynjqIkyp2KY5kPLmYEPVR5TOlYeZl/ZxxOAiG8Wg/bf05Tayp2P vrebKpnrDzsEoXHZEM2NBY20J5XI4RH0zH7Kf2yjBHgcS13UshQjNWze2AYh8l1YMnI6 JWAb/ikbKl+8Gv6w8KJUgaLqe8pIHiRZ+pBmu0RJD6KsKkpc8GloLvmRjNyyaQ4Wvt9d /Cxw== X-Gm-Message-State: AOJu0YzZhhMqlQZrXOxuJpqo5TMCV7jn5P3+6moduwYiN+5c3NpmEmnY LdIYyWIGl17oRQ7h0O+7xlhA5q5lkca4Si6MAntb5JH4oO7VQg2+aE6oVBDV X-Google-Smtp-Source: AGHT+IFtG8iWs8IDz/SMVB6H67ZV+1N1IFmQaUVEf4TmAw4IrAi3Ocgh/h6cFicfTCR9sc79PSahhA== X-Received: by 2002:a05:6870:45a6:b0:22e:dfbc:4d90 with SMTP id y38-20020a05687045a600b0022edfbc4d90mr4480133oao.5.1712799180248; Wed, 10 Apr 2024 18:33:00 -0700 (PDT) Received: from localhost (211-75-139-218.hinet-ip.hinet.net. [211.75.139.218]) by smtp.gmail.com with ESMTPSA id a24-20020a056a0011d800b006eadf879a30sm295703pfu.179.2024.04.10.18.32.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 18:32:59 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/7][Noble] PCI/ASPM: Always build aspm.c Date: Thu, 11 Apr 2024 09:32:48 +0800 Message-Id: <20240411013253.184137-3-acelan.kao@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240411013253.184137-1-acelan.kao@canonical.com> References: <20240411013253.184137-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.160.46; envelope-from=acelan@gmail.com; helo=mail-oa1-f46.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: "David E. Box" BugLink: https://bugs.launchpad.net/bugs/2042500 Some ASPM-related tasks, such as save and restore of LTR and L1SS capabilities, still need to be performed when CONFIG_PCIEASPM is not enabled. To prepare for these changes, wrap the current code in aspm.c with an #ifdef and always build the file. Link: https://lore.kernel.org/r/20240128233212.1139663-2-david.e.box@linux.intel.com [bhelgaas: split build change from function moves] Link: https://lore.kernel.org/r/20240223205851.114931-3-helgaas@kernel.org Signed-off-by: David E. Box Signed-off-by: Bjorn Helgaas (cherry picked from commit f3994bba8200b49e3eacbe5914cd13f228e0db37) Signed-off-by: Chia-Lin Kao (AceLan) --- drivers/pci/pcie/Makefile | 2 +- drivers/pci/pcie/aspm.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pcie/Makefile b/drivers/pci/pcie/Makefile index 8de4ed5f98f1..6461aa93fe76 100644 --- a/drivers/pci/pcie/Makefile +++ b/drivers/pci/pcie/Makefile @@ -6,7 +6,7 @@ pcieportdrv-y := portdrv.o rcec.o obj-$(CONFIG_PCIEPORTBUS) += pcieportdrv.o -obj-$(CONFIG_PCIEASPM) += aspm.o +obj-y += aspm.o obj-$(CONFIG_PCIEAER) += aer.o err.o obj-$(CONFIG_PCIEAER_INJECT) += aer_inject.o obj-$(CONFIG_PCIE_PME) += pme.o diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index b5d0a6d56983..91712c7572e0 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -24,6 +24,8 @@ #include "../pci.h" +#ifdef CONFIG_PCIEASPM + #ifdef MODULE_PARAM_PREFIX #undef MODULE_PARAM_PREFIX #endif @@ -1533,3 +1535,5 @@ bool pcie_aspm_support_enabled(void) { return aspm_support_enabled; } + +#endif /* CONFIG_PCIEASPM */