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

Changeset b905002 in mainline


Ignore:
Timestamp:
2010-02-23T22:24:57Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
153fbf9
Parents:
7da160b
Message:

More reliable version of hypercall_fast_ret1().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/sun4v/hypercall.h

    r7da160b rb905002  
    190190__hypercall_fast_ret1(const uint64_t p1, const uint64_t p2, const uint64_t p3,
    191191    const uint64_t p4, const uint64_t p5, const uint64_t function_number,
    192     uint64_t * const ret1)
     192    uint64_t *ret1)
    193193{
    194         uint64_t errno = __hypercall_fast(p1, p2, p3, p4, p5, function_number);
    195         if (ret1 != NULL) {
    196                 asm volatile ("mov %%o1, %0\n" : "=r" (*ret1));
    197         }
    198         return errno;
     194        register uint64_t a6 asm("o5") = function_number;
     195        register uint64_t a1 asm("o0") = p1;
     196        register uint64_t a2 asm("o1") = p2;
     197        register uint64_t a3 asm("o2") = p3;
     198        register uint64_t a4 asm("o3") = p4;
     199        register uint64_t a5 asm("o4") = p5;
     200       
     201        asm volatile (
     202                "ta %8\n"
     203                : "=r" (a1), "=r" (a2)
     204                : "r" (a1), "r" (a2), "r" (a3), "r" (a4), "r" (a5), "r" (a6),
     205                  "i" (FAST_TRAP)
     206                : "memory"
     207        );
     208
     209        if (ret1)
     210                *ret1 = a2;
     211
     212        return a1;
    199213}
    200214
Note: See TracChangeset for help on using the changeset viewer.