aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2015-02-15 22:45:39 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2015-03-16 19:31:18 -0400
commit01f3bfb7804ae20aaf66884cf537f7dc2cdc1671 (patch)
treea5154f8afdc6dcca3f92fe1bca4cde3c478cd0fd /arch/powerpc/platforms/powernv
parent6ec7334304f2882b7fc13ab70a0bf58948cf6244 (diff)
powerpc/powernv: Shorten EEH function names
The patch shortens names of EEH functions in powernv-eeh.c and no logic change introduced by this patch. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/powernv')
-rw-r--r--arch/powerpc/platforms/powernv/eeh-powernv.c104
1 files changed, 52 insertions, 52 deletions
diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c
index e261869adc86..f562dd1a99cc 100644
--- a/arch/powerpc/platforms/powernv/eeh-powernv.c
+++ b/arch/powerpc/platforms/powernv/eeh-powernv.c
@@ -39,11 +39,11 @@
39#include "pci.h" 39#include "pci.h"
40 40
41/** 41/**
42 * powernv_eeh_init - EEH platform dependent initialization 42 * pnv_eeh_init - EEH platform dependent initialization
43 * 43 *
44 * EEH platform dependent initialization on powernv 44 * EEH platform dependent initialization on powernv
45 */ 45 */
46static int powernv_eeh_init(void) 46static int pnv_eeh_init(void)
47{ 47{
48 struct pci_controller *hose; 48 struct pci_controller *hose;
49 struct pnv_phb *phb; 49 struct pnv_phb *phb;
@@ -86,14 +86,14 @@ static int powernv_eeh_init(void)
86} 86}
87 87
88/** 88/**
89 * powernv_eeh_post_init - EEH platform dependent post initialization 89 * pnv_eeh_post_init - EEH platform dependent post initialization
90 * 90 *
91 * EEH platform dependent post initialization on powernv. When 91 * EEH platform dependent post initialization on powernv. When
92 * the function is called, the EEH PEs and devices should have 92 * the function is called, the EEH PEs and devices should have
93 * been built. If the I/O cache staff has been built, EEH is 93 * been built. If the I/O cache staff has been built, EEH is
94 * ready to supply service. 94 * ready to supply service.
95 */ 95 */
96static int powernv_eeh_post_init(void) 96static int pnv_eeh_post_init(void)
97{ 97{
98 struct pci_controller *hose; 98 struct pci_controller *hose;
99 struct pnv_phb *phb; 99 struct pnv_phb *phb;
@@ -113,7 +113,7 @@ static int powernv_eeh_post_init(void)
113} 113}
114 114
115/** 115/**
116 * powernv_eeh_dev_probe - Do probe on PCI device 116 * pnv_eeh_dev_probe - Do probe on PCI device
117 * @dev: PCI device 117 * @dev: PCI device
118 * @flag: unused 118 * @flag: unused
119 * 119 *
@@ -129,7 +129,7 @@ static int powernv_eeh_post_init(void)
129 * was possiblly triggered by EEH core, the binding between EEH device 129 * was possiblly triggered by EEH core, the binding between EEH device
130 * and the PCI device isn't built yet. 130 * and the PCI device isn't built yet.
131 */ 131 */
132static int powernv_eeh_dev_probe(struct pci_dev *dev, void *flag) 132static int pnv_eeh_dev_probe(struct pci_dev *dev, void *flag)
133{ 133{
134 struct pci_controller *hose = pci_bus_to_host(dev->bus); 134 struct pci_controller *hose = pci_bus_to_host(dev->bus);
135 struct pnv_phb *phb = hose->private_data; 135 struct pnv_phb *phb = hose->private_data;
@@ -221,7 +221,7 @@ static int powernv_eeh_dev_probe(struct pci_dev *dev, void *flag)
221} 221}
222 222
223/** 223/**
224 * powernv_eeh_set_option - Initialize EEH or MMIO/DMA reenable 224 * pnv_eeh_set_option - Initialize EEH or MMIO/DMA reenable
225 * @pe: EEH PE 225 * @pe: EEH PE
226 * @option: operation to be issued 226 * @option: operation to be issued
227 * 227 *
@@ -229,7 +229,7 @@ static int powernv_eeh_dev_probe(struct pci_dev *dev, void *flag)
229 * Currently, following options are support according to PAPR: 229 * Currently, following options are support according to PAPR:
230 * Enable EEH, Disable EEH, Enable MMIO and Enable DMA 230 * Enable EEH, Disable EEH, Enable MMIO and Enable DMA
231 */ 231 */
232static int powernv_eeh_set_option(struct eeh_pe *pe, int option) 232static int pnv_eeh_set_option(struct eeh_pe *pe, int option)
233{ 233{
234 struct pci_controller *hose = pe->phb; 234 struct pci_controller *hose = pe->phb;
235 struct pnv_phb *phb = hose->private_data; 235 struct pnv_phb *phb = hose->private_data;
@@ -246,19 +246,19 @@ static int powernv_eeh_set_option(struct eeh_pe *pe, int option)
246} 246}
247 247
248/** 248/**
249 * powernv_eeh_get_pe_addr - Retrieve PE address 249 * pnv_eeh_get_pe_addr - Retrieve PE address
250 * @pe: EEH PE 250 * @pe: EEH PE
251 * 251 *
252 * Retrieve the PE address according to the given tranditional 252 * Retrieve the PE address according to the given tranditional
253 * PCI BDF (Bus/Device/Function) address. 253 * PCI BDF (Bus/Device/Function) address.
254 */ 254 */
255static int powernv_eeh_get_pe_addr(struct eeh_pe *pe) 255static int pnv_eeh_get_pe_addr(struct eeh_pe *pe)
256{ 256{
257 return pe->addr; 257 return pe->addr;
258} 258}
259 259
260/** 260/**
261 * powernv_eeh_get_state - Retrieve PE state 261 * pnv_eeh_get_state - Retrieve PE state
262 * @pe: EEH PE 262 * @pe: EEH PE
263 * @delay: delay while PE state is temporarily unavailable 263 * @delay: delay while PE state is temporarily unavailable
264 * 264 *
@@ -267,7 +267,7 @@ static int powernv_eeh_get_pe_addr(struct eeh_pe *pe)
267 * we prefer passing down to hardware implementation to handle 267 * we prefer passing down to hardware implementation to handle
268 * it. 268 * it.
269 */ 269 */
270static int powernv_eeh_get_state(struct eeh_pe *pe, int *delay) 270static int pnv_eeh_get_state(struct eeh_pe *pe, int *delay)
271{ 271{
272 struct pci_controller *hose = pe->phb; 272 struct pci_controller *hose = pe->phb;
273 struct pnv_phb *phb = hose->private_data; 273 struct pnv_phb *phb = hose->private_data;
@@ -292,13 +292,13 @@ static int powernv_eeh_get_state(struct eeh_pe *pe, int *delay)
292} 292}
293 293
294/** 294/**
295 * powernv_eeh_reset - Reset the specified PE 295 * pnv_eeh_reset - Reset the specified PE
296 * @pe: EEH PE 296 * @pe: EEH PE
297 * @option: reset option 297 * @option: reset option
298 * 298 *
299 * Reset the specified PE 299 * Reset the specified PE
300 */ 300 */
301static int powernv_eeh_reset(struct eeh_pe *pe, int option) 301static int pnv_eeh_reset(struct eeh_pe *pe, int option)
302{ 302{
303 struct pci_controller *hose = pe->phb; 303 struct pci_controller *hose = pe->phb;
304 struct pnv_phb *phb = hose->private_data; 304 struct pnv_phb *phb = hose->private_data;
@@ -311,20 +311,20 @@ static int powernv_eeh_reset(struct eeh_pe *pe, int option)
311} 311}
312 312
313/** 313/**
314 * powernv_eeh_wait_state - Wait for PE state 314 * pnv_eeh_wait_state - Wait for PE state
315 * @pe: EEH PE 315 * @pe: EEH PE
316 * @max_wait: maximal period in microsecond 316 * @max_wait: maximal period in microsecond
317 * 317 *
318 * Wait for the state of associated PE. It might take some time 318 * Wait for the state of associated PE. It might take some time
319 * to retrieve the PE's state. 319 * to retrieve the PE's state.
320 */ 320 */
321static int powernv_eeh_wait_state(struct eeh_pe *pe, int max_wait) 321static int pnv_eeh_wait_state(struct eeh_pe *pe, int max_wait)
322{ 322{
323 int ret; 323 int ret;
324 int mwait; 324 int mwait;
325 325
326 while (1) { 326 while (1) {
327 ret = powernv_eeh_get_state(pe, &mwait); 327 ret = pnv_eeh_get_state(pe, &mwait);
328 328
329 /* 329 /*
330 * If the PE's state is temporarily unavailable, 330 * If the PE's state is temporarily unavailable,
@@ -348,7 +348,7 @@ static int powernv_eeh_wait_state(struct eeh_pe *pe, int max_wait)
348} 348}
349 349
350/** 350/**
351 * powernv_eeh_get_log - Retrieve error log 351 * pnv_eeh_get_log - Retrieve error log
352 * @pe: EEH PE 352 * @pe: EEH PE
353 * @severity: temporary or permanent error log 353 * @severity: temporary or permanent error log
354 * @drv_log: driver log to be combined with retrieved error log 354 * @drv_log: driver log to be combined with retrieved error log
@@ -356,8 +356,8 @@ static int powernv_eeh_wait_state(struct eeh_pe *pe, int max_wait)
356 * 356 *
357 * Retrieve the temporary or permanent error from the PE. 357 * Retrieve the temporary or permanent error from the PE.
358 */ 358 */
359static int powernv_eeh_get_log(struct eeh_pe *pe, int severity, 359static int pnv_eeh_get_log(struct eeh_pe *pe, int severity,
360 char *drv_log, unsigned long len) 360 char *drv_log, unsigned long len)
361{ 361{
362 struct pci_controller *hose = pe->phb; 362 struct pci_controller *hose = pe->phb;
363 struct pnv_phb *phb = hose->private_data; 363 struct pnv_phb *phb = hose->private_data;
@@ -370,14 +370,14 @@ static int powernv_eeh_get_log(struct eeh_pe *pe, int severity,
370} 370}
371 371
372/** 372/**
373 * powernv_eeh_configure_bridge - Configure PCI bridges in the indicated PE 373 * pnv_eeh_configure_bridge - Configure PCI bridges in the indicated PE
374 * @pe: EEH PE 374 * @pe: EEH PE
375 * 375 *
376 * The function will be called to reconfigure the bridges included 376 * The function will be called to reconfigure the bridges included
377 * in the specified PE so that the mulfunctional PE would be recovered 377 * in the specified PE so that the mulfunctional PE would be recovered
378 * again. 378 * again.
379 */ 379 */
380static int powernv_eeh_configure_bridge(struct eeh_pe *pe) 380static int pnv_eeh_configure_bridge(struct eeh_pe *pe)
381{ 381{
382 struct pci_controller *hose = pe->phb; 382 struct pci_controller *hose = pe->phb;
383 struct pnv_phb *phb = hose->private_data; 383 struct pnv_phb *phb = hose->private_data;
@@ -390,7 +390,7 @@ static int powernv_eeh_configure_bridge(struct eeh_pe *pe)
390} 390}
391 391
392/** 392/**
393 * powernv_pe_err_inject - Inject specified error to the indicated PE 393 * pnv_pe_err_inject - Inject specified error to the indicated PE
394 * @pe: the indicated PE 394 * @pe: the indicated PE
395 * @type: error type 395 * @type: error type
396 * @func: specific error type 396 * @func: specific error type
@@ -401,8 +401,8 @@ static int powernv_eeh_configure_bridge(struct eeh_pe *pe)
401 * determined by @type and @func, to the indicated PE for 401 * determined by @type and @func, to the indicated PE for
402 * testing purpose. 402 * testing purpose.
403 */ 403 */
404static int powernv_eeh_err_inject(struct eeh_pe *pe, int type, int func, 404static int pnv_eeh_err_inject(struct eeh_pe *pe, int type, int func,
405 unsigned long addr, unsigned long mask) 405 unsigned long addr, unsigned long mask)
406{ 406{
407 struct pci_controller *hose = pe->phb; 407 struct pci_controller *hose = pe->phb;
408 struct pnv_phb *phb = hose->private_data; 408 struct pnv_phb *phb = hose->private_data;
@@ -414,7 +414,7 @@ static int powernv_eeh_err_inject(struct eeh_pe *pe, int type, int func,
414 return ret; 414 return ret;
415} 415}
416 416
417static inline bool powernv_eeh_cfg_blocked(struct device_node *dn) 417static inline bool pnv_eeh_cfg_blocked(struct device_node *dn)
418{ 418{
419 struct eeh_dev *edev = of_node_to_eeh_dev(dn); 419 struct eeh_dev *edev = of_node_to_eeh_dev(dn);
420 420
@@ -427,10 +427,10 @@ static inline bool powernv_eeh_cfg_blocked(struct device_node *dn)
427 return false; 427 return false;
428} 428}
429 429
430static int powernv_eeh_read_config(struct device_node *dn, 430static int pnv_eeh_read_config(struct device_node *dn,
431 int where, int size, u32 *val) 431 int where, int size, u32 *val)
432{ 432{
433 if (powernv_eeh_cfg_blocked(dn)) { 433 if (pnv_eeh_cfg_blocked(dn)) {
434 *val = 0xFFFFFFFF; 434 *val = 0xFFFFFFFF;
435 return PCIBIOS_SET_FAILED; 435 return PCIBIOS_SET_FAILED;
436 } 436 }
@@ -438,22 +438,22 @@ static int powernv_eeh_read_config(struct device_node *dn,
438 return pnv_pci_cfg_read(dn, where, size, val); 438 return pnv_pci_cfg_read(dn, where, size, val);
439} 439}
440 440
441static int powernv_eeh_write_config(struct device_node *dn, 441static int pnv_eeh_write_config(struct device_node *dn,
442 int where, int size, u32 val) 442 int where, int size, u32 val)
443{ 443{
444 if (powernv_eeh_cfg_blocked(dn)) 444 if (pnv_eeh_cfg_blocked(dn))
445 return PCIBIOS_SET_FAILED; 445 return PCIBIOS_SET_FAILED;
446 446
447 return pnv_pci_cfg_write(dn, where, size, val); 447 return pnv_pci_cfg_write(dn, where, size, val);
448} 448}
449 449
450/** 450/**
451 * powernv_eeh_next_error - Retrieve next EEH error to handle 451 * pnv_eeh_next_error - Retrieve next EEH error to handle
452 * @pe: Affected PE 452 * @pe: Affected PE
453 * 453 *
454 * Using OPAL API, to retrieve next EEH error for EEH core to handle 454 * Using OPAL API, to retrieve next EEH error for EEH core to handle
455 */ 455 */
456static int powernv_eeh_next_error(struct eeh_pe **pe) 456static int pnv_eeh_next_error(struct eeh_pe **pe)
457{ 457{
458 struct pci_controller *hose; 458 struct pci_controller *hose;
459 struct pnv_phb *phb = NULL; 459 struct pnv_phb *phb = NULL;
@@ -469,7 +469,7 @@ static int powernv_eeh_next_error(struct eeh_pe **pe)
469 return -EEXIST; 469 return -EEXIST;
470} 470}
471 471
472static int powernv_eeh_restore_config(struct device_node *dn) 472static int pnv_eeh_restore_config(struct device_node *dn)
473{ 473{
474 struct eeh_dev *edev = of_node_to_eeh_dev(dn); 474 struct eeh_dev *edev = of_node_to_eeh_dev(dn);
475 struct pnv_phb *phb; 475 struct pnv_phb *phb;
@@ -490,24 +490,24 @@ static int powernv_eeh_restore_config(struct device_node *dn)
490 return 0; 490 return 0;
491} 491}
492 492
493static struct eeh_ops powernv_eeh_ops = { 493static struct eeh_ops pnv_eeh_ops = {
494 .name = "powernv", 494 .name = "powernv",
495 .init = powernv_eeh_init, 495 .init = pnv_eeh_init,
496 .post_init = powernv_eeh_post_init, 496 .post_init = pnv_eeh_post_init,
497 .of_probe = NULL, 497 .of_probe = NULL,
498 .dev_probe = powernv_eeh_dev_probe, 498 .dev_probe = pnv_eeh_dev_probe,
499 .set_option = powernv_eeh_set_option, 499 .set_option = pnv_eeh_set_option,
500 .get_pe_addr = powernv_eeh_get_pe_addr, 500 .get_pe_addr = pnv_eeh_get_pe_addr,
501 .get_state = powernv_eeh_get_state, 501 .get_state = pnv_eeh_get_state,
502 .reset = powernv_eeh_reset, 502 .reset = pnv_eeh_reset,
503 .wait_state = powernv_eeh_wait_state, 503 .wait_state = pnv_eeh_wait_state,
504 .get_log = powernv_eeh_get_log, 504 .get_log = pnv_eeh_get_log,
505 .configure_bridge = powernv_eeh_configure_bridge, 505 .configure_bridge = pnv_eeh_configure_bridge,
506 .err_inject = powernv_eeh_err_inject, 506 .err_inject = pnv_eeh_err_inject,
507 .read_config = powernv_eeh_read_config, 507 .read_config = pnv_eeh_read_config,
508 .write_config = powernv_eeh_write_config, 508 .write_config = pnv_eeh_write_config,
509 .next_error = powernv_eeh_next_error, 509 .next_error = pnv_eeh_next_error,
510 .restore_config = powernv_eeh_restore_config 510 .restore_config = pnv_eeh_restore_config
511}; 511};
512 512
513/** 513/**
@@ -521,7 +521,7 @@ static int __init eeh_powernv_init(void)
521 int ret = -EINVAL; 521 int ret = -EINVAL;
522 522
523 eeh_set_pe_aux_size(PNV_PCI_DIAG_BUF_SIZE); 523 eeh_set_pe_aux_size(PNV_PCI_DIAG_BUF_SIZE);
524 ret = eeh_ops_register(&powernv_eeh_ops); 524 ret = eeh_ops_register(&pnv_eeh_ops);
525 if (!ret) 525 if (!ret)
526 pr_info("EEH: PowerNV platform initialized\n"); 526 pr_info("EEH: PowerNV platform initialized\n");
527 else 527 else