linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI,parisc: Enable 64-bit bus addresses on PA-RISC
@ 2015-09-02 16:17 Helge Deller
  2015-09-14  7:41 ` Meelis Roos
  0 siblings, 1 reply; 2+ messages in thread
From: Helge Deller @ 2015-09-02 16:17 UTC (permalink / raw)
  To: linux-parisc; +Cc: James Bottomley, linux-pci, Bjorn Helgaas, Meelis Roos

Commit 3a9ad0b ("PCI: Add pci_bus_addr_t") unconditionally introduced usage of
64-bit PCI bus addresses on all 64-bit platforms which broke PA-RISC.

It turned out that due to enabling the 64-bit addresses, the PCI logic decided
to use the GMMIO instead of the LMMIO region. This commit simply disables
registering the GMMIO and thus we fall back to use the LMMIO region as before.

Reverts commit 45ea2a5fed6dacb9bb0558d8b21eacc1c45d5bb4
("PCI: Don't use 64-bit bus addresses on PA-RISC")

To: linux-parisc@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Meelis Roos <mroos@linux.ee>
Cc: stable@vger.kernel.org  # v3.19+
Signed-off-by: Helge Deller <deller@gmx.de>


diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
index dceb9dd..a32c1f6 100644
--- a/drivers/parisc/lba_pci.c
+++ b/drivers/parisc/lba_pci.c
@@ -1556,8 +1556,11 @@ lba_driver_probe(struct parisc_device *dev)
 	if (lba_dev->hba.lmmio_space.flags)
 		pci_add_resource_offset(&resources, &lba_dev->hba.lmmio_space,
 					lba_dev->hba.lmmio_space_offset);
-	if (lba_dev->hba.gmmio_space.flags)
-		pci_add_resource(&resources, &lba_dev->hba.gmmio_space);
+	if (lba_dev->hba.gmmio_space.flags) {
+		/* pci_add_resource(&resources, &lba_dev->hba.gmmio_space); */
+		pr_warn("LBA: Not registering GMMIO space %pR\n",
+			&lba_dev->hba.gmmio_space);
+	}
 
 	pci_add_resource(&resources, &lba_dev->hba.bus_num);
 
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 944f500..73de4ef 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -2,7 +2,7 @@
 # PCI configuration
 #
 config PCI_BUS_ADDR_T_64BIT
-	def_bool y if (ARCH_DMA_ADDR_T_64BIT || (64BIT && !PARISC))
+	def_bool y if (ARCH_DMA_ADDR_T_64BIT || 64BIT)
 	depends on PCI
 
 config PCI_MSI

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

* Re: [PATCH] PCI,parisc: Enable 64-bit bus addresses on PA-RISC
  2015-09-02 16:17 [PATCH] PCI,parisc: Enable 64-bit bus addresses on PA-RISC Helge Deller
@ 2015-09-14  7:41 ` Meelis Roos
  0 siblings, 0 replies; 2+ messages in thread
From: Meelis Roos @ 2015-09-14  7:41 UTC (permalink / raw)
  To: Helge Deller; +Cc: linux-parisc, James Bottomley, linux-pci, Bjorn Helgaas

> Commit 3a9ad0b ("PCI: Add pci_bus_addr_t") unconditionally introduced usage of
> 64-bit PCI bus addresses on all 64-bit platforms which broke PA-RISC.
> 
> It turned out that due to enabling the 64-bit addresses, the PCI logic decided
> to use the GMMIO instead of the LMMIO region. This commit simply disables
> registering the GMMIO and thus we fall back to use the LMMIO region as before.
> 
> Reverts commit 45ea2a5fed6dacb9bb0558d8b21eacc1c45d5bb4
> ("PCI: Don't use 64-bit bus addresses on PA-RISC")

Seems to work fine on my A500, RP3410 and RP3440, with 4.3.0-rc1.

> To: linux-parisc@vger.kernel.org
> Cc: linux-pci@vger.kernel.org
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Meelis Roos <mroos@linux.ee>
> Cc: stable@vger.kernel.org  # v3.19+
> Signed-off-by: Helge Deller <deller@gmx.de>
> 
> 
> diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
> index dceb9dd..a32c1f6 100644
> --- a/drivers/parisc/lba_pci.c
> +++ b/drivers/parisc/lba_pci.c
> @@ -1556,8 +1556,11 @@ lba_driver_probe(struct parisc_device *dev)
>  	if (lba_dev->hba.lmmio_space.flags)
>  		pci_add_resource_offset(&resources, &lba_dev->hba.lmmio_space,
>  					lba_dev->hba.lmmio_space_offset);
> -	if (lba_dev->hba.gmmio_space.flags)
> -		pci_add_resource(&resources, &lba_dev->hba.gmmio_space);
> +	if (lba_dev->hba.gmmio_space.flags) {
> +		/* pci_add_resource(&resources, &lba_dev->hba.gmmio_space); */
> +		pr_warn("LBA: Not registering GMMIO space %pR\n",
> +			&lba_dev->hba.gmmio_space);
> +	}
>  
>  	pci_add_resource(&resources, &lba_dev->hba.bus_num);
>  
> diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
> index 944f500..73de4ef 100644
> --- a/drivers/pci/Kconfig
> +++ b/drivers/pci/Kconfig
> @@ -2,7 +2,7 @@
>  # PCI configuration
>  #
>  config PCI_BUS_ADDR_T_64BIT
> -	def_bool y if (ARCH_DMA_ADDR_T_64BIT || (64BIT && !PARISC))
> +	def_bool y if (ARCH_DMA_ADDR_T_64BIT || 64BIT)
>  	depends on PCI
>  
>  config PCI_MSI
> 

-- 
Meelis Roos (mroos@linux.ee)

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

end of thread, other threads:[~2015-09-14  7:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-02 16:17 [PATCH] PCI,parisc: Enable 64-bit bus addresses on PA-RISC Helge Deller
2015-09-14  7:41 ` Meelis Roos

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).