linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] powerpc/pseries: Make PCI non-optional
@ 2015-10-01  6:44 Michael Ellerman
  2015-10-01  6:44 ` [PATCH 2/4] powerpc/pseries: Remove use of CONFIG_PCI Michael Ellerman
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Michael Ellerman @ 2015-10-01  6:44 UTC (permalink / raw)
  To: linuxppc-dev

The pseries build with PCI=n looks to have been broken for at least 5
years, and no one's noticed or cared.

Following the obvious breakages backward, the first commit I can find
that builds is the parent of 2eb4afb69ff3 ("powerpc/pci: Move pseries
code into pseries platform specific area") from April 2009.

A distro would never ship a PCI=n kernel, so it is only useful for folks
building custom kernels. Also on KVM the virtio devices appear on PCI,
so it would only be useful if you were building kernels specifically to
run on PowerVM and with no PCI devices.

The added code complexity, and testing load (which we've clearly not
been doing), is not justified by the small reduction in kernel size for
such a niche use case.

So just make PCI non-optional on pseries.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/platforms/pseries/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index 54c87d5d349d..d9068a3d6af4 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -4,6 +4,7 @@ config PPC_PSERIES
 	select HAVE_PCSPKR_PLATFORM
 	select MPIC
 	select OF_DYNAMIC
+	select PCI
 	select PCI_MSI
 	select PPC_XICS
 	select PPC_ICP_NATIVE
@@ -15,7 +16,6 @@ config PPC_PSERIES
 	select RTAS_ERROR_LOGGING
 	select PPC_UDBG_16550
 	select PPC_NATIVE
-	select PPC_PCI_CHOICE if EXPERT
 	select PPC_DOORBELL
 	select HAVE_CONTEXT_TRACKING
 	select HOTPLUG_CPU if SMP
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/4] powerpc/pseries: Remove use of CONFIG_PCI
  2015-10-01  6:44 [PATCH 1/4] powerpc/pseries: Make PCI non-optional Michael Ellerman
@ 2015-10-01  6:44 ` Michael Ellerman
  2015-10-01  6:44 ` [PATCH 3/4] powerpc/pseries: Move PCI objects to obj-y Michael Ellerman
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2015-10-01  6:44 UTC (permalink / raw)
  To: linuxppc-dev

Now that we always have CONFIG_PCI=y for pseries, we can stop guarding
code with CONFIG_PCI ifdefs.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/platforms/pseries/iommu.c | 10 ----------
 arch/powerpc/platforms/pseries/setup.c |  4 ----
 2 files changed, 14 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 0946b98d75d4..bd98ce2be17b 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -532,7 +532,6 @@ static int tce_setrange_multi_pSeriesLP_walk(unsigned long start_pfn,
 	return tce_setrange_multi_pSeriesLP(start_pfn, num_pfn, arg);
 }
 
-#ifdef CONFIG_PCI
 static void iommu_table_setparms(struct pci_controller *phb,
 				 struct device_node *dn,
 				 struct iommu_table *tbl)
@@ -1292,15 +1291,6 @@ static u64 dma_get_required_mask_pSeriesLP(struct device *dev)
 	return dma_iommu_ops.get_required_mask(dev);
 }
 
-#else  /* CONFIG_PCI */
-#define pci_dma_bus_setup_pSeries	NULL
-#define pci_dma_dev_setup_pSeries	NULL
-#define pci_dma_bus_setup_pSeriesLP	NULL
-#define pci_dma_dev_setup_pSeriesLP	NULL
-#define dma_set_mask_pSeriesLP		NULL
-#define dma_get_required_mask_pSeriesLP	NULL
-#endif /* !CONFIG_PCI */
-
 static int iommu_mem_notifier(struct notifier_block *nb, unsigned long action,
 		void *data)
 {
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 9a83eb71b030..9e524c26db14 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -837,10 +837,6 @@ static int pSeries_pci_probe_mode(struct pci_bus *bus)
 	return PCI_PROBE_NORMAL;
 }
 
-#ifndef CONFIG_PCI
-void pSeries_final_fixup(void) { }
-#endif
-
 struct pci_controller_ops pseries_pci_controller_ops = {
 	.probe_mode		= pSeries_pci_probe_mode,
 };
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4] powerpc/pseries: Move PCI objects to obj-y
  2015-10-01  6:44 [PATCH 1/4] powerpc/pseries: Make PCI non-optional Michael Ellerman
  2015-10-01  6:44 ` [PATCH 2/4] powerpc/pseries: Remove use of CONFIG_PCI Michael Ellerman
@ 2015-10-01  6:44 ` Michael Ellerman
  2015-10-01  6:44 ` [PATCH 4/4] powerpc/pseries: Drop always true CONFIG_PSERIES_MSI Michael Ellerman
  2015-10-15 11:10 ` [1/4] powerpc/pseries: Make PCI non-optional Michael Ellerman
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2015-10-01  6:44 UTC (permalink / raw)
  To: linuxppc-dev

Make it entirely clear in the Makefile that we always build the pci
related files by moving them to obj-y.

Note that CONFIG_EEH is now always enabled on pseries, because it
depends on PSERIES && PCI.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/platforms/pseries/Makefile | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile
index 03480796af9a..952f4ba0546e 100644
--- a/arch/powerpc/platforms/pseries/Makefile
+++ b/arch/powerpc/platforms/pseries/Makefile
@@ -3,12 +3,11 @@ ccflags-$(CONFIG_PPC_PSERIES_DEBUG)	+= -DDEBUG
 
 obj-y			:= lpar.o hvCall.o nvram.o reconfig.o \
 			   setup.o iommu.o event_sources.o ras.o \
-			   firmware.o power.o dlpar.o mobility.o rng.o
+			   firmware.o power.o dlpar.o mobility.o rng.o \
+			   pci.o pci_dlpar.o eeh_pseries.o
 obj-$(CONFIG_SMP)	+= smp.o
 obj-$(CONFIG_SCANLOG)	+= scanlog.o
-obj-$(CONFIG_EEH)	+= eeh_pseries.o
 obj-$(CONFIG_KEXEC)	+= kexec.o
-obj-$(CONFIG_PCI)	+= pci.o pci_dlpar.o
 obj-$(CONFIG_PSERIES_MSI)	+= msi.o
 obj-$(CONFIG_PSERIES_ENERGY)	+= pseries_energy.o
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/4] powerpc/pseries: Drop always true CONFIG_PSERIES_MSI
  2015-10-01  6:44 [PATCH 1/4] powerpc/pseries: Make PCI non-optional Michael Ellerman
  2015-10-01  6:44 ` [PATCH 2/4] powerpc/pseries: Remove use of CONFIG_PCI Michael Ellerman
  2015-10-01  6:44 ` [PATCH 3/4] powerpc/pseries: Move PCI objects to obj-y Michael Ellerman
@ 2015-10-01  6:44 ` Michael Ellerman
  2015-10-15 11:10 ` [1/4] powerpc/pseries: Make PCI non-optional Michael Ellerman
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2015-10-01  6:44 UTC (permalink / raw)
  To: linuxppc-dev

Now that pseries selects PCI_MSI && PCI, EEH will always be true, and
therefore CONFIG_PSERIES_MSI will always be true. So drop it, and move
msi.o to obj-y.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/platforms/pseries/Kconfig  | 5 -----
 arch/powerpc/platforms/pseries/Makefile | 3 +--
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index d9068a3d6af4..bec90fb30425 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -43,11 +43,6 @@ config DTL
 
 	  Say N if you are unsure.
 
-config PSERIES_MSI
-       bool
-       depends on PCI_MSI && PPC_PSERIES && EEH
-       default y
-
 config PSERIES_ENERGY
 	tristate "pSeries energy management capabilities driver"
 	depends on PPC_PSERIES
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile
index 952f4ba0546e..cf53be157624 100644
--- a/arch/powerpc/platforms/pseries/Makefile
+++ b/arch/powerpc/platforms/pseries/Makefile
@@ -4,11 +4,10 @@ ccflags-$(CONFIG_PPC_PSERIES_DEBUG)	+= -DDEBUG
 obj-y			:= lpar.o hvCall.o nvram.o reconfig.o \
 			   setup.o iommu.o event_sources.o ras.o \
 			   firmware.o power.o dlpar.o mobility.o rng.o \
-			   pci.o pci_dlpar.o eeh_pseries.o
+			   pci.o pci_dlpar.o eeh_pseries.o msi.o
 obj-$(CONFIG_SMP)	+= smp.o
 obj-$(CONFIG_SCANLOG)	+= scanlog.o
 obj-$(CONFIG_KEXEC)	+= kexec.o
-obj-$(CONFIG_PSERIES_MSI)	+= msi.o
 obj-$(CONFIG_PSERIES_ENERGY)	+= pseries_energy.o
 
 obj-$(CONFIG_HOTPLUG_CPU)	+= hotplug-cpu.o
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [1/4] powerpc/pseries: Make PCI non-optional
  2015-10-01  6:44 [PATCH 1/4] powerpc/pseries: Make PCI non-optional Michael Ellerman
                   ` (2 preceding siblings ...)
  2015-10-01  6:44 ` [PATCH 4/4] powerpc/pseries: Drop always true CONFIG_PSERIES_MSI Michael Ellerman
@ 2015-10-15 11:10 ` Michael Ellerman
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2015-10-15 11:10 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev

On Thu, 2015-01-10 at 06:44:31 UTC, Michael Ellerman wrote:
> The pseries build with PCI=n looks to have been broken for at least 5
> years, and no one's noticed or cared.
> 
> Following the obvious breakages backward, the first commit I can find
> that builds is the parent of 2eb4afb69ff3 ("powerpc/pci: Move pseries
> code into pseries platform specific area") from April 2009.
> 
> A distro would never ship a PCI=n kernel, so it is only useful for folks
> building custom kernels. Also on KVM the virtio devices appear on PCI,
> so it would only be useful if you were building kernels specifically to
> run on PowerVM and with no PCI devices.
> 
> The added code complexity, and testing load (which we've clearly not
> been doing), is not justified by the small reduction in kernel size for
> such a niche use case.
> 
> So just make PCI non-optional on pseries.
> 
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Series applied to powerpc next.

https://git.kernel.org/powerpc/c/4c9cd468b348c9e47f9380a5

cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-15 11:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-01  6:44 [PATCH 1/4] powerpc/pseries: Make PCI non-optional Michael Ellerman
2015-10-01  6:44 ` [PATCH 2/4] powerpc/pseries: Remove use of CONFIG_PCI Michael Ellerman
2015-10-01  6:44 ` [PATCH 3/4] powerpc/pseries: Move PCI objects to obj-y Michael Ellerman
2015-10-01  6:44 ` [PATCH 4/4] powerpc/pseries: Drop always true CONFIG_PSERIES_MSI Michael Ellerman
2015-10-15 11:10 ` [1/4] powerpc/pseries: Make PCI non-optional Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).