linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luming Yu <luming.yu@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Pengyu Ma <pengyu.ma@windriver.com>
Subject: [RFC patch] I don't want to play with 64bit MMIO in 32bit kernel
Date: Wed, 19 Nov 2014 14:10:27 +0800	[thread overview]
Message-ID: <CAJRGBZwxcZX88KZAs_a9HtBBo-EuxTvi7jONtpo=4DVv+i8n+w@mail.gmail.com> (raw)

[-- 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;

                 reply	other threads:[~2014-11-19  6:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJRGBZwxcZX88KZAs_a9HtBBo-EuxTvi7jONtpo=4DVv+i8n+w@mail.gmail.com' \
    --to=luming.yu@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pengyu.ma@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).