summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-05-12 21:05:59 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-05-12 21:05:59 +0000
commitba2dacab305c598cd4c34a604f8e276bf5bab5ff (patch)
tree78670a0139bf4d5ace617b29b7eba82bbc74d602 /include/asm-sparc
parentb77bf69998121e689c5e86cc5630d39a0a9ee6ca (diff)
Merge with Linux 2.3.99-pre7 and various other bits.
Diffstat (limited to 'include/asm-sparc')
-rw-r--r--include/asm-sparc/asm_offsets.h48
-rw-r--r--include/asm-sparc/atomic.h6
-rw-r--r--include/asm-sparc/atops.h4
-rw-r--r--include/asm-sparc/bitops.h3
-rw-r--r--include/asm-sparc/hardirq.h5
-rw-r--r--include/asm-sparc/irq.h5
-rw-r--r--include/asm-sparc/pgalloc.h3
-rw-r--r--include/asm-sparc/semaphore-helper.h8
-rw-r--r--include/asm-sparc/sfp-machine.h8
-rw-r--r--include/asm-sparc/smp.h5
-rw-r--r--include/asm-sparc/softirq.h3
-rw-r--r--include/asm-sparc/string.h14
-rw-r--r--include/asm-sparc/system.h8
-rw-r--r--include/asm-sparc/winmacro.h3
14 files changed, 65 insertions, 58 deletions
diff --git a/include/asm-sparc/asm_offsets.h b/include/asm-sparc/asm_offsets.h
index 66ebe6e4c..e46a4c1ce 100644
--- a/include/asm-sparc/asm_offsets.h
+++ b/include/asm-sparc/asm_offsets.h
@@ -184,8 +184,8 @@
#define ASIZ_task_parent_exec_id 0x00000004
#define AOFF_task_self_exec_id 0x000005fc
#define ASIZ_task_self_exec_id 0x00000004
-#define AOFF_task_exit_sem 0x00000600
-#define ASIZ_task_exit_sem 0x00000020
+#define AOFF_task_alloc_lock 0x00000600
+#define ASIZ_task_alloc_lock 0x00000004
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000004
#define AOFF_mm_mmap_avl 0x00000004
@@ -228,25 +228,21 @@
#define ASIZ_mm_env_start 0x00000004
#define AOFF_mm_env_end 0x0000006c
#define ASIZ_mm_env_end 0x00000004
-#define AOFF_mm_min_flt 0x00000070
-#define ASIZ_mm_min_flt 0x00000004
-#define AOFF_mm_maj_flt 0x00000074
-#define ASIZ_mm_maj_flt 0x00000004
-#define AOFF_mm_rss 0x00000078
+#define AOFF_mm_rss 0x00000070
#define ASIZ_mm_rss 0x00000004
-#define AOFF_mm_total_vm 0x0000007c
+#define AOFF_mm_total_vm 0x00000074
#define ASIZ_mm_total_vm 0x00000004
-#define AOFF_mm_locked_vm 0x00000080
+#define AOFF_mm_locked_vm 0x00000078
#define ASIZ_mm_locked_vm 0x00000004
-#define AOFF_mm_def_flags 0x00000084
+#define AOFF_mm_def_flags 0x0000007c
#define ASIZ_mm_def_flags 0x00000004
-#define AOFF_mm_cpu_vm_mask 0x00000088
+#define AOFF_mm_cpu_vm_mask 0x00000080
#define ASIZ_mm_cpu_vm_mask 0x00000004
-#define AOFF_mm_swap_cnt 0x0000008c
+#define AOFF_mm_swap_cnt 0x00000084
#define ASIZ_mm_swap_cnt 0x00000004
-#define AOFF_mm_swap_address 0x00000090
+#define AOFF_mm_swap_address 0x00000088
#define ASIZ_mm_swap_address 0x00000004
-#define AOFF_mm_segments 0x00000094
+#define AOFF_mm_segments 0x0000008c
#define ASIZ_mm_segments 0x00000004
#define AOFF_thread_uwinmask 0x00000000
#define ASIZ_thread_uwinmask 0x00000004
@@ -469,8 +465,8 @@
#define ASIZ_task_parent_exec_id 0x00000004
#define AOFF_task_self_exec_id 0x00000700
#define ASIZ_task_self_exec_id 0x00000004
-#define AOFF_task_exit_sem 0x00000704
-#define ASIZ_task_exit_sem 0x00000024
+#define AOFF_task_alloc_lock 0x00000704
+#define ASIZ_task_alloc_lock 0x00000008
#define AOFF_mm_mmap 0x00000000
#define ASIZ_mm_mmap 0x00000004
#define AOFF_mm_mmap_avl 0x00000004
@@ -513,25 +509,21 @@
#define ASIZ_mm_env_start 0x00000004
#define AOFF_mm_env_end 0x00000074
#define ASIZ_mm_env_end 0x00000004
-#define AOFF_mm_min_flt 0x00000078
-#define ASIZ_mm_min_flt 0x00000004
-#define AOFF_mm_maj_flt 0x0000007c
-#define ASIZ_mm_maj_flt 0x00000004
-#define AOFF_mm_rss 0x00000080
+#define AOFF_mm_rss 0x00000078
#define ASIZ_mm_rss 0x00000004
-#define AOFF_mm_total_vm 0x00000084
+#define AOFF_mm_total_vm 0x0000007c
#define ASIZ_mm_total_vm 0x00000004
-#define AOFF_mm_locked_vm 0x00000088
+#define AOFF_mm_locked_vm 0x00000080
#define ASIZ_mm_locked_vm 0x00000004
-#define AOFF_mm_def_flags 0x0000008c
+#define AOFF_mm_def_flags 0x00000084
#define ASIZ_mm_def_flags 0x00000004
-#define AOFF_mm_cpu_vm_mask 0x00000090
+#define AOFF_mm_cpu_vm_mask 0x00000088
#define ASIZ_mm_cpu_vm_mask 0x00000004
-#define AOFF_mm_swap_cnt 0x00000094
+#define AOFF_mm_swap_cnt 0x0000008c
#define ASIZ_mm_swap_cnt 0x00000004
-#define AOFF_mm_swap_address 0x00000098
+#define AOFF_mm_swap_address 0x00000090
#define ASIZ_mm_swap_address 0x00000004
-#define AOFF_mm_segments 0x0000009c
+#define AOFF_mm_segments 0x00000094
#define ASIZ_mm_segments 0x00000004
#define AOFF_thread_uwinmask 0x00000000
#define ASIZ_thread_uwinmask 0x00000004
diff --git a/include/asm-sparc/atomic.h b/include/asm-sparc/atomic.h
index 5b96e139b..dc29a13cd 100644
--- a/include/asm-sparc/atomic.h
+++ b/include/asm-sparc/atomic.h
@@ -6,7 +6,9 @@
#ifndef __ARCH_SPARC_ATOMIC__
#define __ARCH_SPARC_ATOMIC__
-#ifdef __SMP__
+#include <linux/config.h>
+
+#ifdef CONFIG_SMP
/* This is a temporary measure. -DaveM */
typedef struct { volatile int counter; } atomic_t;
#define ATOMIC_INIT(i) { (i << 8) }
@@ -19,7 +21,7 @@ typedef struct { int counter; } atomic_t;
#include <asm/system.h>
#include <asm/psr.h>
-#ifndef __SMP__
+#ifndef CONFIG_SMP
#define atomic_read(v) ((v)->counter)
#define atomic_set(v, i) (((v)->counter) = i)
diff --git a/include/asm-sparc/atops.h b/include/asm-sparc/atops.h
index 0bb70752d..30bdf0fb7 100644
--- a/include/asm-sparc/atops.h
+++ b/include/asm-sparc/atops.h
@@ -5,7 +5,9 @@
#ifndef _SPARC_ATOPS_H
#define _SPARC_ATOPS_H
-#ifdef __SMP__
+#include <linux/config.h>
+
+#ifdef CONFIG_SMP
extern __inline__ __volatile__ unsigned char ldstub(volatile unsigned char *lock)
{
diff --git a/include/asm-sparc/bitops.h b/include/asm-sparc/bitops.h
index 1139f58f7..09a08baa2 100644
--- a/include/asm-sparc/bitops.h
+++ b/include/asm-sparc/bitops.h
@@ -8,6 +8,7 @@
#ifndef _SPARC_BITOPS_H
#define _SPARC_BITOPS_H
+#include <linux/config.h>
#include <linux/kernel.h>
#include <asm/byteorder.h>
@@ -82,7 +83,7 @@ extern __inline__ void change_bit(unsigned long nr, void *addr)
#include <asm/system.h>
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#define __SMPVOL volatile
#else
#define __SMPVOL
diff --git a/include/asm-sparc/hardirq.h b/include/asm-sparc/hardirq.h
index bbe134c28..c34312aa4 100644
--- a/include/asm-sparc/hardirq.h
+++ b/include/asm-sparc/hardirq.h
@@ -7,9 +7,10 @@
#ifndef __SPARC_HARDIRQ_H
#define __SPARC_HARDIRQ_H
+#include <linux/config.h>
#include <linux/threads.h>
-#ifndef __SMP__
+#ifndef CONFIG_SMP
extern unsigned int local_irq_count;
/*
@@ -81,6 +82,6 @@ static inline int hardirq_trylock(int cpu)
extern void synchronize_irq(void);
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
#endif /* __SPARC_HARDIRQ_H */
diff --git a/include/asm-sparc/irq.h b/include/asm-sparc/irq.h
index b7ea70091..1f40557b4 100644
--- a/include/asm-sparc/irq.h
+++ b/include/asm-sparc/irq.h
@@ -7,6 +7,7 @@
#ifndef _SPARC_IRQ_H
#define _SPARC_IRQ_H
+#include <linux/config.h>
#include <linux/linkage.h>
#include <linux/threads.h> /* For NR_CPUS */
@@ -21,7 +22,7 @@ BTFIXUPDEF_CALL(char *, __irq_itoa, unsigned int)
#define NR_IRQS 15
/* IRQ handler dispatch entry and exit. */
-#ifdef __SMP__
+#ifdef CONFIG_SMP
extern unsigned int local_irq_count[NR_CPUS];
#define irq_enter(cpu, irq) \
do { hardirq_enter(cpu); \
@@ -63,7 +64,7 @@ extern void claim_ticker14(void (*irq_handler)(int, void *, struct pt_regs *),
int irq,
unsigned int timeout);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
BTFIXUPDEF_CALL(void, set_cpu_int, int, int)
BTFIXUPDEF_CALL(void, clear_cpu_int, int, int)
BTFIXUPDEF_CALL(void, set_irq_udt, int)
diff --git a/include/asm-sparc/pgalloc.h b/include/asm-sparc/pgalloc.h
index fc323280b..7a2b81beb 100644
--- a/include/asm-sparc/pgalloc.h
+++ b/include/asm-sparc/pgalloc.h
@@ -2,6 +2,7 @@
#ifndef _SPARC_PGALLOC_H
#define _SPARC_PGALLOC_H
+#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/sched.h>
@@ -9,7 +10,7 @@
#include <asm/btfixup.h>
/* Fine grained cache/tlb flushing. */
-#ifdef __SMP__
+#ifdef CONFIG_SMP
BTFIXUPDEF_CALL(void, local_flush_cache_all, void)
BTFIXUPDEF_CALL(void, local_flush_cache_mm, struct mm_struct *)
BTFIXUPDEF_CALL(void, local_flush_cache_range, struct mm_struct *, unsigned long, unsigned long)
diff --git a/include/asm-sparc/semaphore-helper.h b/include/asm-sparc/semaphore-helper.h
index e3b5a8f88..a4dd421be 100644
--- a/include/asm-sparc/semaphore-helper.h
+++ b/include/asm-sparc/semaphore-helper.h
@@ -1,6 +1,8 @@
#ifndef _SPARC_SEMAPHORE_HELPER_H
#define _SPARC_SEMAPHORE_HELPER_H
+#include <linux/config.h>
+
/*
* (barely) SMP- and interrupt-safe semaphore helper functions, sparc version.
*
@@ -12,7 +14,7 @@ static __inline__ int waking_non_zero(struct semaphore *sem)
{
int ret;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
int tmp;
__asm__ __volatile__("
@@ -62,7 +64,7 @@ static __inline__ int waking_non_zero_interruptible(struct semaphore *sem,
{
int ret;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
int tmp;
__asm__ __volatile__("
@@ -115,7 +117,7 @@ static __inline__ int waking_non_zero_trylock(struct semaphore *sem)
{
int ret;
-#ifdef __SMP__
+#ifdef CONFIG_SMP
int tmp;
__asm__ __volatile__("
diff --git a/include/asm-sparc/sfp-machine.h b/include/asm-sparc/sfp-machine.h
index c3f12332d..f5372637f 100644
--- a/include/asm-sparc/sfp-machine.h
+++ b/include/asm-sparc/sfp-machine.h
@@ -24,6 +24,8 @@
#ifndef _SFP_MACHINE_H
#define _SFP_MACHINE_H
+
+#include <linux/config.h>
#define _FP_W_TYPE_SIZE 32
#define _FP_W_TYPE unsigned long
@@ -174,13 +176,13 @@
"3" ((USItype)(x0)) \
: "cc")
-#ifndef __SMP__
+#ifndef CONFIG_SMP
extern struct task_struct *last_task_used_math;
#endif
/* Obtain the current rounding mode. */
#ifndef FP_ROUNDMODE
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#define FP_ROUNDMODE ((current->thread.fsr >> 30) & 0x3)
#else
#define FP_ROUNDMODE ((last_task_used_math->thread.fsr >> 30) & 0x3)
@@ -196,7 +198,7 @@ extern struct task_struct *last_task_used_math;
#define FP_HANDLE_EXCEPTIONS return _fex
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#define FP_INHIBIT_RESULTS ((current->thread.fsr >> 23) & _fex)
#else
#define FP_INHIBIT_RESULTS ((last_task_used_math->thread.fsr >> 23) & _fex)
diff --git a/include/asm-sparc/smp.h b/include/asm-sparc/smp.h
index ca4604fe7..5f7040345 100644
--- a/include/asm-sparc/smp.h
+++ b/include/asm-sparc/smp.h
@@ -6,6 +6,7 @@
#ifndef _SPARC_SMP_H
#define _SPARC_SMP_H
+#include <linux/config.h>
#include <linux/threads.h>
#include <asm/head.h>
#include <asm/btfixup.h>
@@ -23,7 +24,7 @@ extern int linux_num_cpus; /* number of CPUs probed */
#endif /* !(__ASSEMBLY__) */
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#ifndef __ASSEMBLY__
@@ -183,7 +184,7 @@ extern __inline__ void smp_send_stop(void) { }
#define PROC_CHANGE_PENALTY 15
-#endif /* !(__SMP__) */
+#endif /* !(CONFIG_SMP) */
#define NO_PROC_ID 0xFF
diff --git a/include/asm-sparc/softirq.h b/include/asm-sparc/softirq.h
index d61b56554..ec3e43f59 100644
--- a/include/asm-sparc/softirq.h
+++ b/include/asm-sparc/softirq.h
@@ -7,6 +7,7 @@
#ifndef __SPARC_SOFTIRQ_H
#define __SPARC_SOFTIRQ_H
+#include <linux/config.h>
#include <linux/threads.h> /* For NR_CPUS */
#include <asm/atomic.h>
@@ -14,7 +15,7 @@
#include <asm/hardirq.h>
-#ifdef __SMP__
+#ifdef CONFIG_SMP
extern unsigned int local_bh_count[NR_CPUS];
#define local_bh_disable() (local_bh_count[smp_processor_id()]++)
diff --git a/include/asm-sparc/string.h b/include/asm-sparc/string.h
index 7f8d06587..7bce820e8 100644
--- a/include/asm-sparc/string.h
+++ b/include/asm-sparc/string.h
@@ -1,4 +1,4 @@
-/* $Id: string.h,v 1.34 1998/01/30 10:59:55 jj Exp $
+/* $Id: string.h,v 1.35 2000/05/02 01:47:01 davem Exp $
* string.h: External definitions for optimized assembly string
* routines for the Linux Kernel.
*
@@ -34,7 +34,7 @@ extern __kernel_size_t __memset(void *,int,__kernel_size_t);
#define __HAVE_ARCH_MEMCPY
-extern inline void *__constant_memcpy(void *to, const void *from, __kernel_size_t n)
+static inline void *__constant_memcpy(void *to, const void *from, __kernel_size_t n)
{
extern void __copy_1page(void *, const void *);
@@ -53,7 +53,7 @@ extern inline void *__constant_memcpy(void *to, const void *from, __kernel_size_
return to;
}
-extern inline void *__nonconstant_memcpy(void *to, const void *from, __kernel_size_t n)
+static inline void *__nonconstant_memcpy(void *to, const void *from, __kernel_size_t n)
{
__memcpy(to, from, n);
return to;
@@ -67,7 +67,7 @@ extern inline void *__nonconstant_memcpy(void *to, const void *from, __kernel_si
#define __HAVE_ARCH_MEMSET
-extern inline void *__constant_c_and_count_memset(void *s, char c, __kernel_size_t count)
+static inline void *__constant_c_and_count_memset(void *s, char c, __kernel_size_t count)
{
extern void bzero_1page(void *);
extern __kernel_size_t __bzero(void *, __kernel_size_t);
@@ -83,7 +83,7 @@ extern inline void *__constant_c_and_count_memset(void *s, char c, __kernel_size
return s;
}
-extern inline void *__constant_c_memset(void *s, char c, __kernel_size_t count)
+static inline void *__constant_c_memset(void *s, char c, __kernel_size_t count)
{
extern __kernel_size_t __bzero(void *, __kernel_size_t);
@@ -94,7 +94,7 @@ extern inline void *__constant_c_memset(void *s, char c, __kernel_size_t count)
return s;
}
-extern inline void *__nonconstant_memset(void *s, char c, __kernel_size_t count)
+static inline void *__nonconstant_memset(void *s, char c, __kernel_size_t count)
{
__memset(s, c, count);
return s;
@@ -134,7 +134,7 @@ extern inline void *__nonconstant_memset(void *s, char c, __kernel_size_t count)
extern int __strncmp(const char *, const char *, __kernel_size_t);
-extern inline int __constant_strncmp(const char *src, const char *dest, __kernel_size_t count)
+static inline int __constant_strncmp(const char *src, const char *dest, __kernel_size_t count)
{
register int retval;
switch(count) {
diff --git a/include/asm-sparc/system.h b/include/asm-sparc/system.h
index 112145b0b..00e33e3bf 100644
--- a/include/asm-sparc/system.h
+++ b/include/asm-sparc/system.h
@@ -66,7 +66,7 @@ extern void synchronize_user_stack(void);
extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
void *fpqueue, unsigned long *fpqdepth);
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#define SWITCH_ENTER \
if(prev->flags & PF_USEDFPU) { \
put_psr(get_psr() | PSR_EF); \
@@ -249,7 +249,7 @@ extern __inline__ unsigned long read_psr_and_cli(void)
#define local_irq_save(flags) __save_and_cli(flags)
#define local_irq_restore(flags) __restore_flags(flags)
-#ifdef __SMP__
+#ifdef CONFIG_SMP
extern unsigned char global_irq_holder;
@@ -285,13 +285,13 @@ extern void __global_restore_flags(unsigned long flags);
#define nop() __asm__ __volatile__ ("nop");
/* This has special calling conventions */
-#ifndef __SMP__
+#ifndef CONFIG_SMP
BTFIXUPDEF_CALL(void, ___xchg32, void)
#endif
extern __inline__ unsigned long xchg_u32(__volatile__ unsigned long *m, unsigned long val)
{
-#ifdef __SMP__
+#ifdef CONFIG_SMP
__asm__ __volatile__("swap [%2], %0"
: "=&r" (val)
: "0" (val), "r" (m));
diff --git a/include/asm-sparc/winmacro.h b/include/asm-sparc/winmacro.h
index 90f70cbc8..e76082257 100644
--- a/include/asm-sparc/winmacro.h
+++ b/include/asm-sparc/winmacro.h
@@ -7,6 +7,7 @@
#ifndef _SPARC_WINMACRO_H
#define _SPARC_WINMACRO_H
+#include <linux/config.h>
#include <asm/ptrace.h>
#include <asm/psr.h>
@@ -111,7 +112,7 @@
add %scratch, 1, %scratch; \
st %scratch, [%cur_reg + AOFF_task_thread + AOFF_thread_w_saved];
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#define LOAD_CURRENT4M(dest_reg, idreg) \
rd %tbr, %idreg; \
sethi %hi(C_LABEL(current_set)), %dest_reg; \