Changeset 762a824 in mainline for arch/ppc32/include


Ignore:
Timestamp:
2006-05-01T14:44:37Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
16dad032
Parents:
0f27b4c
Message:

ppc32: proper exception handling from user-space
code cleanup

Location:
arch/ppc32/include
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • arch/ppc32/include/asm.h

    r0f27b4c r762a824  
    4141 */
    4242static inline ipl_t interrupts_enable(void) {
    43         ipl_t v;
     43        ipl_t v = 0;
    4444        ipl_t tmp;
    4545       
    46         __asm__ volatile (
     46        asm volatile (
    4747                "mfmsr %0\n"
    4848                "mfmsr %1\n"
     
    6565        ipl_t tmp;
    6666       
    67         __asm__ volatile (
     67        asm volatile (
    6868                "mfmsr %0\n"
    6969                "mfmsr %1\n"
     
    8484        ipl_t tmp;
    8585       
    86         __asm__ volatile (
     86        asm volatile (
    8787                "mfmsr %1\n"
    8888                "rlwimi  %0, %1, 0, 17, 15\n"
     
    104104static inline ipl_t interrupts_read(void) {
    105105        ipl_t v;
    106         __asm__ volatile (
     106       
     107        asm volatile (
    107108                "mfmsr %0\n"
    108109                : "=r" (v)
     
    121122        __address v;
    122123       
    123         __asm__ volatile ("and %0, %%sp, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1)));
    124        
     124        asm volatile (
     125                "and %0, %%sp, %1\n"
     126                : "=r" (v)
     127                : "r" (~(STACK_SIZE - 1))
     128        );
    125129        return v;
    126130}
  • arch/ppc32/include/asm/regname.h

    r0f27b4c r762a824  
    195195#define msr_ir  (1 << 4)
    196196#define msr_dr  (1 << 5)
     197#define msr_pr  (1 << 14)
     198#define msr_ee  (1 << 15)
    197199
    198200/* HID0 bits */
  • arch/ppc32/include/atomic.h

    r0f27b4c r762a824  
    3434        long tmp;
    3535
    36         asm __volatile__ (
     36        asm volatile (
    3737                "1:\n"
    3838                "lwarx %0, 0, %2\n"
     
    4242                : "=&r" (tmp), "=m" (val->count)
    4343                : "r" (&val->count), "m" (val->count)
    44                 : "cc");
     44                : "cc"
     45        );
    4546}
    4647
     
    4950        long tmp;
    5051
    51         asm __volatile__(
     52        asm volatile (
    5253                "1:\n"
    5354                "lwarx %0, 0, %2\n"
     
    5758                : "=&r" (tmp), "=m" (val->count)
    5859                : "r" (&val->count), "m" (val->count)
    59                 : "cc");
     60                : "cc"
     61        );
    6062}
    6163
  • arch/ppc32/include/barrier.h

    r0f27b4c r762a824  
    3030#define __ppc32_BARRIER_H__
    3131
    32 #define CS_ENTER_BARRIER()      __asm__ volatile ("" ::: "memory")
    33 #define CS_LEAVE_BARRIER()      __asm__ volatile ("" ::: "memory")
     32#define CS_ENTER_BARRIER()      asm volatile ("" ::: "memory")
     33#define CS_LEAVE_BARRIER()      asm volatile ("" ::: "memory")
    3434
    35 #define memory_barrier() __asm__ volatile ("sync" ::: "memory")
    36 #define read_barrier() __asm__ volatile ("sync" ::: "memory")
    37 #define write_barrier() __asm__ volatile ("eieio" ::: "memory")
     35#define memory_barrier() asm volatile ("sync" ::: "memory")
     36#define read_barrier() asm volatile ("sync" ::: "memory")
     37#define write_barrier() asm volatile ("eieio" ::: "memory")
    3838
    3939#endif
  • arch/ppc32/include/byteorder.h

    r0f27b4c r762a824  
    5252        __address v;
    5353       
    54         __asm__ volatile ("lwbrx %0, %1, %2\n" : "=r" (v) : "i" (0) , "r" (&n));
    55        
     54        asm volatile (
     55                "lwbrx %0, %1, %2\n"
     56                : "=r" (v)
     57                : "i" (0), "r" (&n)
     58        );
    5659        return v;
    5760}
     61
    5862#endif
  • arch/ppc32/include/cpuid.h

    r0f27b4c r762a824  
    3939static inline void cpu_version(struct cpu_info *info)
    4040{
    41         __asm__ volatile (
    42                 "mfspr %0, 287\n"
     41        asm volatile (
     42                "mfpvr %0\n"
    4343                : "=r" (*info)
    4444        );
  • arch/ppc32/include/exception.h

    r0f27b4c r762a824  
    4848        __u32 r10;
    4949        __u32 r11;
    50         __u32 r12;
    5150        __u32 r13;
    5251        __u32 r14;
  • arch/ppc32/include/interrupt.h

    r0f27b4c r762a824  
    3030#define __ppc32_INTERRUPT_H__
    3131
    32 #define IRQ_COUNT       1       /* TODO */
    33 
     32#define IRQ_COUNT       1
    3433#define IVT_ITEMS   15
    3534#define INT_OFFSET  0
Note: See TracChangeset for help on using the changeset viewer.