Skip to content

Commit

Permalink
powerpc: Convert confirm_error_lock to raw_spinlock
Browse files Browse the repository at this point in the history
confirm_error_lock needs to be a real spinlock in RT. Convert it to
raw_spinlock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Thomas Gleixner authored and Benjamin Herrenschmidt committed Feb 19, 2010
1 parent a9e8bf2 commit 3d37262
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions arch/powerpc/platforms/pseries/eeh.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int eeh_subsystem_enabled;
EXPORT_SYMBOL(eeh_subsystem_enabled);

/* Lock to avoid races due to multiple reports of an error */
static DEFINE_SPINLOCK(confirm_error_lock);
static DEFINE_RAW_SPINLOCK(confirm_error_lock);

/* Buffer for reporting slot-error-detail rtas calls. Its here
* in BSS, and not dynamically alloced, so that it ends up in
Expand Down Expand Up @@ -436,7 +436,7 @@ static void __eeh_clear_slot(struct device_node *parent, int mode_flag)
void eeh_clear_slot (struct device_node *dn, int mode_flag)
{
unsigned long flags;
spin_lock_irqsave(&confirm_error_lock, flags);
raw_spin_lock_irqsave(&confirm_error_lock, flags);

dn = find_device_pe (dn);

Expand All @@ -447,7 +447,7 @@ void eeh_clear_slot (struct device_node *dn, int mode_flag)
PCI_DN(dn)->eeh_mode &= ~mode_flag;
PCI_DN(dn)->eeh_check_count = 0;
__eeh_clear_slot(dn, mode_flag);
spin_unlock_irqrestore(&confirm_error_lock, flags);
raw_spin_unlock_irqrestore(&confirm_error_lock, flags);
}

/**
Expand Down Expand Up @@ -506,7 +506,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
* in one slot might report errors simultaneously, and we
* only want one error recovery routine running.
*/
spin_lock_irqsave(&confirm_error_lock, flags);
raw_spin_lock_irqsave(&confirm_error_lock, flags);
rc = 1;
if (pdn->eeh_mode & EEH_MODE_ISOLATED) {
pdn->eeh_check_count ++;
Expand Down Expand Up @@ -575,7 +575,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
* with other functions on this device, and functions under
* bridges. */
eeh_mark_slot (dn, EEH_MODE_ISOLATED);
spin_unlock_irqrestore(&confirm_error_lock, flags);
raw_spin_unlock_irqrestore(&confirm_error_lock, flags);

eeh_send_failure_event (dn, dev);

Expand All @@ -586,7 +586,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev)
return 1;

dn_unlock:
spin_unlock_irqrestore(&confirm_error_lock, flags);
raw_spin_unlock_irqrestore(&confirm_error_lock, flags);
return rc;
}

Expand Down Expand Up @@ -1064,7 +1064,7 @@ void __init eeh_init(void)
struct device_node *phb, *np;
struct eeh_early_enable_info info;

spin_lock_init(&confirm_error_lock);
raw_spin_lock_init(&confirm_error_lock);
spin_lock_init(&slot_errbuf_lock);

np = of_find_node_by_path("/rtas");
Expand Down

0 comments on commit 3d37262

Please sign in to comment.