Commit 520c380c authored by Keith M. Wesolowski's avatar Keith M. Wesolowski

Merge kernel.bkbits.net:/home/repos/linux-2.5

into kernel.bkbits.net:/home/wesolows/sparc32-2.6
parents 67da11af 7e527026
......@@ -11,21 +11,12 @@
# Uncomment the first CFLAGS if you are doing kgdb source level
# debugging of the kernel to get the proper debugging information.
IS_EGCS := $(shell if $(CC) -m32 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo y; else echo n; fi; )
NEW_GAS := $(shell if $(LD) --version 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi)
ifeq ($(NEW_GAS),y)
AS := $(AS) -32
LDFLAGS := -m elf32_sparc
endif
#CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7
ifneq ($(IS_EGCS),y)
CFLAGS := $(CFLAGS) -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
else
CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
AFLAGS := $(AFLAGS) -m32
endif
#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
# Since 2.5.40, the first stage is left not btfix-ed.
......
This diff is collapsed.
......@@ -5,7 +5,6 @@
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/
#include <asm/cprefix.h>
#include <asm/head.h>
#include <asm/asi.h>
#include <asm/contregs.h>
......@@ -217,9 +216,9 @@ tsetup_patch6:
/* Call MMU-architecture dependent stack checking
* routine.
*/
.globl C_LABEL(tsetup_mmu_patchme)
C_LABEL(tsetup_mmu_patchme):
b C_LABEL(tsetup_sun4c_stackchk)
.globl tsetup_mmu_patchme
tsetup_mmu_patchme:
b tsetup_sun4c_stackchk
andcc %sp, 0x7, %g0
/* Architecture specific stack checking routines. When either
......@@ -229,8 +228,8 @@ C_LABEL(tsetup_mmu_patchme):
*/
#define glob_tmp g1
.globl C_LABEL(tsetup_sun4c_stackchk)
C_LABEL(tsetup_sun4c_stackchk):
.globl tsetup_sun4c_stackchk
tsetup_sun4c_stackchk:
/* Done by caller: andcc %sp, 0x7, %g0 */
bne trap_setup_user_stack_is_bolixed
sra %sp, 29, %glob_tmp
......@@ -276,8 +275,8 @@ tsetup_sun4c_onepage:
jmpl %t_retpc + 0x8, %g0
mov %t_kstack, %sp
.globl C_LABEL(tsetup_srmmu_stackchk)
C_LABEL(tsetup_srmmu_stackchk):
.globl tsetup_srmmu_stackchk
tsetup_srmmu_stackchk:
/* Check results of callers andcc %sp, 0x7, %g0 */
bne trap_setup_user_stack_is_bolixed
sethi %hi(PAGE_OFFSET), %glob_tmp
......
This diff is collapsed.
......@@ -4,7 +4,6 @@
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/
#include <asm/cprefix.h>
#include <asm/page.h>
#include <asm/ptrace.h>
#include <asm/psr.h>
......@@ -47,9 +46,9 @@ rtrap_7win_patch5: and %g1, 0x7f, %g1
.globl ret_trap_entry, rtrap_patch1, rtrap_patch2
.globl rtrap_patch3, rtrap_patch4, rtrap_patch5
.globl C_LABEL(ret_trap_lockless_ipi)
.globl ret_trap_lockless_ipi
ret_trap_entry:
C_LABEL(ret_trap_lockless_ipi):
ret_trap_lockless_ipi:
andcc %t_psr, PSR_PS, %g0
be 1f
nop
......@@ -64,7 +63,7 @@ C_LABEL(ret_trap_lockless_ipi):
be signal_p
nop
call C_LABEL(schedule)
call schedule
nop
ld [%curptr + TI_FLAGS], %g2
......@@ -76,7 +75,7 @@ signal_p:
clr %o0
mov %l5, %o2
mov %l6, %o3
call C_LABEL(do_signal)
call do_signal
add %sp, STACKFRAME_SZ, %o1 ! pt_regs ptr
/* Fall through. */
......@@ -95,7 +94,7 @@ ret_trap_continue:
WRITE_PAUSE
mov 1, %o1
call C_LABEL(try_to_clear_window_buffer)
call try_to_clear_window_buffer
add %sp, STACKFRAME_SZ, %o0
b signal_p
......@@ -131,8 +130,8 @@ rtrap_patch2: and %glob_tmp, 0xff, %glob_tmp
* branch to the user stack checking routine
* for return from traps.
*/
.globl C_LABEL(rtrap_mmu_patchme)
C_LABEL(rtrap_mmu_patchme): b C_LABEL(sun4c_rett_stackchk)
.globl rtrap_mmu_patchme
rtrap_mmu_patchme: b sun4c_rett_stackchk
andcc %fp, 0x7, %g0
ret_trap_userwins_ok:
......@@ -165,7 +164,7 @@ ret_trap_unaligned_pc:
wr %t_psr, PSR_ET, %psr
WRITE_PAUSE
call C_LABEL(do_memaccess_unaligned)
call do_memaccess_unaligned
nop
b signal_p
......@@ -215,15 +214,15 @@ ret_trap_user_stack_is_bolixed:
wr %t_psr, PSR_ET, %psr
WRITE_PAUSE
call C_LABEL(window_ret_fault)
call window_ret_fault
add %sp, STACKFRAME_SZ, %o0
b signal_p
ld [%curptr + TI_FLAGS], %g2
.globl C_LABEL(sun4c_rett_stackchk)
C_LABEL(sun4c_rett_stackchk):
.globl sun4c_rett_stackchk
sun4c_rett_stackchk:
be 1f
and %fp, 0xfff, %g1 ! delay slot
......@@ -286,8 +285,8 @@ sun4c_rett_onepage:
b ret_trap_userwins_ok
save %g0, %g0, %g0
.globl C_LABEL(srmmu_rett_stackchk)
C_LABEL(srmmu_rett_stackchk):
.globl srmmu_rett_stackchk
srmmu_rett_stackchk:
bne ret_trap_user_stack_is_bolixed
sethi %hi(PAGE_OFFSET), %g1
cmp %g1, %fp
......
......@@ -6,7 +6,6 @@
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
*/
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/asm_offsets.h>
#include <asm/errno.h>
......@@ -31,7 +30,7 @@
jmp %l2; \
rett %l2 + 4;
#define LABEL(func) CONCAT(func, _low)
#define LABEL(func) func##_low
.globl LABEL(sunosnop)
LABEL(sunosnop):
......
......@@ -56,9 +56,6 @@ int smp_activated = 0;
volatile int __cpu_number_map[NR_CPUS];
volatile int __cpu_logical_map[NR_CPUS];
cycles_t cacheflush_time = 0; /* XXX */
spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] = {
[0 ... (ATOMIC_HASH_SIZE-1)] = SPIN_LOCK_UNLOCKED
};
/* The only guaranteed locking primitive available on all Sparc
* processors is 'ldstub [%reg + immediate], %dest_reg' which atomically
......
......@@ -298,8 +298,7 @@ EXPORT_SYMBOL(__copy_user);
EXPORT_SYMBOL(__strncpy_from_user);
/* Networking helper routines. */
/* XXX This is NOVERS because C_LABEL_STR doesn't get the version number. -DaveM */
EXPORT_SYMBOL_NOVERS(__csum_partial_copy_sparc_generic);
EXPORT_SYMBOL(__csum_partial_copy_sparc_generic);
EXPORT_SYMBOL(csum_partial);
/* Cache flushing. */
......
......@@ -9,7 +9,6 @@
* Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
*/
#include <asm/cprefix.h>
#include <asm/ptrace.h>
.text
......@@ -19,50 +18,50 @@
* value as in [%sp + STACKFRAME_SZ + PT_I0] */
/* SunOS getpid() returns pid in %o0 and ppid in %o1 */
.globl C_LABEL(sunos_getpid)
C_LABEL(sunos_getpid):
call C_LABEL(sys_getppid)
.globl sunos_getpid
sunos_getpid:
call sys_getppid
nop
call C_LABEL(sys_getpid)
call sys_getpid
st %o0, [%sp + STACKFRAME_SZ + PT_I1]
b C_LABEL(ret_sys_call)
b ret_sys_call
st %o0, [%sp + STACKFRAME_SZ + PT_I0]
/* SunOS getuid() returns uid in %o0 and euid in %o1 */
.globl C_LABEL(sunos_getuid)
C_LABEL(sunos_getuid):
call C_LABEL(sys_geteuid16)
.globl sunos_getuid
sunos_getuid:
call sys_geteuid16
nop
call C_LABEL(sys_getuid16)
call sys_getuid16
st %o0, [%sp + STACKFRAME_SZ + PT_I1]
b C_LABEL(ret_sys_call)
b ret_sys_call
st %o0, [%sp + STACKFRAME_SZ + PT_I0]
/* SunOS getgid() returns gid in %o0 and egid in %o1 */
.globl C_LABEL(sunos_getgid)
C_LABEL(sunos_getgid):
call C_LABEL(sys_getegid16)
.globl sunos_getgid
sunos_getgid:
call sys_getegid16
nop
call C_LABEL(sys_getgid16)
call sys_getgid16
st %o0, [%sp + STACKFRAME_SZ + PT_I1]
b C_LABEL(ret_sys_call)
b ret_sys_call
st %o0, [%sp + STACKFRAME_SZ + PT_I0]
/* SunOS's execv() call only specifies the argv argument, the
* environment settings are the same as the calling processes.
*/
.globl C_LABEL(sunos_execv)
C_LABEL(sunos_execv):
.globl sunos_execv
sunos_execv:
st %g0, [%sp + STACKFRAME_SZ + PT_I2]
call C_LABEL(sparc_execve)
call sparc_execve
add %sp, STACKFRAME_SZ, %o0
b C_LABEL(ret_sys_call)
b ret_sys_call
ld [%sp + STACKFRAME_SZ + PT_I0], %o0
......@@ -6,7 +6,6 @@
*/
#include <linux/init.h>
#include <asm/cprefix.h>
#include <asm/head.h>
#include <asm/psr.h>
#include <asm/page.h>
......@@ -15,8 +14,8 @@
#include <asm/vaddrs.h>
#include <asm/contregs.h>
.globl C_LABEL(sun4m_cpu_startup), C_LABEL(__smp4m_processor_id)
.globl C_LABEL(sun4d_cpu_startup), C_LABEL(__smp4d_processor_id)
.globl sun4m_cpu_startup, __smp4m_processor_id
.globl sun4d_cpu_startup, __smp4d_processor_id
__INIT
.align 4
......@@ -26,21 +25,21 @@
* in and sets PIL in %psr to 15, no irqs.
*/
C_LABEL(sun4m_cpu_startup):
sun4m_cpu_startup:
cpu1_startup:
sethi %hi(C_LABEL(trapbase_cpu1)), %g3
sethi %hi(trapbase_cpu1), %g3
b 1f
or %g3, %lo(C_LABEL(trapbase_cpu1)), %g3
or %g3, %lo(trapbase_cpu1), %g3
cpu2_startup:
sethi %hi(C_LABEL(trapbase_cpu2)), %g3
sethi %hi(trapbase_cpu2), %g3
b 1f
or %g3, %lo(C_LABEL(trapbase_cpu2)), %g3
or %g3, %lo(trapbase_cpu2), %g3
cpu3_startup:
sethi %hi(C_LABEL(trapbase_cpu3)), %g3
sethi %hi(trapbase_cpu3), %g3
b 1f
or %g3, %lo(C_LABEL(trapbase_cpu3)), %g3
or %g3, %lo(trapbase_cpu3), %g3
1:
/* Set up a sane %psr -- PIL<0xf> S<0x1> PS<0x1> CWP<0x0> */
......@@ -58,7 +57,7 @@ cpu3_startup:
WRITE_PAUSE
/* Give ourselves a stack and curptr. */
set C_LABEL(current_set), %g5
set current_set, %g5
srl %g3, 10, %g4
and %g4, 0xc, %g4
ld [%g5 + %g4], %g6
......@@ -73,13 +72,13 @@ cpu3_startup:
WRITE_PAUSE
/* Init our caches, etc. */
set C_LABEL(poke_srmmu), %g5
set poke_srmmu, %g5
ld [%g5], %g5
call %g5
nop
/* Start this processor. */
call C_LABEL(smp4m_callin)
call smp4m_callin
nop
b,a smp_do_cpu_idle
......@@ -88,22 +87,22 @@ cpu3_startup:
.align 4
smp_do_cpu_idle:
call C_LABEL(init_idle)
call init_idle
nop
call C_LABEL(cpu_idle)
call cpu_idle
mov 0, %o0
call C_LABEL(cpu_panic)
call cpu_panic
nop
C_LABEL(__smp4m_processor_id):
__smp4m_processor_id:
rd %tbr, %g2
srl %g2, 12, %g2
and %g2, 3, %g2
retl
mov %g1, %o7
C_LABEL(__smp4d_processor_id):
__smp4d_processor_id:
lda [%g0] ASI_M_VIKING_TMP1, %g2
retl
mov %g1, %o7
......@@ -114,7 +113,7 @@ C_LABEL(__smp4d_processor_id):
__INIT
.align 4
C_LABEL(sun4d_cpu_startup):
sun4d_cpu_startup:
/* Set up a sane %psr -- PIL<0xf> S<0x1> PS<0x1> CWP<0x0> */
set (PSR_PIL | PSR_S | PSR_PS), %g1
wr %g1, 0x0, %psr ! traps off though
......@@ -126,7 +125,7 @@ C_LABEL(sun4d_cpu_startup):
WRITE_PAUSE
/* Set tbr - we use just one trap table. */
set C_LABEL(trapbase), %g1
set trapbase, %g1
wr %g1, 0x0, %tbr
WRITE_PAUSE
......@@ -138,7 +137,7 @@ C_LABEL(sun4d_cpu_startup):
sta %g1, [%g0] ASI_M_VIKING_TMP1
/* Give ourselves a stack and curptr. */
set C_LABEL(current_set), %g5
set current_set, %g5
srl %g3, 1, %g4
ld [%g5 + %g4], %g6
......@@ -152,13 +151,13 @@ C_LABEL(sun4d_cpu_startup):
WRITE_PAUSE
/* Init our caches, etc. */
set C_LABEL(poke_srmmu), %g5
set poke_srmmu, %g5
ld [%g5], %g5
call %g5
nop
/* Start this processor. */
call C_LABEL(smp4d_callin)
call smp4d_callin
nop
b,a smp_do_cpu_idle
......@@ -4,7 +4,6 @@
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/
#include <asm/cprefix.h>
#include <asm/contregs.h>
#include <asm/page.h>
#include <asm/ptrace.h>
......@@ -164,8 +163,8 @@ spwin_fromuser:
* the label 'spwin_user_stack_is_bolixed' which will take
* care of things at that point.
*/
.globl C_LABEL(spwin_mmu_patchme)
C_LABEL(spwin_mmu_patchme): b C_LABEL(spwin_sun4c_stackchk)
.globl spwin_mmu_patchme
spwin_mmu_patchme: b spwin_sun4c_stackchk
andcc %sp, 0x7, %g0
spwin_good_ustack:
......@@ -253,7 +252,7 @@ spnwin_patch3: and %twin_tmp, 0xff, %twin_tmp ! patched on 7win Sparcs
/* Turn on traps and call c-code to deal with it. */
wr %t_psr, PSR_ET, %psr
nop
call C_LABEL(window_overflow_fault)
call window_overflow_fault
nop
/* Return from trap if C-code actually fixes things, if it
......@@ -307,8 +306,8 @@ spwin_bad_ustack_from_kernel:
* As noted above %curptr cannot be touched by this routine at all.
*/
.globl C_LABEL(spwin_sun4c_stackchk)
C_LABEL(spwin_sun4c_stackchk):
.globl spwin_sun4c_stackchk
spwin_sun4c_stackchk:
/* LOCATION: Window to be saved on the stack */
/* See if the stack is in the address space hole but first,
......@@ -379,8 +378,8 @@ spwin_sun4c_onepage:
* works for all current v8/srmmu implementations, we'll
* see...
*/
.globl C_LABEL(spwin_srmmu_stackchk)
C_LABEL(spwin_srmmu_stackchk):
.globl spwin_srmmu_stackchk
spwin_srmmu_stackchk:
/* LOCATION: Window to be saved on the stack */
/* Because of SMP concerns and speed we play a trick.
......
......@@ -4,7 +4,6 @@
* Copyright (C) 1995 David S. Miller
*/
#include <asm/cprefix.h>
#include <asm/contregs.h>
#include <asm/page.h>
#include <asm/ptrace.h>
......@@ -135,8 +134,8 @@ fwin_from_user:
/* Branch to the architecture specific stack validation
* routine. They can be found below...
*/
.globl C_LABEL(fwin_mmu_patchme)
C_LABEL(fwin_mmu_patchme): b C_LABEL(sun4c_fwin_stackchk)
.globl fwin_mmu_patchme
fwin_mmu_patchme: b sun4c_fwin_stackchk
andcc %sp, 0x7, %g0
#define STACK_OFFSET (THREAD_SIZE - TRACEREG_SZ - STACKFRAME_SZ)
......@@ -190,7 +189,7 @@ fwin_user_stack_is_bolixed:
wr %t_psr, PSR_ET, %psr ! enable traps
nop
call C_LABEL(window_underflow_fault)
call window_underflow_fault
mov %g4, %o0
b ret_trap_entry
......@@ -244,8 +243,8 @@ fwin_user_finish_up:
*/
.align 4
.globl C_LABEL(sun4c_fwin_stackchk)
C_LABEL(sun4c_fwin_stackchk):
.globl sun4c_fwin_stackchk
sun4c_fwin_stackchk:
/* LOCATION: Window 'W' */
/* Caller did 'andcc %sp, 0x7, %g0' */
......@@ -295,8 +294,8 @@ sun4c_fwin_onepage:
/* A page had bad page permissions, losing... */
b,a fwin_user_stack_is_bolixed
.globl C_LABEL(srmmu_fwin_stackchk)
C_LABEL(srmmu_fwin_stackchk):
.globl srmmu_fwin_stackchk
srmmu_fwin_stackchk:
/* LOCATION: Window 'W' */
/* Caller did 'andcc %sp, 0x7, %g0' */
......
......@@ -7,5 +7,5 @@ EXTRA_AFLAGS := -ansi -DST_DIV0=0x02
lib-y := mul.o rem.o sdiv.o udiv.o umul.o urem.o ashrdi3.o memcpy.o memset.o \
strlen.o checksum.o blockops.o memscan.o memcmp.o strncmp.o \
strncpy_from_user.o divdi3.o udivdi3.o strlen_user.o \
copy_user.o locks.o atomic.o bitops.o debuglocks.o lshrdi3.o \
ashldi3.o rwsem.o muldi3.o bitext.o
copy_user.o locks.o atomic.o atomic32.o bitops.o debuglocks.o \
lshrdi3.o ashldi3.o rwsem.o muldi3.o bitext.o
......@@ -5,12 +5,10 @@
* Copyright (C) 1999 David S. Miller (davem@redhat.com)
*/
#include <asm/cprefix.h>
.text
.align 4
.globl C_LABEL(__ashldi3)
C_LABEL(__ashldi3):
.globl __ashldi3
__ashldi3:
cmp %o2, 0
be 9f
mov 0x20, %g2
......
......@@ -5,12 +5,10 @@
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/
#include <asm/cprefix.h>
.text
.align 4
.globl C_LABEL(__ashrdi3)
C_LABEL(__ashrdi3):
.globl __ashrdi3
__ashrdi3:
tst %o2
be 3f
or %g0, 32, %g2
......
......@@ -4,7 +4,6 @@
*/
#include <linux/config.h>
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/psr.h>
......
/*
* atomic32.c: 32-bit atomic_t implementation
*
* Copyright (C) 2004 Keith M Wesolowski
*
* Based on asm-parisc/atomic.h Copyright (C) 2000 Philipp Rumpf
*/
#include <asm/atomic.h>
#include <linux/spinlock.h>
#include <linux/module.h>
#ifdef CONFIG_SMP
#define ATOMIC_HASH_SIZE 4
#define ATOMIC_HASH(a) (&__atomic_hash[(((unsigned long)a)>>8) & (ATOMIC_HASH_SIZE-1)])
spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] = {
[0 ... (ATOMIC_HASH_SIZE-1)] = SPIN_LOCK_UNLOCKED
};
#else /* SMP */
#define ATOMIC_HASH_SIZE 1
#define ATOMIC_HASH(a) 0
#endif /* SMP */
int __atomic_add_return(int i, atomic_t *v)
{
int ret;
unsigned long flags;
spin_lock_irqsave(ATOMIC_HASH(v), flags);
ret = (v->counter += i);
spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
return ret;
}
void atomic_set(atomic_t *v, int i)
{
unsigned long flags;
spin_lock_irqsave(ATOMIC_HASH(v), flags);
v->counter = i;
spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
}
EXPORT_SYMBOL(__atomic_add_return);
EXPORT_SYMBOL(atomic_set);
......@@ -4,7 +4,6 @@
*/
#include <linux/config.h>
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/psr.h>
......@@ -29,7 +28,7 @@ ___set_bit:
wr %g5, 0x0, %psr
nop; nop; nop
#ifdef CONFIG_SMP
set C_LABEL(bitops_spinlock), %g5
set bitops_spinlock, %g5
2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP.
orcc %g7, 0x0, %g0 ! Did we get it?
bne 2b ! Nope...
......@@ -39,7 +38,7 @@ ___set_bit:
and %g7, %g2, %g2
#ifdef CONFIG_SMP
st %g5, [%g1]
set C_LABEL(bitops_spinlock), %g5
set bitops_spinlock, %g5
stb %g0, [%g5]
#else
st %g5, [%g1]
......@@ -58,7 +57,7 @@ ___clear_bit:
wr %g5, 0x0, %psr
nop; nop; nop
#ifdef CONFIG_SMP
set C_LABEL(bitops_spinlock), %g5
set bitops_spinlock, %g5
2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP.
orcc %g7, 0x0, %g0 ! Did we get it?
bne 2b ! Nope...
......@@ -68,7 +67,7 @@ ___clear_bit:
and %g7, %g2, %g2
#ifdef CONFIG_SMP
st %g5, [%g1]
set C_LABEL(bitops_spinlock), %g5
set bitops_spinlock, %g5
stb %g0, [%g5]
#else
st %g5, [%g1]
......@@ -87,7 +86,7 @@ ___change_bit:
wr %g5, 0x0, %psr
nop; nop; nop
#ifdef CONFIG_SMP
set C_LABEL(bitops_spinlock), %g5
set bitops_spinlock, %g5
2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP.
orcc %g7, 0x0, %g0 ! Did we get it?
bne 2b ! Nope...
......@@ -97,7 +96,7 @@ ___change_bit:
and %g7, %g2, %g2
#ifdef CONFIG_SMP
st %g5, [%g1]
set C_LABEL(bitops_spinlock), %g5
set bitops_spinlock, %g5
stb %g0, [%g5]
#else
st %g5, [%g1]
......
......@@ -4,7 +4,6 @@
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
*/
#include <asm/cprefix.h>
#include <asm/page.h>
/* Zero out 64 bytes of memory at (buf + offset).
......@@ -46,9 +45,9 @@
.text
.align 4
.globl C_LABEL(bzero_1page), C_LABEL(__copy_1page)
.globl bzero_1page, __copy_1page
C_LABEL(bzero_1page):
bzero_1page:
/* NOTE: If you change the number of insns of this routine, please check
* arch/sparc/mm/hypersparc.S */
/* %o0 = buf */
......@@ -67,7 +66,7 @@ C_LABEL(bzero_1page):
retl
nop
C_LABEL(__copy_1page):
__copy_1page:
/* NOTE: If you change the number of insns of this routine, please check
* arch/sparc/mm/hypersparc.S */
/* %o0 = dst, %o1 = src */
......
......@@ -13,7 +13,6 @@
* BSD4.4 portable checksum routine
*/
#include <asm/cprefix.h>
#include <asm/errno.h>
#define CSUM_BIGCHUNK(buf, offset, sum, t0, t1, t2, t3, t4, t5) \
......@@ -104,8 +103,8 @@ csum_partial_fix_alignment:
/* The common case is to get called with a nicely aligned
* buffer of size 0x20. Follow the code path for that case.
*/
.globl C_LABEL(csum_partial)
C_LABEL(csum_partial): /* %o0=buf, %o1=len, %o2=sum */
.globl csum_partial
csum_partial: /* %o0=buf, %o1=len, %o2=sum */
andcc %o0, 0x7, %g0 ! alignment problems?
bne csum_partial_fix_alignment ! yep, handle it
sethi %hi(cpte - 8), %g7 ! prepare table jmp ptr
......@@ -142,8 +141,8 @@ cpte: bne csum_partial_end_cruft ! yep, handle it
cpout: retl ! get outta here
mov %o2, %o0 ! return computed csum
.globl C_LABEL(__csum_partial_copy_start), C_LABEL(__csum_partial_copy_end)
C_LABEL(__csum_partial_copy_start):
.globl __csum_partial_copy_start, __csum_partial_copy_end
__csum_partial_copy_start:
/* Work around cpp -rob */
#define ALLOC #alloc
......@@ -329,8 +328,8 @@ cc_dword_align:
* out of you, game over, lights out.
*/
.align 8
.globl C_LABEL(__csum_partial_copy_sparc_generic)
C_LABEL(__csum_partial_copy_sparc_generic):
.globl __csum_partial_copy_sparc_generic
__csum_partial_copy_sparc_generic:
/* %o0=src, %o1=dest, %g1=len, %g7=sum */
xor %o0, %o1, %o4 ! get changing bits
andcc %o4, 3, %g0 ! check for mismatched alignment
......@@ -472,7 +471,7 @@ ccslow: cmp %g1, 0
4: addcc %g7, %g5, %g7
retl
addx %g0, %g7, %o0
C_LABEL(__csum_partial_copy_end):
__csum_partial_copy_end:
/* We do these strange calculations for the csum_*_from_user case only, ie.
* we only bother with faults on loads... */
......@@ -551,7 +550,7 @@ C_LABEL(__csum_partial_copy_end):
mov %i5, %o0
mov %i7, %o1
mov %i4, %o2
call C_LABEL(lookup_fault)
call lookup_fault
mov %g7, %i4
cmp %o0, 2
bne 1f
......@@ -561,7 +560,7 @@ C_LABEL(__csum_partial_copy_end):
mov %i0, %o1
mov %i1, %o0
5:
call C_LABEL(__memcpy)
call __memcpy
mov %i2, %o2
tst %o0
bne,a 2f
......@@ -570,7 +569,7 @@ C_LABEL(__csum_partial_copy_end):
2:
mov %i1, %o0
6:
call C_LABEL(__bzero)
call __bzero
mov %i3, %o1
1:
ld [%sp + 168], %o2 ! struct_ptr of parent
......
......@@ -11,7 +11,6 @@
* Returns 0 if successful, otherwise count of bytes not copied yet
*/
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/asmmacro.h>
#include <asm/page.h>
......@@ -118,7 +117,7 @@
.globl __copy_user_begin
__copy_user_begin:
.globl C_LABEL(__copy_user)
.globl __copy_user
dword_align:
andcc %o1, 1, %g0
be 4f
......@@ -145,7 +144,7 @@ dword_align:
b 3f
add %o0, 2, %o0
C_LABEL(__copy_user): /* %o0=dst %o1=src %o2=len */
__copy_user: /* %o0=dst %o1=src %o2=len */
xor %o0, %o1, %o4
1:
andcc %o4, 3, %o5
......
......@@ -6,7 +6,6 @@
* Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
*/
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/psr.h>
#include <asm/smp.h>
......
/* $Id: lshrdi3.S,v 1.1 1999/03/21 06:37:45 davem Exp $ */
#include <asm/cprefix.h>
.globl C_LABEL(__lshrdi3)
C_LABEL(__lshrdi3):
.globl __lshrdi3
__lshrdi3:
cmp %o2, 0
be 3f
mov 0x20, %g2
......
#include <asm/cprefix.h>
.text
.align 4
.global C_LABEL(__memcmp), C_LABEL(memcmp)
C_LABEL(__memcmp):
C_LABEL(memcmp):
.global __memcmp, memcmp
__memcmp:
memcmp:
#if 1
cmp %o2, 0
ble L3
......
......@@ -9,13 +9,11 @@
#ifdef __KERNEL__
#include <asm/cprefix.h>
#define FUNC(x) \
.globl C_LABEL(x); \
.type C_LABEL(x),@function; \
.globl x; \
.type x,@function; \
.align 4; \
C_LABEL(x):
x:
#undef FASTER_REVERSE
#undef FASTER_NONALIGNED
......
......@@ -4,8 +4,6 @@
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
*/
#include <asm/cprefix.h>
/* In essence, this is just a fancy strlen. */
#define LO_MAGIC 0x01010101
......@@ -13,9 +11,9 @@
.text
.align 4
.globl C_LABEL(__memscan_zero), C_LABEL(__memscan_generic)
.globl C_LABEL(memscan)
C_LABEL(__memscan_zero):
.globl __memscan_zero, __memscan_generic
.globl memscan
__memscan_zero:
/* %o0 = addr, %o1 = size */
cmp %o1, 0
bne,a 1f
......@@ -114,8 +112,8 @@ mzero_found_it:
retl
sub %o0, 2, %o0
C_LABEL(memscan):
C_LABEL(__memscan_generic):
memscan:
__memscan_generic:
/* %o0 = addr, %o1 = c, %o2 = size */
cmp %o2, 0
bne,a 0f
......
......@@ -7,7 +7,6 @@
* occurs and we were called as clear_user.
*/
#include <asm/cprefix.h>
#include <asm/ptrace.h>
/* Work around cpp -rob */
......@@ -61,12 +60,12 @@
.globl __bzero_begin
__bzero_begin:
.globl C_LABEL(__bzero), C_LABEL(__memset),
.globl C_LABEL(memset)
.globl C_LABEL(__memset_start), C_LABEL(__memset_end)
C_LABEL(__memset_start):
C_LABEL(__memset):
C_LABEL(memset):
.globl __bzero, __memset,
.globl memset
.globl __memset_start, __memset_end
__memset_start:
__memset:
memset:
and %o1, 0xff, %g3
sll %g3, 8, %g2
or %g3, %g2, %g3
......@@ -90,7 +89,7 @@ C_LABEL(memset):
b 4f
sub %o0, %o2, %o0
C_LABEL(__bzero):
__bzero:
mov %g0, %g3
1:
cmp %o1, 7
......@@ -168,7 +167,7 @@ C_LABEL(__bzero):
0:
retl
clr %o0
C_LABEL(__memset_end):
__memset_end:
.section .fixup,#alloc,#execinstr
.align 4
......@@ -195,7 +194,7 @@ C_LABEL(__memset_end):
save %sp, -104, %sp
mov %i5, %o0
mov %i7, %o1
call C_LABEL(lookup_fault)
call lookup_fault
mov %i4, %o2
ret
restore
......
......@@ -5,8 +5,6 @@
* Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
*/
#include <asm/cprefix.h>
#define LO_MAGIC 0x01010101
#define HI_MAGIC 0x80808080
......@@ -42,8 +40,8 @@
mov 2, %o0
.align 4
.global C_LABEL(strlen)
C_LABEL(strlen):
.global strlen
strlen:
mov %o0, %o1
andcc %o0, 3, %g0
bne 0b
......
......@@ -8,8 +8,6 @@
* Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
*/
#include <asm/cprefix.h>
#define LO_MAGIC 0x01010101
#define HI_MAGIC 0x80808080
......@@ -47,10 +45,10 @@
mov 3, %o0
.align 4
.global C_LABEL(__strlen_user), C_LABEL(__strnlen_user)
C_LABEL(__strlen_user):
.global __strlen_user, __strnlen_user
__strlen_user:
sethi %hi(32768), %o1
C_LABEL(__strnlen_user):
__strnlen_user:
mov %o1, %g1
mov %o0, %o1
andcc %o0, 3, %g0
......
......@@ -3,13 +3,11 @@
* generic strncmp routine.
*/
#include <asm/cprefix.h>
.text
.align 4
.global C_LABEL(__strncmp), C_LABEL(strncmp)
C_LABEL(__strncmp):
C_LABEL(strncmp):
.global __strncmp, strncmp
__strncmp:
strncmp:
mov %o0, %g3
mov 0, %o3
......
......@@ -3,7 +3,6 @@
* Copyright(C) 1996 David S. Miller
*/
#include <asm/cprefix.h>
#include <asm/ptrace.h>
#include <asm/errno.h>
......@@ -17,8 +16,8 @@
* bytes copied if we hit a null byte
*/
.globl C_LABEL(__strncpy_from_user)
C_LABEL(__strncpy_from_user):
.globl __strncpy_from_user
__strncpy_from_user:
/* %o0=dest, %o1=src, %o2=count */
mov %o2, %o3
1:
......
......@@ -2,7 +2,7 @@
# Makefile for the FPU instruction emulation.
#
obj-y := math.o ashldi3.o
obj-y := math.o
EXTRA_AFLAGS := -ansi
EXTRA_CFLAGS = -I. -I$(TOPDIR)/include/math-emu -w
......@@ -15,7 +15,6 @@
#include <asm/page.h>
#include <asm/pgtsrmmu.h>
#include <asm/viking.h>
#include <asm/cprefix.h>
#include <asm/btfixup.h>
#ifdef CONFIG_SMP
......
......@@ -26,17 +26,17 @@
#define GET_PROCESSOR_MID(reg, tmp) \
rd %tbr, %reg; \
sethi %hi(C_LABEL(mid_xlate)), %tmp; \
sethi %hi(mid_xlate), %tmp; \
srl %reg, 12, %reg; \
or %tmp, %lo(C_LABEL(mid_xlate)), %tmp; \
or %tmp, %lo(mid_xlate), %tmp; \
and %reg, 3, %reg; \
ldub [%tmp + %reg], %reg;
#define GET_PROCESSOR_OFFSET(reg, tmp) \
GET_PROCESSOR_ID(reg) \
sethi %hi(C_LABEL(cpu_offset)), %tmp; \
sethi %hi(cpu_offset), %tmp; \
sll %reg, 2, %reg; \
or %tmp, %lo(C_LABEL(cpu_offset)), %tmp; \
or %tmp, %lo(cpu_offset), %tmp; \
ld [%tmp + %reg], %reg;
/* All trap entry points _must_ begin with this macro or else you
......
......@@ -11,49 +11,16 @@
#define __ARCH_SPARC_ATOMIC__
#include <linux/config.h>
#include <linux/spinlock.h>
typedef struct { volatile int counter; } atomic_t;
#ifdef __KERNEL__
#ifdef CONFIG_SMP
#define ATOMIC_HASH_SIZE 4
#define ATOMIC_HASH(a) (&__atomic_hash[(((unsigned long)a)>>8) & (ATOMIC_HASH_SIZE-1)])
extern spinlock_t __atomic_hash[ATOMIC_HASH_SIZE];
#else /* SMP */
#define ATOMIC_HASH_SIZE 1
#define ATOMIC_HASH(a) 0
#endif /* SMP */
static inline int __atomic_add_return(int i, atomic_t *v)
{
int ret;
unsigned long flags;
spin_lock_irqsave(ATOMIC_HASH(v), flags);
ret = (v->counter += i);
spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
return ret;
}
static inline void atomic_set(atomic_t *v, int i)
{
unsigned long flags;
spin_lock_irqsave(ATOMIC_HASH(v), flags);
v->counter = i;
spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
}
#define ATOMIC_INIT(i) { (i) }
extern int __atomic_add_return(int, atomic_t *);
extern void atomic_set(atomic_t *, int);
#define atomic_read(v) ((v)->counter)
#define atomic_add(i, v) ((void)__atomic_add_return( (int)(i), (v)))
......
......@@ -18,7 +18,6 @@
#include <linux/in6.h>
#include <asm/uaccess.h>
#include <asm/cprefix.h>
/* computes the checksum of a memory block at buff, length len,
* and adds in "sum" (32-bit)
......@@ -51,7 +50,7 @@ csum_partial_copy_nocheck (const char *src, char *dst, int len,
register int l asm("g1") = len;
__asm__ __volatile__ (
"call " C_LABEL_STR(__csum_partial_copy_sparc_generic) "\n\t"
"call __csum_partial_copy_sparc_generic\n\t"
" mov %6, %%g7\n"
: "=&r" (ret), "=&r" (d), "=&r" (l)
: "0" (ret), "1" (d), "2" (l), "r" (sum)
......@@ -81,7 +80,7 @@ csum_partial_copy_from_user(const char *src, char *dst, int len,
".word 1f,2\n\t"
".previous\n"
"1:\n\t"
"call " C_LABEL_STR(__csum_partial_copy_sparc_generic) "\n\t"
"call __csum_partial_copy_sparc_generic\n\t"
" st %8, [%%sp + 64]\n"
: "=&r" (ret), "=&r" (d), "=&r" (l), "=&r" (s)
: "0" (ret), "1" (d), "2" (l), "3" (s), "r" (err)
......@@ -110,7 +109,7 @@ csum_partial_copy_to_user(const char *src, char *dst, int len,
".word 1f,1\n\t"
".previous\n"
"1:\n\t"
"call " C_LABEL_STR(__csum_partial_copy_sparc_generic) "\n\t"
"call __csum_partial_copy_sparc_generic\n\t"
" st %8, [%%sp + 64]\n"
: "=&r" (ret), "=&r" (d), "=&r" (l), "=&r" (s)
: "0" (ret), "1" (d), "2" (l), "3" (s), "r" (err)
......
/* cprefix.h: This file is included by assembly source which needs
* to know what the c-label prefixes are. The newer versions
* of cpp that come with gcc predefine such things to help
* us out. The reason this stuff is needed is to make
* solaris compiles of the kernel work.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/
#ifndef __SPARC_CPREFIX_H
#define __SPARC_CPREFIX_H
#if defined(__svr4__) || defined(__ELF__)
#define C_LABEL_PREFIX
#define C_LABEL_STR(name) #name
#else
#define C_LABEL_PREFIX _
#define C_LABEL_STR(name) "_" #name
#endif
#define CONCAT(a, b) CONCAT2(a, b)
#define CONCAT2(a, b) a##b
#define C_LABEL(name) CONCAT(C_LABEL_PREFIX, name)
#endif /* !(__SPARC_CPREFIX_H) */
......@@ -22,8 +22,8 @@
/* Data/text faults. Defaults to sun4c version at boot time. */
#define SPARC_TFAULT rd %psr, %l0; rd %wim, %l3; b sun4c_fault; mov 1, %l7;
#define SPARC_DFAULT rd %psr, %l0; rd %wim, %l3; b sun4c_fault; mov 0, %l7;
#define SRMMU_TFAULT rd %psr, %l0; rd %wim, %l3; b C_LABEL(srmmu_fault); mov 1, %l7;
#define SRMMU_DFAULT rd %psr, %l0; rd %wim, %l3; b C_LABEL(srmmu_fault); mov 0, %l7;
#define SRMMU_TFAULT rd %psr, %l0; rd %wim, %l3; b srmmu_fault; mov 1, %l7;
#define SRMMU_DFAULT rd %psr, %l0; rd %wim, %l3; b srmmu_fault; mov 0, %l7;
/* This is for traps we should NEVER get. */
#define BAD_TRAP(num) \
......@@ -41,17 +41,17 @@
/* Software trap for Linux system calls. */
#define LINUX_SYSCALL_TRAP \
sethi %hi(C_LABEL(sys_call_table)), %l7; \
or %l7, %lo(C_LABEL(sys_call_table)), %l7; \
sethi %hi(sys_call_table), %l7; \
or %l7, %lo(sys_call_table), %l7; \
b linux_sparc_syscall; \
rd %psr, %l0;
/* Software trap for SunOS4.1.x system calls. */
#define SUNOS_SYSCALL_TRAP \
rd %psr, %l0; \
sethi %hi(C_LABEL(sunos_sys_table)), %l7; \
sethi %hi(sunos_sys_table), %l7; \
b linux_sparc_syscall; \
or %l7, %lo(C_LABEL(sunos_sys_table)), %l7;
or %l7, %lo(sunos_sys_table), %l7;
#define SUNOS_NO_SYSCALL_TRAP \
b sunos_syscall; \
......@@ -80,8 +80,8 @@
/* Software trap for Sparc-netbsd system calls. */
#define NETBSD_SYSCALL_TRAP \
sethi %hi(C_LABEL(sys_call_table)), %l7; \
or %l7, %lo(C_LABEL(sys_call_table)), %l7; \
sethi %hi(sys_call_table), %l7; \
or %l7, %lo(sys_call_table), %l7; \
b bsd_syscall; \
rd %psr, %l0;
......
......@@ -11,16 +11,16 @@
#include <asm/page.h> /* IO address mapping routines need this */
#include <asm/system.h>
#define page_to_phys(page) ((page - mem_map) << PAGE_SHIFT)
#define page_to_phys(page) (((page) - mem_map) << PAGE_SHIFT)
static inline u32 flip_dword (u32 d)
static inline u32 flip_dword (u32 l)
{
return ((d&0xff)<<24) | (((d>>8)&0xff)<<16) | (((d>>16)&0xff)<<8)| ((d>>24)&0xff);
return ((l&0xff)<<24) | (((l>>8)&0xff)<<16) | (((l>>16)&0xff)<<8)| ((l>>24)&0xff);
}
static inline u16 flip_word (u16 d)
static inline u16 flip_word (u16 w)
{
return ((d&0xff) << 8) | ((d>>8)&0xff);
return ((w&0xff) << 8) | ((w>>8)&0xff);
}
/*
......@@ -56,14 +56,14 @@ static inline void __raw_writeb(u8 b, unsigned long addr)
*(volatile u8 *)addr = b;
}
static inline void __raw_writew(u16 b, unsigned long addr)
static inline void __raw_writew(u16 w, unsigned long addr)
{
*(volatile u16 *)addr = b;
*(volatile u16 *)addr = w;
}
static inline void __raw_writel(u32 b, unsigned long addr)
static inline void __raw_writel(u32 l, unsigned long addr)
{
*(volatile u32 *)addr = b;
*(volatile u32 *)addr = l;
}
static inline u8 __readb(unsigned long addr)
......@@ -86,26 +86,26 @@ static inline void __writeb(u8 b, unsigned long addr)
*(volatile u8 *)addr = b;
}
static inline void __writew(u16 b, unsigned long addr)
static inline void __writew(u16 w, unsigned long addr)
{
*(volatile u16 *)addr = flip_word(b);
*(volatile u16 *)addr = flip_word(w);
}
static inline void __writel(u32 b, unsigned long addr)
static inline void __writel(u32 l, unsigned long addr)
{
*(volatile u32 *)addr = flip_dword(b);
*(volatile u32 *)addr = flip_dword(l);
}
#define readb(addr) __readb((unsigned long)(addr))
#define readw(addr) __readw((unsigned long)(addr))
#define readl(addr) __readl((unsigned long)(addr))
#define readb_relaxed(addr) readb(addr)
#define readw_relaxed(addr) readw(addr)
#define readl_relaxed(addr) readl(addr)
#define readb(__addr) __readb((unsigned long)(__addr))
#define readw(__addr) __readw((unsigned long)(__addr))
#define readl(__addr) __readl((unsigned long)(__addr))
#define readb_relaxed(__addr) readb(__addr)
#define readw_relaxed(__addr) readw(__addr)
#define readl_relaxed(__addr) readl(__addr)
#define writeb(b, addr) __writeb((b),(unsigned long)(addr))
#define writew(b, addr) __writew((b),(unsigned long)(addr))
#define writel(b, addr) __writel((b),(unsigned long)(addr))
#define writeb(__b, __addr) __writeb((__b),(unsigned long)(__addr))
#define writew(__w, __addr) __writew((__w),(unsigned long)(__addr))
#define writel(__l, __addr) __writel((__l),(unsigned long)(__addr))
/*
* I/O space operations
......@@ -124,22 +124,22 @@ static inline void __writel(u32 b, unsigned long addr)
* mapped somewhere into virtual kernel space and we
* can use inb/outb again.
*/
#define inb_local(addr) __readb(addr)
#define inb(addr) __readb(addr)
#define inw(addr) __readw(addr)
#define inl(addr) __readl(addr)
#define outb_local(b, addr) __writeb(b, addr)
#define outb(b, addr) __writeb(b, addr)
#define outw(b, addr) __writew(b, addr)
#define outl(b, addr) __writel(b, addr)
#define inb_p inb
#define outb_p outb
#define inw_p inw
#define outw_p outw
#define inl_p inl
#define outl_p outl
#define inb_local(__addr) __readb((unsigned long)(__addr))
#define inb(__addr) __readb((unsigned long)(__addr))
#define inw(__addr) __readw((unsigned long)(__addr))
#define inl(__addr) __readl((unsigned long)(__addr))
#define outb_local(__b, __addr) __writeb(__b, (unsigned long)(__addr))
#define outb(__b, __addr) __writeb(__b, (unsigned long)(__addr))
#define outw(__w, __addr) __writew(__w, (unsigned long)(__addr))
#define outl(__l, __addr) __writel(__l, (unsigned long)(__addr))
#define inb_p(__addr) inb(__addr)
#define outb_p(__b, __addr) outb(__b, __addr)
#define inw_p(__addr) inw(__addr)
#define outw_p(__w, __addr) outw(__w, __addr)
#define inl_p(__addr) inl(__addr)
#define outl_p(__l, __addr) outl(__l, __addr)
extern void outsb(unsigned long addr, const void *src, unsigned long cnt);
extern void outsw(unsigned long addr, const void *src, unsigned long cnt);
......@@ -176,25 +176,25 @@ static inline void _sbus_writeb(u8 b, unsigned long addr)
*(volatile u8 *)addr = b;
}
static inline void _sbus_writew(u16 b, unsigned long addr)
static inline void _sbus_writew(u16 w, unsigned long addr)
{
*(volatile u16 *)addr = b;
*(volatile u16 *)addr = w;
}
static inline void _sbus_writel(u32 b, unsigned long addr)
static inline void _sbus_writel(u32 l, unsigned long addr)
{
*(volatile u32 *)addr = b;
*(volatile u32 *)addr = l;
}
/*
* The only reason for #define's is to hide casts to unsigned long.
*/
#define sbus_readb(a) _sbus_readb((unsigned long)(a))
#define sbus_readw(a) _sbus_readw((unsigned long)(a))
#define sbus_readl(a) _sbus_readl((unsigned long)(a))
#define sbus_writeb(v, a) _sbus_writeb(v, (unsigned long)(a))
#define sbus_writew(v, a) _sbus_writew(v, (unsigned long)(a))
#define sbus_writel(v, a) _sbus_writel(v, (unsigned long)(a))
#define sbus_readb(__addr) _sbus_readb((unsigned long)(__addr))
#define sbus_readw(__addr) _sbus_readw((unsigned long)(__addr))
#define sbus_readl(__addr) _sbus_readl((unsigned long)(__addr))
#define sbus_writeb(__b, __addr) _sbus_writeb(__b, (unsigned long)(__addr))
#define sbus_writew(__w, __addr) _sbus_writew(__w, (unsigned long)(__addr))
#define sbus_writel(__l, __addr) _sbus_writel(__l, (unsigned long)(__addr))
static inline void *sbus_memset_io(void *__dst, int c, __kernel_size_t n)
{
......
......@@ -106,9 +106,9 @@
#ifdef CONFIG_SMP
#define LOAD_CURRENT4M(dest_reg, idreg) \
rd %tbr, %idreg; \
sethi %hi(C_LABEL(current_set)), %dest_reg; \
sethi %hi(current_set), %dest_reg; \
srl %idreg, 10, %idreg; \
or %dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \
or %dest_reg, %lo(current_set), %dest_reg; \
and %idreg, 0xc, %idreg; \
ld [%idreg + %dest_reg], %dest_reg;
......@@ -119,15 +119,15 @@
/* Blackbox - take care with this... - check smp4m and smp4d before changing this. */
#define LOAD_CURRENT(dest_reg, idreg) \
sethi %hi(___b_load_current), %idreg; \
sethi %hi(C_LABEL(current_set)), %dest_reg; \
sethi %hi(C_LABEL(boot_cpu_id4)), %idreg; \
or %dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \
ldub [%idreg + %lo(C_LABEL(boot_cpu_id4))], %idreg; \
sethi %hi(current_set), %dest_reg; \
sethi %hi(boot_cpu_id4), %idreg; \
or %dest_reg, %lo(current_set), %dest_reg; \
ldub [%idreg + %lo(boot_cpu_id4)], %idreg; \
ld [%idreg + %dest_reg], %dest_reg;
#else
#define LOAD_CURRENT(dest_reg, idreg) \
sethi %hi(C_LABEL(current_set)), %idreg; \
ld [%idreg + %lo(C_LABEL(current_set))], %dest_reg;
sethi %hi(current_set), %idreg; \
ld [%idreg + %lo(current_set)], %dest_reg;
#endif
#endif /* !(_SPARC_WINMACRO_H) */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment