Changeset b00fdde in mainline for arch/sparc64/include/asm.h


Ignore:
Timestamp:
2005-12-08T22:43:39Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0d04024
Parents:
944b15c
Message:

sparc64 work.
Implement functions for reading IMMU and DMMU TLBs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/sparc64/include/asm.h

    r944b15c rb00fdde  
    108108}
    109109
     110/** Load __u64 from alternate space.
     111 *
     112 * @param asi ASI determining the alternate space.
     113 * @param va Virtual address within the ASI.
     114 *
     115 * @return Value read from the virtual address in the specified address space.
     116 */
     117static inline __u64 asi_u64_read(asi_t asi, __address va)
     118{
     119        __u64 v;
     120       
     121        __asm__ volatile ("ldxa [%1] %2, %0\n" : "=r" (v) : "r" (va), "i" (asi));
     122       
     123        return v;
     124}
     125
     126/** Store __u64 to alternate space.
     127 *
     128 * @param asi ASI determining the alternate space.
     129 * @param va Virtual address within the ASI.
     130 * @param v Value to be written.
     131 */
     132static inline void asi_u64_write(asi_t asi, __address va, __u64 v)
     133{
     134        __asm__ volatile ("stxa %0, [%1] %2\n" : :  "r" (v), "r" (va), "i" (asi));
     135}
     136
    110137
    111138void cpu_halt(void);
Note: See TracChangeset for help on using the changeset viewer.