Skip to content

Commit 8a6b371

Browse files
Gavin Shanmpe
authored andcommitted
powerpc/eeh: Rename flag EEH_PE_RESET to EEH_PE_CFG_BLOCKED
The flag EEH_PE_RESET indicates blocking config space of the PE during reset time. We potentially need block PE's config space other than reset time. So it's reasonable to replace it with EEH_PE_CFG_BLOCKED to indicate its usage. There are no substantial code or logic changes in this patch. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 8315070 commit 8a6b371

6 files changed

Lines changed: 17 additions & 17 deletions

File tree

‎arch/powerpc/include/asm/eeh.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ struct device_node;
7171

7272
#define EEH_PE_ISOLATED (1 << 0) /* Isolated PE */
7373
#define EEH_PE_RECOVERING (1 << 1) /* Recovering PE */
74-
#define EEH_PE_RESET (1 << 2) /* PE reset in progress */
74+
#define EEH_PE_CFG_BLOCKED (1 << 2) /* Block config access */
7575

7676
#define EEH_PE_KEEP (1 << 8) /* Keep PE on hotplug */
7777

‎arch/powerpc/kernel/eeh.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -673,18 +673,18 @@ int pcibios_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state stat
673673
switch (state) {
674674
case pcie_deassert_reset:
675675
eeh_ops->reset(pe, EEH_RESET_DEACTIVATE);
676-
eeh_pe_state_clear(pe, EEH_PE_RESET);
676+
eeh_pe_state_clear(pe, EEH_PE_CFG_BLOCKED);
677677
break;
678678
case pcie_hot_reset:
679-
eeh_pe_state_mark(pe, EEH_PE_RESET);
679+
eeh_pe_state_mark(pe, EEH_PE_CFG_BLOCKED);
680680
eeh_ops->reset(pe, EEH_RESET_HOT);
681681
break;
682682
case pcie_warm_reset:
683-
eeh_pe_state_mark(pe, EEH_PE_RESET);
683+
eeh_pe_state_mark(pe, EEH_PE_CFG_BLOCKED);
684684
eeh_ops->reset(pe, EEH_RESET_FUNDAMENTAL);
685685
break;
686686
default:
687-
eeh_pe_state_clear(pe, EEH_PE_RESET);
687+
eeh_pe_state_clear(pe, EEH_PE_CFG_BLOCKED);
688688
return -EINVAL;
689689
};
690690

@@ -1523,7 +1523,7 @@ int eeh_pe_reset(struct eeh_pe *pe, int option)
15231523
switch (option) {
15241524
case EEH_RESET_DEACTIVATE:
15251525
ret = eeh_ops->reset(pe, option);
1526-
eeh_pe_state_clear(pe, EEH_PE_RESET);
1526+
eeh_pe_state_clear(pe, EEH_PE_CFG_BLOCKED);
15271527
if (ret)
15281528
break;
15291529

@@ -1538,7 +1538,7 @@ int eeh_pe_reset(struct eeh_pe *pe, int option)
15381538
*/
15391539
eeh_ops->set_option(pe, EEH_OPT_FREEZE_PE);
15401540

1541-
eeh_pe_state_mark(pe, EEH_PE_RESET);
1541+
eeh_pe_state_mark(pe, EEH_PE_CFG_BLOCKED);
15421542
ret = eeh_ops->reset(pe, option);
15431543
break;
15441544
default:

‎arch/powerpc/kernel/eeh_driver.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -528,13 +528,13 @@ int eeh_pe_reset_and_recover(struct eeh_pe *pe)
528528
eeh_pe_dev_traverse(pe, eeh_report_error, &result);
529529

530530
/* Issue reset */
531-
eeh_pe_state_mark(pe, EEH_PE_RESET);
531+
eeh_pe_state_mark(pe, EEH_PE_CFG_BLOCKED);
532532
ret = eeh_reset_pe(pe);
533533
if (ret) {
534-
eeh_pe_state_clear(pe, EEH_PE_RECOVERING | EEH_PE_RESET);
534+
eeh_pe_state_clear(pe, EEH_PE_RECOVERING | EEH_PE_CFG_BLOCKED);
535535
return ret;
536536
}
537-
eeh_pe_state_clear(pe, EEH_PE_RESET);
537+
eeh_pe_state_clear(pe, EEH_PE_CFG_BLOCKED);
538538

539539
/* Unfreeze the PE */
540540
ret = eeh_clear_pe_frozen_state(pe, true);
@@ -601,10 +601,10 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus)
601601
* config accesses. So we prefer to block them. However, controlled
602602
* PCI config accesses initiated from EEH itself are allowed.
603603
*/
604-
eeh_pe_state_mark(pe, EEH_PE_RESET);
604+
eeh_pe_state_mark(pe, EEH_PE_CFG_BLOCKED);
605605
rc = eeh_reset_pe(pe);
606606
if (rc) {
607-
eeh_pe_state_clear(pe, EEH_PE_RESET);
607+
eeh_pe_state_clear(pe, EEH_PE_CFG_BLOCKED);
608608
return rc;
609609
}
610610

@@ -613,7 +613,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus)
613613
/* Restore PE */
614614
eeh_ops->configure_bridge(pe);
615615
eeh_pe_restore_bars(pe);
616-
eeh_pe_state_clear(pe, EEH_PE_RESET);
616+
eeh_pe_state_clear(pe, EEH_PE_CFG_BLOCKED);
617617

618618
/* Clear frozen state */
619619
rc = eeh_clear_pe_frozen_state(pe, false);

‎arch/powerpc/kernel/rtas_pci.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static int rtas_pci_read_config(struct pci_bus *bus,
111111
return PCIBIOS_DEVICE_NOT_FOUND;
112112
#ifdef CONFIG_EEH
113113
edev = of_node_to_eeh_dev(dn);
114-
if (edev && edev->pe && edev->pe->state & EEH_PE_RESET)
114+
if (edev && edev->pe && edev->pe->state & EEH_PE_CFG_BLOCKED)
115115
return PCIBIOS_DEVICE_NOT_FOUND;
116116
#endif
117117

@@ -175,7 +175,7 @@ static int rtas_pci_write_config(struct pci_bus *bus,
175175
return PCIBIOS_DEVICE_NOT_FOUND;
176176
#ifdef CONFIG_EEH
177177
edev = of_node_to_eeh_dev(dn);
178-
if (edev && edev->pe && (edev->pe->state & EEH_PE_RESET))
178+
if (edev && edev->pe && (edev->pe->state & EEH_PE_CFG_BLOCKED))
179179
return PCIBIOS_DEVICE_NOT_FOUND;
180180
#endif
181181
ret = rtas_write_config(pdn, where, size, val);

‎arch/powerpc/platforms/powernv/eeh-ioda.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ static int ioda_eeh_get_pe_state(struct eeh_pe *pe)
373373
* moving forward, we have to return operational
374374
* state during PE reset.
375375
*/
376-
if (pe->state & EEH_PE_RESET) {
376+
if (pe->state & EEH_PE_CFG_BLOCKED) {
377377
result = (EEH_STATE_MMIO_ACTIVE |
378378
EEH_STATE_DMA_ACTIVE |
379379
EEH_STATE_MMIO_ENABLED |

‎arch/powerpc/platforms/powernv/pci.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ static bool pnv_pci_cfg_check(struct pci_controller *hose,
513513
edev = of_node_to_eeh_dev(dn);
514514
if (edev) {
515515
if (edev->pe &&
516-
(edev->pe->state & EEH_PE_RESET))
516+
(edev->pe->state & EEH_PE_CFG_BLOCKED))
517517
return false;
518518

519519
if (edev->mode & EEH_DEV_REMOVED)

0 commit comments

Comments
 (0)