Changeset a35b458 in mainline for kernel/arch/mips32/src/mm/tlb.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/mips32/src/mm/tlb.c

    r3061bc1 ra35b458  
    7676
    7777        /* Clear and initialize TLB. */
    78        
     78
    7979        for (i = 0; i < TLB_ENTRY_COUNT; i++) {
    8080                cp0_index_write(i);
    8181                tlbwi();
    8282        }
    83        
     83
    8484        /*
    8585         * The kernel is going to make use of some wired
     
    9898        uintptr_t badvaddr;
    9999        pte_t pte;
    100        
     100
    101101        badvaddr = cp0_badvaddr_read();
    102102
     
    291291        lo1_save.value = cp0_entry_lo1_read();
    292292        mask_save.value = cp0_pagemask_read();
    293        
     293
    294294        printf("[nr] [asid] [vpn2    ] [mask] [gvdc] [pfn     ]\n");
    295        
     295
    296296        for (i = 0; i < TLB_ENTRY_COUNT; i++) {
    297297                cp0_index_write(i);
    298298                tlbr();
    299                
     299
    300300                mask.value = cp0_pagemask_read();
    301301                hi.value = cp0_entry_hi_read();
    302302                lo0.value = cp0_entry_lo0_read();
    303303                lo1.value = cp0_entry_lo1_read();
    304                
     304
    305305                printf("%-4u %-6u %0#10x %-#6x  %1u%1u%1u%1u  %0#10x\n",
    306306                    i, hi.asid, HI_VPN22ADDR(hi.vpn2), mask.mask,
     
    309309                    lo1.g, lo1.v, lo1.d, lo1.c, LO_PFN2ADDR(lo1.pfn));
    310310        }
    311        
     311
    312312        cp0_entry_hi_write(hi_save.value);
    313313        cp0_entry_lo0_write(lo0_save.value);
     
    339339                cp0_entry_lo0_write(lo0.value);
    340340                cp0_entry_lo1_write(lo1.value);
    341                                
     341
    342342                tlbwi();
    343343        }
    344        
     344
    345345        cp0_entry_hi_write(hi_save.value);
    346346}
     
    360360
    361361        hi_save.value = cp0_entry_hi_read();
    362        
     362
    363363        for (i = 0; i < TLB_ENTRY_COUNT; i++) {
    364364                cp0_index_write(i);
    365365                tlbr();
    366                
     366
    367367                hi.value = cp0_entry_hi_read();
    368                
     368
    369369                if (hi.asid == asid) {
    370370                        lo0.value = cp0_entry_lo0_read();
     
    380380                }
    381381        }
    382        
     382
    383383        cp0_entry_hi_write(hi_save.value);
    384384}
     
    399399
    400400        assert(interrupts_disabled());
    401        
     401
    402402        if (asid == ASID_INVALID)
    403403                return;
     
    431431                }
    432432        }
    433        
     433
    434434        cp0_entry_hi_write(hi_save.value);
    435435}
Note: See TracChangeset for help on using the changeset viewer.