Changeset a35b458 in mainline for kernel/arch/arm32/src


Ignore:
Timestamp:
2018-03-02T20:10:49Z (8 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.

Location:
kernel/arch/arm32/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/arm32.c

    r3061bc1 ra35b458  
    6969{
    7070        init.cnt = min3(bootinfo->cnt, TASKMAP_MAX_RECORDS, CONFIG_INIT_TASKS);
    71        
     71
    7272        size_t i;
    7373        for (i = 0; i < init.cnt; i++) {
     
    9393{
    9494        machine_init();
    95        
     95
    9696        /* Initialize exception dispatch table */
    9797        exception_init();
     
    100100        /* Initialize Restartable Atomic Sequences support. */
    101101        ras_init();
    102        
     102
    103103        machine_output_init();
    104104}
     
    132132{
    133133        uint8_t *stck;
    134        
     134
    135135        stck = &THREAD->kstack[STACK_SIZE];
    136136        supervisor_sp = (uintptr_t) stck;
  • kernel/arch/arm32/src/asm.S

    r3061bc1 ra35b458  
    3939        mov r5, r0 /* save dst */
    4040        beq 4f
    41        
     41
    4242        1:
    4343                cmp r2, #0
    4444                movne ip, #0
    4545                beq 3f
    46        
     46
    4747        2:
    4848                ldrb r3, [ip, r1]
     
    5151                cmp ip, r2
    5252                bne 2b
    53        
     53
    5454        3:
    5555                mov r0, r5
    5656                ldmia sp!, {r4, r5, pc}
    57        
     57
    5858        4:
    5959                add r3, r0, #3
     
    6666                mov lr, #0
    6767                mov ip, lr
    68        
     68
    6969        5:
    7070                ldr r3, [ip, r1]
     
    7474                add ip, ip, #4
    7575                bne 5b
    76        
     76
    7777        6:
    7878                ands r4, r2, #3
     
    8282                add ip, r3, r1
    8383                mov r2, #0
    84        
     84
    8585        7:
    8686                ldrb r3, [r2, ip]
  • kernel/arch/arm32/src/atomic.c

    r3061bc1 ra35b458  
    5454         */
    5555        irq_spinlock_lock(&cas_lock, true);
    56        
     56
    5757        void * cur_val = *ptr;
    58        
     58
    5959        if (cur_val == expected) {
    6060                *ptr = new_val;
    6161        }
    62        
     62
    6363        irq_spinlock_unlock(&cas_lock, true);
    64        
     64
    6565        return cur_val;
    6666}
  • kernel/arch/arm32/src/context.S

    r3061bc1 ra35b458  
    5454        ldmia r0!, {sp, lr}
    5555        ldmia r0!, {r4-r11}
    56        
     56
    5757        mov r0, #0
    5858        mov pc, lr
  • kernel/arch/arm32/src/exc_handler.S

    r3061bc1 ra35b458  
    9797        # Stop stack traces here
    9898        mov fp, #0
    99        
     99
    100100        b 2f
    101101
  • kernel/arch/arm32/src/exception.c

    r3061bc1 ra35b458  
    7171        volatile uint32_t handler_address_ptr = EXC_VECTORS_SIZE -
    7272            PREFETCH_OFFSET;
    73        
     73
    7474        /* make it LDR instruction and store at exception vector */
    7575        *vector = handler_address_ptr | LDR_OPCODE;
    7676        smc_coherence(vector);
    77        
     77
    7878        /* store handler's address */
    7979        *(vector + EXC_VECTORS) = handler_addr;
     
    9999        install_handler((unsigned) reset_exception_entry,
    100100            (unsigned *) EXC_RESET_VEC);
    101        
     101
    102102        install_handler((unsigned) undef_instr_exception_entry,
    103103            (unsigned *) EXC_UNDEF_INSTR_VEC);
    104        
     104
    105105        install_handler((unsigned) swi_exception_entry,
    106106            (unsigned *) EXC_SWI_VEC);
    107        
     107
    108108        install_handler((unsigned) prefetch_abort_exception_entry,
    109109            (unsigned *) EXC_PREFETCH_ABORT_VEC);
    110        
     110
    111111        install_handler((unsigned) data_abort_exception_entry,
    112112            (unsigned *) EXC_DATA_ABORT_VEC);
    113        
     113
    114114        install_handler((unsigned) irq_exception_entry,
    115115            (unsigned *) EXC_IRQ_VEC);
    116        
     116
    117117        install_handler((unsigned) fiq_exception_entry,
    118118            (unsigned *) EXC_FIQ_VEC);
     
    140140{
    141141        uint32_t control_reg = SCTLR_read();
    142        
     142
    143143        /* switch on the high vectors bit */
    144144        control_reg |= SCTLR_HIGH_VECTORS_EN_FLAG;
    145        
     145
    146146        SCTLR_write(control_reg);
    147147}
     
    190190#endif
    191191        install_exception_handlers();
    192        
     192
    193193        exc_register(EXC_UNDEF_INSTR, "undefined instruction", true,
    194194            (iroutine_t) undef_insn_exception);
  • kernel/arch/arm32/src/interrupt.c

    r3061bc1 ra35b458  
    4949
    5050        current_status_reg_control_write(STATUS_REG_IRQ_DISABLED_BIT | ipl);
    51        
     51
    5252        return ipl;
    5353}
     
    6262
    6363        current_status_reg_control_write(ipl & ~STATUS_REG_IRQ_DISABLED_BIT);
    64        
     64
    6565        return ipl;
    6666}
  • kernel/arch/arm32/src/mach/integratorcp/integratorcp.c

    r3061bc1 ra35b458  
    103103        *(uint32_t *) ((char *)(icp.hw_map.vga) + 0x1C) = 0x182B;
    104104        *(uint32_t *) ((char *)(icp.hw_map.cmcr) + 0xC) = 0x33805000;
    105        
     105
    106106}
    107107
     
    259259        uint32_t sources = icp_irqc_get_sources();
    260260        unsigned int i;
    261        
     261
    262262        for (i = 0; i < ICP_IRQC_MAX_IRQ; i++) {
    263263                if (sources & (1 << i)) {
     
    295295                vga_init = true;
    296296        }
    297        
     297
    298298        fb_properties_t prop = {
    299299                .addr = ICP_FB,
     
    304304                .visual = VISUAL_RGB_8_8_8_0,
    305305        };
    306        
     306
    307307        outdev_t *fbdev = fb_init(&prop);
    308308        if (fbdev)
     
    322322        pl050->data = (ioport8_t *) icp.hw_map.kbd_data;
    323323        pl050->ctrl = (ioport8_t *) icp.hw_map.kbd_ctrl;
    324                
     324
    325325        pl050_instance_t *pl050_instance = pl050_init(pl050, ICP_KBD_IRQ);
    326326        if (pl050_instance) {
  • kernel/arch/arm32/src/mm/frame.c

    r3061bc1 ra35b458  
    4949        base = ALIGN_UP(base, FRAME_SIZE);
    5050        size = ALIGN_DOWN(size, FRAME_SIZE);
    51        
     51
    5252        if (!frame_adjust_zone_bounds(low, &base, &size))
    5353                return;
     
    6464                            ZONE_AVAILABLE | ZONE_HIGHMEM);
    6565        }
    66        
     66
    6767}
    6868
  • kernel/arch/arm32/src/mm/page.c

    r3061bc1 ra35b458  
    5656
    5757        page_table_lock(AS_KERNEL, true);
    58        
     58
    5959        /* Kernel identity mapping */
    6060        //FIXME: We need to consider the possibility that
     
    6666            cur += FRAME_SIZE)
    6767                page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags);
    68        
     68
    6969#ifdef HIGH_EXCEPTION_VECTORS
    7070        /* Create mapping for exception table at high offset */
     
    7676
    7777        page_table_unlock(AS_KERNEL, true);
    78        
     78
    7979        as_switch(NULL, AS_KERNEL);
    80        
     80
    8181        boot_page_table_free();
    8282}
  • kernel/arch/arm32/src/ras.c

    r3061bc1 ra35b458  
    5555        if (!frame)
    5656                frame = frame_alloc(1, FRAME_LOWMEM, 0);
    57        
     57
    5858        ras_page = (uintptr_t *) km_map(frame,
    5959            PAGE_SIZE, PAGE_READ | PAGE_WRITE | PAGE_USER | PAGE_CACHEABLE);
    60        
     60
    6161        memsetb(ras_page, PAGE_SIZE, 0);
    6262        ras_page[RAS_START] = 0;
  • kernel/arch/arm32/src/start.S

    r3061bc1 ra35b458  
    6060        orr r3, r4, #0x13
    6161        msr cpsr_c, r3
    62        
     62
    6363        ldr sp, =temp_stack
    64        
     64
    6565        bl arm32_pre_main
    66        
     66
    6767        #
    6868        # Create the first stack frame.
Note: See TracChangeset for help on using the changeset viewer.