Changeset da1bafb in mainline for kernel/arch/ppc32/src/mm/as.c


Ignore:
Timestamp:
2010-05-24T18:57:31Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0095368
Parents:
666f492
Message:

major code revision

  • replace spinlocks taken with interrupts disabled with irq_spinlocks
  • change spacing (not indendation) to be tab-size independent
  • use unsigned integer types where appropriate (especially bit flags)
  • visual separation
  • remove argument names in function prototypes
  • string changes
  • correct some formating directives
  • replace various cryptic single-character variables (t, a, m, c, b, etc.) with proper identifiers (thread, task, timeout, as, itm, itc, etc.)
  • unify some assembler constructs
  • unused page table levels are now optimized out in compile time
  • replace several ints (with boolean semantics) with bools
  • use specifically sized types instead of generic types where appropriate (size_t, uint32_t, btree_key_t)
  • improve comments
  • split asserts with conjuction into multiple independent asserts
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/src/mm/as.c

    r666f492 rda1bafb  
    5555void as_install_arch(as_t *as)
    5656{
    57         asid_t asid;
    5857        uint32_t sr;
    59 
    60         asid = as->asid;
    6158       
    6259        /* Lower 2 GB, user and supervisor access */
    63         for (sr = 0; sr < 8; sr++) {
    64                 asm volatile (
    65                         "mtsrin %0, %1\n"
    66                         :
    67                         : "r" ((0x6000 << 16) + (asid << 4) + sr), "r" (sr << 28)
    68                 );
    69         }
     60        for (sr = 0; sr < 8; sr++)
     61                sr_set(0x6000, as->asid, sr);
    7062       
    7163        /* Upper 2 GB, only supervisor access */
    72         for (sr = 8; sr < 16; sr++) {
    73                 asm volatile (
    74                         "mtsrin %0, %1\n"
    75                         :
    76                         : "r" ((0x4000 << 16) + (asid << 4) + sr), "r" (sr << 28)
    77                 );
    78         }
     64        for (sr = 8; sr < 16; sr++)
     65                sr_set(0x4000, as->asid, sr);
    7966}
    8067
Note: See TracChangeset for help on using the changeset viewer.