Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a354ab8557566e9462ea7af20345f6927e6665b3
Commit:     a354ab8557566e9462ea7af20345f6927e6665b3
Parent:     aab835007097122c3a1e7a7dddda0cf89a94cd4e
Author:     Geoff Levand <[EMAIL PROTECTED]>
AuthorDate: Sat Jun 16 08:06:09 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Thu Jun 28 19:16:45 2007 +1000

    [POWERPC] PS3: Use clear_bit
    
    Replace the inline asm with bitops in the PS3 interrupt
    chip mask routines.
    
    Signed-off-by: Geoff Levand <[EMAIL PROTECTED]>
    Acked-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/ps3/interrupt.c |   26 ++------------------------
 1 files changed, 2 insertions(+), 24 deletions(-)

diff --git a/arch/powerpc/platforms/ps3/interrupt.c 
b/arch/powerpc/platforms/ps3/interrupt.c
index e2de899..67e32ec 100644
--- a/arch/powerpc/platforms/ps3/interrupt.c
+++ b/arch/powerpc/platforms/ps3/interrupt.c
@@ -100,24 +100,13 @@ static DEFINE_PER_CPU(struct ps3_private, ps3_private);
 static void ps3_chip_mask(unsigned int virq)
 {
        struct ps3_private *pd = get_irq_chip_data(virq);
-       u64 bit = 0x8000000000000000UL >> virq;
-       u64 *p = &pd->bmp.mask;
-       u64 old;
        unsigned long flags;
 
        pr_debug("%s:%d: thread_id %lu, virq %d\n", __func__, __LINE__,
                pd->thread_id, virq);
 
        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" );
-
+       clear_bit(63 - virq, &pd->bmp.mask);
        lv1_did_update_interrupt_mask(pd->ppe_id, pd->thread_id);
        local_irq_restore(flags);
 }
@@ -132,24 +121,13 @@ static void ps3_chip_mask(unsigned int virq)
 static void ps3_chip_unmask(unsigned int virq)
 {
        struct ps3_private *pd = get_irq_chip_data(virq);
-       u64 bit = 0x8000000000000000UL >> virq;
-       u64 *p = &pd->bmp.mask;
-       u64 old;
        unsigned long flags;
 
        pr_debug("%s:%d: thread_id %lu, virq %d\n", __func__, __LINE__,
                pd->thread_id, virq);
 
        local_irq_save(flags);
-       asm volatile(
-                    "1:        ldarx %0,0,%3\n"
-                    "or        %0,%0,%2\n"
-                    "stdcx.    %0,0,%3\n"
-                    "bne-      1b"
-                    : "=&r" (old), "+m" (*p)
-                    : "r" (bit), "r" (p)
-                    : "cc" );
-
+       set_bit(63 - virq, &pd->bmp.mask);
        lv1_did_update_interrupt_mask(pd->ppe_id, pd->thread_id);
        local_irq_restore(flags);
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to