Merge tag ‘clk-fixes-for-linus’ of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/clk/linux [Linux 5.1]

Merge tag ‘clk-fixes-for-linus’ of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/clk/linux [Linux 5.1]

This Linux kernel change "Merge tag ‘clk-fixes-for-linus’ of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/clk/linux" is included in the Linux 5.1 release. This change is authored by Linus Torvalds <torvalds [at] linux-foundation.org> on Fri May 3 08:55:06 2019 -0700. The commit for this change in Linux stable tree is 8f76216 (patch). Other info about this change: Merge: 46572f7 b88c9f4

Merge tag 'clk-fixes-for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk fixes from Stephen Boyd:
 "Two fixes for the NKMP clks on Allwinner SoCs, a locking fix for
  clkdev where we forgot to hold a lock while iterating a list that can
  change, and finally a build fix that adds some stubs for clk APIs that
  are used by devfreq drivers on platforms without the clk APIs"

* tag 'clk-fixes-for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/clk/linux:
  clk: Add missing stubs for a few functions
  clkdev: Hold clocks_mutex while iterating clocks list
  clk: sunxi-ng: nkmp: Explain why zero width check is needed
  clk: sunxi-ng: nkmp: Avoid GENMASK(-1, 0)

There is no are 0 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/pci/pcie/Kconfig   | 8 ++++++++
 drivers/pci/pcie/Makefile  | 2 +-
 drivers/pci/pcie/portdrv.h | 4 ++++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pcie/Kconfig b/drivers/pci/pcie/Kconfig
index 5cbdbca..362eb8c 100644
--- a/drivers/pci/pcie/Kconfig
+++ b/drivers/pci/pcie/Kconfig
@@ -142,3 +142,11 @@ config PCIE_PTM

      This is only useful if you have devices that support PTM, but it
      is safe to enable even if you don't.
+
+config PCIE_BW
+   bool "PCI Express Bandwidth Change Notification"
+   depends on PCIEPORTBUS
+   help
+     This enables PCI Express Bandwidth Change Notification.  If
+     you know link width or rate changes occur only to correct
+     unreliable links, you may answer Y.
diff --git a/drivers/pci/pcie/Makefile b/drivers/pci/pcie/Makefile
index f1d7bc1..efb9d2e 100644
--- a/drivers/pci/pcie/Makefile
+++ b/drivers/pci/pcie/Makefile
@@ -3,7 +3,6 @@
 # Makefile for PCI Express features and port driver

 pcieportdrv-y          := portdrv_core.o portdrv_pci.o err.o
-pcieportdrv-y          += bw_notification.o

 obj-$(CONFIG_PCIEPORTBUS)  += pcieportdrv.o

@@ -13,3 +12,4 @@ obj-$(CONFIG_PCIEAER_INJECT)  += aer_inject.o
 obj-$(CONFIG_PCIE_PME)     += pme.o
 obj-$(CONFIG_PCIE_DPC)     += dpc.o
 obj-$(CONFIG_PCIE_PTM)     += ptm.o
+obj-$(CONFIG_PCIE_BW)      += bw_notification.o
diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h
index 1d50dc5..944827a 100644
--- a/drivers/pci/pcie/portdrv.h
+++ b/drivers/pci/pcie/portdrv.h
@@ -49,7 +49,11 @@
 static inline int pcie_dpc_init(void) { return 0; }
 #endif

+#ifdef CONFIG_PCIE_BW
 int pcie_bandwidth_notification_init(void);
+#else
+static inline int pcie_bandwidth_notification_init(void) { return 0; }
+#endif

 /* Port Type */
 #define PCIE_ANY_PORT          (~0)

Leave a Reply

Your email address will not be published. Required fields are marked *