From: Guo Chao <yan@linux.vnet.ibm.com>
To: linux-pci@vger.kernel.org
Cc: bhelgaas@google.com, yinghai@kernel.org
Subject: [RFC PATCH 2/3] PCI: set proper default value of PCIBIOS_MAX_MEM_32
Date: Tue, 19 Nov 2013 14:36:57 +0800 [thread overview]
Message-ID: <1384843018-9479-3-git-send-email-yan@linux.vnet.ibm.com> (raw)
In-Reply-To: <1384843018-9479-1-git-send-email-yan@linux.vnet.ibm.com>
PCIBIOS_MAX_MEM_32 is used to prevent 32-bit BAR from getting 4G-above
address. Its default value -1 extends to 0xffffffffffffffff in 64-bit
platform which make it useless at all. While arch can overwrite it,
0xffffffff should be good enough for those who does not have special
requirement. Set PCIBIOS_MAX_MEM_32 to 0xffffffff and kill this
definition in x86.
Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
---
arch/x86/include/asm/pci.h | 1 -
include/linux/pci.h | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/pci.h b/arch/x86/include/asm/pci.h
index 7d74432..73ff4bc 100644
--- a/arch/x86/include/asm/pci.h
+++ b/arch/x86/include/asm/pci.h
@@ -125,7 +125,6 @@ int setup_msi_irq(struct pci_dev *dev, struct msi_desc *msidesc,
/* generic pci stuff */
#include <asm-generic/pci.h>
-#define PCIBIOS_MAX_MEM_32 0xffffffff
#ifdef CONFIG_NUMA
/* Returns the node based on pci bus */
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 835ec7b..f43405d 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1487,7 +1487,7 @@ static inline struct pci_dev *pci_dev_get(struct pci_dev *dev)
#include <asm/pci.h>
#ifndef PCIBIOS_MAX_MEM_32
-#define PCIBIOS_MAX_MEM_32 (-1)
+#define PCIBIOS_MAX_MEM_32 (0xffffffff)
#endif
/* these helpers provide future and backwards compatibility
--
1.8.3.2
next prev parent reply other threads:[~2013-11-19 6:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-19 6:36 [RFC PATCH 0/3] Make 64-bit prefetchable MMIO work Guo Chao
2013-11-19 6:36 ` [RFC PATCH 1/3] PCI: do not compare CPU address with PCI address Guo Chao
2013-11-19 19:31 ` Yinghai Lu
2013-11-19 19:35 ` Yinghai Lu
2013-11-19 23:48 ` Bjorn Helgaas
2013-11-19 6:36 ` Guo Chao [this message]
2013-11-19 6:36 ` [RFC PATCH 3/3] PCI: do not reset bridge's IORESOURCE_MEM_64 flag for ROM BAR Guo Chao
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=1384843018-9479-3-git-send-email-yan@linux.vnet.ibm.com \
--to=yan@linux.vnet.ibm.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=yinghai@kernel.org \
/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).