Changeset a35b458 in mainline for kernel/arch/ia32/src/smp/smp.c


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/ia32/src/smp/smp.c

    r3061bc1 ra35b458  
    6868                ops = &madt_config_operations;
    6969        }
    70        
     70
    7171        if (config.cpu_count == 1) {
    7272                mps_init();
    7373                ops = &mps_config_operations;
    7474        }
    75        
     75
    7676        if (config.cpu_count > 1) {
    7777                l_apic = (uint32_t *) km_map((uintptr_t) l_apic, PAGE_SIZE,
     
    8686        assert(ops != NULL);
    8787        assert(cpus != NULL);
    88        
     88
    8989        for (unsigned int i = 0; i < config.cpu_count; ++i) {
    9090                cpus[i].arch.id = ops->cpu_apic_id(i);
     
    102102{
    103103        unsigned int i;
    104        
     104
    105105        assert(ops != NULL);
    106106
     
    110110         */
    111111        cpu_arch_id_init();
    112        
     112
    113113        /*
    114114         * We need to access data in frame 0.
    115115         * We boldly make use of kernel address space mapping.
    116116         */
    117        
     117
    118118        /*
    119119         * Set the warm-reset vector to the real-mode address of 4K-aligned ap_boot()
     
    122122            (uint16_t) (((uintptr_t) ap_boot) >> 4);  /* segment */
    123123        *((uint16_t *) (PA2KA(0x467 + 2))) = 0;       /* offset */
    124        
     124
    125125        /*
    126126         * Save 0xa to address 0xf of the CMOS RAM.
     
    129129        pio_write_8((ioport8_t *) 0x70, 0xf);
    130130        pio_write_8((ioport8_t *) 0x71, 0xa);
    131        
     131
    132132        pic_disable_irqs(0xffff);
    133133        apic_init();
    134        
     134
    135135        for (i = 0; i < config.cpu_count; i++) {
    136136                /*
     
    139139                if (!ops->cpu_enabled(i))
    140140                        continue;
    141                
     141
    142142                /*
    143143                 * The bootstrap processor is already up.
     
    145145                if (ops->cpu_bootstrap(i))
    146146                        continue;
    147                
     147
    148148                if (ops->cpu_apic_id(i) == bsp_l_apic) {
    149149                        log(LF_ARCH, LVL_ERROR, "kmp: bad processor entry #%u, "
     
    151151                        continue;
    152152                }
    153                
     153
    154154                /*
    155155                 * Prepare new GDT for CPU in question.
    156156                 */
    157                
     157
    158158                /* XXX Flag FRAME_LOW_4_GiB was removed temporarily,
    159159                 * it needs to be replaced by a generic fuctionality of
     
    165165                if (!gdt_new)
    166166                        panic("Cannot allocate memory for GDT.");
    167                
     167
    168168                memcpy(gdt_new, gdt, GDT_ITEMS * sizeof(descriptor_t));
    169169                memsetb(&gdt_new[TSS_DES], sizeof(descriptor_t), 0);
     
    171171                protected_ap_gdtr.base = KA2PA((uintptr_t) gdt_new);
    172172                gdtr.base = (uintptr_t) gdt_new;
    173                
     173
    174174                if (l_apic_send_init_ipi(ops->cpu_apic_id(i))) {
    175175                        /*
Note: See TracChangeset for help on using the changeset viewer.