Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 74dcc07 in mainline


Ignore:
Timestamp:
2013-06-07T19:07:08Z (7 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
master
Children:
3ee38a9
Parents:
dff90fa7
Message:

arm32, tlb: Use cp15 macros instead of inline assembler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/mm/tlb.c

    rdff90fa7 r74dcc07  
    3737#include <arch/mm/asid.h>
    3838#include <arch/asm.h>
     39#include <arch/cp15.h>
    3940#include <typedefs.h>
    4041#include <arch/mm/page.h>
     
    4647void tlb_invalidate_all(void)
    4748{
    48         asm volatile (
    49                 "eor r1, r1\n"
    50                 "mcr p15, 0, r1, c8, c7, 0\n"
    51                 ::: "r1"
    52         );
     49        TLBIALL_write(0);
    5350}
    5451
     
    6057{
    6158        tlb_invalidate_all();
     59        // TODO: why not TLBIASID_write(asid) ?
    6260}
    6361
     
    6563 *
    6664 * @param page Virtual adress of the page
    67  */ 
     65 */
    6866static inline void invalidate_page(uintptr_t page)
    6967{
    70         asm volatile (
    71                 "mcr p15, 0, %[page], c8, c7, 1\n"
    72                 :: [page] "r" (page)
    73         );
     68        TLBIMVA_write(page);
     69        //TODO: What about TLBIMVAA?
    7470}
    7571
Note: See TracChangeset for help on using the changeset viewer.