Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185829
b: refs/heads/master
c: 8a4fd1e
h: refs/heads/master
i:
  185827: 0d5b8c9
v: v3
  • Loading branch information
David S. Miller committed Mar 3, 2010
1 parent 33ed7fc commit 9a99816
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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: c7d5a0050773e98d1094eaa9f2a1a793fafac300
refs/heads/master: 8a4fd1e4922413cfdfa6c51a59efb720d904a5eb
12 changes: 7 additions & 5 deletions trunk/arch/sparc/prom/p1275.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,9 @@ extern void prom_cif_interface(void);
extern void prom_cif_callback(void);

/*
* This provides SMP safety on the p1275buf. prom_callback() drops this lock
* to allow recursuve acquisition.
* This provides SMP safety on the p1275buf.
*/
DEFINE_SPINLOCK(prom_entry_lock);
DEFINE_RAW_SPINLOCK(prom_entry_lock);

long p1275_cmd(const char *service, long fmt, ...)
{
Expand All @@ -47,7 +46,9 @@ long p1275_cmd(const char *service, long fmt, ...)

p = p1275buf.prom_buffer;

spin_lock_irqsave(&prom_entry_lock, flags);
raw_local_save_flags(flags);
raw_local_irq_restore(PIL_NMI);
raw_spin_lock(&prom_entry_lock);

p1275buf.prom_args[0] = (unsigned long)p; /* service */
strcpy (p, service);
Expand Down Expand Up @@ -139,7 +140,8 @@ long p1275_cmd(const char *service, long fmt, ...)
va_end(list);
x = p1275buf.prom_args [nargs + 3];

spin_unlock_irqrestore(&prom_entry_lock, flags);
raw_spin_unlock(&prom_entry_lock);
raw_local_irq_restore(flags);

return x;
}
Expand Down

0 comments on commit 9a99816

Please sign in to comment.