linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC patch] I don't want to play with 64bit MMIO in 32bit kernel
@ 2014-11-19  6:10 Luming Yu
  0 siblings, 0 replies; only message in thread
From: Luming Yu @ 2014-11-19  6:10 UTC (permalink / raw)
  To: LKML; +Cc: Pengyu Ma

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

hi LKML

There is an on-going development in bugzilla for a patch to move on in
another direction for people who want to play with 64bits PCI BAR on
32bit.

https://bugzilla.kernel.org/show_bug.cgi?id=88131

But I send the patch out here to solicit comments for a sable way to
play with pci devices on modern 64bit machine which usually features
64bit BAR in a stable 32bit kernel.

The patch attached forced the BAR  memory resource allocation back to
32bit adress space in acpi root bridge case, then xhci and ixgbe works
every well based on my testing. So I think it's not necessary to use
64Bit BAR in 32bit kernel for stable reason.

Thanks /l

signed-off-by:  Luming Yu <luming.yu@intel.com>

[-- Attachment #2: z --]
[-- Type: application/octet-stream, Size: 836 bytes --]

diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index cfd1b13..72e7465 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -251,7 +251,9 @@ static acpi_status resource_to_addr(struct acpi_resource *resource,
 		return AE_OK;
 	case ACPI_RESOURCE_TYPE_ADDRESS16:
 	case ACPI_RESOURCE_TYPE_ADDRESS32:
+#if BITS_PER_LONG == 64
 	case ACPI_RESOURCE_TYPE_ADDRESS64:
+#endif
 		status = acpi_resource_to_address64(resource, addr);
 		if (ACPI_SUCCESS(status) &&
 		    (addr->resource_type == ACPI_MEMORY_RANGE ||
@@ -259,6 +261,10 @@ static acpi_status resource_to_addr(struct acpi_resource *resource,
 		    addr->address_length > 0) {
 			return AE_OK;
 		}
+#if BITS_PER_LONG == 32
+	case ACPI_RESOURCE_TYPE_ADDRESS64:
+	/* We don't want to play with 64 bits mmio on x86-32bit */
+#endif
 		break;
 	}
 	return AE_ERROR;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-11-19  6:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-19  6:10 [RFC patch] I don't want to play with 64bit MMIO in 32bit kernel Luming Yu

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