native.c (79e24da00b1137031245f3341828e4215b1b5b59) | native.c (8633186209e35dfafc27c3d0f0d5e702ab47265f) |
---|---|
1/* 2 * Copyright 2014 IBM Corp. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 7 * 2 of the License, or (at your option) any later version. 8 */ --- 251 unchanged lines hidden (view full) --- 260 } 261 if (!cxl_adapter_link_ok(adapter)) 262 return -EIO; 263 cpu_relax(); 264 } 265 return 0; 266} 267 | 1/* 2 * Copyright 2014 IBM Corp. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 7 * 2 of the License, or (at your option) any later version. 8 */ --- 251 unchanged lines hidden (view full) --- 260 } 261 if (!cxl_adapter_link_ok(adapter)) 262 return -EIO; 263 cpu_relax(); 264 } 265 return 0; 266} 267 |
268int cxl_afu_slbia(struct cxl_afu *afu) 269{ 270 unsigned long timeout = jiffies + (HZ * CXL_TIMEOUT); 271 272 pr_devel("cxl_afu_slbia issuing SLBIA command\n"); 273 cxl_p2n_write(afu, CXL_SLBIA_An, CXL_TLB_SLB_IQ_ALL); 274 while (cxl_p2n_read(afu, CXL_SLBIA_An) & CXL_TLB_SLB_P) { 275 if (time_after_eq(jiffies, timeout)) { 276 dev_warn(&afu->dev, "WARNING: CXL AFU SLBIA timed out!\n"); 277 return -EBUSY; 278 } 279 /* If the adapter has gone down, we can assume that we 280 * will PERST it and that will invalidate everything. 281 */ 282 if (!cxl_adapter_link_ok(afu->adapter)) 283 return -EIO; 284 cpu_relax(); 285 } 286 return 0; 287} 288 | |
289static int cxl_write_sstp(struct cxl_afu *afu, u64 sstp0, u64 sstp1) 290{ 291 int rc; 292 293 /* 1. Disable SSTP by writing 0 to SSTP1[V] */ 294 cxl_p2n_write(afu, CXL_SSTP1_An, 0); 295 296 /* 2. Invalidate all SLB entries */ --- 490 unchanged lines hidden --- | 268static int cxl_write_sstp(struct cxl_afu *afu, u64 sstp0, u64 sstp1) 269{ 270 int rc; 271 272 /* 1. Disable SSTP by writing 0 to SSTP1[V] */ 273 cxl_p2n_write(afu, CXL_SSTP1_An, 0); 274 275 /* 2. Invalidate all SLB entries */ --- 490 unchanged lines hidden --- |