diff options
Diffstat (limited to 'include/asm-mips')
-rw-r--r-- | include/asm-mips/checksum.h | 54 | ||||
-rw-r--r-- | include/asm-mips/ide.h | 5 | ||||
-rw-r--r-- | include/asm-mips/irq.h | 2 | ||||
-rw-r--r-- | include/asm-mips/keyboard.h | 4 | ||||
-rw-r--r-- | include/asm-mips/mmu_context.h | 15 | ||||
-rw-r--r-- | include/asm-mips/offset.h | 46 | ||||
-rw-r--r-- | include/asm-mips/processor.h | 6 | ||||
-rw-r--r-- | include/asm-mips/serial.h | 144 | ||||
-rw-r--r-- | include/asm-mips/system.h | 7 | ||||
-rw-r--r-- | include/asm-mips/termios.h | 1 | ||||
-rw-r--r-- | include/asm-mips/unistd.h | 5 |
11 files changed, 230 insertions, 59 deletions
diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h index b3bfcae7c..d2ce1edcd 100644 --- a/include/asm-mips/checksum.h +++ b/include/asm-mips/checksum.h @@ -1,11 +1,10 @@ -/* - * include/asm-mips/checksum.h +/* $Id: checksum.h,v 1.4 1998/05/06 02:50:12 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 by Ralf Baechle + * Copyright (C) 1995, 1996, 1997, 1998 by Ralf Baechle */ #ifndef __ASM_MIPS_CHECKSUM_H #define __ASM_MIPS_CHECKSUM_H @@ -25,13 +24,18 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum); /* - * the same as csum_partial, but copies from src while it - * checksums - * - * here even more important to align src and dst on a 32-bit (or even - * better 64-bit) boundary + * this is a new version of the above that records errors it finds in *errp, + * but continues and zeros the rest of the buffer. */ -unsigned int csum_partial_copy(const char *src, char *dst, int len, unsigned int sum); +unsigned int csum_partial_copy_nocheck(const char *src, char *dst, int len, + unsigned int sum); + +/* + * this is a new version of the above that records errors it finds in *errp, + * but continues and zeros the rest of the buffer. + */ +unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len, + unsigned int sum, int *errp); /* * the same as csum_partial, but copies from user space (but on MIPS @@ -40,14 +44,9 @@ unsigned int csum_partial_copy(const char *src, char *dst, int len, unsigned int * this is obsolete and will go away. */ #define csum_partial_copy_fromuser csum_partial_copy +unsigned int csum_partial_copy(const char *src, char *dst, int len, unsigned int sum); /* - * this is a new version of the above that records errors it finds in *errp, - * but continues and zeros the rest of the buffer. - */ -unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len, unsigned int sum, int *errp); - -/* * Fold a partial checksum without adding pseudo headers */ static inline unsigned short int csum_fold(unsigned int sum) @@ -126,11 +125,11 @@ static inline unsigned short ip_fast_csum(unsigned char * iph, * computes the checksum of the TCP/UDP pseudo-header * returns a 16-bit checksum, already complemented */ -static inline unsigned short int csum_tcpudp_magic(unsigned long saddr, - unsigned long daddr, - unsigned short len, - unsigned short proto, - unsigned int sum) +static inline unsigned long csum_tcpudp_nofold(unsigned long saddr, + unsigned long daddr, + unsigned short len, + unsigned short proto, + unsigned int sum) { __asm__(" .set noat @@ -156,7 +155,20 @@ static inline unsigned short int csum_tcpudp_magic(unsigned long saddr, "r"(sum) : "$1"); - return csum_fold(sum); + return sum; +} + +/* + * computes the checksum of the TCP/UDP pseudo-header + * returns a 16-bit checksum, already complemented + */ +static inline unsigned short int csum_tcpudp_magic(unsigned long saddr, + unsigned long daddr, + unsigned short len, + unsigned short proto, + unsigned int sum) +{ + return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); } /* diff --git a/include/asm-mips/ide.h b/include/asm-mips/ide.h index b54a7657c..9a775063f 100644 --- a/include/asm-mips/ide.h +++ b/include/asm-mips/ide.h @@ -1,4 +1,5 @@ -/* +/* $Id: ide.h,v 1.3 1998/05/03 21:46:15 ralf Exp $ + * * linux/include/asm-mips/ide.h * * Copyright (C) 1994-1996 Linus Torvalds & authors @@ -16,7 +17,7 @@ typedef unsigned short ide_ioreg_t; #ifndef MAX_HWIFS -#define MAX_HWIFS 4 +#define MAX_HWIFS 6 #endif #define ide_sti() sti() diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h index f544d741f..20b7accd8 100644 --- a/include/asm-mips/irq.h +++ b/include/asm-mips/irq.h @@ -19,6 +19,8 @@ #define TIMER_IRQ 0 +extern int (*irq_cannonicalize)(int irq); + struct irqaction; extern int setup_x86_irq(int irq, struct irqaction * new); extern void disable_irq(unsigned int); diff --git a/include/asm-mips/keyboard.h b/include/asm-mips/keyboard.h index e9f237d72..49d754578 100644 --- a/include/asm-mips/keyboard.h +++ b/include/asm-mips/keyboard.h @@ -5,7 +5,7 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * - * $Id: keyboard.h,v 1.5 1997/08/06 19:16:26 miguel Exp $ + * $Id: keyboard.h,v 1.6 1997/12/16 05:36:41 ralf Exp $ */ #ifndef __ASM_MIPS_KEYBOARD_H #define __ASM_MIPS_KEYBOARD_H @@ -38,8 +38,6 @@ extern unsigned char pckbd_sysrq_xlate[128]; #define SYSRQ_KEY 0x54 -#define INIT_KBD /* full initialization for the keyboard controller. */ - /* Some stoneage hardware needs delays after some operations. */ #define kbd_pause() do { } while(0) diff --git a/include/asm-mips/mmu_context.h b/include/asm-mips/mmu_context.h index 87b12792e..9e237fade 100644 --- a/include/asm-mips/mmu_context.h +++ b/include/asm-mips/mmu_context.h @@ -1,11 +1,12 @@ -/* +/* $Id: mmu_context.h,v 1.2 1998/05/05 10:22:01 ralf Exp $ + * * Switch a MMU context. * * 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) 1996 by Ralf Baechle + * Copyright (C) 1996, 1997, 1998 by Ralf Baechle */ #ifndef __ASM_MIPS_MMU_CONTEXT_H #define __ASM_MIPS_MMU_CONTEXT_H @@ -62,4 +63,14 @@ extern inline void destroy_context(struct mm_struct *mm) mm->context = 0; } +/* + * After we have set current->mm to a new value, this activates + * the context for the new mm so we see the new mappings. + */ +extern inline void activate_context(struct task_struct *tsk) +{ + get_mmu_context(tsk); + set_entryhi(tsk->mm->context); +} + #endif /* __ASM_MIPS_MMU_CONTEXT_H */ diff --git a/include/asm-mips/offset.h b/include/asm-mips/offset.h index 32deafe7b..5f89c2852 100644 --- a/include/asm-mips/offset.h +++ b/include/asm-mips/offset.h @@ -50,31 +50,31 @@ #define TASK_PRIORITY 56 #define TASK_FLAGS 4 #define TASK_SIGPENDING 8 -#define TASK_MM 928 +#define TASK_MM 936 /* MIPS specific thread_struct offsets. */ -#define THREAD_REG16 568 -#define THREAD_REG17 572 -#define THREAD_REG18 576 -#define THREAD_REG19 580 -#define THREAD_REG20 584 -#define THREAD_REG21 588 -#define THREAD_REG22 592 -#define THREAD_REG23 596 -#define THREAD_REG29 600 -#define THREAD_REG30 604 -#define THREAD_REG31 608 -#define THREAD_STATUS 612 -#define THREAD_FPU 616 -#define THREAD_BVADDR 880 -#define THREAD_BUADDR 884 -#define THREAD_ECODE 888 -#define THREAD_TRAPNO 892 -#define THREAD_PGDIR 896 -#define THREAD_MFLAGS 900 -#define THREAD_CURDS 904 -#define THREAD_TRAMP 908 -#define THREAD_OLDCTX 912 +#define THREAD_REG16 576 +#define THREAD_REG17 580 +#define THREAD_REG18 584 +#define THREAD_REG19 588 +#define THREAD_REG20 592 +#define THREAD_REG21 596 +#define THREAD_REG22 600 +#define THREAD_REG23 604 +#define THREAD_REG29 608 +#define THREAD_REG30 612 +#define THREAD_REG31 616 +#define THREAD_STATUS 620 +#define THREAD_FPU 624 +#define THREAD_BVADDR 888 +#define THREAD_BUADDR 892 +#define THREAD_ECODE 896 +#define THREAD_TRAPNO 900 +#define THREAD_PGDIR 904 +#define THREAD_MFLAGS 908 +#define THREAD_CURDS 912 +#define THREAD_TRAMP 916 +#define THREAD_OLDCTX 920 /* Linux mm_struct offsets. */ #define MM_COUNT 12 diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h index 98d5e6a86..63d721720 100644 --- a/include/asm-mips/processor.h +++ b/include/asm-mips/processor.h @@ -5,7 +5,7 @@ * written by Ralf Baechle * Modified further for R[236]000 compatibility by Paul M. Antoine * - * $Id: processor.h,v 1.13 1998/04/25 05:35:15 ralf Exp $ + * $Id: processor.h,v 1.10 1998/05/04 09:13:01 ralf Exp $ */ #ifndef __ASM_MIPS_PROCESSOR_H #define __ASM_MIPS_PROCESSOR_H @@ -152,6 +152,10 @@ struct thread_struct { /* Free all resources held by a thread. */ extern void release_thread(struct task_struct *); +/* Copy and release all segment info associated with a VM */ +#define copy_segments(nr, p, mm) do { } while(0) +#define release_segments(mm) do { } while(0) + /* * Return saved PC of a blocked thread. */ diff --git a/include/asm-mips/serial.h b/include/asm-mips/serial.h new file mode 100644 index 000000000..47c6ea0b7 --- /dev/null +++ b/include/asm-mips/serial.h @@ -0,0 +1,144 @@ +/* + * include/asm-mips/serial.h + * + * $Id: serial.h,v 1.1 1998/05/04 12:43:16 ralf Exp $ + */ +#include <linux/config.h> + +/* + * This assumes you have a 1.8432 MHz clock for your UART. + * + * It'd be nice if someone built a serial card with a 24.576 MHz + * clock, since the 16550A is capable of handling a top speed of 1.5 + * megabits/second; but this requires the faster clock. + */ +#ifdef CONFIG_MIPS_JAZZ +/* XXX This doesn't seem to be true for all Jazz machines. */ +#define JAZZ_BASE_BAUD ( 8000000 / 16 ) /* ( 3072000 / 16) */ +#else +#define BASE_BAUD ( 1843200 / 16 ) +#endif + +/* Standard COM flags (except for COM4, because of the 8514 problem) */ +#ifdef CONFIG_SERIAL_DETECT_IRQ +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ) +#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ) +#else +#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) +#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF +#endif + +#ifdef CONFIG_SERIAL_MANY_PORTS +#define FOURPORT_FLAGS ASYNC_FOURPORT +#define ACCENT_FLAGS 0 +#define BOCA_FLAGS 0 +#define HUB6_FLAGS 0 +#endif + +/* + * The following define the access methods for the HUB6 card. All + * access is through two ports for all 24 possible chips. The card is + * selected through the high 2 bits, the port on that card with the + * "middle" 3 bits, and the register on that port with the bottom + * 3 bits. + * + * While the access port and interrupt is configurable, the default + * port locations are 0x302 for the port control register, and 0x303 + * for the data read/write register. Normally, the interrupt is at irq3 + * but can be anything from 3 to 7 inclusive. Note that using 3 will + * require disabling com2. + */ + +#define C_P(card,port) (((card)<<6|(port)<<3) + 1) + +#ifdef CONFIG_MIPS_JAZZ +#define JAZZ_SERIAL_PORT_DEFNS \ + /* UART CLK PORT IRQ FLAGS */ \ + { 0, JAZZ_BASE_BAUD, JAZZ_SERIAL1_BASE, /* ttyS0 */ + JAZZ_SERIAL1_IRQ, STD_COM_FLAGS }, + { 0, JAZZ_BASE_BAUD, JAZZ_SERIAL2_BASE, /* ttyS1 */ + JAZZ_SERIAL2_IRQ, STD_COM_FLAGS }, +#else +#define JAZZ_SERIAL_PORT_DEFNS +#endif + +#define STD_SERIAL_PORT_DEFNS \ + /* UART CLK PORT IRQ FLAGS */ \ + { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ + { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ + { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ + { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ + + +#ifdef CONFIG_SERIAL_MANY_PORTS +#define EXTRA_SERIAL_PORT_DEFNS \ + { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \ + { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \ + { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \ + { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \ + { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \ + { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \ + { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */ \ + { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */ \ + { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */ \ + { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* ttyS13 */ \ + { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare) */ \ + { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS15 (spare) */ \ + { 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS }, /* ttyS16 */ \ + { 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS }, /* ttyS17 */ \ + { 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS }, /* ttyS18 */ \ + { 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS }, /* ttyS19 */ \ + { 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS }, /* ttyS20 */ \ + { 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS }, /* ttyS21 */ \ + { 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS }, /* ttyS22 */ \ + { 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS }, /* ttyS23 */ \ + { 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS }, /* ttyS24 */ \ + { 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS }, /* ttyS25 */ \ + { 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS }, /* ttyS26 */ \ + { 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS }, /* ttyS27 */ \ + { 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS }, /* ttyS28 */ \ + { 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS }, /* ttyS29 */ \ + { 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS }, /* ttyS30 */ \ + { 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS }, /* ttyS31 */ +#else +#define EXTRA_SERIAL_PORT_DEFNS +#endif + +/* You can have up to four HUB6's in the system, but I've only + * included two cards here for a total of twelve ports. + */ +#if (defined(CONFIG_HUB6) && defined(CONFIG_SERIAL_MANY_PORTS)) +#define HUB6_SERIAL_PORT_DFNS \ + { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,0) }, /* ttyS32 */ \ + { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,1) }, /* ttyS33 */ \ + { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,2) }, /* ttyS34 */ \ + { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,3) }, /* ttyS35 */ \ + { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,4) }, /* ttyS36 */ \ + { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,5) }, /* ttyS37 */ \ + { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,0) }, /* ttyS38 */ \ + { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,1) }, /* ttyS39 */ \ + { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,2) }, /* ttyS40 */ \ + { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,3) }, /* ttyS41 */ \ + { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,4) }, /* ttyS42 */ \ + { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,5) }, /* ttyS43 */ +#else +#define HUB6_SERIAL_PORT_DFNS +#endif + +#ifdef CONFIG_MCA +#define MCA_SERIAL_PORT_DFNS \ + { 0, BASE_BAUD, 0x3220, 3, STD_COM_FLAGS }, \ + { 0, BASE_BAUD, 0x3228, 3, STD_COM_FLAGS }, \ + { 0, BASE_BAUD, 0x4220, 3, STD_COM_FLAGS }, \ + { 0, BASE_BAUD, 0x4228, 3, STD_COM_FLAGS }, \ + { 0, BASE_BAUD, 0x5220, 3, STD_COM_FLAGS }, \ + { 0, BASE_BAUD, 0x5228, 3, STD_COM_FLAGS }, +#else +#define MCA_SERIAL_PORT_DFNS +#endif + +#define JAZZ_PORT_DFNS \ + SERIAL_PORT_DFNS \ + STD_SERIAL_PORT_DEFNS \ + EXTRA_SERIAL_PORT_DEFNS \ + HUB6_SERIAL_PORT_DFNS diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index ab8faf278..dd5aa3422 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h @@ -1,5 +1,4 @@ -/* - * include/asm-mips/system.h +/* $Id: system.h,v 1.7 1998/05/04 03:53:22 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,8 +6,6 @@ * * Copyright (C) 1994, 1995 by Ralf Baechle * Modified further for R[236]000 by Paul M. Antoine, 1996 - * - * $Id: system.h,v 1.6 1998/05/03 11:13:54 ralf Exp $ */ #ifndef __ASM_MIPS_SYSTEM_H #define __ASM_MIPS_SYSTEM_H @@ -114,6 +111,8 @@ __restore_flags(int flags) __asm__ __volatile__( \ "# prevent instructions being moved around\n\t" \ ".set\tnoreorder\n\t" \ + "# 8 nops to fool the R4400 pipeline\n\t" \ + "nop;nop;nop;nop;nop;nop;nop;nop\n\t" \ ".set\treorder" \ : /* no output */ \ : /* no input */ \ diff --git a/include/asm-mips/termios.h b/include/asm-mips/termios.h index 5dfb3a995..8293b5df1 100644 --- a/include/asm-mips/termios.h +++ b/include/asm-mips/termios.h @@ -92,6 +92,7 @@ struct termio { #define N_STRIP 4 #define N_AX25 5 #define N_X25 6 /* X.25 async */ +#define N_6PACK 7 #ifdef __KERNEL__ diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 5cc743dd9..7764e8a85 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h @@ -1190,11 +1190,12 @@ #define __NR_pread (__NR_Linux + 200) #define __NR_pwrite (__NR_Linux + 201) #define __NR_chown (__NR_Linux + 202) +#define __NR_getcwd (__NR_Linux + 203) /* * Offset of the last Linux flavoured syscall */ -#define __NR_Linux_syscalls 202 +#define __NR_Linux_syscalls 203 #ifndef __LANGUAGE_ASSEMBLY__ @@ -1414,8 +1415,6 @@ return -1; \ */ #define __NR__exit __NR_exit static inline _syscall0(int,idle) -static inline _syscall0(int,fork) -static inline _syscall2(int,clone,unsigned long,flags,char *,esp) static inline _syscall0(int,pause) static inline _syscall1(int,setup,int,magic) static inline _syscall0(int,sync) |