Changeset 8565a42 in mainline for kernel/generic/src/cpu/cpu.c


Ignore:
Timestamp:
2018-03-02T20:34:50Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/cpu/cpu.c

    r3061bc1 r8565a42  
    6363        if (config.cpu_active == 1) {
    6464#endif /* CONFIG_SMP */
    65                
     65
    6666                cpus = (cpu_t *) malloc(sizeof(cpu_t) * config.cpu_count,
    6767                    FRAME_ATOMIC);
    6868                if (!cpus)
    6969                        panic("Cannot allocate CPU structures.");
    70                
     70
    7171                /* Initialize everything */
    7272                memsetb(cpus, sizeof(cpu_t) * config.cpu_count, 0);
    73                
     73
    7474                size_t i;
    7575                for (i = 0; i < config.cpu_count; i++) {
     
    7878                        if (!stack_phys)
    7979                                panic("Cannot allocate CPU stack.");
    80                        
     80
    8181                        cpus[i].stack = (uint8_t *) PA2KA(stack_phys);
    8282                        cpus[i].id = i;
    83                        
     83
    8484                        irq_spinlock_initialize(&cpus[i].lock, "cpus[].lock");
    85                        
     85
    8686                        for (unsigned int j = 0; j < RQ_COUNT; j++) {
    8787                                irq_spinlock_initialize(&cpus[i].rq[j].lock, "cpus[].rq[].lock");
     
    8989                        }
    9090                }
    91                
     91
    9292#ifdef CONFIG_SMP
    9393        }
    9494#endif /* CONFIG_SMP */
    95        
     95
    9696        CPU = &cpus[config.cpu_active - 1];
    97        
     97
    9898        CPU->active = true;
    9999        CPU->tlb_active = true;
    100        
     100
    101101        CPU->idle = false;
    102102        CPU->last_cycle = get_cycle();
    103103        CPU->idle_cycles = 0;
    104104        CPU->busy_cycles = 0;
    105        
     105
    106106        cpu_identify();
    107107        cpu_arch_init();
     
    113113{
    114114        unsigned int i;
    115        
     115
    116116        for (i = 0; i < config.cpu_count; i++) {
    117117                if (cpus[i].active)
Note: See TracChangeset for help on using the changeset viewer.