diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-10-09 00:00:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-10-09 00:00:47 +0000 |
commit | d6434e1042f3b0a6dfe1b1f615af369486f9b1fa (patch) | |
tree | e2be02f33984c48ec019c654051d27964e42c441 /include/asm-mips64 | |
parent | 609d1e803baf519487233b765eb487f9ec227a18 (diff) |
Merge with 2.3.19.
Diffstat (limited to 'include/asm-mips64')
-rw-r--r-- | include/asm-mips64/cache.h | 13 | ||||
-rw-r--r-- | include/asm-mips64/io.h | 7 | ||||
-rw-r--r-- | include/asm-mips64/parport.h | 59 | ||||
-rw-r--r-- | include/asm-mips64/pgtable.h | 3 | ||||
-rw-r--r-- | include/asm-mips64/resource.h | 5 | ||||
-rw-r--r-- | include/asm-mips64/spinlock.h | 66 | ||||
-rw-r--r-- | include/asm-mips64/system.h | 11 | ||||
-rw-r--r-- | include/asm-mips64/unistd.h | 3 |
8 files changed, 89 insertions, 78 deletions
diff --git a/include/asm-mips64/cache.h b/include/asm-mips64/cache.h index 8271a4356..3317887ea 100644 --- a/include/asm-mips64/cache.h +++ b/include/asm-mips64/cache.h @@ -1,10 +1,11 @@ -/* $Id$ +/* $Id: cache.h,v 1.1 1999/08/18 23:37:50 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 1998, 1999 by Ralf Baechle + * Copyright (C) 1997, 1998, 1999 Ralf Baechle + * Copyright (C) 1999 Silicon Graphics, Inc. */ #ifndef _ASM_CACHE_H #define _ASM_CACHE_H @@ -16,4 +17,12 @@ #define SMP_CACHE_BYTES L1_CACHE_BYTES +#ifdef MODULE +#define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES))) +#else +#define __cacheline_aligned \ + __attribute__((__aligned__(L1_CACHE_BYTES), \ + __section__(".data.cacheline_aligned"))) +#endif + #endif /* _ASM_CACHE_H */ diff --git a/include/asm-mips64/io.h b/include/asm-mips64/io.h index 92ace527e..edcd71b0e 100644 --- a/include/asm-mips64/io.h +++ b/include/asm-mips64/io.h @@ -1,11 +1,12 @@ -/* $Id$ +/* $Id: io.h,v 1.1 1999/08/18 23:37:51 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * - * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle - * Copyright (C) 1999 by Silicon Graphics + * Copyright (C) 1994, 1995 Waldorf GmbH + * Copyright (C) 1994 - 1999 Ralf Baechle + * Copyright (C) 1999 Silicon Graphics, Inc. */ #ifndef _ASM_IO_H #define _ASM_IO_H diff --git a/include/asm-mips64/parport.h b/include/asm-mips64/parport.h new file mode 100644 index 000000000..dcf0ff69d --- /dev/null +++ b/include/asm-mips64/parport.h @@ -0,0 +1,59 @@ +/* $Id$ + * + * parport.h: ia32-specific parport initialisation + * + * Copyright (C) 1999 Tim Waugh <tim@cyberelk.demon.co.uk> + * + * This file should only be included by drivers/parport/parport_pc.c. + */ +#ifndef _ASM_PARPORT_H +#define _ASM_PARPORT_H 1 + +#include <linux/config.h> + +/* Maximum number of ports to support. It is useless to set this greater + than PARPORT_MAX (in <linux/parport.h>). */ +#define PARPORT_PC_MAX_PORTS 8 + +/* If parport_cs (PCMCIA) is managing ports for us, we'll need the + * probing routines forever; otherwise we can lose them at boot time. */ +#ifdef CONFIG_PARPORT_PC_PCMCIA +#define __maybe_initdata +#define __maybe_init +#else +#define __maybe_initdata __initdata +#define __maybe_init __init +#endif + +static int __maybe_init parport_pc_init_pci(int irq, int dma); + +static int user_specified __maybe_initdata = 0; +int __init +parport_pc_init(int *io, int *io_hi, int *irq, int *dma) +{ + int count = 0, i = 0; + + if (io && *io) { + /* Only probe the ports we were given. */ + user_specified = 1; + do { + if (!*io_hi) *io_hi = 0x400 + *io; + if (parport_pc_probe_port(*(io++), *(io_hi++), + *(irq++), *(dma++))) + count++; + } while (*io && (++i < PARPORT_PC_MAX_PORTS)); + } else { + /* Probe all the likely ports. */ + if (parport_pc_probe_port(0x3bc, 0x7bc, irq[0], dma[0])) + count++; + if (parport_pc_probe_port(0x378, 0x778, irq[0], dma[0])) + count++; + if (parport_pc_probe_port(0x278, 0x678, irq[0], dma[0])) + count++; + count += parport_pc_init_pci (irq[0], dma[0]); + } + + return count; +} + +#endif /* !(_ASM_PARPORT_H) */ diff --git a/include/asm-mips64/pgtable.h b/include/asm-mips64/pgtable.h index 492ecc1f1..fd1e5c063 100644 --- a/include/asm-mips64/pgtable.h +++ b/include/asm-mips64/pgtable.h @@ -199,9 +199,6 @@ extern unsigned long zero_page_mask; extern void (*load_pgd)(unsigned long pg_dir); -/* to set the page-dir */ -#define SET_PAGE_DIR(tsk,pgdir) (tsk)->tss.pg_dir = ((unsigned long) (pgdir)) - extern pmd_t invalid_pte_table[PAGE_SIZE/sizeof(pmd_t)]; /* diff --git a/include/asm-mips64/resource.h b/include/asm-mips64/resource.h index 5ff4948c7..771cb260d 100644 --- a/include/asm-mips64/resource.h +++ b/include/asm-mips64/resource.h @@ -1,10 +1,11 @@ -/* $Id$ +/* $Id: resource.h,v 1.1 1999/08/18 23:37:52 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 1995, 1996, 1998, 1999 by Ralf Baechle + * Copyright (C) 1999 Silicon Graphics, Inc. */ #ifndef _ASM_RESOURCE_H #define _ASM_RESOURCE_H @@ -37,7 +38,7 @@ { NR_OPEN, NR_OPEN }, \ { LONG_MAX, LONG_MAX }, \ { LONG_MAX, LONG_MAX }, \ - { MAX_TASKS_PER_USER, MAX_TASKS_PER_USER }, \ + { 0, 0 }, \ { LONG_MAX, LONG_MAX }, \ } diff --git a/include/asm-mips64/spinlock.h b/include/asm-mips64/spinlock.h index 1dc5fff6a..2bde33805 100644 --- a/include/asm-mips64/spinlock.h +++ b/include/asm-mips64/spinlock.h @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: spinlock.h,v 1.1 1999/08/18 23:37:52 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -7,70 +7,6 @@ #ifndef _ASM_SPINLOCK_H #define _ASM_SPINLOCK_H -/* - * These are the generic versions of the spinlocks - * and read-write locks.. We should actually do a - * <linux/spinlock.h> with all of this. Oh, well. - */ -#define spin_lock_irqsave(lock, flags) do { local_irq_save(flags); spin_lock(lock); } while (0) -#define spin_lock_irq(lock) do { local_irq_disable(); spin_lock(lock); } while (0) -#define spin_lock_bh(lock) do { local_bh_disable(); spin_lock(lock); } while (0) - -#define read_lock_irqsave(lock, flags) do { local_irq_save(flags); read_lock(lock); } while (0) -#define read_lock_irq(lock) do { local_irq_disable(); read_lock(lock); } while (0) -#define read_lock_bh(lock) do { local_bh_disable(); read_lock(lock); } while (0) - -#define write_lock_irqsave(lock, flags) do { local_irq_save(flags); write_lock(lock); } while (0) -#define write_lock_irq(lock) do { local_irq_disable(); write_lock(lock); } while (0) -#define write_lock_bh(lock) do { local_bh_disable(); write_lock(lock); } while (0) - -#define spin_unlock_irqrestore(lock, flags) do { spin_unlock(lock); local_irq_restore(flags); } while (0) -#define spin_unlock_irq(lock) do { spin_unlock(lock); local_irq_enable(); } while (0) -#define spin_unlock_bh(lock) do { spin_unlock(lock); local_bh_enable(); } while (0) - -#define read_unlock_irqrestore(lock, flags) do { read_unlock(lock); local_irq_restore(flags); } while (0) -#define read_unlock_irq(lock) do { read_unlock(lock); local_irq_enable(); } while (0) -#define read_unlock_bh(lock) do { read_unlock(lock); local_bh_enable(); } while (0) - -#define write_unlock_irqrestore(lock, flags) do { write_unlock(lock); local_irq_restore(flags); } while (0) -#define write_unlock_irq(lock) do { write_unlock(lock); local_irq_enable(); } while (0) -#define write_unlock_bh(lock) do { write_unlock(lock); local_bh_enable(); } while (0) - -#ifndef __SMP__ - -/* - * Gcc-2.7.x has a nasty bug with empty initializers. - */ -typedef struct { } spinlock_t; -#define SPIN_LOCK_UNLOCKED (spinlock_t) { } - -#define spin_lock_init(lock) do { } while(0) -#define spin_lock(lock) (void)(lock) /* Not "unused variable". */ -#define spin_trylock(lock) (1) -#define spin_unlock_wait(lock) do { } while(0) -#define spin_unlock(lock) (void)(lock) /* Not "unused variable". */ - -/* - * Read-write spinlocks, allowing multiple readers - * but only one writer. - * - * NOTE! it is quite common to have readers in interrupts - * but no interrupt writers. For those circumstances we - * can "mix" irq-safe locks - any writer needs to get a - * irq-safe write-lock, but readers can get non-irqsafe - * read-locks. - */ -typedef struct { } rwlock_t; -#define RW_LOCK_UNLOCKED (rwlock_t) { } - -#define read_lock(lock) (void)(lock) /* Not "unused variable". */ -#define read_unlock(lock) do { } while(0) -#define write_lock(lock) (void)(lock) /* Not "unused variable". */ -#define write_unlock(lock) do { } while(0) - -#else - #error "Nix SMP on MIPS" -#endif /* SMP */ #endif /* _ASM_SPINLOCK_H */ diff --git a/include/asm-mips64/system.h b/include/asm-mips64/system.h index 320b9ceeb..54b1a3cfd 100644 --- a/include/asm-mips64/system.h +++ b/include/asm-mips64/system.h @@ -1,4 +1,4 @@ -/* $Id$ +/* $Id: system.h,v 1.1 1999/08/18 23:37:52 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -136,6 +136,15 @@ __asm__ __volatile__( \ #define rmb() mb() #define wmb() mb() +#define set_mb(var, value) \ +do { var = value; mb(); } while (0) + +#define set_rmb(var, value) \ +do { var = value; rmb(); } while (0) + +#define set_wmb(var, value) \ +do { var = value; wmb(); } while (0) + #if !defined (_LANGUAGE_ASSEMBLY) /* * switch_to(n) should switch tasks to task nr n, first diff --git a/include/asm-mips64/unistd.h b/include/asm-mips64/unistd.h index 0441ffc51..c6e295e4c 100644 --- a/include/asm-mips64/unistd.h +++ b/include/asm-mips64/unistd.h @@ -1,4 +1,4 @@ -/* $Id: unistd.h,v 1.3 1999/09/27 16:01:41 ralf Exp $ +/* $Id: unistd.h,v 1.3 1999/09/28 22:27:20 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -1514,7 +1514,6 @@ return -1; \ * some others too. */ #define __NR__exit __NR_exit -static inline _syscall0(int,idle) static inline _syscall0(int,sync) static inline _syscall0(pid_t,setsid) static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) |