Changeset 8565a42 in mainline for kernel/genarch/src/acpi/madt.c


Ignore:
Timestamp:
2018-03-02T20:34:50Z (8 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/genarch/src/acpi/madt.c

    r3061bc1 r8565a42  
    8383{
    8484        assert(i < madt_l_apic_entry_cnt);
    85        
     85
    8686        return ((struct madt_l_apic *)
    8787            madt_entries_index[madt_l_apic_entry_index + i])->apic_id;
     
    9191{
    9292        assert(i < madt_l_apic_entry_cnt);
    93        
     93
    9494        /*
    9595         * FIXME: The current local APIC driver limits usable
     
    9999        if (i > 7)
    100100                return false;
    101        
     101
    102102        return ((struct madt_l_apic *)
    103103            madt_entries_index[madt_l_apic_entry_index + i])->flags & 0x1;
     
    107107{
    108108        assert(i < madt_l_apic_entry_cnt);
    109        
     109
    110110        return ((struct madt_l_apic *)
    111111            madt_entries_index[madt_l_apic_entry_index + i])->apic_id ==
     
    117117        if (irq >= sizeof(isa_irq_map) / sizeof(int))
    118118                return (int) irq;
    119        
     119
    120120        return isa_irq_map[irq];
    121121}
     
    135135        uint8_t typea = (*((struct madt_apic_header **) a))->type;
    136136        uint8_t typeb = (*((struct madt_apic_header **) b))->type;
    137        
     137
    138138        if (typea > typeb)
    139139                return 1;
    140        
     140
    141141        if (typea < typeb)
    142142                return -1;
    143        
     143
    144144        return 0;
    145145}
     
    149149        if (madt_l_apic_entry_cnt == 0)
    150150                madt_l_apic_entry_index = i;
    151        
     151
    152152        madt_l_apic_entry_cnt++;
    153        
     153
    154154        if (!(la->flags & 0x1)) {
    155155                /* Processor is unusable, skip it. */
    156156                return;
    157157        }
    158        
     158
    159159        apic_id_mask |= 1 << la->apic_id;
    160160}
     
    169169                /* Currently not supported */
    170170        }
    171        
     171
    172172        madt_io_apic_entry_cnt++;
    173173}
     
    177177{
    178178        assert(override->source < sizeof(isa_irq_map) / sizeof(int));
    179        
     179
    180180        isa_irq_map[override->source] = override->global_int;
    181181}
     
    186186            (((uint8_t *) acpi_madt) + acpi_madt->header.length);
    187187        struct madt_apic_header *hdr;
    188        
     188
    189189        l_apic = (uint32_t *) (sysarg_t) acpi_madt->l_apic_address;
    190        
     190
    191191        /* Count MADT entries */
    192192        unsigned int madt_entries_index_cnt = 0;
     
    194194            hdr = (struct madt_apic_header *) (((uint8_t *) hdr) + hdr->length))
    195195                madt_entries_index_cnt++;
    196        
     196
    197197        /* Create MADT APIC entries index array */
    198198        madt_entries_index = (struct madt_apic_header **)
     
    201201        if (!madt_entries_index)
    202202                panic("Memory allocation error.");
    203        
     203
    204204        size_t i = 0;
    205        
     205
    206206        for (hdr = acpi_madt->apic_header; hdr < end;
    207207            hdr = (struct madt_apic_header *) (((uint8_t *) hdr) + hdr->length)) {
     
    209209                i++;
    210210        }
    211        
     211
    212212        /* Sort MADT index structure */
    213213        if (!gsort(madt_entries_index, madt_entries_index_cnt,
    214214            sizeof(struct madt_apic_header *), madt_cmp, NULL))
    215215                panic("Sorting error.");
    216        
     216
    217217        /* Parse MADT entries */
    218218        for (i = 0; i < madt_entries_index_cnt; i++) {
    219219                hdr = madt_entries_index[i];
    220                
     220
    221221                switch (hdr->type) {
    222222                case MADT_L_APIC:
     
    245245                                    "MADT: Skipping reserved entry (type=%" PRIu8 ")",
    246246                                    hdr->type);
    247                                
     247
    248248                        if (hdr->type >= MADT_RESERVED_OEM_BEGIN)
    249249                                log(LF_ARCH, LVL_NOTE,
    250250                                    "MADT: Skipping OEM entry (type=%" PRIu8 ")",
    251251                                    hdr->type);
    252                        
     252
    253253                        break;
    254254                }
    255255        }
    256        
     256
    257257        if (madt_l_apic_entry_cnt > 0)
    258258                config.cpu_count = madt_l_apic_entry_cnt;
Note: See TracChangeset for help on using the changeset viewer.