summaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea/ehea_qmr.h
diff options
context:
space:
mode:
authorThomas Klein <tklein@de.ibm.com>2008-10-27 10:38:46 +0100
committerJeff Garzik <jgarzik@redhat.com>2008-10-27 19:49:55 +0100
commit3fd09c45bfbcf77949ed6db36e67c1681424fedb (patch)
tree73a5a3122c69c68489905c065e810abe9288e95c /drivers/net/ehea/ehea_qmr.h
parentdmfe: check pci_alloc_consistent errors (diff)
downloadlinux-3fd09c45bfbcf77949ed6db36e67c1681424fedb.tar.xz
linux-3fd09c45bfbcf77949ed6db36e67c1681424fedb.zip
ehea: Detect 16GB hugepages for firmware restriction
All kernel memory which is used for kernel/hardware data transfer must be registered with firmware using "memory regions". 16GB hugepages may not be part of a memory region due to firmware restrictions. This patch modifies the walk_memory_resource callback fn to filter hugepages and add only standard memory to the busmap which is later on used for MR registration. Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ehea/ehea_qmr.h')
-rw-r--r--drivers/net/ehea/ehea_qmr.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ehea/ehea_qmr.h b/drivers/net/ehea/ehea_qmr.h
index 1e58dc06b7d2..0817c1e74a19 100644
--- a/drivers/net/ehea/ehea_qmr.h
+++ b/drivers/net/ehea/ehea_qmr.h
@@ -40,6 +40,9 @@
#define EHEA_PAGESIZE (1UL << EHEA_PAGESHIFT)
#define EHEA_SECTSIZE (1UL << 24)
#define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> EHEA_PAGESHIFT)
+#define EHEA_HUGEPAGESHIFT 34
+#define EHEA_HUGEPAGE_SIZE (1UL << EHEA_HUGEPAGESHIFT)
+#define EHEA_HUGEPAGE_PFN_MASK ((EHEA_HUGEPAGE_SIZE - 1) >> PAGE_SHIFT)
#if ((1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE)
#error eHEA module cannot work if kernel sectionsize < ehea sectionsize