Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/barrier.h

    r723060a rc8e99bb  
    3636#define KERN_sparc64_BARRIER_H_
    3737
     38#ifdef KERNEL
     39#include <typedefs.h>
     40#else
     41#include <stdint.h>
     42#endif
     43
    3844/*
    3945 * Our critical section barriers are prepared for the weakest RMO memory model.
     
    6470static inline void flush_pipeline(void)
    6571{
     72        uint64_t pc;
     73
    6674        /*
    6775         * The FLUSH instruction takes address parameter.
     
    7078         * The entire kernel text is mapped by a locked ITLB and
    7179         * DTLB entries. Therefore, when this function is called,
    72          * the %o7 register will always be in the range mapped by
     80         * the %pc register will always be in the range mapped by
    7381         * DTLB.
    7482         */
    7583         
    76         asm volatile ("flush %o7\n");
     84        asm volatile (
     85                "rd %%pc, %0\n"
     86                "flush %0\n"
     87                : "=&r" (pc)
     88        );
    7789}
    7890
Note: See TracChangeset for help on using the changeset viewer.