Changeset a35b458 in mainline for kernel/arch/ia64/src/ivt.S


Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/src/ivt.S

    r3061bc1 ra35b458  
    5757        mov r19 = cr.ipsr
    5858        mov r20 = cr.isr ;;
    59        
     59
    6060    /* 2. Move IIP to IIPA. */
    6161        mov cr.iipa = r18
    62        
     62
    6363    /* 3. Sign extend IIM[20:0], shift left by 4 and add to IIP. */
    6464        shl r17 = r17, 43 ;;    /* shift bit 20 to bit 63 */
     
    6666        add r18 = r18, r17 ;;
    6767        mov cr.iip = r18
    68        
     68
    6969    /* 4. Set IPSR.ri to 0. */
    7070        dep r19 = 0, r19, PSR_RI_SHIFT, PSR_RI_LEN ;;
    7171        mov cr.ipsr = r19
    72        
     72
    7373    /* 5. Check whether IPSR.tb or IPSR.ss is set. */
    7474
     
    7676         * Implement this when Taken Branch and Single Step traps can occur.
    7777         */
    78    
     78
    7979    /* 6. Restore predicates and return from interruption. */
    8080        mov pr = r16 ;;
     
    104104SYMBOL(heavyweight_handler)
    105105    /* 1. copy interrupt registers into bank 0 */
    106    
     106
    107107        /*
    108108         * Note that r24-r31 from bank 0 can be used only as long as PSR.ic = 0.
    109109         */
    110        
     110
    111111        /* Set up FPU as in interrupted context. */
    112112        mov r24 = psr
     
    126126        mov r27 = cr.isr
    127127        mov r28 = cr.ifa
    128        
     128
    129129    /* 2. preserve predicate register into bank 0 */
    130130        mov r29 = pr ;;
    131        
     131
    132132    /* 3. switch to kernel memory stack */
    133133        mov r30 = cr.ipsr
     
    149149         */
    150150(p3)    cmp.eq p3, p4 = VRN_KERNEL, r31 ;;
    151        
     151
    152152        /*
    153153         * Now, p4 is true iff the stack needs to be switched to kernel stack.
     
    155155        mov r30 = r12
    156156(p4)    mov r12 = R_KSTACK ;;
    157        
     157
    158158        add r12 = -STACK_FRAME_SIZE, r12 ;;
    159159        add r31 = STACK_SCRATCH_AREA_SIZE + ISTATE_OFFSET_IN6, r12
     
    166166         */
    167167        cmp.eq p6, p5 = EXC_BREAK_INSTRUCTION, R_VECTOR ;;
    168        
     168
    169169        /*
    170170         * From now on, if this is break_instruction handler, p6 is true and p5
     
    181181(p6)    st8 [r31] = r32, -STACK_ITEM_SIZE ;;    /* save in0 */
    182182(p5)    add r31 = -(7 * STACK_ITEM_SIZE), r31 ;;
    183    
     183
    184184        st8 [r31] = r30, -STACK_ITEM_SIZE ;;    /* save old stack pointer */
    185        
     185
    186186        st8 [r31] = r29, -STACK_ITEM_SIZE ;;    /* save predicate registers */
    187187
     
    197197        cover
    198198        mov r26 = cr.ifs
    199        
     199
    200200        st8 [r31] = r24, -STACK_ITEM_SIZE ;;    /* save ar.rsc */
    201201        st8 [r31] = r25, -STACK_ITEM_SIZE ;;    /* save ar.pfs */
    202202        st8 [r31] = r26, -STACK_ITEM_SIZE       /* save ar.ifs */
    203        
     203
    204204        and r24 = ~(RSC_PL_MASK), r24 ;;
    205205        and r30 = ~(RSC_MODE_MASK), r24 ;;
    206206        mov ar.rsc = r30 ;;             /* update RSE state */
    207        
     207
    208208        mov r27 = ar.rnat
    209209        mov r28 = ar.bspstore ;;
    210        
     210
    211211        /*
    212212         * Inspect BSPSTORE to figure out whether it is necessary to switch to
     
    215215(p1)    shr.u r30 = r28, VRN_SHIFT ;;
    216216(p1)    cmp.eq p1, p2 = VRN_KERNEL, r30 ;;
    217        
     217
    218218        /*
    219219         * If BSPSTORE needs to be switched, p1 is false and p2 is true.
     
    222222(p2)    mov r30 = R_KSTACK_BSP ;;
    223223(p2)    mov ar.bspstore = r30 ;;
    224        
     224
    225225        mov r29 = ar.bsp
    226        
     226
    227227        st8 [r31] = r27, -STACK_ITEM_SIZE ;;    /* save ar.rnat */
    228228        st8 [r31] = r30, -STACK_ITEM_SIZE ;;    /* save new value written to ar.bspstore */
    229229        st8 [r31] = r28, -STACK_ITEM_SIZE ;;    /* save ar.bspstore */
    230230        st8 [r31] = r29, -STACK_ITEM_SIZE       /* save ar.bsp */
    231        
     231
    232232        mov ar.rsc = r24                /* restore RSE's setting + kernel privileges */
    233        
     233
    234234    /* steps 6 - 15 are done by heavyweight_handler_inner() */
    235235        mov R_RET = b0                  /* save b0 belonging to interrupted context */
     
    292292        ld8 r29 = [r31], +STACK_ITEM_SIZE ;;    /* load predicate registers */
    293293        mov pr = r29
    294        
     294
    295295    /* 19. return from interruption */
    296296        ld8 r12 = [r31]                         /* load stack pointer */
     
    303303         */
    304304        alloc loc0 = ar.pfs, 0, 48, 2, 0 ;;
    305        
     305
    306306        /* bank 0 is going to be shadowed, copy essential data from there */
    307307        mov loc1 = R_RET        /* b0 belonging to interrupted context */
    308308        mov loc2 = R_HANDLER
    309309        mov out0 = R_VECTOR
    310        
     310
    311311        add out1 = STACK_SCRATCH_AREA_SIZE, r12
    312312
     
    315315        bsw.1 ;;
    316316        srlz.d
    317        
     317
    318318    /* 7. preserve branch and application registers */
    319319        mov loc3 = ar.unat
     
    323323        mov loc7 = ar.csd
    324324        mov loc8 = ar.ssd
    325        
     325
    326326        mov loc9 = b0
    327327        mov loc10 = b1
     
    332332        mov loc15 = b6
    333333        mov loc16 = b7
    334        
     334
    335335    /* 8. preserve general and floating-point registers */
    336336        mov loc17 = r1
     
    374374        add r30 = ISTATE_OFFSET_F6 + STACK_SCRATCH_AREA_SIZE, r12
    375375        add r31 = ISTATE_OFFSET_F7 + STACK_SCRATCH_AREA_SIZE, r12 ;;
    376        
     376
    377377        stf.spill [r26] = f2, 8 * FLOAT_ITEM_SIZE
    378378        stf.spill [r27] = f3, 8 * FLOAT_ITEM_SIZE
     
    410410
    411411        mov loc47 = ar.fpsr     /* preserve floating point status register */
    412    
     412
    413413    /* 9. skipped (will not enable interrupts) */
    414414        /*
     
    420420    /* 10. call handler */
    421421        movl r1 = __gp
    422    
     422
    423423        mov b1 = loc2
    424424        br.call.sptk.many b0 = b1
     
    426426    /* 11. return from handler */
    4274270:
    428        
     428
    429429    /* 12. skipped (will not disable interrupts) */
    430430        /*
     
    477477        ldf.fill f30 = [r30]
    478478        ldf.fill f31 = [r31] ;;
    479        
     479
    480480        mov r1 = loc17
    481481        mov r2 = loc18
     
    511511
    512512        mov ar.fpsr = loc47     /* restore floating point status register */
    513        
     513
    514514    /* 14. restore branch and application registers */
    515515        mov ar.unat = loc3
     
    519519        mov ar.csd = loc7
    520520        mov ar.ssd = loc8
    521        
     521
    522522        mov b0 = loc9
    523523        mov b1 = loc10
     
    528528        mov b6 = loc15
    529529        mov b7 = loc16
    530        
     530
    531531    /* 15. disable PSR.ic and switch to bank 0 */
    532532        rsm PSR_IC_MASK
     
    578578        HEAVYWEIGHT_HANDLER 0x5e
    579579        HEAVYWEIGHT_HANDLER 0x5f
    580        
     580
    581581        HEAVYWEIGHT_HANDLER 0x60
    582582        HEAVYWEIGHT_HANDLER 0x61
Note: See TracChangeset for help on using the changeset viewer.