ehea: Add hugepage detection
Subsystems (2)
PATCH 1/1 ehea: Add hugepage detection
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.
---
This reworked patch accounts for comments I got. It's based on davem's net-2.6.git.
drivers/net/ehea/ehea.h +1 -1
@@ -40,7 +40,7 @@#include <asm/io.h> #define DRV_NAME "ehea" -#define DRV_VERSION "EHEA_0094" +#define DRV_VERSION "EHEA_0095"/* eHEA capability flags */ #define DLPAR_PORT_ADD_REM 1
drivers/net/ehea/ehea_qmr.c +52 -5
79 lines not on this page · raw message
drivers/net/ehea/ehea_qmr.h +3 -0
@@ -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
Jeff Garzik
AppliedQuoted 9 lines · Thomas Klein
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 thewalk_memory_resourcecallback 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 <[email protected]>---
This reworked patch accounts for comments I got. It's based on davem's net-2.6.git.
applied