Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1887 → Rev 1888

/trunk/kernel/arch/sparc64/include/context_offset.h
19,4 → 19,3
#define OFFSET_L6 0x80
#define OFFSET_L7 0x88
#define OFFSET_CLEANWIN 0x98
 
/trunk/kernel/arch/sparc64/include/atomic.h
50,20 → 50,15
static inline long atomic_add(atomic_t *val, int i)
{
uint64_t a, b;
volatile uint64_t x = (uint64_t) &val->count;
 
__asm__ volatile (
"0:\n"
"ldx %0, %1\n"
"add %1, %3, %2\n"
"casx %0, %1, %2\n"
"cmp %1, %2\n"
"bne 0b\n" /* The operation failed and must be attempted again if a != b. */
"nop\n"
: "=m" (*((uint64_t *)x)), "=r" (a), "=r" (b)
: "r" (i)
);
do {
volatile uintptr_t x = (uint64_t) &val->count;
 
a = *((uint64_t *) x);
b = a + i;
__asm__ volatile ("casx %0, %1, %2\n": "+m" (*((uint64_t *)x)), "+r" (a), "+r" (b));
} while (a != b);
 
return a;
}
 
/trunk/kernel/arch/sparc64/include/trap/trap_table.h
106,4 → 106,3
 
/** @}
*/
 
/trunk/kernel/arch/sparc64/Makefile.inc
77,7 → 77,6
DEFS += -DKBD_ADDR_OVRD=0x1fff13083f8ULL
DEFS += -DFB_INVERT_COLORS
endif
 
 
/trunk/kernel/arch/sparc64/src/console.c
115,5 → 115,6
z8530_release();
#endif
}
 
/** @}
*/
/trunk/kernel/arch/sparc64/src/trap/trap.c
53,4 → 53,3
 
/** @}
*/
 
/trunk/kernel/arch/sparc64/src/trap/syscall.c
42,10 → 42,7
 
unative_t syscall(int n, istate_t *istate, unative_t a1, unative_t a2, unative_t a3, unative_t a4)
{
if (n >= TT_TRAP_INSTRUCTION(0) && n <= TT_TRAP_INSTRUCTION_LAST)
return syscall_table[n - TT_TRAP_INSTRUCTION(0)](a1, a2, a3, a4);
else
panic("Undefined syscall %d\n", n - TT_TRAP_INSTRUCTION(0));
return syscall_handler(a1, a2, a3, a4, n - TT_TRAP_INSTRUCTION(0));
}
 
/** @}
/trunk/kernel/arch/sparc64/src/mm/as.c
62,4 → 62,3
 
/** @}
*/
 
/trunk/kernel/arch/sparc64/src/mm/page.c
90,7 → 90,7
if (size <= FRAME_SIZE)
order = 0;
else
order = (fnzb32(size - 1) + 1) - FRAME_WIDTH;
order = (fnzb64(size - 1) + 1) - FRAME_WIDTH;
 
/*
* Use virtual addresses that are beyond the limit of physical memory.