Changeset a35b458 in mainline for kernel/arch/ppc32/src/mm/tlb.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (8 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/ppc32/src/mm/tlb.c

    r3061bc1 ra35b458  
    4242        ptehi_t ptehi;
    4343        ptelo_t ptelo;
    44        
     44
    4545        asm volatile (
    4646                "mfspr %[tlbmiss], 980\n"
     
    5151                  [ptelo] "=r" (ptelo)
    5252        );
    53        
     53
    5454        uint32_t badvaddr = tlbmiss & 0xfffffffc;
    5555        uint32_t physmem = physmem_top();
    56        
     56
    5757        if ((badvaddr < PA2KA(0)) || (badvaddr >= PA2KA(physmem)))
    5858                return; // FIXME
    59        
     59
    6060        ptelo.rpn = KA2PA(badvaddr) >> 12;
    6161        ptelo.wimg = 0;
    6262        ptelo.pp = 2; // FIXME
    63        
     63
    6464        uint32_t index = 0;
    6565        asm volatile (
     
    8484                "sync\n"
    8585        );
    86        
     86
    8787        for (unsigned int i = 0; i < 0x00040000; i += 0x00001000) {
    8888                asm volatile (
     
    9191                );
    9292        }
    93        
     93
    9494        asm volatile (
    9595                "eieio\n"
     
    143143{
    144144        uint32_t sr;
    145        
     145
    146146        for (sr = 0; sr < 16; sr++) {
    147147                uint32_t vsid = sr_get(sr << 28);
    148                
     148
    149149                printf("sr[%02" PRIu32 "]: vsid=%#0" PRIx32 " (asid=%" PRIu32 ")"
    150150                    "%s%s\n", sr, vsid & UINT32_C(0x00ffffff),
     
    153153                    ((vsid >> 29) & 1) ? " user" : "");
    154154        }
    155        
     155
    156156        uint32_t upper;
    157157        uint32_t lower;
    158158        uint32_t mask;
    159159        uint32_t length;
    160        
     160
    161161        PRINT_BAT("ibat[0]", 528, 529);
    162162        PRINT_BAT("ibat[1]", 530, 531);
    163163        PRINT_BAT("ibat[2]", 532, 533);
    164164        PRINT_BAT("ibat[3]", 534, 535);
    165        
     165
    166166        PRINT_BAT("dbat[0]", 536, 537);
    167167        PRINT_BAT("dbat[1]", 538, 539);
Note: See TracChangeset for help on using the changeset viewer.