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/sparc64/src/mm/sun4u/tlb.c

    r3061bc1 ra35b458  
    178178        tag.context = t->as->asid;
    179179        tag.vpn = pg.vpn;
    180        
     180
    181181        itlb_tag_access_write(tag.value);
    182        
     182
    183183        data.value = 0;
    184184        data.v = true;
     
    190190        data.w = false;
    191191        data.g = t->g;
    192        
     192
    193193        itlb_data_in_write(data.value);
    194194}
     
    353353        tlb_data_t d;
    354354        tlb_tag_read_reg_t t;
    355        
     355
    356356        printf("I-TLB contents:\n");
    357357        for (i = 0; i < ITLB_ENTRY_COUNT; i++) {
     
    377377        tlb_data_t d;
    378378        tlb_tag_read_reg_t t;
    379        
     379
    380380        printf("TLB_ISMALL contents:\n");
    381381        for (i = 0; i < tlb_ismall_size(); i++) {
     
    384384                print_tlb_entry(i, t, d);
    385385        }
    386        
     386
    387387        printf("TLB_IBIG contents:\n");
    388388        for (i = 0; i < tlb_ibig_size(); i++) {
     
    391391                print_tlb_entry(i, t, d);
    392392        }
    393        
     393
    394394        printf("TLB_DSMALL contents:\n");
    395395        for (i = 0; i < tlb_dsmall_size(); i++) {
     
    398398                print_tlb_entry(i, t, d);
    399399        }
    400        
     400
    401401        printf("TLB_DBIG_1 contents:\n");
    402402        for (i = 0; i < tlb_dbig_size(); i++) {
     
    405405                print_tlb_entry(i, t, d);
    406406        }
    407        
     407
    408408        printf("TLB_DBIG_2 contents:\n");
    409409        for (i = 0; i < tlb_dbig_size(); i++) {
     
    423423        sfsr.value = dtlb_sfsr_read();
    424424        sfar = dtlb_sfar_read();
    425        
     425
    426426#if defined (US)
    427427        printf("DTLB SFSR: asi=%#x, ft=%#x, e=%d, ct=%d, pr=%d, w=%d, ow=%d, "
     
    433433            sfsr.e, sfsr.ct, sfsr.pr, sfsr.w, sfsr.ow, sfsr.fv);
    434434#endif
    435        
     435
    436436        printf("DTLB SFAR: address=%p\n", (void *) sfar);
    437        
     437
    438438        dtlb_sfsr_write(0);
    439439}
     
    446446        sfsr.value = dtlb_sfsr_read();
    447447        sfar = dtlb_sfar_read();
    448        
     448
    449449#if defined (US)
    450450        printf("DTLB SFSR: asi=%#x, ft=%#x, e=%d, ct=%d, pr=%d, w=%d, ow=%d, "
     
    456456            sfsr.e, sfsr.ct, sfsr.pr, sfsr.w, sfsr.ow, sfsr.fv);
    457457#endif
    458            
     458
    459459        printf("DTLB SFAR: address=%p\n", (void *) sfar);
    460        
     460
    461461        dtlb_sfsr_write(0);
    462462}
     
    467467{
    468468        int i;
    469        
     469
    470470        /*
    471471         * Walk all ITLB and DTLB entries and remove all unlocked mappings.
     
    521521{
    522522        tlb_context_reg_t pc_save, ctx;
    523        
     523
    524524        /* switch to nucleus because we are mapped by the primary context */
    525525        nucleus_enter();
    526        
     526
    527527        ctx.v = pc_save.v = mmu_primary_context_read();
    528528        ctx.context = asid;
    529529        mmu_primary_context_write(ctx.v);
    530        
     530
    531531        itlb_demap(TLB_DEMAP_CONTEXT, TLB_DEMAP_PRIMARY, 0);
    532532        dtlb_demap(TLB_DEMAP_CONTEXT, TLB_DEMAP_PRIMARY, 0);
    533        
     533
    534534        mmu_primary_context_write(pc_save.v);
    535        
     535
    536536        nucleus_leave();
    537537}
     
    548548        unsigned int i;
    549549        tlb_context_reg_t pc_save, ctx;
    550        
     550
    551551        /* switch to nucleus because we are mapped by the primary context */
    552552        nucleus_enter();
    553        
     553
    554554        ctx.v = pc_save.v = mmu_primary_context_read();
    555555        ctx.context = asid;
    556556        mmu_primary_context_write(ctx.v);
    557        
     557
    558558        for (i = 0; i < cnt * MMU_PAGES_PER_PAGE; i++) {
    559559                itlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_PRIMARY,
     
    562562                    page + i * MMU_PAGE_SIZE);
    563563        }
    564        
     564
    565565        mmu_primary_context_write(pc_save.v);
    566        
     566
    567567        nucleus_leave();
    568568}
Note: See TracChangeset for help on using the changeset viewer.