summaryrefslogtreecommitdiffstats
path: root/include/asm-alpha
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-alpha
parentb77bf69998121e689c5e86cc5630d39a0a9ee6ca (diff)
Merge with Linux 2.3.99-pre7 and various other bits.
Diffstat (limited to 'include/asm-alpha')
-rw-r--r--include/asm-alpha/atomic.h4
-rw-r--r--include/asm-alpha/delay.h3
-rw-r--r--include/asm-alpha/hardirq.h7
-rw-r--r--include/asm-alpha/mmu_context.h6
-rw-r--r--include/asm-alpha/pgalloc.h12
-rw-r--r--include/asm-alpha/smp.h5
-rw-r--r--include/asm-alpha/softirq.h3
-rw-r--r--include/asm-alpha/string.h12
-rw-r--r--include/asm-alpha/system.h6
9 files changed, 38 insertions, 20 deletions
diff --git a/include/asm-alpha/atomic.h b/include/asm-alpha/atomic.h
index 81f7b8268..cc8b6f278 100644
--- a/include/asm-alpha/atomic.h
+++ b/include/asm-alpha/atomic.h
@@ -1,6 +1,8 @@
#ifndef _ALPHA_ATOMIC_H
#define _ALPHA_ATOMIC_H
+#include <linux/config.h>
+
/*
* Atomic operations that C can't guarantee us. Useful for
* resource counting etc...
@@ -9,7 +11,7 @@
* than regular operations.
*/
-#ifdef __SMP__
+#ifdef CONFIG_SMP
typedef struct { volatile int counter; } atomic_t;
#else
typedef struct { int counter; } atomic_t;
diff --git a/include/asm-alpha/delay.h b/include/asm-alpha/delay.h
index 84b6d1eb5..74cb75ec2 100644
--- a/include/asm-alpha/delay.h
+++ b/include/asm-alpha/delay.h
@@ -1,6 +1,7 @@
#ifndef __ALPHA_DELAY_H
#define __ALPHA_DELAY_H
+#include <linux/config.h>
#include <asm/smp.h>
/*
@@ -37,7 +38,7 @@ __udelay(unsigned long usecs, unsigned long lps)
__delay((long)usecs >> 32);
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#define udelay(u) __udelay((u), cpu_data[smp_processor_id()].loops_per_sec)
#else
#define udelay(u) __udelay((u), loops_per_sec)
diff --git a/include/asm-alpha/hardirq.h b/include/asm-alpha/hardirq.h
index 1c8101d58..3961ac4a4 100644
--- a/include/asm-alpha/hardirq.h
+++ b/include/asm-alpha/hardirq.h
@@ -3,9 +3,10 @@
/* Initially just a straight copy of the i386 code. */
+#include <linux/config.h>
#include <linux/threads.h>
-#ifndef __SMP__
+#ifndef CONFIG_SMP
extern int __local_irq_count;
#define local_irq_count(cpu) ((void)(cpu), __local_irq_count)
extern unsigned long __irq_attempt[];
@@ -28,7 +29,7 @@ extern unsigned long __irq_attempt[];
#define in_irq() (local_irq_count(smp_processor_id()) != 0)
-#ifndef __SMP__
+#ifndef CONFIG_SMP
#define hardirq_trylock(cpu) (local_irq_count(cpu) == 0)
#define hardirq_endlock(cpu) ((void) 0)
@@ -88,5 +89,5 @@ static inline int hardirq_trylock(int cpu)
extern void synchronize_irq(void);
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
#endif /* _ALPHA_HARDIRQ_H */
diff --git a/include/asm-alpha/mmu_context.h b/include/asm-alpha/mmu_context.h
index c42c1ae54..b44e4a428 100644
--- a/include/asm-alpha/mmu_context.h
+++ b/include/asm-alpha/mmu_context.h
@@ -84,16 +84,16 @@ __reload_thread(struct thread_struct *pcb)
* +-------------+----------------+--------------+
*/
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#include <asm/smp.h>
#define cpu_last_asn(cpuid) (cpu_data[cpuid].last_asn)
#else
extern unsigned long last_asn;
#define cpu_last_asn(cpuid) last_asn
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
#define WIDTH_HARDWARE_ASN 8
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#define WIDTH_THIS_PROCESSOR 5
#else
#define WIDTH_THIS_PROCESSOR 0
diff --git a/include/asm-alpha/pgalloc.h b/include/asm-alpha/pgalloc.h
index f3d42ed96..36e9d37cb 100644
--- a/include/asm-alpha/pgalloc.h
+++ b/include/asm-alpha/pgalloc.h
@@ -30,7 +30,7 @@ extern void __load_new_mm_context(struct mm_struct *);
icache flushing. While functional, it is _way_ overkill. The
icache is tagged with ASNs and it suffices to allocate a new ASN
for the process. */
-#ifndef __SMP__
+#ifndef CONFIG_SMP
#define flush_icache_range(start, end) imb()
#else
#define flush_icache_range(start, end) smp_imb()
@@ -45,7 +45,7 @@ extern void smp_imb(void);
that icache entries are tagged with the ASN and load a new mm context. */
/* ??? Ought to use this in arch/alpha/kernel/signal.c too. */
-#ifndef __SMP__
+#ifndef CONFIG_SMP
static inline void
flush_icache_page(struct vm_area_struct *vma, struct page *page)
{
@@ -154,7 +154,7 @@ static inline void flush_tlb_pgtables(struct mm_struct *mm,
{
}
-#ifndef __SMP__
+#ifndef CONFIG_SMP
/*
* Flush everything (kernel mapping may also have
* changed due to vmalloc/vfree)
@@ -204,21 +204,21 @@ static inline void flush_tlb_range(struct mm_struct *mm,
flush_tlb_mm(mm);
}
-#else /* __SMP__ */
+#else /* CONFIG_SMP */
extern void flush_tlb_all(void);
extern void flush_tlb_mm(struct mm_struct *);
extern void flush_tlb_page(struct vm_area_struct *, unsigned long);
extern void flush_tlb_range(struct mm_struct *, unsigned long, unsigned long);
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
/*
* Allocate and free page tables. The xxx_kernel() versions are
* used to allocate a kernel page table - this turns on ASN bits
* if any.
*/
-#ifndef __SMP__
+#ifndef CONFIG_SMP
extern struct pgtable_cache_struct {
unsigned long *pgd_cache;
unsigned long *pte_cache;
diff --git a/include/asm-alpha/smp.h b/include/asm-alpha/smp.h
index b05076263..3143b0872 100644
--- a/include/asm-alpha/smp.h
+++ b/include/asm-alpha/smp.h
@@ -1,6 +1,7 @@
#ifndef __ASM_SMP_H
#define __ASM_SMP_H
+#include <linux/config.h>
#include <asm/pal.h>
/* HACK: Cabrio WHAMI return value is bogus if more than 8 bits used.. :-( */
@@ -17,7 +18,7 @@ __hard_smp_processor_id(void)
return __r0;
}
-#ifdef __SMP__
+#ifdef CONFIG_SMP
#include <linux/threads.h>
#include <asm/irq.h>
@@ -56,7 +57,7 @@ extern int __cpu_logical_map[NR_CPUS];
extern unsigned long cpu_present_mask;
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
#define NO_PROC_ID (-1)
diff --git a/include/asm-alpha/softirq.h b/include/asm-alpha/softirq.h
index 8b2713ed6..ef77f861e 100644
--- a/include/asm-alpha/softirq.h
+++ b/include/asm-alpha/softirq.h
@@ -1,11 +1,12 @@
#ifndef _ALPHA_SOFTIRQ_H
#define _ALPHA_SOFTIRQ_H
+#include <linux/config.h>
#include <linux/stddef.h>
#include <asm/atomic.h>
#include <asm/hardirq.h>
-#ifndef __SMP__
+#ifndef CONFIG_SMP
extern int __local_bh_count;
#define local_bh_count(cpu) ((void)(cpu), __local_bh_count)
#else
diff --git a/include/asm-alpha/string.h b/include/asm-alpha/string.h
index 8f87ba2cb..2b9cf9438 100644
--- a/include/asm-alpha/string.h
+++ b/include/asm-alpha/string.h
@@ -11,7 +11,10 @@
*/
#define __HAVE_ARCH_MEMCPY
+extern void * memcpy(void *, const void *, size_t);
#define __HAVE_ARCH_MEMMOVE
+extern void * memmove(void *, const void *, size_t);
+
/* For backward compatibility with modules. Unused otherwise. */
extern void * __memcpy(void *, const void *, size_t);
@@ -22,6 +25,7 @@ extern void * __memcpy(void *, const void *, size_t);
#define __HAVE_ARCH_MEMSET
extern void * __constant_c_memset(void *, unsigned long, size_t);
extern void * __memset(void *, int, size_t);
+extern void * memset(void *, int, size_t);
#if __GNUC__ > 2 || __GNUC_MINOR__ >= 91
#define memset(s, c, n) \
@@ -38,13 +42,21 @@ extern void * __memset(void *, int, size_t);
#endif
#define __HAVE_ARCH_STRCPY
+extern char * strcpy(char *,const char *);
#define __HAVE_ARCH_STRNCPY
+extern char * strncpy(char *, const char *, size_t);
#define __HAVE_ARCH_STRCAT
+extern char * strcat(char *, const char *);
#define __HAVE_ARCH_STRNCAT
+extern char * strncat(char *, const char *, size_t);
#define __HAVE_ARCH_STRCHR
+extern char * strchr(const char *,int);
#define __HAVE_ARCH_STRRCHR
+extern char * strrchr(const char *,int);
#define __HAVE_ARCH_STRLEN
+extern size_t strlen(const char *);
#define __HAVE_ARCH_MEMCHR
+extern void * memchr(const void *, int, size_t);
/* The following routine is like memset except that it writes 16-bit
aligned values. The DEST and COUNT parameters must be even for
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h
index 49d68b447..919d2b751 100644
--- a/include/asm-alpha/system.h
+++ b/include/asm-alpha/system.h
@@ -290,7 +290,7 @@ extern int __min_ipl;
#define local_irq_disable() __cli()
#define local_irq_enable() __sti()
-#ifdef __SMP__
+#ifdef CONFIG_SMP
extern int global_irq_holder;
@@ -306,7 +306,7 @@ extern void __global_restore_flags(unsigned long flags);
#define save_flags(flags) ((flags) = __global_save_flags())
#define restore_flags(flags) __global_restore_flags(flags)
-#else /* __SMP__ */
+#else /* CONFIG_SMP */
#define cli() __cli()
#define sti() __sti()
@@ -314,7 +314,7 @@ extern void __global_restore_flags(unsigned long flags);
#define save_and_cli(flags) __save_and_cli(flags)
#define restore_flags(flags) __restore_flags(flags)
-#endif /* __SMP__ */
+#endif /* CONFIG_SMP */
/*
* TB routines..