Thread (11 messages) flat view 11 messages, 5 authors, 2007-06-10

Re: [patch 08/18] PS3: Kexec support

From: Geoff Levand <hidden>
Date: 2007-06-10 00:15:02

Benjamin Herrenschmidt wrote:
On Thu, 2007-06-07 at 12:31 +1000, Michael Ellerman wrote:
quoted
quoted
quoted
quoted
+  pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__,
pd->cpu, virq);
quoted
quoted
quoted
+
+  local_irq_save(flags);
+  asm volatile(
+               "1:        ldarx %0,0,%3\n"
+               "andc      %0,%0,%2\n"
+               "stdcx.    %0,0,%3\n"
+               "bne-      1b"
+               : "=&r" (old), "+m" (*p)
+               : "r" (bit), "r" (p)
+               : "cc" );
+
+  lv1_did_update_interrupt_mask(pd->node, pd->cpu);
+  local_irq_restore(flags);
How is this different from set_bit() ?  (asm-powerpc/bitops.h)

ps. now that I see you're just moving this code around someone's
probably already asked that question. 
Actually the above is clear_bit :-)

That would thus be something around the lines of:

 clear_bit(&pd->bmp.mask, 63 - virq);

Geoff, feel free to replace it with the clear_bit if you think it's
nicer that way :-) (and double check I didn't smoke crack when doing
the above conversion).

The other one in unmask would be set_bit() of course.
Almost right.  Needed clear_bit(63 - virq, &pd->bmp.mask).
I added it in.

-Geoff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help