Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13745
b: refs/heads/master
c: fe360cd
h: refs/heads/master
i:
  13743: 5d14dae
v: v3
  • Loading branch information
Stephen Rothwell committed Nov 10, 2005
1 parent 340c3e7 commit 519989f
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 45 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97671e4b295fba1b7d3de2984f98bcdaeb197a26
refs/heads/master: fe360cdfd26503a6def1dfebc0ef8371c5071340
48 changes: 16 additions & 32 deletions trunk/arch/powerpc/platforms/pseries/eeh.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,47 +478,32 @@ static struct device_node * find_device_pe(struct device_node *dn)
* an interrupt context, which is bad.
*/

static void __eeh_mark_slot (struct device_node *dn, int mode_flag)
static void __eeh_mark_slot (struct device_node *dn)
{
while (dn) {
if (PCI_DN(dn)) {
PCI_DN(dn)->eeh_mode |= mode_flag;
PCI_DN(dn)->eeh_mode |= EEH_MODE_ISOLATED;

if (dn->child)
__eeh_mark_slot (dn->child, mode_flag);
}
if (dn->child)
__eeh_mark_slot (dn->child);
dn = dn->sibling;
}
}

void eeh_mark_slot (struct device_node *dn, int mode_flag)
{
dn = find_device_pe (dn);
PCI_DN(dn)->eeh_mode |= mode_flag;
__eeh_mark_slot (dn->child, mode_flag);
}

static void __eeh_clear_slot (struct device_node *dn, int mode_flag)
static void __eeh_clear_slot (struct device_node *dn)
{
while (dn) {
if (PCI_DN(dn)) {
PCI_DN(dn)->eeh_mode &= ~mode_flag;
PCI_DN(dn)->eeh_check_count = 0;
if (dn->child)
__eeh_clear_slot (dn->child, mode_flag);
}
PCI_DN(dn)->eeh_mode &= ~EEH_MODE_ISOLATED;
if (dn->child)
__eeh_clear_slot (dn->child);
dn = dn->sibling;
}
}

void eeh_clear_slot (struct device_node *dn, int mode_flag)
static inline void eeh_clear_slot (struct device_node *dn)
{
unsigned long flags;
spin_lock_irqsave(&confirm_error_lock, flags);
dn = find_device_pe (dn);
PCI_DN(dn)->eeh_mode &= ~mode_flag;
PCI_DN(dn)->eeh_check_count = 0;
__eeh_clear_slot (dn->child, mode_flag);
__eeh_clear_slot (dn);
spin_unlock_irqrestore(&confirm_error_lock, flags);
}

Expand All @@ -543,6 +528,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
int rets[3];
unsigned long flags;
struct pci_dn *pdn;
struct device_node *pe_dn;
int rc = 0;

__get_cpu_var(total_mmio_ffs)++;
Expand Down Expand Up @@ -644,7 +630,8 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
/* Avoid repeated reports of this failure, including problems
* with other functions on this device, and functions under
* bridges. */
eeh_mark_slot (dn, EEH_MODE_ISOLATED);
pe_dn = find_device_pe (dn);
__eeh_mark_slot (pe_dn);
spin_unlock_irqrestore(&confirm_error_lock, flags);

eeh_send_failure_event (dn, dev, rets[0], rets[2]);
Expand Down Expand Up @@ -756,6 +743,9 @@ rtas_pci_slot_reset(struct pci_dn *pdn, int state)
rc, state, pdn->node->full_name);
return;
}

if (state == 0)
eeh_clear_slot (pdn->node->parent->child);
}

/** rtas_set_slot_reset -- assert the pci #RST line for 1/4 second
Expand All @@ -774,12 +764,6 @@ rtas_set_slot_reset(struct pci_dn *pdn)

#define PCI_BUS_RST_HOLD_TIME_MSEC 250
msleep (PCI_BUS_RST_HOLD_TIME_MSEC);

/* We might get hit with another EEH freeze as soon as the
* pci slot reset line is dropped. Make sure we don't miss
* these, and clear the flag now. */
eeh_clear_slot (pdn->node, EEH_MODE_ISOLATED);

rtas_pci_slot_reset (pdn, 0);

/* After a PCI slot has been reset, the PCI Express spec requires
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/ppc64/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,10 @@ static int __init pcibios_init(void)
if (ppc64_isabridge_dev != NULL)
printk("ISA bridge at %s\n", pci_name(ppc64_isabridge_dev));

#ifdef CONFIG_PPC_MULTIPLATFORM
/* map in PCI I/O space */
phbs_remap_io();
#endif

printk("PCI: Probing PCI hardware done\n");

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/pci/hotplug/rpadlpar_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ static int dlpar_add_phb(char *drc_name, struct device_node *dn)
{
struct pci_controller *phb;

if (PCI_DN(dn) && PCI_DN(dn)->phb) {
if (PCI_DN(dn)->phb) {
/* PHB already exists */
return -EINVAL;
}
Expand Down
7 changes: 0 additions & 7 deletions trunk/include/asm-powerpc/ppc-pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,6 @@ void rtas_configure_bridge(struct pci_dn *);

int rtas_write_config(struct pci_dn *, int where, int size, u32 val);

/**
* mark and clear slots: find "partition endpoint" PE and set or
* clear the flags for each subnode of the PE.
*/
void eeh_mark_slot (struct device_node *dn, int mode_flag);
void eeh_clear_slot (struct device_node *dn, int mode_flag);

#endif

#endif /* _ASM_POWERPC_PPC_PCI_H */
2 changes: 0 additions & 2 deletions trunk/include/asm-ppc64/prom.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ extern void of_detach_node(const struct device_node *);
extern unsigned long prom_init(unsigned long, unsigned long, unsigned long,
unsigned long, unsigned long);
extern void finish_device_tree(void);
extern void unflatten_device_tree(void);
extern void early_init_devtree(void *);
extern int device_is_compatible(struct device_node *device, const char *);
extern int machine_is_compatible(const char *compat);
extern unsigned char *get_property(struct device_node *node, const char *name,
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/asm-ppc64/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ struct thread_struct;
extern struct task_struct * _switch(struct thread_struct *prev,
struct thread_struct *next);

extern unsigned long klimit;

extern int powersave_nap; /* set if nap mode can be used in idle loop */

/*
Expand Down

0 comments on commit 519989f

Please sign in to comment.