+static void setup_memwin_p2pmem(struct adapter *adap)
+{
+ unsigned int mem_base = t4_read_reg(adap, CIM_EXTMEM2_BASE_ADDR_A);
+ unsigned int mem_size = t4_read_reg(adap, CIM_EXTMEM2_ADDR_SIZE_A);
+
+ if (!use_p2pmem)
+ return;
+static int init_p2pmem(struct adapter *adapter)
+{
+ unsigned int mem_size = t4_read_reg(adapter, CIM_EXTMEM2_ADDR_SIZE_A);
+ struct p2pmem_dev *p;
+ int rc;
+ struct resource res;
+
+ if (!mem_size || !use_p2pmem)
+ return 0;