eHEA: Introducing support vor DLPAR memory add
Subsystems (2)
PATCH 1/1 eHEA: Introducing support vor DLPAR memory add
This patch adds support for DLPAR memory add to the eHEA driver. To detect whether memory was added the driver uses its own memory mapping table and checks for kernel addresses whether they're located in already known memory sections. If not the function ehea_rereg_mrs() is triggered which performs a rebuild of the mapping table and a re-registration of the global memory region.
---
drivers/net/ehea/ehea.h | 23 +++++-- drivers/net/ehea/ehea_main.c | 144 +++++++++++++++++++++++++++++++++++---- drivers/net/ehea/ehea_phyp.h | 3 + drivers/net/ehea/ehea_qmr.c | 156 ++++++++++++++++++++++++++++++------------ drivers/net/ehea/ehea_qmr.h | 14 +++- 5 files changed, 275 insertions(+), 65 deletions(-)
drivers/net/ehea/ehea.h +18 -5
@@ -39,13 +39,13 @@#include <asm/io.h> #define DRV_NAME "ehea" -#define DRV_VERSION "EHEA_0067" +#define DRV_VERSION "EHEA_0070" -/* EHEA capability flags */ +/* eHEA capability flags */ #define DLPAR_PORT_ADD_REM 1 -#define DLPAR_MEM_ADD 2 -#define DLPAR_MEM_REM 4 -#define EHEA_CAPABILITIES (DLPAR_PORT_ADD_REM) +#define DLPAR_MEM_ADD 2 +#define DLPAR_MEM_REM 4 +#define EHEA_CAPABILITIES (DLPAR_PORT_ADD_REM)#define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
@@ -113,6 +113,8 @@/* Memory Regions */ #define EHEA_MR_ACC_CTRL 0x00800000 +#define EHEA_BUSMAP_START 0x8000000000000000ULL +#define EHEA_WATCH_DOG_TIMEOUT 10*HZ/* utility functions */
@@ -186,6 +188,12 @@ struct h_epas {set to 0 if unused */ }; +struct ehea_busmap { +unsigned int entries;/* total number of entries */ +unsigned int valid_sections;/* number of valid sections */ +u64 *vaddr; +}; +struct ehea_qp ;struct ehea_cq ;struct ehea_eq ;
@@ -382,6 +390,8 @@ struct ehea_adapter {struct ehea_mr mr;u32 pd;/* protection domain */ u64 max_mc_mac;/* max number of multicast mac addresses */ +int active_ports; +struct list_head list; };
@@ -431,6 +441,9 @@ struct port_res_cfg {int max_entries_rq3; }; +enum ehea_flag_bits { + __EHEA_STOP_XFER +};void ehea_set_ethtool_ops (struct net_device *netdev);int ehea_sense_port_attr (struct ehea_port *port);
drivers/net/ehea/ehea_main.c +130 -14
272 lines not on this page · raw message
drivers/net/ehea/ehea_phyp.h +3 -0
@@ -60,6 +60,9 @@ static inline u32 get_longbusy_msecs(int long_busy_ret_code) } } +/* Number of pages which can be registered at once by H_REGISTER_HEA_RPAGES */ +#define EHEA_MAX_RPAGE 512 +/* Notification Event Queue (NEQ) Entry bit masks */ #define NEQE_EVENT_CODE EHEA_BMASK_IBM(2, 7)#define NEQE_PORTNUM EHEA_BMASK_IBM(32, 47)
drivers/net/ehea/ehea_qmr.c +112 -44
192 lines not on this page · raw message
drivers/net/ehea/ehea_qmr.h +12 -2
@@ -36,8 +36,14 @@* page size of ehea hardware queues */ -#define EHEA_PAGESHIFT 12 -#define EHEA_PAGESIZE 4096UL +#define EHEA_PAGESHIFT 12 +#define EHEA_PAGESIZE (1UL << EHEA_PAGESHIFT) +#define EHEA_SECTSIZE (1UL << 24) +#define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> PAGE_SHIFT) + +#if (1UL <<SECTION_SIZE_BITS ) <EHEA_SECTSIZE +#error eHEA module can't work if kernel sectionsize < ehea sectionsize +#endif /* Some abbreviations used here: *
@@ -372,4 +378,8 @@ int ehea_rem_mr(struct ehea_mr *mr);void ehea_error_data (struct ehea_adapter *adapter,u64 res_handle); +int ehea_create_busmap (void ); +void ehea_destroy_busmap (void ); +u64 ehea_map_vaddr (void *caddr); +#endif /* __EHEA_QMR_H__ */
Signature · 1 line
1.5.2
Jeff Garzik
AppliedQuoted 8 lines · Thomas Klein
This patch adds support for DLPAR memory add to the eHEA driver. To detect whether memory was added the driver uses its own memory mapping table and checks for kernel addresses whether they're located in already known memory sections. If not the function
ehea_rereg_mrs()is triggered which performs a rebuild of the mapping table and a re-registration of the global memory region.Signed-off-by Thomas Klein <[email protected]>
Quoted 8 lines
---
drivers/net/ehea/ehea.h | 23 +++++-- drivers/net/ehea/ehea_main.c | 144 +++++++++++++++++++++++++++++++++++---- drivers/net/ehea/ehea_phyp.h | 3 + drivers/net/ehea/ehea_qmr.c | 156 ++++++++++++++++++++++++++++++------------ drivers/net/ehea/ehea_qmr.h | 14 +++- 5 files changed, 275 insertions(+), 65 deletions(-)
applied