diff options
Diffstat (limited to 'i386/i386at/gpl/linux/include')
143 files changed, 0 insertions, 16674 deletions
diff --git a/i386/i386at/gpl/linux/include/asm/bitops.h b/i386/i386at/gpl/linux/include/asm/bitops.h deleted file mode 100644 index 5387f31..0000000 --- a/i386/i386at/gpl/linux/include/asm/bitops.h +++ /dev/null @@ -1,137 +0,0 @@ -#ifndef _I386_BITOPS_H -#define _I386_BITOPS_H - -/* - * Copyright 1992, Linus Torvalds. - */ - -/* - * These have to be done with inline assembly: that way the bit-setting - * is guaranteed to be atomic. All bit operations return 0 if the bit - * was cleared before the operation and != 0 if it was not. - * - * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1). - */ - -#ifdef __SMP__ -#define LOCK_PREFIX "lock ; " -#else -#define LOCK_PREFIX "" -#endif - -/* - * Some hacks to defeat gcc over-optimizations.. - */ -struct __dummy { unsigned long a[100]; }; -#define ADDR (*(struct __dummy *) addr) -#define CONST_ADDR (*(const struct __dummy *) addr) - -extern __inline__ int set_bit(int nr, void * addr) -{ - int oldbit; - - __asm__ __volatile__(LOCK_PREFIX - "btsl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"ir" (nr)); - return oldbit; -} - -extern __inline__ int clear_bit(int nr, void * addr) -{ - int oldbit; - - __asm__ __volatile__(LOCK_PREFIX - "btrl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"ir" (nr)); - return oldbit; -} - -extern __inline__ int change_bit(int nr, void * addr) -{ - int oldbit; - - __asm__ __volatile__(LOCK_PREFIX - "btcl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit),"=m" (ADDR) - :"ir" (nr)); - return oldbit; -} - -/* - * This routine doesn't need to be atomic. - */ -extern __inline__ int test_bit(int nr, const void * addr) -{ - return 1UL & (((const unsigned int *) addr)[nr >> 5] >> (nr & 31)); -} - -/* - * Find-bit routines.. - */ -extern __inline__ int find_first_zero_bit(void * addr, unsigned size) -{ - int res; - - if (!size) - return 0; - __asm__(" - cld - movl $-1,%%eax - xorl %%edx,%%edx - repe; scasl - je 1f - xorl -4(%%edi),%%eax - subl $4,%%edi - bsfl %%eax,%%edx -1: subl %%ebx,%%edi - shll $3,%%edi - addl %%edi,%%edx" - :"=d" (res) - :"c" ((size + 31) >> 5), "D" (addr), "b" (addr) - :"ax", "cx", "di"); - return res; -} - -extern __inline__ int find_next_zero_bit (void * addr, int size, int offset) -{ - unsigned long * p = ((unsigned long *) addr) + (offset >> 5); - int set = 0, bit = offset & 31, res; - - if (bit) { - /* - * Look for zero in first byte - */ - __asm__(" - bsfl %1,%0 - jne 1f - movl $32, %0 -1: " - : "=r" (set) - : "r" (~(*p >> bit))); - if (set < (32 - bit)) - return set + offset; - set = 32 - bit; - p++; - } - /* - * No zero yet, search remaining full bytes for a zero - */ - res = find_first_zero_bit (p, size - 32 * (p - (unsigned long *) addr)); - return (offset + set + res); -} - -/* - * ffz = Find First Zero in word. Undefined if no zero exists, - * so code should check against ~0UL first.. - */ -extern __inline__ unsigned long ffz(unsigned long word) -{ - __asm__("bsfl %1,%0" - :"=r" (word) - :"r" (~word)); - return word; -} - -#endif /* _I386_BITOPS_H */ diff --git a/i386/i386at/gpl/linux/include/asm/byteorder.h b/i386/i386at/gpl/linux/include/asm/byteorder.h deleted file mode 100644 index 3f40767..0000000 --- a/i386/i386at/gpl/linux/include/asm/byteorder.h +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef _I386_BYTEORDER_H -#define _I386_BYTEORDER_H - -#undef ntohl -#undef ntohs -#undef htonl -#undef htons - -#ifndef __LITTLE_ENDIAN -#define __LITTLE_ENDIAN 1234 -#endif - -#ifndef __LITTLE_ENDIAN_BITFIELD -#define __LITTLE_ENDIAN_BITFIELD -#endif - -/* For avoiding bswap on i386 */ -#ifdef __KERNEL__ -#include <linux/config.h> -#endif - -extern unsigned long int ntohl(unsigned long int); -extern unsigned short int ntohs(unsigned short int); -extern unsigned long int htonl(unsigned long int); -extern unsigned short int htons(unsigned short int); - -extern __inline__ unsigned long int __ntohl(unsigned long int); -extern __inline__ unsigned short int __ntohs(unsigned short int); -extern __inline__ unsigned long int __constant_ntohl(unsigned long int); -extern __inline__ unsigned short int __constant_ntohs(unsigned short int); - -extern __inline__ unsigned long int -__ntohl(unsigned long int x) -{ -#if defined(__KERNEL__) && !defined(CONFIG_M386) - __asm__("bswap %0" : "=r" (x) : "0" (x)); -#else - __asm__("xchgb %b0,%h0\n\t" /* swap lower bytes */ - "rorl $16,%0\n\t" /* swap words */ - "xchgb %b0,%h0" /* swap higher bytes */ - :"=q" (x) - : "0" (x)); -#endif - return x; -} - -#define __constant_ntohl(x) \ - ((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \ - (((unsigned long int)(x) & 0x0000ff00U) << 8) | \ - (((unsigned long int)(x) & 0x00ff0000U) >> 8) | \ - (((unsigned long int)(x) & 0xff000000U) >> 24))) - -extern __inline__ unsigned short int -__ntohs(unsigned short int x) -{ - __asm__("xchgb %b0,%h0" /* swap bytes */ - : "=q" (x) - : "0" (x)); - return x; -} - -#define __constant_ntohs(x) \ - ((unsigned short int)((((unsigned short int)(x) & 0x00ff) << 8) | \ - (((unsigned short int)(x) & 0xff00) >> 8))) \ - -#define __htonl(x) __ntohl(x) -#define __htons(x) __ntohs(x) -#define __constant_htonl(x) __constant_ntohl(x) -#define __constant_htons(x) __constant_ntohs(x) - -#ifdef __OPTIMIZE__ -# define ntohl(x) \ -(__builtin_constant_p((long)(x)) ? \ - __constant_ntohl((x)) : \ - __ntohl((x))) -# define ntohs(x) \ -(__builtin_constant_p((short)(x)) ? \ - __constant_ntohs((x)) : \ - __ntohs((x))) -# define htonl(x) \ -(__builtin_constant_p((long)(x)) ? \ - __constant_htonl((x)) : \ - __htonl((x))) -# define htons(x) \ -(__builtin_constant_p((short)(x)) ? \ - __constant_htons((x)) : \ - __htons((x))) -#endif - -#endif diff --git a/i386/i386at/gpl/linux/include/asm/delay.h b/i386/i386at/gpl/linux/include/asm/delay.h deleted file mode 100644 index e22e8d6..0000000 --- a/i386/i386at/gpl/linux/include/asm/delay.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef _I386_DELAY_H -#define _I386_DELAY_H - -/* - * Copyright (C) 1993 Linus Torvalds - * - * Delay routines, using a pre-computed "loops_per_second" value. - */ - -#ifdef __SMP__ -#include <asm/smp.h> -#endif - -extern __inline__ void __delay(int loops) -{ - __asm__ __volatile__( - ".align 2,0x90\n1:\tdecl %0\n\tjns 1b" - :/* no outputs */ - :"a" (loops) - :"ax"); -} - -/* - * division by multiplication: you don't have to worry about - * loss of precision. - * - * Use only for very small delays ( < 1 msec). Should probably use a - * lookup table, really, as the multiplications take much too long with - * short delays. This is a "reasonable" implementation, though (and the - * first constant multiplications gets optimized away if the delay is - * a constant) - */ -extern __inline__ void udelay(unsigned long usecs) -{ - usecs *= 0x000010c6; /* 2**32 / 1000000 */ - __asm__("mull %0" - :"=d" (usecs) -#ifdef __SMP__ - :"a" (usecs),"0" (cpu_data[smp_processor_id()].udelay_val) -#else - :"a" (usecs),"0" (loops_per_sec) -#endif - :"ax"); - - __delay(usecs); -} - -extern __inline__ unsigned long muldiv(unsigned long a, unsigned long b, unsigned long c) -{ - __asm__("mull %1 ; divl %2" - :"=a" (a) - :"d" (b), - "r" (c), - "0" (a) - :"dx"); - return a; -} - -#endif /* defined(_I386_DELAY_H) */ diff --git a/i386/i386at/gpl/linux/include/asm/dma.h b/i386/i386at/gpl/linux/include/asm/dma.h deleted file mode 100644 index b739ed7..0000000 --- a/i386/i386at/gpl/linux/include/asm/dma.h +++ /dev/null @@ -1,271 +0,0 @@ -/* $Id: dma.h,v 1.1.1.1 1997/02/25 21:27:24 thomas Exp $ - * linux/include/asm/dma.h: Defines for using and allocating dma channels. - * Written by Hennus Bergman, 1992. - * High DMA channel support & info by Hannu Savolainen - * and John Boyd, Nov. 1992. - */ - -#ifndef _ASM_DMA_H -#define _ASM_DMA_H - -#include <asm/io.h> /* need byte IO */ - - -#ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER -#define dma_outb outb_p -#else -#define dma_outb outb -#endif - -#define dma_inb inb - -/* - * NOTES about DMA transfers: - * - * controller 1: channels 0-3, byte operations, ports 00-1F - * controller 2: channels 4-7, word operations, ports C0-DF - * - * - ALL registers are 8 bits only, regardless of transfer size - * - channel 4 is not used - cascades 1 into 2. - * - channels 0-3 are byte - addresses/counts are for physical bytes - * - channels 5-7 are word - addresses/counts are for physical words - * - transfers must not cross physical 64K (0-3) or 128K (5-7) boundaries - * - transfer count loaded to registers is 1 less than actual count - * - controller 2 offsets are all even (2x offsets for controller 1) - * - page registers for 5-7 don't use data bit 0, represent 128K pages - * - page registers for 0-3 use bit 0, represent 64K pages - * - * DMA transfers are limited to the lower 16MB of _physical_ memory. - * Note that addresses loaded into registers must be _physical_ addresses, - * not logical addresses (which may differ if paging is active). - * - * Address mapping for channels 0-3: - * - * A23 ... A16 A15 ... A8 A7 ... A0 (Physical addresses) - * | ... | | ... | | ... | - * | ... | | ... | | ... | - * | ... | | ... | | ... | - * P7 ... P0 A7 ... A0 A7 ... A0 - * | Page | Addr MSB | Addr LSB | (DMA registers) - * - * Address mapping for channels 5-7: - * - * A23 ... A17 A16 A15 ... A9 A8 A7 ... A1 A0 (Physical addresses) - * | ... | \ \ ... \ \ \ ... \ \ - * | ... | \ \ ... \ \ \ ... \ (not used) - * | ... | \ \ ... \ \ \ ... \ - * P7 ... P1 (0) A7 A6 ... A0 A7 A6 ... A0 - * | Page | Addr MSB | Addr LSB | (DMA registers) - * - * Again, channels 5-7 transfer _physical_ words (16 bits), so addresses - * and counts _must_ be word-aligned (the lowest address bit is _ignored_ at - * the hardware level, so odd-byte transfers aren't possible). - * - * Transfer count (_not # bytes_) is limited to 64K, represented as actual - * count - 1 : 64K => 0xFFFF, 1 => 0x0000. Thus, count is always 1 or more, - * and up to 128K bytes may be transferred on channels 5-7 in one operation. - * - */ - -#define MAX_DMA_CHANNELS 8 - -/* The maximum address that we can perform a DMA transfer to on this platform */ -#define MAX_DMA_ADDRESS 0x1000000 - -/* 8237 DMA controllers */ -#define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */ -#define IO_DMA2_BASE 0xC0 /* 16 bit master DMA, ch 4(=slave input)..7 */ - -/* DMA controller registers */ -#define DMA1_CMD_REG 0x08 /* command register (w) */ -#define DMA1_STAT_REG 0x08 /* status register (r) */ -#define DMA1_REQ_REG 0x09 /* request register (w) */ -#define DMA1_MASK_REG 0x0A /* single-channel mask (w) */ -#define DMA1_MODE_REG 0x0B /* mode register (w) */ -#define DMA1_CLEAR_FF_REG 0x0C /* clear pointer flip-flop (w) */ -#define DMA1_TEMP_REG 0x0D /* Temporary Register (r) */ -#define DMA1_RESET_REG 0x0D /* Master Clear (w) */ -#define DMA1_CLR_MASK_REG 0x0E /* Clear Mask */ -#define DMA1_MASK_ALL_REG 0x0F /* all-channels mask (w) */ - -#define DMA2_CMD_REG 0xD0 /* command register (w) */ -#define DMA2_STAT_REG 0xD0 /* status register (r) */ -#define DMA2_REQ_REG 0xD2 /* request register (w) */ -#define DMA2_MASK_REG 0xD4 /* single-channel mask (w) */ -#define DMA2_MODE_REG 0xD6 /* mode register (w) */ -#define DMA2_CLEAR_FF_REG 0xD8 /* clear pointer flip-flop (w) */ -#define DMA2_TEMP_REG 0xDA /* Temporary Register (r) */ -#define DMA2_RESET_REG 0xDA /* Master Clear (w) */ -#define DMA2_CLR_MASK_REG 0xDC /* Clear Mask */ -#define DMA2_MASK_ALL_REG 0xDE /* all-channels mask (w) */ - -#define DMA_ADDR_0 0x00 /* DMA address registers */ -#define DMA_ADDR_1 0x02 -#define DMA_ADDR_2 0x04 -#define DMA_ADDR_3 0x06 -#define DMA_ADDR_4 0xC0 -#define DMA_ADDR_5 0xC4 -#define DMA_ADDR_6 0xC8 -#define DMA_ADDR_7 0xCC - -#define DMA_CNT_0 0x01 /* DMA count registers */ -#define DMA_CNT_1 0x03 -#define DMA_CNT_2 0x05 -#define DMA_CNT_3 0x07 -#define DMA_CNT_4 0xC2 -#define DMA_CNT_5 0xC6 -#define DMA_CNT_6 0xCA -#define DMA_CNT_7 0xCE - -#define DMA_PAGE_0 0x87 /* DMA page registers */ -#define DMA_PAGE_1 0x83 -#define DMA_PAGE_2 0x81 -#define DMA_PAGE_3 0x82 -#define DMA_PAGE_5 0x8B -#define DMA_PAGE_6 0x89 -#define DMA_PAGE_7 0x8A - -#define DMA_MODE_READ 0x44 /* I/O to memory, no autoinit, increment, single mode */ -#define DMA_MODE_WRITE 0x48 /* memory to I/O, no autoinit, increment, single mode */ -#define DMA_MODE_CASCADE 0xC0 /* pass thru DREQ->HRQ, DACK<-HLDA only */ - -/* enable/disable a specific DMA channel */ -static __inline__ void enable_dma(unsigned int dmanr) -{ - if (dmanr<=3) - dma_outb(dmanr, DMA1_MASK_REG); - else - dma_outb(dmanr & 3, DMA2_MASK_REG); -} - -static __inline__ void disable_dma(unsigned int dmanr) -{ - if (dmanr<=3) - dma_outb(dmanr | 4, DMA1_MASK_REG); - else - dma_outb((dmanr & 3) | 4, DMA2_MASK_REG); -} - -/* Clear the 'DMA Pointer Flip Flop'. - * Write 0 for LSB/MSB, 1 for MSB/LSB access. - * Use this once to initialize the FF to a known state. - * After that, keep track of it. :-) - * --- In order to do that, the DMA routines below should --- - * --- only be used while interrupts are disabled! --- - */ -static __inline__ void clear_dma_ff(unsigned int dmanr) -{ - if (dmanr<=3) - dma_outb(0, DMA1_CLEAR_FF_REG); - else - dma_outb(0, DMA2_CLEAR_FF_REG); -} - -/* set mode (above) for a specific DMA channel */ -static __inline__ void set_dma_mode(unsigned int dmanr, char mode) -{ - if (dmanr<=3) - dma_outb(mode | dmanr, DMA1_MODE_REG); - else - dma_outb(mode | (dmanr&3), DMA2_MODE_REG); -} - -/* Set only the page register bits of the transfer address. - * This is used for successive transfers when we know the contents of - * the lower 16 bits of the DMA current address register, but a 64k boundary - * may have been crossed. - */ -static __inline__ void set_dma_page(unsigned int dmanr, char pagenr) -{ - switch(dmanr) { - case 0: - dma_outb(pagenr, DMA_PAGE_0); - break; - case 1: - dma_outb(pagenr, DMA_PAGE_1); - break; - case 2: - dma_outb(pagenr, DMA_PAGE_2); - break; - case 3: - dma_outb(pagenr, DMA_PAGE_3); - break; - case 5: - dma_outb(pagenr & 0xfe, DMA_PAGE_5); - break; - case 6: - dma_outb(pagenr & 0xfe, DMA_PAGE_6); - break; - case 7: - dma_outb(pagenr & 0xfe, DMA_PAGE_7); - break; - } -} - - -/* Set transfer address & page bits for specific DMA channel. - * Assumes dma flipflop is clear. - */ -static __inline__ void set_dma_addr(unsigned int dmanr, unsigned int a) -{ - set_dma_page(dmanr, a>>16); - if (dmanr <= 3) { - dma_outb( a & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); - dma_outb( (a>>8) & 0xff, ((dmanr&3)<<1) + IO_DMA1_BASE ); - } else { - dma_outb( (a>>1) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); - dma_outb( (a>>9) & 0xff, ((dmanr&3)<<2) + IO_DMA2_BASE ); - } -} - - -/* Set transfer size (max 64k for DMA1..3, 128k for DMA5..7) for - * a specific DMA channel. - * You must ensure the parameters are valid. - * NOTE: from a manual: "the number of transfers is one more - * than the initial word count"! This is taken into account. - * Assumes dma flip-flop is clear. - * NOTE 2: "count" represents _bytes_ and must be even for channels 5-7. - */ -static __inline__ void set_dma_count(unsigned int dmanr, unsigned int count) -{ - count--; - if (dmanr <= 3) { - dma_outb( count & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); - dma_outb( (count>>8) & 0xff, ((dmanr&3)<<1) + 1 + IO_DMA1_BASE ); - } else { - dma_outb( (count>>1) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); - dma_outb( (count>>9) & 0xff, ((dmanr&3)<<2) + 2 + IO_DMA2_BASE ); - } -} - - -/* Get DMA residue count. After a DMA transfer, this - * should return zero. Reading this while a DMA transfer is - * still in progress will return unpredictable results. - * If called before the channel has been used, it may return 1. - * Otherwise, it returns the number of _bytes_ left to transfer. - * - * Assumes DMA flip-flop is clear. - */ -static __inline__ int get_dma_residue(unsigned int dmanr) -{ - unsigned int io_port = (dmanr<=3)? ((dmanr&3)<<1) + 1 + IO_DMA1_BASE - : ((dmanr&3)<<2) + 2 + IO_DMA2_BASE; - - /* using short to get 16-bit wrap around */ - unsigned short count; - - count = 1 + dma_inb(io_port); - count += dma_inb(io_port) << 8; - - return (dmanr<=3)? count : (count<<1); -} - - -/* These are in kernel/dma.c: */ -extern int request_dma(unsigned int dmanr, const char * device_id); /* reserve a DMA channel */ -extern void free_dma(unsigned int dmanr); /* release it again */ - - -#endif /* _ASM_DMA_H */ diff --git a/i386/i386at/gpl/linux/include/asm/errno.h b/i386/i386at/gpl/linux/include/asm/errno.h deleted file mode 100644 index f5c37ca..0000000 --- a/i386/i386at/gpl/linux/include/asm/errno.h +++ /dev/null @@ -1,252 +0,0 @@ -#ifndef _I386_ERRNO_H -#define _I386_ERRNO_H - -#ifdef MACH_INCLUDE -#define LINUX_EPERM 1 /* Operation not permitted */ -#define LINUX_ENOENT 2 /* No such file or directory */ -#define LINUX_ESRCH 3 /* No such process */ -#define LINUX_EINTR 4 /* Interrupted system call */ -#define LINUX_EIO 5 /* I/O error */ -#define LINUX_ENXIO 6 /* No such device or address */ -#define LINUX_E2BIG 7 /* Arg list too long */ -#define LINUX_ENOEXEC 8 /* Exec format error */ -#define LINUX_EBADF 9 /* Bad file number */ -#define LINUX_ECHILD 10 /* No child processes */ -#define LINUX_EAGAIN 11 /* Try again */ -#define LINUX_ENOMEM 12 /* Out of memory */ -#define LINUX_EACCES 13 /* Permission denied */ -#define LINUX_EFAULT 14 /* Bad address */ -#define LINUX_ENOTBLK 15 /* Block device required */ -#define LINUX_EBUSY 16 /* Device or resource busy */ -#define LINUX_EEXIST 17 /* File exists */ -#define LINUX_EXDEV 18 /* Cross-device link */ -#define LINUX_ENODEV 19 /* No such device */ -#define LINUX_ENOTDIR 20 /* Not a directory */ -#define LINUX_EISDIR 21 /* Is a directory */ -#define LINUX_EINVAL 22 /* Invalid argument */ -#define LINUX_ENFILE 23 /* File table overflow */ -#define LINUX_EMFILE 24 /* Too many open files */ -#define LINUX_ENOTTY 25 /* Not a typewriter */ -#define LINUX_ETXTBSY 26 /* Text file busy */ -#define LINUX_EFBIG 27 /* File too large */ -#define LINUX_ENOSPC 28 /* No space left on device */ -#define LINUX_ESPIPE 29 /* Illegal seek */ -#define LINUX_EROFS 30 /* Read-only file system */ -#define LINUX_EMLINK 31 /* Too many links */ -#define LINUX_EPIPE 32 /* Broken pipe */ -#define LINUX_EDOM 33 /* Math argument out of domain of func */ -#define LINUX_ERANGE 34 /* Math result not representable */ -#define LINUX_EDEADLK 35 /* Resource deadlock would occur */ -#define LINUX_ENAMETOOLONG 36 /* File name too long */ -#define LINUX_ENOLCK 37 /* No record locks available */ -#define LINUX_ENOSYS 38 /* Function not implemented */ -#define LINUX_ENOTEMPTY 39 /* Directory not empty */ -#define LINUX_ELOOP 40 /* Too many symbolic links encountered */ -#define LINUX_EWOULDBLOCK LINUX_EAGAIN /* Operation would block */ -#define LINUX_ENOMSG 42 /* No message of desired type */ -#define LINUX_EIDRM 43 /* Identifier removed */ -#define LINUX_ECHRNG 44 /* Channel number out of range */ -#define LINUX_EL2NSYNC 45 /* Level 2 not synchronized */ -#define LINUX_EL3HLT 46 /* Level 3 halted */ -#define LINUX_EL3RST 47 /* Level 3 reset */ -#define LINUX_ELNRNG 48 /* Link number out of range */ -#define LINUX_EUNATCH 49 /* Protocol driver not attached */ -#define LINUX_ENOCSI 50 /* No CSI structure available */ -#define LINUX_EL2HLT 51 /* Level 2 halted */ -#define LINUX_EBADE 52 /* Invalid exchange */ -#define LINUX_EBADR 53 /* Invalid request descriptor */ -#define LINUX_EXFULL 54 /* Exchange full */ -#define LINUX_ENOANO 55 /* No anode */ -#define LINUX_EBADRQC 56 /* Invalid request code */ -#define LINUX_EBADSLT 57 /* Invalid slot */ -#define LINUX_EDEADLOCK 58 /* File locking deadlock error */ -#define LINUX_EBFONT 59 /* Bad font file format */ -#define LINUX_ENOSTR 60 /* Device not a stream */ -#define LINUX_ENODATA 61 /* No data available */ -#define LINUX_ETIME 62 /* Timer expired */ -#define LINUX_ENOSR 63 /* Out of streams resources */ -#define LINUX_ENONET 64 /* Machine is not on the network */ -#define LINUX_ENOPKG 65 /* Package not installed */ -#define LINUX_EREMOTE 66 /* Object is remote */ -#define LINUX_ENOLINK 67 /* Link has been severed */ -#define LINUX_EADV 68 /* Advertise error */ -#define LINUX_ESRMNT 69 /* Srmount error */ -#define LINUX_ECOMM 70 /* Communication error on send */ -#define LINUX_EPROTO 71 /* Protocol error */ -#define LINUX_EMULTIHOP 72 /* Multihop attempted */ -#define LINUX_EDOTDOT 73 /* RFS specific error */ -#define LINUX_EBADMSG 74 /* Not a data message */ -#define LINUX_EOVERFLOW 75 /* Value too large for defined data type */ -#define LINUX_ENOTUNIQ 76 /* Name not unique on network */ -#define LINUX_EBADFD 77 /* File descriptor in bad state */ -#define LINUX_EREMCHG 78 /* Remote address changed */ -#define LINUX_ELIBACC 79 /* Can not access a needed shared library */ -#define LINUX_ELIBBAD 80 /* Accessing a corrupted shared library */ -#define LINUX_ELIBSCN 81 /* .lib section in a.out corrupted */ -#define LINUX_ELIBMAX 82 /* Attempting to link in too many shared libraries */ -#define LINUX_ELIBEXEC 83 /* Cannot exec a shared library directly */ -#define LINUX_EILSEQ 84 /* Illegal byte sequence */ -#define LINUX_ERESTART 85 /* Interrupted system call should be restarted */ -#define LINUX_ESTRPIPE 86 /* Streams pipe error */ -#define LINUX_EUSERS 87 /* Too many users */ -#define LINUX_ENOTSOCK 88 /* Socket operation on non-socket */ -#define LINUX_EDESTADDRREQ 89 /* Destination address required */ -#define LINUX_EMSGSIZE 90 /* Message too long */ -#define LINUX_EPROTOTYPE 91 /* Protocol wrong type for socket */ -#define LINUX_ENOPROTOOPT 92 /* Protocol not available */ -#define LINUX_EPROTONOSUPPORT 93 /* Protocol not supported */ -#define LINUX_ESOCKTNOSUPPORT 94 /* Socket type not supported */ -#define LINUX_EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ -#define LINUX_EPFNOSUPPORT 96 /* Protocol family not supported */ -#define LINUX_EAFNOSUPPORT 97 /* Address family not supported by protocol */ -#define LINUX_EADDRINUSE 98 /* Address already in use */ -#define LINUX_EADDRNOTAVAIL 99 /* Cannot assign requested address */ -#define LINUX_ENETDOWN 100 /* Network is down */ -#define LINUX_ENETUNREACH 101 /* Network is unreachable */ -#define LINUX_ENETRESET 102 /* Network dropped connection because of reset */ -#define LINUX_ECONNABORTED 103 /* Software caused connection abort */ -#define LINUX_ECONNRESET 104 /* Connection reset by peer */ -#define LINUX_ENOBUFS 105 /* No buffer space available */ -#define LINUX_EISCONN 106 /* Transport endpoint is already connected */ -#define LINUX_ENOTCONN 107 /* Transport endpoint is not connected */ -#define LINUX_ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ -#define LINUX_ETOOMANYREFS 109 /* Too many references: cannot splice */ -#define LINUX_ETIMEDOUT 110 /* Connection timed out */ -#define LINUX_ECONNREFUSED 111 /* Connection refused */ -#define LINUX_EHOSTDOWN 112 /* Host is down */ -#define LINUX_EHOSTUNREACH 113 /* No route to host */ -#define LINUX_EALREADY 114 /* Operation already in progress */ -#define LINUX_EINPROGRESS 115 /* Operation now in progress */ -#define LINUX_ESTALE 116 /* Stale NFS file handle */ -#define LINUX_EUCLEAN 117 /* Structure needs cleaning */ -#define LINUX_ENOTNAM 118 /* Not a XENIX named type file */ -#define LINUX_ENAVAIL 119 /* No XENIX semaphores available */ -#define LINUX_EISNAM 120 /* Is a named type file */ -#define LINUX_EREMOTEIO 121 /* Remote I/O error */ -#define LINUX_EDQUOT 122 /* Quota exceeded */ -#else /* ! MACH_INCLUDE */ -#define EPERM 1 /* Operation not permitted */ -#define ENOENT 2 /* No such file or directory */ -#define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted system call */ -#define EIO 5 /* I/O error */ -#define ENXIO 6 /* No such device or address */ -#define E2BIG 7 /* Arg list too long */ -#define ENOEXEC 8 /* Exec format error */ -#define EBADF 9 /* Bad file number */ -#define ECHILD 10 /* No child processes */ -#define EAGAIN 11 /* Try again */ -#define ENOMEM 12 /* Out of memory */ -#define EACCES 13 /* Permission denied */ -#define EFAULT 14 /* Bad address */ -#define ENOTBLK 15 /* Block device required */ -#define EBUSY 16 /* Device or resource busy */ -#define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Cross-device link */ -#define ENODEV 19 /* No such device */ -#define ENOTDIR 20 /* Not a directory */ -#define EISDIR 21 /* Is a directory */ -#define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* File table overflow */ -#define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Not a typewriter */ -#define ETXTBSY 26 /* Text file busy */ -#define EFBIG 27 /* File too large */ -#define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Illegal seek */ -#define EROFS 30 /* Read-only file system */ -#define EMLINK 31 /* Too many links */ -#define EPIPE 32 /* Broken pipe */ -#define EDOM 33 /* Math argument out of domain of func */ -#define ERANGE 34 /* Math result not representable */ -#define EDEADLK 35 /* Resource deadlock would occur */ -#define ENAMETOOLONG 36 /* File name too long */ -#define ENOLCK 37 /* No record locks available */ -#define ENOSYS 38 /* Function not implemented */ -#define ENOTEMPTY 39 /* Directory not empty */ -#define ELOOP 40 /* Too many symbolic links encountered */ -#define EWOULDBLOCK EAGAIN /* Operation would block */ -#define ENOMSG 42 /* No message of desired type */ -#define EIDRM 43 /* Identifier removed */ -#define ECHRNG 44 /* Channel number out of range */ -#define EL2NSYNC 45 /* Level 2 not synchronized */ -#define EL3HLT 46 /* Level 3 halted */ -#define EL3RST 47 /* Level 3 reset */ -#define ELNRNG 48 /* Link number out of range */ -#define EUNATCH 49 /* Protocol driver not attached */ -#define ENOCSI 50 /* No CSI structure available */ -#define EL2HLT 51 /* Level 2 halted */ -#define EBADE 52 /* Invalid exchange */ -#define EBADR 53 /* Invalid request descriptor */ -#define EXFULL 54 /* Exchange full */ -#define ENOANO 55 /* No anode */ -#define EBADRQC 56 /* Invalid request code */ -#define EBADSLT 57 /* Invalid slot */ -#define EDEADLOCK 58 /* File locking deadlock error */ -#define EBFONT 59 /* Bad font file format */ -#define ENOSTR 60 /* Device not a stream */ -#define ENODATA 61 /* No data available */ -#define ETIME 62 /* Timer expired */ -#define ENOSR 63 /* Out of streams resources */ -#define ENONET 64 /* Machine is not on the network */ -#define ENOPKG 65 /* Package not installed */ -#define EREMOTE 66 /* Object is remote */ -#define ENOLINK 67 /* Link has been severed */ -#define EADV 68 /* Advertise error */ -#define ESRMNT 69 /* Srmount error */ -#define ECOMM 70 /* Communication error on send */ -#define EPROTO 71 /* Protocol error */ -#define EMULTIHOP 72 /* Multihop attempted */ -#define EDOTDOT 73 /* RFS specific error */ -#define EBADMSG 74 /* Not a data message */ -#define EOVERFLOW 75 /* Value too large for defined data type */ -#define ENOTUNIQ 76 /* Name not unique on network */ -#define EBADFD 77 /* File descriptor in bad state */ -#define EREMCHG 78 /* Remote address changed */ -#define ELIBACC 79 /* Can not access a needed shared library */ -#define ELIBBAD 80 /* Accessing a corrupted shared library */ -#define ELIBSCN 81 /* .lib section in a.out corrupted */ -#define ELIBMAX 82 /* Attempting to link in too many shared libraries */ -#define ELIBEXEC 83 /* Cannot exec a shared library directly */ -#define EILSEQ 84 /* Illegal byte sequence */ -#define ERESTART 85 /* Interrupted system call should be restarted */ -#define ESTRPIPE 86 /* Streams pipe error */ -#define EUSERS 87 /* Too many users */ -#define ENOTSOCK 88 /* Socket operation on non-socket */ -#define EDESTADDRREQ 89 /* Destination address required */ -#define EMSGSIZE 90 /* Message too long */ -#define EPROTOTYPE 91 /* Protocol wrong type for socket */ -#define ENOPROTOOPT 92 /* Protocol not available */ -#define EPROTONOSUPPORT 93 /* Protocol not supported */ -#define ESOCKTNOSUPPORT 94 /* Socket type not supported */ -#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ -#define EPFNOSUPPORT 96 /* Protocol family not supported */ -#define EAFNOSUPPORT 97 /* Address family not supported by protocol */ -#define EADDRINUSE 98 /* Address already in use */ -#define EADDRNOTAVAIL 99 /* Cannot assign requested address */ -#define ENETDOWN 100 /* Network is down */ -#define ENETUNREACH 101 /* Network is unreachable */ -#define ENETRESET 102 /* Network dropped connection because of reset */ -#define ECONNABORTED 103 /* Software caused connection abort */ -#define ECONNRESET 104 /* Connection reset by peer */ -#define ENOBUFS 105 /* No buffer space available */ -#define EISCONN 106 /* Transport endpoint is already connected */ -#define ENOTCONN 107 /* Transport endpoint is not connected */ -#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ -#define ETOOMANYREFS 109 /* Too many references: cannot splice */ -#define ETIMEDOUT 110 /* Connection timed out */ -#define ECONNREFUSED 111 /* Connection refused */ -#define EHOSTDOWN 112 /* Host is down */ -#define EHOSTUNREACH 113 /* No route to host */ -#define EALREADY 114 /* Operation already in progress */ -#define EINPROGRESS 115 /* Operation now in progress */ -#define ESTALE 116 /* Stale NFS file handle */ -#define EUCLEAN 117 /* Structure needs cleaning */ -#define ENOTNAM 118 /* Not a XENIX named type file */ -#define ENAVAIL 119 /* No XENIX semaphores available */ -#define EISNAM 120 /* Is a named type file */ -#define EREMOTEIO 121 /* Remote I/O error */ -#define EDQUOT 122 /* Quota exceeded */ -#endif /* ! MACH_INCLUDE */ - -#endif diff --git a/i386/i386at/gpl/linux/include/asm/fcntl.h b/i386/i386at/gpl/linux/include/asm/fcntl.h deleted file mode 100644 index 0cb8fcd..0000000 --- a/i386/i386at/gpl/linux/include/asm/fcntl.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef _I386_FCNTL_H -#define _I386_FCNTL_H - -/* open/fcntl - O_SYNC is only implemented on blocks devices and on files - located on an ext2 file system */ -#define O_ACCMODE 0003 -#define O_RDONLY 00 -#define O_WRONLY 01 -#define O_RDWR 02 -#define O_CREAT 0100 /* not fcntl */ -#define O_EXCL 0200 /* not fcntl */ -#define O_NOCTTY 0400 /* not fcntl */ -#define O_TRUNC 01000 /* not fcntl */ -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_NDELAY O_NONBLOCK -#define O_SYNC 010000 -#define FASYNC 020000 /* fcntl, for BSD compatibility */ - -#define F_DUPFD 0 /* dup */ -#define F_GETFD 1 /* get f_flags */ -#define F_SETFD 2 /* set f_flags */ -#define F_GETFL 3 /* more flags (cloexec) */ -#define F_SETFL 4 -#define F_GETLK 5 -#define F_SETLK 6 -#define F_SETLKW 7 - -#define F_SETOWN 8 /* for sockets. */ -#define F_GETOWN 9 /* for sockets. */ - -/* for F_[GET|SET]FL */ -#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ - -/* for posix fcntl() and lockf() */ -#define F_RDLCK 0 -#define F_WRLCK 1 -#define F_UNLCK 2 - -/* for old implementation of bsd flock () */ -#define F_EXLCK 4 /* or 3 */ -#define F_SHLCK 8 /* or 4 */ - -/* operations for bsd flock(), also used by the kernel implementation */ -#define LOCK_SH 1 /* shared lock */ -#define LOCK_EX 2 /* exclusive lock */ -#define LOCK_NB 4 /* or'd with one of the above to prevent - blocking */ -#define LOCK_UN 8 /* remove lock */ - -#ifdef __KERNEL__ -#define F_POSIX 1 -#define F_FLOCK 2 -#endif /* __KERNEL__ */ - -struct flock { - short l_type; - short l_whence; - off_t l_start; - off_t l_len; - pid_t l_pid; -}; - -#endif diff --git a/i386/i386at/gpl/linux/include/asm/floppy.h b/i386/i386at/gpl/linux/include/asm/floppy.h deleted file mode 100644 index 93c58fe..0000000 --- a/i386/i386at/gpl/linux/include/asm/floppy.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Architecture specific parts of the Floppy driver - * - * 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 - */ -#ifndef __ASM_I386_FLOPPY_H -#define __ASM_I386_FLOPPY_H - -#define fd_inb(port) inb_p(port) -#define fd_outb(port,value) outb_p(port,value) - -#define fd_enable_dma() enable_dma(FLOPPY_DMA) -#define fd_disable_dma() disable_dma(FLOPPY_DMA) -#define fd_request_dma() request_dma(FLOPPY_DMA,"floppy") -#define fd_free_dma() free_dma(FLOPPY_DMA) -#define fd_clear_dma_ff() clear_dma_ff(FLOPPY_DMA) -#define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA,mode) -#define fd_set_dma_addr(addr) set_dma_addr(FLOPPY_DMA,addr) -#define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA,count) -#define fd_enable_irq() enable_irq(FLOPPY_IRQ) -#define fd_disable_irq() disable_irq(FLOPPY_IRQ) -#define fd_cacheflush(addr,size) /* nothing */ -#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt, \ - SA_INTERRUPT|SA_SAMPLE_RANDOM, \ - "floppy") -#define fd_free_irq() free_irq(FLOPPY_IRQ); - -__inline__ void virtual_dma_init(void) -{ - /* Nothing to do on an i386 */ -} - -static int FDC1 = 0x3f0; -static int FDC2 = -1; - -#define FLOPPY0_TYPE ((CMOS_READ(0x10) >> 4) & 15) -#define FLOPPY1_TYPE (CMOS_READ(0x10) & 15) - -#define N_FDC 2 -#define N_DRIVE 8 - -/* - * The DMA channel used by the floppy controller cannot access data at - * addresses >= 16MB - * - * Went back to the 1MB limit, as some people had problems with the floppy - * driver otherwise. It doesn't matter much for performance anyway, as most - * floppy accesses go through the track buffer. - */ -#define CROSS_64KB(a,s) ((unsigned long)(a)/K_64 != ((unsigned long)(a) + (s) - 1) / K_64) - -#endif /* __ASM_I386_FLOPPY_H */ diff --git a/i386/i386at/gpl/linux/include/asm/io.h b/i386/i386at/gpl/linux/include/asm/io.h deleted file mode 100644 index 98e32ce..0000000 --- a/i386/i386at/gpl/linux/include/asm/io.h +++ /dev/null @@ -1,213 +0,0 @@ -#ifndef _ASM_IO_H -#define _ASM_IO_H - -/* - * This file contains the definitions for the x86 IO instructions - * inb/inw/inl/outb/outw/outl and the "string versions" of the same - * (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing" - * versions of the single-IO instructions (inb_p/inw_p/..). - * - * This file is not meant to be obfuscating: it's just complicated - * to (a) handle it all in a way that makes gcc able to optimize it - * as well as possible and (b) trying to avoid writing the same thing - * over and over again with slight variations and possibly making a - * mistake somewhere. - */ - -/* - * Thanks to James van Artsdalen for a better timing-fix than - * the two short jumps: using outb's to a nonexistent port seems - * to guarantee better timings even on fast machines. - * - * On the other hand, I'd like to be sure of a non-existent port: - * I feel a bit unsafe about using 0x80 (should be safe, though) - * - * Linus - */ - -#ifdef SLOW_IO_BY_JUMPING -#define __SLOW_DOWN_IO __asm__ __volatile__("jmp 1f\n1:\tjmp 1f\n1:") -#else -#define __SLOW_DOWN_IO __asm__ __volatile__("outb %al,$0x80") -#endif - -#ifdef REALLY_SLOW_IO -#define SLOW_DOWN_IO { __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; } -#else -#define SLOW_DOWN_IO __SLOW_DOWN_IO -#endif - -/* - * Change virtual addresses to physical addresses and vv. - * These are trivial on the 1:1 Linux/i386 mapping (but if we ever - * make the kernel segment mapped at 0, we need to do translation - * on the i386 as well) - */ -extern inline unsigned long virt_to_phys(volatile void * address) -{ - return (unsigned long) address; -} - -extern inline void * phys_to_virt(unsigned long address) -{ - return (void *) address; -} - -/* - * IO bus memory addresses are also 1:1 with the physical address - */ -#define virt_to_bus virt_to_phys -#define bus_to_virt phys_to_virt - -/* - * readX/writeX() are used to access memory mapped devices. On some - * architectures the memory mapped IO stuff needs to be accessed - * differently. On the x86 architecture, we just read/write the - * memory location directly. - */ -#define readb(addr) (*(volatile unsigned char *) (addr)) -#define readw(addr) (*(volatile unsigned short *) (addr)) -#define readl(addr) (*(volatile unsigned int *) (addr)) - -#define writeb(b,addr) ((*(volatile unsigned char *) (addr)) = (b)) -#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b)) -#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b)) - -#define memset_io(a,b,c) memset((void *)(a),(b),(c)) -#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) -#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) - -/* - * Again, i386 does not require mem IO specific function. - */ - -#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(b),(c),(d)) - -/* - * Talk about misusing macros.. - */ - -#define __OUT1(s,x) \ -extern inline void __out##s(unsigned x value, unsigned short port) { - -#define __OUT2(s,s1,s2) \ -__asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" - -#define __OUT(s,s1,x) \ -__OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); } \ -__OUT1(s##c,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); } \ -__OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); SLOW_DOWN_IO; } \ -__OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; } - -#define __IN1(s) \ -extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v; - -#define __IN2(s,s1,s2) \ -__asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" - -#define __IN(s,s1,i...) \ -__IN1(s) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); return _v; } \ -__IN1(s##c) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); return _v; } \ -__IN1(s##_p) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); SLOW_DOWN_IO; return _v; } \ -__IN1(s##c_p) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; } - -#define __INS(s) \ -extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \ -{ __asm__ __volatile__ ("cld ; rep ; ins" #s \ -: "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } - -#define __OUTS(s) \ -extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ -{ __asm__ __volatile__ ("cld ; rep ; outs" #s \ -: "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } - -#define RETURN_TYPE unsigned char -/* __IN(b,"b","0" (0)) */ -__IN(b,"") -#undef RETURN_TYPE -#define RETURN_TYPE unsigned short -/* __IN(w,"w","0" (0)) */ -__IN(w,"") -#undef RETURN_TYPE -#define RETURN_TYPE unsigned int -__IN(l,"") -#undef RETURN_TYPE - -__OUT(b,"b",char) -__OUT(w,"w",short) -__OUT(l,,int) - -__INS(b) -__INS(w) -__INS(l) - -__OUTS(b) -__OUTS(w) -__OUTS(l) - -/* - * Note that due to the way __builtin_constant_p() works, you - * - can't use it inside a inline function (it will never be true) - * - you don't have to worry about side effects within the __builtin.. - */ -#define outb(val,port) \ -((__builtin_constant_p((port)) && (port) < 256) ? \ - __outbc((val),(port)) : \ - __outb((val),(port))) - -#define inb(port) \ -((__builtin_constant_p((port)) && (port) < 256) ? \ - __inbc(port) : \ - __inb(port)) - -#define outb_p(val,port) \ -((__builtin_constant_p((port)) && (port) < 256) ? \ - __outbc_p((val),(port)) : \ - __outb_p((val),(port))) - -#define inb_p(port) \ -((__builtin_constant_p((port)) && (port) < 256) ? \ - __inbc_p(port) : \ - __inb_p(port)) - -#define outw(val,port) \ -((__builtin_constant_p((port)) && (port) < 256) ? \ - __outwc((val),(port)) : \ - __outw((val),(port))) - -#define inw(port) \ -((__builtin_constant_p((port)) && (port) < 256) ? \ - __inwc(port) : \ - __inw(port)) - -#define outw_p(val,port) \ -((__builtin_constant_p((port)) && (port) < 256) ? \ - __outwc_p((val),(port)) : \ - __outw_p((val),(port))) - -#define inw_p(port) \ -((__builtin_constant_p((port)) && (port) < 256) ? \ - __inwc_p(port) : \ - __inw_p(port)) - -#define outl(val,port) \ -((__builtin_constant_p((port)) && (port) < 256) ? \ - __outlc((val),(port)) : \ - __outl((val),(port))) - -#define inl(port) \ -((__builtin_constant_p((port)) && (port) < 256) ? \ - __inlc(port) : \ - __inl(port)) - -#define outl_p(val,port) \ -((__builtin_constant_p((port)) && (port) < 256) ? \ - __outlc_p((val),(port)) : \ - __outl_p((val),(port))) - -#define inl_p(port) \ -((__builtin_constant_p((port)) && (port) < 256) ? \ - __inlc_p(port) : \ - __inl_p(port)) - -#endif diff --git a/i386/i386at/gpl/linux/include/asm/ioctl.h b/i386/i386at/gpl/linux/include/asm/ioctl.h deleted file mode 100644 index cc94e3b..0000000 --- a/i386/i386at/gpl/linux/include/asm/ioctl.h +++ /dev/null @@ -1,75 +0,0 @@ -/* $Id: ioctl.h,v 1.1.1.1 1997/02/25 21:27:24 thomas Exp $ - * - * linux/ioctl.h for Linux by H.H. Bergman. - */ - -#ifndef _ASMI386_IOCTL_H -#define _ASMI386_IOCTL_H - -/* ioctl command encoding: 32 bits total, command in lower 16 bits, - * size of the parameter structure in the lower 14 bits of the - * upper 16 bits. - * Encoding the size of the parameter structure in the ioctl request - * is useful for catching programs compiled with old versions - * and to avoid overwriting user space outside the user buffer area. - * The highest 2 bits are reserved for indicating the ``access mode''. - * NOTE: This limits the max parameter size to 16kB -1 ! - */ - -/* - * The following is for compatibility across the various Linux - * platforms. The i386 ioctl numbering scheme doesn't really enforce - * a type field. De facto, however, the top 8 bits of the lower 16 - * bits are indeed used as a type field, so we might just as well make - * this explicit here. Please be sure to use the decoding macros - * below from now on. - */ -#define _IOC_NRBITS 8 -#define _IOC_TYPEBITS 8 -#define _IOC_SIZEBITS 14 -#define _IOC_DIRBITS 2 - -#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) -#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) -#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) -#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) - -#define _IOC_NRSHIFT 0 -#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) -#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) -#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) - -/* - * Direction bits. - */ -#define _IOC_NONE 0U -#define _IOC_WRITE 1U -#define _IOC_READ 2U - -#define _IOC(dir,type,nr,size) \ - (((dir) << _IOC_DIRSHIFT) | \ - ((type) << _IOC_TYPESHIFT) | \ - ((nr) << _IOC_NRSHIFT) | \ - ((size) << _IOC_SIZESHIFT)) - -/* used to create numbers */ -#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) -#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) -#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) -#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) - -/* used to decode ioctl numbers.. */ -#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) -#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) -#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) -#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) - -/* ...and for the drivers/sound files... */ - -#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) -#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) -#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) -#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) -#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) - -#endif /* _ASMI386_IOCTL_H */ diff --git a/i386/i386at/gpl/linux/include/asm/irq.h b/i386/i386at/gpl/linux/include/asm/irq.h deleted file mode 100644 index 8fd44b4..0000000 --- a/i386/i386at/gpl/linux/include/asm/irq.h +++ /dev/null @@ -1,346 +0,0 @@ -#ifndef _ASM_IRQ_H -#define _ASM_IRQ_H - -/* - * linux/include/asm/irq.h - * - * (C) 1992, 1993 Linus Torvalds - * - * IRQ/IPI changes taken from work by Thomas Radke <tomsoft@informatik.tu-chemnitz.de> - */ - -#include <linux/linkage.h> -#include <asm/segment.h> - -#define NR_IRQS 16 - -extern void disable_irq(unsigned int); -extern void enable_irq(unsigned int); - -#define __STR(x) #x -#define STR(x) __STR(x) - -#define SAVE_ALL \ - "cld\n\t" \ - "push %gs\n\t" \ - "push %fs\n\t" \ - "push %es\n\t" \ - "push %ds\n\t" \ - "pushl %eax\n\t" \ - "pushl %ebp\n\t" \ - "pushl %edi\n\t" \ - "pushl %esi\n\t" \ - "pushl %edx\n\t" \ - "pushl %ecx\n\t" \ - "pushl %ebx\n\t" \ - "movl $" STR(KERNEL_DS) ",%edx\n\t" \ - "mov %dx,%ds\n\t" \ - "mov %dx,%es\n\t" \ - "movl $" STR(USER_DS) ",%edx\n\t" \ - "mov %dx,%fs\n\t" \ - "movl $0,%edx\n\t" \ - "movl %edx,%db7\n\t" - -/* - * SAVE_MOST/RESTORE_MOST is used for the faster version of IRQ handlers, - * installed by using the SA_INTERRUPT flag. These kinds of IRQ's don't - * call the routines that do signal handling etc on return, and can have - * more relaxed register-saving etc. They are also atomic, and are thus - * suited for small, fast interrupts like the serial lines or the harddisk - * drivers, which don't actually need signal handling etc. - * - * Also note that we actually save only those registers that are used in - * C subroutines (%eax, %edx and %ecx), so if you do something weird, - * you're on your own. The only segments that are saved (not counting the - * automatic stack and code segment handling) are %ds and %es, and they - * point to kernel space. No messing around with %fs here. - */ -#define SAVE_MOST \ - "cld\n\t" \ - "push %es\n\t" \ - "push %ds\n\t" \ - "pushl %eax\n\t" \ - "pushl %edx\n\t" \ - "pushl %ecx\n\t" \ - "movl $" STR(KERNEL_DS) ",%edx\n\t" \ - "mov %dx,%ds\n\t" \ - "mov %dx,%es\n\t" - -#define RESTORE_MOST \ - "popl %ecx\n\t" \ - "popl %edx\n\t" \ - "popl %eax\n\t" \ - "pop %ds\n\t" \ - "pop %es\n\t" \ - "iret" - -/* - * The "inb" instructions are not needed, but seem to change the timings - * a bit - without them it seems that the harddisk driver won't work on - * all hardware. Arghh. - */ -#define ACK_FIRST(mask) \ - "inb $0x21,%al\n\t" \ - "jmp 1f\n" \ - "1:\tjmp 1f\n" \ - "1:\torb $" #mask ","SYMBOL_NAME_STR(cache_21)"\n\t" \ - "movb "SYMBOL_NAME_STR(cache_21)",%al\n\t" \ - "outb %al,$0x21\n\t" \ - "jmp 1f\n" \ - "1:\tjmp 1f\n" \ - "1:\tmovb $0x20,%al\n\t" \ - "outb %al,$0x20\n\t" - -#define ACK_SECOND(mask) \ - "inb $0xA1,%al\n\t" \ - "jmp 1f\n" \ - "1:\tjmp 1f\n" \ - "1:\torb $" #mask ","SYMBOL_NAME_STR(cache_A1)"\n\t" \ - "movb "SYMBOL_NAME_STR(cache_A1)",%al\n\t" \ - "outb %al,$0xA1\n\t" \ - "jmp 1f\n" \ - "1:\tjmp 1f\n" \ - "1:\tmovb $0x20,%al\n\t" \ - "outb %al,$0xA0\n\t" \ - "jmp 1f\n" \ - "1:\tjmp 1f\n" \ - "1:\toutb %al,$0x20\n\t" - -#define UNBLK_FIRST(mask) \ - "inb $0x21,%al\n\t" \ - "jmp 1f\n" \ - "1:\tjmp 1f\n" \ - "1:\tandb $~(" #mask "),"SYMBOL_NAME_STR(cache_21)"\n\t" \ - "movb "SYMBOL_NAME_STR(cache_21)",%al\n\t" \ - "outb %al,$0x21\n\t" - -#define UNBLK_SECOND(mask) \ - "inb $0xA1,%al\n\t" \ - "jmp 1f\n" \ - "1:\tjmp 1f\n" \ - "1:\tandb $~(" #mask "),"SYMBOL_NAME_STR(cache_A1)"\n\t" \ - "movb "SYMBOL_NAME_STR(cache_A1)",%al\n\t" \ - "outb %al,$0xA1\n\t" - -#define IRQ_NAME2(nr) nr##_interrupt(void) -#define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr) -#define FAST_IRQ_NAME(nr) IRQ_NAME2(fast_IRQ##nr) -#define BAD_IRQ_NAME(nr) IRQ_NAME2(bad_IRQ##nr) - -#ifdef __SMP__ - -#ifndef __SMP_PROF__ -#define SMP_PROF_INT_SPINS -#define SMP_PROF_IPI_CNT -#else -#define SMP_PROF_INT_SPINS "incl "SYMBOL_NAME_STR(smp_spins)"(,%eax,4)\n\t" -#define SMP_PROF_IPI_CNT "incl "SYMBOL_NAME_STR(ipi_count)"\n\t" -#endif - -#define GET_PROCESSOR_ID \ - "movl "SYMBOL_NAME_STR(apic_reg)", %edx\n\t" \ - "movl 32(%edx), %eax\n\t" \ - "shrl $24,%eax\n\t" \ - "andb $0x0F,%al\n" - -#define ENTER_KERNEL \ - "pushl %eax\n\t" \ - "pushl %edx\n\t" \ - "pushfl\n\t" \ - "cli\n\t" \ - GET_PROCESSOR_ID \ - "1: " \ - "lock\n\t" \ - "btsl $0, "SYMBOL_NAME_STR(kernel_flag)"\n\t" \ - "jnc 3f\n\t" \ - "cmpb "SYMBOL_NAME_STR(active_kernel_processor)", %al\n\t" \ - "je 4f\n\t" \ - "2: " \ - SMP_PROF_INT_SPINS \ - "btl %al, "SYMBOL_NAME_STR(smp_invalidate_needed)"\n\t" \ - "jnc 5f\n\t" \ - "lock\n\t" \ - "btrl %al, "SYMBOL_NAME_STR(smp_invalidate_needed)"\n\t" \ - "jnc 5f\n\t" \ - "movl %cr3,%edx\n\t" \ - "movl %edx,%cr3\n" \ - "5: btl $0, "SYMBOL_NAME_STR(kernel_flag)"\n\t" \ - "jc 2b\n\t" \ - "jmp 1b\n\t" \ - "3: " \ - "movb %al, "SYMBOL_NAME_STR(active_kernel_processor)"\n\t" \ - "4: " \ - "incl "SYMBOL_NAME_STR(kernel_counter)"\n\t" \ - "popfl\n\t" \ - "popl %edx\n\t" \ - "popl %eax\n\t" - -#define LEAVE_KERNEL \ - "pushfl\n\t" \ - "cli\n\t" \ - "decl "SYMBOL_NAME_STR(kernel_counter)"\n\t" \ - "jnz 1f\n\t" \ - "movb $" STR (NO_PROC_ID) ", "SYMBOL_NAME_STR(active_kernel_processor)"\n\t" \ - "lock\n\t" \ - "btrl $0, "SYMBOL_NAME_STR(kernel_flag)"\n\t" \ - "1: " \ - "popfl\n\t" - - -/* - * the syscall count inc is a gross hack because ret_from_syscall is used by both irq and - * syscall return paths (urghh). - */ - -#define BUILD_IRQ(chip,nr,mask) \ -asmlinkage void IRQ_NAME(nr); \ -asmlinkage void FAST_IRQ_NAME(nr); \ -asmlinkage void BAD_IRQ_NAME(nr); \ -__asm__( \ -"\n"__ALIGN_STR"\n" \ -SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \ - "pushl $-"#nr"-2\n\t" \ - SAVE_ALL \ - ENTER_KERNEL \ - ACK_##chip(mask) \ - "incl "SYMBOL_NAME_STR(intr_count)"\n\t"\ - "sti\n\t" \ - "movl %esp,%ebx\n\t" \ - "pushl %ebx\n\t" \ - "pushl $" #nr "\n\t" \ - "call "SYMBOL_NAME_STR(do_IRQ)"\n\t" \ - "addl $8,%esp\n\t" \ - "cli\n\t" \ - UNBLK_##chip(mask) \ - "decl "SYMBOL_NAME_STR(intr_count)"\n\t" \ - "incl "SYMBOL_NAME_STR(syscall_count)"\n\t" \ - "jmp ret_from_sys_call\n" \ -"\n"__ALIGN_STR"\n" \ -SYMBOL_NAME_STR(fast_IRQ) #nr "_interrupt:\n\t" \ - SAVE_MOST \ - ENTER_KERNEL \ - ACK_##chip(mask) \ - "incl "SYMBOL_NAME_STR(intr_count)"\n\t" \ - "pushl $" #nr "\n\t" \ - "call "SYMBOL_NAME_STR(do_fast_IRQ)"\n\t" \ - "addl $4,%esp\n\t" \ - "cli\n\t" \ - UNBLK_##chip(mask) \ - "decl "SYMBOL_NAME_STR(intr_count)"\n\t" \ - LEAVE_KERNEL \ - RESTORE_MOST \ -"\n"__ALIGN_STR"\n" \ -SYMBOL_NAME_STR(bad_IRQ) #nr "_interrupt:\n\t" \ - SAVE_MOST \ - ENTER_KERNEL \ - ACK_##chip(mask) \ - LEAVE_KERNEL \ - RESTORE_MOST); - - -/* - * Message pass must be a fast IRQ.. - */ - -#define BUILD_MSGIRQ(chip,nr,mask) \ -asmlinkage void IRQ_NAME(nr); \ -asmlinkage void FAST_IRQ_NAME(nr); \ -asmlinkage void BAD_IRQ_NAME(nr); \ -__asm__( \ -"\n"__ALIGN_STR"\n" \ -SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \ - "pushl $-"#nr"-2\n\t" \ - SAVE_ALL \ - ENTER_KERNEL \ - ACK_##chip(mask) \ - "incl "SYMBOL_NAME_STR(intr_count)"\n\t"\ - "sti\n\t" \ - "movl %esp,%ebx\n\t" \ - "pushl %ebx\n\t" \ - "pushl $" #nr "\n\t" \ - "call "SYMBOL_NAME_STR(do_IRQ)"\n\t" \ - "addl $8,%esp\n\t" \ - "cli\n\t" \ - UNBLK_##chip(mask) \ - "decl "SYMBOL_NAME_STR(intr_count)"\n\t" \ - "incl "SYMBOL_NAME_STR(syscall_count)"\n\t" \ - "jmp ret_from_sys_call\n" \ -"\n"__ALIGN_STR"\n" \ -SYMBOL_NAME_STR(fast_IRQ) #nr "_interrupt:\n\t" \ - SAVE_MOST \ - ACK_##chip(mask) \ - SMP_PROF_IPI_CNT \ - "pushl $" #nr "\n\t" \ - "call "SYMBOL_NAME_STR(do_fast_IRQ)"\n\t" \ - "addl $4,%esp\n\t" \ - "cli\n\t" \ - UNBLK_##chip(mask) \ - RESTORE_MOST \ -"\n"__ALIGN_STR"\n" \ -SYMBOL_NAME_STR(bad_IRQ) #nr "_interrupt:\n\t" \ - SAVE_MOST \ - ACK_##chip(mask) \ - RESTORE_MOST); - -#define BUILD_RESCHEDIRQ(nr) \ -asmlinkage void IRQ_NAME(nr); \ -__asm__( \ -"\n"__ALIGN_STR"\n" \ -SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \ - "pushl $-"#nr"-2\n\t" \ - SAVE_ALL \ - ENTER_KERNEL \ - "incl "SYMBOL_NAME_STR(intr_count)"\n\t"\ - "sti\n\t" \ - "movl %esp,%ebx\n\t" \ - "pushl %ebx\n\t" \ - "pushl $" #nr "\n\t" \ - "call "SYMBOL_NAME_STR(smp_reschedule_irq)"\n\t" \ - "addl $8,%esp\n\t" \ - "cli\n\t" \ - "decl "SYMBOL_NAME_STR(intr_count)"\n\t" \ - "incl "SYMBOL_NAME_STR(syscall_count)"\n\t" \ - "jmp ret_from_sys_call\n"); -#else - -#define BUILD_IRQ(chip,nr,mask) \ -asmlinkage void IRQ_NAME(nr); \ -asmlinkage void FAST_IRQ_NAME(nr); \ -asmlinkage void BAD_IRQ_NAME(nr); \ -__asm__( \ -"\n"__ALIGN_STR"\n" \ -SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \ - "pushl $-"#nr"-2\n\t" \ - SAVE_ALL \ - ACK_##chip(mask) \ - "incl "SYMBOL_NAME_STR(intr_count)"\n\t"\ - "sti\n\t" \ - "movl %esp,%ebx\n\t" \ - "pushl %ebx\n\t" \ - "pushl $" #nr "\n\t" \ - "call "SYMBOL_NAME_STR(do_IRQ)"\n\t" \ - "addl $8,%esp\n\t" \ - "cli\n\t" \ - UNBLK_##chip(mask) \ - "decl "SYMBOL_NAME_STR(intr_count)"\n\t" \ - "jmp ret_from_sys_call\n" \ -"\n"__ALIGN_STR"\n" \ -SYMBOL_NAME_STR(fast_IRQ) #nr "_interrupt:\n\t" \ - SAVE_MOST \ - ACK_##chip(mask) \ - "incl "SYMBOL_NAME_STR(intr_count)"\n\t" \ - "pushl $" #nr "\n\t" \ - "call "SYMBOL_NAME_STR(do_fast_IRQ)"\n\t" \ - "addl $4,%esp\n\t" \ - "cli\n\t" \ - UNBLK_##chip(mask) \ - "decl "SYMBOL_NAME_STR(intr_count)"\n\t" \ - RESTORE_MOST \ -"\n"__ALIGN_STR"\n" \ -SYMBOL_NAME_STR(bad_IRQ) #nr "_interrupt:\n\t" \ - SAVE_MOST \ - ACK_##chip(mask) \ - RESTORE_MOST); - -#endif -#endif diff --git a/i386/i386at/gpl/linux/include/asm/page.h b/i386/i386at/gpl/linux/include/asm/page.h deleted file mode 100644 index 2bb6837..0000000 --- a/i386/i386at/gpl/linux/include/asm/page.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef _I386_PAGE_H -#define _I386_PAGE_H - -#ifndef MACH_INCLUDE -/* PAGE_SHIFT determines the page size */ -#define PAGE_SHIFT 12 -#define PAGE_SIZE (1UL << PAGE_SHIFT) -#define PAGE_MASK (~(PAGE_SIZE-1)) -#endif - -#ifdef __KERNEL__ - -#define STRICT_MM_TYPECHECKS - -#ifdef STRICT_MM_TYPECHECKS -/* - * These are used to make use of C type-checking.. - */ -typedef struct { unsigned long pte; } pte_t; -typedef struct { unsigned long pmd; } pmd_t; -typedef struct { unsigned long pgd; } pgd_t; -typedef struct { unsigned long pgprot; } pgprot_t; - -#define pte_val(x) ((x).pte) -#define pmd_val(x) ((x).pmd) -#define pgd_val(x) ((x).pgd) -#define pgprot_val(x) ((x).pgprot) - -#define __pte(x) ((pte_t) { (x) } ) -#define __pmd(x) ((pmd_t) { (x) } ) -#define __pgd(x) ((pgd_t) { (x) } ) -#define __pgprot(x) ((pgprot_t) { (x) } ) - -#else -/* - * .. while these make it easier on the compiler - */ -typedef unsigned long pte_t; -typedef unsigned long pmd_t; -typedef unsigned long pgd_t; -typedef unsigned long pgprot_t; - -#define pte_val(x) (x) -#define pmd_val(x) (x) -#define pgd_val(x) (x) -#define pgprot_val(x) (x) - -#define __pte(x) (x) -#define __pmd(x) (x) -#define __pgd(x) (x) -#define __pgprot(x) (x) - -#endif - -/* to align the pointer to the (next) page boundary */ -#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) - -/* This handles the memory map.. */ -#define PAGE_OFFSET 0 -#define MAP_NR(addr) (((unsigned long)(addr)) >> PAGE_SHIFT) - -#endif /* __KERNEL__ */ - -#endif /* _I386_PAGE_H */ diff --git a/i386/i386at/gpl/linux/include/asm/param.h b/i386/i386at/gpl/linux/include/asm/param.h deleted file mode 100644 index f821b86..0000000 --- a/i386/i386at/gpl/linux/include/asm/param.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _ASMi386_PARAM_H -#define _ASMi386_PARAM_H - -#ifndef HZ -#define HZ 100 -#endif - -#define EXEC_PAGESIZE 4096 - -#ifndef NGROUPS -#define NGROUPS 32 -#endif - -#ifndef NOGROUP -#define NOGROUP (-1) -#endif - -#define MAXHOSTNAMELEN 64 /* max length of hostname */ - -#endif diff --git a/i386/i386at/gpl/linux/include/asm/processor.h b/i386/i386at/gpl/linux/include/asm/processor.h deleted file mode 100644 index dea7827..0000000 --- a/i386/i386at/gpl/linux/include/asm/processor.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - * include/asm-i386/processor.h - * - * Copyright (C) 1994 Linus Torvalds - */ - -#ifndef __ASM_I386_PROCESSOR_H -#define __ASM_I386_PROCESSOR_H - -/* - * System setup and hardware bug flags.. - */ -extern char hard_math; -extern char x86; /* lower 4 bits */ -extern char x86_vendor_id[13]; -extern char x86_model; /* lower 4 bits */ -extern char x86_mask; /* lower 4 bits */ -extern int x86_capability; /* field of flags */ -extern int fdiv_bug; -extern char ignore_irq13; -extern char wp_works_ok; /* doesn't work on a 386 */ -extern char hlt_works_ok; /* problems on some 486Dx4's and old 386's */ - -/* - * Bus types (default is ISA, but people can check others with these..) - * MCA_bus hardcoded to 0 for now. - */ -extern int EISA_bus; -#define MCA_bus 0 -#define MCA_bus__is_a_macro /* for versions in ksyms.c */ - -/* - * User space process size: 3GB. This is hardcoded into a few places, - * so don't change it unless you know what you are doing. - */ -#define TASK_SIZE (0xC0000000UL) - -/* - * Size of io_bitmap in longwords: 32 is ports 0-0x3ff. - */ -#define IO_BITMAP_SIZE 32 - -struct i387_hard_struct { - long cwd; - long swd; - long twd; - long fip; - long fcs; - long foo; - long fos; - long st_space[20]; /* 8*10 bytes for each FP-reg = 80 bytes */ -}; - -struct i387_soft_struct { - long cwd; - long swd; - long twd; - long fip; - long fcs; - long foo; - long fos; - long top; - struct fpu_reg regs[8]; /* 8*16 bytes for each FP-reg = 128 bytes */ - unsigned char lookahead; - struct info *info; - unsigned long entry_eip; -}; - -union i387_union { - struct i387_hard_struct hard; - struct i387_soft_struct soft; -}; - -struct thread_struct { - unsigned short back_link,__blh; - unsigned long esp0; - unsigned short ss0,__ss0h; - unsigned long esp1; - unsigned short ss1,__ss1h; - unsigned long esp2; - unsigned short ss2,__ss2h; - unsigned long cr3; - unsigned long eip; - unsigned long eflags; - unsigned long eax,ecx,edx,ebx; - unsigned long esp; - unsigned long ebp; - unsigned long esi; - unsigned long edi; - unsigned short es, __esh; - unsigned short cs, __csh; - unsigned short ss, __ssh; - unsigned short ds, __dsh; - unsigned short fs, __fsh; - unsigned short gs, __gsh; - unsigned short ldt, __ldth; - unsigned short trace, bitmap; - unsigned long io_bitmap[IO_BITMAP_SIZE+1]; - unsigned long tr; - unsigned long cr2, trap_no, error_code; -/* floating point info */ - union i387_union i387; -/* virtual 86 mode info */ - struct vm86_struct * vm86_info; - unsigned long screen_bitmap; - unsigned long v86flags, v86mask, v86mode; -}; - -#define INIT_MMAP { &init_mm, 0, 0x40000000, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC } - -#define INIT_TSS { \ - 0,0, \ - sizeof(init_kernel_stack) + (long) &init_kernel_stack, \ - KERNEL_DS, 0, \ - 0,0,0,0,0,0, \ - (long) &swapper_pg_dir, \ - 0,0,0,0,0,0,0,0,0,0, \ - USER_DS,0,USER_DS,0,USER_DS,0,USER_DS,0,USER_DS,0,USER_DS,0, \ - _LDT(0),0, \ - 0, 0x8000, \ - {~0, }, /* ioperm */ \ - _TSS(0), 0, 0,0, \ - { { 0, }, }, /* 387 state */ \ - NULL, 0, 0, 0, 0 /* vm86_info */ \ -} - -#define alloc_kernel_stack() get_free_page(GFP_KERNEL) -#define free_kernel_stack(page) free_page((page)) - -static inline void start_thread(struct pt_regs * regs, unsigned long eip, unsigned long esp) -{ - regs->cs = USER_CS; - regs->ds = regs->es = regs->ss = regs->fs = regs->gs = USER_DS; - regs->eip = eip; - regs->esp = esp; -} - -/* - * Return saved PC of a blocked thread. - */ -extern inline unsigned long thread_saved_pc(struct thread_struct *t) -{ - return ((unsigned long *)t->esp)[3]; -} - -#endif /* __ASM_I386_PROCESSOR_H */ diff --git a/i386/i386at/gpl/linux/include/asm/ptrace.h b/i386/i386at/gpl/linux/include/asm/ptrace.h deleted file mode 100644 index 8e4aa52..0000000 --- a/i386/i386at/gpl/linux/include/asm/ptrace.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef _I386_PTRACE_H -#define _I386_PTRACE_H - -#define EBX 0 -#define ECX 1 -#define EDX 2 -#define ESI 3 -#define EDI 4 -#define EBP 5 -#define EAX 6 -#define DS 7 -#define ES 8 -#define FS 9 -#define GS 10 -#define ORIG_EAX 11 -#define EIP 12 -#define CS 13 -#define EFL 14 -#define UESP 15 -#define SS 16 - - -/* this struct defines the way the registers are stored on the - stack during a system call. */ - -struct pt_regs { - long ebx; - long ecx; - long edx; - long esi; - long edi; - long ebp; - long eax; - unsigned short ds, __dsu; - unsigned short es, __esu; - unsigned short fs, __fsu; - unsigned short gs, __gsu; - long orig_eax; - long eip; - unsigned short cs, __csu; - long eflags; - long esp; - unsigned short ss, __ssu; -}; - -#ifdef __KERNEL__ -#define user_mode(regs) ((VM_MASK & (regs)->eflags) || (3 & (regs)->cs)) -#define instruction_pointer(regs) ((regs)->eip) -extern void show_regs(struct pt_regs *); -#endif - -#endif diff --git a/i386/i386at/gpl/linux/include/asm/resource.h b/i386/i386at/gpl/linux/include/asm/resource.h deleted file mode 100644 index 83940d1..0000000 --- a/i386/i386at/gpl/linux/include/asm/resource.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _I386_RESOURCE_H -#define _I386_RESOURCE_H - -/* - * Resource limits - */ - -#define RLIMIT_CPU 0 /* CPU time in ms */ -#define RLIMIT_FSIZE 1 /* Maximum filesize */ -#define RLIMIT_DATA 2 /* max data size */ -#define RLIMIT_STACK 3 /* max stack size */ -#define RLIMIT_CORE 4 /* max core file size */ -#define RLIMIT_RSS 5 /* max resident set size */ -#define RLIMIT_NPROC 6 /* max number of processes */ -#define RLIMIT_NOFILE 7 /* max number of open files */ -#define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space */ - -#define RLIM_NLIMITS 9 - -#ifdef __KERNEL__ - -#define INIT_RLIMITS \ -{ \ - { LONG_MAX, LONG_MAX }, \ - { LONG_MAX, LONG_MAX }, \ - { LONG_MAX, LONG_MAX }, \ - { _STK_LIM, _STK_LIM }, \ - { 0, LONG_MAX }, \ - { LONG_MAX, LONG_MAX }, \ - { MAX_TASKS_PER_USER, MAX_TASKS_PER_USER }, \ - { NR_OPEN, NR_OPEN }, \ - { LONG_MAX, LONG_MAX }, \ -} - -#endif /* __KERNEL__ */ - -#endif diff --git a/i386/i386at/gpl/linux/include/asm/segment.h b/i386/i386at/gpl/linux/include/asm/segment.h deleted file mode 100644 index 7cfafa4..0000000 --- a/i386/i386at/gpl/linux/include/asm/segment.h +++ /dev/null @@ -1,347 +0,0 @@ -#ifndef _ASM_SEGMENT_H -#define _ASM_SEGMENT_H - -#ifdef MACH -#define KERNEL_CS 0x08 -#define KERNEL_DS 0x10 - -#define USER_CS 0x17 -#define USER_DS 0x1f -#else -#define KERNEL_CS 0x10 -#define KERNEL_DS 0x18 - -#define USER_CS 0x23 -#define USER_DS 0x2B -#endif - -#ifndef __ASSEMBLY__ - -/* - * Uh, these should become the main single-value transfer routines.. - * They automatically use the right size if we just have the right - * pointer type.. - */ -#define put_user(x,ptr) __put_user((unsigned long)(x),(ptr),sizeof(*(ptr))) -#define get_user(ptr) ((__typeof__(*(ptr)))__get_user((ptr),sizeof(*(ptr)))) - -/* - * This is a silly but good way to make sure that - * the __put_user function is indeed always optimized, - * and that we use the correct sizes.. - */ -extern int bad_user_access_length(void); - -/* - * dummy pointer type structure.. gcc won't try to do something strange - * this way.. - */ -struct __segment_dummy { unsigned long a[100]; }; -#define __sd(x) ((struct __segment_dummy *) (x)) -#define __const_sd(x) ((const struct __segment_dummy *) (x)) - -static inline void __put_user(unsigned long x, void * y, int size) -{ - switch (size) { - case 1: - __asm__ ("movb %b1,%%fs:%0" - :"=m" (*__sd(y)) - :"iq" ((unsigned char) x), "m" (*__sd(y))); - break; - case 2: - __asm__ ("movw %w1,%%fs:%0" - :"=m" (*__sd(y)) - :"ir" ((unsigned short) x), "m" (*__sd(y))); - break; - case 4: - __asm__ ("movl %1,%%fs:%0" - :"=m" (*__sd(y)) - :"ir" (x), "m" (*__sd(y))); - break; - default: - bad_user_access_length(); - } -} - -static inline unsigned long __get_user(const void * y, int size) -{ - unsigned long result; - - switch (size) { - case 1: - __asm__ ("movb %%fs:%1,%b0" - :"=q" (result) - :"m" (*__const_sd(y))); - return (unsigned char) result; - case 2: - __asm__ ("movw %%fs:%1,%w0" - :"=r" (result) - :"m" (*__const_sd(y))); - return (unsigned short) result; - case 4: - __asm__ ("movl %%fs:%1,%0" - :"=r" (result) - :"m" (*__const_sd(y))); - return result; - default: - return bad_user_access_length(); - } -} - -static inline void __generic_memcpy_tofs(void * to, const void * from, unsigned long n) -{ - __asm__ volatile - (" cld - push %%es - movw %%fs,%%cx - movw %%cx,%%es - cmpl $3,%0 - jbe 1f - movl %%edi,%%ecx - negl %%ecx - andl $3,%%ecx - subl %%ecx,%0 - rep; movsb - movl %0,%%ecx - shrl $2,%%ecx - rep; movsl - andl $3,%0 - 1: movl %0,%%ecx - rep; movsb - pop %%es" - :"=abd" (n) - :"0" (n),"D" ((long) to),"S" ((long) from) - :"cx","di","si"); -} - -static inline void __constant_memcpy_tofs(void * to, const void * from, unsigned long n) -{ - switch (n) { - case 0: - return; - case 1: - __put_user(*(const char *) from, (char *) to, 1); - return; - case 2: - __put_user(*(const short *) from, (short *) to, 2); - return; - case 3: - __put_user(*(const short *) from, (short *) to, 2); - __put_user(*(2+(const char *) from), 2+(char *) to, 1); - return; - case 4: - __put_user(*(const int *) from, (int *) to, 4); - return; - case 8: - __put_user(*(const int *) from, (int *) to, 4); - __put_user(*(1+(const int *) from), 1+(int *) to, 4); - return; - case 12: - __put_user(*(const int *) from, (int *) to, 4); - __put_user(*(1+(const int *) from), 1+(int *) to, 4); - __put_user(*(2+(const int *) from), 2+(int *) to, 4); - return; - case 16: - __put_user(*(const int *) from, (int *) to, 4); - __put_user(*(1+(const int *) from), 1+(int *) to, 4); - __put_user(*(2+(const int *) from), 2+(int *) to, 4); - __put_user(*(3+(const int *) from), 3+(int *) to, 4); - return; - } -#define COMMON(x) \ -__asm__("cld\n\t" \ - "push %%es\n\t" \ - "push %%fs\n\t" \ - "pop %%es\n\t" \ - "rep ; movsl\n\t" \ - x \ - "pop %%es" \ - : /* no outputs */ \ - :"c" (n/4),"D" ((long) to),"S" ((long) from) \ - :"cx","di","si") - - switch (n % 4) { - case 0: - COMMON(""); - return; - case 1: - COMMON("movsb\n\t"); - return; - case 2: - COMMON("movsw\n\t"); - return; - case 3: - COMMON("movsw\n\tmovsb\n\t"); - return; - } -#undef COMMON -} - -static inline void __generic_memcpy_fromfs(void * to, const void * from, unsigned long n) -{ - __asm__ volatile - (" cld - cmpl $3,%0 - jbe 1f - movl %%edi,%%ecx - negl %%ecx - andl $3,%%ecx - subl %%ecx,%0 - fs; rep; movsb - movl %0,%%ecx - shrl $2,%%ecx - fs; rep; movsl - andl $3,%0 - 1: movl %0,%%ecx - fs; rep; movsb" - :"=abd" (n) - :"0" (n),"D" ((long) to),"S" ((long) from) - :"cx","di","si", "memory"); -} - -static inline void __constant_memcpy_fromfs(void * to, const void * from, unsigned long n) -{ - switch (n) { - case 0: - return; - case 1: - *(char *)to = __get_user((const char *) from, 1); - return; - case 2: - *(short *)to = __get_user((const short *) from, 2); - return; - case 3: - *(short *) to = __get_user((const short *) from, 2); - *((char *) to + 2) = __get_user(2+(const char *) from, 1); - return; - case 4: - *(int *) to = __get_user((const int *) from, 4); - return; - case 8: - *(int *) to = __get_user((const int *) from, 4); - *(1+(int *) to) = __get_user(1+(const int *) from, 4); - return; - case 12: - *(int *) to = __get_user((const int *) from, 4); - *(1+(int *) to) = __get_user(1+(const int *) from, 4); - *(2+(int *) to) = __get_user(2+(const int *) from, 4); - return; - case 16: - *(int *) to = __get_user((const int *) from, 4); - *(1+(int *) to) = __get_user(1+(const int *) from, 4); - *(2+(int *) to) = __get_user(2+(const int *) from, 4); - *(3+(int *) to) = __get_user(3+(const int *) from, 4); - return; - } -#define COMMON(x) \ -__asm__("cld\n\t" \ - "rep ; fs ; movsl\n\t" \ - x \ - : /* no outputs */ \ - :"c" (n/4),"D" ((long) to),"S" ((long) from) \ - :"cx","di","si","memory") - - switch (n % 4) { - case 0: - COMMON(""); - return; - case 1: - COMMON("fs ; movsb"); - return; - case 2: - COMMON("fs ; movsw"); - return; - case 3: - COMMON("fs ; movsw\n\tfs ; movsb"); - return; - } -#undef COMMON -} - -#define memcpy_fromfs(to, from, n) \ -(__builtin_constant_p(n) ? \ - __constant_memcpy_fromfs((to),(from),(n)) : \ - __generic_memcpy_fromfs((to),(from),(n))) - -#define memcpy_tofs(to, from, n) \ -(__builtin_constant_p(n) ? \ - __constant_memcpy_tofs((to),(from),(n)) : \ - __generic_memcpy_tofs((to),(from),(n))) - -/* - * These are deprecated.. - * - * Use "put_user()" and "get_user()" with the proper pointer types instead. - */ - -#define get_fs_byte(addr) __get_user((const unsigned char *)(addr),1) -#define get_fs_word(addr) __get_user((const unsigned short *)(addr),2) -#define get_fs_long(addr) __get_user((const unsigned int *)(addr),4) - -#define put_fs_byte(x,addr) __put_user((x),(unsigned char *)(addr),1) -#define put_fs_word(x,addr) __put_user((x),(unsigned short *)(addr),2) -#define put_fs_long(x,addr) __put_user((x),(unsigned int *)(addr),4) - -#ifdef WE_REALLY_WANT_TO_USE_A_BROKEN_INTERFACE - -static inline unsigned short get_user_word(const short *addr) -{ - return __get_user(addr, 2); -} - -static inline unsigned char get_user_byte(const char * addr) -{ - return __get_user(addr,1); -} - -static inline unsigned long get_user_long(const int *addr) -{ - return __get_user(addr, 4); -} - -static inline void put_user_byte(char val,char *addr) -{ - __put_user(val, addr, 1); -} - -static inline void put_user_word(short val,short * addr) -{ - __put_user(val, addr, 2); -} - -static inline void put_user_long(unsigned long val,int * addr) -{ - __put_user(val, addr, 4); -} - -#endif - -/* - * Someone who knows GNU asm better than I should double check the following. - * It seems to work, but I don't know if I'm doing something subtly wrong. - * --- TYT, 11/24/91 - * [ nothing wrong here, Linus: I just changed the ax to be any reg ] - */ - -static inline unsigned long get_fs(void) -{ - unsigned long _v; - __asm__("mov %%fs,%w0":"=r" (_v):"0" (0)); - return _v; -} - -static inline unsigned long get_ds(void) -{ - unsigned long _v; - __asm__("mov %%ds,%w0":"=r" (_v):"0" (0)); - return _v; -} - -static inline void set_fs(unsigned long val) -{ - __asm__ __volatile__("mov %w0,%%fs": /* no output */ :"r" (val)); -} - -#endif /* __ASSEMBLY__ */ - -#endif /* _ASM_SEGMENT_H */ diff --git a/i386/i386at/gpl/linux/include/asm/sigcontext.h b/i386/i386at/gpl/linux/include/asm/sigcontext.h deleted file mode 100644 index 5b84694..0000000 --- a/i386/i386at/gpl/linux/include/asm/sigcontext.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _ASMi386_SIGCONTEXT_H -#define _ASMi386_SIGCONTEXT_H - -struct sigcontext_struct { - unsigned short gs, __gsh; - unsigned short fs, __fsh; - unsigned short es, __esh; - unsigned short ds, __dsh; - unsigned long edi; - unsigned long esi; - unsigned long ebp; - unsigned long esp; - unsigned long ebx; - unsigned long edx; - unsigned long ecx; - unsigned long eax; - unsigned long trapno; - unsigned long err; - unsigned long eip; - unsigned short cs, __csh; - unsigned long eflags; - unsigned long esp_at_signal; - unsigned short ss, __ssh; - unsigned long i387; - unsigned long oldmask; - unsigned long cr2; -}; - -#endif diff --git a/i386/i386at/gpl/linux/include/asm/signal.h b/i386/i386at/gpl/linux/include/asm/signal.h deleted file mode 100644 index b37613f..0000000 --- a/i386/i386at/gpl/linux/include/asm/signal.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef _ASMi386_SIGNAL_H -#define _ASMi386_SIGNAL_H - -typedef unsigned long sigset_t; /* at least 32 bits */ - -#define _NSIG 32 -#define NSIG _NSIG - -#define SIGHUP 1 -#define SIGINT 2 -#define SIGQUIT 3 -#define SIGILL 4 -#define SIGTRAP 5 -#define SIGABRT 6 -#define SIGIOT 6 -#define SIGBUS 7 -#define SIGFPE 8 -#define SIGKILL 9 -#define SIGUSR1 10 -#define SIGSEGV 11 -#define SIGUSR2 12 -#define SIGPIPE 13 -#define SIGALRM 14 -#define SIGTERM 15 -#define SIGSTKFLT 16 -#define SIGCHLD 17 -#define SIGCONT 18 -#define SIGSTOP 19 -#define SIGTSTP 20 -#define SIGTTIN 21 -#define SIGTTOU 22 -#define SIGURG 23 -#define SIGXCPU 24 -#define SIGXFSZ 25 -#define SIGVTALRM 26 -#define SIGPROF 27 -#define SIGWINCH 28 -#define SIGIO 29 -#define SIGPOLL SIGIO -/* -#define SIGLOST 29 -*/ -#define SIGPWR 30 -#define SIGUNUSED 31 - -/* - * sa_flags values: SA_STACK is not currently supported, but will allow the - * usage of signal stacks by using the (now obsolete) sa_restorer field in - * the sigaction structure as a stack pointer. This is now possible due to - * the changes in signal handling. LBT 010493. - * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the - * SA_RESTART flag to get restarting signals (which were the default long ago) - */ -#define SA_NOCLDSTOP 1 -#define SA_STACK 0x08000000 -#define SA_RESTART 0x10000000 -#define SA_INTERRUPT 0x20000000 -#define SA_NOMASK 0x40000000 -#define SA_ONESHOT 0x80000000 - -#ifdef __KERNEL__ -/* - * These values of sa_flags are used only by the kernel as part of the - * irq handling routines. - * - * SA_INTERRUPT is also used by the irq handling routines. - */ -#define SA_PROBE SA_ONESHOT -#define SA_SAMPLE_RANDOM SA_RESTART -#endif - - -#define SIG_BLOCK 0 /* for blocking signals */ -#define SIG_UNBLOCK 1 /* for unblocking signals */ -#define SIG_SETMASK 2 /* for setting the signal mask */ - -/* Type of a signal handler. */ -typedef void (*__sighandler_t)(int); - -#define SIG_DFL ((__sighandler_t)0) /* default signal handling */ -#define SIG_IGN ((__sighandler_t)1) /* ignore signal */ -#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ - -struct sigaction { - __sighandler_t sa_handler; - sigset_t sa_mask; - unsigned long sa_flags; - void (*sa_restorer)(void); -}; - -#ifdef __KERNEL__ -#include <asm/sigcontext.h> -#endif - -#endif diff --git a/i386/i386at/gpl/linux/include/asm/socket.h b/i386/i386at/gpl/linux/include/asm/socket.h deleted file mode 100644 index dc92300..0000000 --- a/i386/i386at/gpl/linux/include/asm/socket.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _ASM_SOCKET_H -#define _ASM_SOCKET_H - -/* Socket-level I/O control calls. */ -#define FIOSETOWN 0x8901 -#define SIOCSPGRP 0x8902 -#define FIOGETOWN 0x8903 -#define SIOCGPGRP 0x8904 -#define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906 /* Get stamp */ - -/* For setsockoptions(2) */ -#define SOL_SOCKET 1 - -#define SO_DEBUG 1 -#define SO_REUSEADDR 2 -#define SO_TYPE 3 -#define SO_ERROR 4 -#define SO_DONTROUTE 5 -#define SO_BROADCAST 6 -#define SO_SNDBUF 7 -#define SO_RCVBUF 8 -#define SO_KEEPALIVE 9 -#define SO_OOBINLINE 10 -#define SO_NO_CHECK 11 -#define SO_PRIORITY 12 -#define SO_LINGER 13 -#define SO_BSDCOMPAT 14 -/* To add :#define SO_REUSEPORT 15 */ - -#endif /* _ASM_SOCKET_H */ diff --git a/i386/i386at/gpl/linux/include/asm/stat.h b/i386/i386at/gpl/linux/include/asm/stat.h deleted file mode 100644 index b4c6486..0000000 --- a/i386/i386at/gpl/linux/include/asm/stat.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _I386_STAT_H -#define _I386_STAT_H - -struct old_stat { - unsigned short st_dev; - unsigned short st_ino; - unsigned short st_mode; - unsigned short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned short st_rdev; - unsigned long st_size; - unsigned long st_atime; - unsigned long st_mtime; - unsigned long st_ctime; -}; - -struct new_stat { - unsigned short st_dev; - unsigned short __pad1; - unsigned long st_ino; - unsigned short st_mode; - unsigned short st_nlink; - unsigned short st_uid; - unsigned short st_gid; - unsigned short st_rdev; - unsigned short __pad2; - unsigned long st_size; - unsigned long st_blksize; - unsigned long st_blocks; - unsigned long st_atime; - unsigned long __unused1; - unsigned long st_mtime; - unsigned long __unused2; - unsigned long st_ctime; - unsigned long __unused3; - unsigned long __unused4; - unsigned long __unused5; -}; - -#endif diff --git a/i386/i386at/gpl/linux/include/asm/statfs.h b/i386/i386at/gpl/linux/include/asm/statfs.h deleted file mode 100644 index 6efb741..0000000 --- a/i386/i386at/gpl/linux/include/asm/statfs.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _I386_STATFS_H -#define _I386_STATFS_H - -typedef struct { - long val[2]; -} fsid_t; - -struct statfs { - long f_type; - long f_bsize; - long f_blocks; - long f_bfree; - long f_bavail; - long f_files; - long f_ffree; - fsid_t f_fsid; - long f_namelen; - long f_spare[6]; -}; - -#endif diff --git a/i386/i386at/gpl/linux/include/asm/string.h b/i386/i386at/gpl/linux/include/asm/string.h deleted file mode 100644 index d93a2a7..0000000 --- a/i386/i386at/gpl/linux/include/asm/string.h +++ /dev/null @@ -1,593 +0,0 @@ -#ifndef _I386_STRING_H_ -#define _I386_STRING_H_ - -/* - * This string-include defines all string functions as inline - * functions. Use gcc. It also assumes ds=es=data space, this should be - * normal. Most of the string-functions are rather heavily hand-optimized, - * see especially strtok,strstr,str[c]spn. They should work, but are not - * very easy to understand. Everything is done entirely within the register - * set, making the functions fast and clean. String instructions have been - * used through-out, making for "slightly" unclear code :-) - * - * Copyright (C) 1991, 1992 Linus Torvalds - */ - -#define __HAVE_ARCH_STRCPY -extern inline char * strcpy(char * dest,const char *src) -{ -__asm__ __volatile__( - "cld\n" - "1:\tlodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b" - : /* no output */ - :"S" (src),"D" (dest):"si","di","ax","memory"); -return dest; -} - -#define __HAVE_ARCH_STRNCPY -extern inline char * strncpy(char * dest,const char *src,size_t count) -{ -__asm__ __volatile__( - "cld\n" - "1:\tdecl %2\n\t" - "js 2f\n\t" - "lodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n\t" - "rep\n\t" - "stosb\n" - "2:" - : /* no output */ - :"S" (src),"D" (dest),"c" (count):"si","di","ax","cx","memory"); -return dest; -} - -#define __HAVE_ARCH_STRCAT -extern inline char * strcat(char * dest,const char * src) -{ -__asm__ __volatile__( - "cld\n\t" - "repne\n\t" - "scasb\n\t" - "decl %1\n" - "1:\tlodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b" - : /* no output */ - :"S" (src),"D" (dest),"a" (0),"c" (0xffffffff):"si","di","ax","cx"); -return dest; -} - -#define __HAVE_ARCH_STRNCAT -extern inline char * strncat(char * dest,const char * src,size_t count) -{ -__asm__ __volatile__( - "cld\n\t" - "repne\n\t" - "scasb\n\t" - "decl %1\n\t" - "movl %4,%3\n" - "1:\tdecl %3\n\t" - "js 2f\n\t" - "lodsb\n\t" - "stosb\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n" - "2:\txorl %2,%2\n\t" - "stosb" - : /* no output */ - :"S" (src),"D" (dest),"a" (0),"c" (0xffffffff),"g" (count) - :"si","di","ax","cx","memory"); -return dest; -} - -#define __HAVE_ARCH_STRCMP -extern inline int strcmp(const char * cs,const char * ct) -{ -register int __res; -__asm__ __volatile__( - "cld\n" - "1:\tlodsb\n\t" - "scasb\n\t" - "jne 2f\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n\t" - "xorl %%eax,%%eax\n\t" - "jmp 3f\n" - "2:\tsbbl %%eax,%%eax\n\t" - "orb $1,%%eax\n" - "3:" - :"=a" (__res):"S" (cs),"D" (ct):"si","di"); -return __res; -} - -#define __HAVE_ARCH_STRNCMP -extern inline int strncmp(const char * cs,const char * ct,size_t count) -{ -register int __res; -__asm__ __volatile__( - "cld\n" - "1:\tdecl %3\n\t" - "js 2f\n\t" - "lodsb\n\t" - "scasb\n\t" - "jne 3f\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n" - "2:\txorl %%eax,%%eax\n\t" - "jmp 4f\n" - "3:\tsbbl %%eax,%%eax\n\t" - "orb $1,%%al\n" - "4:" - :"=a" (__res):"S" (cs),"D" (ct),"c" (count):"si","di","cx"); -return __res; -} - -#define __HAVE_ARCH_STRCHR -extern inline char * strchr(const char * s, int c) -{ -register char * __res; -__asm__ __volatile__( - "cld\n\t" - "movb %%al,%%ah\n" - "1:\tlodsb\n\t" - "cmpb %%ah,%%al\n\t" - "je 2f\n\t" - "testb %%al,%%al\n\t" - "jne 1b\n\t" - "movl $1,%1\n" - "2:\tmovl %1,%0\n\t" - "decl %0" - :"=a" (__res):"S" (s),"0" (c):"si"); -return __res; -} - -#define __HAVE_ARCH_STRRCHR -extern inline char * strrchr(const char * s, int c) -{ -register char * __res; -__asm__ __volatile__( - "cld\n\t" - "movb %%al,%%ah\n" - "1:\tlodsb\n\t" - "cmpb %%ah,%%al\n\t" - "jne 2f\n\t" - "leal -1(%%esi),%0\n" - "2:\ttestb %%al,%%al\n\t" - "jne 1b" - :"=d" (__res):"0" (0),"S" (s),"a" (c):"ax","si"); -return __res; -} - -#define __HAVE_ARCH_STRSPN -extern inline size_t strspn(const char * cs, const char * ct) -{ -register char * __res; -__asm__ __volatile__( - "cld\n\t" - "movl %4,%%edi\n\t" - "repne\n\t" - "scasb\n\t" - "notl %%ecx\n\t" - "decl %%ecx\n\t" - "movl %%ecx,%%edx\n" - "1:\tlodsb\n\t" - "testb %%al,%%al\n\t" - "je 2f\n\t" - "movl %4,%%edi\n\t" - "movl %%edx,%%ecx\n\t" - "repne\n\t" - "scasb\n\t" - "je 1b\n" - "2:\tdecl %0" - :"=S" (__res):"a" (0),"c" (0xffffffff),"0" (cs),"g" (ct) - :"ax","cx","dx","di"); -return __res-cs; -} - -#define __HAVE_ARCH_STRCSPN -extern inline size_t strcspn(const char * cs, const char * ct) -{ -register char * __res; -__asm__ __volatile__( - "cld\n\t" - "movl %4,%%edi\n\t" - "repne\n\t" - "scasb\n\t" - "notl %%ecx\n\t" - "decl %%ecx\n\t" - "movl %%ecx,%%edx\n" - "1:\tlodsb\n\t" - "testb %%al,%%al\n\t" - "je 2f\n\t" - "movl %4,%%edi\n\t" - "movl %%edx,%%ecx\n\t" - "repne\n\t" - "scasb\n\t" - "jne 1b\n" - "2:\tdecl %0" - :"=S" (__res):"a" (0),"c" (0xffffffff),"0" (cs),"g" (ct) - :"ax","cx","dx","di"); -return __res-cs; -} - -#define __HAVE_ARCH_STRPBRK -extern inline char * strpbrk(const char * cs,const char * ct) -{ -register char * __res; -__asm__ __volatile__( - "cld\n\t" - "movl %4,%%edi\n\t" - "repne\n\t" - "scasb\n\t" - "notl %%ecx\n\t" - "decl %%ecx\n\t" - "movl %%ecx,%%edx\n" - "1:\tlodsb\n\t" - "testb %%al,%%al\n\t" - "je 2f\n\t" - "movl %4,%%edi\n\t" - "movl %%edx,%%ecx\n\t" - "repne\n\t" - "scasb\n\t" - "jne 1b\n\t" - "decl %0\n\t" - "jmp 3f\n" - "2:\txorl %0,%0\n" - "3:" - :"=S" (__res):"a" (0),"c" (0xffffffff),"0" (cs),"g" (ct) - :"ax","cx","dx","di"); -return __res; -} - -#define __HAVE_ARCH_STRSTR -extern inline char * strstr(const char * cs,const char * ct) -{ -register char * __res; -__asm__ __volatile__( - "cld\n\t" \ - "movl %4,%%edi\n\t" - "repne\n\t" - "scasb\n\t" - "notl %%ecx\n\t" - "decl %%ecx\n\t" /* NOTE! This also sets Z if searchstring='' */ - "movl %%ecx,%%edx\n" - "1:\tmovl %4,%%edi\n\t" - "movl %%esi,%%eax\n\t" - "movl %%edx,%%ecx\n\t" - "repe\n\t" - "cmpsb\n\t" - "je 2f\n\t" /* also works for empty string, see above */ - "xchgl %%eax,%%esi\n\t" - "incl %%esi\n\t" - "cmpb $0,-1(%%eax)\n\t" - "jne 1b\n\t" - "xorl %%eax,%%eax\n\t" - "2:" - :"=a" (__res):"0" (0),"c" (0xffffffff),"S" (cs),"g" (ct) - :"cx","dx","di","si"); -return __res; -} - -#define __HAVE_ARCH_STRLEN -extern inline size_t strlen(const char * s) -{ -register int __res; -__asm__ __volatile__( - "cld\n\t" - "repne\n\t" - "scasb\n\t" - "notl %0\n\t" - "decl %0" - :"=c" (__res):"D" (s),"a" (0),"0" (0xffffffff):"di"); -return __res; -} - -#define __HAVE_ARCH_STRTOK -extern inline char * strtok(char * s,const char * ct) -{ -register char * __res; -__asm__ __volatile__( - "testl %1,%1\n\t" - "jne 1f\n\t" - "testl %0,%0\n\t" - "je 8f\n\t" - "movl %0,%1\n" - "1:\txorl %0,%0\n\t" - "movl $-1,%%ecx\n\t" - "xorl %%eax,%%eax\n\t" - "cld\n\t" - "movl %4,%%edi\n\t" - "repne\n\t" - "scasb\n\t" - "notl %%ecx\n\t" - "decl %%ecx\n\t" - "je 7f\n\t" /* empty delimiter-string */ - "movl %%ecx,%%edx\n" - "2:\tlodsb\n\t" - "testb %%al,%%al\n\t" - "je 7f\n\t" - "movl %4,%%edi\n\t" - "movl %%edx,%%ecx\n\t" - "repne\n\t" - "scasb\n\t" - "je 2b\n\t" - "decl %1\n\t" - "cmpb $0,(%1)\n\t" - "je 7f\n\t" - "movl %1,%0\n" - "3:\tlodsb\n\t" - "testb %%al,%%al\n\t" - "je 5f\n\t" - "movl %4,%%edi\n\t" - "movl %%edx,%%ecx\n\t" - "repne\n\t" - "scasb\n\t" - "jne 3b\n\t" - "decl %1\n\t" - "cmpb $0,(%1)\n\t" - "je 5f\n\t" - "movb $0,(%1)\n\t" - "incl %1\n\t" - "jmp 6f\n" - "5:\txorl %1,%1\n" - "6:\tcmpb $0,(%0)\n\t" - "jne 7f\n\t" - "xorl %0,%0\n" - "7:\ttestl %0,%0\n\t" - "jne 8f\n\t" - "movl %0,%1\n" - "8:" - :"=b" (__res),"=S" (___strtok) - :"0" (___strtok),"1" (s),"g" (ct) - :"ax","cx","dx","di","memory"); -return __res; -} - -extern inline void * __memcpy(void * to, const void * from, size_t n) -{ -__asm__ __volatile__( - "cld\n\t" - "rep ; movsl\n\t" - "testb $2,%b1\n\t" - "je 1f\n\t" - "movsw\n" - "1:\ttestb $1,%b1\n\t" - "je 2f\n\t" - "movsb\n" - "2:" - : /* no output */ - :"c" (n/4), "q" (n),"D" ((long) to),"S" ((long) from) - : "cx","di","si","memory"); -return (to); -} - -/* - * This looks horribly ugly, but the compiler can optimize it totally, - * as the count is constant. - */ -extern inline void * __constant_memcpy(void * to, const void * from, size_t n) -{ - switch (n) { - case 0: - return to; - case 1: - *(unsigned char *)to = *(const unsigned char *)from; - return to; - case 2: - *(unsigned short *)to = *(const unsigned short *)from; - return to; - case 3: - *(unsigned short *)to = *(const unsigned short *)from; - *(2+(unsigned char *)to) = *(2+(const unsigned char *)from); - return to; - case 4: - *(unsigned long *)to = *(const unsigned long *)from; - return to; - } -#define COMMON(x) \ -__asm__("cld\n\t" \ - "rep ; movsl" \ - x \ - : /* no outputs */ \ - : "c" (n/4),"D" ((long) to),"S" ((long) from) \ - : "cx","di","si","memory"); - - switch (n % 4) { - case 0: COMMON(""); return to; - case 1: COMMON("\n\tmovsb"); return to; - case 2: COMMON("\n\tmovsw"); return to; - case 3: COMMON("\n\tmovsw\n\tmovsb"); return to; - } -#undef COMMON -} - -#define __HAVE_ARCH_MEMCPY -#define memcpy(t, f, n) \ -(__builtin_constant_p(n) ? \ - __constant_memcpy((t),(f),(n)) : \ - __memcpy((t),(f),(n))) - -#define __HAVE_ARCH_MEMMOVE -extern inline void * memmove(void * dest,const void * src, size_t n) -{ -if (dest<src) -__asm__ __volatile__( - "cld\n\t" - "rep\n\t" - "movsb" - : /* no output */ - :"c" (n),"S" (src),"D" (dest) - :"cx","si","di"); -else -__asm__ __volatile__( - "std\n\t" - "rep\n\t" - "movsb\n\t" - "cld" - : /* no output */ - :"c" (n), - "S" (n-1+(const char *)src), - "D" (n-1+(char *)dest) - :"cx","si","di","memory"); -return dest; -} - -#define memcmp __builtin_memcmp - -#define __HAVE_ARCH_MEMCHR -extern inline void * memchr(const void * cs,int c,size_t count) -{ -register void * __res; -if (!count) - return NULL; -__asm__ __volatile__( - "cld\n\t" - "repne\n\t" - "scasb\n\t" - "je 1f\n\t" - "movl $1,%0\n" - "1:\tdecl %0" - :"=D" (__res):"a" (c),"D" (cs),"c" (count) - :"cx"); -return __res; -} - -extern inline void * __memset_generic(void * s, char c,size_t count) -{ -__asm__ __volatile__( - "cld\n\t" - "rep\n\t" - "stosb" - : /* no output */ - :"a" (c),"D" (s),"c" (count) - :"cx","di","memory"); -return s; -} - -/* we might want to write optimized versions of these later */ -#define __constant_count_memset(s,c,count) __memset_generic((s),(c),(count)) - -/* - * memset(x,0,y) is a reasonably common thing to do, so we want to fill - * things 32 bits at a time even when we don't know the size of the - * area at compile-time.. - */ -extern inline void * __constant_c_memset(void * s, unsigned long c, size_t count) -{ -__asm__ __volatile__( - "cld\n\t" - "rep ; stosl\n\t" - "testb $2,%b1\n\t" - "je 1f\n\t" - "stosw\n" - "1:\ttestb $1,%b1\n\t" - "je 2f\n\t" - "stosb\n" - "2:" - : /* no output */ - :"a" (c), "q" (count), "c" (count/4), "D" ((long) s) - :"cx","di","memory"); -return (s); -} - -/* Added by Gertjan van Wingerde to make minix and sysv module work */ -#define __HAVE_ARCH_STRNLEN -extern inline size_t strnlen(const char * s, size_t count) -{ -register int __res; -__asm__ __volatile__( - "movl %1,%0\n\t" - "jmp 2f\n" - "1:\tcmpb $0,(%0)\n\t" - "je 3f\n\t" - "incl %0\n" - "2:\tdecl %2\n\t" - "cmpl $-1,%2\n\t" - "jne 1b\n" - "3:\tsubl %1,%0" - :"=a" (__res):"c" (s),"d" (count)); -return __res; -} -/* end of additional stuff */ - -/* - * This looks horribly ugly, but the compiler can optimize it totally, - * as we by now know that both pattern and count is constant.. - */ -extern inline void * __constant_c_and_count_memset(void * s, unsigned long pattern, size_t count) -{ - switch (count) { - case 0: - return s; - case 1: - *(unsigned char *)s = pattern; - return s; - case 2: - *(unsigned short *)s = pattern; - return s; - case 3: - *(unsigned short *)s = pattern; - *(2+(unsigned char *)s) = pattern; - return s; - case 4: - *(unsigned long *)s = pattern; - return s; - } -#define COMMON(x) \ -__asm__("cld\n\t" \ - "rep ; stosl" \ - x \ - : /* no outputs */ \ - : "a" (pattern),"c" (count/4),"D" ((long) s) \ - : "cx","di","memory") - - switch (count % 4) { - case 0: COMMON(""); return s; - case 1: COMMON("\n\tstosb"); return s; - case 2: COMMON("\n\tstosw"); return s; - case 3: COMMON("\n\tstosw\n\tstosb"); return s; - } -#undef COMMON -} - -#define __constant_c_x_memset(s, c, count) \ -(__builtin_constant_p(count) ? \ - __constant_c_and_count_memset((s),(c),(count)) : \ - __constant_c_memset((s),(c),(count))) - -#define __memset(s, c, count) \ -(__builtin_constant_p(count) ? \ - __constant_count_memset((s),(c),(count)) : \ - __memset_generic((s),(c),(count))) - -#define __HAVE_ARCH_MEMSET -#define memset(s, c, count) \ -(__builtin_constant_p(c) ? \ - __constant_c_x_memset((s),(0x01010101UL*(unsigned char)c),(count)) : \ - __memset((s),(c),(count))) - -/* - * find the first occurrence of byte 'c', or 1 past the area if none - */ -#define __HAVE_ARCH_MEMSCAN -extern inline void * memscan(void * addr, int c, size_t size) -{ - if (!size) - return addr; - __asm__("cld - repnz; scasb - jnz 1f - dec %%edi -1: " - : "=D" (addr), "=c" (size) - : "0" (addr), "1" (size), "a" (c)); - return addr; -} - -#endif diff --git a/i386/i386at/gpl/linux/include/asm/system.h b/i386/i386at/gpl/linux/include/asm/system.h deleted file mode 100644 index 9c6f862..0000000 --- a/i386/i386at/gpl/linux/include/asm/system.h +++ /dev/null @@ -1,301 +0,0 @@ -#ifndef __ASM_SYSTEM_H -#define __ASM_SYSTEM_H - -#include <asm/segment.h> - -/* - * Entry into gdt where to find first TSS. GDT layout: - * 0 - nul - * 1 - kernel code segment - * 2 - kernel data segment - * 3 - user code segment - * 4 - user data segment - * ... - * 8 - TSS #0 - * 9 - LDT #0 - * 10 - TSS #1 - * 11 - LDT #1 - */ -#define FIRST_TSS_ENTRY 8 -#define FIRST_LDT_ENTRY (FIRST_TSS_ENTRY+1) -#define _TSS(n) ((((unsigned long) n)<<4)+(FIRST_TSS_ENTRY<<3)) -#define _LDT(n) ((((unsigned long) n)<<4)+(FIRST_LDT_ENTRY<<3)) -#define load_TR(n) __asm__("ltr %%ax": /* no output */ :"a" (_TSS(n))) -#define load_ldt(n) __asm__("lldt %%ax": /* no output */ :"a" (_LDT(n))) -#define store_TR(n) \ -__asm__("str %%ax\n\t" \ - "subl %2,%%eax\n\t" \ - "shrl $4,%%eax" \ - :"=a" (n) \ - :"0" (0),"i" (FIRST_TSS_ENTRY<<3)) - -/* This special macro can be used to load a debugging register */ - -#define loaddebug(register) \ - __asm__("movl %0,%%edx\n\t" \ - "movl %%edx,%%db" #register "\n\t" \ - : /* no output */ \ - :"m" (current->debugreg[register]) \ - :"dx"); - - -/* - * switch_to(n) should switch tasks to task nr n, first - * checking that n isn't the current task, in which case it does nothing. - * This also clears the TS-flag if the task we switched to has used - * the math co-processor latest. - * - * It also reloads the debug regs if necessary.. - */ - - -#ifdef __SMP__ - /* - * Keep the lock depth straight. If we switch on an interrupt from - * kernel->user task we need to lose a depth, and if we switch the - * other way we need to gain a depth. Same layer switches come out - * the same. - * - * We spot a switch in user mode because the kernel counter is the - * same as the interrupt counter depth. (We never switch during the - * message/invalidate IPI). - * - * We fsave/fwait so that an exception goes off at the right time - * (as a call from the fsave or fwait in effect) rather than to - * the wrong process. - */ - -#define switch_to(tsk) do { \ - cli();\ - if(current->flags&PF_USEDFPU) \ - { \ - __asm__ __volatile__("fnsave %0":"=m" (current->tss.i387.hard)); \ - __asm__ __volatile__("fwait"); \ - current->flags&=~PF_USEDFPU; \ - } \ - current->lock_depth=syscall_count; \ - kernel_counter+=next->lock_depth-current->lock_depth; \ - syscall_count=next->lock_depth; \ -__asm__("pushl %%edx\n\t" \ - "movl "SYMBOL_NAME_STR(apic_reg)",%%edx\n\t" \ - "movl 0x20(%%edx), %%edx\n\t" \ - "shrl $22,%%edx\n\t" \ - "and $0x3C,%%edx\n\t" \ - "xchgl %%ecx,"SYMBOL_NAME_STR(current_set)"(,%%edx)\n\t" \ - "popl %%edx\n\t" \ - "ljmp %0\n\t" \ - "sti\n\t" \ - : /* no output */ \ - :"m" (*(((char *)&tsk->tss.tr)-4)), \ - "c" (tsk) \ - :"cx"); \ - /* Now maybe reload the debug registers */ \ - if(current->debugreg[7]){ \ - loaddebug(0); \ - loaddebug(1); \ - loaddebug(2); \ - loaddebug(3); \ - loaddebug(6); \ - } \ -} while (0) - -#else -#define switch_to(tsk) do { \ -__asm__("cli\n\t" \ - "xchgl %%ecx,"SYMBOL_NAME_STR(current_set)"\n\t" \ - "ljmp %0\n\t" \ - "sti\n\t" \ - "cmpl %%ecx,"SYMBOL_NAME_STR(last_task_used_math)"\n\t" \ - "jne 1f\n\t" \ - "clts\n" \ - "1:" \ - : /* no output */ \ - :"m" (*(((char *)&tsk->tss.tr)-4)), \ - "c" (tsk) \ - :"cx"); \ - /* Now maybe reload the debug registers */ \ - if(current->debugreg[7]){ \ - loaddebug(0); \ - loaddebug(1); \ - loaddebug(2); \ - loaddebug(3); \ - loaddebug(6); \ - } \ -} while (0) -#endif - -#define _set_base(addr,base) \ -__asm__("movw %%dx,%0\n\t" \ - "rorl $16,%%edx\n\t" \ - "movb %%dl,%1\n\t" \ - "movb %%dh,%2" \ - : /* no output */ \ - :"m" (*((addr)+2)), \ - "m" (*((addr)+4)), \ - "m" (*((addr)+7)), \ - "d" (base) \ - :"dx") - -#define _set_limit(addr,limit) \ -__asm__("movw %%dx,%0\n\t" \ - "rorl $16,%%edx\n\t" \ - "movb %1,%%dh\n\t" \ - "andb $0xf0,%%dh\n\t" \ - "orb %%dh,%%dl\n\t" \ - "movb %%dl,%1" \ - : /* no output */ \ - :"m" (*(addr)), \ - "m" (*((addr)+6)), \ - "d" (limit) \ - :"dx") - -#define set_base(ldt,base) _set_base( ((char *)&(ldt)) , base ) -#define set_limit(ldt,limit) _set_limit( ((char *)&(ldt)) , (limit-1)>>12 ) - -static inline unsigned long _get_base(char * addr) -{ - unsigned long __base; - __asm__("movb %3,%%dh\n\t" - "movb %2,%%dl\n\t" - "shll $16,%%edx\n\t" - "movw %1,%%dx" - :"=&d" (__base) - :"m" (*((addr)+2)), - "m" (*((addr)+4)), - "m" (*((addr)+7))); - return __base; -} - -#define get_base(ldt) _get_base( ((char *)&(ldt)) ) - -static inline unsigned long get_limit(unsigned long segment) -{ - unsigned long __limit; - __asm__("lsll %1,%0" - :"=r" (__limit):"r" (segment)); - return __limit+1; -} - -#define nop() __asm__ __volatile__ ("nop") - -/* - * Clear and set 'TS' bit respectively - */ -#define clts() __asm__ __volatile__ ("clts") -#define stts() \ -__asm__ __volatile__ ( \ - "movl %%cr0,%%eax\n\t" \ - "orl $8,%%eax\n\t" \ - "movl %%eax,%%cr0" \ - : /* no outputs */ \ - : /* no inputs */ \ - :"ax") - - -#define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) -#define tas(ptr) (xchg((ptr),1)) - -struct __xchg_dummy { unsigned long a[100]; }; -#define __xg(x) ((volatile struct __xchg_dummy *)(x)) - -static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size) -{ - switch (size) { - case 1: - __asm__("xchgb %b0,%1" - :"=q" (x), "=m" (*__xg(ptr)) - :"0" (x), "m" (*__xg(ptr))); - break; - case 2: - __asm__("xchgw %w0,%1" - :"=r" (x), "=m" (*__xg(ptr)) - :"0" (x), "m" (*__xg(ptr))); - break; - case 4: - __asm__("xchgl %0,%1" - :"=r" (x), "=m" (*__xg(ptr)) - :"0" (x), "m" (*__xg(ptr))); - break; - } - return x; -} - -#define mb() __asm__ __volatile__ ("" : : :"memory") -#define sti() __asm__ __volatile__ ("sti": : :"memory") -#define cli() __asm__ __volatile__ ("cli": : :"memory") - -#define save_flags(x) \ -__asm__ __volatile__("pushfl ; popl %0":"=r" (x): /* no input */ :"memory") - -#define restore_flags(x) \ -__asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"r" (x):"memory") - -#define iret() __asm__ __volatile__ ("iret": : :"memory") - -#define _set_gate(gate_addr,type,dpl,addr) \ -__asm__ __volatile__ ("movw %%dx,%%ax\n\t" \ - "movw %2,%%dx\n\t" \ - "movl %%eax,%0\n\t" \ - "movl %%edx,%1" \ - :"=m" (*((long *) (gate_addr))), \ - "=m" (*(1+(long *) (gate_addr))) \ - :"i" ((short) (0x8000+(dpl<<13)+(type<<8))), \ - "d" ((char *) (addr)),"a" (KERNEL_CS << 16) \ - :"ax","dx") - -#define set_intr_gate(n,addr) \ - _set_gate(&idt[n],14,0,addr) - -#define set_trap_gate(n,addr) \ - _set_gate(&idt[n],15,0,addr) - -#define set_system_gate(n,addr) \ - _set_gate(&idt[n],15,3,addr) - -#define set_call_gate(a,addr) \ - _set_gate(a,12,3,addr) - -#define _set_seg_desc(gate_addr,type,dpl,base,limit) {\ - *((gate_addr)+1) = ((base) & 0xff000000) | \ - (((base) & 0x00ff0000)>>16) | \ - ((limit) & 0xf0000) | \ - ((dpl)<<13) | \ - (0x00408000) | \ - ((type)<<8); \ - *(gate_addr) = (((base) & 0x0000ffff)<<16) | \ - ((limit) & 0x0ffff); } - -#define _set_tssldt_desc(n,addr,limit,type) \ -__asm__ __volatile__ ("movw $" #limit ",%1\n\t" \ - "movw %%ax,%2\n\t" \ - "rorl $16,%%eax\n\t" \ - "movb %%al,%3\n\t" \ - "movb $" type ",%4\n\t" \ - "movb $0x00,%5\n\t" \ - "movb %%ah,%6\n\t" \ - "rorl $16,%%eax" \ - : /* no output */ \ - :"a" (addr+0xc0000000), "m" (*(n)), "m" (*(n+2)), "m" (*(n+4)), \ - "m" (*(n+5)), "m" (*(n+6)), "m" (*(n+7)) \ - ) - -#define set_tss_desc(n,addr) _set_tssldt_desc(((char *) (n)),((int)(addr)),235,"0x89") -#define set_ldt_desc(n,addr,size) \ - _set_tssldt_desc(((char *) (n)),((int)(addr)),((size << 3) - 1),"0x82") - -/* - * This is the ldt that every process will get unless we need - * something other than this. - */ -extern struct desc_struct default_ldt; - -/* - * disable hlt during certain critical i/o operations - */ -#ifndef MACH -#define HAVE_DISABLE_HLT -#endif -void disable_hlt(void); -void enable_hlt(void); - -#endif diff --git a/i386/i386at/gpl/linux/include/asm/termios.h b/i386/i386at/gpl/linux/include/asm/termios.h deleted file mode 100644 index e9cbf14..0000000 --- a/i386/i386at/gpl/linux/include/asm/termios.h +++ /dev/null @@ -1,304 +0,0 @@ -#ifndef _I386_TERMIOS_H -#define _I386_TERMIOS_H - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402 -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ -#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458 /* For debugging only */ -#define TIOCSERGETLSR 0x5459 /* Get line status register */ -#define TIOCSERGETMULTI 0x545A /* Get multiport config */ -#define TIOCSERSETMULTI 0x545B /* Set multiport config */ - -#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ - -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 - -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define NCC 8 -struct termio { - unsigned short c_iflag; /* input mode flags */ - unsigned short c_oflag; /* output mode flags */ - unsigned short c_cflag; /* control mode flags */ - unsigned short c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - -#define NCCS 19 -struct termios { - tcflag_t c_iflag; /* input mode flags */ - tcflag_t c_oflag; /* output mode flags */ - tcflag_t c_cflag; /* control mode flags */ - tcflag_t c_lflag; /* local mode flags */ - cc_t c_line; /* line discipline */ - cc_t c_cc[NCCS]; /* control characters */ -}; - -/* c_cc characters */ -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VTIME 5 -#define VMIN 6 -#define VSWTC 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VEOL 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOL2 16 - -#ifdef __KERNEL__ -/* intr=^C quit=^| erase=del kill=^U - eof=^D vtime=\0 vmin=\1 sxtc=\0 - start=^Q stop=^S susp=^Z eol=\0 - reprint=^R discard=^U werase=^W lnext=^V - eol2=\0 -*/ -#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" -#endif - -/* c_iflag bits */ -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IUCLC 0001000 -#define IXON 0002000 -#define IXANY 0004000 -#define IXOFF 0010000 -#define IMAXBEL 0020000 - -/* c_oflag bits */ -#define OPOST 0000001 -#define OLCUC 0000002 -#define ONLCR 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#define NLDLY 0000400 -#define NL0 0000000 -#define NL1 0000400 -#define CRDLY 0003000 -#define CR0 0000000 -#define CR1 0001000 -#define CR2 0002000 -#define CR3 0003000 -#define TABDLY 0014000 -#define TAB0 0000000 -#define TAB1 0004000 -#define TAB2 0010000 -#define TAB3 0014000 -#define XTABS 0014000 -#define BSDLY 0020000 -#define BS0 0000000 -#define BS1 0020000 -#define VTDLY 0040000 -#define VT0 0000000 -#define VT1 0040000 -#define FFDLY 0100000 -#define FF0 0000000 -#define FF1 0100000 - -/* c_cflag bit meaning */ -#define CBAUD 0010017 -#define B0 0000000 /* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#define EXTA B19200 -#define EXTB B38400 -#define CSIZE 0000060 -#define CS5 0000000 -#define CS6 0000020 -#define CS7 0000040 -#define CS8 0000060 -#define CSTOPB 0000100 -#define CREAD 0000200 -#define PARENB 0000400 -#define PARODD 0001000 -#define HUPCL 0002000 -#define CLOCAL 0004000 -#define CBAUDEX 0010000 -#define B57600 0010001 -#define B115200 0010002 -#define B230400 0010003 -#define CIBAUD 002003600000 /* input baud rate (not used) */ -#define CRTSCTS 020000000000 /* flow control */ - -/* c_lflag bits */ -#define ISIG 0000001 -#define ICANON 0000002 -#define XCASE 0000004 -#define ECHO 0000010 -#define ECHOE 0000020 -#define ECHOK 0000040 -#define ECHONL 0000100 -#define NOFLSH 0000200 -#define TOSTOP 0000400 -#define ECHOCTL 0001000 -#define ECHOPRT 0002000 -#define ECHOKE 0004000 -#define FLUSHO 0010000 -#define PENDIN 0040000 -#define IEXTEN 0100000 - -/* modem lines */ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG - -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ -#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ - - -/* tcflow() and TCXONC use these */ -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* tcflush() and TCFLSH use these */ -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -/* tcsetattr uses these */ -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 - -#ifdef __KERNEL__ - -#include <linux/string.h> - -/* - * Translate a "termio" structure into a "termios". Ugh. - */ -extern inline void trans_from_termio(struct termio * termio, - struct termios * termios) -{ -#define SET_LOW_BITS(x,y) ((x) = (0xffff0000 & (x)) | (y)) - SET_LOW_BITS(termios->c_iflag, termio->c_iflag); - SET_LOW_BITS(termios->c_oflag, termio->c_oflag); - SET_LOW_BITS(termios->c_cflag, termio->c_cflag); - SET_LOW_BITS(termios->c_lflag, termio->c_lflag); -#undef SET_LOW_BITS - memcpy(termios->c_cc, termio->c_cc, NCC); -} - -/* - * Translate a "termios" structure into a "termio". Ugh. - */ -extern inline void trans_to_termio(struct termios * termios, - struct termio * termio) -{ - termio->c_iflag = termios->c_iflag; - termio->c_oflag = termios->c_oflag; - termio->c_cflag = termios->c_cflag; - termio->c_lflag = termios->c_lflag; - termio->c_line = termios->c_line; - memcpy(termio->c_cc, termios->c_cc, NCC); -} - -#endif /* __KERNEL__ */ - -#endif /* _I386_TERMIOS_H */ diff --git a/i386/i386at/gpl/linux/include/asm/types.h b/i386/i386at/gpl/linux/include/asm/types.h deleted file mode 100644 index 1b82bef..0000000 --- a/i386/i386at/gpl/linux/include/asm/types.h +++ /dev/null @@ -1,109 +0,0 @@ -#ifndef _I386_TYPES_H -#define _I386_TYPES_H - -#ifndef MACH_INCLUDE -#ifndef _SIZE_T -#define _SIZE_T -typedef unsigned int size_t; -#endif - -#ifndef _SSIZE_T -#define _SSIZE_T -typedef int ssize_t; -#endif - -#ifndef _PTRDIFF_T -#define _PTRDIFF_T -typedef int ptrdiff_t; -#endif - -#ifndef _TIME_T -#define _TIME_T -typedef long time_t; -#endif - -#ifndef _CLOCK_T -#define _CLOCK_T -typedef long clock_t; -#endif -#endif /* ! MACH_INCLUDE */ - -typedef int pid_t; -#ifndef MACH_INCLUDE -typedef unsigned short uid_t; -typedef unsigned short gid_t; -typedef unsigned short dev_t; -typedef unsigned long ino_t; -typedef unsigned short mode_t; -#endif -typedef unsigned short umode_t; -#ifndef MACH_INCLUDE -typedef unsigned short nlink_t; -typedef int daddr_t; -typedef long off_t; -#endif - -/* - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the - * header files exported to user space - */ - -typedef __signed__ char __s8; -typedef unsigned char __u8; - -typedef __signed__ short __s16; -typedef unsigned short __u16; - -typedef __signed__ int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -typedef __signed__ long long __s64; -typedef unsigned long long __u64; -#endif - -/* - * These aren't exported outside the kernel to avoid name space clashes - */ -#ifdef __KERNEL__ - -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; - -#endif /* __KERNEL__ */ - -#undef __FD_SET -#define __FD_SET(fd,fdsetp) \ - __asm__ __volatile__("btsl %1,%0": \ - "=m" (*(fd_set *) (fdsetp)):"r" ((int) (fd))) - -#undef __FD_CLR -#define __FD_CLR(fd,fdsetp) \ - __asm__ __volatile__("btrl %1,%0": \ - "=m" (*(fd_set *) (fdsetp)):"r" ((int) (fd))) - -#undef __FD_ISSET -#define __FD_ISSET(fd,fdsetp) (__extension__ ({ \ - unsigned char __result; \ - __asm__ __volatile__("btl %1,%2 ; setb %0" \ - :"=q" (__result) :"r" ((int) (fd)), \ - "m" (*(fd_set *) (fdsetp))); \ - __result; })) - -#undef __FD_ZERO -#define __FD_ZERO(fdsetp) \ - __asm__ __volatile__("cld ; rep ; stosl" \ - :"=m" (*(fd_set *) (fdsetp)) \ - :"a" (0), "c" (__FDSET_INTS), \ - "D" ((fd_set *) (fdsetp)) :"cx","di") - -#endif diff --git a/i386/i386at/gpl/linux/include/asm/unistd.h b/i386/i386at/gpl/linux/include/asm/unistd.h deleted file mode 100644 index 1837f21..0000000 --- a/i386/i386at/gpl/linux/include/asm/unistd.h +++ /dev/null @@ -1,322 +0,0 @@ -#ifndef _ASM_I386_UNISTD_H_ -#define _ASM_I386_UNISTD_H_ - -/* - * This file contains the system call numbers. - */ - -#define __NR_setup 0 /* used only by init, to get system going */ -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_chown 16 -#define __NR_break 17 -#define __NR_oldstat 18 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_oldfstat 28 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_stty 31 -#define __NR_gtty 32 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_ftime 35 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_prof 44 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_signal 48 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_phys 52 -#define __NR_lock 53 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_mpx 56 -#define __NR_setpgid 57 -#define __NR_ulimit 58 -#define __NR_oldolduname 59 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrlimit 76 -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_select 82 -#define __NR_symlink 83 -#define __NR_oldlstat 84 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_profil 98 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_ioperm 101 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_olduname 109 -#define __NR_iopl 110 -#define __NR_vhangup 111 -#define __NR_idle 112 -#define __NR_vm86 113 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_modify_ldt 123 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_afs_syscall 137 /* Syscall for Andrew File System */ -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 - -/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */ -#define _syscall0(type,name) \ -type name(void) \ -{ \ -long __res; \ -__asm__ volatile ("int $0x80" \ - : "=a" (__res) \ - : "0" (__NR_##name)); \ -if (__res >= 0) \ - return (type) __res; \ -errno = -__res; \ -return -1; \ -} - -#define _syscall1(type,name,type1,arg1) \ -type name(type1 arg1) \ -{ \ -long __res; \ -__asm__ volatile ("int $0x80" \ - : "=a" (__res) \ - : "0" (__NR_##name),"b" ((long)(arg1))); \ -if (__res >= 0) \ - return (type) __res; \ -errno = -__res; \ -return -1; \ -} - -#define _syscall2(type,name,type1,arg1,type2,arg2) \ -type name(type1 arg1,type2 arg2) \ -{ \ -long __res; \ -__asm__ volatile ("int $0x80" \ - : "=a" (__res) \ - : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2))); \ -if (__res >= 0) \ - return (type) __res; \ -errno = -__res; \ -return -1; \ -} - -#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ -type name(type1 arg1,type2 arg2,type3 arg3) \ -{ \ -long __res; \ -__asm__ volatile ("int $0x80" \ - : "=a" (__res) \ - : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ - "d" ((long)(arg3))); \ -if (__res>=0) \ - return (type) __res; \ -errno=-__res; \ -return -1; \ -} - -#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ -{ \ -long __res; \ -__asm__ volatile ("int $0x80" \ - : "=a" (__res) \ - : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ - "d" ((long)(arg3)),"S" ((long)(arg4))); \ -if (__res>=0) \ - return (type) __res; \ -errno=-__res; \ -return -1; \ -} - -#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ - type5,arg5) \ -type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ -{ \ -long __res; \ -__asm__ volatile ("int $0x80" \ - : "=a" (__res) \ - : "0" (__NR_##name),"b" ((long)(arg1)),"c" ((long)(arg2)), \ - "d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \ -if (__res>=0) \ - return (type) __res; \ -errno=-__res; \ -return -1; \ -} - -#ifdef __KERNEL_SYSCALLS__ - -/* - * we need this inline - forking from kernel space will result - * in NO COPY ON WRITE (!!!), until an execve is executed. This - * is no problem, but for the stack. This is handled by not letting - * main() use the stack at all after fork(). Thus, no function - * calls - which means inline code for fork too, as otherwise we - * would use the stack upon exit from 'fork()'. - * - * Actually only pause and fork are needed inline, so that there - * won't be any messing with the stack from main(), but we define - * some others too. - */ -#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 _syscall0(int,setup) -static inline _syscall0(int,sync) -static inline _syscall0(pid_t,setsid) -static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) -static inline _syscall1(int,dup,int,fd) -static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) -static inline _syscall3(int,open,const char *,file,int,flag,int,mode) -static inline _syscall1(int,close,int,fd) -static inline _syscall1(int,_exit,int,exitcode) -static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) - -static inline pid_t wait(int * wait_stat) -{ - return waitpid(-1,wait_stat,0); -} - -/* - * This is the mechanism for creating a new kernel thread. - * - * NOTE! Only a kernel-only process(ie the swapper or direct descendants - * who haven't done an "execve()") should use this: it will work within - * a system call from a "real" process, but the process memory space will - * not be free'd until both the parent and the child have exited. - */ -static inline pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) -{ - long retval; - - __asm__ __volatile__( - "movl %%esp,%%esi\n\t" - "int $0x80\n\t" /* Linux/i386 system call */ - "cmpl %%esp,%%esi\n\t" /* child or parent? */ - "je 1f\n\t" /* parent - jump */ - "pushl %3\n\t" /* push argument */ - "call *%4\n\t" /* call fn */ - "movl %2,%0\n\t" /* exit */ - "int $0x80\n" - "1:\t" - :"=a" (retval) - :"0" (__NR_clone), "i" (__NR_exit), - "r" (arg), "r" (fn), - "b" (flags | CLONE_VM) - :"si"); - return retval; -} - -#endif - -#endif /* _ASM_I386_UNISTD_H_ */ diff --git a/i386/i386at/gpl/linux/include/linux/autoconf.h b/i386/i386at/gpl/linux/include/linux/autoconf.h deleted file mode 100644 index 0d565ae..0000000 --- a/i386/i386at/gpl/linux/include/linux/autoconf.h +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Loadable module support - */ -#undef CONFIG_MODULES -#undef CONFIG_MODVERSIONS -#undef CONFIG_KERNELD - -/* - * General setup - */ -#undef CONFIG_MATH_EMULATION -#undef CONFIG_NET -#undef CONFIG_MAX_16M -#define CONFIG_PCI -#define CONFIG_SYSVIPC 1 -#define CONFIG_BINFMT_AOUT 1 -#define CONFIG_BINFMT_ELF 1 -#undef CONFIG_KERNEL_ELF -#undef CONFIG_M386 -#define CONFIG_M486 1 -#undef CONFIG_M586 -#undef CONFIG_M686 - -/* Fetch GNUmach driver config file */ -#include <i386/device-drivers.h> - -#if 0 /* these are now in device-drivers.h */ -/* - * Floppy, IDE, and other block devices - */ -#define CONFIG_BLK_DEV_FD 1 -#define CONFIG_BLK_DEV_IDE 1 -#endif - -/* - * Please see drivers/block/README.ide for help/info on IDE drives - */ -#define CONFIG_BLK_DEV_HD_IDE 1 -#define CONFIG_BLK_DEV_IDEATAPI 1 -#define CONFIG_BLK_DEV_IDECD 1 -#undef CONFIG_BLK_DEV_IDETAPE -#define CONFIG_BLK_DEV_CMD640 1 -#define CONFIG_BLK_DEV_RZ1000 1 -#define CONFIG_BLK_DEV_TRITON 1 -#define CONFIG_IDE_CHIPSETS 1 -#undef CONFIG_BLK_DEV_RAM -#undef CONFIG_BLK_DEV_LOOP -#undef CONFIG_BLK_DEV_XD - -#if 0 /* now in device-drivers.h */ -/* - * Networking options - */ -#undef CONFIG_FIREWALL -#undef CONFIG_NET_ALIAS -#define CONFIG_INET 1 -#undef CONFIG_IP_FORWARD -#undef CONFIG_IP_MULTICAST -#undef CONFIG_IP_ACCT -#endif - -/* - * (it is safe to leave these untouched) - */ -#undef CONFIG_INET_PCTCP -#undef CONFIG_INET_RARP -#undef CONFIG_NO_PATH_MTU_DISCOVERY -#undef CONFIG_TCP_NAGLE_OFF -#define CONFIG_IP_NOSR 1 -#define CONFIG_SKB_LARGE 1 - -/* - * - */ -#undef CONFIG_IPX -#undef CONFIG_ATALK -#undef CONFIG_AX25 -#undef CONFIG_NETLINK - -#if 0 -/* - * SCSI support - */ -#define CONFIG_SCSI 1 -#endif - -/* - * SCSI support type (disk, tape, CDrom) - */ -#define CONFIG_BLK_DEV_SD 1 -#undef CONFIG_CHR_DEV_ST -#define CONFIG_BLK_DEV_SR 1 -#undef CONFIG_CHR_DEV_SG - -#if 0 /* now in device-drivers.h */ -/* - * Some SCSI devices (e.g. CD jukebox) support multiple LUNs - */ -#undef CONFIG_SCSI_MULTI_LUN -#undef CONFIG_SCSI_CONSTANTS - -/* - * SCSI low-level drivers - */ -#undef CONFIG_SCSI_ADVANSYS -#define CONFIG_SCSI_AHA152X 1 -#define CONFIG_SCSI_AHA1542 1 -#define CONFIG_SCSI_AHA1740 1 -#define CONFIG_SCSI_AIC7XXX 1 -#undef CONFIG_SCSI_BUSLOGIC -#undef CONFIG_SCSI_EATA_DMA -#undef CONFIG_SCSI_EATA_PIO -#define CONFIG_SCSI_U14_34F 1 -#undef CONFIG_SCSI_FUTURE_DOMAIN -#undef CONFIG_SCSI_GENERIC_NCR5380 -#undef CONFIG_SCSI_IN2000 -#undef CONFIG_SCSI_PAS16 -#undef CONFIG_SCSI_QLOGIC -#define CONFIG_SCSI_SEAGATE 1 -#undef CONFIG_SCSI_T128 -#undef CONFIG_SCSI_ULTRASTOR -#undef CONFIG_SCSI_7000FASST -#undef CONFIG_SCSI_EATA -#undef CONFIG_SCSI_NCR53C406A -#undef CONFIG_SCSI_AM53C974 -#define CONFIG_SCSI_NCR53C7xx 1 -#endif - -/* - * Network device support - */ -#undef CONFIG_NETDEVICES -#undef CONFIG_DUMMY -#undef CONFIG_SLIP -#undef CONFIG_SLIP_COMPRESSED -#undef CONFIG_SLIP_SMART -#undef CONFIG_PPP - -#if 0 -/* - * CCP compressors for PPP are only built as modules. - */ -#undef CONFIG_SCC -#undef CONFIG_PLIP -#undef CONFIG_EQUALIZER -#undef CONFIG_NET_ALPHA -#define CONFIG_NET_VENDOR_SMC 1 -#undef CONFIG_LANCE -#undef CONFIG_NET_VENDOR_3COM -#undef CONFIG_EL1 -#undef CONFIG_EL2 -#define CONFIG_EL3 1 -#undef CONFIG_VORTEX -#define CONFIG_NET_ISA 1 -#undef CONFIG_E2100 -#undef CONFIG_DEPCA -#undef CONFIG_EWRK3 -#define CONFIG_HPLAN_PLUS 1 -#undef CONFIG_HPLAN -#undef CONFIG_HP100 -#define CONFIG_NE2000 1 -#undef CONFIG_SK_G16 -#undef CONFIG_NET_EISA -#undef CONFIG_NET_POCKET -#undef CONFIG_TR -#undef CONFIG_ARCNET -#define CONFIG_DE4X5 1 -#define CONFIG_ULTRA 1 -#define CONFIG_WD80x3 1 - -/* - * CD-ROM drivers (not for SCSI or IDE/ATAPI drives) - */ -#undef CONFIG_CD_NO_IDESCSI -#endif - -/* - * Filesystems - */ -#undef CONFIG_QUOTA -#define CONFIG_MINIX_FS 1 -#undef CONFIG_EXT_FS -#define CONFIG_EXT2_FS 1 -#undef CONFIG_XIA_FS -#define CONFIG_FAT_FS 1 -#define CONFIG_MSDOS_FS 1 -#undef CONFIG_VFAT_FS -#undef CONFIG_UMSDOS_FS -#define CONFIG_PROC_FS 1 -#define CONFIG_NFS_FS 1 -#undef CONFIG_ROOT_NFS -#undef CONFIG_SMB_FS -#define CONFIG_ISO9660_FS 1 -#undef CONFIG_HPFS_FS -#undef CONFIG_SYSV_FS - -#if 0 -/* - * Character devices - */ -#undef CONFIG_CYCLADES -#undef CONFIG_STALDRV -#define CONFIG_PRINTER 1 -#undef CONFIG_BUSMOUSE -#undef CONFIG_PSMOUSE -#undef CONFIG_MS_BUSMOUSE -#undef CONFIG_ATIXL_BUSMOUSE -#undef CONFIG_QIC02_TAPE -#undef CONFIG_APM -#undef CONFIG_WATCHDOG - -/* - * Sound - */ -#undef CONFIG_SOUND - -/* - * Kernel hacking - */ -#undef CONFIG_PROFILE -#endif diff --git a/i386/i386at/gpl/linux/include/linux/binfmts.h b/i386/i386at/gpl/linux/include/linux/binfmts.h deleted file mode 100644 index 0d1c403..0000000 --- a/i386/i386at/gpl/linux/include/linux/binfmts.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef _LINUX_BINFMTS_H -#define _LINUX_BINFMTS_H - -#include <linux/ptrace.h> - -/* - * MAX_ARG_PAGES defines the number of pages allocated for arguments - * and envelope for the new program. 32 should suffice, this gives - * a maximum env+arg of 128kB w/4KB pages! - */ -#define MAX_ARG_PAGES 32 - -/* - * This structure is used to hold the arguments that are used when loading binaries. - */ -struct linux_binprm{ - char buf[128]; - unsigned long page[MAX_ARG_PAGES]; - unsigned long p; - int sh_bang; - struct inode * inode; - int e_uid, e_gid; - int argc, envc; - char * filename; /* Name of binary */ - unsigned long loader, exec; -}; - -/* - * This structure defines the functions that are used to load the binary formats that - * linux accepts. - */ -struct linux_binfmt { - struct linux_binfmt * next; - int *use_count; - int (*load_binary)(struct linux_binprm *, struct pt_regs * regs); - int (*load_shlib)(int fd); - int (*core_dump)(long signr, struct pt_regs * regs); -}; - -extern int register_binfmt(struct linux_binfmt *); -extern int unregister_binfmt(struct linux_binfmt *); - -extern int read_exec(struct inode *inode, unsigned long offset, - char * addr, unsigned long count, int to_kmem); - -extern int open_inode(struct inode * inode, int mode); - -extern int init_elf_binfmt(void); -extern int init_aout_binfmt(void); - -extern void flush_old_exec(struct linux_binprm * bprm); -extern unsigned long setup_arg_pages(unsigned long text_size,unsigned long * page); -extern unsigned long * create_tables(char * p,struct linux_binprm * bprm,int ibcs); -extern unsigned long copy_strings(int argc,char ** argv,unsigned long *page, - unsigned long p, int from_kmem); - -/* this eventually goes away */ -#define change_ldt(a,b) setup_arg_pages(a,b) - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/bios32.h b/i386/i386at/gpl/linux/include/linux/bios32.h deleted file mode 100644 index f57398e..0000000 --- a/i386/i386at/gpl/linux/include/linux/bios32.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * BIOS32, PCI BIOS functions and defines - * Copyright 1994, Drew Eckhardt - * - * For more information, please consult - * - * PCI BIOS Specification Revision - * PCI Local Bus Specification - * PCI System Design Guide - * - * PCI Special Interest Group - * M/S HF3-15A - * 5200 N.E. Elam Young Parkway - * Hillsboro, Oregon 97124-6497 - * +1 (503) 696-2000 - * +1 (800) 433-5177 - * - * Manuals are $25 each or $50 for all three, plus $7 shipping - * within the United States, $35 abroad. - */ - -#ifndef BIOS32_H -#define BIOS32_H - -/* - * Error values that may be returned by the PCI bios. Use - * pcibios_strerror() to convert to a printable string. - */ -#define PCIBIOS_SUCCESSFUL 0x00 -#define PCIBIOS_FUNC_NOT_SUPPORTED 0x81 -#define PCIBIOS_BAD_VENDOR_ID 0x83 -#define PCIBIOS_DEVICE_NOT_FOUND 0x86 -#define PCIBIOS_BAD_REGISTER_NUMBER 0x87 -#define PCIBIOS_SET_FAILED 0x88 -#define PCIBIOS_BUFFER_TOO_SMALL 0x89 - -extern int pcibios_present (void); -extern unsigned long pcibios_init (unsigned long memory_start, - unsigned long memory_end); -extern unsigned long pcibios_fixup (unsigned long memory_start, - unsigned long memory_end); -extern int pcibios_find_class (unsigned int class_code, unsigned short index, - unsigned char *bus, unsigned char *dev_fn); -extern int pcibios_find_device (unsigned short vendor, unsigned short dev_id, - unsigned short index, unsigned char *bus, - unsigned char *dev_fn); -extern int pcibios_read_config_byte (unsigned char bus, unsigned char dev_fn, - unsigned char where, unsigned char *val); -extern int pcibios_read_config_word (unsigned char bus, unsigned char dev_fn, - unsigned char where, unsigned short *val); -extern int pcibios_read_config_dword (unsigned char bus, unsigned char dev_fn, - unsigned char where, unsigned int *val); -extern int pcibios_write_config_byte (unsigned char bus, unsigned char dev_fn, - unsigned char where, unsigned char val); -extern int pcibios_write_config_word (unsigned char bus, unsigned char dev_fn, - unsigned char where, unsigned short val); -extern pcibios_write_config_dword (unsigned char bus, unsigned char dev_fn, - unsigned char where, unsigned int val); -extern const char *pcibios_strerror (int error); - -#endif /* BIOS32_H */ diff --git a/i386/i386at/gpl/linux/include/linux/blk.h b/i386/i386at/gpl/linux/include/linux/blk.h deleted file mode 100644 index cf236a6..0000000 --- a/i386/i386at/gpl/linux/include/linux/blk.h +++ /dev/null @@ -1,408 +0,0 @@ -#ifndef _BLK_H -#define _BLK_H - -#include <linux/blkdev.h> -#include <linux/locks.h> -#include <linux/config.h> - -/* - * This is used in the elevator algorithm. We don't prioritise reads - * over writes any more --- although reads are more time-critical than - * writes, by treating them equally we increase filesystem throughput. - * This turns out to give better overall performance. -- sct - */ -#define IN_ORDER(s1,s2) \ -((s1)->rq_dev < (s2)->rq_dev || (((s1)->rq_dev == (s2)->rq_dev && \ -(s1)->sector < (s2)->sector))) - -/* - * These will have to be changed to be aware of different buffer - * sizes etc.. It actually needs a major cleanup. - */ -#ifdef IDE_DRIVER -#define SECTOR_MASK ((BLOCK_SIZE >> 9) - 1) -#else -#define SECTOR_MASK (blksize_size[MAJOR_NR] && \ - blksize_size[MAJOR_NR][MINOR(CURRENT->rq_dev)] ? \ - ((blksize_size[MAJOR_NR][MINOR(CURRENT->rq_dev)] >> 9) - 1) : \ - ((BLOCK_SIZE >> 9) - 1)) -#endif /* IDE_DRIVER */ - -#define SUBSECTOR(block) (CURRENT->current_nr_sectors > 0) - -#ifdef CONFIG_CDU31A -extern int cdu31a_init(void); -#endif CONFIG_CDU31A -#ifdef CONFIG_MCD -extern int mcd_init(void); -#endif CONFIG_MCD -#ifdef CONFIG_MCDX -extern int mcdx_init(void); -#endif CONFIG_MCDX -#ifdef CONFIG_SBPCD -extern int sbpcd_init(void); -#endif CONFIG_SBPCD -#ifdef CONFIG_AZTCD -extern int aztcd_init(void); -#endif CONFIG_AZTCD -#ifdef CONFIG_CDU535 -extern int sony535_init(void); -#endif CONFIG_CDU535 -#ifdef CONFIG_GSCD -extern int gscd_init(void); -#endif CONFIG_GSCD -#ifdef CONFIG_CM206 -extern int cm206_init(void); -#endif CONFIG_CM206 -#ifdef CONFIG_OPTCD -extern int optcd_init(void); -#endif CONFIG_OPTCD -#ifdef CONFIG_SJCD -extern int sjcd_init(void); -#endif CONFIG_SJCD -#ifdef CONFIG_CDI_INIT -extern int cdi_init(void); -#endif CONFIG_CDI_INIT -#ifdef CONFIG_BLK_DEV_HD -extern int hd_init(void); -#endif -#ifdef CONFIG_BLK_DEV_IDE -extern int ide_init(void); -#endif -#ifdef CONFIG_BLK_DEV_XD -extern int xd_init(void); -#endif - -extern void set_device_ro(kdev_t dev,int flag); -void add_blkdev_randomness(int major); - -extern int floppy_init(void); -extern void rd_load(void); -extern int rd_init(void); -extern int rd_doload; /* 1 = load ramdisk, 0 = don't load */ -extern int rd_prompt; /* 1 = prompt for ramdisk, 0 = don't prompt */ -extern int rd_image_start; /* starting block # of image */ - -#define RO_IOCTLS(dev,where) \ - case BLKROSET: if (!suser()) return -EACCES; \ - set_device_ro((dev),get_fs_long((long *) (where))); return 0; \ - case BLKROGET: { int __err = verify_area(VERIFY_WRITE, (void *) (where), sizeof(long)); \ - if (!__err) put_fs_long(0!=is_read_only(dev),(long *) (where)); return __err; } - -#if defined(MAJOR_NR) || defined(IDE_DRIVER) - -/* - * Add entries as needed. - */ - -#ifdef IDE_DRIVER - -#define DEVICE_NR(device) (MINOR(device) >> PARTN_BITS) -#define DEVICE_ON(device) /* nothing */ -#define DEVICE_OFF(device) /* nothing */ - -#elif (MAJOR_NR == RAMDISK_MAJOR) - -/* ram disk */ -#define DEVICE_NAME "ramdisk" -#define DEVICE_REQUEST rd_request -#define DEVICE_NR(device) (MINOR(device)) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) -#define DEVICE_NO_RANDOM - -#elif (MAJOR_NR == FLOPPY_MAJOR) - -static void floppy_off(unsigned int nr); - -#define DEVICE_NAME "floppy" -#define DEVICE_INTR do_floppy -#define DEVICE_REQUEST do_fd_request -#define DEVICE_NR(device) ( (MINOR(device) & 3) | ((MINOR(device) & 0x80 ) >> 5 )) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) floppy_off(DEVICE_NR(device)) - -#elif (MAJOR_NR == HD_MAJOR) - -/* harddisk: timeout is 6 seconds.. */ -#define DEVICE_NAME "harddisk" -#define DEVICE_INTR do_hd -#define DEVICE_TIMEOUT HD_TIMER -#define TIMEOUT_VALUE (6*HZ) -#define DEVICE_REQUEST do_hd_request -#define DEVICE_NR(device) (MINOR(device)>>6) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == SCSI_DISK_MAJOR) - -#define DEVICE_NAME "scsidisk" -#define DEVICE_INTR do_sd -#define TIMEOUT_VALUE (2*HZ) -#define DEVICE_REQUEST do_sd_request -#define DEVICE_NR(device) (MINOR(device) >> 4) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == SCSI_TAPE_MAJOR) - -#define DEVICE_NAME "scsitape" -#define DEVICE_INTR do_st -#define DEVICE_NR(device) (MINOR(device) & 0x7f) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == SCSI_CDROM_MAJOR) - -#define DEVICE_NAME "CD-ROM" -#define DEVICE_INTR do_sr -#define DEVICE_REQUEST do_sr_request -#define DEVICE_NR(device) (MINOR(device)) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == XT_DISK_MAJOR) - -#define DEVICE_NAME "xt disk" -#define DEVICE_REQUEST do_xd_request -#define DEVICE_NR(device) (MINOR(device) >> 6) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == CDU31A_CDROM_MAJOR) - -#define DEVICE_NAME "CDU31A" -#define DEVICE_REQUEST do_cdu31a_request -#define DEVICE_NR(device) (MINOR(device)) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == MITSUMI_CDROM_MAJOR) - -#define DEVICE_NAME "Mitsumi CD-ROM" -/* #define DEVICE_INTR do_mcd */ -#define DEVICE_REQUEST do_mcd_request -#define DEVICE_NR(device) (MINOR(device)) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == MITSUMI_X_CDROM_MAJOR) - -#define DEVICE_NAME "Mitsumi CD-ROM" -/* #define DEVICE_INTR do_mcdx */ -#define DEVICE_REQUEST do_mcdx_request -#define DEVICE_NR(device) (MINOR(device)) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == MATSUSHITA_CDROM_MAJOR) - -#define DEVICE_NAME "Matsushita CD-ROM controller #1" -#define DEVICE_REQUEST do_sbpcd_request -#define DEVICE_NR(device) (MINOR(device)) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == MATSUSHITA_CDROM2_MAJOR) - -#define DEVICE_NAME "Matsushita CD-ROM controller #2" -#define DEVICE_REQUEST do_sbpcd2_request -#define DEVICE_NR(device) (MINOR(device)) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == MATSUSHITA_CDROM3_MAJOR) - -#define DEVICE_NAME "Matsushita CD-ROM controller #3" -#define DEVICE_REQUEST do_sbpcd3_request -#define DEVICE_NR(device) (MINOR(device)) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == MATSUSHITA_CDROM4_MAJOR) - -#define DEVICE_NAME "Matsushita CD-ROM controller #4" -#define DEVICE_REQUEST do_sbpcd4_request -#define DEVICE_NR(device) (MINOR(device)) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == AZTECH_CDROM_MAJOR) - -#define DEVICE_NAME "Aztech CD-ROM" -#define DEVICE_REQUEST do_aztcd_request -#define DEVICE_NR(device) (MINOR(device)) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == CDU535_CDROM_MAJOR) - -#define DEVICE_NAME "SONY-CDU535" -#define DEVICE_INTR do_cdu535 -#define DEVICE_REQUEST do_cdu535_request -#define DEVICE_NR(device) (MINOR(device)) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == GOLDSTAR_CDROM_MAJOR) - -#define DEVICE_NAME "Goldstar R420" -#define DEVICE_REQUEST do_gscd_request -#define DEVICE_NR(device) (MINOR(device)) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == CM206_CDROM_MAJOR) -#define DEVICE_NAME "Philips/LMS cd-rom cm206" -#define DEVICE_REQUEST do_cm206_request -#define DEVICE_NR(device) (MINOR(device)) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == OPTICS_CDROM_MAJOR) - -#define DEVICE_NAME "DOLPHIN 8000AT CD-ROM" -#define DEVICE_REQUEST do_optcd_request -#define DEVICE_NR(device) (MINOR(device)) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#elif (MAJOR_NR == SANYO_CDROM_MAJOR) - -#define DEVICE_NAME "Sanyo H94A CD-ROM" -#define DEVICE_REQUEST do_sjcd_request -#define DEVICE_NR(device) (MINOR(device)) -#define DEVICE_ON(device) -#define DEVICE_OFF(device) - -#endif /* MAJOR_NR == whatever */ - -#if (MAJOR_NR != SCSI_TAPE_MAJOR) && !defined(IDE_DRIVER) - -#ifndef CURRENT -#define CURRENT (blk_dev[MAJOR_NR].current_request) -#endif - -#define CURRENT_DEV DEVICE_NR(CURRENT->rq_dev) - -#ifdef DEVICE_INTR -void (*DEVICE_INTR)(void) = NULL; -#endif -#ifdef DEVICE_TIMEOUT - -#define SET_TIMER \ -((timer_table[DEVICE_TIMEOUT].expires = jiffies + TIMEOUT_VALUE), \ -(timer_active |= 1<<DEVICE_TIMEOUT)) - -#define CLEAR_TIMER \ -timer_active &= ~(1<<DEVICE_TIMEOUT) - -#define SET_INTR(x) \ -if ((DEVICE_INTR = (x)) != NULL) \ - SET_TIMER; \ -else \ - CLEAR_TIMER; - -#else - -#define SET_INTR(x) (DEVICE_INTR = (x)) - -#endif /* DEVICE_TIMEOUT */ - -static void (DEVICE_REQUEST)(void); - -#ifdef DEVICE_INTR -#define CLEAR_INTR SET_INTR(NULL) -#else -#define CLEAR_INTR -#endif - -#define INIT_REQUEST \ - if (!CURRENT) {\ - CLEAR_INTR; \ - return; \ - } \ - if (MAJOR(CURRENT->rq_dev) != MAJOR_NR) \ - panic(DEVICE_NAME ": request list destroyed"); \ - if (CURRENT->bh) { \ - if (!buffer_locked(CURRENT->bh)) \ - panic(DEVICE_NAME ": block not locked"); \ - } - -#endif /* (MAJOR_NR != SCSI_TAPE_MAJOR) && !defined(IDE_DRIVER) */ - -/* end_request() - SCSI devices have their own version */ -/* - IDE drivers have their own copy too */ - -#if ! SCSI_MAJOR(MAJOR_NR) - -#if defined(IDE_DRIVER) && !defined(_IDE_C) /* shared copy for IDE modules */ -void ide_end_request(byte uptodate, ide_hwgroup_t *hwgroup); -#else - -#ifdef IDE_DRIVER -void ide_end_request(byte uptodate, ide_hwgroup_t *hwgroup) { - struct request *req = hwgroup->rq; -#else -static void end_request(int uptodate) { - struct request *req = CURRENT; -#endif /* IDE_DRIVER */ - struct buffer_head * bh; - - req->errors = 0; - if (!uptodate) { - printk("end_request: I/O error, dev %s, sector %lu\n", - kdevname(req->rq_dev), req->sector); -#ifdef MACH - for (bh = req->bh; bh; ) { - struct buffer_head *next = bh->b_reqnext; - bh->b_reqnext = NULL; - mark_buffer_uptodate(bh, 0); - unlock_buffer(bh); - bh = next; - } - req->bh = NULL; -#else - req->nr_sectors--; - req->nr_sectors &= ~SECTOR_MASK; - req->sector += (BLOCK_SIZE / 512); - req->sector &= ~SECTOR_MASK; -#endif - } - - if ((bh = req->bh) != NULL) { - req->bh = bh->b_reqnext; - bh->b_reqnext = NULL; - mark_buffer_uptodate(bh, uptodate); - unlock_buffer(bh); - if ((bh = req->bh) != NULL) { - req->current_nr_sectors = bh->b_size >> 9; - if (req->nr_sectors < req->current_nr_sectors) { - req->nr_sectors = req->current_nr_sectors; - printk("end_request: buffer-list destroyed\n"); - } - req->buffer = bh->b_data; - return; - } - } -#ifndef DEVICE_NO_RANDOM - add_blkdev_randomness(MAJOR(req->rq_dev)); -#endif -#ifdef IDE_DRIVER - blk_dev[MAJOR(req->rq_dev)].current_request = req->next; - hwgroup->rq = NULL; -#else - DEVICE_OFF(req->rq_dev); - CURRENT = req->next; -#endif /* IDE_DRIVER */ - if (req->sem != NULL) - up(req->sem); - req->rq_status = RQ_INACTIVE; - wake_up(&wait_for_request); -} -#endif /* defined(IDE_DRIVER) && !defined(_IDE_C) */ -#endif /* ! SCSI_MAJOR(MAJOR_NR) */ - -#endif /* defined(MAJOR_NR) || defined(IDE_DRIVER) */ - -#endif /* _BLK_H */ diff --git a/i386/i386at/gpl/linux/include/linux/blkdev.h b/i386/i386at/gpl/linux/include/linux/blkdev.h deleted file mode 100644 index ba4d08a..0000000 --- a/i386/i386at/gpl/linux/include/linux/blkdev.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _LINUX_BLKDEV_H -#define _LINUX_BLKDEV_H - -#include <linux/major.h> -#include <linux/sched.h> -#include <linux/genhd.h> - -/* - * Ok, this is an expanded form so that we can use the same - * request for paging requests when that is implemented. In - * paging, 'bh' is NULL, and the semaphore is used to wait - * for read/write completion. - */ -struct request { - volatile int rq_status; /* should split this into a few status bits */ -#define RQ_INACTIVE (-1) -#define RQ_ACTIVE 1 -#define RQ_SCSI_BUSY 0xffff -#define RQ_SCSI_DONE 0xfffe -#define RQ_SCSI_DISCONNECTING 0xffe0 - - kdev_t rq_dev; - int cmd; /* READ or WRITE */ - int errors; - unsigned long sector; - unsigned long nr_sectors; - unsigned long current_nr_sectors; - char * buffer; - struct semaphore * sem; - struct buffer_head * bh; - struct buffer_head * bhtail; - struct request * next; -}; - -struct blk_dev_struct { - void (*request_fn)(void); - struct request * current_request; -}; - -struct sec_size { - unsigned block_size; - unsigned block_size_bits; -}; - -extern struct sec_size * blk_sec[MAX_BLKDEV]; -extern struct blk_dev_struct blk_dev[MAX_BLKDEV]; -extern struct wait_queue * wait_for_request; -extern void resetup_one_dev(struct gendisk *dev, int drive); - -extern int * blk_size[MAX_BLKDEV]; - -extern int * blksize_size[MAX_BLKDEV]; - -extern int * hardsect_size[MAX_BLKDEV]; - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/cdrom.h b/i386/i386at/gpl/linux/include/linux/cdrom.h deleted file mode 100644 index 5811ff0..0000000 --- a/i386/i386at/gpl/linux/include/linux/cdrom.h +++ /dev/null @@ -1,465 +0,0 @@ -/* - * -- <linux/cdrom.h> - * general (not only SCSI) header library for linux CDROM drivers - * (C) 1992 David Giller rafetmad@oxy.edu - * 1994, 1995 Eberhard Moenkeberg emoenke@gwdg.de - * - */ - -#ifndef _LINUX_CDROM_H -#define _LINUX_CDROM_H - -/* - * some fix numbers - */ -#define CD_MINS 74 /* max. minutes per CD, not really a limit */ -#define CD_SECS 60 /* seconds per minute */ -#define CD_FRAMES 75 /* frames per second */ - -#define CD_SYNC_SIZE 12 /* 12 sync bytes per raw data frame, not transfered by the drive */ -#define CD_HEAD_SIZE 4 /* header (address) bytes per raw data frame */ -#define CD_SUBHEAD_SIZE 8 /* subheader bytes per raw XA data frame */ -#define CD_XA_HEAD (CD_HEAD_SIZE+CD_SUBHEAD_SIZE) /* "before data" part of raw XA frame */ -#define CD_XA_SYNC_HEAD (CD_SYNC_SIZE+CD_XA_HEAD)/* sync bytes + header of XA frame */ - -#define CD_FRAMESIZE 2048 /* bytes per frame, "cooked" mode */ -#define CD_FRAMESIZE_RAW 2352 /* bytes per frame, "raw" mode */ -/* most drives don't deliver everything: */ -#define CD_FRAMESIZE_RAW1 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE) /* 2340 */ -#define CD_FRAMESIZE_RAW0 (CD_FRAMESIZE_RAW-CD_SYNC_SIZE-CD_HEAD_SIZE) /* 2336 */ - -#define CD_EDC_SIZE 4 /* bytes EDC per most raw data frame types */ -#define CD_ZERO_SIZE 8 /* bytes zero per yellow book mode 1 frame */ -#define CD_ECC_SIZE 276 /* bytes ECC per most raw data frame types */ -#define CD_XA_TAIL (CD_EDC_SIZE+CD_ECC_SIZE) /* "after data" part of raw XA frame */ - -#define CD_FRAMESIZE_SUB 96 /* subchannel data "frame" size */ -#define CD_MSF_OFFSET 150 /* MSF numbering offset of first frame */ - -#define CD_CHUNK_SIZE 24 /* lowest-level "data bytes piece" */ -#define CD_NUM_OF_CHUNKS 98 /* chunks per frame */ - -#define CD_FRAMESIZE_XA CD_FRAMESIZE_RAW1 /* obsolete name */ -#define CD_BLOCK_OFFSET CD_MSF_OFFSET /* obsolete name */ - -/* - * the raw frame layout: - * - * - audio (red): | audio_sample_bytes | - * | 2352 | - * - * - data (yellow, mode1): | sync - head - data - EDC - zero - ECC | - * | 12 - 4 - 2048 - 4 - 8 - 276 | - * - * - data (yellow, mode2): | sync - head - data | - * | 12 - 4 - 2336 | - * - * - XA data (green, mode2 form1): | sync - head - sub - data - EDC - ECC | - * | 12 - 4 - 8 - 2048 - 4 - 276 | - * - * - XA data (green, mode2 form2): | sync - head - sub - data - EDC | - * | 12 - 4 - 8 - 2324 - 4 | - */ - -/* - * CDROM IOCTL structures - */ - -struct cdrom_blk -{ - unsigned from; - unsigned short len; -}; - - -struct cdrom_msf -{ - u_char cdmsf_min0; /* start minute */ - u_char cdmsf_sec0; /* start second */ - u_char cdmsf_frame0; /* start frame */ - u_char cdmsf_min1; /* end minute */ - u_char cdmsf_sec1; /* end second */ - u_char cdmsf_frame1; /* end frame */ -}; - -struct cdrom_ti -{ - u_char cdti_trk0; /* start track */ - u_char cdti_ind0; /* start index */ - u_char cdti_trk1; /* end track */ - u_char cdti_ind1; /* end index */ -}; - -struct cdrom_tochdr -{ - u_char cdth_trk0; /* start track */ - u_char cdth_trk1; /* end track */ -}; - -struct cdrom_tocentry -{ - u_char cdte_track; - u_char cdte_adr :4; - u_char cdte_ctrl :4; - u_char cdte_format; - union - { - struct - { - u_char minute; - u_char second; - u_char frame; - } msf; - int lba; - } cdte_addr; - u_char cdte_datamode; -}; - -/* - * CD-ROM address types (cdrom_tocentry.cdte_format) - */ -#define CDROM_LBA 0x01 /* "logical block": first frame is #0 */ -#define CDROM_MSF 0x02 /* "minute-second-frame": binary, not bcd here! */ - -/* - * bit to tell whether track is data or audio (cdrom_tocentry.cdte_ctrl) - */ -#define CDROM_DATA_TRACK 0x04 - -/* - * The leadout track is always 0xAA, regardless of # of tracks on disc - */ -#define CDROM_LEADOUT 0xAA - -struct cdrom_subchnl -{ - u_char cdsc_format; - u_char cdsc_audiostatus; - u_char cdsc_adr: 4; - u_char cdsc_ctrl: 4; - u_char cdsc_trk; - u_char cdsc_ind; - union - { - struct - { - u_char minute; - u_char second; - u_char frame; - } msf; - int lba; - } cdsc_absaddr; - union - { - struct - { - u_char minute; - u_char second; - u_char frame; - } msf; - int lba; - } cdsc_reladdr; -}; - -/* - * audio states (from SCSI-2, but seen with other drives, too) - */ -#define CDROM_AUDIO_INVALID 0x00 /* audio status not supported */ -#define CDROM_AUDIO_PLAY 0x11 /* audio play operation in progress */ -#define CDROM_AUDIO_PAUSED 0x12 /* audio play operation paused */ -#define CDROM_AUDIO_COMPLETED 0x13 /* audio play successfully completed */ -#define CDROM_AUDIO_ERROR 0x14 /* audio play stopped due to error */ -#define CDROM_AUDIO_NO_STATUS 0x15 /* no current audio status to return */ - -struct cdrom_volctrl -{ - u_char channel0; - u_char channel1; - u_char channel2; - u_char channel3; -}; - -struct cdrom_read -{ - int cdread_lba; - caddr_t cdread_bufaddr; - int cdread_buflen; -}; - -/* - * extensions for transfering audio frames - * currently used by sbpcd.c, cdu31a.c, ide-cd.c - */ -struct cdrom_read_audio -{ - union - { - struct - { - u_char minute; - u_char second; - u_char frame; - } msf; - int lba; - } addr; /* frame address */ - u_char addr_format; /* CDROM_LBA or CDROM_MSF */ - int nframes; /* number of 2352-byte-frames to read at once, limited by the drivers */ - u_char *buf; /* frame buffer (size: nframes*2352 bytes) */ -}; - -/* - * this has to be the "arg" of the CDROMMULTISESSION ioctl - * for obtaining multi session info. - * The returned "addr" is valid only if "xa_flag" is true. - */ -struct cdrom_multisession -{ - union - { - struct - { - u_char minute; - u_char second; - u_char frame; - } msf; - int lba; - } addr; /* frame address: start-of-last-session (not the new "frame 16"!)*/ - u_char xa_flag; /* 1: "is XA disk" */ - u_char addr_format; /* CDROM_LBA or CDROM_MSF */ -}; - -#ifdef FIVETWELVE -#define CDROM_MODE1_SIZE 512 -#else -#define CDROM_MODE1_SIZE 2048 -#endif FIVETWELVE -#define CDROM_MODE2_SIZE 2336 - -/* - * CD-ROM IOCTL commands - * For IOCTL calls, we will commandeer byte 0x53, or 'S'. - */ - -#define CDROMPAUSE 0x5301 -#define CDROMRESUME 0x5302 -#define CDROMPLAYMSF 0x5303 /* (struct cdrom_msf) */ -#define CDROMPLAYTRKIND 0x5304 /* (struct cdrom_ti) */ - -#define CDROMREADTOCHDR 0x5305 /* (struct cdrom_tochdr) */ -#define CDROMREADTOCENTRY 0x5306 /* (struct cdrom_tocentry) */ - -#define CDROMSTOP 0x5307 /* stop the drive motor */ -#define CDROMSTART 0x5308 /* turn the motor on */ - -#define CDROMEJECT 0x5309 /* eject CD-ROM media */ - -#define CDROMVOLCTRL 0x530a /* (struct cdrom_volctrl) */ - -#define CDROMSUBCHNL 0x530b /* (struct cdrom_subchnl) */ - -#define CDROMREADMODE2 0x530c /* (struct cdrom_read) */ - /* read type-2 data */ - -#define CDROMREADMODE1 0x530d /* (struct cdrom_read) */ - /* read type-1 data */ - -#define CDROMREADAUDIO 0x530e /* (struct cdrom_read_audio) */ - -/* - * enable (1) / disable (0) auto-ejecting - */ -#define CDROMEJECT_SW 0x530f /* arg: 0 or 1 */ - -/* - * obtain the start-of-last-session address of multi session disks - */ -#define CDROMMULTISESSION 0x5310 /* (struct cdrom_multisession) */ - -/* - * obtain the "universal product code" number - * (only some data disks have it coded) - */ -#define CDROM_GET_UPC 0x5311 /* 8 bytes returned */ - -#define CDROMRESET 0x5312 /* hard-reset the drive */ -#define CDROMVOLREAD 0x5313 /* let the drive tell its volume setting */ - /* (struct cdrom_volctrl) */ - -/* - * these ioctls are used in aztcd.c - */ -#define CDROMREADRAW 0x5314 /* read data in raw mode */ -#define CDROMREADCOOKED 0x5315 /* read data in cooked mode */ -#define CDROMSEEK 0x5316 /* seek msf address */ - -/* - * for playing audio in logical block addressing mode - */ -#define CDROMPLAYBLK 0x5317 /* (struct cdrom_blk) */ - - -/* - * CD-ROM-specific SCSI command opcodes - */ - -/* - * Group 2 (10-byte). All of these are called 'optional' by SCSI-II. - */ -#define SCMD_READ_TOC 0x43 /* read table of contents */ -#define SCMD_PLAYAUDIO_MSF 0x47 /* play data at time offset */ -#define SCMD_PLAYAUDIO_TI 0x48 /* play data at track/index */ -#define SCMD_PAUSE_RESUME 0x4B /* pause/resume audio */ -#define SCMD_READ_SUBCHANNEL 0x42 /* read SC info on playing disc */ -#define SCMD_PLAYAUDIO10 0x45 /* play data at logical block */ -#define SCMD_READ_HEADER 0x44 /* read TOC header */ - -/* - * Group 5 - */ -#define SCMD_PLAYAUDIO12 0xA5 /* play data at logical block */ -#define SCMD_PLAYTRACK_REL12 0xA9 /* play track at relative offset */ - -/* - * Group 6 Commands - */ -#define SCMD_CD_PLAYBACK_CONTROL 0xC9 /* Sony vendor-specific audio */ -#define SCMD_CD_PLAYBACK_STATUS 0xC4 /* control opcodes */ - -/* - * CD-ROM capacity structure. - */ -struct scsi_capacity -{ - u_long capacity; - u_long lbasize; -}; - -/* - * CD-ROM MODE_SENSE/MODE_SELECT parameters - */ -#define ERR_RECOVERY_PARMS 0x01 -#define DISCO_RECO_PARMS 0x02 -#define FORMAT_PARMS 0x03 -#define GEOMETRY_PARMS 0x04 -#define CERTIFICATION_PARMS 0x06 -#define CACHE_PARMS 0x38 - -/* - * standard mode-select header prepended to all mode-select commands - */ -struct ccs_modesel_head -{ - u_char _r1; /* reserved */ - u_char medium; /* device-specific medium type */ - u_char _r2; /* reserved */ - u_char block_desc_length; /* block descriptor length */ - u_char density; /* device-specific density code */ - u_char number_blocks_hi; /* number of blocks in this block desc */ - u_char number_blocks_med; - u_char number_blocks_lo; - u_char _r3; - u_char block_length_hi; /* block length for blocks in this desc */ - u_short block_length; -}; - -/* - * error recovery parameters - */ -struct ccs_err_recovery -{ - u_char _r1 : 2; /* reserved */ - u_char page_code : 6; /* page code */ - u_char page_length; /* page length */ - u_char awre : 1; /* auto write realloc enabled */ - u_char arre : 1; /* auto read realloc enabled */ - u_char tb : 1; /* transfer block */ - u_char rc : 1; /* read continuous */ - u_char eec : 1; /* enable early correction */ - u_char per : 1; /* post error */ - u_char dte : 1; /* disable transfer on error */ - u_char dcr : 1; /* disable correction */ - u_char retry_count; /* error retry count */ - u_char correction_span; /* largest recov. to be attempted, bits */ - u_char head_offset_count; /* head offset (2's C) for each retry */ - u_char strobe_offset_count; /* data strobe */ - u_char recovery_time_limit; /* time limit on recovery attempts */ -}; - -/* - * disco/reco parameters - */ -struct ccs_disco_reco -{ - u_char _r1 : 2; /* reserved */ - u_char page_code : 6; /* page code */ - u_char page_length; /* page length */ - u_char buffer_full_ratio; /* write buffer reconnect threshold */ - u_char buffer_empty_ratio; /* read */ - u_short bus_inactivity_limit; /* limit on bus inactivity time */ - u_short disconnect_time_limit; /* minimum disconnect time */ - u_short connect_time_limit; /* minimum connect time */ - u_short _r2; /* reserved */ -}; - -/* - * drive geometry parameters - */ -struct ccs_geometry -{ - u_char _r1 : 2; /* reserved */ - u_char page_code : 6; /* page code */ - u_char page_length; /* page length */ - u_char cyl_ub; /* #cyls */ - u_char cyl_mb; - u_char cyl_lb; - u_char heads; /* #heads */ - u_char precomp_cyl_ub; /* precomp start */ - u_char precomp_cyl_mb; - u_char precomp_cyl_lb; - u_char current_cyl_ub; /* reduced current start */ - u_char current_cyl_mb; - u_char current_cyl_lb; - u_short step_rate; /* stepping motor rate */ - u_char landing_cyl_ub; /* landing zone */ - u_char landing_cyl_mb; - u_char landing_cyl_lb; - u_char _r2; - u_char _r3; - u_char _r4; -}; - -/* - * cache parameters - */ -struct ccs_cache -{ - u_char _r1 : 2; /* reserved */ - u_char page_code : 6; /* page code */ - u_char page_length; /* page length */ - u_char mode; /* cache control byte */ - u_char threshold; /* prefetch threshold */ - u_char max_prefetch; /* maximum prefetch size */ - u_char max_multiplier; /* maximum prefetch multiplier */ - u_char min_prefetch; /* minimum prefetch size */ - u_char min_multiplier; /* minimum prefetch multiplier */ - u_char _r2[8]; -}; - -#endif _LINUX_CDROM_H -/*==========================================================================*/ -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-indent-level: 8 - * c-brace-imaginary-offset: 0 - * c-brace-offset: -8 - * c-argdecl-indent: 8 - * c-label-offset: -8 - * c-continued-statement-offset: 8 - * c-continued-brace-offset: 0 - * End: - */ diff --git a/i386/i386at/gpl/linux/include/linux/config.h b/i386/i386at/gpl/linux/include/linux/config.h deleted file mode 100644 index a54cdff..0000000 --- a/i386/i386at/gpl/linux/include/linux/config.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _LINUX_CONFIG_H -#define _LINUX_CONFIG_H - -#include <linux/autoconf.h> - -/* - * Defines for what uname() should return - */ -#ifndef UTS_SYSNAME -#define UTS_SYSNAME "Linux" -#endif - -#ifndef UTS_MACHINE -#define UTS_MACHINE "unknown" -#endif - -#ifndef UTS_NODENAME -#define UTS_NODENAME "(none)" /* set by sethostname() */ -#endif - -#ifndef UTS_DOMAINNAME -#define UTS_DOMAINNAME "(none)" /* set by setdomainname() */ -#endif - -/* - * The definitions for UTS_RELEASE and UTS_VERSION are now defined - * in linux/version.h, and should only be used by linux/version.c - */ - -/* Don't touch these, unless you really know what your doing. */ -#define DEF_INITSEG 0x9000 -#define DEF_SYSSEG 0x1000 -#define DEF_SETUPSEG 0x9020 -#define DEF_SYSSIZE 0x7F00 - -/* internal svga startup constants */ -#define NORMAL_VGA 0xffff /* 80x25 mode */ -#define EXTENDED_VGA 0xfffe /* 80x50 mode */ -#define ASK_VGA 0xfffd /* ask for it at bootup */ - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/delay.h b/i386/i386at/gpl/linux/include/linux/delay.h deleted file mode 100644 index 50b5d0b..0000000 --- a/i386/i386at/gpl/linux/include/linux/delay.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _LINUX_DELAY_H -#define _LINUX_DELAY_H - -/* - * Copyright (C) 1993 Linus Torvalds - * - * Delay routines, using a pre-computed "loops_per_second" value. - */ - -extern unsigned long loops_per_sec; - -#include <asm/delay.h> - -#endif /* defined(_LINUX_DELAY_H) */ diff --git a/i386/i386at/gpl/linux/include/linux/errno.h b/i386/i386at/gpl/linux/include/linux/errno.h deleted file mode 100644 index ac21284..0000000 --- a/i386/i386at/gpl/linux/include/linux/errno.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _LINUX_ERRNO_H -#define _LINUX_ERRNO_H - -#include <asm/errno.h> - -#ifdef __KERNEL__ - -/* Should never be seen by user programs */ -#define ERESTARTSYS 512 -#define ERESTARTNOINTR 513 -#define ERESTARTNOHAND 514 /* restart if no handler.. */ -#define ENOIOCTLCMD 515 /* No ioctl command */ - -#endif - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/etherdevice.h b/i386/i386at/gpl/linux/include/linux/etherdevice.h deleted file mode 100644 index b29b76b..0000000 --- a/i386/i386at/gpl/linux/include/linux/etherdevice.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. NET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions for the Ethernet handlers. - * - * Version: @(#)eth.h 1.0.4 05/13/93 - * - * Authors: Ross Biro, <bir7@leland.Stanford.Edu> - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * Relocated to include/linux where it belongs by Alan Cox - * <gw4pts@gw4pts.ampr.org> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * WARNING: This move may well be temporary. This file will get merged with others RSN. - * - */ -#ifndef _LINUX_ETHERDEVICE_H -#define _LINUX_ETHERDEVICE_H - - -#include <linux/if_ether.h> - -#ifdef __KERNEL__ -extern int eth_header(struct sk_buff *skb, struct device *dev, - unsigned short type, void *daddr, - void *saddr, unsigned len); -extern int eth_rebuild_header(void *buff, struct device *dev, - unsigned long dst, struct sk_buff *skb); -#ifdef MACH -#define eth_type_trans(skb, dev) 0 -#else -extern unsigned short eth_type_trans(struct sk_buff *skb, struct device *dev); -#endif -extern void eth_header_cache_bind(struct hh_cache ** hhp, struct device *dev, - unsigned short htype, __u32 daddr); -extern void eth_header_cache_update(struct hh_cache *hh, struct device *dev, unsigned char * haddr); -#ifdef MACH -#define eth_copy_and_sum(skb, src, length, base) \ - memcpy ((skb)->data, src, length) -#else -extern void eth_copy_and_sum(struct sk_buff *dest, - unsigned char *src, int length, int base); -#endif -extern struct device * init_etherdev(struct device *, int); - -#endif - -#endif /* _LINUX_ETHERDEVICE_H */ diff --git a/i386/i386at/gpl/linux/include/linux/fcntl.h b/i386/i386at/gpl/linux/include/linux/fcntl.h deleted file mode 100644 index 9de3512..0000000 --- a/i386/i386at/gpl/linux/include/linux/fcntl.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _LINUX_FCNTL_H -#define _LINUX_FCNTL_H - -#include <asm/fcntl.h> - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/fd.h b/i386/i386at/gpl/linux/include/linux/fd.h deleted file mode 100644 index 87a837b..0000000 --- a/i386/i386at/gpl/linux/include/linux/fd.h +++ /dev/null @@ -1,368 +0,0 @@ -#ifndef _LINUX_FD_H -#define _LINUX_FD_H - -#include <linux/ioctl.h> - -/* New file layout: Now the ioctl definitions immediately follow the - * definitions of the structures that they use */ - -/* - * Geometry - */ -struct floppy_struct { - unsigned int size, /* nr of sectors total */ - sect, /* sectors per track */ - head, /* nr of heads */ - track, /* nr of tracks */ - stretch; /* !=0 means double track steps */ -#define FD_STRETCH 1 -#define FD_SWAPSIDES 2 - - unsigned char gap, /* gap1 size */ - - rate, /* data rate. |= 0x40 for perpendicular */ -#define FD_2M 0x4 -#define FD_SIZECODEMASK 0x38 -#define FD_SIZECODE(floppy) (((((floppy)->rate&FD_SIZECODEMASK)>> 3)+ 2) %8) -#define FD_SECTSIZE(floppy) ( (floppy)->rate & FD_2M ? \ - 512 : 128 << FD_SIZECODE(floppy) ) -#define FD_PERP 0x40 - - spec1, /* stepping rate, head unload time */ - fmt_gap; /* gap2 size */ - const char * name; /* used only for predefined formats */ -}; - - -/* commands needing write access have 0x40 set */ -/* commands needing super user access have 0x80 set */ - -#define FDCLRPRM _IO(2, 0x41) -/* clear user-defined parameters */ - -#define FDSETPRM _IOW(2, 0x42, struct floppy_struct) -#define FDSETMEDIAPRM FDSETPRM -/* set user-defined parameters for current media */ - -#define FDDEFPRM _IOW(2, 0x43, struct floppy_struct) -#define FDGETPRM _IOR(2, 0x04, struct floppy_struct) -#define FDDEFMEDIAPRM FDDEFPRM -#define FDGETMEDIAPRM FDGETPRM -/* set/get disk parameters */ - - -#define FDMSGON _IO(2,0x45) -#define FDMSGOFF _IO(2,0x46) -/* issue/don't issue kernel messages on media type change */ - - -/* - * Formatting (obsolete) - */ -#define FD_FILL_BYTE 0xF6 /* format fill byte. */ - -struct format_descr { - unsigned int device,head,track; -}; - -#define FDFMTBEG _IO(2,0x47) -/* begin formatting a disk */ -#define FDFMTTRK _IOW(2,0x48, struct format_descr) -/* format the specified track */ -#define FDFMTEND _IO(2,0x49) -/* end formatting a disk */ - - -/* - * Error thresholds - */ -struct floppy_max_errors { - unsigned int - abort, /* number of errors to be reached before aborting */ - read_track, /* maximal number of errors permitted to read an - * entire track at once */ - reset, /* maximal number of errors before a reset is tried */ - recal, /* maximal number of errors before a recalibrate is - * tried */ - - /* - * Threshold for reporting FDC errors to the console. - * Setting this to zero may flood your screen when using - * ultra cheap floppies ;-) - */ - reporting; - -}; - -#define FDSETEMSGTRESH _IO(2,0x4a) -/* set fdc error reporting threshold */ - -#define FDFLUSH _IO(2,0x4b) -/* flush buffers for media; either for verifying media, or for - * handling a media change without closing the file descriptor */ - -#define FDSETMAXERRS _IOW(2, 0x4c, struct floppy_max_errors) -#define FDGETMAXERRS _IOR(2, 0x0e, struct floppy_max_errors) -/* set/get abortion and read_track threshold. See also floppy_drive_params - * structure */ - - -typedef char floppy_drive_name[16]; -#define FDGETDRVTYP _IOR(2, 0x0f, floppy_drive_name) -/* get drive type: 5 1/4 or 3 1/2 */ - - -/* - * Drive parameters (user modifyable) - */ -struct floppy_drive_params { - char cmos; /* cmos type */ - - /* Spec2 is (HLD<<1 | ND), where HLD is head load time (1=2ms, 2=4 ms - * etc) and ND is set means no DMA. Hardcoded to 6 (HLD=6ms, use DMA). - */ - unsigned long max_dtr; /* Step rate, usec */ - unsigned long hlt; /* Head load/settle time, msec */ - unsigned long hut; /* Head unload time (remnant of - * 8" drives) */ - unsigned long srt; /* Step rate, usec */ - - unsigned long spinup; /* time needed for spinup (expressed - * in jiffies) */ - unsigned long spindown; /* timeout needed for spindown */ - unsigned char spindown_offset; /* decides in which position the disk - * will stop */ - unsigned char select_delay; /* delay to wait after select */ - unsigned char rps; /* rotations per second */ - unsigned char tracks; /* maximum number of tracks */ - unsigned long timeout; /* timeout for interrupt requests */ - - unsigned char interleave_sect; /* if there are more sectors, use - * interleave */ - - struct floppy_max_errors max_errors; - - char flags; /* various flags, including ftd_msg */ -/* - * Announce successful media type detection and media information loss after - * disk changes. - * Also used to enable/disable printing of overrun warnings. - */ - -#define FTD_MSG 0x10 -#define FD_BROKEN_DCL 0x20 -#define FD_DEBUG 0x02 -#define FD_SILENT_DCL_CLEAR 0x4 -#define FD_INVERTED_DCL 0x80 - - char read_track; /* use readtrack during probing? */ - -/* - * Auto-detection. Each drive type has eight formats which are - * used in succession to try to read the disk. If the FDC cannot lock onto - * the disk, the next format is tried. This uses the variable 'probing'. - */ - short autodetect[8]; /* autodetected formats */ - - int checkfreq; /* how often should the drive be checked for disk - * changes */ - int native_format; /* native format of this drive */ -}; - -enum { - FD_NEED_TWADDLE_BIT, /* more magic */ - FD_VERIFY_BIT, /* inquire for write protection */ - FD_DISK_NEWCHANGE_BIT, /* change detected, and no action undertaken yet - * to clear media change status */ - FD_UNUSED_BIT, - FD_DISK_CHANGED_BIT, /* disk has been changed since last i/o */ - FD_DISK_WRITABLE_BIT /* disk is writable */ -}; - -#define FDSETDRVPRM _IOW(2, 0x90, struct floppy_drive_params) -#define FDGETDRVPRM _IOR(2, 0x11, struct floppy_drive_params) -/* set/get drive parameters */ - - -/* - * Current drive state (not directly modifyable by user, readonly) - */ -struct floppy_drive_struct { - signed char flags; -/* values for these flags */ -#define FD_NEED_TWADDLE (1 << FD_NEED_TWADDLE_BIT) -#define FD_VERIFY (1 << FD_VERIFY_BIT) -#define FD_DISK_NEWCHANGE (1 << FD_DISK_NEWCHANGE_BIT) -#define FD_DISK_CHANGED (1 << FD_DISK_CHANGED_BIT) -#define FD_DISK_WRITABLE (1 << FD_DISK_WRITABLE_BIT) - - unsigned long spinup_date; - unsigned long select_date; - unsigned long first_read_date; - short probed_format; - short track; /* current track */ - short maxblock; /* id of highest block read */ - short maxtrack; /* id of highest half track read */ - int generation; /* how many diskchanges? */ - -/* - * (User-provided) media information is _not_ discarded after a media change - * if the corresponding keep_data flag is non-zero. Positive values are - * decremented after each probe. - */ - int keep_data; - - /* Prevent "aliased" accesses. */ - int fd_ref; - int fd_device; - int last_checked; /* when was the drive last checked for a disk - * change? */ - - char *dmabuf; - int bufblocks; -}; - -#define FDGETDRVSTAT _IOR(2, 0x12, struct floppy_drive_struct) -#define FDPOLLDRVSTAT _IOR(2, 0x13, struct floppy_drive_struct) -/* get drive state: GET returns the cached state, POLL polls for new state */ - - -/* - * reset FDC - */ -enum reset_mode { - FD_RESET_IF_NEEDED, /* reset only if the reset flags is set */ - FD_RESET_IF_RAWCMD, /* obsolete */ - FD_RESET_ALWAYS /* reset always */ -}; -#define FDRESET _IO(2, 0x54) - - -/* - * FDC state - */ -struct floppy_fdc_state { - int spec1; /* spec1 value last used */ - int spec2; /* spec2 value last used */ - int dtr; - unsigned char version; /* FDC version code */ - unsigned char dor; - int address; /* io address */ - unsigned int rawcmd:2; - unsigned int reset:1; - unsigned int need_configure:1; - unsigned int perp_mode:2; - unsigned int has_fifo:1; - unsigned int driver_version; /* version code for floppy driver */ -#define FD_DRIVER_VERSION 0x100 -/* user programs using the floppy API should use floppy_fdc_state to - * get the version number of the floppy driver that they are running - * on. If this version number is bigger than the one compiled into the - * user program (the FD_DRIVER_VERSION define), it should be prepared - * to bigger structures - */ - - unsigned char track[4]; - /* Position of the heads of the 4 units attached to this FDC, - * as stored on the FDC. In the future, the position as stored - * on the FDC might not agree with the actual physical - * position of these drive heads. By allowing such - * disagreement, it will be possible to reset the FDC without - * incurring the expensive cost of repositioning all heads. - * Right now, these positions are hard wired to 0. */ - -}; - -#define FDGETFDCSTAT _IOR(2, 0x15, struct floppy_fdc_state) - - -/* - * Asynchronous Write error tracking - */ -struct floppy_write_errors { - /* Write error logging. - * - * These fields can be cleared with the FDWERRORCLR ioctl. - * Only writes that were attempted but failed due to a physical media - * error are logged. write(2) calls that fail and return an error code - * to the user process are not counted. - */ - - unsigned int write_errors; /* number of physical write errors - * encountered */ - - /* position of first and last write errors */ - unsigned long first_error_sector; - int first_error_generation; - unsigned long last_error_sector; - int last_error_generation; - - unsigned int badness; /* highest retry count for a read or write - * operation */ -}; - -#define FDWERRORCLR _IO(2, 0x56) -/* clear write error and badness information */ -#define FDWERRORGET _IOR(2, 0x17, struct floppy_write_errors) -/* get write error and badness information */ - - -/* - * Raw commands - */ -/* new interface flag: now we can do them in batches */ -#define FDHAVEBATCHEDRAWCMD - -struct floppy_raw_cmd { - unsigned int flags; -#define FD_RAW_READ 1 -#define FD_RAW_WRITE 2 -#define FD_RAW_NO_MOTOR 4 -#define FD_RAW_DISK_CHANGE 4 /* out: disk change flag was set */ -#define FD_RAW_INTR 8 /* wait for an interrupt */ -#define FD_RAW_SPIN 0x10 /* spin up the disk for this command */ -#define FD_RAW_NO_MOTOR_AFTER 0x20 /* switch the motor off after command - * completion */ -#define FD_RAW_NEED_DISK 0x40 /* this command needs a disk to be present */ -#define FD_RAW_NEED_SEEK 0x80 /* this command uses an implied seek (soft) */ - -/* more "in" flags */ -#define FD_RAW_MORE 0x100 /* more records follow */ -#define FD_RAW_STOP_IF_FAILURE 0x200 /* stop if we encounter a failure */ -#define FD_RAW_STOP_IF_SUCCESS 0x400 /* stop if command successful */ -#define FD_RAW_SOFTFAILURE 0x800 /* consider the return value for failure - * detection too */ - -/* more "out" flags */ -#define FD_RAW_FAILURE 0x10000 /* command sent to fdc, fdc returned error */ -#define FD_RAW_HARDFAILURE 0x20000 /* fdc had to be reset, or timed out */ - - void *data; - char *kernel_data; /* location of data buffer in the kernel */ - struct floppy_raw_cmd *next; /* used for chaining of raw cmd's - * withing the kernel */ - long length; /* in: length of dma transfer. out: remaining bytes */ - long phys_length; /* physical length, if different from dma length */ - int buffer_length; /* length of allocated buffer */ - - unsigned char rate; - unsigned char cmd_count; - unsigned char cmd[16]; - unsigned char reply_count; - unsigned char reply[16]; - int track; - int resultcode; - - int reserved1; - int reserved2; -}; - -#define FDRAWCMD _IO(2, 0x58) -/* send a raw command to the fdc. Structure size not included, because of - * batches */ - -#define FDTWADDLE _IO(2, 0x59) -/* flicker motor-on bit before reading a sector. Experimental */ - - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/fdreg.h b/i386/i386at/gpl/linux/include/linux/fdreg.h deleted file mode 100644 index 03d8893..0000000 --- a/i386/i386at/gpl/linux/include/linux/fdreg.h +++ /dev/null @@ -1,127 +0,0 @@ -#ifndef _LINUX_FDREG_H -#define _LINUX_FDREG_H -/* - * This file contains some defines for the floppy disk controller. - * Various sources. Mostly "IBM Microcomputers: A Programmers - * Handbook", Sanches and Canton. - */ - -#ifdef FDPATCHES - -#define FD_IOPORT fdc_state[fdc].address - -/* Fd controller regs. S&C, about page 340 */ -#define FD_STATUS (4 + FD_IOPORT ) -#define FD_DATA (5 + FD_IOPORT ) - -/* Digital Output Register */ -#define FD_DOR (2 + FD_IOPORT ) - -/* Digital Input Register (read) */ -#define FD_DIR (7 + FD_IOPORT ) - -/* Diskette Control Register (write)*/ -#define FD_DCR (7 + FD_IOPORT ) - -#else - -#define FD_STATUS 0x3f4 -#define FD_DATA 0x3f5 -#define FD_DOR 0x3f2 /* Digital Output Register */ -#define FD_DIR 0x3f7 /* Digital Input Register (read) */ -#define FD_DCR 0x3f7 /* Diskette Control Register (write)*/ - -#endif - -/* Bits of main status register */ -#define STATUS_BUSYMASK 0x0F /* drive busy mask */ -#define STATUS_BUSY 0x10 /* FDC busy */ -#define STATUS_DMA 0x20 /* 0- DMA mode */ -#define STATUS_DIR 0x40 /* 0- cpu->fdc */ -#define STATUS_READY 0x80 /* Data reg ready */ - -/* Bits of FD_ST0 */ -#define ST0_DS 0x03 /* drive select mask */ -#define ST0_HA 0x04 /* Head (Address) */ -#define ST0_NR 0x08 /* Not Ready */ -#define ST0_ECE 0x10 /* Equipment check error */ -#define ST0_SE 0x20 /* Seek end */ -#define ST0_INTR 0xC0 /* Interrupt code mask */ - -/* Bits of FD_ST1 */ -#define ST1_MAM 0x01 /* Missing Address Mark */ -#define ST1_WP 0x02 /* Write Protect */ -#define ST1_ND 0x04 /* No Data - unreadable */ -#define ST1_OR 0x10 /* OverRun */ -#define ST1_CRC 0x20 /* CRC error in data or addr */ -#define ST1_EOC 0x80 /* End Of Cylinder */ - -/* Bits of FD_ST2 */ -#define ST2_MAM 0x01 /* Missing Address Mark (again) */ -#define ST2_BC 0x02 /* Bad Cylinder */ -#define ST2_SNS 0x04 /* Scan Not Satisfied */ -#define ST2_SEH 0x08 /* Scan Equal Hit */ -#define ST2_WC 0x10 /* Wrong Cylinder */ -#define ST2_CRC 0x20 /* CRC error in data field */ -#define ST2_CM 0x40 /* Control Mark = deleted */ - -/* Bits of FD_ST3 */ -#define ST3_HA 0x04 /* Head (Address) */ -#define ST3_DS 0x08 /* drive is double-sided */ -#define ST3_TZ 0x10 /* Track Zero signal (1=track 0) */ -#define ST3_RY 0x20 /* drive is ready */ -#define ST3_WP 0x40 /* Write Protect */ -#define ST3_FT 0x80 /* Drive Fault */ - -/* Values for FD_COMMAND */ -#define FD_RECALIBRATE 0x07 /* move to track 0 */ -#define FD_SEEK 0x0F /* seek track */ -#define FD_READ 0xE6 /* read with MT, MFM, SKip deleted */ -#define FD_WRITE 0xC5 /* write with MT, MFM */ -#define FD_SENSEI 0x08 /* Sense Interrupt Status */ -#define FD_SPECIFY 0x03 /* specify HUT etc */ -#define FD_FORMAT 0x4D /* format one track */ -#define FD_VERSION 0x10 /* get version code */ -#define FD_CONFIGURE 0x13 /* configure FIFO operation */ -#define FD_PERPENDICULAR 0x12 /* perpendicular r/w mode */ -#define FD_GETSTATUS 0x04 /* read ST3 */ -#define FD_DUMPREGS 0x0E /* dump the contents of the fdc regs */ -#define FD_READID 0xEA /* prints the header of a sector */ -#define FD_UNLOCK 0x14 /* Fifo config unlock */ -#define FD_LOCK 0x94 /* Fifo config lock */ -#define FD_RSEEK_OUT 0x8f /* seek out (i.e. to lower tracks) */ -#define FD_RSEEK_IN 0xcf /* seek in (i.e. to higher tracks) */ -#define FD_PARTID 0x18 /* part id ("extended" version cmd) */ -#define FD_SAVE 0x2e /* save fdc regs for later restore */ - -/* DMA commands */ -#define DMA_READ 0x46 -#define DMA_WRITE 0x4A - -/* FDC version return types */ -#define FDC_NONE 0x00 -#define FDC_UNKNOWN 0x10 /* DO NOT USE THIS TYPE EXCEPT IF IDENTIFICATION - FAILS EARLY */ -#define FDC_8272A 0x20 /* Intel 8272a, NEC 765 */ -#define FDC_765ED 0x30 /* Non-Intel 1MB-compatible FDC, can't detect */ -#define FDC_82072 0x40 /* Intel 82072; 8272a + FIFO + DUMPREGS */ -#define FDC_82077_ORIG 0x50 /* Original version of 82077AA, sans LOCK */ -#define FDC_82077 0x52 /* 82077AA-1 */ -#define FDC_82077_UNKN 0x53 /* Unknown 82077 variant */ -#define FDC_82078 0x60 /* 44pin 82078 or 64pin 82078SL */ -#define FDC_82078_1 0x61 /* 82078-1 (2Mbps fdc) */ -#define FDC_S82078B 0x62 /* S82078B (first seen on Adaptec AVA-2825 VLB - * SCSI/EIDE/Floppy controller) */ -#define FDC_87306 0x63 /* National Semiconductor PC 87306 */ - -/* - * Beware: the fdc type list is roughly sorted by increasing features. - * Presence of features is tested by comparing the FDC version id with the - * "oldest" version that has the needed feature. - * If during FDC detection, an obscure test fails late in the sequence, don't - * assign FDC_UNKNOWN. Else the FDC will be treated as a dumb 8272a, or worse. - * This is especially true if the tests are unneeded. - */ - -#define FD_RESET_DELAY 20 -#endif diff --git a/i386/i386at/gpl/linux/include/linux/fs.h b/i386/i386at/gpl/linux/include/linux/fs.h deleted file mode 100644 index 278aa36..0000000 --- a/i386/i386at/gpl/linux/include/linux/fs.h +++ /dev/null @@ -1,698 +0,0 @@ -#ifndef _LINUX_FS_H -#define _LINUX_FS_H - -/* - * This file has definitions for some important file table - * structures etc. - */ - -#include <linux/linkage.h> -#include <linux/limits.h> -#include <linux/wait.h> -#include <linux/types.h> -#include <linux/vfs.h> -#include <linux/net.h> -#include <linux/kdev_t.h> -#include <linux/ioctl.h> - -/* - * It's silly to have NR_OPEN bigger than NR_FILE, but I'll fix - * that later. Anyway, now the file code is no longer dependent - * on bitmaps in unsigned longs, but uses the new fd_set structure.. - * - * Some programs (notably those using select()) may have to be - * recompiled to take full advantage of the new limits.. - */ - -/* Fixed constants first: */ -#undef NR_OPEN -#define NR_OPEN 256 - -#define NR_SUPER 64 -#define NR_IHASH 131 -#define BLOCK_SIZE 1024 -#define BLOCK_SIZE_BITS 10 - -/* And dynamically-tunable limits and defaults: */ -extern int max_inodes, nr_inodes; -extern int max_files, nr_files; -#define NR_INODE 2048 /* this should be bigger than NR_FILE */ -#define NR_FILE 1024 /* this can well be larger on a larger system */ - -#define MAY_EXEC 1 -#define MAY_WRITE 2 -#define MAY_READ 4 - -#define FMODE_READ 1 -#define FMODE_WRITE 2 - -#define READ 0 -#define WRITE 1 -#define READA 2 /* read-ahead - don't pause */ -#define WRITEA 3 /* "write-ahead" - silly, but somewhat useful */ - -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#define NIL_FILP ((struct file *)0) -#define SEL_IN 1 -#define SEL_OUT 2 -#define SEL_EX 4 - -/* - * These are the fs-independent mount-flags: up to 16 flags are supported - */ -#define MS_RDONLY 1 /* Mount read-only */ -#define MS_NOSUID 2 /* Ignore suid and sgid bits */ -#define MS_NODEV 4 /* Disallow access to device special files */ -#define MS_NOEXEC 8 /* Disallow program execution */ -#define MS_SYNCHRONOUS 16 /* Writes are synced at once */ -#define MS_REMOUNT 32 /* Alter flags of a mounted FS */ -#define S_WRITE 128 /* Write on file/directory/symlink */ -#define S_APPEND 256 /* Append-only file */ -#define S_IMMUTABLE 512 /* Immutable file */ - -/* - * Flags that can be altered by MS_REMOUNT - */ -#define MS_RMT_MASK (MS_RDONLY) - -/* - * Magic mount flag number. Has to be or-ed to the flag values. - */ -#define MS_MGC_VAL 0xC0ED0000 /* magic flag number to indicate "new" flags */ -#define MS_MGC_MSK 0xffff0000 /* magic flag number mask */ - -/* - * Note that read-only etc flags are inode-specific: setting some file-system - * flags just means all the inodes inherit those flags by default. It might be - * possible to override it selectively if you really wanted to with some - * ioctl() that is not currently implemented. - * - * Exception: MS_RDONLY is always applied to the entire file system. - */ -#define IS_RDONLY(inode) (((inode)->i_sb) && ((inode)->i_sb->s_flags & MS_RDONLY)) -#define IS_NOSUID(inode) ((inode)->i_flags & MS_NOSUID) -#define IS_NODEV(inode) ((inode)->i_flags & MS_NODEV) -#define IS_NOEXEC(inode) ((inode)->i_flags & MS_NOEXEC) -#define IS_SYNC(inode) ((inode)->i_flags & MS_SYNCHRONOUS) - -#define IS_WRITABLE(inode) ((inode)->i_flags & S_WRITE) -#define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) -#define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) - -/* the read-only stuff doesn't really belong here, but any other place is - probably as bad and I don't want to create yet another include file. */ - -#define BLKROSET _IO(0x12,93) /* set device read-only (0 = read-write) */ -#define BLKROGET _IO(0x12,94) /* get read-only status (0 = read_write) */ -#define BLKRRPART _IO(0x12,95) /* re-read partition table */ -#define BLKGETSIZE _IO(0x12,96) /* return device size */ -#define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */ -#define BLKRASET _IO(0x12,98) /* Set read ahead for block device */ -#define BLKRAGET _IO(0x12,99) /* get current read ahead setting */ - -#define BMAP_IOCTL 1 /* obsolete - kept for compatibility */ -#define FIBMAP _IO(0x00,1) /* bmap access */ -#define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ - -#ifdef __KERNEL__ - -#include <asm/bitops.h> - -extern void buffer_init(void); -extern unsigned long inode_init(unsigned long start, unsigned long end); -extern unsigned long file_table_init(unsigned long start, unsigned long end); -extern unsigned long name_cache_init(unsigned long start, unsigned long end); - -typedef char buffer_block[BLOCK_SIZE]; - -/* bh state bits */ -#define BH_Uptodate 0 /* 1 if the buffer contains valid data */ -#define BH_Dirty 1 /* 1 if the buffer is dirty */ -#define BH_Lock 2 /* 1 if the buffer is locked */ -#define BH_Req 3 /* 0 if the buffer has been invalidated */ -#define BH_Touched 4 /* 1 if the buffer has been touched (aging) */ -#define BH_Has_aged 5 /* 1 if the buffer has been aged (aging) */ -#define BH_Protected 6 /* 1 if the buffer is protected */ -#define BH_FreeOnIO 7 /* 1 to discard the buffer_head after IO */ - -/* - * Try to keep the most commonly used fields in single cache lines (16 - * bytes) to improve performance. This ordering should be - * particularly beneficial on 32-bit processors. - * - * We use the first 16 bytes for the data which is used in searches - * over the block hash lists (ie. getblk(), find_buffer() and - * friends). - * - * The second 16 bytes we use for lru buffer scans, as used by - * sync_buffers() and refill_freelist(). -- sct - */ -struct buffer_head { - /* First cache line: */ - unsigned long b_blocknr; /* block number */ - kdev_t b_dev; /* device (B_FREE = free) */ - struct buffer_head * b_next; /* Hash queue list */ - struct buffer_head * b_this_page; /* circular list of buffers in one page */ - - /* Second cache line: */ - unsigned long b_state; /* buffer state bitmap (see above) */ - struct buffer_head * b_next_free; - unsigned int b_count; /* users using this block */ - unsigned long b_size; /* block size */ - - /* Non-performance-critical data follows. */ - char * b_data; /* pointer to data block (1024 bytes) */ - unsigned int b_list; /* List that this buffer appears */ - unsigned long b_flushtime; /* Time when this (dirty) buffer - * should be written */ - unsigned long b_lru_time; /* Time when this buffer was - * last used. */ - struct wait_queue * b_wait; - struct buffer_head * b_prev; /* doubly linked list of hash-queue */ - struct buffer_head * b_prev_free; /* doubly linked list of buffers */ - struct buffer_head * b_reqnext; /* request queue */ -}; - -static inline int buffer_uptodate(struct buffer_head * bh) -{ - return test_bit(BH_Uptodate, &bh->b_state); -} - -static inline int buffer_dirty(struct buffer_head * bh) -{ - return test_bit(BH_Dirty, &bh->b_state); -} - -static inline int buffer_locked(struct buffer_head * bh) -{ - return test_bit(BH_Lock, &bh->b_state); -} - -static inline int buffer_req(struct buffer_head * bh) -{ - return test_bit(BH_Req, &bh->b_state); -} - -static inline int buffer_touched(struct buffer_head * bh) -{ - return test_bit(BH_Touched, &bh->b_state); -} - -static inline int buffer_has_aged(struct buffer_head * bh) -{ - return test_bit(BH_Has_aged, &bh->b_state); -} - -static inline int buffer_protected(struct buffer_head * bh) -{ - return test_bit(BH_Protected, &bh->b_state); -} - -#ifndef MACH -#include <linux/pipe_fs_i.h> -#include <linux/minix_fs_i.h> -#include <linux/ext_fs_i.h> -#include <linux/ext2_fs_i.h> -#include <linux/hpfs_fs_i.h> -#include <linux/msdos_fs_i.h> -#include <linux/umsdos_fs_i.h> -#include <linux/iso_fs_i.h> -#include <linux/nfs_fs_i.h> -#include <linux/xia_fs_i.h> -#include <linux/sysv_fs_i.h> -#endif - -/* - * Attribute flags. These should be or-ed together to figure out what - * has been changed! - */ -#define ATTR_MODE 1 -#define ATTR_UID 2 -#define ATTR_GID 4 -#define ATTR_SIZE 8 -#define ATTR_ATIME 16 -#define ATTR_MTIME 32 -#define ATTR_CTIME 64 -#define ATTR_ATIME_SET 128 -#define ATTR_MTIME_SET 256 -#define ATTR_FORCE 512 /* Not a change, but a change it */ - -/* - * This is the Inode Attributes structure, used for notify_change(). It - * uses the above definitions as flags, to know which values have changed. - * Also, in this manner, a Filesystem can look at only the values it cares - * about. Basically, these are the attributes that the VFS layer can - * request to change from the FS layer. - * - * Derek Atkins <warlord@MIT.EDU> 94-10-20 - */ -struct iattr { - unsigned int ia_valid; - umode_t ia_mode; - uid_t ia_uid; - gid_t ia_gid; - off_t ia_size; - time_t ia_atime; - time_t ia_mtime; - time_t ia_ctime; -}; - -#include <linux/quota.h> - -#ifdef MACH -struct inode -{ - umode_t i_mode; - kdev_t i_rdev; -}; - -struct file -{ - mode_t f_mode; - loff_t f_pos; - unsigned short f_flags; - int f_resid; - void *f_object; - void *f_np; -}; - -struct vm_area_struct; -struct page; -#else /* ! MACH */ -struct inode { - kdev_t i_dev; - unsigned long i_ino; - umode_t i_mode; - nlink_t i_nlink; - uid_t i_uid; - gid_t i_gid; - kdev_t i_rdev; - off_t i_size; - time_t i_atime; - time_t i_mtime; - time_t i_ctime; - unsigned long i_blksize; - unsigned long i_blocks; - unsigned long i_version; - unsigned long i_nrpages; - struct semaphore i_sem; - struct inode_operations *i_op; - struct super_block *i_sb; - struct wait_queue *i_wait; - struct file_lock *i_flock; - struct vm_area_struct *i_mmap; - struct page *i_pages; - struct dquot *i_dquot[MAXQUOTAS]; - struct inode *i_next, *i_prev; - struct inode *i_hash_next, *i_hash_prev; - struct inode *i_bound_to, *i_bound_by; - struct inode *i_mount; - unsigned short i_count; - unsigned short i_flags; - unsigned char i_lock; - unsigned char i_dirt; - unsigned char i_pipe; - unsigned char i_sock; - unsigned char i_seek; - unsigned char i_update; - unsigned short i_writecount; - union { - struct pipe_inode_info pipe_i; - struct minix_inode_info minix_i; - struct ext_inode_info ext_i; - struct ext2_inode_info ext2_i; - struct hpfs_inode_info hpfs_i; - struct msdos_inode_info msdos_i; - struct umsdos_inode_info umsdos_i; - struct iso_inode_info isofs_i; - struct nfs_inode_info nfs_i; - struct xiafs_inode_info xiafs_i; - struct sysv_inode_info sysv_i; - struct socket socket_i; - void * generic_ip; - } u; -}; - -struct file { - mode_t f_mode; - loff_t f_pos; - unsigned short f_flags; - unsigned short f_count; - off_t f_reada; - struct file *f_next, *f_prev; - int f_owner; /* pid or -pgrp where SIGIO should be sent */ - struct inode * f_inode; - struct file_operations * f_op; - unsigned long f_version; - void *private_data; /* needed for tty driver, and maybe others */ -}; -#endif /* ! MACH */ - -struct file_lock { - struct file_lock *fl_next; /* singly linked list for this inode */ - struct file_lock *fl_nextlink; /* doubly linked list of all locks */ - struct file_lock *fl_prevlink; /* used to simplify lock removal */ - struct file_lock *fl_block; - struct task_struct *fl_owner; - struct wait_queue *fl_wait; - struct file *fl_file; - char fl_flags; - char fl_type; - off_t fl_start; - off_t fl_end; -}; - -struct fasync_struct { - int magic; - struct fasync_struct *fa_next; /* singly linked list */ - struct file *fa_file; -}; - -#define FASYNC_MAGIC 0x4601 - -extern int fasync_helper(struct inode *, struct file *, int, struct fasync_struct **); - -#ifndef MACH -#include <linux/minix_fs_sb.h> -#include <linux/ext_fs_sb.h> -#include <linux/ext2_fs_sb.h> -#include <linux/hpfs_fs_sb.h> -#include <linux/msdos_fs_sb.h> -#include <linux/iso_fs_sb.h> -#include <linux/nfs_fs_sb.h> -#include <linux/xia_fs_sb.h> -#include <linux/sysv_fs_sb.h> - -struct super_block { - kdev_t s_dev; - unsigned long s_blocksize; - unsigned char s_blocksize_bits; - unsigned char s_lock; - unsigned char s_rd_only; - unsigned char s_dirt; - struct file_system_type *s_type; - struct super_operations *s_op; - struct dquot_operations *dq_op; - unsigned long s_flags; - unsigned long s_magic; - unsigned long s_time; - struct inode * s_covered; - struct inode * s_mounted; - struct wait_queue * s_wait; - union { - struct minix_sb_info minix_sb; - struct ext_sb_info ext_sb; - struct ext2_sb_info ext2_sb; - struct hpfs_sb_info hpfs_sb; - struct msdos_sb_info msdos_sb; - struct isofs_sb_info isofs_sb; - struct nfs_sb_info nfs_sb; - struct xiafs_sb_info xiafs_sb; - struct sysv_sb_info sysv_sb; - void *generic_sbp; - } u; -}; -#endif /* ! MACH */ - -/* - * This is the "filldir" function type, used by readdir() to let - * the kernel specify what kind of dirent layout it wants to have. - * This allows the kernel to read directories into kernel space or - * to have different dirent layouts depending on the binary type. - */ -typedef int (*filldir_t)(void *, const char *, int, off_t, ino_t); - -struct file_operations { - int (*lseek) (struct inode *, struct file *, off_t, int); - int (*read) (struct inode *, struct file *, char *, int); - int (*write) (struct inode *, struct file *, const char *, int); - int (*readdir) (struct inode *, struct file *, void *, filldir_t); - int (*select) (struct inode *, struct file *, int, select_table *); - int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); - int (*mmap) (struct inode *, struct file *, struct vm_area_struct *); - int (*open) (struct inode *, struct file *); - void (*release) (struct inode *, struct file *); - int (*fsync) (struct inode *, struct file *); - int (*fasync) (struct inode *, struct file *, int); - int (*check_media_change) (kdev_t dev); - int (*revalidate) (kdev_t dev); -}; - -struct inode_operations { - struct file_operations * default_file_ops; - int (*create) (struct inode *,const char *,int,int,struct inode **); - int (*lookup) (struct inode *,const char *,int,struct inode **); - int (*link) (struct inode *,struct inode *,const char *,int); - int (*unlink) (struct inode *,const char *,int); - int (*symlink) (struct inode *,const char *,int,const char *); - int (*mkdir) (struct inode *,const char *,int,int); - int (*rmdir) (struct inode *,const char *,int); - int (*mknod) (struct inode *,const char *,int,int,int); - int (*rename) (struct inode *,const char *,int,struct inode *,const char *,int); - int (*readlink) (struct inode *,char *,int); - int (*follow_link) (struct inode *,struct inode *,int,int,struct inode **); - int (*readpage) (struct inode *, struct page *); - int (*writepage) (struct inode *, struct page *); - int (*bmap) (struct inode *,int); - void (*truncate) (struct inode *); - int (*permission) (struct inode *, int); - int (*smap) (struct inode *,int); -}; - -struct super_operations { - void (*read_inode) (struct inode *); - int (*notify_change) (struct inode *, struct iattr *); - void (*write_inode) (struct inode *); - void (*put_inode) (struct inode *); - void (*put_super) (struct super_block *); - void (*write_super) (struct super_block *); - void (*statfs) (struct super_block *, struct statfs *, int); - int (*remount_fs) (struct super_block *, int *, char *); -}; - -struct dquot_operations { - void (*initialize) (struct inode *, short); - void (*drop) (struct inode *); - int (*alloc_block) (const struct inode *, unsigned long); - int (*alloc_inode) (const struct inode *, unsigned long); - void (*free_block) (const struct inode *, unsigned long); - void (*free_inode) (const struct inode *, unsigned long); - int (*transfer) (struct inode *, struct iattr *, char); -}; - -struct file_system_type { - struct super_block *(*read_super) (struct super_block *, void *, int); - const char *name; - int requires_dev; - struct file_system_type * next; -}; - -extern int register_filesystem(struct file_system_type *); -extern int unregister_filesystem(struct file_system_type *); - -asmlinkage int sys_open(const char *, int, int); -asmlinkage int sys_close(unsigned int); /* yes, it's really unsigned */ - -extern void kill_fasync(struct fasync_struct *fa, int sig); - -extern int getname(const char * filename, char **result); -extern void putname(char * name); -extern int do_truncate(struct inode *, unsigned long); -extern int register_blkdev(unsigned int, const char *, struct file_operations *); -extern int unregister_blkdev(unsigned int major, const char * name); -extern int blkdev_open(struct inode * inode, struct file * filp); -extern struct file_operations def_blk_fops; -extern struct inode_operations blkdev_inode_operations; - -extern int register_chrdev(unsigned int, const char *, struct file_operations *); -extern int unregister_chrdev(unsigned int major, const char * name); -extern int chrdev_open(struct inode * inode, struct file * filp); -extern struct file_operations def_chr_fops; -extern struct inode_operations chrdev_inode_operations; - -extern void init_fifo(struct inode * inode); - -extern struct file_operations connecting_fifo_fops; -extern struct file_operations read_fifo_fops; -extern struct file_operations write_fifo_fops; -extern struct file_operations rdwr_fifo_fops; -extern struct file_operations read_pipe_fops; -extern struct file_operations write_pipe_fops; -extern struct file_operations rdwr_pipe_fops; - -extern struct file_system_type *get_fs_type(const char *name); - -extern int fs_may_mount(kdev_t dev); -extern int fs_may_umount(kdev_t dev, struct inode * mount_root); -extern int fs_may_remount_ro(kdev_t dev); - -extern struct file *first_file; -extern struct super_block super_blocks[NR_SUPER]; - -extern void refile_buffer(struct buffer_head * buf); -extern void set_writetime(struct buffer_head * buf, int flag); -extern void refill_freelist(int size); -extern int try_to_free_buffer(struct buffer_head*, struct buffer_head**, int); - -extern struct buffer_head ** buffer_pages; -extern int nr_buffers; -extern int buffermem; -extern int nr_buffer_heads; - -#define BUF_CLEAN 0 -#define BUF_UNSHARED 1 /* Buffers that were shared but are not any more */ -#define BUF_LOCKED 2 /* Buffers scheduled for write */ -#define BUF_LOCKED1 3 /* Supers, inodes */ -#define BUF_DIRTY 4 /* Dirty buffers, not yet scheduled for write */ -#define BUF_SHARED 5 /* Buffers shared */ -#define NR_LIST 6 - -#ifdef MACH -extern inline void -mark_buffer_uptodate (struct buffer_head *bh, int on) -{ - if (on) - set_bit (BH_Uptodate, &bh->b_state); - else - clear_bit (BH_Uptodate, &bh->b_state); -} -#else -void mark_buffer_uptodate(struct buffer_head * bh, int on); -#endif - -extern inline void mark_buffer_clean(struct buffer_head * bh) -{ -#ifdef MACH - clear_bit(BH_Dirty, &bh->b_state); -#else - if (clear_bit(BH_Dirty, &bh->b_state)) { - if (bh->b_list == BUF_DIRTY) - refile_buffer(bh); - } -#endif -} - -extern inline void mark_buffer_dirty(struct buffer_head * bh, int flag) -{ -#ifdef MACH - set_bit(BH_Dirty, &bh->b_state); -#else - if (!set_bit(BH_Dirty, &bh->b_state)) { - set_writetime(bh, flag); - if (bh->b_list != BUF_DIRTY) - refile_buffer(bh); - } -#endif -} - -extern int check_disk_change(kdev_t dev); -#ifdef MACH -#define invalidate_inodes(dev) -#else -extern void invalidate_inodes(kdev_t dev); -#endif -extern void invalidate_inode_pages(struct inode *, unsigned long); -#ifdef MACH -#define invalidate_buffers(dev) -#else -extern void invalidate_buffers(kdev_t dev); -#endif -extern int floppy_is_wp(int minor); -extern void sync_inodes(kdev_t dev); -#ifdef MACH -#define sync_dev(dev) -#define fsync_dev(dev) -#else -extern void sync_dev(kdev_t dev); -extern int fsync_dev(kdev_t dev); -#endif -extern void sync_supers(kdev_t dev); -extern int bmap(struct inode * inode,int block); -extern int notify_change(struct inode *, struct iattr *); -extern int namei(const char * pathname, struct inode ** res_inode); -extern int lnamei(const char * pathname, struct inode ** res_inode); -#ifdef MACH -#define permission(i, m) 0 -#else -extern int permission(struct inode * inode,int mask); -#endif -extern int get_write_access(struct inode *inode); -extern void put_write_access(struct inode *inode); -extern int open_namei(const char * pathname, int flag, int mode, - struct inode ** res_inode, struct inode * base); -extern int do_mknod(const char * filename, int mode, dev_t dev); -extern int do_pipe(int *); -extern void iput(struct inode * inode); -extern struct inode * __iget(struct super_block * sb,int nr,int crsmnt); -extern struct inode * get_empty_inode(void); -extern void insert_inode_hash(struct inode *); -extern void clear_inode(struct inode *); -extern struct inode * get_pipe_inode(void); -extern struct file * get_empty_filp(void); -extern int close_fp(struct file *filp); -extern struct buffer_head * get_hash_table(kdev_t dev, int block, int size); -extern struct buffer_head * getblk(kdev_t dev, int block, int size); -extern void ll_rw_block(int rw, int nr, struct buffer_head * bh[]); -extern void ll_rw_page(int rw, kdev_t dev, unsigned long nr, char * buffer); -extern void ll_rw_swap_file(int rw, kdev_t dev, unsigned int *b, int nb, char *buffer); -extern int is_read_only(kdev_t dev); -extern void __brelse(struct buffer_head *buf); -extern inline void brelse(struct buffer_head *buf) -{ - if (buf) - __brelse(buf); -} -extern void __bforget(struct buffer_head *buf); -extern inline void bforget(struct buffer_head *buf) -{ - if (buf) - __bforget(buf); -} -extern void set_blocksize(kdev_t dev, int size); -extern struct buffer_head * bread(kdev_t dev, int block, int size); -extern struct buffer_head * breada(kdev_t dev,int block, int size, - unsigned int pos, unsigned int filesize); - -extern int generic_readpage(struct inode *, struct page *); -extern int generic_file_read(struct inode *, struct file *, char *, int); -extern int generic_mmap(struct inode *, struct file *, struct vm_area_struct *); -extern int brw_page(int, unsigned long, kdev_t, int [], int, int); - -extern void put_super(kdev_t dev); -unsigned long generate_cluster(kdev_t dev, int b[], int size); -extern kdev_t ROOT_DEV; - -extern void show_buffers(void); -extern void mount_root(void); - -extern int char_read(struct inode *, struct file *, char *, int); -extern int block_read(struct inode *, struct file *, char *, int); -extern int read_ahead[]; - -extern int char_write(struct inode *, struct file *, const char *, int); -extern int block_write(struct inode *, struct file *, const char *, int); - -extern int block_fsync(struct inode *, struct file *); -extern int file_fsync(struct inode *, struct file *); - -extern void dcache_add(struct inode *, const char *, int, unsigned long); -extern int dcache_lookup(struct inode *, const char *, int, unsigned long *); - -extern int inode_change_ok(struct inode *, struct iattr *); -extern void inode_setattr(struct inode *, struct iattr *); - -extern inline struct inode * iget(struct super_block * sb,int nr) -{ - return __iget(sb, nr, 1); -} - -/* kludge to get SCSI modules working */ -#include <linux/minix_fs.h> -#include <linux/minix_fs_sb.h> - -#endif /* __KERNEL__ */ - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/genhd.h b/i386/i386at/gpl/linux/include/linux/genhd.h deleted file mode 100644 index e1c5888..0000000 --- a/i386/i386at/gpl/linux/include/linux/genhd.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef _LINUX_GENHD_H -#define _LINUX_GENHD_H - -/* - * genhd.h Copyright (C) 1992 Drew Eckhardt - * Generic hard disk header file by - * Drew Eckhardt - * - * <drew@colorado.edu> - */ - -#define CONFIG_MSDOS_PARTITION 1 - -#ifdef __alpha__ -#define CONFIG_OSF_PARTITION 1 -#endif - -#ifdef __sparc__ -#define CONFIG_SUN_PARTITION 1 -#endif - -/* These two have identical behaviour; use the second one if DOS fdisk gets - confused about extended/logical partitions starting past cylinder 1023. */ -#define DOS_EXTENDED_PARTITION 5 -#define LINUX_EXTENDED_PARTITION 0x85 - -#define DM6_PARTITION 0x54 /* has DDO: use xlated geom & offset */ -#define EZD_PARTITION 0x55 /* EZ-DRIVE: same as DM6 (we think) */ -#define DM6_AUX1PARTITION 0x51 /* no DDO: use xlated geom */ -#define DM6_AUX3PARTITION 0x53 /* no DDO: use xlated geom */ - -#ifdef MACH_INCLUDE -struct linux_partition { -#else -struct partition { -#endif - unsigned char boot_ind; /* 0x80 - active */ - unsigned char head; /* starting head */ - unsigned char sector; /* starting sector */ - unsigned char cyl; /* starting cylinder */ - unsigned char sys_ind; /* What partition type */ - unsigned char end_head; /* end head */ - unsigned char end_sector; /* end sector */ - unsigned char end_cyl; /* end cylinder */ - unsigned int start_sect; /* starting sector counting from 0 */ - unsigned int nr_sects; /* nr of sectors in partition */ -}; - -struct hd_struct { - long start_sect; - long nr_sects; -}; - -struct gendisk { - int major; /* major number of driver */ - const char *major_name; /* name of major driver */ - int minor_shift; /* number of times minor is shifted to - get real minor */ - int max_p; /* maximum partitions per device */ - int max_nr; /* maximum number of real devices */ - - void (*init)(struct gendisk *); /* Initialization called before we do our thing */ - struct hd_struct *part; /* partition table */ - int *sizes; /* device size in blocks, copied to blk_size[] */ - int nr_real; /* number of real devices */ - - void *real_devices; /* internal use */ - struct gendisk *next; -}; - -extern struct gendisk *gendisk_head; /* linked list of disks */ - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/hdreg.h b/i386/i386at/gpl/linux/include/linux/hdreg.h deleted file mode 100644 index 58a9a5d..0000000 --- a/i386/i386at/gpl/linux/include/linux/hdreg.h +++ /dev/null @@ -1,171 +0,0 @@ -#ifndef _LINUX_HDREG_H -#define _LINUX_HDREG_H - -/* - * This file contains some defines for the AT-hd-controller. - * Various sources. - */ - -#define HD_IRQ 14 /* the standard disk interrupt */ - -/* ide.c has it's own port definitions in "ide.h" */ - -/* Hd controller regs. Ref: IBM AT Bios-listing */ -#define HD_DATA 0x1f0 /* _CTL when writing */ -#define HD_ERROR 0x1f1 /* see err-bits */ -#define HD_NSECTOR 0x1f2 /* nr of sectors to read/write */ -#define HD_SECTOR 0x1f3 /* starting sector */ -#define HD_LCYL 0x1f4 /* starting cylinder */ -#define HD_HCYL 0x1f5 /* high byte of starting cyl */ -#define HD_CURRENT 0x1f6 /* 101dhhhh , d=drive, hhhh=head */ -#define HD_STATUS 0x1f7 /* see status-bits */ -#define HD_FEATURE HD_ERROR /* same io address, read=error, write=feature */ -#define HD_PRECOMP HD_FEATURE /* obsolete use of this port - predates IDE */ -#define HD_COMMAND HD_STATUS /* same io address, read=status, write=cmd */ - -#define HD_CMD 0x3f6 /* used for resets */ -#define HD_ALTSTATUS 0x3f6 /* same as HD_STATUS but doesn't clear irq */ - -/* remainder is shared between hd.c, ide.c, ide-cd.c, and the hdparm utility */ - -/* Bits of HD_STATUS */ -#define ERR_STAT 0x01 -#define INDEX_STAT 0x02 -#define ECC_STAT 0x04 /* Corrected error */ -#define DRQ_STAT 0x08 -#define SEEK_STAT 0x10 -#define WRERR_STAT 0x20 -#define READY_STAT 0x40 -#define BUSY_STAT 0x80 - -/* Values for HD_COMMAND */ -#define WIN_RESTORE 0x10 -#define WIN_READ 0x20 -#define WIN_WRITE 0x30 -#define WIN_VERIFY 0x40 -#define WIN_FORMAT 0x50 -#define WIN_INIT 0x60 -#define WIN_SEEK 0x70 -#define WIN_DIAGNOSE 0x90 -#define WIN_SPECIFY 0x91 /* set drive geometry translation */ -#define WIN_SETIDLE1 0xE3 -#define WIN_SETIDLE2 0x97 - -#define WIN_DOORLOCK 0xde /* lock door on removeable drives */ -#define WIN_DOORUNLOCK 0xdf /* unlock door on removeable drives */ - -#define WIN_MULTREAD 0xC4 /* read sectors using multiple mode */ -#define WIN_MULTWRITE 0xC5 /* write sectors using multiple mode */ -#define WIN_SETMULT 0xC6 /* enable/disable multiple mode */ -#define WIN_IDENTIFY 0xEC /* ask drive to identify itself */ -#define WIN_SETFEATURES 0xEF /* set special drive features */ -#define WIN_READDMA 0xc8 /* read sectors using DMA transfers */ -#define WIN_WRITEDMA 0xca /* write sectors using DMA transfers */ - -/* Additional drive command codes used by ATAPI devices. */ -#define WIN_PIDENTIFY 0xA1 /* identify ATAPI device */ -#define WIN_SRST 0x08 /* ATAPI soft reset command */ -#define WIN_PACKETCMD 0xa0 /* Send a packet command. */ - -/* Bits for HD_ERROR */ -#define MARK_ERR 0x01 /* Bad address mark */ -#define TRK0_ERR 0x02 /* couldn't find track 0 */ -#define ABRT_ERR 0x04 /* Command aborted */ -#define ID_ERR 0x10 /* ID field not found */ -#define ECC_ERR 0x40 /* Uncorrectable ECC error */ -#define BBD_ERR 0x80 /* block marked bad */ - -struct hd_geometry { - unsigned char heads; - unsigned char sectors; - unsigned short cylinders; - unsigned long start; -}; - -/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x030n/0x031n */ -#define HDIO_GETGEO 0x0301 /* get device geometry */ -#define HDIO_GET_UNMASKINTR 0x0302 /* get current unmask setting */ -#define HDIO_GET_MULTCOUNT 0x0304 /* get current IDE blockmode setting */ -#define HDIO_GET_IDENTITY 0x0307 /* get IDE identification info */ -#define HDIO_GET_KEEPSETTINGS 0x0308 /* get keep-settings-on-reset flag */ -#define HDIO_GET_32BIT 0x0309 /* get current io_32bit setting */ -#define HDIO_GET_NOWERR 0x030a /* get ignore-write-error flag */ -#define HDIO_GET_DMA 0x030b /* get use-dma flag */ -#define HDIO_DRIVE_CMD 0x031f /* execute a special drive command */ - -/* hd/ide ctl's that pass (arg) non-ptr values are numbered 0x032n/0x033n */ -#define HDIO_SET_MULTCOUNT 0x0321 /* change IDE blockmode */ -#define HDIO_SET_UNMASKINTR 0x0322 /* permit other irqs during I/O */ -#define HDIO_SET_KEEPSETTINGS 0x0323 /* keep ioctl settings on reset */ -#define HDIO_SET_32BIT 0x0324 /* change io_32bit flags */ -#define HDIO_SET_NOWERR 0x0325 /* change ignore-write-error flag */ -#define HDIO_SET_DMA 0x0326 /* change use-dma flag */ -#define HDIO_SET_PIO_MODE 0x0327 /* reconfig interface to new speed */ - -/* structure returned by HDIO_GET_IDENTITY, as per ANSI ATA2 rev.2f spec */ -struct hd_driveid { - unsigned short config; /* lots of obsolete bit flags */ - unsigned short cyls; /* "physical" cyls */ - unsigned short reserved2; /* reserved (word 2) */ - unsigned short heads; /* "physical" heads */ - unsigned short track_bytes; /* unformatted bytes per track */ - unsigned short sector_bytes; /* unformatted bytes per sector */ - unsigned short sectors; /* "physical" sectors per track */ - unsigned short vendor0; /* vendor unique */ - unsigned short vendor1; /* vendor unique */ - unsigned short vendor2; /* vendor unique */ - unsigned char serial_no[20]; /* 0 = not_specified */ - unsigned short buf_type; - unsigned short buf_size; /* 512 byte increments; 0 = not_specified */ - unsigned short ecc_bytes; /* for r/w long cmds; 0 = not_specified */ - unsigned char fw_rev[8]; /* 0 = not_specified */ - unsigned char model[40]; /* 0 = not_specified */ - unsigned char max_multsect; /* 0=not_implemented */ - unsigned char vendor3; /* vendor unique */ - unsigned short dword_io; /* 0=not_implemented; 1=implemented */ - unsigned char vendor4; /* vendor unique */ - unsigned char capability; /* bits 0:DMA 1:LBA 2:IORDYsw 3:IORDYsup*/ - unsigned short reserved50; /* reserved (word 50) */ - unsigned char vendor5; /* vendor unique */ - unsigned char tPIO; /* 0=slow, 1=medium, 2=fast */ - unsigned char vendor6; /* vendor unique */ - unsigned char tDMA; /* 0=slow, 1=medium, 2=fast */ - unsigned short field_valid; /* bits 0:cur_ok 1:eide_ok */ - unsigned short cur_cyls; /* logical cylinders */ - unsigned short cur_heads; /* logical heads */ - unsigned short cur_sectors; /* logical sectors per track */ - unsigned short cur_capacity0; /* logical total sectors on drive */ - unsigned short cur_capacity1; /* (2 words, misaligned int) */ - unsigned char multsect; /* current multiple sector count */ - unsigned char multsect_valid; /* when (bit0==1) multsect is ok */ - unsigned int lba_capacity; /* total number of sectors */ - unsigned short dma_1word; /* single-word dma info */ - unsigned short dma_mword; /* multiple-word dma info */ - unsigned short eide_pio_modes; /* bits 0:mode3 1:mode4 */ - unsigned short eide_dma_min; /* min mword dma cycle time (ns) */ - unsigned short eide_dma_time; /* recommended mword dma cycle time (ns) */ - unsigned short eide_pio; /* min cycle time (ns), no IORDY */ - unsigned short eide_pio_iordy; /* min cycle time (ns), with IORDY */ - unsigned short reserved69; /* reserved (word 69) */ - unsigned short reserved70; /* reserved (word 70) */ - /* unsigned short reservedxx[57];*/ /* reserved (words 71-127) */ - /* unsigned short vendor7 [32];*/ /* vendor unique (words 128-159) */ - /* unsigned short reservedyy[96];*/ /* reserved (words 160-255) */ -}; - -#ifdef __KERNEL__ -/* - * These routines are used for kernel command line parameters from main.c: - */ -#include <linux/config.h> - -#ifdef CONFIG_BLK_DEV_HD -void hd_setup(char *, int *); -#endif /* CONFIG_BLK_DEV_HD */ -#ifdef CONFIG_BLK_DEV_IDE -void ide_setup(char *); -#endif /* CONFIG_BLK_DEV_IDE */ - -#endif /* __KERNEL__ */ - -#endif /* _LINUX_HDREG_H */ diff --git a/i386/i386at/gpl/linux/include/linux/head.h b/i386/i386at/gpl/linux/include/linux/head.h deleted file mode 100644 index 3829b1c..0000000 --- a/i386/i386at/gpl/linux/include/linux/head.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _LINUX_HEAD_H -#define _LINUX_HEAD_H - -typedef struct desc_struct { - unsigned long a,b; -} desc_table[256]; - -extern desc_table idt,gdt; - -#define GDT_NUL 0 -#define GDT_CODE 1 -#define GDT_DATA 2 -#define GDT_TMP 3 - -#define LDT_NUL 0 -#define LDT_CODE 1 -#define LDT_DATA 2 - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/if.h b/i386/i386at/gpl/linux/include/linux/if.h deleted file mode 100644 index 73ef7fe..0000000 --- a/i386/i386at/gpl/linux/include/linux/if.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Global definitions for the INET interface module. - * - * Version: @(#)if.h 1.0.2 04/18/93 - * - * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1982-1988 - * Ross Biro, <bir7@leland.Stanford.Edu> - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _LINUX_IF_H -#define _LINUX_IF_H - -#include <linux/types.h> /* for "caddr_t" et al */ -#include <linux/socket.h> /* for "struct sockaddr" et al */ - -/* Standard interface flags. */ -#define LINUX_IFF_UP 0x1 /* interface is up */ -#define LINUX_IFF_BROADCAST 0x2 /* broadcast address valid */ -#define LINUX_IFF_DEBUG 0x4 /* turn on debugging */ -#define LINUX_IFF_LOOPBACK 0x8 /* is a loopback net */ -#define LINUX_IFF_POINTOPOINT 0x10 /* interface is has p-p link */ -#define LINUX_IFF_NOTRAILERS 0x20 /* avoid use of trailers */ -#define LINUX_IFF_RUNNING 0x40 /* resources allocated */ -#define LINUX_IFF_NOARP 0x80 /* no ARP protocol */ -#define LINUX_IFF_PROMISC 0x100 /* receive all packets */ -/* Not supported */ -#define LINUX_IFF_ALLMULTI 0x200 /* receive all multicast packets*/ - -#define LINUX_IFF_MASTER 0x400 /* master of a load balancer */ -#define LINUX_IFF_SLAVE 0x800 /* slave of a load balancer */ - -#define LINUX_IFF_MULTICAST 0x1000 /* Supports multicast */ - -#ifdef MACH -#ifndef MACH_INCLUDE -#define IFF_UP LINUX_IFF_UP -#define IFF_BROADCAST LINUX_IFF_BROADCAST -#define IFF_DEBUG LINUX_IFF_DEBUG -#define IFF_LOOPBACK LINUX_IFF_LOOPBACK -#define IFF_POINTOPOINT LINUX_IFF_POINTOPOINT -#define IFF_NOTRAILERS LINUX_IFF_NOTRAILERS -#define IFF_RUNNING LINUX_IFF_RUNNING -#define IFF_NOARP LINUX_IFF_NOARP -#define IFF_PROMISC LINUX_IFF_PROMISC -#define IFF_ALLMULTI LINUX_IFF_ALLMULTI -#define IFF_MASTER LINUX_IFF_MASTER -#define IFF_SLAVE LINUX_IFF_SLAVE -#define IFF_MULTICAST LINUX_IFF_MULTICAST -#endif -#endif - -/* - * The ifaddr structure contains information about one address - * of an interface. They are maintained by the different address - * families, are allocated and attached when an address is set, - * and are linked together so all addresses for an interface can - * be located. - */ - -struct ifaddr -{ - struct sockaddr ifa_addr; /* address of interface */ - union { - struct sockaddr ifu_broadaddr; - struct sockaddr ifu_dstaddr; - } ifa_ifu; - struct iface *ifa_ifp; /* back-pointer to interface */ - struct ifaddr *ifa_next; /* next address for interface */ -}; - -#define ifa_broadaddr ifa_ifu.ifu_broadaddr /* broadcast address */ -#define ifa_dstaddr ifa_ifu.ifu_dstaddr /* other end of link */ - -/* - * Device mapping structure. I'd just gone off and designed a - * beautiful scheme using only loadable modules with arguments - * for driver options and along come the PCMCIA people 8) - * - * Ah well. The get() side of this is good for WDSETUP, and it'll - * be handy for debugging things. The set side is fine for now and - * being very small might be worth keeping for clean configuration. - */ - -struct ifmap -{ - unsigned long mem_start; - unsigned long mem_end; - unsigned short base_addr; - unsigned char irq; - unsigned char dma; - unsigned char port; - /* 3 bytes spare */ -}; - -/* - * Interface request structure used for socket - * ioctl's. All interface ioctl's must have parameter - * definitions which begin with ifr_name. The - * remainder may be interface specific. - */ - -struct ifreq -{ -#define IFHWADDRLEN 6 -#define IFNAMSIZ 16 - union - { - char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */ - } ifr_ifrn; - - union { - struct sockaddr ifru_addr; - struct sockaddr ifru_dstaddr; - struct sockaddr ifru_broadaddr; - struct sockaddr ifru_netmask; - struct sockaddr ifru_hwaddr; - short ifru_flags; - int ifru_metric; - int ifru_mtu; - struct ifmap ifru_map; - char ifru_slave[IFNAMSIZ]; /* Just fits the size */ - caddr_t ifru_data; - } ifr_ifru; -}; - -#define ifr_name ifr_ifrn.ifrn_name /* interface name */ -#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */ -#define ifr_addr ifr_ifru.ifru_addr /* address */ -#define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-p lnk */ -#define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ -#define ifr_netmask ifr_ifru.ifru_netmask /* interface net mask */ -#define ifr_flags ifr_ifru.ifru_flags /* flags */ -#define ifr_metric ifr_ifru.ifru_metric /* metric */ -#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ -#define ifr_map ifr_ifru.ifru_map /* device map */ -#define ifr_slave ifr_ifru.ifru_slave /* slave device */ -#define ifr_data ifr_ifru.ifru_data /* for use by interface */ - -/* - * Structure used in SIOCGIFCONF request. - * Used to retrieve interface configuration - * for machine (useful for programs which - * must know all networks accessible). - */ - -struct ifconf -{ - int ifc_len; /* size of buffer */ - union - { - caddr_t ifcu_buf; - struct ifreq *ifcu_req; - } ifc_ifcu; -}; -#define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ -#define ifc_req ifc_ifcu.ifcu_req /* array of structures */ - -#endif /* _LINUX_IF_H */ diff --git a/i386/i386at/gpl/linux/include/linux/if_arp.h b/i386/i386at/gpl/linux/include/linux/if_arp.h deleted file mode 100644 index fa35068..0000000 --- a/i386/i386at/gpl/linux/include/linux/if_arp.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Global definitions for the ARP (RFC 826) protocol. - * - * Version: @(#)if_arp.h 1.0.1 04/16/93 - * - * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988 - * Portions taken from the KA9Q/NOS (v2.00m PA0GRI) source. - * Ross Biro, <bir7@leland.Stanford.Edu> - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * Florian La Roche. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _LINUX_IF_ARP_H -#define _LINUX_IF_ARP_H - -/* ARP protocol HARDWARE identifiers. */ -#define ARPHRD_NETROM 0 /* from KA9Q: NET/ROM pseudo */ -#define ARPHRD_ETHER 1 /* Ethernet 10Mbps */ -#define ARPHRD_EETHER 2 /* Experimental Ethernet */ -#define ARPHRD_AX25 3 /* AX.25 Level 2 */ -#define ARPHRD_PRONET 4 /* PROnet token ring */ -#define ARPHRD_CHAOS 5 /* Chaosnet */ -#define ARPHRD_IEEE802 6 /* IEEE 802.2 Ethernet/TR/TB */ -#define ARPHRD_ARCNET 7 /* ARCnet */ -#define ARPHRD_APPLETLK 8 /* APPLEtalk */ -/* Dummy types for non ARP hardware */ -#define ARPHRD_SLIP 256 -#define ARPHRD_CSLIP 257 -#define ARPHRD_SLIP6 258 -#define ARPHRD_CSLIP6 259 -#define ARPHRD_RSRVD 260 /* Notional KISS type */ -#define ARPHRD_ADAPT 264 -#define ARPHRD_PPP 512 -#define ARPHRD_TUNNEL 768 /* IPIP tunnel */ -#define ARPHRD_TUNNEL6 769 /* IPIP6 tunnel */ -#define ARPHRD_FRAD 770 /* Frame Relay */ -#define ARPHRD_SKIP 771 /* SKIP vif */ -#define ARPHRD_LOOPBACK 772 /* Loopback device */ - -/* ARP protocol opcodes. */ -#define ARPOP_REQUEST 1 /* ARP request */ -#define ARPOP_REPLY 2 /* ARP reply */ -#define ARPOP_RREQUEST 3 /* RARP request */ -#define ARPOP_RREPLY 4 /* RARP reply */ - - -/* ARP ioctl request. */ -struct arpreq { - struct sockaddr arp_pa; /* protocol address */ - struct sockaddr arp_ha; /* hardware address */ - int arp_flags; /* flags */ - struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ - char arp_dev[16]; -}; - -struct arpreq_old { - struct sockaddr arp_pa; /* protocol address */ - struct sockaddr arp_ha; /* hardware address */ - int arp_flags; /* flags */ - struct sockaddr arp_netmask; /* netmask (only for proxy arps) */ -}; - -/* ARP Flag values. */ -#define ATF_COM 0x02 /* completed entry (ha valid) */ -#define ATF_PERM 0x04 /* permanent entry */ -#define ATF_PUBL 0x08 /* publish entry */ -#define ATF_USETRAILERS 0x10 /* has requested trailers */ -#define ATF_NETMASK 0x20 /* want to use a netmask (only - for proxy entries) */ - -/* - * This structure defines an ethernet arp header. - */ - -struct arphdr -{ - unsigned short ar_hrd; /* format of hardware address */ - unsigned short ar_pro; /* format of protocol address */ - unsigned char ar_hln; /* length of hardware address */ - unsigned char ar_pln; /* length of protocol address */ - unsigned short ar_op; /* ARP opcode (command) */ - -#if 0 - /* - * Ethernet looks like this : This bit is variable sized however... - */ - unsigned char ar_sha[ETH_ALEN]; /* sender hardware address */ - unsigned char ar_sip[4]; /* sender IP address */ - unsigned char ar_tha[ETH_ALEN]; /* target hardware address */ - unsigned char ar_tip[4]; /* target IP address */ -#endif - -}; - -#endif /* _LINUX_IF_ARP_H */ diff --git a/i386/i386at/gpl/linux/include/linux/if_ether.h b/i386/i386at/gpl/linux/include/linux/if_ether.h deleted file mode 100644 index 1407847..0000000 --- a/i386/i386at/gpl/linux/include/linux/if_ether.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Global definitions for the Ethernet IEEE 802.3 interface. - * - * Version: @(#)if_ether.h 1.0.1a 02/08/94 - * - * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * Donald Becker, <becker@super.org> - * Alan Cox, <alan@cymru.net> - * Steve Whitehouse, <gw7rrm@eeshack3.swan.ac.uk> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _LINUX_IF_ETHER_H -#define _LINUX_IF_ETHER_H - -/* IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble - and FCS/CRC (frame check sequence). */ -#define ETH_ALEN 6 /* Octets in one ethernet addr */ -#define ETH_HLEN 14 /* Total octets in header. */ -#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ -#define ETH_DATA_LEN 1500 /* Max. octets in payload */ -#define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */ - - -/* These are the defined Ethernet Protocol ID's. */ -#define ETH_P_LOOP 0x0060 /* Ethernet Loopback packet */ -#define ETH_P_ECHO 0x0200 /* Ethernet Echo packet */ -#define ETH_P_PUP 0x0400 /* Xerox PUP packet */ -#define ETH_P_IP 0x0800 /* Internet Protocol packet */ -#define ETH_P_X25 0x0805 /* CCITT X.25 */ -#define ETH_P_ARP 0x0806 /* Address Resolution packet */ -#define ETH_P_BPQ 0x08FF /* G8BPQ AX.25 Ethernet Packet [ NOT AN OFFICIALLY REGISTERED ID ] */ -#define ETH_P_DEC 0x6000 /* DEC Assigned proto */ -#define ETH_P_DNA_DL 0x6001 /* DEC DNA Dump/Load */ -#define ETH_P_DNA_RC 0x6002 /* DEC DNA Remote Console */ -#define ETH_P_DNA_RT 0x6003 /* DEC DNA Routing */ -#define ETH_P_LAT 0x6004 /* DEC LAT */ -#define ETH_P_DIAG 0x6005 /* DEC Diagnostics */ -#define ETH_P_CUST 0x6006 /* DEC Customer use */ -#define ETH_P_SCA 0x6007 /* DEC Systems Comms Arch */ -#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */ -#define ETH_P_ATALK 0x809B /* Appletalk DDP */ -#define ETH_P_AARP 0x80F3 /* Appletalk AARP */ -#define ETH_P_IPX 0x8137 /* IPX over DIX */ -#define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */ -#define ETH_P_802_3 0x0001 /* Dummy type for 802.3 frames */ -#define ETH_P_AX25 0x0002 /* Dummy protocol id for AX.25 */ -#define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */ -#define ETH_P_802_2 0x0004 /* 802.2 frames */ -#define ETH_P_SNAP 0x0005 /* Internal only */ -#define ETH_P_DDCMP 0x0006 /* DEC DDCMP: Internal only */ -#define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/ -#define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */ - -/* This is an Ethernet frame header. */ -struct ethhdr { - unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ - unsigned char h_source[ETH_ALEN]; /* source ether addr */ - unsigned short h_proto; /* packet type ID field */ -}; - -/* Ethernet statistics collection data. */ -struct enet_statistics{ - int rx_packets; /* total packets received */ - int tx_packets; /* total packets transmitted */ - int rx_errors; /* bad packets received */ - int tx_errors; /* packet transmit problems */ - int rx_dropped; /* no space in linux buffers */ - int tx_dropped; /* no space available in linux */ - int multicast; /* multicast packets received */ - int collisions; - - /* detailed rx_errors: */ - int rx_length_errors; - int rx_over_errors; /* receiver ring buff overflow */ - int rx_crc_errors; /* recved pkt with crc error */ - int rx_frame_errors; /* recv'd frame alignment error */ - int rx_fifo_errors; /* recv'r fifo overrun */ - int rx_missed_errors; /* receiver missed packet */ - - /* detailed tx_errors */ - int tx_aborted_errors; - int tx_carrier_errors; - int tx_fifo_errors; - int tx_heartbeat_errors; - int tx_window_errors; -}; - -#endif /* _LINUX_IF_ETHER_H */ diff --git a/i386/i386at/gpl/linux/include/linux/if_tr.h b/i386/i386at/gpl/linux/include/linux/if_tr.h deleted file mode 100644 index 6162933..0000000 --- a/i386/i386at/gpl/linux/include/linux/if_tr.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Global definitions for the Token-Ring IEEE 802.5 interface. - * - * Version: @(#)if_tr.h 0.0 07/11/94 - * - * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * Donald Becker, <becker@super.org> - * Peter De Schrijver, <stud11@cc4.kuleuven.ac.be> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _LINUX_IF_TR_H -#define _LINUX_IF_TR_H - - -/* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble - and FCS/CRC (frame check sequence). */ -#define TR_ALEN 6 /* Octets in one ethernet addr */ -#define TR_HLEN (sizeof(struct trh_hdr)+sizeof(struct trllc)) -#define AC 0x10 -#define LLC_FRAME 0x40 -#if 0 -#define ETH_HLEN 14 /* Total octets in header. */ -#define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ -#define ETH_DATA_LEN 1500 /* Max. octets in payload */ -#define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */ -#endif - - -/* These are some defined Ethernet Protocol ID's. */ -#define ETH_P_IP 0x0800 /* Internet Protocol packet */ -#define ETH_P_ARP 0x0806 /* Address Resolution packet */ -#define ETH_P_RARP 0x8035 /* Reverse Addr Res packet */ - -/* LLC and SNAP constants */ -#define EXTENDED_SAP 0xAA -#define UI_CMD 0x03 - -/* This is an Token-Ring frame header. */ -struct trh_hdr { - unsigned char ac; /* access control field */ - unsigned char fc; /* frame control field */ - unsigned char daddr[TR_ALEN]; /* destination address */ - unsigned char saddr[TR_ALEN]; /* source address */ - unsigned short rcf; /* route control field */ - unsigned short rseg[8];/* routing registers */ -}; - -/* This is an Token-Ring LLC structure */ -struct trllc { - unsigned char dsap; /* destination SAP */ - unsigned char ssap; /* source SAP */ - unsigned char llc; /* LLC control field */ - unsigned char protid[3]; /* protocol id */ - unsigned short ethertype; /* ether type field */ -}; - - -/* Token-Ring statistics collection data. */ -struct tr_statistics{ - int rx_packets; /* total packets received */ - int tx_packets; /* total packets transmitted */ - int rx_errors; /* bad packets received */ - int tx_errors; /* packet transmit problems */ - int rx_dropped; /* no space in linux buffers */ - int tx_dropped; /* no space available in linux */ - int multicast; /* multicast packets received */ - int transmit_collision; - - /* detailed Token-Ring errors. See IBM Token-Ring Network Architecture - for more info */ - - int line_errors; - int internal_errors; - int burst_errors; - int A_C_errors; - int abort_delimiters; - int lost_frames; - int recv_congest_count; - int frame_copied_errors; - int frequency_errors; - int token_errors; - int dummy1; - -}; - -/* source routing stuff */ - -#define TR_RII 0x80 -#define TR_RCF_DIR_BIT 0x80 -#define TR_RCF_LEN_MASK 0x1f00 -#define TR_RCF_BROADCAST 0x8000 -#define TR_RCF_LIMITED_BROADCAST 0xA000 -#define TR_RCF_FRAME2K 0x20 -#define TR_RCF_BROADCAST_MASK 0xC000 - -#endif /* _LINUX_IF_TR_H */ diff --git a/i386/i386at/gpl/linux/include/linux/igmp.h b/i386/i386at/gpl/linux/include/linux/igmp.h deleted file mode 100644 index 161528f..0000000 --- a/i386/i386at/gpl/linux/include/linux/igmp.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Linux NET3: Internet Gateway Management Protocol [IGMP] - * - * Authors: - * Alan Cox <Alan.Cox@linux.org> - * - * Extended to talk the BSD extended IGMP protocol of mrouted 3.6 - * - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#ifndef _LINUX_IGMP_H -#define _LINUX_IGMP_H - -/* - * IGMP protocol structures - */ - -/* - * Header in on cable format - */ - -struct igmphdr -{ - __u8 type; - __u8 code; /* For newer IGMP */ - __u16 csum; - __u32 group; -}; - -#define IGMP_HOST_MEMBERSHIP_QUERY 0x11 /* From RFC1112 */ -#define IGMP_HOST_MEMBERSHIP_REPORT 0x12 /* Ditto */ -#define IGMP_DVMRP 0x13 /* DVMRP routing */ -#define IGMP_PIM 0x14 /* PIM routing */ -#define IGMP_HOST_NEW_MEMBERSHIP_REPORT 0x16 /* New version of 0x11 */ -#define IGMP_HOST_LEAVE_MESSAGE 0x17 /* An extra BSD seems to send */ - -#define IGMP_MTRACE_RESP 0x1e -#define IGMP_MTRACE 0x1f - - -/* - * Use the BSD names for these for compatibility - */ - -#define IGMP_DELAYING_MEMBER 0x01 -#define IGMP_IDLE_MEMBER 0x02 -#define IGMP_LAZY_MEMBER 0x03 -#define IGMP_SLEEPING_MEMBER 0x04 -#define IGMP_AWAKENING_MEMBER 0x05 - -#define IGMP_OLD_ROUTER 0x00 -#define IGMP_NEW_ROUTER 0x01 - -#define IGMP_MINLEN 8 - -#define IGMP_MAX_HOST_REPORT_DELAY 10 /* max delay for response to */ - /* query (in seconds) */ - -#define IGMP_TIMER_SCALE 10 /* denotes that the igmphdr->timer field */ - /* specifies time in 10th of seconds */ - -#define IGMP_AGE_THRESHOLD 540 /* If this host don't hear any IGMP V1 */ - /* message in this period of time, */ - /* revert to IGMP v2 router. */ - -#define IGMP_ALL_HOSTS htonl(0xE0000001L) -#define IGMP_ALL_ROUTER htonl(0xE0000002L) -#define IGMP_LOCAL_GROUP htonl(0xE0000000L) -#define IGMP_LOCAL_GROUP_MASK htonl(0xFFFFFF00L) - -/* - * struct for keeping the multicast list in - */ - -#ifdef __KERNEL__ -struct ip_mc_socklist -{ - unsigned long multiaddr[IP_MAX_MEMBERSHIPS]; /* This is a speed trade off */ - struct device *multidev[IP_MAX_MEMBERSHIPS]; -}; - -struct ip_mc_list -{ - struct device *interface; - unsigned long multiaddr; - struct ip_mc_list *next; - struct timer_list timer; - int tm_running; - int users; -}; - -struct ip_router_info -{ - struct device *dev; - int type; /* type of router which is querier on this interface */ - int time; /* # of slow timeouts since last old query */ - struct timer_list timer; - struct ip_router_info *next; -}; - -extern struct ip_mc_list *ip_mc_head; - - -extern int igmp_rcv(struct sk_buff *, struct device *, struct options *, __u32, unsigned short, - __u32, int , struct inet_protocol *); -extern void ip_mc_drop_device(struct device *dev); -extern int ip_mc_join_group(struct sock *sk, struct device *dev, unsigned long addr); -extern int ip_mc_leave_group(struct sock *sk, struct device *dev,unsigned long addr); -extern void ip_mc_drop_socket(struct sock *sk); -extern void ip_mr_init(void); -#endif -#endif diff --git a/i386/i386at/gpl/linux/include/linux/in.h b/i386/i386at/gpl/linux/include/linux/in.h deleted file mode 100644 index c8e156e..0000000 --- a/i386/i386at/gpl/linux/include/linux/in.h +++ /dev/null @@ -1,149 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions of the Internet Protocol. - * - * Version: @(#)in.h 1.0.1 04/21/93 - * - * Authors: Original taken from the GNU Project <netinet/in.h> file. - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _LINUX_IN_H -#define _LINUX_IN_H - -#include <linux/types.h> - -/* Standard well-defined IP protocols. */ -enum { - IPPROTO_IP = 0, /* Dummy protocol for TCP */ - IPPROTO_ICMP = 1, /* Internet Control Message Protocol */ - IPPROTO_IGMP = 2, /* Internet Gateway Management Protocol */ - IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94) */ - IPPROTO_TCP = 6, /* Transmission Control Protocol */ - IPPROTO_EGP = 8, /* Exterior Gateway Protocol */ - IPPROTO_PUP = 12, /* PUP protocol */ - IPPROTO_UDP = 17, /* User Datagram Protocol */ - IPPROTO_IDP = 22, /* XNS IDP protocol */ - - IPPROTO_RAW = 255, /* Raw IP packets */ - IPPROTO_MAX -}; - - -/* Internet address. */ -struct in_addr { - __u32 s_addr; -}; - -/* Request struct for multicast socket ops */ - -struct ip_mreq -{ - struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ -}; - - -/* Structure describing an Internet (IP) socket address. */ -#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */ -struct sockaddr_in { - short int sin_family; /* Address family */ - unsigned short int sin_port; /* Port number */ - struct in_addr sin_addr; /* Internet address */ - - /* Pad to size of `struct sockaddr'. */ - unsigned char __pad[__SOCK_SIZE__ - sizeof(short int) - - sizeof(unsigned short int) - sizeof(struct in_addr)]; -}; -#define sin_zero __pad /* for BSD UNIX comp. -FvK */ - - -/* - * Definitions of the bits in an Internet address integer. - * On subnets, host and network parts are found according - * to the subnet mask, not these masks. - */ -#define IN_CLASSA(a) ((((long int) (a)) & 0x80000000) == 0) -#define IN_CLASSA_NET 0xff000000 -#define IN_CLASSA_NSHIFT 24 -#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET) -#define IN_CLASSA_MAX 128 - -#define IN_CLASSB(a) ((((long int) (a)) & 0xc0000000) == 0x80000000) -#define IN_CLASSB_NET 0xffff0000 -#define IN_CLASSB_NSHIFT 16 -#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET) -#define IN_CLASSB_MAX 65536 - -#define IN_CLASSC(a) ((((long int) (a)) & 0xe0000000) == 0xc0000000) -#define IN_CLASSC_NET 0xffffff00 -#define IN_CLASSC_NSHIFT 8 -#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET) - -#define IN_CLASSD(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000) -#define IN_MULTICAST(a) IN_CLASSD(a) -#define IN_MULTICAST_NET 0xF0000000 - -#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xe0000000) == 0xe0000000) -#define IN_BADCLASS(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000) - -/* Address to accept any incoming messages. */ -#define INADDR_ANY ((unsigned long int) 0x00000000) - -/* Address to send to all hosts. */ -#define INADDR_BROADCAST ((unsigned long int) 0xffffffff) - -/* Address indicating an error return. */ -#define INADDR_NONE 0xffffffff - -/* Network number for local host loopback. */ -#define IN_LOOPBACKNET 127 - -/* Address to loopback in software to local host. */ -#define INADDR_LOOPBACK 0x7f000001 /* 127.0.0.1 */ -#define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000) - -/* Defines for Multicast INADDR */ -#define INADDR_UNSPEC_GROUP 0xe0000000 /* 224.0.0.0 */ -#define INADDR_ALLHOSTS_GROUP 0xe0000001 /* 224.0.0.1 */ -#define INADDR_MAX_LOCAL_GROUP 0xe00000ff /* 224.0.0.255 */ - -/* <asm/byteorder.h> contains the htonl type stuff.. */ - -#include <asm/byteorder.h> - -/* Some random defines to make it easier in the kernel.. */ -#ifdef __KERNEL__ - -#define LOOPBACK(x) (((x) & htonl(0xff000000)) == htonl(0x7f000000)) -#define MULTICAST(x) (((x) & htonl(0xf0000000)) == htonl(0xe0000000)) - -#endif - -/* - * IPv6 definitions as we start to include them. This is just - * a beginning dont get excited 8) - */ - -struct in_addr6 -{ - unsigned char s6_addr[16]; -}; - -struct sockaddr_in6 -{ - unsigned short sin6_family; - unsigned short sin6_port; - unsigned long sin6_flowinfo; - struct in_addr6 sin6_addr; -}; - - -#endif /* _LINUX_IN_H */ diff --git a/i386/i386at/gpl/linux/include/linux/inet.h b/i386/i386at/gpl/linux/include/linux/inet.h deleted file mode 100644 index 9ecc9cb..0000000 --- a/i386/i386at/gpl/linux/include/linux/inet.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Swansea University Computer Society NET3 - * - * This work is derived from NET2Debugged, which is in turn derived - * from NET2D which was written by: - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * This work was derived from Ross Biro's inspirational work - * for the LINUX operating system. His version numbers were: - * - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * $Id: inet.h,v 1.1.1.1 1997/02/25 21:27:28 thomas Exp $ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _LINUX_INET_H -#define _LINUX_INET_H - -#ifdef __KERNEL__ - -extern void inet_proto_init(struct net_proto *pro); -extern char *in_ntoa(unsigned long in); -extern unsigned long in_aton(const char *str); - -#endif -#endif /* _LINUX_INET_H */ diff --git a/i386/i386at/gpl/linux/include/linux/interrupt.h b/i386/i386at/gpl/linux/include/linux/interrupt.h deleted file mode 100644 index a20cbe8..0000000 --- a/i386/i386at/gpl/linux/include/linux/interrupt.h +++ /dev/null @@ -1,91 +0,0 @@ -/* interrupt.h */ -#ifndef _LINUX_INTERRUPT_H -#define _LINUX_INTERRUPT_H - -#include <linux/kernel.h> -#include <asm/bitops.h> - -struct bh_struct { - void (*routine)(void *); - void *data; -}; - -extern unsigned long bh_active; -extern unsigned long bh_mask; -extern struct bh_struct bh_base[32]; - -asmlinkage void do_bottom_half(void); - -/* Who gets which entry in bh_base. Things which will occur most often - should come first - in which case NET should be up the top with SERIAL/TQUEUE! */ - -enum { - TIMER_BH = 0, - CONSOLE_BH, - TQUEUE_BH, - SERIAL_BH, - NET_BH, - IMMEDIATE_BH, - KEYBOARD_BH, - CYCLADES_BH, - CM206_BH -}; - -extern inline void mark_bh(int nr) -{ - set_bit(nr, &bh_active); -} - -extern inline void disable_bh(int nr) -{ - clear_bit(nr, &bh_mask); -} - -extern inline void enable_bh(int nr) -{ - set_bit(nr, &bh_mask); -} - -extern inline void start_bh_atomic(void) -{ - intr_count++; - barrier(); -} - -extern inline void end_bh_atomic(void) -{ - barrier(); - intr_count--; -} - -/* - * Autoprobing for irqs: - * - * probe_irq_on() and probe_irq_off() provide robust primitives - * for accurate IRQ probing during kernel initialization. They are - * reasonably simple to use, are not "fooled" by spurious interrupts, - * and, unlike other attempts at IRQ probing, they do not get hung on - * stuck interrupts (such as unused PS2 mouse interfaces on ASUS boards). - * - * For reasonably foolproof probing, use them as follows: - * - * 1. clear and/or mask the device's internal interrupt. - * 2. sti(); - * 3. irqs = probe_irq_on(); // "take over" all unassigned idle IRQs - * 4. enable the device and cause it to trigger an interrupt. - * 5. wait for the device to interrupt, using non-intrusive polling or a delay. - * 6. irq = probe_irq_off(irqs); // get IRQ number, 0=none, negative=multiple - * 7. service the device to clear its pending interrupt. - * 8. loop again if paranoia is required. - * - * probe_irq_on() returns a mask of allocated irq's. - * - * probe_irq_off() takes the mask as a parameter, - * and returns the irq number which occurred, - * or zero if none occurred, or a negative irq number - * if more than one irq occurred. - */ -extern unsigned long probe_irq_on(void); /* returns 0 on failure */ -extern int probe_irq_off(unsigned long); /* returns 0 or negative on failure */ - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/ioctl.h b/i386/i386at/gpl/linux/include/linux/ioctl.h deleted file mode 100644 index aa91eb3..0000000 --- a/i386/i386at/gpl/linux/include/linux/ioctl.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _LINUX_IOCTL_H -#define _LINUX_IOCTL_H - -#include <asm/ioctl.h> - -#endif /* _LINUX_IOCTL_H */ - diff --git a/i386/i386at/gpl/linux/include/linux/ioport.h b/i386/i386at/gpl/linux/include/linux/ioport.h deleted file mode 100644 index 335e3b6..0000000 --- a/i386/i386at/gpl/linux/include/linux/ioport.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * portio.h Definitions of routines for detecting, reserving and - * allocating system resources. - * - * Version: 0.01 8/30/93 - * - * Author: Donald Becker (becker@super.org) - */ - -#ifndef _LINUX_PORTIO_H -#define _LINUX_PORTIO_H - -#define HAVE_PORTRESERVE -/* - * Call check_region() before probing for your hardware. - * Once you have found you hardware, register it with request_region(). - * If you unload the driver, use release_region to free ports. - */ -extern void reserve_setup(char *str, int *ints); -extern int check_region(unsigned int from, unsigned int extent); -extern void request_region(unsigned int from, unsigned int extent,const char *name); -extern void release_region(unsigned int from, unsigned int extent); -extern int get_ioport_list(char *); - - -#define HAVE_AUTOIRQ -extern void *irq2dev_map[16]; /* Use only if you own the IRQ. */ -extern int autoirq_setup(int waittime); -extern int autoirq_report(int waittime); - -#endif /* _LINUX_PORTIO_H */ diff --git a/i386/i386at/gpl/linux/include/linux/ip.h b/i386/i386at/gpl/linux/include/linux/ip.h deleted file mode 100644 index 4d5d70c..0000000 --- a/i386/i386at/gpl/linux/include/linux/ip.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions for the IP protocol. - * - * Version: @(#)ip.h 1.0.2 04/28/93 - * - * Authors: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _LINUX_IP_H -#define _LINUX_IP_H -#include <asm/byteorder.h> - -#define IPOPT_END 0 -#define IPOPT_NOOP 1 -#define IPOPT_SEC 130 -#define IPOPT_LSRR 131 -#define IPOPT_SSRR 137 -#define IPOPT_RR 7 -#define IPOPT_SID 136 -#define IPOPT_TIMESTAMP 68 - - -#define MAXTTL 255 - -struct timestamp { - __u8 len; - __u8 ptr; -#if defined(__LITTLE_ENDIAN_BITFIELD) - __u8 flags:4, - overflow:4; -#elif defined(__BIG_ENDIAN_BITFIELD) - __u8 overflow:4, - flags:4; -#else -#error "Please fix <asm/byteorder.h>" -#endif - __u32 data[9]; -}; - - -#define MAX_ROUTE 16 - -struct route { - char route_size; - char pointer; - unsigned long route[MAX_ROUTE]; -}; - -#define IPOPT_OPTVAL 0 -#define IPOPT_OLEN 1 -#define IPOPT_OFFSET 2 -#define IPOPT_MINOFF 4 -#define MAX_IPOPTLEN 40 -#define IPOPT_NOP IPOPT_NOOP -#define IPOPT_EOL IPOPT_END -#define IPOPT_TS IPOPT_TIMESTAMP - -#define IPOPT_TS_TSONLY 0 /* timestamps only */ -#define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */ -#define IPOPT_TS_PRESPEC 2 /* specified modules only */ - -struct options { - __u32 faddr; /* Saved first hop address */ - unsigned char optlen; - unsigned char srr; - unsigned char rr; - unsigned char ts; - unsigned char is_setbyuser:1, /* Set by setsockopt? */ - is_data:1, /* Options in __data, rather than skb */ - is_strictroute:1, /* Strict source route */ - srr_is_hit:1, /* Packet destination addr was our one */ - is_changed:1, /* IP checksum more not valid */ - rr_needaddr:1, /* Need to record addr of outgoing dev */ - ts_needtime:1, /* Need to record timestamp */ - ts_needaddr:1; /* Need to record addr of outgoing dev */ - unsigned char __pad1; - unsigned char __pad2; - unsigned char __pad3; - unsigned char __data[0]; -}; - -struct iphdr { -#if defined(__LITTLE_ENDIAN_BITFIELD) - __u8 ihl:4, - version:4; -#elif defined (__BIG_ENDIAN_BITFIELD) - __u8 version:4, - ihl:4; -#else -#error "Please fix <asm/byteorder.h>" -#endif - __u8 tos; - __u16 tot_len; - __u16 id; - __u16 frag_off; - __u8 ttl; - __u8 protocol; - __u16 check; - __u32 saddr; - __u32 daddr; - /*The options start here. */ -}; - - -#endif /* _LINUX_IP_H */ diff --git a/i386/i386at/gpl/linux/include/linux/ipc.h b/i386/i386at/gpl/linux/include/linux/ipc.h deleted file mode 100644 index 3878e02..0000000 --- a/i386/i386at/gpl/linux/include/linux/ipc.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef _LINUX_IPC_H -#define _LINUX_IPC_H -#include <linux/types.h> - -typedef int key_t; /* should go in <types.h> type for IPC key */ -#define IPC_PRIVATE ((key_t) 0) - -struct ipc_perm -{ - key_t key; - ushort uid; /* owner euid and egid */ - ushort gid; - ushort cuid; /* creator euid and egid */ - ushort cgid; - ushort mode; /* access modes see mode flags below */ - ushort seq; /* sequence number */ -}; - - -/* resource get request flags */ -#define IPC_CREAT 00001000 /* create if key is nonexistent */ -#define IPC_EXCL 00002000 /* fail if key exists */ -#define IPC_NOWAIT 00004000 /* return error on wait */ - - -/* - * Control commands used with semctl, msgctl and shmctl - * see also specific commands in sem.h, msg.h and shm.h - */ -#define IPC_RMID 0 /* remove resource */ -#define IPC_SET 1 /* set ipc_perm options */ -#define IPC_STAT 2 /* get ipc_perm options */ -#define IPC_INFO 3 /* see ipcs */ - -#ifdef __KERNEL__ - -/* special shmsegs[id], msgque[id] or semary[id] values */ -#define IPC_UNUSED ((void *) -1) -#define IPC_NOID ((void *) -2) /* being allocated/destroyed */ - -/* - * These are used to wrap system calls. See ipc/util.c. - */ -struct ipc_kludge { - struct msgbuf *msgp; - long msgtyp; -}; - -#define SEMOP 1 -#define SEMGET 2 -#define SEMCTL 3 -#define MSGSND 11 -#define MSGRCV 12 -#define MSGGET 13 -#define MSGCTL 14 -#define SHMAT 21 -#define SHMDT 22 -#define SHMGET 23 -#define SHMCTL 24 - -#define IPCCALL(version,op) ((version)<<16 | (op)) - -#endif /* __KERNEL__ */ - -#endif /* _LINUX_IPC_H */ - - diff --git a/i386/i386at/gpl/linux/include/linux/kdev_t.h b/i386/i386at/gpl/linux/include/linux/kdev_t.h deleted file mode 100644 index 0497ea8..0000000 --- a/i386/i386at/gpl/linux/include/linux/kdev_t.h +++ /dev/null @@ -1,114 +0,0 @@ -#ifndef _LINUX_KDEV_T_H -#define _LINUX_KDEV_T_H -#ifdef __KERNEL__ -/* -As a preparation for the introduction of larger device numbers, -we introduce a type kdev_t to hold them. No information about -this type is known outside of this include file. - -Objects of type kdev_t designate a device. Outside of the kernel -the corresponding things are objects of type dev_t - usually an -integral type with the device major and minor in the high and low -bits, respectively. Conversion is done by - -extern kdev_t to_kdev_t(int); - -It is up to the various file systems to decide how objects of type -dev_t are stored on disk. -The only other point of contact between kernel and outside world -are the system calls stat and mknod, new versions of which will -eventually have to be used in libc. - -[Unfortunately, the floppy control ioctls fail to hide the internal -kernel structures, and the fd_device field of a struct floppy_drive_struct -is user-visible. So, it remains a dev_t for the moment, with some ugly -conversions in floppy.c.] - -Inside the kernel, we aim for a kdev_t type that is a pointer -to a structure with information about the device (like major, -minor, size, blocksize, sectorsize, name, read-only flag, -struct file_operations etc.). - -However, for the time being we let kdev_t be almost the same as dev_t: - -typedef struct { unsigned short major, minor; } kdev_t; - -Admissible operations on an object of type kdev_t: -- passing it along -- comparing it for equality with another such object -- storing it in ROOT_DEV, inode->i_dev, inode->i_rdev, sb->s_dev, - bh->b_dev, req->rq_dev, de->dc_dev, tty->device -- using its bit pattern as argument in a hash function -- finding its major and minor -- complaining about it - -An object of type kdev_t is created only by the function MKDEV(), -with the single exception of the constant 0 (no device). - -Right now the other information mentioned above is usually found -in static arrays indexed by major or major,minor. - -An obstacle to immediately using - typedef struct { ... (* lots of information *) } *kdev_t -is the case of mknod used to create a block device that the -kernel doesn't know about at present (but first learns about -when some module is inserted). - -aeb - 950811 -*/ - -/* Since MINOR(dev) is used as index in static arrays, - the kernel is not quite ready yet for larger minors. - However, everything runs fine with an arbitrary kdev_t type. */ - -#define MINORBITS 8 -#define MINORMASK ((1<<MINORBITS) - 1) - -typedef unsigned short kdev_t; - -#define MAJOR(dev) ((dev) >> MINORBITS) -#define MINOR(dev) ((dev) & MINORMASK) -#define HASHDEV(dev) (dev) -#define NODEV 0 -#define MKDEV(ma,mi) (((ma) << MINORBITS) | (mi)) -#define B_FREE 0xffff /* yuk */ - -extern char * kdevname(kdev_t); /* note: returns pointer to static data! */ - -/* -As long as device numbers in the outside world have 16 bits only, -we use these conversions. -*/ - -static inline unsigned int kdev_t_to_nr(kdev_t dev) { - return (MAJOR(dev)<<8) | MINOR(dev); -} - -static inline kdev_t to_kdev_t(int dev) -{ - int major, minor; -#if 0 - major = (dev >> 16); - if (!major) { - major = (dev >> 8); - minor = (dev & 0xff); - } else - minor = (dev & 0xffff); -#else - major = (dev >> 8); - minor = (dev & 0xff); -#endif - return MKDEV(major, minor); -} - -#else /* __KERNEL__ */ - -/* -Some programs want their definitions of MAJOR and MINOR and MKDEV -from the kernel sources. These must be the externally visible ones. -*/ -#define MAJOR(dev) ((dev)>>8) -#define MINOR(dev) ((dev) & 0xff) -#define MKDEV(ma,mi) ((ma)<<8 | (mi)) -#endif /* __KERNEL__ */ -#endif diff --git a/i386/i386at/gpl/linux/include/linux/kernel.h b/i386/i386at/gpl/linux/include/linux/kernel.h deleted file mode 100644 index d498557..0000000 --- a/i386/i386at/gpl/linux/include/linux/kernel.h +++ /dev/null @@ -1,94 +0,0 @@ -#ifndef _LINUX_KERNEL_H -#define _LINUX_KERNEL_H - -/* - * 'kernel.h' contains some often-used function prototypes etc - */ - -#ifdef __KERNEL__ - -#include <stdarg.h> -#include <linux/linkage.h> - -#define INT_MAX ((int)(~0U>>1)) -#define UINT_MAX (~0U) -#define LONG_MAX ((long)(~0UL>>1)) -#define ULONG_MAX (~0UL) - -#define STACK_MAGIC 0xdeadbeef - -#define KERN_EMERG "<0>" /* system is unusable */ -#define KERN_ALERT "<1>" /* action must be taken immediately */ -#define KERN_CRIT "<2>" /* critical conditions */ -#define KERN_ERR "<3>" /* error conditions */ -#define KERN_WARNING "<4>" /* warning conditions */ -#define KERN_NOTICE "<5>" /* normal but significant condition */ -#define KERN_INFO "<6>" /* informational */ -#define KERN_DEBUG "<7>" /* debug-level messages */ - -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) -# define NORET_TYPE __volatile__ -# define ATTRIB_NORET /**/ -# define NORET_AND /**/ -#else -# define NORET_TYPE /**/ -# define ATTRIB_NORET __attribute__((noreturn)) -# define NORET_AND noreturn, -#endif - -extern void math_error(void); -NORET_TYPE void panic(const char * fmt, ...) - __attribute__ ((NORET_AND format (printf, 1, 2))); -NORET_TYPE void do_exit(long error_code) - ATTRIB_NORET; -extern unsigned long simple_strtoul(const char *,char **,unsigned int); -extern int linux_sprintf(char * buf, const char * fmt, ...); -extern int linux_vsprintf(char *buf, const char *, va_list); -#ifndef MACH_INCLUDE -#define sprintf linux_sprintf -#define vsprintf linux_vsprintf -#endif - -extern int session_of_pgrp(int pgrp); - -extern int kill_proc(int pid, int sig, int priv); -extern int kill_pg(int pgrp, int sig, int priv); -extern int kill_sl(int sess, int sig, int priv); - -asmlinkage int printk(const char * fmt, ...) - __attribute__ ((format (printf, 1, 2))); - -/* - * This is defined as a macro, but at some point this might become a - * real subroutine that sets a flag if it returns true (to do - * BSD-style accounting where the process is flagged if it uses root - * privs). The implication of this is that you should do normal - * permissions checks first, and check suser() last. - * - * "suser()" checks against the effective user id, while "fsuser()" - * is used for file permission checking and checks against the fsuid.. - */ -#ifdef MACH -#define suser() 1 -#else -#define suser() (current->euid == 0) -#endif -#define fsuser() (current->fsuid == 0) - -#endif /* __KERNEL__ */ - -#define SI_LOAD_SHIFT 16 -struct sysinfo { - long uptime; /* Seconds since boot */ - unsigned long loads[3]; /* 1, 5, and 15 minute load averages */ - unsigned long totalram; /* Total usable main memory size */ - unsigned long freeram; /* Available memory size */ - unsigned long sharedram; /* Amount of shared memory */ - unsigned long bufferram; /* Memory used by buffers */ - unsigned long totalswap; /* Total swap space size */ - unsigned long freeswap; /* swap space still available */ - unsigned short procs; /* Number of current processes */ - char _f[22]; /* Pads structure to 64 bytes */ -}; - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/kernel_stat.h b/i386/i386at/gpl/linux/include/linux/kernel_stat.h deleted file mode 100644 index 1966490..0000000 --- a/i386/i386at/gpl/linux/include/linux/kernel_stat.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _LINUX_KERNEL_STAT_H -#define _LINUX_KERNEL_STAT_H - -#include <asm/irq.h> - -/* - * 'kernel_stat.h' contains the definitions needed for doing - * some kernel statistics (cpu usage, context switches ...), - * used by rstatd/perfmeter - */ - -#define DK_NDRIVE 4 - -struct kernel_stat { - unsigned int cpu_user, cpu_nice, cpu_system; - unsigned int dk_drive[DK_NDRIVE]; - unsigned int dk_drive_rio[DK_NDRIVE]; - unsigned int dk_drive_wio[DK_NDRIVE]; - unsigned int dk_drive_rblk[DK_NDRIVE]; - unsigned int dk_drive_wblk[DK_NDRIVE]; - unsigned int pgpgin, pgpgout; - unsigned int pswpin, pswpout; - unsigned int interrupts[NR_IRQS]; - unsigned int ipackets, opackets; - unsigned int ierrors, oerrors; - unsigned int collisions; - unsigned int context_swtch; -}; - -extern struct kernel_stat kstat; - -#endif /* _LINUX_KERNEL_STAT_H */ diff --git a/i386/i386at/gpl/linux/include/linux/limits.h b/i386/i386at/gpl/linux/include/linux/limits.h deleted file mode 100644 index d0f300c..0000000 --- a/i386/i386at/gpl/linux/include/linux/limits.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _LINUX_LIMITS_H -#define _LINUX_LIMITS_H - -#define NR_OPEN 256 - -#define NGROUPS_MAX 32 /* supplemental group IDs are available */ -#define ARG_MAX 131072 /* # bytes of args + environ for exec() */ -#define CHILD_MAX 999 /* no limit :-) */ -#define OPEN_MAX 256 /* # open files a process may have */ -#define LINK_MAX 127 /* # links a file may have */ -#define MAX_CANON 255 /* size of the canonical input queue */ -#define MAX_INPUT 255 /* size of the type-ahead buffer */ -#define NAME_MAX 255 /* # chars in a file name */ -#define PATH_MAX 1024 /* # chars in a path name */ -#define PIPE_BUF 4096 /* # bytes in atomic write to a pipe */ - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/linkage.h b/i386/i386at/gpl/linux/include/linux/linkage.h deleted file mode 100644 index c8a7a49..0000000 --- a/i386/i386at/gpl/linux/include/linux/linkage.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef _LINUX_LINKAGE_H -#define _LINUX_LINKAGE_H - -#ifdef __cplusplus -#define asmlinkage extern "C" -#else -#define asmlinkage -#endif - -#ifdef __ELF__ -#define SYMBOL_NAME_STR(X) #X -#define SYMBOL_NAME(X) X -#ifdef __STDC__ -#define SYMBOL_NAME_LABEL(X) X##: -#else -#define SYMBOL_NAME_LABEL(X) X/**/: -#endif -#else -#define SYMBOL_NAME_STR(X) "_"#X -#ifdef __STDC__ -#define SYMBOL_NAME(X) _##X -#define SYMBOL_NAME_LABEL(X) _##X##: -#else -#define SYMBOL_NAME(X) _/**/X -#define SYMBOL_NAME_LABEL(X) _/**/X/**/: -#endif -#endif - -#if !defined(__i486__) && !defined(__i586__) -#ifdef __ELF__ -#define __ALIGN .align 4,0x90 -#define __ALIGN_STR ".align 4,0x90" -#else /* __ELF__ */ -#define __ALIGN .align 2,0x90 -#define __ALIGN_STR ".align 2,0x90" -#endif /* __ELF__ */ -#else /* __i486__/__i586__ */ -#ifdef __ELF__ -#define __ALIGN .align 16,0x90 -#define __ALIGN_STR ".align 16,0x90" -#else /* __ELF__ */ -#define __ALIGN .align 4,0x90 -#define __ALIGN_STR ".align 4,0x90" -#endif /* __ELF__ */ -#endif /* __i486__/__i586__ */ - -#ifdef __ASSEMBLY__ - -#define ALIGN __ALIGN -#define ALIGN_STRING __ALIGN_STRING - -#define ENTRY(name) \ - .globl SYMBOL_NAME(name); \ - ALIGN; \ - SYMBOL_NAME_LABEL(name) - -#endif - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/locks.h b/i386/i386at/gpl/linux/include/linux/locks.h deleted file mode 100644 index c3202b0..0000000 --- a/i386/i386at/gpl/linux/include/linux/locks.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef _LINUX_LOCKS_H -#define _LINUX_LOCKS_H - -#ifndef _LINUX_MM_H -#include <linux/mm.h> -#endif -#ifndef _LINUX_PAGEMAP_H -#include <linux/pagemap.h> -#endif - -/* - * Unlocked, temporary IO buffer_heads gets moved to the reuse_list - * once their page becomes unlocked. - */ -extern struct buffer_head *reuse_list; - -/* - * Buffer cache locking - note that interrupts may only unlock, not - * lock buffers. - */ -extern void __wait_on_buffer(struct buffer_head *); - -extern inline void wait_on_buffer(struct buffer_head * bh) -{ - if (test_bit(BH_Lock, &bh->b_state)) - __wait_on_buffer(bh); -} - -extern inline void lock_buffer(struct buffer_head * bh) -{ - if (set_bit(BH_Lock, &bh->b_state)) - __wait_on_buffer(bh); -} - -void unlock_buffer(struct buffer_head *); - -#ifndef MACH -/* - * super-block locking. Again, interrupts may only unlock - * a super-block (although even this isn't done right now. - * nfs may need it). - */ -extern void __wait_on_super(struct super_block *); - -extern inline void wait_on_super(struct super_block * sb) -{ - if (sb->s_lock) - __wait_on_super(sb); -} - -extern inline void lock_super(struct super_block * sb) -{ - if (sb->s_lock) - __wait_on_super(sb); - sb->s_lock = 1; -} - -extern inline void unlock_super(struct super_block * sb) -{ - sb->s_lock = 0; - wake_up(&sb->s_wait); -} -#endif /* ! MACH */ - -#endif /* _LINUX_LOCKS_H */ - diff --git a/i386/i386at/gpl/linux/include/linux/major.h b/i386/i386at/gpl/linux/include/linux/major.h deleted file mode 100644 index c1b2dcf..0000000 --- a/i386/i386at/gpl/linux/include/linux/major.h +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef _LINUX_MAJOR_H -#define _LINUX_MAJOR_H - -/* - * This file has definitions for major device numbers - */ - -/* limits */ - -#define MAX_CHRDEV 64 -#define MAX_BLKDEV 64 - -/* - * assignments - * - * devices are as follows (same as minix, so we can use the minix fs): - * - * character block comments - * -------------------- -------------------- -------------------- - * 0 - unnamed unnamed minor 0 = true nodev - * 1 - /dev/mem ramdisk - * 2 - /dev/ptyp* floppy - * 3 - /dev/ttyp* ide0 or hd - * 4 - /dev/tty* - * 5 - /dev/tty; /dev/cua* - * 6 - lp - * 7 - /dev/vcs* - * 8 - scsi disk - * 9 - scsi tape - * 10 - mice - * 11 - scsi cdrom - * 12 - qic02 tape - * 13 - xt disk - * 14 - sound card - * 15 - cdu31a cdrom - * 16 - sockets goldstar cdrom - * 17 - af_unix optics cdrom - * 18 - af_inet sanyo cdrom - * 19 - cyclades /dev/ttyC* - * 20 - cyclades /dev/cub* mitsumi (mcdx) cdrom - * 21 - scsi generic - * 22 - ide1 - * 23 - mitsumi cdrom - * 24 - sony535 cdrom - * 25 - matsushita cdrom minors 0..3 - * 26 - matsushita cdrom 2 minors 0..3 - * 27 - qic117 tape matsushita cdrom 3 minors 0..3 - * 28 - matsushita cdrom 4 minors 0..3 - * 29 - aztech/orchid/okano/wearnes cdrom - * 32 - philips/lms cm206 cdrom - * 33 - ide2 - * 34 - z8530 driver ide3 - * 36 - netlink - */ - -#define UNNAMED_MAJOR 0 -#define MEM_MAJOR 1 -#define RAMDISK_MAJOR 1 -#define FLOPPY_MAJOR 2 -#define PTY_MASTER_MAJOR 2 -#define IDE0_MAJOR 3 -#define PTY_SLAVE_MAJOR 3 -#define HD_MAJOR IDE0_MAJOR -#define TTY_MAJOR 4 -#define TTYAUX_MAJOR 5 -#define LP_MAJOR 6 -#define VCS_MAJOR 7 -#define SCSI_DISK_MAJOR 8 -#define SCSI_TAPE_MAJOR 9 -#define MOUSE_MAJOR 10 -#define SCSI_CDROM_MAJOR 11 -#define QIC02_TAPE_MAJOR 12 -#define XT_DISK_MAJOR 13 -#define SOUND_MAJOR 14 -#define CDU31A_CDROM_MAJOR 15 -#define SOCKET_MAJOR 16 -#define GOLDSTAR_CDROM_MAJOR 16 -#define AF_UNIX_MAJOR 17 -#define OPTICS_CDROM_MAJOR 17 -#define AF_INET_MAJOR 18 -#define SANYO_CDROM_MAJOR 18 -#define CYCLADES_MAJOR 19 -#define CYCLADESAUX_MAJOR 20 -#define MITSUMI_X_CDROM_MAJOR 20 -#define SCSI_GENERIC_MAJOR 21 -#define Z8530_MAJOR 34 -#define IDE1_MAJOR 22 -#define MITSUMI_CDROM_MAJOR 23 -#define CDU535_CDROM_MAJOR 24 -#define STL_SERIALMAJOR 24 -#define MATSUSHITA_CDROM_MAJOR 25 -#define STL_CALLOUTMAJOR 25 -#define MATSUSHITA_CDROM2_MAJOR 26 -#define QIC117_TAPE_MAJOR 27 -#define MATSUSHITA_CDROM3_MAJOR 27 -#define MATSUSHITA_CDROM4_MAJOR 28 -#define STL_SIOMEMMAJOR 28 -#define AZTECH_CDROM_MAJOR 29 -#define CM206_CDROM_MAJOR 32 -#define IDE2_MAJOR 33 -#define IDE3_MAJOR 34 -#define NETLINK_MAJOR 36 -#define IDETAPE_MAJOR 37 - -/* - * Tests for SCSI devices. - */ - -#define SCSI_MAJOR(M) \ - ((M) == SCSI_DISK_MAJOR \ - || (M) == SCSI_TAPE_MAJOR \ - || (M) == SCSI_CDROM_MAJOR \ - || (M) == SCSI_GENERIC_MAJOR) - -static inline int scsi_major(int m) { - return SCSI_MAJOR(m); -} - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/malloc.h b/i386/i386at/gpl/linux/include/linux/malloc.h deleted file mode 100644 index 847383a..0000000 --- a/i386/i386at/gpl/linux/include/linux/malloc.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _LINUX_MALLOC_H -#define _LINUX_MALLOC_H - -#include <linux/mm.h> - -#ifndef MACH_INCLUDE -#define kmalloc linux_kmalloc -#define kfree linux_kfree -#endif - -void *linux_kmalloc(unsigned int size, int priority); -void linux_kfree(void * obj); - -#define kfree_s(a,b) linux_kfree(a) - -#endif /* _LINUX_MALLOC_H */ diff --git a/i386/i386at/gpl/linux/include/linux/math_emu.h b/i386/i386at/gpl/linux/include/linux/math_emu.h deleted file mode 100644 index 0d9606d..0000000 --- a/i386/i386at/gpl/linux/include/linux/math_emu.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _LINUX_MATH_EMU_H -#define _LINUX_MATH_EMU_H - -struct fpu_reg { - char sign; - char tag; - long exp; - unsigned sigl; - unsigned sigh; -}; - - -/* This structure matches the layout of the data saved to the stack - following a device-not-present interrupt, part of it saved - automatically by the 80386/80486. - */ -struct info { - long ___orig_eip; - long ___ret_from_system_call; - long ___ebx; - long ___ecx; - long ___edx; - long ___esi; - long ___edi; - long ___ebp; - long ___eax; - long ___ds; - long ___es; - long ___fs; - long ___gs; - long ___orig_eax; - long ___eip; - long ___cs; - long ___eflags; - long ___esp; - long ___ss; - long ___vm86_es; /* This and the following only in vm86 mode */ - long ___vm86_ds; - long ___vm86_fs; - long ___vm86_gs; -}; - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/mc146818rtc.h b/i386/i386at/gpl/linux/include/linux/mc146818rtc.h deleted file mode 100644 index d2e709a..0000000 --- a/i386/i386at/gpl/linux/include/linux/mc146818rtc.h +++ /dev/null @@ -1,109 +0,0 @@ -/* mc146818rtc.h - register definitions for the Real-Time-Clock / CMOS RAM - * Copyright Torsten Duwe <duwe@informatik.uni-erlangen.de> 1993 - * derived from Data Sheet, Copyright Motorola 1984 (!). - * It was written to be part of the Linux operating system. - */ -/* permission is hereby granted to copy, modify and redistribute this code - * in terms of the GNU Library General Public License, Version 2 or later, - * at your option. - */ - -#ifndef _MC146818RTC_H -#define _MC146818RTC_H -#include <asm/io.h> - -#ifndef RTC_PORT -#define RTC_PORT(x) (0x70 + (x)) -#define RTC_ALWAYS_BCD 1 -#endif - -#define CMOS_READ(addr) ({ \ -outb_p((addr),RTC_PORT(0)); \ -inb_p(RTC_PORT(1)); \ -}) -#define CMOS_WRITE(val, addr) ({ \ -outb_p((addr),RTC_PORT(0)); \ -outb_p((val),RTC_PORT(1)); \ -}) - -/********************************************************************** - * register summary - **********************************************************************/ -#define RTC_SECONDS 0 -#define RTC_SECONDS_ALARM 1 -#define RTC_MINUTES 2 -#define RTC_MINUTES_ALARM 3 -#define RTC_HOURS 4 -#define RTC_HOURS_ALARM 5 -/* RTC_*_alarm is always true if 2 MSBs are set */ -# define RTC_ALARM_DONT_CARE 0xC0 - -#define RTC_DAY_OF_WEEK 6 -#define RTC_DAY_OF_MONTH 7 -#define RTC_MONTH 8 -#define RTC_YEAR 9 - -/* control registers - Moto names - */ -#define RTC_REG_A 10 -#define RTC_REG_B 11 -#define RTC_REG_C 12 -#define RTC_REG_D 13 - -/********************************************************************** - * register details - **********************************************************************/ -#define RTC_FREQ_SELECT RTC_REG_A - -/* update-in-progress - set to "1" 244 microsecs before RTC goes off the bus, - * reset after update (may take 1.984ms @ 32768Hz RefClock) is complete, - * totalling to a max high interval of 2.228 ms. - */ -# define RTC_UIP 0x80 -# define RTC_DIV_CTL 0x70 - /* divider control: refclock values 4.194 / 1.049 MHz / 32.768 kHz */ -# define RTC_REF_CLCK_4MHZ 0x00 -# define RTC_REF_CLCK_1MHZ 0x10 -# define RTC_REF_CLCK_32KHZ 0x20 - /* 2 values for divider stage reset, others for "testing purposes only" */ -# define RTC_DIV_RESET1 0x60 -# define RTC_DIV_RESET2 0x70 - /* Periodic intr. / Square wave rate select. 0=none, 1=32.8kHz,... 15=2Hz */ -# define RTC_RATE_SELECT 0x0F - -/**********************************************************************/ -#define RTC_CONTROL RTC_REG_B -# define RTC_SET 0x80 /* disable updates for clock setting */ -# define RTC_PIE 0x40 /* periodic interrupt enable */ -# define RTC_AIE 0x20 /* alarm interrupt enable */ -# define RTC_UIE 0x10 /* update-finished interrupt enable */ -# define RTC_SQWE 0x08 /* enable square-wave output */ -# define RTC_DM_BINARY 0x04 /* all time/date values are BCD if clear */ -# define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */ -# define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */ - -/**********************************************************************/ -#define RTC_INTR_FLAGS RTC_REG_C -/* caution - cleared by read */ -# define RTC_IRQF 0x80 /* any of the following 3 is active */ -# define RTC_PF 0x40 -# define RTC_AF 0x20 -# define RTC_UF 0x10 - -/**********************************************************************/ -#define RTC_VALID RTC_REG_D -# define RTC_VRT 0x80 /* valid RAM and time */ -/**********************************************************************/ - -/* example: !(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) - * determines if the following two #defines are needed - */ -#ifndef BCD_TO_BIN -#define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10) -#endif - -#ifndef BIN_TO_BCD -#define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10) -#endif - -#endif /* _MC146818RTC_H */ diff --git a/i386/i386at/gpl/linux/include/linux/minix_fs.h b/i386/i386at/gpl/linux/include/linux/minix_fs.h deleted file mode 100644 index f0ecdea..0000000 --- a/i386/i386at/gpl/linux/include/linux/minix_fs.h +++ /dev/null @@ -1,135 +0,0 @@ -#ifndef _LINUX_MINIX_FS_H -#define _LINUX_MINIX_FS_H - -/* - * The minix filesystem constants/structures - */ - -/* - * Thanks to Kees J Bot for sending me the definitions of the new - * minix filesystem (aka V2) with bigger inodes and 32-bit block - * pointers. - */ - -#define MINIX_ROOT_INO 1 - -/* Not the same as the bogus LINK_MAX in <linux/limits.h>. Oh well. */ -#define MINIX_LINK_MAX 250 - -#define MINIX_I_MAP_SLOTS 8 -#define MINIX_Z_MAP_SLOTS 64 -#define MINIX_SUPER_MAGIC 0x137F /* original minix fs */ -#define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ -#define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */ -#define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */ -#define MINIX_VALID_FS 0x0001 /* Clean fs. */ -#define MINIX_ERROR_FS 0x0002 /* fs has errors. */ - -#define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode))) -#define MINIX2_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix2_inode))) - -#define MINIX_V1 0x0001 /* original minix fs */ -#define MINIX_V2 0x0002 /* minix V2 fs */ - -#define INODE_VERSION(inode) inode->i_sb->u.minix_sb.s_version - -/* - * This is the original minix inode layout on disk. - * Note the 8-bit gid and atime and ctime. - */ -struct minix_inode { - __u16 i_mode; - __u16 i_uid; - __u32 i_size; - __u32 i_time; - __u8 i_gid; - __u8 i_nlinks; - __u16 i_zone[9]; -}; - -/* - * The new minix inode has all the time entries, as well as - * long block numbers and a third indirect block (7+1+1+1 - * instead of 7+1+1). Also, some previously 8-bit values are - * now 16-bit. The inode is now 64 bytes instead of 32. - */ -struct minix2_inode { - __u16 i_mode; - __u16 i_nlinks; - __u16 i_uid; - __u16 i_gid; - __u32 i_size; - __u32 i_atime; - __u32 i_mtime; - __u32 i_ctime; - __u32 i_zone[10]; -}; - -/* - * minix super-block data on disk - */ -struct minix_super_block { - __u16 s_ninodes; - __u16 s_nzones; - __u16 s_imap_blocks; - __u16 s_zmap_blocks; - __u16 s_firstdatazone; - __u16 s_log_zone_size; - __u32 s_max_size; - __u16 s_magic; - __u16 s_state; - __u32 s_zones; -}; - -struct minix_dir_entry { - __u16 inode; - char name[0]; -}; - -#ifdef __KERNEL__ - -extern int minix_lookup(struct inode * dir,const char * name, int len, - struct inode ** result); -extern int minix_create(struct inode * dir,const char * name, int len, int mode, - struct inode ** result); -extern int minix_mkdir(struct inode * dir, const char * name, int len, int mode); -extern int minix_rmdir(struct inode * dir, const char * name, int len); -extern int minix_unlink(struct inode * dir, const char * name, int len); -extern int minix_symlink(struct inode * inode, const char * name, int len, - const char * symname); -extern int minix_link(struct inode * oldinode, struct inode * dir, const char * name, int len); -extern int minix_mknod(struct inode * dir, const char * name, int len, int mode, int rdev); -extern int minix_rename(struct inode * old_dir, const char * old_name, int old_len, - struct inode * new_dir, const char * new_name, int new_len); -extern struct inode * minix_new_inode(const struct inode * dir); -extern void minix_free_inode(struct inode * inode); -extern unsigned long minix_count_free_inodes(struct super_block *sb); -extern int minix_new_block(struct super_block * sb); -extern void minix_free_block(struct super_block * sb, int block); -extern unsigned long minix_count_free_blocks(struct super_block *sb); - -extern int minix_bmap(struct inode *,int); - -extern struct buffer_head * minix_getblk(struct inode *, int, int); -extern struct buffer_head * minix_bread(struct inode *, int, int); - -extern void minix_truncate(struct inode *); -extern void minix_put_super(struct super_block *); -extern struct super_block *minix_read_super(struct super_block *,void *,int); -extern int init_minix_fs(void); -extern void minix_write_super(struct super_block *); -extern int minix_remount (struct super_block * sb, int * flags, char * data); -extern void minix_read_inode(struct inode *); -extern void minix_write_inode(struct inode *); -extern void minix_put_inode(struct inode *); -extern void minix_statfs(struct super_block *, struct statfs *, int); -extern int minix_sync_inode(struct inode *); -extern int minix_sync_file(struct inode *, struct file *); - -extern struct inode_operations minix_file_inode_operations; -extern struct inode_operations minix_dir_inode_operations; -extern struct inode_operations minix_symlink_inode_operations; - -#endif /* __KERNEL__ */ - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/minix_fs_sb.h b/i386/i386at/gpl/linux/include/linux/minix_fs_sb.h deleted file mode 100644 index e77b4ef..0000000 --- a/i386/i386at/gpl/linux/include/linux/minix_fs_sb.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _MINIX_FS_SB -#define _MINIX_FS_SB - -/* - * minix super-block data in memory - */ -struct minix_sb_info { - unsigned long s_ninodes; - unsigned long s_nzones; - unsigned long s_imap_blocks; - unsigned long s_zmap_blocks; - unsigned long s_firstdatazone; - unsigned long s_log_zone_size; - unsigned long s_max_size; - struct buffer_head * s_imap[8]; - struct buffer_head * s_zmap[64]; - unsigned long s_dirsize; - unsigned long s_namelen; - struct buffer_head * s_sbh; - struct minix_super_block * s_ms; - unsigned short s_mount_state; - unsigned short s_version; -}; - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/mm.h b/i386/i386at/gpl/linux/include/linux/mm.h deleted file mode 100644 index f8bbb9b..0000000 --- a/i386/i386at/gpl/linux/include/linux/mm.h +++ /dev/null @@ -1,297 +0,0 @@ -#ifndef _LINUX_MM_H -#define _LINUX_MM_H - -#include <linux/sched.h> -#include <linux/errno.h> -#include <linux/kernel.h> -#include <linux/string.h> - -extern unsigned long high_memory; - -#include <asm/page.h> - -#ifdef __KERNEL__ - -#define VERIFY_READ 0 -#define VERIFY_WRITE 1 - -extern int verify_area(int, const void *, unsigned long); - -/* - * Linux kernel virtual memory manager primitives. - * The idea being to have a "virtual" mm in the same way - * we have a virtual fs - giving a cleaner interface to the - * mm details, and allowing different kinds of memory mappings - * (from shared memory to executable loading to arbitrary - * mmap() functions). - */ - -/* - * This struct defines a memory VMM memory area. There is one of these - * per VM-area/task. A VM area is any part of the process virtual memory - * space that has a special rule for the page-fault handlers (ie a shared - * library, the executable area etc). - */ -struct vm_area_struct { - struct mm_struct * vm_mm; /* VM area parameters */ - unsigned long vm_start; - unsigned long vm_end; - pgprot_t vm_page_prot; - unsigned short vm_flags; -/* AVL tree of VM areas per task, sorted by address */ - short vm_avl_height; - struct vm_area_struct * vm_avl_left; - struct vm_area_struct * vm_avl_right; -/* linked list of VM areas per task, sorted by address */ - struct vm_area_struct * vm_next; -/* for areas with inode, the circular list inode->i_mmap */ -/* for shm areas, the circular list of attaches */ -/* otherwise unused */ - struct vm_area_struct * vm_next_share; - struct vm_area_struct * vm_prev_share; -/* more */ - struct vm_operations_struct * vm_ops; - unsigned long vm_offset; - struct inode * vm_inode; - unsigned long vm_pte; /* shared mem */ -}; - -/* - * vm_flags.. - */ -#define VM_READ 0x0001 /* currently active flags */ -#define VM_WRITE 0x0002 -#define VM_EXEC 0x0004 -#define VM_SHARED 0x0008 - -#define VM_MAYREAD 0x0010 /* limits for mprotect() etc */ -#define VM_MAYWRITE 0x0020 -#define VM_MAYEXEC 0x0040 -#define VM_MAYSHARE 0x0080 - -#define VM_GROWSDOWN 0x0100 /* general info on the segment */ -#define VM_GROWSUP 0x0200 -#define VM_SHM 0x0400 /* shared memory area, don't swap out */ -#define VM_DENYWRITE 0x0800 /* ETXTBSY on write attempts.. */ - -#define VM_EXECUTABLE 0x1000 -#define VM_LOCKED 0x2000 - -#define VM_STACK_FLAGS 0x0177 - -/* - * mapping from the currently active vm_flags protection bits (the - * low four bits) to a page protection mask.. - */ -extern pgprot_t protection_map[16]; - - -/* - * These are the virtual MM functions - opening of an area, closing and - * unmapping it (needed to keep files on disk up-to-date etc), pointer - * to the functions called when a no-page or a wp-page exception occurs. - */ -struct vm_operations_struct { - void (*open)(struct vm_area_struct * area); - void (*close)(struct vm_area_struct * area); - void (*unmap)(struct vm_area_struct *area, unsigned long, size_t); - void (*protect)(struct vm_area_struct *area, unsigned long, size_t, unsigned int newprot); - int (*sync)(struct vm_area_struct *area, unsigned long, size_t, unsigned int flags); - void (*advise)(struct vm_area_struct *area, unsigned long, size_t, unsigned int advise); - unsigned long (*nopage)(struct vm_area_struct * area, unsigned long address, int write_access); - unsigned long (*wppage)(struct vm_area_struct * area, unsigned long address, - unsigned long page); - int (*swapout)(struct vm_area_struct *, unsigned long, pte_t *); - pte_t (*swapin)(struct vm_area_struct *, unsigned long, unsigned long); -}; - -/* - * Try to keep the most commonly accessed fields in single cache lines - * here (16 bytes or greater). This ordering should be particularly - * beneficial on 32-bit processors. - * - * The first line is data used in linear searches (eg. clock algorithm - * scans). The second line is data used in page searches through the - * page-cache. -- sct - */ -typedef struct page { - unsigned int count; - unsigned dirty:16, - age:8, - uptodate:1, - error:1, - referenced:1, - locked:1, - free_after:1, - unused:2, - reserved:1; - struct wait_queue *wait; - struct page *next; - - struct page *next_hash; - unsigned long offset; - struct inode *inode; - struct page *write_list; - - struct page *prev; - struct page *prev_hash; -} mem_map_t; - -extern mem_map_t * mem_map; - -/* - * Free area management - */ - -#define NR_MEM_LISTS 6 - -struct mem_list { - struct mem_list * next; - struct mem_list * prev; -}; - -extern struct mem_list free_area_list[NR_MEM_LISTS]; -extern unsigned int * free_area_map[NR_MEM_LISTS]; - -/* - * This is timing-critical - most of the time in getting a new page - * goes to clearing the page. If you want a page without the clearing - * overhead, just use __get_free_page() directly.. - */ -#define __get_free_page(priority) __get_free_pages((priority),0,~0UL) -#define __get_dma_pages(priority, order) __get_free_pages((priority),(order),MAX_DMA_ADDRESS) -extern unsigned long __get_free_pages(int priority, unsigned long gfporder, unsigned long max_addr); - -extern inline unsigned long get_free_page(int priority) -{ - unsigned long page; - - page = __get_free_page(priority); - if (page) - memset((void *) page, 0, PAGE_SIZE); - return page; -} - -/* memory.c & swap.c*/ - -#define free_page(addr) free_pages((addr),0) -extern void free_pages(unsigned long addr, unsigned long order); - -extern void show_free_areas(void); -extern unsigned long put_dirty_page(struct task_struct * tsk,unsigned long page, - unsigned long address); - -extern void free_page_tables(struct task_struct * tsk); -extern void clear_page_tables(struct task_struct * tsk); -extern int new_page_tables(struct task_struct * tsk); -extern int copy_page_tables(struct task_struct * to); - -extern int zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long size); -extern int copy_page_range(struct mm_struct *dst, struct mm_struct *src, struct vm_area_struct *vma); -extern int remap_page_range(unsigned long from, unsigned long to, unsigned long size, pgprot_t prot); -extern int zeromap_page_range(unsigned long from, unsigned long size, pgprot_t prot); - -extern void vmtruncate(struct inode * inode, unsigned long offset); -extern void handle_mm_fault(struct vm_area_struct *vma, unsigned long address, int write_access); -extern void do_wp_page(struct task_struct * tsk, struct vm_area_struct * vma, unsigned long address, int write_access); -extern void do_no_page(struct task_struct * tsk, struct vm_area_struct * vma, unsigned long address, int write_access); - -extern unsigned long paging_init(unsigned long start_mem, unsigned long end_mem); -extern void mem_init(unsigned long start_mem, unsigned long end_mem); -extern void show_mem(void); -extern void oom(struct task_struct * tsk); -extern void si_meminfo(struct sysinfo * val); - -/* vmalloc.c */ - -extern void * vmalloc(unsigned long size); -extern void * vremap(unsigned long offset, unsigned long size); -extern void vfree(void * addr); -extern int vread(char *buf, char *addr, int count); - -/* mmap.c */ -extern unsigned long do_mmap(struct file * file, unsigned long addr, unsigned long len, - unsigned long prot, unsigned long flags, unsigned long off); -extern void merge_segments(struct task_struct *, unsigned long, unsigned long); -extern void insert_vm_struct(struct task_struct *, struct vm_area_struct *); -extern void remove_shared_vm_struct(struct vm_area_struct *); -extern void build_mmap_avl(struct mm_struct *); -extern void exit_mmap(struct mm_struct *); -extern int do_munmap(unsigned long, size_t); -extern unsigned long get_unmapped_area(unsigned long, unsigned long); - -/* filemap.c */ -extern unsigned long page_unuse(unsigned long); -extern int shrink_mmap(int, unsigned long); -extern void truncate_inode_pages(struct inode *, unsigned long); - -#define GFP_BUFFER 0x00 -#define GFP_ATOMIC 0x01 -#define GFP_USER 0x02 -#define GFP_KERNEL 0x03 -#define GFP_NOBUFFER 0x04 -#define GFP_NFS 0x05 - -/* Flag - indicates that the buffer will be suitable for DMA. Ignored on some - platforms, used as appropriate on others */ - -#define GFP_DMA 0x80 - -#define GFP_LEVEL_MASK 0xf - -#define avl_empty (struct vm_area_struct *) NULL - -#ifndef MACH -static inline int expand_stack(struct vm_area_struct * vma, unsigned long address) -{ - unsigned long grow; - - address &= PAGE_MASK; - if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur) - return -ENOMEM; - grow = vma->vm_start - address; - vma->vm_start = address; - vma->vm_offset -= grow; - vma->vm_mm->total_vm += grow >> PAGE_SHIFT; - if (vma->vm_flags & VM_LOCKED) - vma->vm_mm->locked_vm += grow >> PAGE_SHIFT; - return 0; -} - -/* Look up the first VMA which satisfies addr < vm_end, NULL if none. */ -static inline struct vm_area_struct * find_vma (struct task_struct * task, unsigned long addr) -{ - struct vm_area_struct * result = NULL; - struct vm_area_struct * tree; - - if (!task->mm) - return NULL; - for (tree = task->mm->mmap_avl ; ; ) { - if (tree == avl_empty) - return result; - if (tree->vm_end > addr) { - if (tree->vm_start <= addr) - return tree; - result = tree; - tree = tree->vm_avl_left; - } else - tree = tree->vm_avl_right; - } -} - -/* Look up the first VMA which intersects the interval start_addr..end_addr-1, - NULL if none. Assume start_addr < end_addr. */ -static inline struct vm_area_struct * find_vma_intersection (struct task_struct * task, unsigned long start_addr, unsigned long end_addr) -{ - struct vm_area_struct * vma; - - vma = find_vma(task,start_addr); - if (!vma || end_addr <= vma->vm_start) - return NULL; - return vma; -} -#endif /* ! MACH */ - -#endif /* __KERNEL__ */ - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/module.h b/i386/i386at/gpl/linux/include/linux/module.h deleted file mode 100644 index a91ad19..0000000 --- a/i386/i386at/gpl/linux/include/linux/module.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Dynamic loading of modules into the kernel. - * - * Modified by Bjorn Ekwall <bj0rn@blox.se> - */ - -#ifndef _LINUX_MODULE_H -#define _LINUX_MODULE_H - -#ifdef __GENKSYMS__ -# define _set_ver(sym,vers) sym -# undef MODVERSIONS -# define MODVERSIONS -#else /* ! __GENKSYMS__ */ -# if defined(MODVERSIONS) && !defined(MODULE) && defined(EXPORT_SYMTAB) -# define _set_ver(sym,vers) sym -# include <linux/modversions.h> -# endif -#endif /* __GENKSYMS__ */ - -/* values of module.state */ -#define MOD_UNINITIALIZED 0 -#define MOD_RUNNING 1 -#define MOD_DELETED 2 - -/* maximum length of module name */ -#define MOD_MAX_NAME 64 - -/* magic marker for modules inserted from kerneld, to be auto-reaped */ -#define MOD_AUTOCLEAN 0x40000000 /* big enough, but no sign problems... */ - -/* maximum length of symbol name */ -#define SYM_MAX_NAME 60 - -struct kernel_sym { /* sent to "insmod" */ - unsigned long value; /* value of symbol */ - char name[SYM_MAX_NAME]; /* name of symbol */ -}; - -struct module_ref { - struct module *module; - struct module_ref *next; -}; - -struct internal_symbol { - void *addr; - const char *name; - }; - -struct symbol_table { /* received from "insmod" */ - int size; /* total, including string table!!! */ - int n_symbols; - int n_refs; - struct internal_symbol symbol[0]; /* actual size defined by n_symbols */ - struct module_ref ref[0]; /* actual size defined by n_refs */ -}; -/* - * Note: The string table follows immediately after the symbol table in memory! - */ - -struct module { - struct module *next; - struct module_ref *ref; /* the list of modules that refer to me */ - struct symbol_table *symtab; - const char *name; - int size; /* size of module in pages */ - void* addr; /* address of module */ - int state; - void (*cleanup)(void); /* cleanup routine */ -}; - -struct mod_routines { - int (*init)(void); /* initialization routine */ - void (*cleanup)(void); /* cleanup routine */ -}; - -/* rename_module_symbol(old_name, new_name) WOW! */ -extern int rename_module_symbol(char *, char *); - -/* insert new symbol table */ -extern int register_symtab(struct symbol_table *); - -/* - * The first word of the module contains the use count. - */ -#define GET_USE_COUNT(module) (* (long *) (module)->addr) -/* - * define the count variable, and usage macros. - */ - -#ifdef MODULE - -extern long mod_use_count_; -#define MOD_INC_USE_COUNT mod_use_count_++ -#define MOD_DEC_USE_COUNT mod_use_count_-- -#define MOD_IN_USE ((mod_use_count_ & ~MOD_AUTOCLEAN) != 0) - -#ifndef __NO_VERSION__ -#include <linux/version.h> -char kernel_version[]=UTS_RELEASE; -#endif - -#if defined(MODVERSIONS) && !defined(__GENKSYMS__) -int Using_Versions; /* gcc will handle this global (used as a flag) correctly */ -#endif - -#else - -#define MOD_INC_USE_COUNT do { } while (0) -#define MOD_DEC_USE_COUNT do { } while (0) -#define MOD_IN_USE 1 - -#endif - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/mount.h b/i386/i386at/gpl/linux/include/linux/mount.h deleted file mode 100644 index 357c7ae..0000000 --- a/i386/i386at/gpl/linux/include/linux/mount.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - * - * Definitions for mount interface. This describes the in the kernel build - * linkedlist with mounted filesystems. - * - * Author: Marco van Wieringen <mvw@mcs.ow.nl> <mvw@tnix.net> <mvw@cistron.nl> - * - * Version: $Id: mount.h,v 1.1.1.1 1997/02/25 21:27:29 thomas Exp $ - * - */ -#ifndef _LINUX_MOUNT_H -#define _LINUX_MOUNT_H - -struct vfsmount -{ - kdev_t mnt_dev; /* Device this applies to */ - char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ - char *mnt_dirname; /* Name of directory mounted on */ - unsigned int mnt_flags; /* Flags of this device */ - struct semaphore mnt_sem; /* lock device while I/O in progress */ - struct super_block *mnt_sb; /* pointer to superblock */ - struct file *mnt_quotas[MAXQUOTAS]; /* fp's to quotafiles */ - time_t mnt_iexp[MAXQUOTAS]; /* expiretime for inodes */ - time_t mnt_bexp[MAXQUOTAS]; /* expiretime for blocks */ - struct vfsmount *mnt_next; /* pointer to next in linkedlist */ -}; - -struct vfsmount *lookup_vfsmnt(kdev_t dev); - -#endif /* _LINUX_MOUNT_H */ diff --git a/i386/i386at/gpl/linux/include/linux/net.h b/i386/i386at/gpl/linux/include/linux/net.h deleted file mode 100644 index 1fbe98a..0000000 --- a/i386/i386at/gpl/linux/include/linux/net.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * NET An implementation of the SOCKET network access protocol. - * This is the master header file for the Linux NET layer, - * or, in plain English: the networking handling part of the - * kernel. - * - * Version: @(#)net.h 1.0.3 05/25/93 - * - * Authors: Orest Zborowski, <obz@Kodak.COM> - * Ross Biro, <bir7@leland.Stanford.Edu> - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _LINUX_NET_H -#define _LINUX_NET_H - - -#include <linux/wait.h> -#include <linux/socket.h> - - -#define NSOCKETS 2000 /* Dynamic, this is MAX LIMIT */ -#define NSOCKETS_UNIX 128 /* unix domain static limit */ -#define NPROTO 16 /* should be enough for now.. */ - - -#define SYS_SOCKET 1 /* sys_socket(2) */ -#define SYS_BIND 2 /* sys_bind(2) */ -#define SYS_CONNECT 3 /* sys_connect(2) */ -#define SYS_LISTEN 4 /* sys_listen(2) */ -#define SYS_ACCEPT 5 /* sys_accept(2) */ -#define SYS_GETSOCKNAME 6 /* sys_getsockname(2) */ -#define SYS_GETPEERNAME 7 /* sys_getpeername(2) */ -#define SYS_SOCKETPAIR 8 /* sys_socketpair(2) */ -#define SYS_SEND 9 /* sys_send(2) */ -#define SYS_RECV 10 /* sys_recv(2) */ -#define SYS_SENDTO 11 /* sys_sendto(2) */ -#define SYS_RECVFROM 12 /* sys_recvfrom(2) */ -#define SYS_SHUTDOWN 13 /* sys_shutdown(2) */ -#define SYS_SETSOCKOPT 14 /* sys_setsockopt(2) */ -#define SYS_GETSOCKOPT 15 /* sys_getsockopt(2) */ -#define SYS_SENDMSG 16 /* sys_sendmsg(2) */ -#define SYS_RECVMSG 17 /* sys_recvmsg(2) */ - - -typedef enum { - SS_FREE = 0, /* not allocated */ - SS_UNCONNECTED, /* unconnected to any socket */ - SS_CONNECTING, /* in process of connecting */ - SS_CONNECTED, /* connected to socket */ - SS_DISCONNECTING /* in process of disconnecting */ -} socket_state; - -#define SO_ACCEPTCON (1<<16) /* performed a listen */ -#define SO_WAITDATA (1<<17) /* wait data to read */ -#define SO_NOSPACE (1<<18) /* no space to write */ - -#ifdef __KERNEL__ -/* - * Internal representation of a socket. not all the fields are used by - * all configurations: - * - * server client - * conn client connected to server connected to - * iconn list of clients -unused- - * awaiting connections - * wait sleep for clients, sleep for connection, - * sleep for i/o sleep for i/o - */ -struct socket { - short type; /* SOCK_STREAM, ... */ - socket_state state; - long flags; - struct proto_ops *ops; /* protocols do most everything */ - void *data; /* protocol data */ - struct socket *conn; /* server socket connected to */ - struct socket *iconn; /* incomplete client conn.s */ - struct socket *next; - struct wait_queue **wait; /* ptr to place to wait on */ - struct inode *inode; - struct fasync_struct *fasync_list; /* Asynchronous wake up list */ -}; - -#define SOCK_INODE(S) ((S)->inode) - -struct proto_ops { - int family; - - int (*create) (struct socket *sock, int protocol); - int (*dup) (struct socket *newsock, struct socket *oldsock); - int (*release) (struct socket *sock, struct socket *peer); - int (*bind) (struct socket *sock, struct sockaddr *umyaddr, - int sockaddr_len); - int (*connect) (struct socket *sock, struct sockaddr *uservaddr, - int sockaddr_len, int flags); - int (*socketpair) (struct socket *sock1, struct socket *sock2); - int (*accept) (struct socket *sock, struct socket *newsock, - int flags); - int (*getname) (struct socket *sock, struct sockaddr *uaddr, - int *usockaddr_len, int peer); - int (*select) (struct socket *sock, int sel_type, - select_table *wait); - int (*ioctl) (struct socket *sock, unsigned int cmd, - unsigned long arg); - int (*listen) (struct socket *sock, int len); - int (*shutdown) (struct socket *sock, int flags); - int (*setsockopt) (struct socket *sock, int level, int optname, - char *optval, int optlen); - int (*getsockopt) (struct socket *sock, int level, int optname, - char *optval, int *optlen); - int (*fcntl) (struct socket *sock, unsigned int cmd, - unsigned long arg); - int (*sendmsg) (struct socket *sock, struct msghdr *m, int total_len, int nonblock, int flags); - int (*recvmsg) (struct socket *sock, struct msghdr *m, int total_len, int nonblock, int flags, int *addr_len); -}; - -struct net_proto { - const char *name; /* Protocol name */ - void (*init_func)(struct net_proto *); /* Bootstrap */ -}; - -extern int sock_wake_async(struct socket *sock, int how); -extern int sock_register(int family, struct proto_ops *ops); -extern int sock_unregister(int family); -extern struct socket *sock_alloc(void); -extern void sock_release(struct socket *sock); -#endif /* __KERNEL__ */ -#endif /* _LINUX_NET_H */ diff --git a/i386/i386at/gpl/linux/include/linux/netdevice.h b/i386/i386at/gpl/linux/include/linux/netdevice.h deleted file mode 100644 index 9e1143b..0000000 --- a/i386/i386at/gpl/linux/include/linux/netdevice.h +++ /dev/null @@ -1,332 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions for the Interfaces handler. - * - * Version: @(#)dev.h 1.0.10 08/12/93 - * - * Authors: Ross Biro, <bir7@leland.Stanford.Edu> - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * Corey Minyard <wf-rch!minyard@relay.EU.net> - * Donald J. Becker, <becker@super.org> - * Alan Cox, <A.Cox@swansea.ac.uk> - * Bjorn Ekwall. <bj0rn@blox.se> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * Moved to /usr/include/linux for NET3 - */ -#ifndef _LINUX_NETDEVICE_H -#define _LINUX_NETDEVICE_H - -#include <linux/config.h> -#include <linux/if.h> -#include <linux/if_ether.h> -#include <linux/skbuff.h> - -/* for future expansion when we will have different priorities. */ -#define DEV_NUMBUFFS 3 -#define MAX_ADDR_LEN 7 -#ifndef CONFIG_AX25 -#ifndef CONFIG_TR -#ifndef CONFIG_NET_IPIP -#define MAX_HEADER 32 /* We really need about 18 worst case .. so 32 is aligned */ -#else -#define MAX_HEADER 48 /* We need to allow for having tunnel headers */ -#endif /* IPIP */ -#else -#define MAX_HEADER 48 /* Token Ring header needs 40 bytes ... 48 is aligned */ -#endif /* TR */ -#else -#define MAX_HEADER 96 /* AX.25 + NetROM */ -#endif /* AX25 */ - -#define IS_MYADDR 1 /* address is (one of) our own */ -#define IS_LOOPBACK 2 /* address is for LOOPBACK */ -#define IS_BROADCAST 3 /* address is a valid broadcast */ -#define IS_INVBCAST 4 /* Wrong netmask bcast not for us (unused)*/ -#define IS_MULTICAST 5 /* Multicast IP address */ - -/* - * We tag multicasts with these structures. - */ - -struct dev_mc_list -{ - struct dev_mc_list *next; - char dmi_addr[MAX_ADDR_LEN]; - unsigned short dmi_addrlen; - unsigned short dmi_users; -}; - -struct hh_cache -{ - struct hh_cache *hh_next; - void *hh_arp; /* Opaque pointer, used by - * any address resolution module, - * not only ARP. - */ - unsigned int hh_refcnt; /* number of users */ - unsigned short hh_type; /* protocol identifier, f.e ETH_P_IP */ - char hh_uptodate; /* hh_data is valid */ - char hh_data[16]; /* cached hardware header */ -}; - -/* - * The DEVICE structure. - * Actually, this whole structure is a big mistake. It mixes I/O - * data with strictly "high-level" data, and it has to know about - * almost every data structure used in the INET module. - */ -#ifdef MACH -#ifndef MACH_INCLUDE -#define device linux_device -#endif -struct linux_device -#else -struct device -#endif -{ - - /* - * This is the first field of the "visible" part of this structure - * (i.e. as seen by users in the "Space.c" file). It is the name - * the interface. - */ - char *name; - - /* I/O specific fields - FIXME: Merge these and struct ifmap into one */ - unsigned long rmem_end; /* shmem "recv" end */ - unsigned long rmem_start; /* shmem "recv" start */ - unsigned long mem_end; /* shared mem end */ - unsigned long mem_start; /* shared mem start */ - unsigned long base_addr; /* device I/O address */ - unsigned char irq; /* device IRQ number */ - - /* Low-level status flags. */ - volatile unsigned char start, /* start an operation */ - interrupt; /* interrupt arrived */ - unsigned long tbusy; /* transmitter busy must be long for bitops */ - - struct linux_device *next; - - /* The device initialization function. Called only once. */ - int (*init)(struct linux_device *dev); - - /* Some hardware also needs these fields, but they are not part of the - usual set specified in Space.c. */ - unsigned char if_port; /* Selectable AUI, TP,..*/ - unsigned char dma; /* DMA channel */ - - struct enet_statistics* (*get_stats)(struct linux_device *dev); - - /* - * This marks the end of the "visible" part of the structure. All - * fields hereafter are internal to the system, and may change at - * will (read: may be cleaned up at will). - */ - - /* These may be needed for future network-power-down code. */ - unsigned long trans_start; /* Time (in jiffies) of last Tx */ - unsigned long last_rx; /* Time of last Rx */ - - unsigned short flags; /* interface flags (a la BSD) */ - unsigned short family; /* address family ID (AF_INET) */ - unsigned short metric; /* routing metric (not used) */ - unsigned short mtu; /* interface MTU value */ - unsigned short type; /* interface hardware type */ - unsigned short hard_header_len; /* hardware hdr length */ - void *priv; /* pointer to private data */ - - /* Interface address info. */ - unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ - unsigned char pad; /* make dev_addr aligned to 8 bytes */ - unsigned char dev_addr[MAX_ADDR_LEN]; /* hw address */ - unsigned char addr_len; /* hardware address length */ - unsigned long pa_addr; /* protocol address */ - unsigned long pa_brdaddr; /* protocol broadcast addr */ - unsigned long pa_dstaddr; /* protocol P-P other side addr */ - unsigned long pa_mask; /* protocol netmask */ - unsigned short pa_alen; /* protocol address length */ - - struct dev_mc_list *mc_list; /* Multicast mac addresses */ - int mc_count; /* Number of installed mcasts */ - - struct ip_mc_list *ip_mc_list; /* IP multicast filter chain */ - __u32 tx_queue_len; /* Max frames per queue allowed */ - - /* For load balancing driver pair support */ - - unsigned long pkt_queue; /* Packets queued */ - struct linux_device *slave; /* Slave device */ - struct net_alias_info *alias_info; /* main dev alias info */ - struct net_alias *my_alias; /* alias devs */ - - /* Pointer to the interface buffers. */ - struct sk_buff_head buffs[DEV_NUMBUFFS]; - - /* Pointers to interface service routines. */ - int (*open)(struct linux_device *dev); - int (*stop)(struct linux_device *dev); - int (*hard_start_xmit) (struct sk_buff *skb, - struct linux_device *dev); - int (*hard_header) (struct sk_buff *skb, - struct linux_device *dev, - unsigned short type, - void *daddr, - void *saddr, - unsigned len); - int (*rebuild_header)(void *eth, - struct linux_device *dev, - unsigned long raddr, struct sk_buff *skb); -#define HAVE_MULTICAST - void (*set_multicast_list)(struct linux_device *dev); -#define HAVE_SET_MAC_ADDR - int (*set_mac_address)(struct linux_device *dev, - void *addr); -#define HAVE_PRIVATE_IOCTL - int (*do_ioctl)(struct linux_device *dev, - struct ifreq *ifr, int cmd); -#define HAVE_SET_CONFIG - int (*set_config)(struct linux_device *dev, - struct ifmap *map); -#define HAVE_HEADER_CACHE - void (*header_cache_bind)(struct hh_cache **hhp, - struct linux_device *dev, - unsigned short htype, - __u32 daddr); - void (*header_cache_update)(struct hh_cache *hh, - struct linux_device *dev, - unsigned char * haddr); -#ifdef MACH -#ifdef MACH_INCLUDE - struct net_data *net_data; -#else - void *net_data; -#endif -#endif -}; - - -struct packet_type { - unsigned short type; /* This is really htons(ether_type). */ - struct linux_device * dev; - int (*func) (struct sk_buff *, struct linux_device *, - struct packet_type *); - void *data; - struct packet_type *next; -}; - - -#ifdef __KERNEL__ - -#include <linux/notifier.h> - -/* Used by dev_rint */ -#define IN_SKBUFF 1 - -extern volatile unsigned long in_bh; - -extern struct linux_device loopback_dev; -extern struct linux_device *dev_base; -extern struct packet_type *ptype_base[16]; - - -extern int ip_addr_match(unsigned long addr1, unsigned long addr2); -extern int ip_chk_addr(unsigned long addr); -extern struct linux_device *ip_dev_check(unsigned long daddr); -extern unsigned long ip_my_addr(void); -extern unsigned long ip_get_mask(unsigned long addr); -extern struct linux_device *ip_dev_find(unsigned long addr); -extern struct linux_device *dev_getbytype(unsigned short type); - -extern void dev_add_pack(struct packet_type *pt); -extern void dev_remove_pack(struct packet_type *pt); -extern struct linux_device *dev_get(const char *name); -extern int dev_open(struct linux_device *dev); -extern int dev_close(struct linux_device *dev); -extern void dev_queue_xmit(struct sk_buff *skb, - struct linux_device *dev, - int pri); -#define HAVE_NETIF_RX 1 -extern void netif_rx(struct sk_buff *skb); -extern void dev_transmit(void); -extern int in_net_bh(void); -extern void net_bh(void *tmp); -#ifdef MACH -#define dev_tint(dev) -#else -extern void dev_tint(struct linux_device *dev); -#endif -extern int dev_get_info(char *buffer, char **start, off_t offset, int length, int dummy); -extern int dev_ioctl(unsigned int cmd, void *); - -extern void dev_init(void); - -/* Locking protection for page faults during outputs to devices unloaded during the fault */ - -extern int dev_lockct; - -/* - * These two dont currently need to be interrupt safe - * but they may do soon. Do it properly anyway. - */ - -extern __inline__ void dev_lock_list(void) -{ - unsigned long flags; - save_flags(flags); - cli(); - dev_lockct++; - restore_flags(flags); -} - -extern __inline__ void dev_unlock_list(void) -{ - unsigned long flags; - save_flags(flags); - cli(); - dev_lockct--; - restore_flags(flags); -} - -/* - * This almost never occurs, isnt in performance critical paths - * and we can thus be relaxed about it - */ - -extern __inline__ void dev_lock_wait(void) -{ - while(dev_lockct) - schedule(); -} - - -/* These functions live elsewhere (drivers/net/net_init.c, but related) */ - -extern void ether_setup(struct linux_device *dev); -extern void tr_setup(struct linux_device *dev); -extern int ether_config(struct linux_device *dev, - struct ifmap *map); -/* Support for loadable net-drivers */ -extern int register_netdev(struct linux_device *dev); -extern void unregister_netdev(struct linux_device *dev); -extern int register_netdevice_notifier(struct notifier_block *nb); -extern int unregister_netdevice_notifier(struct notifier_block *nb); -/* Functions used for multicast support */ -extern void dev_mc_upload(struct linux_device *dev); -extern void dev_mc_delete(struct linux_device *dev, - void *addr, int alen, int all); -extern void dev_mc_add(struct linux_device *dev, - void *addr, int alen, int newonly); -extern void dev_mc_discard(struct linux_device *dev); -/* This is the wrong place but it'll do for the moment */ -extern void ip_mc_allhost(struct linux_device *dev); -#endif /* __KERNEL__ */ - -#endif /* _LINUX_DEV_H */ diff --git a/i386/i386at/gpl/linux/include/linux/nfs.h b/i386/i386at/gpl/linux/include/linux/nfs.h deleted file mode 100644 index ceb0cd1..0000000 --- a/i386/i386at/gpl/linux/include/linux/nfs.h +++ /dev/null @@ -1,172 +0,0 @@ -#ifndef _LINUX_NFS_H -#define _LINUX_NFS_H - -#ifndef MACH_INCLUDE -#define NFS_PORT 2049 -#define NFS_MAXDATA 8192 -#define NFS_MAXPATHLEN 1024 -#define NFS_MAXNAMLEN 255 -#define NFS_MAXGROUPS 16 -#define NFS_FHSIZE 32 -#define NFS_COOKIESIZE 4 -#define NFS_FIFO_DEV (-1) -#define NFSMODE_FMT 0170000 -#define NFSMODE_DIR 0040000 -#define NFSMODE_CHR 0020000 -#define NFSMODE_BLK 0060000 -#define NFSMODE_REG 0100000 -#define NFSMODE_LNK 0120000 -#define NFSMODE_SOCK 0140000 -#define NFSMODE_FIFO 0010000 - -#ifdef __KERNEL__ /* user programs should get these from the rpc header files */ - -#define RPC_VERSION 2 - -enum rpc_auth_flavor { - RPC_AUTH_NULL = 0, - RPC_AUTH_UNIX = 1, - RPC_AUTH_SHORT = 2 -}; - -enum rpc_msg_type { - RPC_CALL = 0, - RPC_REPLY = 1 -}; - -enum rpc_reply_stat { - RPC_MSG_ACCEPTED = 0, - RPC_MSG_DENIED = 1 -}; - -enum rpc_accept_stat { - RPC_SUCCESS = 0, - RPC_PROG_UNAVAIL = 1, - RPC_PROG_MISMATCH = 2, - RPC_PROC_UNAVAIL = 3, - RPC_GARBAGE_ARGS = 4 -}; - -enum rpc_reject_stat { - RPC_MISMATCH = 0, - RPC_AUTH_ERROR = 1 -}; - -enum rpc_auth_stat { - RPC_AUTH_BADCRED = 1, - RPC_AUTH_REJECTEDCRED = 2, - RPC_AUTH_BADVERF = 3, - RPC_AUTH_REJECTEDVERF = 4, - RPC_AUTH_TOOWEAK = 5 -}; - -#endif /* __KERNEL__ */ - -enum nfs_stat { - NFS_OK = 0, - NFSERR_PERM = 1, - NFSERR_NOENT = 2, - NFSERR_IO = 5, - NFSERR_NXIO = 6, - NFSERR_EAGAIN = 11, - NFSERR_ACCES = 13, - NFSERR_EXIST = 17, - NFSERR_NODEV = 19, - NFSERR_NOTDIR = 20, - NFSERR_ISDIR = 21, - NFSERR_INVAL = 22, /* that Sun forgot */ - NFSERR_FBIG = 27, - NFSERR_NOSPC = 28, - NFSERR_ROFS = 30, - NFSERR_NAMETOOLONG = 63, - NFSERR_NOTEMPTY = 66, - NFSERR_DQUOT = 69, - NFSERR_STALE = 70, - NFSERR_WFLUSH = 99 -}; - -enum nfs_ftype { - NFNON = 0, - NFREG = 1, - NFDIR = 2, - NFBLK = 3, - NFCHR = 4, - NFLNK = 5, - NFSOCK = 6, - NFBAD = 7, - NFFIFO = 8 -}; - -#define NFS_PROGRAM 100003 -#define NFS_VERSION 2 -#define NFSPROC_NULL 0 -#define NFSPROC_GETATTR 1 -#define NFSPROC_SETATTR 2 -#define NFSPROC_ROOT 3 -#define NFSPROC_LOOKUP 4 -#define NFSPROC_READLINK 5 -#define NFSPROC_READ 6 -#define NFSPROC_WRITECACHE 7 -#define NFSPROC_WRITE 8 -#define NFSPROC_CREATE 9 -#define NFSPROC_REMOVE 10 -#define NFSPROC_RENAME 11 -#define NFSPROC_LINK 12 -#define NFSPROC_SYMLINK 13 -#define NFSPROC_MKDIR 14 -#define NFSPROC_RMDIR 15 -#define NFSPROC_READDIR 16 -#define NFSPROC_STATFS 17 - -struct nfs_fh { - char data[NFS_FHSIZE]; -}; - -struct nfs_time { - u_int seconds; - u_int useconds; -}; - -struct nfs_fattr { - enum nfs_ftype type; - u_int mode; - u_int nlink; - u_int uid; - u_int gid; - u_int size; - u_int blocksize; - u_int rdev; - u_int blocks; - u_int fsid; - u_int fileid; - struct nfs_time atime; - struct nfs_time mtime; - struct nfs_time ctime; -}; - -struct nfs_sattr { - u_int mode; - u_int uid; - u_int gid; - u_int size; - struct nfs_time atime; - struct nfs_time mtime; -}; - -struct nfs_entry { - u_int fileid; - char *name; - int cookie; - int eof; -}; - -struct nfs_fsinfo { - u_int tsize; - u_int bsize; - u_int blocks; - u_int bfree; - u_int bavail; -}; - -#endif /* ! MACH_INCLUDE */ -#endif diff --git a/i386/i386at/gpl/linux/include/linux/notifier.h b/i386/i386at/gpl/linux/include/linux/notifier.h deleted file mode 100644 index 3de4d97..0000000 --- a/i386/i386at/gpl/linux/include/linux/notifier.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Routines to manage notifier chains for passing status changes to any - * interested routines. We need this instead of hard coded call lists so - * that modules can poke their nose into the innards. The network devices - * needed them so here they are for the rest of you. - * - * Alan Cox <Alan.Cox@linux.org> - */ - -#ifndef _LINUX_NOTIFIER_H -#define _LINUX_NOTIFIER_H -#include <linux/errno.h> - -struct notifier_block -{ - int (*notifier_call)(struct notifier_block *this, unsigned long, void *); - struct notifier_block *next; - int priority; -}; - - -#ifdef __KERNEL__ - -#define NOTIFY_DONE 0x0000 /* Don't care */ -#define NOTIFY_OK 0x0001 /* Suits me */ -#define NOTIFY_STOP_MASK 0x8000 /* Don't call further */ -#define NOTIFY_BAD (NOTIFY_STOP_MASK|0x0002) /* Bad/Veto action */ - -extern __inline__ int notifier_chain_register(struct notifier_block **list, struct notifier_block *n) -{ - while(*list) - { - if(n->priority > (*list)->priority) - break; - list= &((*list)->next); - } - n->next = *list; - *list=n; - return 0; -} - -/* - * Warning to any non GPL module writers out there.. these functions are - * GPL'd - */ - -extern __inline__ int notifier_chain_unregister(struct notifier_block **nl, struct notifier_block *n) -{ - while((*nl)!=NULL) - { - if((*nl)==n) - { - *nl=n->next; - return 0; - } - nl=&((*nl)->next); - } -#ifdef MACH_INCLUDE - return -LINUX_ENOENT; -#else - return -ENOENT; -#endif -} - -/* - * This is one of these things that is generally shorter inline - */ - -extern __inline__ int notifier_call_chain(struct notifier_block **n, unsigned long val, void *v) -{ - int ret=NOTIFY_DONE; - struct notifier_block *nb = *n; - while(nb) - { - ret=nb->notifier_call(nb,val,v); - if(ret&NOTIFY_STOP_MASK) - return ret; - nb=nb->next; - } - return ret; -} - - -/* - * Declared notifiers so far. I can imagine quite a few more chains - * over time (eg laptop power reset chains, reboot chain (to clean - * device units up), device [un]mount chain, module load/unload chain, - * low memory chain, screenblank chain (for plug in modular screenblankers) - * VC switch chains (for loadable kernel svgalib VC switch helpers) etc... - */ - -/* netdevice notifier chain */ -#define NETDEV_UP 0x0001 /* For now you can't veto a device up/down */ -#define NETDEV_DOWN 0x0002 -#define NETDEV_REBOOT 0x0003 /* Tell a protocol stack a network interface - detected a hardware crash and restarted - - we can use this eg to kick tcp sessions - once done */ -#endif -#endif diff --git a/i386/i386at/gpl/linux/include/linux/pagemap.h b/i386/i386at/gpl/linux/include/linux/pagemap.h deleted file mode 100644 index 6de993b..0000000 --- a/i386/i386at/gpl/linux/include/linux/pagemap.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef _LINUX_PAGEMAP_H -#define _LINUX_PAGEMAP_H - -#include <asm/system.h> - -/* - * Page-mapping primitive inline functions - * - * Copyright 1995 Linus Torvalds - */ - -#ifndef MACH -static inline unsigned long page_address(struct page * page) -{ - return PAGE_OFFSET + PAGE_SIZE*(page - mem_map); -} - -#define PAGE_HASH_BITS 10 -#define PAGE_HASH_SIZE (1 << PAGE_HASH_BITS) - -#define PAGE_AGE_VALUE 16 - -extern unsigned long page_cache_size; -extern struct page * page_hash_table[PAGE_HASH_SIZE]; - -/* - * We use a power-of-two hash table to avoid a modulus, - * and get a reasonable hash by knowing roughly how the - * inode pointer and offsets are distributed (ie, we - * roughly know which bits are "significant") - */ -static inline unsigned long _page_hashfn(struct inode * inode, unsigned long offset) -{ -#define i (((unsigned long) inode)/sizeof(unsigned long)) -#define o (offset >> PAGE_SHIFT) -#define s(x) ((x)+((x)>>PAGE_HASH_BITS)) - return s(i+o) & (PAGE_HASH_SIZE-1); -#undef i -#undef o -#undef s -} - -#define page_hash(inode,offset) page_hash_table[_page_hashfn(inode,offset)] - -static inline struct page * find_page(struct inode * inode, unsigned long offset) -{ - struct page *page; - unsigned long flags; - - for (page = page_hash(inode, offset); page ; page = page->next_hash) { - if (page->inode != inode) - continue; - if (page->offset != offset) - continue; - save_flags(flags); - cli(); - page->referenced = 1; - page->count++; - restore_flags(flags); - break; - } - return page; -} - -static inline void remove_page_from_hash_queue(struct page * page) -{ - struct page **p = &page_hash(page->inode,page->offset); - - page_cache_size--; - if (page->next_hash) - page->next_hash->prev_hash = page->prev_hash; - if (page->prev_hash) - page->prev_hash->next_hash = page->next_hash; - if (*p == page) - *p = page->next_hash; - page->next_hash = page->prev_hash = NULL; -} - -static inline void add_page_to_hash_queue(struct inode * inode, struct page * page) -{ - struct page **p = &page_hash(inode,page->offset); - - page_cache_size++; - page->referenced = 1; - page->age = PAGE_AGE_VALUE; - page->prev_hash = NULL; - if ((page->next_hash = *p) != NULL) - page->next_hash->prev_hash = page; - *p = page; -} - -static inline void remove_page_from_inode_queue(struct page * page) -{ - struct inode * inode = page->inode; - - page->inode = NULL; - inode->i_nrpages--; - if (inode->i_pages == page) - inode->i_pages = page->next; - if (page->next) - page->next->prev = page->prev; - if (page->prev) - page->prev->next = page->next; - page->next = NULL; - page->prev = NULL; -} - -static inline void add_page_to_inode_queue(struct inode * inode, struct page * page) -{ - struct page **p = &inode->i_pages; - - inode->i_nrpages++; - page->inode = inode; - page->prev = NULL; - if ((page->next = *p) != NULL) - page->next->prev = page; - *p = page; -} - -extern void __wait_on_page(struct page *); -static inline void wait_on_page(struct page * page) -{ - if (page->locked) - __wait_on_page(page); -} - -extern void update_vm_cache(struct inode *, unsigned long, const char *, int); - -#endif /* ! MACH */ - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/param.h b/i386/i386at/gpl/linux/include/linux/param.h deleted file mode 100644 index 092e92f..0000000 --- a/i386/i386at/gpl/linux/include/linux/param.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _LINUX_PARAM_H -#define _LINUX_PARAM_H - -#include <asm/param.h> - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/pci.h b/i386/i386at/gpl/linux/include/linux/pci.h deleted file mode 100644 index 9e05950..0000000 --- a/i386/i386at/gpl/linux/include/linux/pci.h +++ /dev/null @@ -1,618 +0,0 @@ -/* - * PCI defines and function prototypes - * Copyright 1994, Drew Eckhardt - * - * For more information, please consult - * - * PCI BIOS Specification Revision - * PCI Local Bus Specification - * PCI System Design Guide - * - * PCI Special Interest Group - * M/S HF3-15A - * 5200 N.E. Elam Young Parkway - * Hillsboro, Oregon 97124-6497 - * +1 (503) 696-2000 - * +1 (800) 433-5177 - * - * Manuals are $25 each or $50 for all three, plus $7 shipping - * within the United States, $35 abroad. - */ - - - -/* PROCEDURE TO REPORT NEW PCI DEVICES - * We are trying to collect informations on new PCI devices, using - * the standart PCI identification procedure. If some warning is - * displayed at boot time, please report - * - /proc/pci - * - your exact hardware description. Try to find out - * which device is unknown. It may be you mainboard chipset. - * PCI-CPU bridge or PCI-ISA bridge. - * - If you can't find the actual information in your hardware - * booklet, try to read the references of the chip on the board. - * - Send all that, with the word PCIPROBE in the subject, - * to frederic@cao-vlsi.ibp.fr, and I'll add your device to - * the list as soon as possible - * fred. - */ - - - -#ifndef PCI_H -#define PCI_H - -/* - * Under PCI, each device has 256 bytes of configuration address space, - * of which the first 64 bytes are standardized as follows: - */ -#define PCI_VENDOR_ID 0x00 /* 16 bits */ -#define PCI_DEVICE_ID 0x02 /* 16 bits */ -#define PCI_COMMAND 0x04 /* 16 bits */ -#define PCI_COMMAND_IO 0x1 /* Enable response in I/O space */ -#define PCI_COMMAND_MEMORY 0x2 /* Enable response in Memory space */ -#define PCI_COMMAND_MASTER 0x4 /* Enable bus mastering */ -#define PCI_COMMAND_SPECIAL 0x8 /* Enable response to special cycles */ -#define PCI_COMMAND_INVALIDATE 0x10 /* Use memory write and invalidate */ -#define PCI_COMMAND_VGA_PALETTE 0x20 /* Enable palette snooping */ -#define PCI_COMMAND_PARITY 0x40 /* Enable parity checking */ -#define PCI_COMMAND_WAIT 0x80 /* Enable address/data stepping */ -#define PCI_COMMAND_SERR 0x100 /* Enable SERR */ -#define PCI_COMMAND_FAST_BACK 0x200 /* Enable back-to-back writes */ - -#define PCI_STATUS 0x06 /* 16 bits */ -#define PCI_STATUS_66MHZ 0x20 /* Support 66 Mhz PCI 2.1 bus */ -#define PCI_STATUS_UDF 0x40 /* Support User Definable Features */ - -#define PCI_STATUS_FAST_BACK 0x80 /* Accept fast-back to back */ -#define PCI_STATUS_PARITY 0x100 /* Detected parity error */ -#define PCI_STATUS_DEVSEL_MASK 0x600 /* DEVSEL timing */ -#define PCI_STATUS_DEVSEL_FAST 0x000 -#define PCI_STATUS_DEVSEL_MEDIUM 0x200 -#define PCI_STATUS_DEVSEL_SLOW 0x400 -#define PCI_STATUS_SIG_TARGET_ABORT 0x800 /* Set on target abort */ -#define PCI_STATUS_REC_TARGET_ABORT 0x1000 /* Master ack of " */ -#define PCI_STATUS_REC_MASTER_ABORT 0x2000 /* Set on master abort */ -#define PCI_STATUS_SIG_SYSTEM_ERROR 0x4000 /* Set when we drive SERR */ -#define PCI_STATUS_DETECTED_PARITY 0x8000 /* Set on parity error */ - -#define PCI_CLASS_REVISION 0x08 /* High 24 bits are class, low 8 - revision */ -#define PCI_REVISION_ID 0x08 /* Revision ID */ -#define PCI_CLASS_PROG 0x09 /* Reg. Level Programming Interface */ -#define PCI_CLASS_DEVICE 0x0a /* Device class */ - -#define PCI_CACHE_LINE_SIZE 0x0c /* 8 bits */ -#define PCI_LATENCY_TIMER 0x0d /* 8 bits */ -#define PCI_HEADER_TYPE 0x0e /* 8 bits */ -#define PCI_BIST 0x0f /* 8 bits */ -#define PCI_BIST_CODE_MASK 0x0f /* Return result */ -#define PCI_BIST_START 0x40 /* 1 to start BIST, 2 secs or less */ -#define PCI_BIST_CAPABLE 0x80 /* 1 if BIST capable */ - -/* - * Base addresses specify locations in memory or I/O space. - * Decoded size can be determined by writing a value of - * 0xffffffff to the register, and reading it back. Only - * 1 bits are decoded. - */ -#define PCI_BASE_ADDRESS_0 0x10 /* 32 bits */ -#define PCI_BASE_ADDRESS_1 0x14 /* 32 bits */ -#define PCI_BASE_ADDRESS_2 0x18 /* 32 bits */ -#define PCI_BASE_ADDRESS_3 0x1c /* 32 bits */ -#define PCI_BASE_ADDRESS_4 0x20 /* 32 bits */ -#define PCI_BASE_ADDRESS_5 0x24 /* 32 bits */ -#define PCI_BASE_ADDRESS_SPACE 0x01 /* 0 = memory, 1 = I/O */ -#define PCI_BASE_ADDRESS_SPACE_IO 0x01 -#define PCI_BASE_ADDRESS_SPACE_MEMORY 0x00 -#define PCI_BASE_ADDRESS_MEM_TYPE_MASK 0x06 -#define PCI_BASE_ADDRESS_MEM_TYPE_32 0x00 /* 32 bit address */ -#define PCI_BASE_ADDRESS_MEM_TYPE_1M 0x02 /* Below 1M */ -#define PCI_BASE_ADDRESS_MEM_TYPE_64 0x04 /* 64 bit address */ -#define PCI_BASE_ADDRESS_MEM_PREFETCH 0x08 /* prefetchable? */ -#define PCI_BASE_ADDRESS_MEM_MASK (~0x0f) -#define PCI_BASE_ADDRESS_IO_MASK (~0x03) -/* bit 1 is reserved if address_space = 1 */ - -#define PCI_CARDBUS_CIS 0x28 -#define PCI_SUBSYSTEM_ID 0x2c -#define PCI_SUBSYSTEM_VENDOR_ID 0x2e -#define PCI_ROM_ADDRESS 0x30 /* 32 bits */ -#define PCI_ROM_ADDRESS_ENABLE 0x01 /* Write 1 to enable ROM, - bits 31..11 are address, - 10..2 are reserved */ -/* 0x34-0x3b are reserved */ -#define PCI_INTERRUPT_LINE 0x3c /* 8 bits */ -#define PCI_INTERRUPT_PIN 0x3d /* 8 bits */ -#define PCI_MIN_GNT 0x3e /* 8 bits */ -#define PCI_MAX_LAT 0x3f /* 8 bits */ - -#define PCI_CLASS_NOT_DEFINED 0x0000 -#define PCI_CLASS_NOT_DEFINED_VGA 0x0001 - -#define PCI_BASE_CLASS_STORAGE 0x01 -#define PCI_CLASS_STORAGE_SCSI 0x0100 -#define PCI_CLASS_STORAGE_IDE 0x0101 -#define PCI_CLASS_STORAGE_FLOPPY 0x0102 -#define PCI_CLASS_STORAGE_IPI 0x0103 -#define PCI_CLASS_STORAGE_RAID 0x0104 -#define PCI_CLASS_STORAGE_OTHER 0x0180 - -#define PCI_BASE_CLASS_NETWORK 0x02 -#define PCI_CLASS_NETWORK_ETHERNET 0x0200 -#define PCI_CLASS_NETWORK_TOKEN_RING 0x0201 -#define PCI_CLASS_NETWORK_FDDI 0x0202 -#define PCI_CLASS_NETWORK_ATM 0x0203 -#define PCI_CLASS_NETWORK_OTHER 0x0280 - -#define PCI_BASE_CLASS_DISPLAY 0x03 -#define PCI_CLASS_DISPLAY_VGA 0x0300 -#define PCI_CLASS_DISPLAY_XGA 0x0301 -#define PCI_CLASS_DISPLAY_OTHER 0x0380 - -#define PCI_BASE_CLASS_MULTIMEDIA 0x04 -#define PCI_CLASS_MULTIMEDIA_VIDEO 0x0400 -#define PCI_CLASS_MULTIMEDIA_AUDIO 0x0401 -#define PCI_CLASS_MULTIMEDIA_OTHER 0x0480 - -#define PCI_BASE_CLASS_MEMORY 0x05 -#define PCI_CLASS_MEMORY_RAM 0x0500 -#define PCI_CLASS_MEMORY_FLASH 0x0501 -#define PCI_CLASS_MEMORY_OTHER 0x0580 - -#define PCI_BASE_CLASS_BRIDGE 0x06 -#define PCI_CLASS_BRIDGE_HOST 0x0600 -#define PCI_CLASS_BRIDGE_ISA 0x0601 -#define PCI_CLASS_BRIDGE_EISA 0x0602 -#define PCI_CLASS_BRIDGE_MC 0x0603 -#define PCI_CLASS_BRIDGE_PCI 0x0604 -#define PCI_CLASS_BRIDGE_PCMCIA 0x0605 -#define PCI_CLASS_BRIDGE_NUBUS 0x0606 -#define PCI_CLASS_BRIDGE_CARDBUS 0x0607 -#define PCI_CLASS_BRIDGE_OTHER 0x0680 - - -#define PCI_BASE_CLASS_COMMUNICATION 0x07 -#define PCI_CLASS_COMMUNICATION_SERIAL 0x0700 -#define PCI_CLASS_COMMUNICATION_PARALLEL 0x0701 -#define PCI_CLASS_COMMUNICATION_OTHER 0x0780 - -#define PCI_BASE_CLASS_SYSTEM 0x08 -#define PCI_CLASS_SYSTEM_PIC 0x0800 -#define PCI_CLASS_SYSTEM_DMA 0x0801 -#define PCI_CLASS_SYSTEM_TIMER 0x0802 -#define PCI_CLASS_SYSTEM_RTC 0x0803 -#define PCI_CLASS_SYSTEM_OTHER 0x0880 - -#define PCI_BASE_CLASS_INPUT 0x09 -#define PCI_CLASS_INPUT_KEYBOARD 0x0900 -#define PCI_CLASS_INPUT_PEN 0x0901 -#define PCI_CLASS_INPUT_MOUSE 0x0902 -#define PCI_CLASS_INPUT_OTHER 0x0980 - -#define PCI_BASE_CLASS_DOCKING 0x0a -#define PCI_CLASS_DOCKING_GENERIC 0x0a00 -#define PCI_CLASS_DOCKING_OTHER 0x0a01 - -#define PCI_BASE_CLASS_PROCESSOR 0x0b -#define PCI_CLASS_PROCESSOR_386 0x0b00 -#define PCI_CLASS_PROCESSOR_486 0x0b01 -#define PCI_CLASS_PROCESSOR_PENTIUM 0x0b02 -#define PCI_CLASS_PROCESSOR_ALPHA 0x0b10 -#define PCI_CLASS_PROCESSOR_POWERPC 0x0b20 -#define PCI_CLASS_PROCESSOR_CO 0x0b40 - -#define PCI_BASE_CLASS_SERIAL 0x0c -#define PCI_CLASS_SERIAL_FIREWIRE 0x0c00 -#define PCI_CLASS_SERIAL_ACCESS 0x0c01 -#define PCI_CLASS_SERIAL_SSA 0x0c02 -#define PCI_CLASS_SERIAL_USB 0x0c03 -#define PCI_CLASS_SERIAL_FIBER 0x0c04 - -#define PCI_CLASS_OTHERS 0xff - -/* - * Vendor and card ID's: sort these numerically according to vendor - * (and according to card ID within vendor) - */ -#define PCI_VENDOR_ID_COMPAQ 0x0e11 -#define PCI_DEVICE_ID_COMPAQ_1280 0x3033 -#define PCI_DEVICE_ID_COMPAQ_THUNDER 0xf130 - -#define PCI_VENDOR_ID_NCR 0x1000 -#define PCI_DEVICE_ID_NCR_53C810 0x0001 -#define PCI_DEVICE_ID_NCR_53C820 0x0002 -#define PCI_DEVICE_ID_NCR_53C825 0x0003 -#define PCI_DEVICE_ID_NCR_53C815 0x0004 - -#define PCI_VENDOR_ID_ATI 0x1002 -#define PCI_DEVICE_ID_ATI_68800 0x4158 -#define PCI_DEVICE_ID_ATI_215CT222 0x4354 -#define PCI_DEVICE_ID_ATI_210888CX 0x4358 -#define PCI_DEVICE_ID_ATI_210888GX 0x4758 - -#define PCI_VENDOR_ID_VLSI 0x1004 -#define PCI_DEVICE_ID_VLSI_82C592 0x0005 -#define PCI_DEVICE_ID_VLSI_82C593 0x0006 -#define PCI_DEVICE_ID_VLSI_82C594 0x0007 -#define PCI_DEVICE_ID_VLSI_82C597 0x0009 - -#define PCI_VENDOR_ID_ADL 0x1005 -#define PCI_DEVICE_ID_ADL_2301 0x2301 - -#define PCI_VENDOR_ID_NS 0x100b -#define PCI_DEVICE_ID_NS_87410 0xd001 - -#define PCI_VENDOR_ID_TSENG 0x100c -#define PCI_DEVICE_ID_TSENG_W32P_2 0x3202 -#define PCI_DEVICE_ID_TSENG_W32P_b 0x3205 -#define PCI_DEVICE_ID_TSENG_W32P_c 0x3206 -#define PCI_DEVICE_ID_TSENG_W32P_d 0x3207 - -#define PCI_VENDOR_ID_WEITEK 0x100e -#define PCI_DEVICE_ID_WEITEK_P9000 0x9001 -#define PCI_DEVICE_ID_WEITEK_P9100 0x9100 - -#define PCI_VENDOR_ID_DEC 0x1011 -#define PCI_DEVICE_ID_DEC_BRD 0x0001 -#define PCI_DEVICE_ID_DEC_TULIP 0x0002 -#define PCI_DEVICE_ID_DEC_TGA 0x0004 -#define PCI_DEVICE_ID_DEC_TULIP_FAST 0x0009 -#define PCI_DEVICE_ID_DEC_FDDI 0x000F -#define PCI_DEVICE_ID_DEC_TULIP_PLUS 0x0014 - -#define PCI_VENDOR_ID_CIRRUS 0x1013 -#define PCI_DEVICE_ID_CIRRUS_5430 0x00a0 -#define PCI_DEVICE_ID_CIRRUS_5434_4 0x00a4 -#define PCI_DEVICE_ID_CIRRUS_5434_8 0x00a8 -#define PCI_DEVICE_ID_CIRRUS_5436 0x00ac -#define PCI_DEVICE_ID_CIRRUS_6205 0x0205 -#define PCI_DEVICE_ID_CIRRUS_6729 0x1100 -#define PCI_DEVICE_ID_CIRRUS_7542 0x1200 -#define PCI_DEVICE_ID_CIRRUS_7543 0x1202 - -#define PCI_VENDOR_ID_IBM 0x1014 -#define PCI_DEVICE_ID_IBM_82G2675 0x001d - -#define PCI_VENDOR_ID_WD 0x101c -#define PCI_DEVICE_ID_WD_7197 0x3296 - -#define PCI_VENDOR_ID_AMD 0x1022 -#define PCI_DEVICE_ID_AMD_LANCE 0x2000 -#define PCI_DEVICE_ID_AMD_SCSI 0x2020 - -#define PCI_VENDOR_ID_TRIDENT 0x1023 -#define PCI_DEVICE_ID_TRIDENT_9420 0x9420 -#define PCI_DEVICE_ID_TRIDENT_9440 0x9440 -#define PCI_DEVICE_ID_TRIDENT_9660 0x9660 - -#define PCI_VENDOR_ID_AI 0x1025 -#define PCI_DEVICE_ID_AI_M1435 0x1435 - -#define PCI_VENDOR_ID_MATROX 0x102B -#define PCI_DEVICE_ID_MATROX_MGA_2 0x0518 -#define PCI_DEVICE_ID_MATROX_MIL 0x0519 -#define PCI_DEVICE_ID_MATROX_MGA_IMP 0x0d10 - -#define PCI_VENDOR_ID_CT 0x102c -#define PCI_DEVICE_ID_CT_65545 0x00d8 - -#define PCI_VENDOR_ID_FD 0x1036 -#define PCI_DEVICE_ID_FD_36C70 0x0000 - -#define PCI_VENDOR_ID_SI 0x1039 -#define PCI_DEVICE_ID_SI_6201 0x0001 -#define PCI_DEVICE_ID_SI_6202 0x0002 -#define PCI_DEVICE_ID_SI_503 0x0008 -#define PCI_DEVICE_ID_SI_501 0x0406 -#define PCI_DEVICE_ID_SI_496 0x0496 -#define PCI_DEVICE_ID_SI_601 0x0601 -#define PCI_DEVICE_ID_SI_5511 0x5511 -#define PCI_DEVICE_ID_SI_5513 0x5513 - -#define PCI_VENDOR_ID_HP 0x103c -#define PCI_DEVICE_ID_HP_J2585A 0x1030 - -#define PCI_VENDOR_ID_PCTECH 0x1042 -#define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000 - -#define PCI_VENDOR_ID_DPT 0x1044 -#define PCI_DEVICE_ID_DPT 0xa400 - -#define PCI_VENDOR_ID_OPTI 0x1045 -#define PCI_DEVICE_ID_OPTI_92C178 0xc178 -#define PCI_DEVICE_ID_OPTI_82C557 0xc557 -#define PCI_DEVICE_ID_OPTI_82C558 0xc558 -#define PCI_DEVICE_ID_OPTI_82C621 0xc621 -#define PCI_DEVICE_ID_OPTI_82C822 0xc822 - -#define PCI_VENDOR_ID_SGS 0x104a -#define PCI_DEVICE_ID_SGS_2000 0x0008 -#define PCI_DEVICE_ID_SGS_1764 0x0009 - -#define PCI_VENDOR_ID_BUSLOGIC 0x104B -#define PCI_DEVICE_ID_BUSLOGIC_946C_2 0x0140 -#define PCI_DEVICE_ID_BUSLOGIC_946C 0x1040 -#define PCI_DEVICE_ID_BUSLOGIC_930 0x8130 - -#define PCI_VENDOR_ID_OAK 0x104e -#define PCI_DEVICE_ID_OAK_OTI107 0x0107 - -#define PCI_VENDOR_ID_PROMISE 0x105a -#define PCI_DEVICE_ID_PROMISE_5300 0x5300 - -#define PCI_VENDOR_ID_N9 0x105d -#define PCI_DEVICE_ID_N9_I128 0x2309 -#define PCI_DEVICE_ID_N9_I128_2 0x2339 - -#define PCI_VENDOR_ID_UMC 0x1060 -#define PCI_DEVICE_ID_UMC_UM8673F 0x0101 -#define PCI_DEVICE_ID_UMC_UM8891A 0x0891 -#define PCI_DEVICE_ID_UMC_UM8886BF 0x673a -#define PCI_DEVICE_ID_UMC_UM8886A 0x886a -#define PCI_DEVICE_ID_UMC_UM8881F 0x8881 -#define PCI_DEVICE_ID_UMC_UM8886F 0x8886 -#define PCI_DEVICE_ID_UMC_UM9017F 0x9017 -#define PCI_DEVICE_ID_UMC_UM8886N 0xe886 -#define PCI_DEVICE_ID_UMC_UM8891N 0xe891 - -#define PCI_VENDOR_ID_X 0x1061 -#define PCI_DEVICE_ID_X_AGX016 0x0001 - -#define PCI_VENDOR_ID_NEXGEN 0x1074 -#define PCI_DEVICE_ID_NEXGEN_82C501 0x4e78 - -#define PCI_VENDOR_ID_QLOGIC 0x1077 -#define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020 -#define PCI_DEVICE_ID_QLOGIC_ISP1022 0x1022 - -#define PCI_VENDOR_ID_LEADTEK 0x107d -#define PCI_DEVICE_ID_LEADTEK_805 0x0000 - -#define PCI_VENDOR_ID_CONTAQ 0x1080 -#define PCI_DEVICE_ID_CONTAQ_82C599 0x0600 - -#define PCI_VENDOR_ID_FOREX 0x1083 - -#define PCI_VENDOR_ID_OLICOM 0x108d - -#define PCI_VENDOR_ID_CMD 0x1095 -#define PCI_DEVICE_ID_CMD_640 0x0640 -#define PCI_DEVICE_ID_CMD_646 0x0646 - -#define PCI_VENDOR_ID_VISION 0x1098 -#define PCI_DEVICE_ID_VISION_QD8500 0x0001 -#define PCI_DEVICE_ID_VISION_QD8580 0x0002 - -#define PCI_VENDOR_ID_SIERRA 0x10a8 -#define PCI_DEVICE_ID_SIERRA_STB 0x0000 - -#define PCI_VENDOR_ID_ACC 0x10aa -#define PCI_DEVICE_ID_ACC_2056 0x0000 - -#define PCI_VENDOR_ID_WINBOND 0x10ad -#define PCI_DEVICE_ID_WINBOND_83769 0x0001 -#define PCI_DEVICE_ID_WINBOND_82C105 0x0105 - -#define PCI_VENDOR_ID_3COM 0x10b7 -#define PCI_DEVICE_ID_3COM_3C590 0x5900 -#define PCI_DEVICE_ID_3COM_3C595TX 0x5950 -#define PCI_DEVICE_ID_3COM_3C595T4 0x5951 -#define PCI_DEVICE_ID_3COM_3C595MII 0x5952 - -#define PCI_VENDOR_ID_AL 0x10b9 -#define PCI_DEVICE_ID_AL_M1445 0x1445 -#define PCI_DEVICE_ID_AL_M1449 0x1449 -#define PCI_DEVICE_ID_AL_M1451 0x1451 -#define PCI_DEVICE_ID_AL_M1461 0x1461 -#define PCI_DEVICE_ID_AL_M1489 0x1489 -#define PCI_DEVICE_ID_AL_M1511 0x1511 -#define PCI_DEVICE_ID_AL_M1513 0x1513 -#define PCI_DEVICE_ID_AL_M4803 0x5215 - -#define PCI_VENDOR_ID_ASP 0x10cd -#define PCI_DEVICE_ID_ASP_ABP940 0x1200 - -#define PCI_VENDOR_ID_IMS 0x10e0 -#define PCI_DEVICE_ID_IMS_8849 0x8849 - -#define PCI_VENDOR_ID_TEKRAM2 0x10e1 -#define PCI_DEVICE_ID_TEKRAM2_690c 0x690c - -#define PCI_VENDOR_ID_AMCC 0x10e8 -#define PCI_DEVICE_ID_AMCC_MYRINET 0x8043 - -#define PCI_VENDOR_ID_INTERG 0x10ea -#define PCI_DEVICE_ID_INTERG_1680 0x1680 - -#define PCI_VENDOR_ID_REALTEK 0x10ec -#define PCI_DEVICE_ID_REALTEK_8029 0x8029 - -#define PCI_VENDOR_ID_INIT 0x1101 -#define PCI_DEVICE_ID_INIT_320P 0x9100 - -#define PCI_VENDOR_ID_VIA 0x1106 -#define PCI_DEVICE_ID_VIA_82C505 0x0505 -#define PCI_DEVICE_ID_VIA_82C561 0x0561 -#define PCI_DEVICE_ID_VIA_82C576 0x0576 -#define PCI_DEVICE_ID_VIA_82C416 0x1571 - -#define PCI_VENDOR_ID_VORTEX 0x1119 -#define PCI_DEVICE_ID_VORTEX_GDT 0x0001 - -#define PCI_VENDOR_ID_EF 0x111a -#define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000 -#define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002 - -#define PCI_VENDOR_ID_FORE 0x1127 -#define PCI_DEVICE_ID_FORE_PCA200PC 0x0210 - -#define PCI_VENDOR_ID_IMAGINGTECH 0x112f -#define PCI_DEVICE_ID_IMAGINGTECH_ICPCI 0x0000 - -#define PCI_VENDOR_ID_PLX 0x113c -#define PCI_DEVICE_ID_PLX_9060 0x0001 - -#define PCI_VENDOR_ID_ALLIANCE 0x1142 -#define PCI_DEVICE_ID_ALLIANCE_PROMOTIO 0x3210 -#define PCI_DEVICE_ID_ALLIANCE_PROVIDEO 0x6422 - -#define PCI_VENDOR_ID_MUTECH 0x1159 -#define PCI_DEVICE_ID_MUTECH_MV1000 0x0001 - -#define PCI_VENDOR_ID_ZEITNET 0x1193 -#define PCI_DEVICE_ID_ZEITNET_1221 0x0001 -#define PCI_DEVICE_ID_ZEITNET_1225 0x0002 - -#define PCI_VENDOR_ID_SPECIALIX 0x11cb -#define PCI_DEVICE_ID_SPECIALIX_XIO 0x4000 -#define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000 - -#define PCI_VENDOR_ID_RP 0x11fe -#define PCI_DEVICE_ID_RP8OCTA 0x0001 -#define PCI_DEVICE_ID_RP8INTF 0x0002 -#define PCI_DEVICE_ID_RP16INTF 0x0003 -#define PCI_DEVICE_ID_RP32INTF 0x0004 - -#define PCI_VENDOR_ID_CYCLADES 0x120e -#define PCI_DEVICE_ID_CYCLADES_Y 0x0100 - -#define PCI_VENDOR_ID_SYMPHONY 0x1c1c -#define PCI_DEVICE_ID_SYMPHONY_101 0x0001 - -#define PCI_VENDOR_ID_TEKRAM 0x1de1 -#define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 - -#define PCI_VENDOR_ID_AVANCE 0x4005 -#define PCI_DEVICE_ID_AVANCE_2302 0x2302 - -#define PCI_VENDOR_ID_S3 0x5333 -#define PCI_DEVICE_ID_S3_811 0x8811 -#define PCI_DEVICE_ID_S3_868 0x8880 -#define PCI_DEVICE_ID_S3_928 0x88b0 -#define PCI_DEVICE_ID_S3_864_1 0x88c0 -#define PCI_DEVICE_ID_S3_864_2 0x88c1 -#define PCI_DEVICE_ID_S3_964_1 0x88d0 -#define PCI_DEVICE_ID_S3_964_2 0x88d1 -#define PCI_DEVICE_ID_S3_968 0x88f0 - -#define PCI_VENDOR_ID_INTEL 0x8086 -#define PCI_DEVICE_ID_INTEL_82375 0x0482 -#define PCI_DEVICE_ID_INTEL_82424 0x0483 -#define PCI_DEVICE_ID_INTEL_82378 0x0484 -#define PCI_DEVICE_ID_INTEL_82430 0x0486 -#define PCI_DEVICE_ID_INTEL_82434 0x04a3 -#define PCI_DEVICE_ID_INTEL_7116 0x1223 -#define PCI_DEVICE_ID_INTEL_82596 0x1226 -#define PCI_DEVICE_ID_INTEL_82865 0x1227 -#define PCI_DEVICE_ID_INTEL_82557 0x1229 -#define PCI_DEVICE_ID_INTEL_82437 0x122d -#define PCI_DEVICE_ID_INTEL_82371_0 0x122e -#define PCI_DEVICE_ID_INTEL_82371_1 0x1230 -#define PCI_DEVICE_ID_INTEL_P6 0x84c4 - -#define PCI_VENDOR_ID_ADAPTEC 0x9004 -#define PCI_DEVICE_ID_ADAPTEC_7850 0x5078 -#define PCI_DEVICE_ID_ADAPTEC_7870 0x7078 -#define PCI_DEVICE_ID_ADAPTEC_7871 0x7178 -#define PCI_DEVICE_ID_ADAPTEC_7872 0x7278 -#define PCI_DEVICE_ID_ADAPTEC_7873 0x7378 -#define PCI_DEVICE_ID_ADAPTEC_7874 0x7478 -#define PCI_DEVICE_ID_ADAPTEC_7880 0x8078 -#define PCI_DEVICE_ID_ADAPTEC_7881 0x8178 -#define PCI_DEVICE_ID_ADAPTEC_7882 0x8278 -#define PCI_DEVICE_ID_ADAPTEC_7883 0x8378 -#define PCI_DEVICE_ID_ADAPTEC_7884 0x8478 - -#define PCI_VENDOR_ID_ATRONICS 0x907f -#define PCI_DEVICE_ID_ATRONICS_2015 0x2015 - -#define PCI_VENDOR_ID_HER 0xedd8 -#define PCI_DEVICE_ID_HER_STING 0xa091 -#define PCI_DEVICE_ID_HER_STINGARK 0xa099 - -/* - * The PCI interface treats multi-function devices as independent - * devices. The slot/function address of each device is encoded - * in a single byte as follows: - * - * 7:4 = slot - * 3:0 = function - */ -#define PCI_DEVFN(slot,func) ((((slot) & 0x1f) << 3) | ((func) & 0x07)) -#define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) -#define PCI_FUNC(devfn) ((devfn) & 0x07) - -/* - * There is one pci_dev structure for each slot-number/function-number - * combination: - */ -struct pci_dev { - struct pci_bus *bus; /* bus this device is on */ - struct pci_dev *sibling; /* next device on this bus */ - struct pci_dev *next; /* chain of all devices */ - - void *sysdata; /* hook for sys-specific extension */ - - unsigned int devfn; /* encoded device & function index */ - unsigned short vendor; - unsigned short device; - unsigned int class; /* 3 bytes: (base,sub,prog-if) */ - unsigned int master : 1; /* set if device is master capable */ - /* - * In theory, the irq level can be read from configuration - * space and all would be fine. However, old PCI chips don't - * support these registers and return 0 instead. For example, - * the Vision864-P rev 0 chip can uses INTA, but returns 0 in - * the interrupt line and pin registers. pci_init() - * initializes this field with the value at PCI_INTERRUPT_LINE - * and it is the job of pcibios_fixup() to change it if - * necessary. The field must not be 0 unless the device - * cannot generate interrupts at all. - */ - unsigned char irq; /* irq generated by this device */ -}; - -struct pci_bus { - struct pci_bus *parent; /* parent bus this bridge is on */ - struct pci_bus *children; /* chain of P2P bridges on this bus */ - struct pci_bus *next; /* chain of all PCI buses */ - - struct pci_dev *self; /* bridge device as seen by parent */ - struct pci_dev *devices; /* devices behind this bridge */ - - void *sysdata; /* hook for sys-specific extension */ - - unsigned char number; /* bus number */ - unsigned char primary; /* number of primary bridge */ - unsigned char secondary; /* number of secondary bridge */ - unsigned char subordinate; /* max number of subordinate buses */ -}; - -/* - * This is used to map a vendor-id/device-id pair into device-specific - * information. - */ -struct pci_dev_info { - unsigned short vendor; /* vendor id */ - unsigned short device; /* device id */ - - const char *name; /* device name */ - unsigned char bridge_type; /* bridge type or 0xff */ -}; - -extern struct pci_bus pci_root; /* root bus */ -extern struct pci_dev *pci_devices; /* list of all devices */ - - -extern unsigned long pci_init (unsigned long mem_start, unsigned long mem_end); - -extern struct pci_dev_info *pci_lookup_dev (unsigned int vendor, - unsigned int dev); -extern const char *pci_strclass (unsigned int class); -extern const char *pci_strvendor (unsigned int vendor); -extern const char *pci_strdev (unsigned int vendor, unsigned int device); - -extern int get_pci_list (char *buf); - -#endif /* PCI_H */ diff --git a/i386/i386at/gpl/linux/include/linux/personality.h b/i386/i386at/gpl/linux/include/linux/personality.h deleted file mode 100644 index 3e465ea..0000000 --- a/i386/i386at/gpl/linux/include/linux/personality.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef _PERSONALITY_H -#define _PERSONALITY_H - -#include <linux/linkage.h> -#include <linux/ptrace.h> - - -/* Flags for bug emulation. These occupy the top three bytes. */ -#define STICKY_TIMEOUTS 0x4000000 -#define WHOLE_SECONDS 0x2000000 - -/* Personality types. These go in the low byte. Avoid using the top bit, - * it will conflict with error returns. - */ -#define PER_MASK (0x00ff) -#define PER_LINUX (0x0000) -#define PER_SVR4 (0x0001 | STICKY_TIMEOUTS) -#define PER_SVR3 (0x0002 | STICKY_TIMEOUTS) -#define PER_SCOSVR3 (0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS) -#define PER_WYSEV386 (0x0004 | STICKY_TIMEOUTS) -#define PER_ISCR4 (0x0005 | STICKY_TIMEOUTS) -#define PER_BSD (0x0006) -#define PER_XENIX (0x0007 | STICKY_TIMEOUTS) - -/* Prototype for an lcall7 syscall handler. */ -typedef asmlinkage void (*lcall7_func)(struct pt_regs *); - - -/* Description of an execution domain - personality range supported, - * lcall7 syscall handler, start up / shut down functions etc. - * N.B. The name and lcall7 handler must be where they are since the - * offset of the handler is hard coded in kernel/sys_call.S. - */ -struct exec_domain { - const char *name; - lcall7_func handler; - unsigned char pers_low, pers_high; - unsigned long * signal_map; - unsigned long * signal_invmap; - int *use_count; - struct exec_domain *next; -}; - -extern struct exec_domain default_exec_domain; - -extern struct exec_domain *lookup_exec_domain(unsigned long personality); -extern int register_exec_domain(struct exec_domain *it); -extern int unregister_exec_domain(struct exec_domain *it); -extern asmlinkage int sys_personality(unsigned long personality); - -#endif /* _PERSONALITY_H */ diff --git a/i386/i386at/gpl/linux/include/linux/proc_fs.h b/i386/i386at/gpl/linux/include/linux/proc_fs.h deleted file mode 100644 index cc674c9..0000000 --- a/i386/i386at/gpl/linux/include/linux/proc_fs.h +++ /dev/null @@ -1,269 +0,0 @@ -#ifndef _LINUX_PROC_FS_H -#define _LINUX_PROC_FS_H - -#include <linux/fs.h> -#include <linux/malloc.h> - -/* - * The proc filesystem constants/structures - */ - -/* - * We always define these enumerators - */ - -enum root_directory_inos { - PROC_ROOT_INO = 1, - PROC_LOADAVG, - PROC_UPTIME, - PROC_MEMINFO, - PROC_KMSG, - PROC_VERSION, - PROC_CPUINFO, - PROC_PCI, - PROC_SELF, /* will change inode # */ - PROC_NET, - PROC_SCSI, - PROC_MALLOC, - PROC_KCORE, - PROC_MODULES, - PROC_STAT, - PROC_DEVICES, - PROC_INTERRUPTS, - PROC_FILESYSTEMS, - PROC_KSYMS, - PROC_DMA, - PROC_IOPORTS, - PROC_APM, -#ifdef __SMP_PROF__ - PROC_SMP_PROF, -#endif - PROC_PROFILE, /* whether enabled or not */ - PROC_CMDLINE, - PROC_SYS, - PROC_MTAB -}; - -enum pid_directory_inos { - PROC_PID_INO = 2, - PROC_PID_STATUS, - PROC_PID_MEM, - PROC_PID_CWD, - PROC_PID_ROOT, - PROC_PID_EXE, - PROC_PID_FD, - PROC_PID_ENVIRON, - PROC_PID_CMDLINE, - PROC_PID_STAT, - PROC_PID_STATM, - PROC_PID_MAPS -}; - -enum pid_subdirectory_inos { - PROC_PID_FD_DIR = 1 -}; - -enum net_directory_inos { - PROC_NET_UNIX = 128, - PROC_NET_ARP, - PROC_NET_ROUTE, - PROC_NET_DEV, - PROC_NET_RAW, - PROC_NET_TCP, - PROC_NET_UDP, - PROC_NET_SNMP, - PROC_NET_RARP, - PROC_NET_IGMP, - PROC_NET_IPMR_VIF, - PROC_NET_IPMR_MFC, - PROC_NET_IPFWFWD, - PROC_NET_IPFWIN, - PROC_NET_IPFWOUT, - PROC_NET_IPACCT, - PROC_NET_IPMSQHST, - PROC_NET_WAVELAN, - PROC_NET_IPX_INTERFACE, - PROC_NET_IPX_ROUTE, - PROC_NET_IPX, - PROC_NET_ATALK, - PROC_NET_AT_ROUTE, - PROC_NET_ATIF, - PROC_NET_AX25_ROUTE, - PROC_NET_AX25, - PROC_NET_AX25_CALLS, - PROC_NET_NR_NODES, - PROC_NET_NR_NEIGH, - PROC_NET_NR, - PROC_NET_SOCKSTAT, - PROC_NET_RTCACHE, - PROC_NET_AX25_BPQETHER, - PROC_NET_ALIAS_TYPES, - PROC_NET_ALIASES, - PROC_NET_LAST -}; - -enum scsi_directory_inos { - PROC_SCSI_SCSI = 256, - PROC_SCSI_ADVANSYS, - PROC_SCSI_EATA, - PROC_SCSI_EATA_PIO, - PROC_SCSI_AHA152X, - PROC_SCSI_AHA1542, - PROC_SCSI_AHA1740, - PROC_SCSI_AIC7XXX, - PROC_SCSI_BUSLOGIC, - PROC_SCSI_U14_34F, - PROC_SCSI_FDOMAIN, - PROC_SCSI_GENERIC_NCR5380, - PROC_SCSI_IN2000, - PROC_SCSI_PAS16, - PROC_SCSI_QLOGIC, - PROC_SCSI_SEAGATE, - PROC_SCSI_T128, - PROC_SCSI_NCR53C7xx, - PROC_SCSI_ULTRASTOR, - PROC_SCSI_7000FASST, - PROC_SCSI_EATA2X, - PROC_SCSI_AM53C974, - PROC_SCSI_SSC, - PROC_SCSI_NCR53C406A, - PROC_SCSI_SCSI_DEBUG, - PROC_SCSI_NOT_PRESENT, - PROC_SCSI_FILE, /* I'm asuming here that we */ - PROC_SCSI_LAST = (PROC_SCSI_FILE + 16) /* won't ever see more than */ -}; /* 16 HBAs in one machine */ - -/* Finally, the dynamically allocatable proc entries are reserved: */ - -#define PROC_DYNAMIC_FIRST 4096 -#define PROC_NDYNAMIC 4096 - -#define PROC_SUPER_MAGIC 0x9fa0 - -/* - * This is not completely implemented yet. The idea is to - * create a in-memory tree (like the actual /proc filesystem - * tree) of these proc_dir_entries, so that we can dynamically - * add new files to /proc. - * - * The "next" pointer creates a linked list of one /proc directory, - * while parent/subdir create the directory structure (every - * /proc file has a parent, but "subdir" is NULL for all - * non-directory entries). - * - * "get_info" is called at "read", while "fill_inode" is used to - * fill in file type/protection/owner information specific to the - * particular /proc file. - */ -struct proc_dir_entry { - unsigned short low_ino; - unsigned short namelen; - const char *name; - mode_t mode; - nlink_t nlink; - uid_t uid; - gid_t gid; - unsigned long size; - struct inode_operations * ops; - int (*get_info)(char *, char **, off_t, int, int); - void (*fill_inode)(struct inode *); - struct proc_dir_entry *next, *parent, *subdir; - void *data; -}; - -extern int (* dispatch_scsi_info_ptr) (int ino, char *buffer, char **start, - off_t offset, int length, int inout); - -extern struct proc_dir_entry proc_root; -extern struct proc_dir_entry proc_net; -extern struct proc_dir_entry proc_scsi; -extern struct proc_dir_entry proc_sys; -extern struct proc_dir_entry proc_pid; -extern struct proc_dir_entry proc_pid_fd; - -extern struct inode_operations proc_scsi_inode_operations; - -extern void proc_root_init(void); -extern void proc_base_init(void); -extern void proc_net_init(void); - -extern int proc_register(struct proc_dir_entry *, struct proc_dir_entry *); -extern int proc_register_dynamic(struct proc_dir_entry *, - struct proc_dir_entry *); -extern int proc_unregister(struct proc_dir_entry *, int); - -static inline int proc_net_register(struct proc_dir_entry * x) -{ - return proc_register(&proc_net, x); -} - -static inline int proc_net_unregister(int x) -{ - return proc_unregister(&proc_net, x); -} - -static inline int proc_scsi_register(struct proc_dir_entry *driver, - struct proc_dir_entry *x) -{ - x->ops = &proc_scsi_inode_operations; - if(x->low_ino < PROC_SCSI_FILE){ - return(proc_register(&proc_scsi, x)); - }else{ - return(proc_register(driver, x)); - } -} - -static inline int proc_scsi_unregister(struct proc_dir_entry *driver, int x) -{ - extern void scsi_init_free(char *ptr, unsigned int size); - - if(x <= PROC_SCSI_FILE) - return(proc_unregister(&proc_scsi, x)); - else { - struct proc_dir_entry **p = &driver->subdir, *dp; - int ret; - - while ((dp = *p) != NULL) { - if (dp->low_ino == x) - break; - p = &dp->next; - } - ret = proc_unregister(driver, x); - scsi_init_free((char *) dp, sizeof(struct proc_dir_entry) + 4); - return(ret); - } -} - -extern struct super_block *proc_read_super(struct super_block *,void *,int); -extern int init_proc_fs(void); -extern struct inode * proc_get_inode(struct super_block *, int, struct proc_dir_entry *); -extern void proc_statfs(struct super_block *, struct statfs *, int); -extern void proc_read_inode(struct inode *); -extern void proc_write_inode(struct inode *); -extern int proc_match(int, const char *, struct proc_dir_entry *); - -/* - * These are generic /proc routines that use the internal - * "struct proc_dir_entry" tree to traverse the filesystem. - * - * The /proc root directory has extended versions to take care - * of the /proc/<pid> subdirectories. - */ -extern int proc_readdir(struct inode *, struct file *, void *, filldir_t); -extern int proc_lookup(struct inode *, const char *, int, struct inode **); - -extern struct inode_operations proc_dir_inode_operations; -extern struct inode_operations proc_net_inode_operations; -extern struct inode_operations proc_netdir_inode_operations; -extern struct inode_operations proc_scsi_inode_operations; -extern struct inode_operations proc_mem_inode_operations; -extern struct inode_operations proc_sys_inode_operations; -extern struct inode_operations proc_array_inode_operations; -extern struct inode_operations proc_arraylong_inode_operations; -extern struct inode_operations proc_kcore_inode_operations; -extern struct inode_operations proc_profile_inode_operations; -extern struct inode_operations proc_kmsg_inode_operations; -extern struct inode_operations proc_link_inode_operations; -extern struct inode_operations proc_fd_inode_operations; - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/ptrace.h b/i386/i386at/gpl/linux/include/linux/ptrace.h deleted file mode 100644 index 0a02879..0000000 --- a/i386/i386at/gpl/linux/include/linux/ptrace.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef _LINUX_PTRACE_H -#define _LINUX_PTRACE_H -/* ptrace.h */ -/* structs and defines to help the user use the ptrace system call. */ - -/* has the defines to get at the registers. */ - -#define PTRACE_TRACEME 0 -#define PTRACE_PEEKTEXT 1 -#define PTRACE_PEEKDATA 2 -#define PTRACE_PEEKUSR 3 -#define PTRACE_POKETEXT 4 -#define PTRACE_POKEDATA 5 -#define PTRACE_POKEUSR 6 -#define PTRACE_CONT 7 -#define PTRACE_KILL 8 -#define PTRACE_SINGLESTEP 9 - -#define PTRACE_ATTACH 0x10 -#define PTRACE_DETACH 0x11 - -#define PTRACE_SYSCALL 24 - -#include <asm/ptrace.h> - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/quota.h b/i386/i386at/gpl/linux/include/linux/quota.h deleted file mode 100644 index 59b86fe..0000000 --- a/i386/i386at/gpl/linux/include/linux/quota.h +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 1982, 1986 Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Robert Elz at The University of Melbourne. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Version: $Id: quota.h,v 1.1.1.1 1997/02/25 21:27:30 thomas Exp $ - */ - -#ifndef _LINUX_QUOTA_ -#define _LINUX_QUOTA_ - -#include <linux/errno.h> - -/* - * Convert diskblocks to blocks and the other way around. - * currently only to fool the BSD source. :-) - */ -#define dbtob(num) (num << 10) -#define btodb(num) (num >> 10) - -/* - * Convert count of filesystem blocks to diskquota blocks, meant - * for filesystems where i_blksize != BLOCK_SIZE - */ -#define fs_to_dq_blocks(num, blksize) (((num) * (blksize)) / BLOCK_SIZE) - -/* - * Definitions for disk quotas imposed on the average user - * (big brother finally hits Linux). - * - * The following constants define the amount of time given a user - * before the soft limits are treated as hard limits (usually resulting - * in an allocation failure). The timer is started when the user crosses - * their soft limit, it is reset when they go below their soft limit. - */ -#define MAX_IQ_TIME 604800 /* (7*24*60*60) 1 week */ -#define MAX_DQ_TIME 604800 /* (7*24*60*60) 1 week */ - -#define MAXQUOTAS 2 -#define USRQUOTA 0 /* element used for user quotas */ -#define GRPQUOTA 1 /* element used for group quotas */ - -#include <linux/mount.h> - -/* - * Definitions for the default names of the quotas files. - */ -#define INITQFNAMES { \ - "user", /* USRQUOTA */ \ - "group", /* GRPQUOTA */ \ - "undefined", \ -}; - -#define QUOTAFILENAME "quota" -#define QUOTAGROUP "staff" - -#define NR_DQHASH 43 /* Just an arbitrary number any suggestions ? */ -#define NR_DQUOTS 256 /* Number of quotas active at one time */ - -/* - * Command definitions for the 'quotactl' system call. - * The commands are broken into a main command defined below - * and a subcommand that is used to convey the type of - * quota that is being manipulated (see above). - */ -#define SUBCMDMASK 0x00ff -#define SUBCMDSHIFT 8 -#define QCMD(cmd, type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK)) - -#define Q_QUOTAON 0x0100 /* enable quotas */ -#define Q_QUOTAOFF 0x0200 /* disable quotas */ -#define Q_GETQUOTA 0x0300 /* get limits and usage */ -#define Q_SETQUOTA 0x0400 /* set limits and usage */ -#define Q_SETUSE 0x0500 /* set usage */ -#define Q_SYNC 0x0600 /* sync disk copy of a filesystems quotas */ -#define Q_SETQLIM 0x0700 /* set limits */ -#define Q_GETSTATS 0x0800 /* get collected stats */ - -/* - * The following structure defines the format of the disk quota file - * (as it appears on disk) - the file is an array of these structures - * indexed by user or group number. - */ -struct dqblk { - __u32 dqb_bhardlimit; /* absolute limit on disk blks alloc */ - __u32 dqb_bsoftlimit; /* preferred limit on disk blks */ - __u32 dqb_curblocks; /* current block count */ - __u32 dqb_ihardlimit; /* maximum # allocated inodes */ - __u32 dqb_isoftlimit; /* preferred inode limit */ - __u32 dqb_curinodes; /* current # allocated inodes */ - time_t dqb_btime; /* time limit for excessive disk use */ - time_t dqb_itime; /* time limit for excessive files */ -}; - -/* - * Shorthand notation. - */ -#define dq_bhardlimit dq_dqb.dqb_bhardlimit -#define dq_bsoftlimit dq_dqb.dqb_bsoftlimit -#define dq_curblocks dq_dqb.dqb_curblocks -#define dq_ihardlimit dq_dqb.dqb_ihardlimit -#define dq_isoftlimit dq_dqb.dqb_isoftlimit -#define dq_curinodes dq_dqb.dqb_curinodes -#define dq_btime dq_dqb.dqb_btime -#define dq_itime dq_dqb.dqb_itime - -#define dqoff(UID) ((off_t)((UID) * sizeof (struct dqblk))) - -struct dqstats { - __u32 lookups; - __u32 drops; - __u32 reads; - __u32 writes; - __u32 cache_hits; - __u32 pages_allocated; - __u32 allocated_dquots; - __u32 free_dquots; - __u32 syncs; -}; - -#ifdef __KERNEL__ - -/* - * Maximum lenght of a message generated in the quota system, - * that needs to be kicked onto the tty. - */ -#define MAX_QUOTA_MESSAGE 75 - -#define DQ_LOCKED 0x01 /* locked for update */ -#define DQ_WANT 0x02 /* wanted for update */ -#define DQ_MOD 0x04 /* dquot modified since read */ -#define DQ_BLKS 0x10 /* uid/gid has been warned about blk limit */ -#define DQ_INODES 0x20 /* uid/gid has been warned about inode limit */ -#define DQ_FAKE 0x40 /* no limits only usage */ - -struct dquot { - unsigned int dq_id; /* id this applies to (uid, gid) */ - short dq_type; /* type of quota */ - kdev_t dq_dev; /* Device this applies to */ - short dq_flags; /* see DQ_* */ - short dq_count; /* reference count */ - struct vfsmount *dq_mnt; /* vfsmountpoint this applies to */ - struct dqblk dq_dqb; /* diskquota usage */ - struct wait_queue *dq_wait; /* pointer to waitqueue */ - struct dquot *dq_prev; /* pointer to prev dquot */ - struct dquot *dq_next; /* pointer to next dquot */ - struct dquot *dq_hash_prev; /* pointer to prev dquot */ - struct dquot *dq_hash_next; /* pointer to next dquot */ -}; - -#define NODQUOT (struct dquot *)NULL - -/* - * Flags used for set_dqblk. - */ -#define QUOTA_SYSCALL 0x01 -#define SET_QUOTA 0x02 -#define SET_USE 0x04 -#define SET_QLIMIT 0x08 - -#define QUOTA_OK 0 -#define NO_QUOTA 1 - -/* - * declaration of quota_function calls in kernel. - */ - -extern void dquot_initialize(struct inode *inode, short type); -extern void dquot_drop(struct inode *inode); -extern int dquot_alloc_block(const struct inode *inode, unsigned long number); -extern int dquot_alloc_inode(const struct inode *inode, unsigned long number); -extern void dquot_free_block(const struct inode *inode, unsigned long number); -extern void dquot_free_inode(const struct inode *inode, unsigned long number); -extern int dquot_transfer(struct inode *inode, struct iattr *iattr, char direction); - -extern void invalidate_dquots(kdev_t dev, short type); -extern int quota_off(kdev_t dev, short type); -extern int sync_dquots(kdev_t dev, short type); - -#else - -#include <sys/cdefs.h> - -__BEGIN_DECLS -int quotactl __P ((int, const char *, int, caddr_t)); -__END_DECLS - -#endif /* __KERNEL__ */ -#endif /* _QUOTA_ */ diff --git a/i386/i386at/gpl/linux/include/linux/resource.h b/i386/i386at/gpl/linux/include/linux/resource.h deleted file mode 100644 index f3bffbd..0000000 --- a/i386/i386at/gpl/linux/include/linux/resource.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef _LINUX_RESOURCE_H -#define _LINUX_RESOURCE_H - -#include <linux/time.h> - -/* - * Resource control/accounting header file for linux - */ - -/* - * Definition of struct rusage taken from BSD 4.3 Reno - * - * We don't support all of these yet, but we might as well have them.... - * Otherwise, each time we add new items, programs which depend on this - * structure will lose. This reduces the chances of that happening. - */ -#define RUSAGE_SELF 0 -#define RUSAGE_CHILDREN (-1) -#define RUSAGE_BOTH (-2) /* sys_wait4() uses this */ - -struct rusage { - struct timeval ru_utime; /* user time used */ - struct timeval ru_stime; /* system time used */ - long ru_maxrss; /* maximum resident set size */ - long ru_ixrss; /* integral shared memory size */ - long ru_idrss; /* integral unshared data size */ - long ru_isrss; /* integral unshared stack size */ - long ru_minflt; /* page reclaims */ - long ru_majflt; /* page faults */ - long ru_nswap; /* swaps */ - long ru_inblock; /* block input operations */ - long ru_oublock; /* block output operations */ - long ru_msgsnd; /* messages sent */ - long ru_msgrcv; /* messages received */ - long ru_nsignals; /* signals received */ - long ru_nvcsw; /* voluntary context switches */ - long ru_nivcsw; /* involuntary " */ -}; - -#define RLIM_INFINITY ((long)(~0UL>>1)) - -struct rlimit { - long rlim_cur; - long rlim_max; -}; - -#define PRIO_MIN (-20) -#define PRIO_MAX 20 - -#define PRIO_PROCESS 0 -#define PRIO_PGRP 1 -#define PRIO_USER 2 - -/* - * Due to binary compatibility, the actual resource numbers - * may be different for different linux versions.. - */ -#include <asm/resource.h> - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/route.h b/i386/i386at/gpl/linux/include/linux/route.h deleted file mode 100644 index 5be4853..0000000 --- a/i386/i386at/gpl/linux/include/linux/route.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Global definitions for the IP router interface. - * - * Version: @(#)route.h 1.0.3 05/27/93 - * - * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988 - * for the purposes of compatibility only. - * - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _LINUX_ROUTE_H -#define _LINUX_ROUTE_H - -#include <linux/if.h> - - -/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */ -struct rtentry -{ - unsigned long rt_hash; /* hash key for lookups */ - struct sockaddr rt_dst; /* target address */ - struct sockaddr rt_gateway; /* gateway addr (RTF_GATEWAY) */ - struct sockaddr rt_genmask; /* target network mask (IP) */ - short rt_flags; - short rt_refcnt; - unsigned long rt_use; - struct ifnet *rt_ifp; - short rt_metric; /* +1 for binary compatibility! */ - char *rt_dev; /* forcing the device at add */ - unsigned long rt_mss; /* per route MTU/Window */ - unsigned long rt_window; /* Window clamping */ - unsigned short rt_irtt; /* Initial RTT */ -}; - - -#define RTF_UP 0x0001 /* route usable */ -#define RTF_GATEWAY 0x0002 /* destination is a gateway */ -#define RTF_HOST 0x0004 /* host entry (net otherwise) */ -#define RTF_REINSTATE 0x0008 /* reinstate route after tmout */ -#define RTF_DYNAMIC 0x0010 /* created dyn. (by redirect) */ -#define RTF_MODIFIED 0x0020 /* modified dyn. (by redirect) */ -#define RTF_MSS 0x0040 /* specific MSS for this route */ -#define RTF_WINDOW 0x0080 /* per route window clamping */ -#define RTF_IRTT 0x0100 /* Initial round trip time */ -#define RTF_REJECT 0x0200 /* Reject route */ - -/* - * This structure is passed from the kernel to user space by netlink - * routing/device announcements - */ - -struct netlink_rtinfo -{ - unsigned long rtmsg_type; - struct sockaddr rtmsg_dst; - struct sockaddr rtmsg_gateway; - struct sockaddr rtmsg_genmask; - short rtmsg_flags; - short rtmsg_metric; - char rtmsg_device[16]; -}; - -#define RTMSG_NEWROUTE 0x01 -#define RTMSG_DELROUTE 0x02 -#define RTMSG_NEWDEVICE 0x11 -#define RTMSG_DELDEVICE 0x12 - -#endif /* _LINUX_ROUTE_H */ - diff --git a/i386/i386at/gpl/linux/include/linux/sched.h b/i386/i386at/gpl/linux/include/linux/sched.h deleted file mode 100644 index 28fe7ef..0000000 --- a/i386/i386at/gpl/linux/include/linux/sched.h +++ /dev/null @@ -1,492 +0,0 @@ -#ifndef _LINUX_SCHED_H -#define _LINUX_SCHED_H - -/* - * define DEBUG if you want the wait-queues to have some extra - * debugging code. It's not normally used, but might catch some - * wait-queue coding errors. - * - * #define DEBUG - */ - -#include <asm/param.h> /* for HZ */ - -extern unsigned long intr_count; -extern unsigned long event; - -#include <linux/binfmts.h> -#include <linux/personality.h> -#include <linux/tasks.h> -#include <linux/kernel.h> -#include <asm/system.h> -#include <asm/page.h> - -#include <linux/smp.h> -#include <linux/tty.h> -#include <linux/sem.h> - -/* - * cloning flags: - */ -#define CSIGNAL 0x000000ff /* signal mask to be sent at exit */ -#define CLONE_VM 0x00000100 /* set if VM shared between processes */ -#define CLONE_FS 0x00000200 /* set if fs info shared between processes */ -#define CLONE_FILES 0x00000400 /* set if open files shared between processes */ -#define CLONE_SIGHAND 0x00000800 /* set if signal handlers shared */ -#define CLONE_PID 0x00001000 /* set if pid shared */ - -/* - * These are the constant used to fake the fixed-point load-average - * counting. Some notes: - * - 11 bit fractions expand to 22 bits by the multiplies: this gives - * a load-average precision of 10 bits integer + 11 bits fractional - * - if you want to count load-averages more often, you need more - * precision, or rounding will get you. With 2-second counting freq, - * the EXP_n values would be 1981, 2034 and 2043 if still using only - * 11 bit fractions. - */ -extern unsigned long avenrun[]; /* Load averages */ - -#define FSHIFT 11 /* nr of bits of precision */ -#define FIXED_1 (1<<FSHIFT) /* 1.0 as fixed-point */ -#define LOAD_FREQ (5*HZ) /* 5 sec intervals */ -#define EXP_1 1884 /* 1/exp(5sec/1min) as fixed-point */ -#define EXP_5 2014 /* 1/exp(5sec/5min) */ -#define EXP_15 2037 /* 1/exp(5sec/15min) */ - -#define CALC_LOAD(load,exp,n) \ - load *= exp; \ - load += n*(FIXED_1-exp); \ - load >>= FSHIFT; - -#define CT_TO_SECS(x) ((x) / HZ) -#define CT_TO_USECS(x) (((x) % HZ) * 1000000/HZ) - -extern int nr_running, nr_tasks; - -#define FIRST_TASK task[0] -#define LAST_TASK task[NR_TASKS-1] - -#include <linux/head.h> -#include <linux/fs.h> -#include <linux/signal.h> -#include <linux/time.h> -#include <linux/param.h> -#include <linux/resource.h> -#include <linux/vm86.h> -#include <linux/math_emu.h> -#include <linux/ptrace.h> -#include <linux/timer.h> - -#include <asm/processor.h> - -#define TASK_RUNNING 0 -#define TASK_INTERRUPTIBLE 1 -#define TASK_UNINTERRUPTIBLE 2 -#define TASK_ZOMBIE 3 -#define TASK_STOPPED 4 -#define TASK_SWAPPING 5 - -/* - * Scheduling policies - */ -#define SCHED_OTHER 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 - -struct sched_param { - int sched_priority; -}; - -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#ifdef __KERNEL__ - -#define barrier() __asm__("": : :"memory") - -extern void sched_init(void); -extern void show_state(void); -extern void trap_init(void); - -asmlinkage void schedule(void); - -struct files_struct { - int count; - fd_set close_on_exec; - struct file * fd[NR_OPEN]; -}; - -#define INIT_FILES { \ - 1, \ - { { 0, } }, \ - { NULL, } \ -} - -struct fs_struct { - int count; - unsigned short umask; - struct inode * root, * pwd; -}; - -#define INIT_FS { \ - 1, \ - 0022, \ - NULL, NULL \ -} - -struct mm_struct { - int count; - pgd_t * pgd; - unsigned long context; - unsigned long start_code, end_code, start_data, end_data; - unsigned long start_brk, brk, start_stack, start_mmap; - unsigned long arg_start, arg_end, env_start, env_end; - unsigned long rss, total_vm, locked_vm; - unsigned long def_flags; - struct vm_area_struct * mmap; - struct vm_area_struct * mmap_avl; -}; - -#define INIT_MM { \ - 1, \ - swapper_pg_dir, \ - 0, \ - 0, 0, 0, 0, \ - 0, 0, 0, 0, \ - 0, 0, 0, 0, \ - 0, 0, 0, \ - 0, \ - &init_mmap, &init_mmap } - -struct signal_struct { - int count; - struct sigaction action[32]; -}; - -#define INIT_SIGNALS { \ - 1, \ - { {0,}, } } - -struct task_struct { -/* these are hardcoded - don't touch */ - volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ - long counter; - long priority; - unsigned long signal; - unsigned long blocked; /* bitmap of masked signals */ - unsigned long flags; /* per process flags, defined below */ - int errno; - long debugreg[8]; /* Hardware debugging registers */ - struct exec_domain *exec_domain; -/* various fields */ - struct linux_binfmt *binfmt; - struct task_struct *next_task, *prev_task; - struct task_struct *next_run, *prev_run; - unsigned long saved_kernel_stack; - unsigned long kernel_stack_page; - int exit_code, exit_signal; - unsigned long personality; - int dumpable:1; - int did_exec:1; - int pid,pgrp,tty_old_pgrp,session,leader; - int groups[NGROUPS]; - /* - * pointers to (original) parent process, youngest child, younger sibling, - * older sibling, respectively. (p->father can be replaced with - * p->p_pptr->pid) - */ - struct task_struct *p_opptr, *p_pptr, *p_cptr, *p_ysptr, *p_osptr; - struct wait_queue *wait_chldexit; /* for wait4() */ - unsigned short uid,euid,suid,fsuid; - unsigned short gid,egid,sgid,fsgid; - unsigned long timeout, policy, rt_priority; - unsigned long it_real_value, it_prof_value, it_virt_value; - unsigned long it_real_incr, it_prof_incr, it_virt_incr; - struct timer_list real_timer; - long utime, stime, cutime, cstime, start_time; -/* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ - unsigned long min_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap; - int swappable:1; - unsigned long swap_address; - unsigned long old_maj_flt; /* old value of maj_flt */ - unsigned long dec_flt; /* page fault count of the last time */ - unsigned long swap_cnt; /* number of pages to swap on next pass */ -/* limits */ - struct rlimit rlim[RLIM_NLIMITS]; - unsigned short used_math; - char comm[16]; -/* file system info */ - int link_count; - struct tty_struct *tty; /* NULL if no tty */ -/* ipc stuff */ - struct sem_undo *semundo; - struct sem_queue *semsleeping; -/* ldt for this task - used by Wine. If NULL, default_ldt is used */ - struct desc_struct *ldt; -/* tss for this task */ - struct thread_struct tss; -/* filesystem information */ - struct fs_struct *fs; -/* open file information */ - struct files_struct *files; -/* memory management info */ - struct mm_struct *mm; -/* signal handlers */ - struct signal_struct *sig; -#ifdef __SMP__ - int processor; - int last_processor; - int lock_depth; /* Lock depth. We can context switch in and out of holding a syscall kernel lock... */ -#endif -}; - -/* - * Per process flags - */ -#define PF_ALIGNWARN 0x00000001 /* Print alignment warning msgs */ - /* Not implemented yet, only for 486*/ -#define PF_PTRACED 0x00000010 /* set if ptrace (0) has been called. */ -#define PF_TRACESYS 0x00000020 /* tracing system calls */ - -#define PF_STARTING 0x00000100 /* being created */ -#define PF_EXITING 0x00000200 /* getting shut down */ - -#define PF_USEDFPU 0x00100000 /* Process used the FPU this quantum (SMP only) */ - -/* - * Limit the stack by to some sane default: root can always - * increase this limit if needed.. 8MB seems reasonable. - */ -#define _STK_LIM (8*1024*1024) - -#define DEF_PRIORITY (20*HZ/100) /* 200 ms time slices */ - -/* - * INIT_TASK is used to set up the first task table, touch at - * your own risk!. Base=0, limit=0x1fffff (=2MB) - */ -#define INIT_TASK \ -/* state etc */ { 0,DEF_PRIORITY,DEF_PRIORITY,0,0,0,0, \ -/* debugregs */ { 0, }, \ -/* exec domain */&default_exec_domain, \ -/* binfmt */ NULL, \ -/* schedlink */ &init_task,&init_task, &init_task, &init_task, \ -/* stack */ 0,(unsigned long) &init_kernel_stack, \ -/* ec,brk... */ 0,0,0,0,0, \ -/* pid etc.. */ 0,0,0,0,0, \ -/* suppl grps*/ {NOGROUP,}, \ -/* proc links*/ &init_task,&init_task,NULL,NULL,NULL,NULL, \ -/* uid etc */ 0,0,0,0,0,0,0,0, \ -/* timeout */ 0,SCHED_OTHER,0,0,0,0,0,0,0, \ -/* timer */ { NULL, NULL, 0, 0, it_real_fn }, \ -/* utime */ 0,0,0,0,0, \ -/* flt */ 0,0,0,0,0,0, \ -/* swp */ 0,0,0,0,0, \ -/* rlimits */ INIT_RLIMITS, \ -/* math */ 0, \ -/* comm */ "swapper", \ -/* fs info */ 0,NULL, \ -/* ipc */ NULL, NULL, \ -/* ldt */ NULL, \ -/* tss */ INIT_TSS, \ -/* fs */ &init_fs, \ -/* files */ &init_files, \ -/* mm */ &init_mm, \ -/* signals */ &init_signals, \ -} - -extern struct mm_struct init_mm; -extern struct task_struct init_task; -extern struct task_struct *task[NR_TASKS]; -extern struct task_struct *last_task_used_math; -extern struct task_struct *current_set[NR_CPUS]; -/* - * On a single processor system this comes out as current_set[0] when cpp - * has finished with it, which gcc will optimise away. - */ -#define current (0+current_set[smp_processor_id()]) /* Current on this processor */ -extern unsigned long volatile jiffies; -extern unsigned long itimer_ticks; -extern unsigned long itimer_next; -extern struct timeval xtime; -extern int need_resched; -extern void do_timer(struct pt_regs *); - -extern unsigned int * prof_buffer; -extern unsigned long prof_len; -extern unsigned long prof_shift; - -extern int securelevel; /* system security level */ - -#define CURRENT_TIME (xtime.tv_sec) - -extern void sleep_on(struct wait_queue ** p); -extern void interruptible_sleep_on(struct wait_queue ** p); -extern void wake_up(struct wait_queue ** p); -extern void wake_up_interruptible(struct wait_queue ** p); -extern void wake_up_process(struct task_struct * tsk); - -extern void notify_parent(struct task_struct * tsk); -extern int send_sig(unsigned long sig,struct task_struct * p,int priv); -extern int in_group_p(gid_t grp); - -extern int request_irq(unsigned int irq,void (*handler)(int, struct pt_regs *), - unsigned long flags, const char *device); -extern void free_irq(unsigned int irq); - -extern void copy_thread(int, unsigned long, unsigned long, struct task_struct *, struct pt_regs *); -extern void flush_thread(void); -extern void exit_thread(void); - -extern void exit_fs(struct task_struct *); -extern void exit_files(struct task_struct *); -extern void exit_sighand(struct task_struct *); -extern void release_thread(struct task_struct *); - -extern int do_execve(char *, char **, char **, struct pt_regs *); -extern int do_fork(unsigned long, unsigned long, struct pt_regs *); - -#ifdef MACH -extern void add_wait_queue(struct wait_queue **, struct wait_queue *); -extern void remove_wait_queue(struct wait_queue **, struct wait_queue *); -#else /* ! MACH */ -/* - * The wait-queues are circular lists, and you have to be *very* sure - * to keep them correct. Use only these two functions to add/remove - * entries in the queues. - */ -extern inline void add_wait_queue(struct wait_queue ** p, struct wait_queue * wait) -{ - unsigned long flags; - -#ifdef DEBUG - if (wait->next) { - __label__ here; - unsigned long pc; - pc = (unsigned long) &&here; - here: - printk("add_wait_queue (%08lx): wait->next = %08lx\n",pc,(unsigned long) wait->next); - } -#endif - save_flags(flags); - cli(); - if (!*p) { - wait->next = wait; - *p = wait; - } else { - wait->next = (*p)->next; - (*p)->next = wait; - } - restore_flags(flags); -} - -extern inline void remove_wait_queue(struct wait_queue ** p, struct wait_queue * wait) -{ - unsigned long flags; - struct wait_queue * tmp; -#ifdef DEBUG - unsigned long ok = 0; -#endif - - save_flags(flags); - cli(); - if ((*p == wait) && -#ifdef DEBUG - (ok = 1) && -#endif - ((*p = wait->next) == wait)) { - *p = NULL; - } else { - tmp = wait; - while (tmp->next != wait) { - tmp = tmp->next; -#ifdef DEBUG - if (tmp == *p) - ok = 1; -#endif - } - tmp->next = wait->next; - } - wait->next = NULL; - restore_flags(flags); -#ifdef DEBUG - if (!ok) { - __label__ here; - ok = (unsigned long) &&here; - printk("removed wait_queue not on list.\n"); - printk("list = %08lx, queue = %08lx\n",(unsigned long) p, (unsigned long) wait); - here: - printk("eip = %08lx\n",ok); - } -#endif -} - -extern inline void select_wait(struct wait_queue ** wait_address, select_table * p) -{ - struct select_table_entry * entry; - - if (!p || !wait_address) - return; - if (p->nr >= __MAX_SELECT_TABLE_ENTRIES) - return; - entry = p->entry + p->nr; - entry->wait_address = wait_address; - entry->wait.task = current; - entry->wait.next = NULL; - add_wait_queue(wait_address,&entry->wait); - p->nr++; -} -#endif /* ! MACH */ - -extern void __down(struct semaphore * sem); - -/* - * These are not yet interrupt-safe - */ -extern inline void down(struct semaphore * sem) -{ - if (sem->count <= 0) - __down(sem); - sem->count--; -} - -extern inline void up(struct semaphore * sem) -{ - sem->count++; - wake_up(&sem->wait); -} - -#define REMOVE_LINKS(p) do { unsigned long flags; \ - save_flags(flags) ; cli(); \ - (p)->next_task->prev_task = (p)->prev_task; \ - (p)->prev_task->next_task = (p)->next_task; \ - restore_flags(flags); \ - if ((p)->p_osptr) \ - (p)->p_osptr->p_ysptr = (p)->p_ysptr; \ - if ((p)->p_ysptr) \ - (p)->p_ysptr->p_osptr = (p)->p_osptr; \ - else \ - (p)->p_pptr->p_cptr = (p)->p_osptr; \ - } while (0) - -#define SET_LINKS(p) do { unsigned long flags; \ - save_flags(flags); cli(); \ - (p)->next_task = &init_task; \ - (p)->prev_task = init_task.prev_task; \ - init_task.prev_task->next_task = (p); \ - init_task.prev_task = (p); \ - restore_flags(flags); \ - (p)->p_ysptr = NULL; \ - if (((p)->p_osptr = (p)->p_pptr->p_cptr) != NULL) \ - (p)->p_osptr->p_ysptr = p; \ - (p)->p_pptr->p_cptr = p; \ - } while (0) - -#define for_each_task(p) \ - for (p = &init_task ; (p = p->next_task) != &init_task ; ) - -#endif /* __KERNEL__ */ - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/scsi.h b/i386/i386at/gpl/linux/include/linux/scsi.h deleted file mode 100644 index a05072c..0000000 --- a/i386/i386at/gpl/linux/include/linux/scsi.h +++ /dev/null @@ -1,198 +0,0 @@ -#ifndef _LINUX_SCSI_H -#define _LINUX_SCSI_H - -/* - * This header file contains public constants and structures used by - * the scsi code for linux. - */ - -/* - $Header: cvs/gnumach/i386/i386at/gpl/linux/include/linux/Attic/scsi.h,v 1.1.1.1 1997/02/25 21:27:31 thomas Exp $ - - For documentation on the OPCODES, MESSAGES, and SENSE values, - please consult the SCSI standard. - -*/ - -/* - * SCSI opcodes - */ - -#define TEST_UNIT_READY 0x00 -#define REZERO_UNIT 0x01 -#define REQUEST_SENSE 0x03 -#define FORMAT_UNIT 0x04 -#define READ_BLOCK_LIMITS 0x05 -#define REASSIGN_BLOCKS 0x07 -#define READ_6 0x08 -#define WRITE_6 0x0a -#define SEEK_6 0x0b -#define READ_REVERSE 0x0f -#define WRITE_FILEMARKS 0x10 -#define SPACE 0x11 -#define INQUIRY 0x12 -#define RECOVER_BUFFERED_DATA 0x14 -#define MODE_SELECT 0x15 -#define RESERVE 0x16 -#define RELEASE 0x17 -#define COPY 0x18 -#define ERASE 0x19 -#define MODE_SENSE 0x1a -#define START_STOP 0x1b -#define RECEIVE_DIAGNOSTIC 0x1c -#define SEND_DIAGNOSTIC 0x1d -#define ALLOW_MEDIUM_REMOVAL 0x1e - -#define SET_WINDOW 0x24 -#define READ_CAPACITY 0x25 -#define READ_10 0x28 -#define WRITE_10 0x2a -#define SEEK_10 0x2b -#define WRITE_VERIFY 0x2e -#define VERIFY 0x2f -#define SEARCH_HIGH 0x30 -#define SEARCH_EQUAL 0x31 -#define SEARCH_LOW 0x32 -#define SET_LIMITS 0x33 -#define PRE_FETCH 0x34 -#define READ_POSITION 0x34 -#define SYNCHRONIZE_CACHE 0x35 -#define LOCK_UNLOCK_CACHE 0x36 -#define READ_DEFECT_DATA 0x37 -#define MEDIUM_SCAN 0x38 -#define COMPARE 0x39 -#define COPY_VERIFY 0x3a -#define WRITE_BUFFER 0x3b -#define READ_BUFFER 0x3c -#define UPDATE_BLOCK 0x3d -#define READ_LONG 0x3e -#define WRITE_LONG 0x3f -#define CHANGE_DEFINITION 0x40 -#define WRITE_SAME 0x41 -#define LOG_SELECT 0x4c -#define LOG_SENSE 0x4d -#define MODE_SELECT_10 0x55 -#define MODE_SENSE_10 0x5a -#define READ_12 0xa8 -#define WRITE_12 0xaa -#define WRITE_VERIFY_12 0xae -#define SEARCH_HIGH_12 0xb0 -#define SEARCH_EQUAL_12 0xb1 -#define SEARCH_LOW_12 0xb2 -#define SEND_VOLUME_TAG 0xb6 -#define WRITE_LONG_2 0xea - -/* - * Status codes - */ - -#define GOOD 0x00 -#define CHECK_CONDITION 0x01 -#define CONDITION_GOOD 0x02 -#define BUSY 0x04 -#define INTERMEDIATE_GOOD 0x08 -#define INTERMEDIATE_C_GOOD 0x0a -#define RESERVATION_CONFLICT 0x0c -#define QUEUE_FULL 0x1a - -#define STATUS_MASK 0x1e - -/* - * SENSE KEYS - */ - -#define NO_SENSE 0x00 -#define RECOVERED_ERROR 0x01 -#define NOT_READY 0x02 -#define MEDIUM_ERROR 0x03 -#define HARDWARE_ERROR 0x04 -#define ILLEGAL_REQUEST 0x05 -#define UNIT_ATTENTION 0x06 -#define DATA_PROTECT 0x07 -#define BLANK_CHECK 0x08 -#define COPY_ABORTED 0x0a -#define ABORTED_COMMAND 0x0b -#define VOLUME_OVERFLOW 0x0d -#define MISCOMPARE 0x0e - - -/* - * DEVICE TYPES - */ - -#define TYPE_DISK 0x00 -#define TYPE_TAPE 0x01 -#define TYPE_PROCESSOR 0x03 /* HP scanners use this */ -#define TYPE_WORM 0x04 /* Treated as ROM by our system */ -#define TYPE_ROM 0x05 -#define TYPE_SCANNER 0x06 -#define TYPE_MOD 0x07 /* Magneto-optical disk - - * - treated as TYPE_DISK */ -#define TYPE_NO_LUN 0x7f - - -/* - * MESSAGE CODES - */ - -#define COMMAND_COMPLETE 0x00 -#define EXTENDED_MESSAGE 0x01 -#define EXTENDED_MODIFY_DATA_POINTER 0x00 -#define EXTENDED_SDTR 0x01 -#define EXTENDED_EXTENDED_IDENTIFY 0x02 /* SCSI-I only */ -#define EXTENDED_WDTR 0x03 -#define SAVE_POINTERS 0x02 -#define RESTORE_POINTERS 0x03 -#define DISCONNECT 0x04 -#define INITIATOR_ERROR 0x05 -#define ABORT 0x06 -#define MESSAGE_REJECT 0x07 -#define NOP 0x08 -#define MSG_PARITY_ERROR 0x09 -#define LINKED_CMD_COMPLETE 0x0a -#define LINKED_FLG_CMD_COMPLETE 0x0b -#define BUS_DEVICE_RESET 0x0c - -#define INITIATE_RECOVERY 0x0f /* SCSI-II only */ -#define RELEASE_RECOVERY 0x10 /* SCSI-II only */ - -#define SIMPLE_QUEUE_TAG 0x20 -#define HEAD_OF_QUEUE_TAG 0x21 -#define ORDERED_QUEUE_TAG 0x22 - -/* - * Here are some scsi specific ioctl commands which are sometimes useful. - */ -/* These are a few other constants only used by scsi devices */ - -#define SCSI_IOCTL_GET_IDLUN 0x5382 - -/* Used to turn on and off tagged queuing for scsi devices */ - -#define SCSI_IOCTL_TAGGED_ENABLE 0x5383 -#define SCSI_IOCTL_TAGGED_DISABLE 0x5384 - -/* Used to obtain the host number of a device. */ -#define SCSI_IOCTL_PROBE_HOST 0x5385 - - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-indent-level: 4 - * c-brace-imaginary-offset: 0 - * c-brace-offset: -4 - * c-argdecl-indent: 4 - * c-label-offset: -4 - * c-continued-statement-offset: 4 - * c-continued-brace-offset: 0 - * indent-tabs-mode: nil - * tab-width: 8 - * End: - */ - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/scsicam.h b/i386/i386at/gpl/linux/include/linux/scsicam.h deleted file mode 100644 index 954e140..0000000 --- a/i386/i386at/gpl/linux/include/linux/scsicam.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * scsicam.h - SCSI CAM support functions, use for HDIO_GETGEO, etc. - * - * Copyright 1993, 1994 Drew Eckhardt - * Visionary Computing - * (Unix and Linux consulting and custom programming) - * drew@Colorado.EDU - * +1 (303) 786-7975 - * - * For more information, please consult the SCSI-CAM draft. - */ - -#ifndef SCSICAM_H -#define SCSICAM_H -#include <linux/kdev_t.h> -extern int scsicam_bios_param (Disk *disk, kdev_t dev, int *ip); -#endif /* def SCSICAM_H */ diff --git a/i386/i386at/gpl/linux/include/linux/sem.h b/i386/i386at/gpl/linux/include/linux/sem.h deleted file mode 100644 index 0eb1d02..0000000 --- a/i386/i386at/gpl/linux/include/linux/sem.h +++ /dev/null @@ -1,112 +0,0 @@ -#ifndef _LINUX_SEM_H -#define _LINUX_SEM_H -#include <linux/ipc.h> - -/* semop flags */ -#define SEM_UNDO 0x1000 /* undo the operation on exit */ - -/* semctl Command Definitions. */ -#define GETPID 11 /* get sempid */ -#define GETVAL 12 /* get semval */ -#define GETALL 13 /* get all semval's */ -#define GETNCNT 14 /* get semncnt */ -#define GETZCNT 15 /* get semzcnt */ -#define SETVAL 16 /* set semval */ -#define SETALL 17 /* set all semval's */ - -/* One semid data structure for each set of semaphores in the system. */ -struct semid_ds { - struct ipc_perm sem_perm; /* permissions .. see ipc.h */ - time_t sem_otime; /* last semop time */ - time_t sem_ctime; /* last change time */ - struct sem *sem_base; /* ptr to first semaphore in array */ - struct sem_queue *sem_pending; /* pending operations to be processed */ - struct sem_queue **sem_pending_last; /* last pending operation */ - struct sem_undo *undo; /* undo requests on this array */ - ushort sem_nsems; /* no. of semaphores in array */ -}; - -/* semop system calls takes an array of these. */ -struct sembuf { - ushort sem_num; /* semaphore index in array */ - short sem_op; /* semaphore operation */ - short sem_flg; /* operation flags */ -}; - -/* arg for semctl system calls. */ -union semun { - int val; /* value for SETVAL */ - struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ - ushort *array; /* array for GETALL & SETALL */ - struct seminfo *__buf; /* buffer for IPC_INFO */ - void *__pad; -}; - -struct seminfo { - int semmap; - int semmni; - int semmns; - int semmnu; - int semmsl; - int semopm; - int semume; - int semusz; - int semvmx; - int semaem; -}; - -#define SEMMNI 128 /* ? max # of semaphore identifiers */ -#define SEMMSL 32 /* <= 512 max num of semaphores per id */ -#define SEMMNS (SEMMNI*SEMMSL) /* ? max # of semaphores in system */ -#define SEMOPM 32 /* ~ 100 max num of ops per semop call */ -#define SEMVMX 32767 /* semaphore maximum value */ - -/* unused */ -#define SEMUME SEMOPM /* max num of undo entries per process */ -#define SEMMNU SEMMNS /* num of undo structures system wide */ -#define SEMAEM (SEMVMX >> 1) /* adjust on exit max value */ -#define SEMMAP SEMMNS /* # of entries in semaphore map */ -#define SEMUSZ 20 /* sizeof struct sem_undo */ - -#ifdef __KERNEL__ - -/* One semaphore structure for each semaphore in the system. */ -struct sem { - short semval; /* current value */ - short sempid; /* pid of last operation */ -}; - -/* ipcs ctl cmds */ -#define SEM_STAT 18 -#define SEM_INFO 19 - -/* One queue for each semaphore set in the system. */ -struct sem_queue { - struct sem_queue * next; /* next entry in the queue */ - struct sem_queue ** prev; /* previous entry in the queue, *(q->prev) == q */ - struct wait_queue * sleeper; /* sleeping process */ - struct sem_undo * undo; /* undo structure */ - int pid; /* process id of requesting process */ - int status; /* completion status of operation */ - struct semid_ds * sma; /* semaphore array for operations */ - struct sembuf * sops; /* array of pending operations */ - int nsops; /* number of operations */ -}; - -/* Each task has a list of undo requests. They are executed automatically - * when the process exits. - */ -struct sem_undo { - struct sem_undo * proc_next; /* next entry on this process */ - struct sem_undo * id_next; /* next entry on this semaphore set */ - int semid; /* semaphore set identifier */ - short * semadj; /* array of adjustments, one per semaphore */ -}; - -asmlinkage int sys_semget (key_t key, int nsems, int semflg); -asmlinkage int sys_semop (int semid, struct sembuf *sops, unsigned nsops); -asmlinkage int sys_semctl (int semid, int semnum, int cmd, union semun arg); - -#endif /* __KERNEL__ */ - -#endif /* _LINUX_SEM_H */ diff --git a/i386/i386at/gpl/linux/include/linux/signal.h b/i386/i386at/gpl/linux/include/linux/signal.h deleted file mode 100644 index 9d1afa9..0000000 --- a/i386/i386at/gpl/linux/include/linux/signal.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _LINUX_SIGNAL_H -#define _LINUX_SIGNAL_H - -#include <asm/signal.h> - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/skbuff.h b/i386/i386at/gpl/linux/include/linux/skbuff.h deleted file mode 100644 index 6541816..0000000 --- a/i386/i386at/gpl/linux/include/linux/skbuff.h +++ /dev/null @@ -1,474 +0,0 @@ -/* - * Definitions for the 'struct sk_buff' memory handlers. - * - * Authors: - * Alan Cox, <gw4pts@gw4pts.ampr.org> - * Florian La Roche, <rzsfl@rz.uni-sb.de> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - -#ifndef _LINUX_SKBUFF_H -#define _LINUX_SKBUFF_H -#include <linux/malloc.h> -#include <linux/wait.h> -#include <linux/time.h> -#include <linux/config.h> - -#define CONFIG_SKB_CHECK 0 - -#define HAVE_ALLOC_SKB /* For the drivers to know */ -#define HAVE_ALIGNABLE_SKB /* Ditto 8) */ - - -#define FREE_READ 1 -#define FREE_WRITE 0 - -#define CHECKSUM_NONE 0 -#define CHECKSUM_HW 1 -#define CHECKSUM_UNNECESSARY 2 - -struct sk_buff_head -{ - struct sk_buff * volatile next; - struct sk_buff * volatile prev; - __u32 qlen; /* Must be same length as a pointer - for using debugging */ -#if CONFIG_SKB_CHECK - int magic_debug_cookie; -#endif -}; - - -struct sk_buff -{ - struct sk_buff * volatile next; /* Next buffer in list */ - struct sk_buff * volatile prev; /* Previous buffer in list */ - struct sk_buff_head * list; /* List we are on */ -#if CONFIG_SKB_CHECK - int magic_debug_cookie; -#endif - struct sk_buff * volatile link3; /* Link for IP protocol level buffer chains */ - struct sock *sk; /* Socket we are owned by */ - unsigned long when; /* used to compute rtt's */ - struct timeval stamp; /* Time we arrived */ - struct linux_device *dev; /* Device we arrived on/are leaving by */ - union - { - struct tcphdr *th; - struct ethhdr *eth; - struct iphdr *iph; - struct udphdr *uh; - unsigned char *raw; - /* for passing an fd in a unix domain socket */ - struct file *filp; - } h; - - union - { - /* As yet incomplete physical layer views */ - unsigned char *raw; - struct ethhdr *ethernet; - } mac; - - struct iphdr *ip_hdr; /* For IPPROTO_RAW */ - unsigned long len; /* Length of actual data */ - unsigned long csum; /* Checksum */ - __u32 saddr; /* IP source address */ - __u32 daddr; /* IP target address */ - __u32 raddr; /* IP next hop address */ - __u32 seq; /* TCP sequence number */ - __u32 end_seq; /* seq [+ fin] [+ syn] + datalen */ - __u32 ack_seq; /* TCP ack sequence number */ - unsigned char proto_priv[16]; /* Protocol private data */ - volatile char acked, /* Are we acked ? */ - used, /* Are we in use ? */ - free, /* How to free this buffer */ - arp; /* Has IP/ARP resolution finished */ - unsigned char tries, /* Times tried */ - lock, /* Are we locked ? */ - localroute, /* Local routing asserted for this frame */ - pkt_type, /* Packet class */ - ip_summed; /* Driver fed us an IP checksum */ -#define PACKET_HOST 0 /* To us */ -#define PACKET_BROADCAST 1 /* To all */ -#define PACKET_MULTICAST 2 /* To group */ -#define PACKET_OTHERHOST 3 /* To someone else */ - unsigned short users; /* User count - see datagram.c,tcp.c */ - unsigned short protocol; /* Packet protocol from driver. */ - unsigned short truesize; /* Buffer size */ - - int count; /* reference count */ - struct sk_buff *data_skb; /* Link to the actual data skb */ - unsigned char *head; /* Head of buffer */ - unsigned char *data; /* Data head pointer */ - unsigned char *tail; /* Tail pointer */ - unsigned char *end; /* End pointer */ - void (*destructor)(struct sk_buff *this); /* Destruct function */ -#ifdef MACH -#ifdef MACH_INCLUDE - ipc_port_t reply; - mach_msg_type_name_t reply_type; - vm_map_copy_t copy; -#else - void *reply; - unsigned reply_type; - void *copy; -#endif -#endif -}; - -#ifdef CONFIG_SKB_LARGE -#define SK_WMEM_MAX 65535 -#define SK_RMEM_MAX 65535 -#else -#define SK_WMEM_MAX 32767 -#define SK_RMEM_MAX 32767 -#endif - -#if CONFIG_SKB_CHECK -#define SK_FREED_SKB 0x0DE2C0DE -#define SK_GOOD_SKB 0xDEC0DED1 -#define SK_HEAD_SKB 0x12231298 -#endif - -#ifdef __KERNEL__ -/* - * Handling routines are only of interest to the kernel - */ - -#include <asm/system.h> - -#if 0 -extern void print_skb(struct sk_buff *); -#endif -extern void kfree_skb(struct sk_buff *skb, int rw); -extern void skb_queue_head_init(struct sk_buff_head *list); -extern void skb_queue_head(struct sk_buff_head *list,struct sk_buff *buf); -extern void skb_queue_tail(struct sk_buff_head *list,struct sk_buff *buf); -extern struct sk_buff * skb_dequeue(struct sk_buff_head *list); -extern void skb_insert(struct sk_buff *old,struct sk_buff *newsk); -extern void skb_append(struct sk_buff *old,struct sk_buff *newsk); -extern void skb_unlink(struct sk_buff *buf); -extern __u32 skb_queue_len(struct sk_buff_head *list); -extern struct sk_buff * skb_peek_copy(struct sk_buff_head *list); -extern struct sk_buff * alloc_skb(unsigned int size, int priority); -extern struct sk_buff * dev_alloc_skb(unsigned int size); -extern void kfree_skbmem(struct sk_buff *skb); -extern struct sk_buff * skb_clone(struct sk_buff *skb, int priority); -extern struct sk_buff * skb_copy(struct sk_buff *skb, int priority); -extern void skb_device_lock(struct sk_buff *skb); -extern void skb_device_unlock(struct sk_buff *skb); -extern void dev_kfree_skb(struct sk_buff *skb, int mode); -extern int skb_device_locked(struct sk_buff *skb); -#ifdef MACH -#define skb_put(skb, len) ((skb)->data) -#else -extern unsigned char * skb_put(struct sk_buff *skb, int len); -#endif -extern unsigned char * skb_push(struct sk_buff *skb, int len); -extern unsigned char * skb_pull(struct sk_buff *skb, int len); -extern int skb_headroom(struct sk_buff *skb); -extern int skb_tailroom(struct sk_buff *skb); -#ifdef MACH -#define skb_reserve(skb, len) -#else -extern void skb_reserve(struct sk_buff *skb, int len); -#endif -extern void skb_trim(struct sk_buff *skb, int len); - -/* - * Peek an sk_buff. Unlike most other operations you _MUST_ - * be careful with this one. A peek leaves the buffer on the - * list and someone else may run off with it. For an interrupt - * type system cli() peek the buffer copy the data and sti(); - */ -extern __inline__ struct sk_buff *skb_peek(struct sk_buff_head *list_) -{ - struct sk_buff *list = ((struct sk_buff *)list_)->next; - if (list == (struct sk_buff *)list_) - list = NULL; - return list; -} - -/* - * Return the length of an sk_buff queue - */ - -extern __inline__ __u32 skb_queue_len(struct sk_buff_head *list_) -{ - return(list_->qlen); -} - -#if CONFIG_SKB_CHECK -extern int skb_check(struct sk_buff *skb,int,int, char *); -#define IS_SKB(skb) skb_check((skb), 0, __LINE__,__FILE__) -#define IS_SKB_HEAD(skb) skb_check((skb), 1, __LINE__,__FILE__) -#else -#define IS_SKB(skb) -#define IS_SKB_HEAD(skb) - -extern __inline__ void skb_queue_head_init(struct sk_buff_head *list) -{ - list->prev = (struct sk_buff *)list; - list->next = (struct sk_buff *)list; - list->qlen = 0; -} - -/* - * Insert an sk_buff at the start of a list. - * - * The "__skb_xxxx()" functions are the non-atomic ones that - * can only be called with interrupts disabled. - */ - -extern __inline__ void __skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk) -{ - struct sk_buff *prev, *next; - - newsk->list = list; - list->qlen++; - prev = (struct sk_buff *)list; - next = prev->next; - newsk->next = next; - newsk->prev = prev; - next->prev = newsk; - prev->next = newsk; -} - -extern __inline__ void skb_queue_head(struct sk_buff_head *list, struct sk_buff *newsk) -{ - unsigned long flags; - - save_flags(flags); - cli(); - __skb_queue_head(list, newsk); - restore_flags(flags); -} - -/* - * Insert an sk_buff at the end of a list. - */ - -extern __inline__ void __skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk) -{ - struct sk_buff *prev, *next; - - newsk->list = list; - list->qlen++; - next = (struct sk_buff *)list; - prev = next->prev; - newsk->next = next; - newsk->prev = prev; - next->prev = newsk; - prev->next = newsk; -} - -extern __inline__ void skb_queue_tail(struct sk_buff_head *list, struct sk_buff *newsk) -{ - unsigned long flags; - - save_flags(flags); - cli(); - __skb_queue_tail(list, newsk); - restore_flags(flags); -} - -/* - * Remove an sk_buff from a list. - */ - -extern __inline__ struct sk_buff *__skb_dequeue(struct sk_buff_head *list) -{ - struct sk_buff *next, *prev, *result; - - prev = (struct sk_buff *) list; - next = prev->next; - result = NULL; - if (next != prev) { - result = next; - next = next->next; - list->qlen--; - next->prev = prev; - prev->next = next; - result->next = NULL; - result->prev = NULL; - result->list = NULL; - } - return result; -} - -extern __inline__ struct sk_buff *skb_dequeue(struct sk_buff_head *list) -{ - long flags; - struct sk_buff *result; - - save_flags(flags); - cli(); - result = __skb_dequeue(list); - restore_flags(flags); - return result; -} - -/* - * Insert a packet before another one in a list. - */ - -extern __inline__ void __skb_insert(struct sk_buff *next, struct sk_buff *newsk) -{ - struct sk_buff * prev = next->prev; - - newsk->next = next; - newsk->prev = prev; - next->prev = newsk; - prev->next = newsk; - newsk->list = next->list; - newsk->list->qlen++; -} - -extern __inline__ void skb_insert(struct sk_buff *old, struct sk_buff *newsk) -{ - unsigned long flags; - - save_flags(flags); - cli(); - __skb_insert(old, newsk); - restore_flags(flags); -} - -/* - * Place a packet after a given packet in a list. - */ - -extern __inline__ void __skb_append(struct sk_buff *prev, struct sk_buff *newsk) -{ - struct sk_buff * next = prev->next; - - newsk->next = next; - newsk->prev = prev; - next->prev = newsk; - prev->next = newsk; - newsk->list = prev->list; - newsk->list->qlen++; -} - -extern __inline__ void skb_append(struct sk_buff *old, struct sk_buff *newsk) -{ - unsigned long flags; - - save_flags(flags); - cli(); - __skb_append(old, newsk); - restore_flags(flags); -} - -/* - * remove sk_buff from list. _Must_ be called atomically, and with - * the list known.. - */ -extern __inline__ void __skb_unlink(struct sk_buff *skb, struct sk_buff_head *list) -{ - struct sk_buff * next, * prev; - - list->qlen--; - next = skb->next; - prev = skb->prev; - skb->next = NULL; - skb->prev = NULL; - skb->list = NULL; - next->prev = prev; - prev->next = next; -} - -/* - * Remove an sk_buff from its list. Works even without knowing the list it - * is sitting on, which can be handy at times. It also means that THE LIST - * MUST EXIST when you unlink. Thus a list must have its contents unlinked - * _FIRST_. - */ - -extern __inline__ void skb_unlink(struct sk_buff *skb) -{ - unsigned long flags; - - save_flags(flags); - cli(); - if(skb->list) - __skb_unlink(skb, skb->list); - restore_flags(flags); -} - -#ifndef MACH -/* - * Add data to an sk_buff - */ - -extern __inline__ unsigned char *skb_put(struct sk_buff *skb, int len) -{ - unsigned char *tmp=skb->tail; - skb->tail+=len; - skb->len+=len; - if(skb->tail>skb->end) - panic("skput:over: %p:%d", __builtin_return_address(0),len); - return tmp; -} -#endif - -extern __inline__ unsigned char *skb_push(struct sk_buff *skb, int len) -{ - skb->data-=len; - skb->len+=len; - if(skb->data<skb->head) - panic("skpush:under: %p:%d", __builtin_return_address(0),len); - return skb->data; -} - -extern __inline__ unsigned char * skb_pull(struct sk_buff *skb, int len) -{ - if(len > skb->len) - return NULL; - skb->data+=len; - skb->len-=len; - return skb->data; -} - -extern __inline__ int skb_headroom(struct sk_buff *skb) -{ - return skb->data-skb->head; -} - -extern __inline__ int skb_tailroom(struct sk_buff *skb) -{ - return skb->end-skb->tail; -} - -#ifndef MACH -extern __inline__ void skb_reserve(struct sk_buff *skb, int len) -{ - skb->data+=len; - skb->tail+=len; -} -#endif - -extern __inline__ void skb_trim(struct sk_buff *skb, int len) -{ - if(skb->len>len) - { - skb->len=len; - skb->tail=skb->data+len; - } -} - -#endif - -extern struct sk_buff * skb_recv_datagram(struct sock *sk,unsigned flags,int noblock, int *err); -extern int datagram_select(struct sock *sk, int sel_type, select_table *wait); -extern void skb_copy_datagram(struct sk_buff *from, int offset, char *to,int size); -extern void skb_copy_datagram_iovec(struct sk_buff *from, int offset, struct iovec *to,int size); -extern void skb_free_datagram(struct sock * sk, struct sk_buff *skb); - -#endif /* __KERNEL__ */ -#endif /* _LINUX_SKBUFF_H */ diff --git a/i386/i386at/gpl/linux/include/linux/smp.h b/i386/i386at/gpl/linux/include/linux/smp.h deleted file mode 100644 index 72984f1..0000000 --- a/i386/i386at/gpl/linux/include/linux/smp.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef __LINUX_SMP_H -#define __LINUX_SMP_H - -/* - * Generic SMP support - * Alan Cox. <alan@cymru.net> - */ - -#ifdef __SMP__ -#include <asm/smp.h> - -extern void smp_message_pass(int target, int msg, unsigned long data, int wait); -extern void smp_boot_cpus(void); /* Boot processor call to load the other CPU's */ -extern void smp_callin(void); /* Processor call in. Must hold processors until .. */ -extern void smp_commence(void); /* Multiprocessors may now schedule */ -extern int smp_num_cpus; -extern int smp_threads_ready; /* True once the per process idle is forked */ -#ifdef __SMP_PROF__ -extern volatile unsigned long smp_spins[NR_CPUS]; /* count of interrupt spins */ -extern volatile unsigned long smp_spins_sys_idle[]; /* count of idle spins */ -extern volatile unsigned long smp_spins_syscall[]; /* count of syscall spins */ -extern volatile unsigned long smp_spins_syscall_cur[]; /* count of syscall spins for the current - call */ -extern volatile unsigned long smp_idle_count[1+NR_CPUS];/* count idle ticks */ -extern volatile unsigned long smp_idle_map; /* map with idle cpus */ -#else -extern volatile unsigned long smp_spins; -#endif - - -extern volatile unsigned long smp_msg_data; -extern volatile int smp_src_cpu; -extern volatile int smp_msg_id; - -#define MSG_ALL_BUT_SELF 0x8000 /* Assume <32768 CPU's */ -#define MSG_ALL 0x8001 - -#define MSG_INVALIDATE_TLB 0x0001 /* Remote processor TLB invalidate */ -#define MSG_STOP_CPU 0x0002 /* Sent to shut down slave CPU's when rebooting */ -#define MSG_RESCHEDULE 0x0003 /* Reschedule request from master CPU */ - -#else - -/* - * These macros fold the SMP functionality into a single CPU system - */ - -#define smp_num_cpus 1 -#define smp_processor_id() 0 -#define smp_message_pass(t,m,d,w) -#define smp_threads_ready 1 -#define kernel_lock() -#endif -#endif diff --git a/i386/i386at/gpl/linux/include/linux/socket.h b/i386/i386at/gpl/linux/include/linux/socket.h deleted file mode 100644 index bf2991a..0000000 --- a/i386/i386at/gpl/linux/include/linux/socket.h +++ /dev/null @@ -1,126 +0,0 @@ -#ifndef _LINUX_SOCKET_H -#define _LINUX_SOCKET_H - -#include <asm/socket.h> /* arch-dependent defines */ -#include <linux/sockios.h> /* the SIOCxxx I/O controls */ -#include <linux/uio.h> /* iovec support */ - -struct sockaddr { - unsigned short sa_family; /* address family, AF_xxx */ - char sa_data[14]; /* 14 bytes of protocol address */ -}; - -struct linger { - int l_onoff; /* Linger active */ - int l_linger; /* How long to linger for */ -}; - -struct msghdr -{ - void * msg_name; /* Socket name */ - int msg_namelen; /* Length of name */ - struct iovec * msg_iov; /* Data blocks */ - int msg_iovlen; /* Number of blocks */ - void * msg_accrights; /* Per protocol magic (eg BSD file descriptor passing) */ - int msg_accrightslen; /* Length of rights list */ -}; - -/* Socket types. */ -#define SOCK_STREAM 1 /* stream (connection) socket */ -#define SOCK_DGRAM 2 /* datagram (conn.less) socket */ -#define SOCK_RAW 3 /* raw socket */ -#define SOCK_RDM 4 /* reliably-delivered message */ -#define SOCK_SEQPACKET 5 /* sequential packet socket */ -#define SOCK_PACKET 10 /* linux specific way of */ - /* getting packets at the dev */ - /* level. For writing rarp and */ - /* other similar things on the */ - /* user level. */ - -/* Supported address families. */ -#define AF_UNSPEC 0 -#define AF_UNIX 1 /* Unix domain sockets */ -#define AF_INET 2 /* Internet IP Protocol */ -#define AF_AX25 3 /* Amateur Radio AX.25 */ -#define AF_IPX 4 /* Novell IPX */ -#define AF_APPLETALK 5 /* Appletalk DDP */ -#define AF_NETROM 6 /* Amateur radio NetROM */ -#define AF_BRIDGE 7 /* Multiprotocol bridge */ -#define AF_AAL5 8 /* Reserved for Werner's ATM */ -#define AF_X25 9 /* Reserved for X.25 project */ -#define AF_INET6 10 /* IP version 6 */ -#define AF_MAX 12 /* For now.. */ - -/* Protocol families, same as address families. */ -#define PF_UNSPEC AF_UNSPEC -#define PF_UNIX AF_UNIX -#define PF_INET AF_INET -#define PF_AX25 AF_AX25 -#define PF_IPX AF_IPX -#define PF_APPLETALK AF_APPLETALK -#define PF_NETROM AF_NETROM -#define PF_BRIDGE AF_BRIDGE -#define PF_AAL5 AF_AAL5 -#define PF_X25 AF_X25 -#define PF_INET6 AF_INET6 - -#define PF_MAX AF_MAX - -/* Maximum queue length specificable by listen. */ -#define SOMAXCONN 128 - -/* Flags we can use with send/ and recv. */ -#define MSG_OOB 1 -#define MSG_PEEK 2 -#define MSG_DONTROUTE 4 - -/* Setsockoptions(2) level. Thanks to BSD these must match IPPROTO_xxx */ -#define SOL_IP 0 -#define SOL_IPX 256 -#define SOL_AX25 257 -#define SOL_ATALK 258 -#define SOL_NETROM 259 -#define SOL_TCP 6 -#define SOL_UDP 17 - -/* IP options */ -#define IP_TOS 1 -#define IPTOS_LOWDELAY 0x10 -#define IPTOS_THROUGHPUT 0x08 -#define IPTOS_RELIABILITY 0x04 -#define IP_TTL 2 -#define IP_HDRINCL 3 -#define IP_OPTIONS 4 - -#define IP_MULTICAST_IF 32 -#define IP_MULTICAST_TTL 33 -#define IP_MULTICAST_LOOP 34 -#define IP_ADD_MEMBERSHIP 35 -#define IP_DROP_MEMBERSHIP 36 - - -/* These need to appear somewhere around here */ -#define IP_DEFAULT_MULTICAST_TTL 1 -#define IP_DEFAULT_MULTICAST_LOOP 1 -#define IP_MAX_MEMBERSHIPS 20 - -/* IPX options */ -#define IPX_TYPE 1 - -/* TCP options - this way around because someone left a set in the c library includes */ -#define TCP_NODELAY 1 -#define TCP_MAXSEG 2 - -/* The various priorities. */ -#define SOPRI_INTERACTIVE 0 -#define SOPRI_NORMAL 1 -#define SOPRI_BACKGROUND 2 - -#ifdef __KERNEL__ -extern void memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); -extern int verify_iovec(struct msghdr *m, struct iovec *iov, char *address, int mode); -extern void memcpy_toiovec(struct iovec *v, unsigned char *kdata, int len); -extern int move_addr_to_user(void *kaddr, int klen, void *uaddr, int *ulen); -extern int move_addr_to_kernel(void *uaddr, int ulen, void *kaddr); -#endif -#endif /* _LINUX_SOCKET_H */ diff --git a/i386/i386at/gpl/linux/include/linux/sockios.h b/i386/i386at/gpl/linux/include/linux/sockios.h deleted file mode 100644 index ee20a0b..0000000 --- a/i386/i386at/gpl/linux/include/linux/sockios.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions of the socket-level I/O control calls. - * - * Version: @(#)sockios.h 1.0.2 03/09/93 - * - * Authors: Ross Biro, <bir7@leland.Stanford.Edu> - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _LINUX_SOCKIOS_H -#define _LINUX_SOCKIOS_H - -/* Routing table calls. */ -#define SIOCADDRT 0x890B /* add routing table entry */ -#define SIOCDELRT 0x890C /* delete routing table entry */ - -/* Socket configuration controls. */ -#define SIOCGIFNAME 0x8910 /* get iface name */ -#define SIOCSIFLINK 0x8911 /* set iface channel */ -#define SIOCGIFCONF 0x8912 /* get iface list */ -#define SIOCGIFFLAGS 0x8913 /* get flags */ -#define SIOCSIFFLAGS 0x8914 /* set flags */ -#define SIOCGIFADDR 0x8915 /* get PA address */ -#define SIOCSIFADDR 0x8916 /* set PA address */ -#define SIOCGIFDSTADDR 0x8917 /* get remote PA address */ -#define SIOCSIFDSTADDR 0x8918 /* set remote PA address */ -#define SIOCGIFBRDADDR 0x8919 /* get broadcast PA address */ -#define SIOCSIFBRDADDR 0x891a /* set broadcast PA address */ -#define SIOCGIFNETMASK 0x891b /* get network PA mask */ -#define SIOCSIFNETMASK 0x891c /* set network PA mask */ -#define SIOCGIFMETRIC 0x891d /* get metric */ -#define SIOCSIFMETRIC 0x891e /* set metric */ -#define SIOCGIFMEM 0x891f /* get memory address (BSD) */ -#define SIOCSIFMEM 0x8920 /* set memory address (BSD) */ -#define SIOCGIFMTU 0x8921 /* get MTU size */ -#define SIOCSIFMTU 0x8922 /* set MTU size */ -#define SIOCSIFHWADDR 0x8924 /* set hardware address (NI) */ -#define SIOCGIFENCAP 0x8925 /* get/set slip encapsulation */ -#define SIOCSIFENCAP 0x8926 -#define SIOCGIFHWADDR 0x8927 /* Get hardware address */ -#define SIOCGIFSLAVE 0x8929 /* Driver slaving support */ -#define SIOCSIFSLAVE 0x8930 -/* begin multicast support change */ -#define SIOCADDMULTI 0x8931 -#define SIOCDELMULTI 0x8932 -/* end multicast support change */ - -/* ARP cache control calls. */ -#define OLD_SIOCDARP 0x8950 /* old delete ARP table entry */ -#define OLD_SIOCGARP 0x8951 /* old get ARP table entry */ -#define OLD_SIOCSARP 0x8952 /* old set ARP table entry */ -#define SIOCDARP 0x8953 /* delete ARP table entry */ -#define SIOCGARP 0x8954 /* get ARP table entry */ -#define SIOCSARP 0x8955 /* set ARP table entry */ - -/* RARP cache control calls. */ -#define SIOCDRARP 0x8960 /* delete RARP table entry */ -#define SIOCGRARP 0x8961 /* get RARP table entry */ -#define SIOCSRARP 0x8962 /* set RARP table entry */ - -/* Driver configuration calls */ - -#define SIOCGIFMAP 0x8970 /* Get device parameters */ -#define SIOCSIFMAP 0x8971 /* Set device parameters */ - - -/* Device private ioctl calls */ - -/* - * These 16 ioctls are available to devices via the do_ioctl() device - * vector. Each device should include this file and redefine these names - * as their own. Because these are device dependent it is a good idea - * _NOT_ to issue them to random objects and hope. - */ - -#define SIOCDEVPRIVATE 0x89F0 /* to 89FF */ - -/* - * These 16 ioctl calls are protocol private - */ - -#define SIOCPROTOPRIVATE 0x89E0 /* to 89EF */ -#endif /* _LINUX_SOCKIOS_H */ diff --git a/i386/i386at/gpl/linux/include/linux/stat.h b/i386/i386at/gpl/linux/include/linux/stat.h deleted file mode 100644 index d86b164..0000000 --- a/i386/i386at/gpl/linux/include/linux/stat.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _LINUX_STAT_H -#define _LINUX_STAT_H - -#ifdef __KERNEL__ - -#include <asm/stat.h> - -#endif - -#define S_IFMT 00170000 -#define S_IFSOCK 0140000 -#define S_IFLNK 0120000 -#define S_IFREG 0100000 -#define S_IFBLK 0060000 -#define S_IFDIR 0040000 -#define S_IFCHR 0020000 -#define S_IFIFO 0010000 -#define S_ISUID 0004000 -#define S_ISGID 0002000 -#define S_ISVTX 0001000 - -#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) -#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) -#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) -#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) -#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) - -#define S_IRWXU 00700 -#define S_IRUSR 00400 -#define S_IWUSR 00200 -#define S_IXUSR 00100 - -#define S_IRWXG 00070 -#define S_IRGRP 00040 -#define S_IWGRP 00020 -#define S_IXGRP 00010 - -#define S_IRWXO 00007 -#define S_IROTH 00004 -#define S_IWOTH 00002 -#define S_IXOTH 00001 - -#ifdef __KERNEL__ -#define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO) -#define S_IALLUGO (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO) -#define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH) -#define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH) -#define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH) -#endif - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/stddef.h b/i386/i386at/gpl/linux/include/linux/stddef.h deleted file mode 100644 index c6221e7..0000000 --- a/i386/i386at/gpl/linux/include/linux/stddef.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _LINUX_STDDEF_H -#define _LINUX_STDDEF_H - -#ifndef _SIZE_T -#define _SIZE_T -typedef unsigned int size_t; -#endif - -#undef NULL -#define NULL ((void *)0) - -#undef offsetof -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/string.h b/i386/i386at/gpl/linux/include/linux/string.h deleted file mode 100644 index e9162b3..0000000 --- a/i386/i386at/gpl/linux/include/linux/string.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _LINUX_STRING_H_ -#define _LINUX_STRING_H_ - -#include <linux/types.h> /* for size_t */ - -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -extern char * ___strtok; -extern char * strcpy(char *,const char *); -extern char * strncpy(char *,const char *,size_t); -extern char * strcat(char *, const char *); -extern char * strncat(char *, const char *, size_t); -extern char * strchr(const char *,int); -extern char * strpbrk(const char *,const char *); -extern char * strtok(char *,const char *); -extern char * strstr(const char *,const char *); -extern size_t strlen(const char *); -extern size_t strnlen(const char *,size_t); -extern size_t strspn(const char *,const char *); -extern int strcmp(const char *,const char *); -extern int strncmp(const char *,const char *,size_t); - -extern void * memset(void *,int,size_t); -extern void * memcpy(void *,const void *,size_t); -extern void * memmove(void *,const void *,size_t); -extern void * memscan(void *,int,size_t); -extern int memcmp(const void *,const void *,size_t); - -/* - * Include machine specific inline routines - */ -#include <asm/string.h> - -#ifdef __cplusplus -} -#endif - -#endif /* _LINUX_STRING_H_ */ diff --git a/i386/i386at/gpl/linux/include/linux/tasks.h b/i386/i386at/gpl/linux/include/linux/tasks.h deleted file mode 100644 index 4540e34..0000000 --- a/i386/i386at/gpl/linux/include/linux/tasks.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _LINUX_TASKS_H -#define _LINUX_TASKS_H - -/* - * This is the maximum nr of tasks - change it if you need to - */ - -#ifdef __SMP__ -#define NR_CPUS 32 /* Max processors that can be running in SMP */ -#else -#define NR_CPUS 1 -#endif - -#define NR_TASKS 512 - -#define MAX_TASKS_PER_USER (NR_TASKS/2) -#define MIN_TASKS_LEFT_FOR_ROOT 4 - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/tcp.h b/i386/i386at/gpl/linux/include/linux/tcp.h deleted file mode 100644 index ae6a063..0000000 --- a/i386/i386at/gpl/linux/include/linux/tcp.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions for the TCP protocol. - * - * Version: @(#)tcp.h 1.0.2 04/28/93 - * - * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _LINUX_TCP_H -#define _LINUX_TCP_H - -#include <linux/types.h> -#include <asm/byteorder.h> - -struct tcphdr { - __u16 source; - __u16 dest; - __u32 seq; - __u32 ack_seq; -#if defined(__LITTLE_ENDIAN_BITFIELD) - __u16 res1:4, - doff:4, - fin:1, - syn:1, - rst:1, - psh:1, - ack:1, - urg:1, - res2:2; -#elif defined(__BIG_ENDIAN_BITFIELD) - __u16 doff:4, - res1:4, - res2:2, - urg:1, - ack:1, - psh:1, - rst:1, - syn:1, - fin:1; -#else -#error "Adjust your <asm/byteorder.h> defines" -#endif - __u16 window; - __u16 check; - __u16 urg_ptr; -}; - - -enum { - TCP_ESTABLISHED = 1, - TCP_SYN_SENT, - TCP_SYN_RECV, - TCP_FIN_WAIT1, - TCP_FIN_WAIT2, - TCP_TIME_WAIT, - TCP_CLOSE, - TCP_CLOSE_WAIT, - TCP_LAST_ACK, - TCP_LISTEN, - TCP_CLOSING /* now a valid state */ -}; - -#endif /* _LINUX_TCP_H */ diff --git a/i386/i386at/gpl/linux/include/linux/termios.h b/i386/i386at/gpl/linux/include/linux/termios.h deleted file mode 100644 index 4786628..0000000 --- a/i386/i386at/gpl/linux/include/linux/termios.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _LINUX_TERMIOS_H -#define _LINUX_TERMIOS_H - -#include <linux/types.h> -#include <asm/termios.h> - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/time.h b/i386/i386at/gpl/linux/include/linux/time.h deleted file mode 100644 index 269e9dc..0000000 --- a/i386/i386at/gpl/linux/include/linux/time.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef _LINUX_TIME_H -#define _LINUX_TIME_H - -struct timespec { - long tv_sec; /* seconds */ - long tv_nsec; /* nanoseconds */ -}; - -struct timeval { - int tv_sec; /* seconds */ - int tv_usec; /* microseconds */ -}; - -struct timezone { - int tz_minuteswest; /* minutes west of Greenwich */ - int tz_dsttime; /* type of dst correction */ -}; - -#define NFDBITS __NFDBITS - -#ifdef __KERNEL__ -void do_gettimeofday(struct timeval *tv); -void do_settimeofday(struct timeval *tv); -#endif - -#define FD_SETSIZE __FD_SETSIZE -#define FD_SET(fd,fdsetp) __FD_SET(fd,fdsetp) -#define FD_CLR(fd,fdsetp) __FD_CLR(fd,fdsetp) -#define FD_ISSET(fd,fdsetp) __FD_ISSET(fd,fdsetp) -#define FD_ZERO(fdsetp) __FD_ZERO(fdsetp) - -/* - * Names of the interval timers, and structure - * defining a timer setting. - */ -#define ITIMER_REAL 0 -#define ITIMER_VIRTUAL 1 -#define ITIMER_PROF 2 - -struct itimerspec { - struct timespec it_interval; /* timer period */ - struct timespec it_value; /* timer expiration */ -}; - -struct itimerval { - struct timeval it_interval; /* timer interval */ - struct timeval it_value; /* current value */ -}; - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/timer.h b/i386/i386at/gpl/linux/include/linux/timer.h deleted file mode 100644 index c54e8c5..0000000 --- a/i386/i386at/gpl/linux/include/linux/timer.h +++ /dev/null @@ -1,101 +0,0 @@ -#ifndef _LINUX_TIMER_H -#define _LINUX_TIMER_H - -/* - * DON'T CHANGE THESE!! Most of them are hardcoded into some assembly language - * as well as being defined here. - */ - -/* - * The timers are: - * - * BLANK_TIMER console screen-saver timer - * - * BEEP_TIMER console beep timer - * - * RS_TIMER timer for the RS-232 ports - * - * SWAP_TIMER timer for the background pageout daemon - * - * HD_TIMER harddisk timer - * - * HD_TIMER2 (atdisk2 patches) - * - * FLOPPY_TIMER floppy disk timer (not used right now) - * - * SCSI_TIMER scsi.c timeout timer - * - * NET_TIMER tcp/ip timeout timer - * - * COPRO_TIMER 387 timeout for buggy hardware.. - * - * QIC02_TAPE_TIMER timer for QIC-02 tape driver (it's not hardcoded) - * - * MCD_TIMER Mitsumi CD-ROM Timer - * - * GSCD_TIMER Goldstar CD-ROM Timer - * - * OPTCD_TIMER Optics Storage CD-ROM Timer - * - */ - -#define BLANK_TIMER 0 -#define BEEP_TIMER 1 -#define RS_TIMER 2 -#define SWAP_TIMER 3 - -#define HD_TIMER 16 -#define FLOPPY_TIMER 17 -#define SCSI_TIMER 18 -#define NET_TIMER 19 -#define SOUND_TIMER 20 -#define COPRO_TIMER 21 - -#define QIC02_TAPE_TIMER 22 /* hhb */ -#define MCD_TIMER 23 - -#define HD_TIMER2 24 -#define GSCD_TIMER 25 -#define OPTCD_TIMER 26 - -struct timer_struct { - unsigned long expires; - void (*fn)(void); -}; - -extern unsigned long timer_active; -extern struct timer_struct timer_table[32]; - -/* - * This is completely separate from the above, and is the - * "new and improved" way of handling timers more dynamically. - * Hopefully efficient and general enough for most things. - * - * The "hardcoded" timers above are still useful for well- - * defined problems, but the timer-list is probably better - * when you need multiple outstanding timers or similar. - * - * The "data" field is in case you want to use the same - * timeout function for several timeouts. You can use this - * to distinguish between the different invocations. - */ -struct timer_list { - struct timer_list *next; - struct timer_list *prev; - unsigned long expires; - unsigned long data; - void (*function)(unsigned long); -}; - -extern void add_timer(struct timer_list * timer); -extern int del_timer(struct timer_list * timer); - -extern void it_real_fn(unsigned long); - -extern inline void init_timer(struct timer_list * timer) -{ - timer->next = NULL; - timer->prev = NULL; -} - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/tqueue.h b/i386/i386at/gpl/linux/include/linux/tqueue.h deleted file mode 100644 index d483a15..0000000 --- a/i386/i386at/gpl/linux/include/linux/tqueue.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - * tqueue.h --- task queue handling for Linux. - * - * Mostly based on a proposed bottom-half replacement code written by - * Kai Petzke, wpp@marie.physik.tu-berlin.de. - * - * Modified for use in the Linux kernel by Theodore Ts'o, - * tytso@mit.edu. Any bugs are my fault, not Kai's. - * - * The original comment follows below. - */ - -#ifndef _LINUX_TQUEUE_H -#define _LINUX_TQUEUE_H - -#include <asm/bitops.h> -#include <asm/system.h> - -#ifdef INCLUDE_INLINE_FUNCS -#define _INLINE_ extern -#else -#define _INLINE_ extern __inline__ -#endif - -/* - * New proposed "bottom half" handlers: - * (C) 1994 Kai Petzke, wpp@marie.physik.tu-berlin.de - * - * Advantages: - * - Bottom halfs are implemented as a linked list. You can have as many - * of them, as you want. - * - No more scanning of a bit field is required upon call of a bottom half. - * - Support for chained bottom half lists. The run_task_queue() function can be - * used as a bottom half handler. This is for example useful for bottom - * halfs, which want to be delayed until the next clock tick. - * - * Problems: - * - The queue_task_irq() inline function is only atomic with respect to itself. - * Problems can occur, when queue_task_irq() is called from a normal system - * call, and an interrupt comes in. No problems occur, when queue_task_irq() - * is called from an interrupt or bottom half, and interrupted, as run_task_queue() - * will not be executed/continued before the last interrupt returns. If in - * doubt, use queue_task(), not queue_task_irq(). - * - Bottom halfs are called in the reverse order that they were linked into - * the list. - */ - -struct tq_struct { - struct tq_struct *next; /* linked list of active bh's */ - int sync; /* must be initialized to zero */ - void (*routine)(void *); /* function to call */ - void *data; /* argument to function */ -}; - -typedef struct tq_struct * task_queue; - -#define DECLARE_TASK_QUEUE(q) task_queue q = &tq_last - -extern struct tq_struct tq_last; -extern task_queue tq_timer, tq_immediate, tq_scheduler; - -#ifdef INCLUDE_INLINE_FUNCS -struct tq_struct tq_last = { - &tq_last, 0, 0, 0 -}; -#endif - -/* - * To implement your own list of active bottom halfs, use the following - * two definitions: - * - * struct tq_struct *my_bh = &tq_last; - * struct tq_struct run_my_bh = { - * 0, 0, (void *)(void *) run_task_queue, &my_bh - * }; - * - * To activate a bottom half on your list, use: - * - * queue_task(tq_pointer, &my_bh); - * - * To run the bottom halfs on your list put them on the immediate list by: - * - * queue_task(&run_my_bh, &tq_immediate); - * - * This allows you to do deferred procession. For example, you could - * have a bottom half list tq_timer, which is marked active by the timer - * interrupt. - */ - -/* - * queue_task_irq: put the bottom half handler "bh_pointer" on the list - * "bh_list". You may call this function only from an interrupt - * handler or a bottom half handler. - */ -_INLINE_ void queue_task_irq(struct tq_struct *bh_pointer, - task_queue *bh_list) -{ - if (!set_bit(0,&bh_pointer->sync)) { - bh_pointer->next = *bh_list; - *bh_list = bh_pointer; - } -} - -/* - * queue_task_irq_off: put the bottom half handler "bh_pointer" on the list - * "bh_list". You may call this function only when interrupts are off. - */ -_INLINE_ void queue_task_irq_off(struct tq_struct *bh_pointer, - task_queue *bh_list) -{ - if (!(bh_pointer->sync & 1)) { - bh_pointer->sync = 1; - bh_pointer->next = *bh_list; - *bh_list = bh_pointer; - } -} - - -/* - * queue_task: as queue_task_irq, but can be called from anywhere. - */ -_INLINE_ void queue_task(struct tq_struct *bh_pointer, - task_queue *bh_list) -{ - if (!set_bit(0,&bh_pointer->sync)) { - unsigned long flags; - save_flags(flags); - cli(); - bh_pointer->next = *bh_list; - *bh_list = bh_pointer; - restore_flags(flags); - } -} - -/* - * Call all "bottom halfs" on a given list. - */ -_INLINE_ void run_task_queue(task_queue *list) -{ - register struct tq_struct *save_p; - register struct tq_struct *p; - void *arg; - void (*f) (void *); - - while(1) { - p = xchg(list,&tq_last); - if(p == &tq_last) - break; - - do { - arg = p -> data; - f = p -> routine; - save_p = p -> next; - p -> sync = 0; - (*f)(arg); - p = save_p; - } while(p != &tq_last); - } -} - -#undef _INLINE_ - -#endif /* _LINUX_TQUEUE_H */ diff --git a/i386/i386at/gpl/linux/include/linux/trdevice.h b/i386/i386at/gpl/linux/include/linux/trdevice.h deleted file mode 100644 index 9680176..0000000 --- a/i386/i386at/gpl/linux/include/linux/trdevice.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. NET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions for the Ethernet handlers. - * - * Version: @(#)eth.h 1.0.4 05/13/93 - * - * Authors: Ross Biro, <bir7@leland.Stanford.Edu> - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * Relocated to include/linux where it belongs by Alan Cox - * <gw4pts@gw4pts.ampr.org> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * WARNING: This move may well be temporary. This file will get merged with others RSN. - * - */ -#ifndef _LINUX_TRDEVICE_H -#define _LINUX_TRDEVICE_H - - -#include <linux/if_tr.h> - -#ifdef __KERNEL__ -extern int tr_header(struct sk_buff *skb, struct device *dev, - unsigned short type, void *daddr, - void *saddr, unsigned len); -extern int tr_rebuild_header(void *buff, struct device *dev, - unsigned long raddr, struct sk_buff *skb); -extern unsigned short tr_type_trans(struct sk_buff *skb, struct device *dev); - -#endif - -#endif /* _LINUX_TRDEVICE_H */ diff --git a/i386/i386at/gpl/linux/include/linux/tty.h b/i386/i386at/gpl/linux/include/linux/tty.h deleted file mode 100644 index fe13951..0000000 --- a/i386/i386at/gpl/linux/include/linux/tty.h +++ /dev/null @@ -1,340 +0,0 @@ -#ifndef _LINUX_TTY_H -#define _LINUX_TTY_H - -/* - * 'tty.h' defines some structures used by tty_io.c and some defines. - */ - -#ifdef __KERNEL__ -#include <linux/fs.h> -#include <linux/termios.h> -#include <linux/tqueue.h> -#include <linux/tty_driver.h> -#include <linux/tty_ldisc.h> - -#include <asm/system.h> - - -/* - * Note: don't mess with NR_PTYS until you understand the tty minor - * number allocation game... - * (Note: the *_driver.minor_start values 1, 64, 128, 192 are - * hardcoded at present.) - */ -#define MIN_NR_CONSOLES 1 /* must be at least 1 */ -#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */ -#define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */ - /* Note: the ioctl VT_GETSTATE does not work for - consoles 16 and higher (since it returns a short) */ -#define NR_PTYS 256 -#define NR_LDISCS 16 - -/* - * These are set up by the setup-routine at boot-time: - */ - -struct screen_info { - unsigned char orig_x; - unsigned char orig_y; - unsigned char unused1[2]; - unsigned short orig_video_page; - unsigned char orig_video_mode; - unsigned char orig_video_cols; - unsigned short unused2; - unsigned short orig_video_ega_bx; - unsigned short unused3; - unsigned char orig_video_lines; - unsigned char orig_video_isVGA; - unsigned short orig_video_points; -}; - -extern struct screen_info screen_info; - -#define ORIG_X (screen_info.orig_x) -#define ORIG_Y (screen_info.orig_y) -#define ORIG_VIDEO_PAGE (screen_info.orig_video_page) -#define ORIG_VIDEO_MODE (screen_info.orig_video_mode) -#define ORIG_VIDEO_COLS (screen_info.orig_video_cols) -#define ORIG_VIDEO_EGA_BX (screen_info.orig_video_ega_bx) -#define ORIG_VIDEO_LINES (screen_info.orig_video_lines) -#define ORIG_VIDEO_ISVGA (screen_info.orig_video_isVGA) -#define ORIG_VIDEO_POINTS (screen_info.orig_video_points) - -#define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */ -#define VIDEO_TYPE_CGA 0x11 /* CGA Display */ -#define VIDEO_TYPE_EGAM 0x20 /* EGA/VGA in Monochrome Mode */ -#define VIDEO_TYPE_EGAC 0x21 /* EGA in Color Mode */ -#define VIDEO_TYPE_VGAC 0x22 /* VGA+ in Color Mode */ - -#define VIDEO_TYPE_TGAC 0x40 /* DEC TGA */ - -/* - * This character is the same as _POSIX_VDISABLE: it cannot be used as - * a c_cc[] character, but indicates that a particular special character - * isn't in use (eg VINTR has no character etc) - */ -#define __DISABLED_CHAR '\0' - -/* - * This is the flip buffer used for the tty driver. The buffer is - * located in the tty structure, and is used as a high speed interface - * between the tty driver and the tty line discipline. - */ -#define TTY_FLIPBUF_SIZE 512 - -struct tty_flip_buffer { - struct tq_struct tqueue; - unsigned char char_buf[2*TTY_FLIPBUF_SIZE]; - char flag_buf[2*TTY_FLIPBUF_SIZE]; - char *char_buf_ptr; - unsigned char *flag_buf_ptr; - int count; - int buf_num; -}; - -/* - * When a break, frame error, or parity error happens, these codes are - * stuffed into the flags buffer. - */ -#define TTY_NORMAL 0 -#define TTY_BREAK 1 -#define TTY_FRAME 2 -#define TTY_PARITY 3 -#define TTY_OVERRUN 4 - -#define INTR_CHAR(tty) ((tty)->termios->c_cc[VINTR]) -#define QUIT_CHAR(tty) ((tty)->termios->c_cc[VQUIT]) -#define ERASE_CHAR(tty) ((tty)->termios->c_cc[VERASE]) -#define KILL_CHAR(tty) ((tty)->termios->c_cc[VKILL]) -#define EOF_CHAR(tty) ((tty)->termios->c_cc[VEOF]) -#define TIME_CHAR(tty) ((tty)->termios->c_cc[VTIME]) -#define MIN_CHAR(tty) ((tty)->termios->c_cc[VMIN]) -#define SWTC_CHAR(tty) ((tty)->termios->c_cc[VSWTC]) -#define START_CHAR(tty) ((tty)->termios->c_cc[VSTART]) -#define STOP_CHAR(tty) ((tty)->termios->c_cc[VSTOP]) -#define SUSP_CHAR(tty) ((tty)->termios->c_cc[VSUSP]) -#define EOL_CHAR(tty) ((tty)->termios->c_cc[VEOL]) -#define REPRINT_CHAR(tty) ((tty)->termios->c_cc[VREPRINT]) -#define DISCARD_CHAR(tty) ((tty)->termios->c_cc[VDISCARD]) -#define WERASE_CHAR(tty) ((tty)->termios->c_cc[VWERASE]) -#define LNEXT_CHAR(tty) ((tty)->termios->c_cc[VLNEXT]) -#define EOL2_CHAR(tty) ((tty)->termios->c_cc[VEOL2]) - -#define _I_FLAG(tty,f) ((tty)->termios->c_iflag & (f)) -#define _O_FLAG(tty,f) ((tty)->termios->c_oflag & (f)) -#define _C_FLAG(tty,f) ((tty)->termios->c_cflag & (f)) -#define _L_FLAG(tty,f) ((tty)->termios->c_lflag & (f)) - -#define I_IGNBRK(tty) _I_FLAG((tty),IGNBRK) -#define I_BRKINT(tty) _I_FLAG((tty),BRKINT) -#define I_IGNPAR(tty) _I_FLAG((tty),IGNPAR) -#define I_PARMRK(tty) _I_FLAG((tty),PARMRK) -#define I_INPCK(tty) _I_FLAG((tty),INPCK) -#define I_ISTRIP(tty) _I_FLAG((tty),ISTRIP) -#define I_INLCR(tty) _I_FLAG((tty),INLCR) -#define I_IGNCR(tty) _I_FLAG((tty),IGNCR) -#define I_ICRNL(tty) _I_FLAG((tty),ICRNL) -#define I_IUCLC(tty) _I_FLAG((tty),IUCLC) -#define I_IXON(tty) _I_FLAG((tty),IXON) -#define I_IXANY(tty) _I_FLAG((tty),IXANY) -#define I_IXOFF(tty) _I_FLAG((tty),IXOFF) -#define I_IMAXBEL(tty) _I_FLAG((tty),IMAXBEL) - -#define O_OPOST(tty) _O_FLAG((tty),OPOST) -#define O_OLCUC(tty) _O_FLAG((tty),OLCUC) -#define O_ONLCR(tty) _O_FLAG((tty),ONLCR) -#define O_OCRNL(tty) _O_FLAG((tty),OCRNL) -#define O_ONOCR(tty) _O_FLAG((tty),ONOCR) -#define O_ONLRET(tty) _O_FLAG((tty),ONLRET) -#define O_OFILL(tty) _O_FLAG((tty),OFILL) -#define O_OFDEL(tty) _O_FLAG((tty),OFDEL) -#define O_NLDLY(tty) _O_FLAG((tty),NLDLY) -#define O_CRDLY(tty) _O_FLAG((tty),CRDLY) -#define O_TABDLY(tty) _O_FLAG((tty),TABDLY) -#define O_BSDLY(tty) _O_FLAG((tty),BSDLY) -#define O_VTDLY(tty) _O_FLAG((tty),VTDLY) -#define O_FFDLY(tty) _O_FLAG((tty),FFDLY) - -#define C_BAUD(tty) _C_FLAG((tty),CBAUD) -#define C_CSIZE(tty) _C_FLAG((tty),CSIZE) -#define C_CSTOPB(tty) _C_FLAG((tty),CSTOPB) -#define C_CREAD(tty) _C_FLAG((tty),CREAD) -#define C_PARENB(tty) _C_FLAG((tty),PARENB) -#define C_PARODD(tty) _C_FLAG((tty),PARODD) -#define C_HUPCL(tty) _C_FLAG((tty),HUPCL) -#define C_CLOCAL(tty) _C_FLAG((tty),CLOCAL) -#define C_CIBAUD(tty) _C_FLAG((tty),CIBAUD) -#define C_CRTSCTS(tty) _C_FLAG((tty),CRTSCTS) - -#define L_ISIG(tty) _L_FLAG((tty),ISIG) -#define L_ICANON(tty) _L_FLAG((tty),ICANON) -#define L_XCASE(tty) _L_FLAG((tty),XCASE) -#define L_ECHO(tty) _L_FLAG((tty),ECHO) -#define L_ECHOE(tty) _L_FLAG((tty),ECHOE) -#define L_ECHOK(tty) _L_FLAG((tty),ECHOK) -#define L_ECHONL(tty) _L_FLAG((tty),ECHONL) -#define L_NOFLSH(tty) _L_FLAG((tty),NOFLSH) -#define L_TOSTOP(tty) _L_FLAG((tty),TOSTOP) -#define L_ECHOCTL(tty) _L_FLAG((tty),ECHOCTL) -#define L_ECHOPRT(tty) _L_FLAG((tty),ECHOPRT) -#define L_ECHOKE(tty) _L_FLAG((tty),ECHOKE) -#define L_FLUSHO(tty) _L_FLAG((tty),FLUSHO) -#define L_PENDIN(tty) _L_FLAG((tty),PENDIN) -#define L_IEXTEN(tty) _L_FLAG((tty),IEXTEN) - -/* - * Where all of the state associated with a tty is kept while the tty - * is open. Since the termios state should be kept even if the tty - * has been closed --- for things like the baud rate, etc --- it is - * not stored here, but rather a pointer to the real state is stored - * here. Possible the winsize structure should have the same - * treatment, but (1) the default 80x24 is usually right and (2) it's - * most often used by a windowing system, which will set the correct - * size each time the window is created or resized anyway. - * IMPORTANT: since this structure is dynamically allocated, it must - * be no larger than 4096 bytes. Changing TTY_BUF_SIZE will change - * the size of this structure, and it needs to be done with care. - * - TYT, 9/14/92 - */ -struct tty_struct { - int magic; - struct tty_driver driver; - struct tty_ldisc ldisc; - struct termios *termios, *termios_locked; - int pgrp; - int session; - kdev_t device; - unsigned long flags; - int count; - struct winsize winsize; - unsigned char stopped:1, hw_stopped:1, packet:1; - unsigned char ctrl_status; - - struct tty_struct *link; - struct fasync_struct *fasync; - struct tty_flip_buffer flip; - int max_flip_cnt; - struct wait_queue *write_wait; - struct wait_queue *read_wait; - void *disc_data; - void *driver_data; - -#define N_TTY_BUF_SIZE 4096 - - /* - * The following is data for the N_TTY line discipline. For - * historical reasons, this is included in the tty structure. - */ - unsigned int column; - unsigned char lnext:1, erasing:1, raw:1, real_raw:1, icanon:1; - unsigned char closing:1; - unsigned short minimum_to_wake; - unsigned overrun_time; - int num_overrun; - unsigned long process_char_map[256/(8*sizeof(unsigned long))]; - char *read_buf; - int read_head; - int read_tail; - int read_cnt; - unsigned long read_flags[N_TTY_BUF_SIZE/(8*sizeof(unsigned long))]; - int canon_data; - unsigned long canon_head; - unsigned int canon_column; -}; - -/* tty magic number */ -#define TTY_MAGIC 0x5401 - -/* - * These bits are used in the flags field of the tty structure. - * - * So that interrupts won't be able to mess up the queues, - * copy_to_cooked must be atomic with respect to itself, as must - * tty->write. Thus, you must use the inline functions set_bit() and - * clear_bit() to make things atomic. - */ -#define TTY_THROTTLED 0 -#define TTY_IO_ERROR 1 -#define TTY_SLAVE_CLOSED 2 -#define TTY_EXCLUSIVE 3 -#define TTY_DEBUG 4 -#define TTY_DO_WRITE_WAKEUP 5 -#define TTY_PUSH 6 -#define TTY_CLOSING 7 - -#define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) - -extern void tty_write_flush(struct tty_struct *); - -extern struct termios tty_std_termios; -extern struct tty_struct * redirect; -extern struct tty_ldisc ldiscs[]; -extern int fg_console, last_console, want_console; - -extern int kmsg_redirect; -extern struct wait_queue * keypress_wait; - -extern unsigned long con_init(unsigned long); - -extern int rs_init(void); -extern int lp_init(void); -extern int pty_init(void); -extern int tty_init(void); -extern int vcs_init(void); -extern int cy_init(void); -extern int stl_init(void); -extern int stli_init(void); - -extern int tty_paranoia_check(struct tty_struct *tty, kdev_t device, - const char *routine); -extern char *_tty_name(struct tty_struct *tty, char *buf); -extern char *tty_name(struct tty_struct *tty); -extern void tty_wait_until_sent(struct tty_struct * tty, int timeout); -extern int tty_check_change(struct tty_struct * tty); -extern void stop_tty(struct tty_struct * tty); -extern void start_tty(struct tty_struct * tty); -extern int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc); -extern int tty_register_driver(struct tty_driver *driver); -extern int tty_unregister_driver(struct tty_driver *driver); -extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, - int buflen); -extern void tty_write_message(struct tty_struct *tty, char *msg); - -extern int is_orphaned_pgrp(int pgrp); -extern int is_ignored(int sig); -extern int tty_signal(int sig, struct tty_struct *tty); -extern void tty_hangup(struct tty_struct * tty); -extern void tty_vhangup(struct tty_struct * tty); -extern void tty_unhangup(struct file *filp); -extern int tty_hung_up_p(struct file * filp); -extern void do_SAK(struct tty_struct *tty); -extern void disassociate_ctty(int priv); - -/* n_tty.c */ -extern struct tty_ldisc tty_ldisc_N_TTY; - -/* tty_ioctl.c */ -extern int n_tty_ioctl(struct tty_struct * tty, struct file * file, - unsigned int cmd, unsigned long arg); - -/* serial.c */ - -extern int rs_open(struct tty_struct * tty, struct file * filp); - -/* pty.c */ - -extern int pty_open(struct tty_struct * tty, struct file * filp); - -/* console.c */ - -extern int con_open(struct tty_struct * tty, struct file * filp); -extern void update_screen(int new_console); -extern void console_print(const char *); - -/* vt.c */ - -extern int vt_ioctl(struct tty_struct *tty, struct file * file, - unsigned int cmd, unsigned long arg); - -#endif /* __KERNEL__ */ -#endif diff --git a/i386/i386at/gpl/linux/include/linux/tty_driver.h b/i386/i386at/gpl/linux/include/linux/tty_driver.h deleted file mode 100644 index 3468fa2..0000000 --- a/i386/i386at/gpl/linux/include/linux/tty_driver.h +++ /dev/null @@ -1,189 +0,0 @@ -#ifndef _LINUX_TTY_DRIVER_H -#define _LINUX_TTY_DRIVER_H - -/* - * This structure defines the interface between the low-level tty - * driver and the tty routines. The following routines can be - * defined; unless noted otherwise, they are optional, and can be - * filled in with a null pointer. - * - * int (*open)(struct tty_struct * tty, struct file * filp); - * - * This routine is called when a particular tty device is opened. - * This routine is mandatory; if this routine is not filled in, - * the attempted open will fail with ENODEV. - * - * void (*close)(struct tty_struct * tty, struct file * filp); - * - * This routine is called when a particular tty device is closed. - * - * int (*write)(struct tty_struct * tty, int from_user, - * const unsigned char *buf, int count); - * - * This routine is called by the kernel to write a series of - * characters to the tty device. The characters may come from - * user space or kernel space. This routine will return the - * number of characters actually accepted for writing. This - * routine is mandatory. - * - * void (*put_char)(struct tty_struct *tty, unsigned char ch); - * - * This routine is called by the kernel to write a single - * character to the tty device. If the kernel uses this routine, - * it must call the flush_chars() routine (if defined) when it is - * done stuffing characters into the driver. If there is no room - * in the queue, the character is ignored. - * - * void (*flush_chars)(struct tty_struct *tty); - * - * This routine is called by the kernel after it has written a - * series of characters to the tty device using put_char(). - * - * int (*write_room)(struct tty_struct *tty); - * - * This routine returns the numbers of characters the tty driver - * will accept for queuing to be written. This number is subject - * to change as output buffers get emptied, or if the output flow - * control is acted. - * - * int (*ioctl)(struct tty_struct *tty, struct file * file, - * unsigned int cmd, unsigned long arg); - * - * This routine allows the tty driver to implement - * device-specific ioctl's. If the ioctl number passed in cmd - * is not recognized by the driver, it should return ENOIOCTLCMD. - * - * void (*set_termios)(struct tty_struct *tty, struct termios * old); - * - * This routine allows the tty driver to be notified when - * device's termios settings have changed. Note that a - * well-designed tty driver should be prepared to accept the case - * where old == NULL, and try to do something rational. - * - * void (*set_ldisc)(struct tty_struct *tty); - * - * This routine allows the tty driver to be notified when the - * device's termios settings have changed. - * - * void (*throttle)(struct tty_struct * tty); - * - * This routine notifies the tty driver that input buffers for - * the line discipline are close to full, and it should somehow - * signal that no more characters should be sent to the tty. - * - * void (*unthrottle)(struct tty_struct * tty); - * - * This routine notifies the tty drivers that it should signals - * that characters can now be sent to the tty without fear of - * overrunning the input buffers of the line disciplines. - * - * void (*stop)(struct tty_struct *tty); - * - * This routine notifies the tty driver that it should stop - * outputting characters to the tty device. - * - * void (*start)(struct tty_struct *tty); - * - * This routine notifies the tty driver that it resume sending - * characters to the tty device. - * - * void (*hangup)(struct tty_struct *tty); - * - * This routine notifies the tty driver that it should hangup the - * tty device. - * - */ - -#include <linux/fs.h> - -struct tty_driver { - int magic; /* magic number for this structure */ - const char *name; - int name_base; /* offset of printed name */ - short major; /* major device number */ - short minor_start; /* start of minor device number*/ - short num; /* number of devices */ - short type; /* type of tty driver */ - short subtype; /* subtype of tty driver */ - struct termios init_termios; /* Initial termios */ - int flags; /* tty driver flags */ - int *refcount; /* for loadable tty drivers */ - struct tty_driver *other; /* only used for the PTY driver */ - - /* - * Pointer to the tty data structures - */ - struct tty_struct **table; - struct termios **termios; - struct termios **termios_locked; - - /* - * Interface routines from the upper tty layer to the tty - * driver. - */ - int (*open)(struct tty_struct * tty, struct file * filp); - void (*close)(struct tty_struct * tty, struct file * filp); - int (*write)(struct tty_struct * tty, int from_user, - const unsigned char *buf, int count); - void (*put_char)(struct tty_struct *tty, unsigned char ch); - void (*flush_chars)(struct tty_struct *tty); - int (*write_room)(struct tty_struct *tty); - int (*chars_in_buffer)(struct tty_struct *tty); - int (*ioctl)(struct tty_struct *tty, struct file * file, - unsigned int cmd, unsigned long arg); - void (*set_termios)(struct tty_struct *tty, struct termios * old); - void (*throttle)(struct tty_struct * tty); - void (*unthrottle)(struct tty_struct * tty); - void (*stop)(struct tty_struct *tty); - void (*start)(struct tty_struct *tty); - void (*hangup)(struct tty_struct *tty); - void (*flush_buffer)(struct tty_struct *tty); - void (*set_ldisc)(struct tty_struct *tty); - - /* - * linked list pointers - */ - struct tty_driver *next; - struct tty_driver *prev; -}; - -/* tty driver magic number */ -#define TTY_DRIVER_MAGIC 0x5402 - -/* - * tty driver flags - * - * TTY_DRIVER_RESET_TERMIOS --- requests the tty layer to reset the - * termios setting when the last process has closed the device. - * Used for PTY's, in particular. - * - * TTY_DRIVER_REAL_RAW --- if set, indicates that the driver will - * guarantee never not to set any special character handling - * flags if ((IGNBRK || (!BRKINT && !PARMRK)) && (IGNPAR || - * !INPCK)). That is, if there is no reason for the driver to - * send notifications of parity and break characters up to the - * line driver, it won't do so. This allows the line driver to - * optimize for this case if this flag is set. (Note that there - * is also a promise, if the above case is true, not to signal - * overruns, either.) - */ -#define TTY_DRIVER_INSTALLED 0x0001 -#define TTY_DRIVER_RESET_TERMIOS 0x0002 -#define TTY_DRIVER_REAL_RAW 0x0004 - -/* tty driver types */ -#define TTY_DRIVER_TYPE_SYSTEM 0x0001 -#define TTY_DRIVER_TYPE_CONSOLE 0x0002 -#define TTY_DRIVER_TYPE_SERIAL 0x0003 -#define TTY_DRIVER_TYPE_PTY 0x0004 -#define TTY_DRIVER_TYPE_SCC 0x0005 /* scc driver */ - -/* system subtypes (magic, used by tty_io.c) */ -#define SYSTEM_TYPE_TTY 0x0001 -#define SYSTEM_TYPE_CONSOLE 0x0002 - -/* pty subtypes (magic, used by tty_io.c) */ -#define PTY_TYPE_MASTER 0x0001 -#define PTY_TYPE_SLAVE 0x0002 - -#endif /* #ifdef _LINUX_TTY_DRIVER_H */ diff --git a/i386/i386at/gpl/linux/include/linux/tty_ldisc.h b/i386/i386at/gpl/linux/include/linux/tty_ldisc.h deleted file mode 100644 index 87b54ca..0000000 --- a/i386/i386at/gpl/linux/include/linux/tty_ldisc.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef _LINUX_TTY_LDISC_H -#define _LINUX_TTY_LDISC_H - -/* - * Definitions for the tty line discipline - */ - -#include <linux/fs.h> -#include <linux/wait.h> - -struct tty_ldisc { - int magic; - int num; - int flags; - /* - * The following routines are called from above. - */ - int (*open)(struct tty_struct *); - void (*close)(struct tty_struct *); - void (*flush_buffer)(struct tty_struct *tty); - int (*chars_in_buffer)(struct tty_struct *tty); - int (*read)(struct tty_struct * tty, struct file * file, - unsigned char * buf, unsigned int nr); - int (*write)(struct tty_struct * tty, struct file * file, - const unsigned char * buf, unsigned int nr); - int (*ioctl)(struct tty_struct * tty, struct file * file, - unsigned int cmd, unsigned long arg); - void (*set_termios)(struct tty_struct *tty, struct termios * old); - int (*select)(struct tty_struct * tty, struct inode * inode, - struct file * file, int sel_type, - struct select_table_struct *wait); - - /* - * The following routines are called from below. - */ - void (*receive_buf)(struct tty_struct *, const unsigned char *cp, - char *fp, int count); - int (*receive_room)(struct tty_struct *); - void (*write_wakeup)(struct tty_struct *); -}; - -#define TTY_LDISC_MAGIC 0x5403 - -#define LDISC_FLAG_DEFINED 0x00000001 - -#endif /* _LINUX_TTY_LDISC_H */ diff --git a/i386/i386at/gpl/linux/include/linux/types.h b/i386/i386at/gpl/linux/include/linux/types.h deleted file mode 100644 index 376d3ac..0000000 --- a/i386/i386at/gpl/linux/include/linux/types.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef _LINUX_TYPES_H -#define _LINUX_TYPES_H - -/* - * This allows for 256 file descriptors: if NR_OPEN is ever grown beyond that - * you'll have to change this too. But 256 fd's seem to be enough even for such - * "real" unices like SunOS, so hopefully this is one limit that doesn't have - * to be changed. - * - * Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in <sys/time.h> - * (and thus <linux/time.h>) - but this is a more logical place for them. Solved - * by having dummy defines in <sys/time.h>. - */ - -/* - * Those macros may have been defined in <gnu/types.h>. But we always - * use the ones here. - */ -#undef __NFDBITS -#define __NFDBITS (8 * sizeof(unsigned int)) - -#undef __FD_SETSIZE -#define __FD_SETSIZE 256 - -#undef __FDSET_INTS -#define __FDSET_INTS (__FD_SETSIZE/__NFDBITS) - -typedef struct fd_set { - unsigned int fds_bits [__FDSET_INTS]; -} fd_set; - -#include <asm/types.h> - -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) -#define _LOFF_T -typedef long long loff_t; -#endif - -#ifndef MACH_INCLUDE -/* bsd */ -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -typedef unsigned long u_long; -#endif - -/* sysv */ -typedef unsigned char unchar; -typedef unsigned short ushort; -typedef unsigned int uint; -typedef unsigned long ulong; - -#ifndef MACH_INCLUDE -typedef char *caddr_t; -#endif - -typedef unsigned char cc_t; -typedef unsigned int speed_t; -typedef unsigned int tcflag_t; - -struct ustat { - daddr_t f_tfree; - ino_t f_tinode; - char f_fname[6]; - char f_fpack[6]; -}; - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/uio.h b/i386/i386at/gpl/linux/include/linux/uio.h deleted file mode 100644 index 8051b3d..0000000 --- a/i386/i386at/gpl/linux/include/linux/uio.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __LINUX_UIO_H -#define __LINUX_UIO_H - -/* - * Berkeley style UIO structures - Alan Cox 1994. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ - - -/* A word of warning: Our uio structure will clash with the C library one (which is now obsolete). Remove the C - library one from sys/uio.h */ - -struct iovec -{ - void *iov_base; /* BSD uses caddr_t (same thing in effect) */ - int iov_len; -}; - -#define MAX_IOVEC 8 /* Maximum iovec's in one operation */ - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/unistd.h b/i386/i386at/gpl/linux/include/linux/unistd.h deleted file mode 100644 index 10ed983..0000000 --- a/i386/i386at/gpl/linux/include/linux/unistd.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _LINUX_UNISTD_H_ -#define _LINUX_UNISTD_H_ - -extern int errno; - -/* - * Include machine specific syscallX macros - */ -#include <asm/unistd.h> - -#endif /* _LINUX_UNISTD_H_ */ diff --git a/i386/i386at/gpl/linux/include/linux/utsname.h b/i386/i386at/gpl/linux/include/linux/utsname.h deleted file mode 100644 index 7aef28f..0000000 --- a/i386/i386at/gpl/linux/include/linux/utsname.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _LINUX_UTSNAME_H -#define _LINUX_UTSNAME_H - -#define __OLD_UTS_LEN 8 - -struct oldold_utsname { - char sysname[9]; - char nodename[9]; - char release[9]; - char version[9]; - char machine[9]; -}; - -#define __NEW_UTS_LEN 64 - -struct old_utsname { - char sysname[65]; - char nodename[65]; - char release[65]; - char version[65]; - char machine[65]; -}; - -struct new_utsname { - char sysname[65]; - char nodename[65]; - char release[65]; - char version[65]; - char machine[65]; - char domainname[65]; -}; - -extern struct new_utsname system_utsname; - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/version.h b/i386/i386at/gpl/linux/include/linux/version.h deleted file mode 100644 index 39c1b59..0000000 --- a/i386/i386at/gpl/linux/include/linux/version.h +++ /dev/null @@ -1,8 +0,0 @@ -#define UTS_RELEASE "1.3.68" -#define UTS_VERSION "#1 Thu Feb 29 16:37:10 MST 1996" -#define LINUX_COMPILE_TIME "09:03:52" -#define LINUX_COMPILE_BY "goel" -#define LINUX_COMPILE_HOST "stamp.cs.utah.edu" -#define LINUX_COMPILE_DOMAIN "cs.utah.edu" -#define LINUX_COMPILER "gcc version 2.7.2" -#define LINUX_VERSION_CODE (65536 + 4 * 256) diff --git a/i386/i386at/gpl/linux/include/linux/vfs.h b/i386/i386at/gpl/linux/include/linux/vfs.h deleted file mode 100644 index b3a5865..0000000 --- a/i386/i386at/gpl/linux/include/linux/vfs.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _LINUX_VFS_H -#define _LINUX_VFS_H - -#include <asm/statfs.h> - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/vm86.h b/i386/i386at/gpl/linux/include/linux/vm86.h deleted file mode 100644 index ceb1035..0000000 --- a/i386/i386at/gpl/linux/include/linux/vm86.h +++ /dev/null @@ -1,109 +0,0 @@ -#ifndef _LINUX_VM86_H -#define _LINUX_VM86_H - -/* - * I'm guessing at the VIF/VIP flag usage, but hope that this is how - * the Pentium uses them. Linux will return from vm86 mode when both - * VIF and VIP is set. - * - * On a Pentium, we could probably optimize the virtual flags directly - * in the eflags register instead of doing it "by hand" in vflags... - * - * Linus - */ - -#define TF_MASK 0x00000100 -#define IF_MASK 0x00000200 -#define IOPL_MASK 0x00003000 -#define NT_MASK 0x00004000 -#define VM_MASK 0x00020000 -#define AC_MASK 0x00040000 -#define VIF_MASK 0x00080000 /* virtual interrupt flag */ -#define VIP_MASK 0x00100000 /* virtual interrupt pending */ -#define ID_MASK 0x00200000 - -#define BIOSSEG 0x0f000 - -#define CPU_086 0 -#define CPU_186 1 -#define CPU_286 2 -#define CPU_386 3 -#define CPU_486 4 -#define CPU_586 5 - -/* - * Return values for the 'vm86()' system call - */ -#define VM86_TYPE(retval) ((retval) & 0xff) -#define VM86_ARG(retval) ((retval) >> 8) - -#define VM86_SIGNAL 0 /* return due to signal */ -#define VM86_UNKNOWN 1 /* unhandled GP fault - IO-instruction or similar */ -#define VM86_INTx 2 /* int3/int x instruction (ARG = x) */ -#define VM86_STI 3 /* sti/popf/iret instruction enabled virtual interrupts */ - -/* - * This is the stack-layout when we have done a "SAVE_ALL" from vm86 - * mode - the main change is that the old segment descriptors aren't - * useful any more and are forced to be zero by the kernel (and the - * hardware when a trap occurs), and the real segment descriptors are - * at the end of the structure. Look at ptrace.h to see the "normal" - * setup. - */ - -struct vm86_regs { -/* - * normal regs, with special meaning for the segment descriptors.. - */ - long ebx; - long ecx; - long edx; - long esi; - long edi; - long ebp; - long eax; - long __null_ds; - long __null_es; - long __null_fs; - long __null_gs; - long orig_eax; - long eip; - unsigned short cs, __csh; - long eflags; - long esp; - unsigned short ss, __ssh; -/* - * these are specific to v86 mode: - */ - unsigned short es, __esh; - unsigned short ds, __dsh; - unsigned short fs, __fsh; - unsigned short gs, __gsh; -}; - -struct revectored_struct { - unsigned long __map[8]; /* 256 bits */ -}; - -struct vm86_struct { - struct vm86_regs regs; - unsigned long flags; - unsigned long screen_bitmap; - unsigned long cpu_type; - struct revectored_struct int_revectored; - struct revectored_struct int21_revectored; -}; - -/* - * flags masks - */ -#define VM86_SCREEN_BITMAP 0x0001 - -#ifdef __KERNEL__ - -void handle_vm86_fault(struct vm86_regs *, long); -void handle_vm86_debug(struct vm86_regs *, long); - -#endif - -#endif diff --git a/i386/i386at/gpl/linux/include/linux/wait.h b/i386/i386at/gpl/linux/include/linux/wait.h deleted file mode 100644 index 90ffe7b..0000000 --- a/i386/i386at/gpl/linux/include/linux/wait.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _LINUX_WAIT_H -#define _LINUX_WAIT_H - -#define WNOHANG 0x00000001 -#define WUNTRACED 0x00000002 - -#define __WCLONE 0x80000000 - -#ifdef __KERNEL__ - -struct wait_queue { - struct task_struct * task; - struct wait_queue * next; -}; - -struct semaphore { - int count; - struct wait_queue * wait; -}; - -#define MUTEX ((struct semaphore) { 1, NULL }) -#define MUTEX_LOCKED ((struct semaphore) { 0, NULL }) - -struct select_table_entry { - struct wait_queue wait; - struct wait_queue ** wait_address; -}; - -typedef struct select_table_struct { - int nr; - struct select_table_entry * entry; -} select_table; - -#define __MAX_SELECT_TABLE_ENTRIES (4096 / sizeof (struct select_table_entry)) - -#endif /* __KERNEL__ */ - -#endif diff --git a/i386/i386at/gpl/linux/include/net/af_unix.h b/i386/i386at/gpl/linux/include/net/af_unix.h deleted file mode 100644 index dc4a48d..0000000 --- a/i386/i386at/gpl/linux/include/net/af_unix.h +++ /dev/null @@ -1,4 +0,0 @@ -extern void unix_proto_init(struct net_proto *pro); - -typedef struct sock unix_socket; - diff --git a/i386/i386at/gpl/linux/include/net/arp.h b/i386/i386at/gpl/linux/include/net/arp.h deleted file mode 100644 index db7a29c..0000000 --- a/i386/i386at/gpl/linux/include/net/arp.h +++ /dev/null @@ -1,17 +0,0 @@ -/* linux/net/inet/arp.h */ -#ifndef _ARP_H -#define _ARP_H - -extern void arp_init(void); -extern int arp_rcv(struct sk_buff *skb, struct device *dev, - struct packet_type *pt); -extern int arp_query(unsigned char *haddr, u32 paddr, struct device *dev); -extern int arp_find(unsigned char *haddr, u32 paddr, - struct device *dev, u32 saddr, struct sk_buff *skb); -extern int arp_ioctl(unsigned int cmd, void *arg); -extern void arp_send(int type, int ptype, u32 dest_ip, - struct device *dev, u32 src_ip, - unsigned char *dest_hw, unsigned char *src_hw, unsigned char *th); -extern int arp_bind_cache(struct hh_cache ** hhp, struct device *dev, unsigned short type, __u32 daddr); -extern int arp_update_cache(struct hh_cache * hh); -#endif /* _ARP_H */ diff --git a/i386/i386at/gpl/linux/include/net/atalkcall.h b/i386/i386at/gpl/linux/include/net/atalkcall.h deleted file mode 100644 index 726e33c..0000000 --- a/i386/i386at/gpl/linux/include/net/atalkcall.h +++ /dev/null @@ -1,2 +0,0 @@ -/* Separate to keep compilation of protocols.c simpler */ -extern void atalk_proto_init(struct net_proto *pro); diff --git a/i386/i386at/gpl/linux/include/net/ax25.h b/i386/i386at/gpl/linux/include/net/ax25.h deleted file mode 100644 index 45967cb..0000000 --- a/i386/i386at/gpl/linux/include/net/ax25.h +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Declarations of AX.25 type objects. - * - * Alan Cox (GW4PTS) 10/11/93 - */ - -#ifndef _AX25_H -#define _AX25_H -#include <linux/ax25.h> - -#define PR_SLOWHZ 10 /* Run timing at 1/10 second - gives us better resolution for 56kbit links */ - -#define AX25_T1CLAMPLO (1 * PR_SLOWHZ) /* If defined, clamp at 1 second **/ -#define AX25_T1CLAMPHI (30 * PR_SLOWHZ) /* If defined, clamp at 30 seconds **/ - -#define AX25_BROKEN_NETMAC - -#define AX25_BPQ_HEADER_LEN 16 -#define AX25_KISS_HEADER_LEN 1 - -#define AX25_HEADER_LEN 17 -#define AX25_ADDR_LEN 7 -#define AX25_DIGI_HEADER_LEN (AX25_MAX_DIGIS * AX25_ADDR_LEN) -#define AX25_MAX_HEADER_LEN (AX25_HEADER_LEN + AX25_DIGI_HEADER_LEN) - -#define AX25_P_IP 0xCC -#define AX25_P_ARP 0xCD -#define AX25_P_TEXT 0xF0 -#define AX25_P_NETROM 0xCF -#define AX25_P_SEGMENT 0x08 - -#define SEG_REM 0x7F -#define SEG_FIRST 0x80 - -#define LAPB_UI 0x03 -#define LAPB_C 0x80 -#define LAPB_E 0x01 - -#define SSSID_SPARE 0x60 /* Unused bits in SSID for standard AX.25 */ -#define ESSID_SPARE 0x20 /* Unused bits in SSID for extended AX.25 */ -#define DAMA_FLAG 0x40 /* Well, it is *NOT* unused! (dl1bke 951121 */ - -#define AX25_REPEATED 0x80 - -#define ACK_PENDING_CONDITION 0x01 -#define REJECT_CONDITION 0x02 -#define PEER_RX_BUSY_CONDITION 0x04 -#define OWN_RX_BUSY_CONDITION 0x08 - -#ifndef _LINUX_NETDEVICE_H -#include <linux/netdevice.h> -#endif - -/* - * These headers are taken from the KA9Q package by Phil Karn. These specific - * files have been placed under the GPL (not the whole package) by Phil. - * - * - * Copyright 1991 Phil Karn, KA9Q - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 dated June, 1991. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave., Cambridge, MA 02139, USA. - */ - -/* Upper sub-layer (LAPB) definitions */ - -/* Control field templates */ -#define I 0x00 /* Information frames */ -#define S 0x01 /* Supervisory frames */ -#define RR 0x01 /* Receiver ready */ -#define RNR 0x05 /* Receiver not ready */ -#define REJ 0x09 /* Reject */ -#define U 0x03 /* Unnumbered frames */ -#define SABM 0x2f /* Set Asynchronous Balanced Mode */ -#define SABME 0x6f /* Set Asynchronous Balanced Mode Extended */ -#define DISC 0x43 /* Disconnect */ -#define DM 0x0f /* Disconnected mode */ -#define UA 0x63 /* Unnumbered acknowledge */ -#define FRMR 0x87 /* Frame reject */ -#define UI 0x03 /* Unnumbered information */ -#define PF 0x10 /* Poll/final bit for standard AX.25 */ -#define EPF 0x01 /* Poll/final bit for extended AX.25 */ - -#define ILLEGAL 0x100 /* Impossible to be a real frame type */ - -#define POLLOFF 0 -#define POLLON 1 - -/* AX25 L2 C-bit */ - -#define C_COMMAND 1 /* C_ otherwise it clashes with the de600 defines (sigh)) */ -#define C_RESPONSE 2 - -/* Define Link State constants. */ - -#define AX25_STATE_0 0 -#define AX25_STATE_1 1 -#define AX25_STATE_2 2 -#define AX25_STATE_3 3 -#define AX25_STATE_4 4 - -#define MODULUS 8 /* Standard AX.25 modulus */ -#define EMODULUS 128 /* Extended AX.25 modulus */ - -#define AX25_DEF_IPDEFMODE 'D' -#define AX25_DEF_AXDEFMODE 8 -#define AX25_DEF_NETROM 1 -#define AX25_DEF_TEXT 1 -#define AX25_DEF_BACKOFF 'E' -#define AX25_DEF_CONMODE 1 -#define AX25_DEF_WINDOW 2 -#define AX25_DEF_EWINDOW 32 -#define AX25_DEF_T1 10 -#define AX25_DEF_T2 3 -#define AX25_DEF_T3 300 -#define AX25_DEF_N2 10 -#define AX25_DEF_DIGI (AX25_DIGI_INBAND|AX25_DIGI_XBAND) - -typedef struct ax25_uid_assoc { - struct ax25_uid_assoc *next; - uid_t uid; - ax25_address call; -} ax25_uid_assoc; - -typedef struct { - ax25_address calls[AX25_MAX_DIGIS]; - unsigned char repeated[AX25_MAX_DIGIS]; - unsigned char ndigi; - char lastrepeat; -} ax25_digi; - -typedef struct ax25_cb { - struct ax25_cb *next; - ax25_address source_addr, dest_addr; - struct device *device; - unsigned char dama_slave; /* dl1bke 951121 */ - unsigned char state, modulus, hdrincl; - unsigned short vs, vr, va; - unsigned char condition, backoff; - unsigned char n2, n2count; - unsigned short t1, t2, t3, rtt; - unsigned short t1timer, t2timer, t3timer; - unsigned short fragno, fraglen; - ax25_digi *digipeat; - struct sk_buff_head write_queue; - struct sk_buff_head reseq_queue; - struct sk_buff_head ack_queue; - struct sk_buff_head frag_queue; - unsigned char window; - struct timer_list timer; - struct sock *sk; /* Backlink to socket */ -} ax25_cb; - -/* af_ax25.c */ -extern ax25_address null_ax25_address; -extern char *ax2asc(ax25_address *); -extern int ax25cmp(ax25_address *, ax25_address *); -extern int ax25_send_frame(struct sk_buff *, ax25_address *, ax25_address *, ax25_digi *, struct device *); -extern void ax25_destroy_socket(ax25_cb *); -extern struct device *ax25rtr_get_dev(ax25_address *); -extern int ax25_encapsulate(struct sk_buff *, struct device *, unsigned short, - void *, void *, unsigned int); -extern int ax25_rebuild_header(unsigned char *, struct device *, unsigned long, struct sk_buff *); -extern ax25_uid_assoc *ax25_uid_list; -extern int ax25_uid_policy; -extern ax25_address *ax25_findbyuid(uid_t); -extern void ax25_queue_xmit(struct sk_buff *, struct device *, int); -extern int ax25_dev_is_dama_slave(struct device *); /* dl1bke 951121 */ - -#include <net/ax25call.h> - -/* ax25_in.c */ -extern int ax25_process_rx_frame(ax25_cb *, struct sk_buff *, int, int); - -/* ax25_out.c */ -extern void ax25_output(ax25_cb *, struct sk_buff *); -extern void ax25_kick(ax25_cb *); -extern void ax25_transmit_buffer(ax25_cb *, struct sk_buff *, int); -extern void ax25_nr_error_recovery(ax25_cb *); -extern void ax25_establish_data_link(ax25_cb *); -extern void ax25_transmit_enquiry(ax25_cb *); -extern void ax25_enquiry_response(ax25_cb *); -extern void ax25_timeout_response(ax25_cb *); -extern void ax25_check_iframes_acked(ax25_cb *, unsigned short); -extern void ax25_check_need_response(ax25_cb *, int, int); -extern void dama_enquiry_response(ax25_cb *); /* dl1bke 960114 */ -extern void dama_check_need_response(ax25_cb *, int, int); /* dl1bke 960114 */ -extern void dama_establish_data_link(ax25_cb *); - -/* ax25_route.c */ -extern void ax25_rt_rx_frame(ax25_address *, struct device *, ax25_digi *); -extern int ax25_rt_get_info(char *, char **, off_t, int, int); -extern int ax25_cs_get_info(char *, char **, off_t, int, int); -extern int ax25_rt_autobind(ax25_cb *, ax25_address *); -extern void ax25_rt_build_path(ax25_cb *, ax25_address *); -extern void ax25_dg_build_path(struct sk_buff *, ax25_address *, struct device *); -extern void ax25_rt_device_down(struct device *); -extern int ax25_rt_ioctl(unsigned int, void *); -extern void ax25_ip_mode_set(ax25_address *, struct device *, char); -extern char ax25_ip_mode_get(ax25_address *, struct device *); -extern unsigned short ax25_dev_get_value(struct device *, int); -extern void ax25_dev_device_up(struct device *); -extern void ax25_dev_device_down(struct device *); -extern int ax25_dev_ioctl(unsigned int, void *); -extern int ax25_bpq_get_info(char *, char **, off_t, int, int); -extern ax25_address *ax25_bpq_get_addr(struct device *); -extern int ax25_bpq_ioctl(unsigned int, void *); - -/* ax25_subr.c */ -extern void ax25_clear_queues(ax25_cb *); -extern void ax25_frames_acked(ax25_cb *, unsigned short); -extern void ax25_requeue_frames(ax25_cb *); -extern int ax25_validate_nr(ax25_cb *, unsigned short); -extern int ax25_decode(ax25_cb *, struct sk_buff *, int *, int *, int *); -extern void ax25_send_control(ax25_cb *, int, int, int); -extern unsigned short ax25_calculate_t1(ax25_cb *); -extern void ax25_calculate_rtt(ax25_cb *); -extern unsigned char *ax25_parse_addr(unsigned char *, int, ax25_address *, - ax25_address *, ax25_digi *, int *, int *); /* dl1bke 951121 */ -extern int build_ax25_addr(unsigned char *, ax25_address *, ax25_address *, - ax25_digi *, int, int); -extern int size_ax25_addr(ax25_digi *); -extern void ax25_digi_invert(ax25_digi *, ax25_digi *); -extern void ax25_return_dm(struct device *, ax25_address *, ax25_address *, ax25_digi *); -extern void ax25_dama_on(ax25_cb *); /* dl1bke 951121 */ -extern void ax25_dama_off(ax25_cb *); /* dl1bke 951121 */ - -/* ax25_timer */ -extern void ax25_set_timer(ax25_cb *); -extern void ax25_t1_timeout(ax25_cb *); - -/* ... */ - -extern ax25_cb * volatile ax25_list; - -#endif diff --git a/i386/i386at/gpl/linux/include/net/ax25call.h b/i386/i386at/gpl/linux/include/net/ax25call.h deleted file mode 100644 index 8956965..0000000 --- a/i386/i386at/gpl/linux/include/net/ax25call.h +++ /dev/null @@ -1,2 +0,0 @@ -/* Seperate to keep compilation of protocols.c simpler */ -extern void ax25_proto_init(struct net_proto *pro); diff --git a/i386/i386at/gpl/linux/include/net/checksum.h b/i386/i386at/gpl/linux/include/net/checksum.h deleted file mode 100644 index aee4fd4..0000000 --- a/i386/i386at/gpl/linux/include/net/checksum.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Checksumming functions for IP, TCP, UDP and so on - * - * Authors: Jorge Cwik, <jorge@laser.satlink.net> - * Arnt Gulbrandsen, <agulbra@nvg.unit.no> - * Borrows very liberally from tcp.c and ip.c, see those - * files for more names. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _CHECKSUM_H -#define _CHECKSUM_H - -#include <asm/byteorder.h> -#include <net/ip.h> -#include <asm/checksum.h> - -#endif diff --git a/i386/i386at/gpl/linux/include/net/datalink.h b/i386/i386at/gpl/linux/include/net/datalink.h deleted file mode 100644 index 44e5699..0000000 --- a/i386/i386at/gpl/linux/include/net/datalink.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _NET_INET_DATALINK_H_ -#define _NET_INET_DATALINK_H_ - -struct datalink_proto { - unsigned short type_len; - unsigned char type[8]; - const char *string_name; - unsigned short header_length; - int (*rcvfunc)(struct sk_buff *, struct device *, - struct packet_type *); - void (*datalink_header)(struct datalink_proto *, struct sk_buff *, - unsigned char *); - struct datalink_proto *next; -}; - -#endif diff --git a/i386/i386at/gpl/linux/include/net/icmp.h b/i386/i386at/gpl/linux/include/net/icmp.h deleted file mode 100644 index e4ae821..0000000 --- a/i386/i386at/gpl/linux/include/net/icmp.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions for the ICMP module. - * - * Version: @(#)icmp.h 1.0.4 05/13/93 - * - * Authors: Ross Biro, <bir7@leland.Stanford.Edu> - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _ICMP_H -#define _ICMP_H - -#include <linux/icmp.h> -#include <linux/skbuff.h> - -#include <net/sock.h> -#include <net/protocol.h> - -extern struct icmp_err icmp_err_convert[]; -extern struct icmp_mib icmp_statistics; - -extern void icmp_send(struct sk_buff *skb_in, int type, int code, - unsigned long info, struct device *dev); -extern int icmp_rcv(struct sk_buff *skb1, struct device *dev, - struct options *opt, __u32 daddr, - unsigned short len, __u32 saddr, - int redo, struct inet_protocol *protocol); -extern int icmp_ioctl(struct sock *sk, int cmd, - unsigned long arg); -extern void icmp_init(struct proto_ops *ops); - -#endif /* _ICMP_H */ diff --git a/i386/i386at/gpl/linux/include/net/ip.h b/i386/i386at/gpl/linux/include/net/ip.h deleted file mode 100644 index c7bd998..0000000 --- a/i386/i386at/gpl/linux/include/net/ip.h +++ /dev/null @@ -1,154 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions for the IP module. - * - * Version: @(#)ip.h 1.0.2 05/07/93 - * - * Authors: Ross Biro, <bir7@leland.Stanford.Edu> - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * Alan Cox, <gw4pts@gw4pts.ampr.org> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _IP_H -#define _IP_H - - -#include <linux/config.h> -#include <linux/types.h> -#include <linux/socket.h> -#include <linux/ip.h> -#include <linux/netdevice.h> -#include <net/route.h> - -#ifndef _SNMP_H -#include <net/snmp.h> -#endif - -#include <net/sock.h> /* struct sock */ - -/* IP flags. */ -#define IP_CE 0x8000 /* Flag: "Congestion" */ -#define IP_DF 0x4000 /* Flag: "Don't Fragment" */ -#define IP_MF 0x2000 /* Flag: "More Fragments" */ -#define IP_OFFSET 0x1FFF /* "Fragment Offset" part */ - -#define IP_FRAG_TIME (30 * HZ) /* fragment lifetime */ - -#ifdef CONFIG_IP_MULTICAST -extern void ip_mc_dropsocket(struct sock *); -extern void ip_mc_dropdevice(struct device *dev); -extern int ip_mc_procinfo(char *, char **, off_t, int, int); -#endif - -#include <net/ip_forward.h> - -/* Describe an IP fragment. */ -struct ipfrag -{ - int offset; /* offset of fragment in IP datagram */ - int end; /* last byte of data in datagram */ - int len; /* length of this fragment */ - struct sk_buff *skb; /* complete received fragment */ - unsigned char *ptr; /* pointer into real fragment data */ - struct ipfrag *next; /* linked list pointers */ - struct ipfrag *prev; -}; - -/* - * Describe an entry in the "incomplete datagrams" queue. - */ - -struct ipq -{ - unsigned char *mac; /* pointer to MAC header */ - struct iphdr *iph; /* pointer to IP header */ - int len; /* total length of original datagram */ - short ihlen; /* length of the IP header */ - short maclen; /* length of the MAC header */ - struct timer_list timer; /* when will this queue expire? */ - struct ipfrag *fragments; /* linked list of received fragments */ - struct ipq *next; /* linked list pointers */ - struct ipq *prev; - struct device *dev; /* Device - for icmp replies */ -}; - -/* - * Functions provided by ip.c - */ - -extern void ip_print(const struct iphdr *ip); -extern int ip_ioctl(struct sock *sk, int cmd, unsigned long arg); -extern void ip_route_check(__u32 daddr); -extern int ip_send(struct rtable *rt, struct sk_buff *skb, __u32 daddr, int len, struct device *dev, __u32 saddr); -extern int ip_build_header(struct sk_buff *skb, - __u32 saddr, - __u32 daddr, - struct device **dev, int type, - struct options *opt, int len, - int tos,int ttl,struct rtable **rp); -extern int ip_rcv(struct sk_buff *skb, struct device *dev, - struct packet_type *pt); -extern int ip_options_echo(struct options * dopt, struct options * sopt, - __u32 daddr, __u32 saddr, - struct sk_buff * skb); -extern int ip_options_compile(struct options * opt, struct sk_buff * skb); -extern void ip_send_check(struct iphdr *ip); -extern int ip_id_count; -extern void ip_queue_xmit(struct sock *sk, - struct device *dev, struct sk_buff *skb, - int free); -extern void ip_init(void); -extern int ip_build_xmit(struct sock *sk, - void getfrag (const void *, - __u32, - char *, - unsigned int, - unsigned int), - const void *frag, - unsigned short int length, - __u32 daddr, - __u32 saddr, - struct options * opt, - int flags, - int type, - int noblock); - -extern struct ip_mib ip_statistics; - -/* - * Functions provided by ip_fragment.o - */ - -struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev); -void ip_fragment(struct sock *sk, struct sk_buff *skb, struct device *dev, int is_frag); - -/* - * Functions provided by ip_forward.c - */ - -extern int ip_forward(struct sk_buff *skb, struct device *dev, int is_frag, __u32 target_addr); - -/* - * Functions provided by ip_options.c - */ - -extern void ip_options_build(struct sk_buff *skb, struct options *opt, __u32 daddr, __u32 saddr, int is_frag); -extern int ip_options_echo(struct options *dopt, struct options *sopt, __u32 daddr, __u32 saddr, struct sk_buff *skb); -extern void ip_options_fragment(struct sk_buff *skb); -extern int ip_options_compile(struct options *opt, struct sk_buff *skb); - -/* - * Functions provided by ip_sockglue.c - */ - -extern int ip_setsockopt(struct sock *sk, int level, int optname, char *optval, int optlen); -extern int ip_getsockopt(struct sock *sk, int level, int optname, char *optval, int *optlen); - -#endif /* _IP_H */ diff --git a/i386/i386at/gpl/linux/include/net/ip_alias.h b/i386/i386at/gpl/linux/include/net/ip_alias.h deleted file mode 100644 index 683a042..0000000 --- a/i386/i386at/gpl/linux/include/net/ip_alias.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * IP_ALIAS (AF_INET) aliasing definitions. - * - * - * Version: @(#)ip_alias.h 0.43 12/20/95 - * - * Author: Juan Jose Ciarlante, <jjciarla@raiz.uncu.edu.ar> - * - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - */ - -#ifndef _IP_ALIAS_H -#define _IP_ALIAS_H - -extern int ip_alias_init(void); -extern int ip_alias_done(void); - -#endif /* _IP_ALIAS_H */ diff --git a/i386/i386at/gpl/linux/include/net/ip_forward.h b/i386/i386at/gpl/linux/include/net/ip_forward.h deleted file mode 100644 index b859650..0000000 --- a/i386/i386at/gpl/linux/include/net/ip_forward.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __NET_IP_FORWARD_H -#define __NET_IP_FORWARD_H - -#define IPFWD_FRAGMENT 1 -#define IPFWD_LASTFRAG 2 -#define IPFWD_MASQUERADED 4 -#define IPFWD_MULTICASTING 8 -#define IPFWD_MULTITUNNEL 16 - -#endif diff --git a/i386/i386at/gpl/linux/include/net/ipip.h b/i386/i386at/gpl/linux/include/net/ipip.h deleted file mode 100644 index bba1492..0000000 --- a/i386/i386at/gpl/linux/include/net/ipip.h +++ /dev/null @@ -1,4 +0,0 @@ -extern int ipip_rcv(struct sk_buff *skb, struct device *dev, struct options *opt, - __u32 daddr, unsigned short len, __u32 saddr, - int redo, struct inet_protocol *protocol); - diff --git a/i386/i386at/gpl/linux/include/net/ipx.h b/i386/i386at/gpl/linux/include/net/ipx.h deleted file mode 100644 index 96c6240..0000000 --- a/i386/i386at/gpl/linux/include/net/ipx.h +++ /dev/null @@ -1,85 +0,0 @@ - -/* - * The following information is in its entirety obtained from: - * - * Novell 'IPX Router Specification' Version 1.10 - * Part No. 107-000029-001 - * - * Which is available from ftp.novell.com - */ - -#ifndef _NET_INET_IPX_H_ -#define _NET_INET_IPX_H_ - -#include <linux/skbuff.h> -#include <net/datalink.h> -#include <linux/ipx.h> - -typedef struct -{ - unsigned long net; - unsigned char node[IPX_NODE_LEN]; - unsigned short sock; -} ipx_address; - -#define ipx_broadcast_node "\377\377\377\377\377\377" -#define ipx_this_node "\0\0\0\0\0\0" - -typedef struct ipx_packet -{ - unsigned short ipx_checksum; -#define IPX_NO_CHECKSUM 0xFFFF - unsigned short ipx_pktsize; - unsigned char ipx_tctrl; - unsigned char ipx_type; -#define IPX_TYPE_UNKNOWN 0x00 -#define IPX_TYPE_RIP 0x01 /* may also be 0 */ -#define IPX_TYPE_SAP 0x04 /* may also be 0 */ -#define IPX_TYPE_SPX 0x05 /* Not yet implemented */ -#define IPX_TYPE_NCP 0x11 /* $lots for docs on this (SPIT) */ -#define IPX_TYPE_PPROP 0x14 /* complicated flood fill brdcast [Not supported] */ - ipx_address ipx_dest __attribute__ ((packed)); - ipx_address ipx_source __attribute__ ((packed)); -} ipx_packet; - - -typedef struct sock ipx_socket; - -#include <net/ipxcall.h> -extern int ipx_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt); -extern void ipxrtr_device_down(struct device *dev); - -typedef struct ipx_interface { - /* IPX address */ - unsigned long if_netnum; - unsigned char if_node[IPX_NODE_LEN]; - - /* physical device info */ - struct device *if_dev; - struct datalink_proto *if_dlink; - unsigned short if_dlink_type; - - /* socket support */ - unsigned short if_sknum; - ipx_socket *if_sklist; - - /* administrative overhead */ - int if_ipx_offset; - unsigned char if_internal; - unsigned char if_primary; - - struct ipx_interface *if_next; -} ipx_interface; - -typedef struct ipx_route { - unsigned long ir_net; - ipx_interface *ir_intrfc; - unsigned char ir_routed; - unsigned char ir_router_node[IPX_NODE_LEN]; - struct ipx_route *ir_next; -} ipx_route; - -#define IPX_MIN_EPHEMERAL_SOCKET 0x4000 -#define IPX_MAX_EPHEMERAL_SOCKET 0x7fff - -#endif diff --git a/i386/i386at/gpl/linux/include/net/ipxcall.h b/i386/i386at/gpl/linux/include/net/ipxcall.h deleted file mode 100644 index eb5bd2b..0000000 --- a/i386/i386at/gpl/linux/include/net/ipxcall.h +++ /dev/null @@ -1,2 +0,0 @@ -/* Separate to keep compilation of protocols.c simpler */ -extern void ipx_proto_init(struct net_proto *pro); diff --git a/i386/i386at/gpl/linux/include/net/netlink.h b/i386/i386at/gpl/linux/include/net/netlink.h deleted file mode 100644 index e32af15..0000000 --- a/i386/i386at/gpl/linux/include/net/netlink.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __NET_NETLINK_H -#define __NET_NETLINK_H - -#define NET_MAJOR 36 /* Major 18 is reserved for networking */ -#define MAX_LINKS 4 /* 18,0 for route updates, 18,1 for SKIP, 18,2 debug tap 18,3 PPP reserved */ -#define MAX_QBYTES 32768 /* Maximum bytes in the queue */ - -#include <linux/config.h> - -extern int netlink_attach(int unit, int (*function)(struct sk_buff *skb)); -extern int netlink_donothing(struct sk_buff *skb); -extern void netlink_detach(int unit); -extern int netlink_post(int unit, struct sk_buff *skb); -extern int init_netlink(void); - -#define NETLINK_ROUTE 0 /* Routing/device hook */ -#define NETLINK_SKIP 1 /* Reserved for ENskip */ -#define NETLINK_USERSOCK 2 /* Reserved for user mode socket protocols */ -#define NETLINK_FIREWALL 3 /* Firewalling hook */ - -#ifdef CONFIG_RTNETLINK -extern void ip_netlink_msg(unsigned long, __u32, __u32, __u32, short, short, char *); -#else -#define ip_netlink_msg(a,b,c,d,e,f,g) -#endif -#endif diff --git a/i386/i386at/gpl/linux/include/net/netrom.h b/i386/i386at/gpl/linux/include/net/netrom.h deleted file mode 100644 index 5e343bb..0000000 --- a/i386/i386at/gpl/linux/include/net/netrom.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Declarations of NET/ROM type objects. - * - * Jonathan Naylor G4KLX 9/4/95 - */ - -#ifndef _NETROM_H -#define _NETROM_H -#include <linux/netrom.h> - -#define NR_T1CLAMPLO (1 * PR_SLOWHZ) /* If defined, clamp at 1 second **/ -#define NR_T1CLAMPHI (300 * PR_SLOWHZ) /* If defined, clamp at 30 seconds **/ - -#define NR_NETWORK_LEN 15 -#define NR_TRANSPORT_LEN 5 - -#define NR_PROTO_IP 0x0C - -#define NR_PROTOEXT 0x00 -#define NR_CONNREQ 0x01 -#define NR_CONNACK 0x02 -#define NR_DISCREQ 0x03 -#define NR_DISCACK 0x04 -#define NR_INFO 0x05 -#define NR_INFOACK 0x06 - -#define NR_CHOKE_FLAG 0x80 -#define NR_NAK_FLAG 0x40 -#define NR_MORE_FLAG 0x20 - -/* Define Link State constants. */ - -#define NR_STATE_0 0 -#define NR_STATE_1 1 -#define NR_STATE_2 2 -#define NR_STATE_3 3 - -#define NR_DEFAULT_T1 (120 * PR_SLOWHZ) /* Outstanding frames - 120 seconds */ -#define NR_DEFAULT_T2 (5 * PR_SLOWHZ) /* Response delay - 5 seconds */ -#define NR_DEFAULT_N2 3 /* Number of Retries */ -#define NR_DEFAULT_T4 (180 * PR_SLOWHZ) /* Transport Busy Delay */ -#define NR_DEFAULT_WINDOW 4 /* Default Window Size */ -#define NR_DEFAULT_OBS 6 /* Default Obscolesence Count */ -#define NR_DEFAULT_QUAL 10 /* Default Neighbour Quality */ -#define NR_DEFAULT_TTL 16 /* Default Time To Live */ -#define NR_MODULUS 256 -#define NR_MAX_WINDOW_SIZE 127 /* Maximum Window Allowable */ - -typedef struct { - ax25_address user_addr, source_addr, dest_addr; - struct device *device; - unsigned char my_index, my_id; - unsigned char your_index, your_id; - unsigned char state, condition, bpqext, hdrincl; - unsigned short vs, vr, va, vl; - unsigned char n2, n2count; - unsigned short t1, t2, rtt; - unsigned short t1timer, t2timer, t4timer; - unsigned short fraglen; - struct sk_buff_head ack_queue; - struct sk_buff_head reseq_queue; - struct sk_buff_head frag_queue; - struct sock *sk; /* Backlink to socket */ -} nr_cb; - -struct nr_route { - unsigned char quality; - unsigned char obs_count; - unsigned short neighbour; -}; - -struct nr_node { - struct nr_node *next; - ax25_address callsign; - char mnemonic[7]; - unsigned char which; - unsigned char count; - struct nr_route routes[3]; -}; - -struct nr_neigh { - struct nr_neigh *next; - ax25_address callsign; - ax25_digi *digipeat; - struct device *dev; - unsigned char quality; - unsigned char locked; - unsigned short count; - unsigned short number; -}; - -/* af_netrom.c */ -extern struct nr_parms_struct nr_default; -extern int nr_rx_frame(struct sk_buff *, struct device *); -extern void nr_destroy_socket(struct sock *); - -/* nr_dev.c */ -extern int nr_rx_ip(struct sk_buff *, struct device *); -extern int nr_init(struct device *); - -#include <net/nrcall.h> - -/* nr_in.c */ -extern int nr_process_rx_frame(struct sock *, struct sk_buff *); - -/* nr_out.c */ -extern void nr_output(struct sock *, struct sk_buff *); -extern void nr_send_nak_frame(struct sock *); -extern void nr_kick(struct sock *); -extern void nr_transmit_buffer(struct sock *, struct sk_buff *); -extern void nr_establish_data_link(struct sock *); -extern void nr_enquiry_response(struct sock *); -extern void nr_check_iframes_acked(struct sock *, unsigned short); - -/* nr_route.c */ -extern void nr_rt_device_down(struct device *); -extern struct device *nr_dev_first(void); -extern struct device *nr_dev_get(ax25_address *); -extern int nr_rt_ioctl(unsigned int, void *); -extern void nr_link_failed(ax25_address *, struct device *); -extern int nr_route_frame(struct sk_buff *, ax25_cb *); -extern int nr_nodes_get_info(char *, char **, off_t, int, int); -extern int nr_neigh_get_info(char *, char **, off_t, int, int); - -/* nr_subr.c */ -extern void nr_clear_queues(struct sock *); -extern void nr_frames_acked(struct sock *, unsigned short); -extern void nr_requeue_frames(struct sock *); -extern int nr_validate_nr(struct sock *, unsigned short); -extern int nr_in_rx_window(struct sock *, unsigned short); -extern void nr_write_internal(struct sock *, int); -extern void nr_transmit_dm(struct sk_buff *); -extern unsigned short nr_calculate_t1(struct sock *); -extern void nr_calculate_rtt(struct sock *); - -/* ax25_timer */ -extern void nr_set_timer(struct sock *); - -#endif diff --git a/i386/i386at/gpl/linux/include/net/nrcall.h b/i386/i386at/gpl/linux/include/net/nrcall.h deleted file mode 100644 index f58c2d4..0000000 --- a/i386/i386at/gpl/linux/include/net/nrcall.h +++ /dev/null @@ -1,2 +0,0 @@ -/* Seperate to keep compilation of protocols.c simpler */ -extern void nr_proto_init(struct net_proto *pro); diff --git a/i386/i386at/gpl/linux/include/net/p8022.h b/i386/i386at/gpl/linux/include/net/p8022.h deleted file mode 100644 index 52c676b..0000000 --- a/i386/i386at/gpl/linux/include/net/p8022.h +++ /dev/null @@ -1,2 +0,0 @@ -struct datalink_proto *register_8022_client(unsigned char type, int (*rcvfunc)(struct sk_buff *, struct device *, struct packet_type *)); - diff --git a/i386/i386at/gpl/linux/include/net/p8022call.h b/i386/i386at/gpl/linux/include/net/p8022call.h deleted file mode 100644 index 14f0c2c..0000000 --- a/i386/i386at/gpl/linux/include/net/p8022call.h +++ /dev/null @@ -1,2 +0,0 @@ -/* Separate to keep compilation of Space.c simpler */ -extern void p8022_proto_init(struct net_proto *); diff --git a/i386/i386at/gpl/linux/include/net/protocol.h b/i386/i386at/gpl/linux/include/net/protocol.h deleted file mode 100644 index ae328b6..0000000 --- a/i386/i386at/gpl/linux/include/net/protocol.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions for the protocol dispatcher. - * - * Version: @(#)protocol.h 1.0.2 05/07/93 - * - * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * Changes: - * Alan Cox : Added a name field and a frag handler - * field for later. - * Alan Cox : Cleaned up, and sorted types. - */ - -#ifndef _PROTOCOL_H -#define _PROTOCOL_H - -#define MAX_INET_PROTOS 32 /* Must be a power of 2 */ - - -/* This is used to register protocols. */ -struct inet_protocol { - int (*handler)(struct sk_buff *skb, struct device *dev, - struct options *opt, __u32 daddr, - unsigned short len, __u32 saddr, - int redo, struct inet_protocol *protocol); - void (*err_handler)(int type, int code, unsigned char *buff, - __u32 daddr, - __u32 saddr, - struct inet_protocol *protocol); - struct inet_protocol *next; - unsigned char protocol; - unsigned char copy:1; - void *data; - const char *name; -}; - - -extern struct inet_protocol *inet_protocol_base; -extern struct inet_protocol *inet_protos[MAX_INET_PROTOS]; - - -extern void inet_add_protocol(struct inet_protocol *prot); -extern int inet_del_protocol(struct inet_protocol *prot); - - -#endif /* _PROTOCOL_H */ diff --git a/i386/i386at/gpl/linux/include/net/psnap.h b/i386/i386at/gpl/linux/include/net/psnap.h deleted file mode 100644 index b69859d..0000000 --- a/i386/i386at/gpl/linux/include/net/psnap.h +++ /dev/null @@ -1,2 +0,0 @@ -struct datalink_proto *register_snap_client(unsigned char *desc, int (*rcvfunc)(struct sk_buff *, struct device *, struct packet_type *)); - diff --git a/i386/i386at/gpl/linux/include/net/psnapcall.h b/i386/i386at/gpl/linux/include/net/psnapcall.h deleted file mode 100644 index 9da5763..0000000 --- a/i386/i386at/gpl/linux/include/net/psnapcall.h +++ /dev/null @@ -1,2 +0,0 @@ -/* Separate to keep compilation of Space.c simpler */ -extern void snap_proto_init(struct net_proto *); diff --git a/i386/i386at/gpl/linux/include/net/rarp.h b/i386/i386at/gpl/linux/include/net/rarp.h deleted file mode 100644 index 7bfb08e..0000000 --- a/i386/i386at/gpl/linux/include/net/rarp.h +++ /dev/null @@ -1,12 +0,0 @@ -/* linux/net/inet/rarp.h */ -#ifndef _RARP_H -#define _RARP_H - -extern int rarp_ioctl(unsigned int cmd, void *arg); -extern int rarp_get_info(char *buffer, - char **start, - off_t offset, - int length, - int dummy); -#endif /* _RARP_H */ - diff --git a/i386/i386at/gpl/linux/include/net/raw.h b/i386/i386at/gpl/linux/include/net/raw.h deleted file mode 100644 index 4b42487..0000000 --- a/i386/i386at/gpl/linux/include/net/raw.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions for the RAW-IP module. - * - * Version: @(#)raw.h 1.0.2 05/07/93 - * - * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _RAW_H -#define _RAW_H - - -extern struct proto raw_prot; - - -extern void raw_err(int type, int code, unsigned char *header, __u32 daddr, - __u32 saddr, struct inet_protocol *protocol); -extern int raw_recvfrom(struct sock *sk, unsigned char *to, - int len, int noblock, unsigned flags, - struct sockaddr_in *sin, int *addr_len); -extern int raw_read(struct sock *sk, unsigned char *buff, - int len, int noblock, unsigned flags); -extern int raw_rcv(struct sock *, struct sk_buff *, struct device *, - __u32, __u32); - -#endif /* _RAW_H */ diff --git a/i386/i386at/gpl/linux/include/net/route.h b/i386/i386at/gpl/linux/include/net/route.h deleted file mode 100644 index 8ce6738..0000000 --- a/i386/i386at/gpl/linux/include/net/route.h +++ /dev/null @@ -1,280 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions for the IP router. - * - * Version: @(#)route.h 1.0.4 05/27/93 - * - * Authors: Ross Biro, <bir7@leland.Stanford.Edu> - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * Fixes: - * Alan Cox : Reformatted. Added ip_rt_local() - * Alan Cox : Support for TCP parameters. - * Alexey Kuznetsov: Major changes for new routing code. - * - * FIXME: - * Modules stuff is broken at the moment. - * Make atomic ops more generic and hide them in asm/... - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _ROUTE_H -#define _ROUTE_H - -#include <linux/config.h> - -/* - * 0 - no debugging messages - * 1 - rare events and bugs situations (default) - * 2 - trace mode. - */ -#define RT_CACHE_DEBUG 1 - -#define RT_HASH_DIVISOR 256 -#define RT_CACHE_SIZE_MAX 256 - -#define RTZ_HASH_DIVISOR 256 - -#if RT_CACHE_DEBUG >= 2 -#define RTZ_HASHING_LIMIT 0 -#else -#define RTZ_HASHING_LIMIT 16 -#endif - -/* - * Maximal time to live for unused entry. - */ -#define RT_CACHE_TIMEOUT (HZ*300) - -/* - * Prevents LRU trashing, entries considered equivalent, - * if the difference between last use times is less then this number. - */ -#define RT_CACHE_BUBBLE_THRESHOULD (HZ*5) - -#include <linux/route.h> - -#ifdef __KERNEL__ -#define RTF_LOCAL 0x8000 -#endif - -/* - * Semaphores. - */ -#if defined(__alpha__) - -static __inline__ void ATOMIC_INCR(unsigned int * addr) -{ - unsigned tmp; - - __asm__ __volatile__( - "1:\n\ - ldl_l %1,%2\n\ - addl %1,1,%1\n\ - stl_c %1,%0\n\ - beq %1,1b\n" - : "m=" (*addr), "r=&" (tmp) - : "m"(*addr)); -} - -static __inline__ void ATOMIC_DECR(unsigned int * addr) -{ - unsigned tmp; - - __asm__ __volatile__( - "1:\n\ - ldl_l %1,%2\n\ - subl %1,1,%1\n\ - stl_c %1,%0\n\ - beq %1,1b\n" - : "m=" (*addr), "r=&" (tmp) - : "m"(*addr)); -} - -static __inline__ int ATOMIC_DECR_AND_CHECK (unsigned int * addr) -{ - unsigned tmp; - int result; - - __asm__ __volatile__( - "1:\n\ - ldl_l %1,%3\n\ - subl %1,1,%1\n\ - mov %1,%2\n\ - stl_c %1,%0\n\ - beq %1,1b\n" - : "m=" (*addr), "r=&" (tmp), "r=&"(result) - : "m"(*addr)); - return result; -} - -#elif defined(__i386__) -#include <asm/bitops.h> - -extern __inline__ void ATOMIC_INCR(void * addr) -{ - __asm__ __volatile__( - "incl %0" - :"=m" (ADDR)); -} - -extern __inline__ void ATOMIC_DECR(void * addr) -{ - __asm__ __volatile__( - "decl %0" - :"=m" (ADDR)); -} - -/* - * It is DECR that is ATOMIC, not CHECK! - * If you want to do atomic checks, use cli()/sti(). --ANK - */ - -extern __inline__ unsigned long ATOMIC_DECR_AND_CHECK(void * addr) -{ - unsigned long retval; - __asm__ __volatile__( - "decl %0\nmovl %0,%1" - : "=m" (ADDR), "=r"(retval)); - return retval; -} - - -#else - -static __inline__ void ATOMIC_INCR(unsigned int * addr) -{ - (*(__volatile__ unsigned int*)addr)++; -} - -static __inline__ void ATOMIC_DECR(unsigned int * addr) -{ - (*(__volatile__ unsigned int*)addr)--; -} - -static __inline__ int ATOMIC_DECR_AND_CHECK (unsigned int * addr) -{ - ATOMIC_DECR(addr); - return *(volatile unsigned int*)addr; -} - -#endif - - - -struct rtable -{ - struct rtable *rt_next; - __u32 rt_dst; - __u32 rt_src; - __u32 rt_gateway; - unsigned rt_refcnt; - unsigned rt_use; - unsigned long rt_window; - unsigned long rt_lastuse; - struct hh_cache *rt_hh; - struct device *rt_dev; - unsigned short rt_flags; - unsigned short rt_mtu; - unsigned short rt_irtt; - unsigned char rt_tos; -}; - -extern void ip_rt_flush(struct device *dev); -extern void ip_rt_redirect(__u32 src, __u32 dst, __u32 gw, struct device *dev); -extern struct rtable *ip_rt_slow_route(__u32 daddr, int local); -extern int rt_get_info(char * buffer, char **start, off_t offset, int length, int dummy); -extern int rt_cache_get_info(char *buffer, char **start, off_t offset, int length, int dummy); -extern int ip_rt_ioctl(unsigned int cmd, void *arg); -extern int ip_rt_new(struct rtentry *rt); -extern void ip_rt_check_expire(void); -extern void ip_rt_advice(struct rtable **rp, int advice); - -extern void ip_rt_run_bh(void); -extern int ip_rt_lock; -extern unsigned ip_rt_bh_mask; -extern struct rtable *ip_rt_hash_table[RT_HASH_DIVISOR]; - -extern __inline__ void ip_rt_fast_lock(void) -{ - ATOMIC_INCR(&ip_rt_lock); -} - -extern __inline__ void ip_rt_fast_unlock(void) -{ - ATOMIC_DECR(&ip_rt_lock); -} - -extern __inline__ void ip_rt_unlock(void) -{ - if (!ATOMIC_DECR_AND_CHECK(&ip_rt_lock) && ip_rt_bh_mask) - ip_rt_run_bh(); -} - -extern __inline__ unsigned ip_rt_hash_code(__u32 addr) -{ - unsigned tmp = addr + (addr>>16); - return (tmp + (tmp>>8)) & 0xFF; -} - - -extern __inline__ void ip_rt_put(struct rtable * rt) -#ifndef MODULE -{ - if (rt) - ATOMIC_DECR(&rt->rt_refcnt); -} -#else -; -#endif - -#ifdef CONFIG_KERNELD -extern struct rtable * ip_rt_route(__u32 daddr, int local); -#else -extern __inline__ struct rtable * ip_rt_route(__u32 daddr, int local) -#ifndef MODULE -{ - struct rtable * rth; - - ip_rt_fast_lock(); - - for (rth=ip_rt_hash_table[ip_rt_hash_code(daddr)^local]; rth; rth=rth->rt_next) - { - if (rth->rt_dst == daddr) - { - rth->rt_lastuse = jiffies; - ATOMIC_INCR(&rth->rt_use); - ATOMIC_INCR(&rth->rt_refcnt); - ip_rt_unlock(); - return rth; - } - } - return ip_rt_slow_route (daddr, local); -} -#else -; -#endif -#endif - -extern __inline__ struct rtable * ip_check_route(struct rtable ** rp, - __u32 daddr, int local) -{ - struct rtable * rt = *rp; - - if (!rt || rt->rt_dst != daddr || !(rt->rt_flags&RTF_UP) - || ((local==1)^((rt->rt_flags&RTF_LOCAL) != 0))) - { - ip_rt_put(rt); - rt = ip_rt_route(daddr, local); - *rp = rt; - } - return rt; -} - - -#endif /* _ROUTE_H */ diff --git a/i386/i386at/gpl/linux/include/net/slhc.h b/i386/i386at/gpl/linux/include/net/slhc.h deleted file mode 100644 index c7b39db..0000000 --- a/i386/i386at/gpl/linux/include/net/slhc.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __NET_SLHC_H -#define __NET_SLHC_H - -extern void slhc_install(void); - -#endif diff --git a/i386/i386at/gpl/linux/include/net/snmp.h b/i386/i386at/gpl/linux/include/net/snmp.h deleted file mode 100644 index 552292b..0000000 --- a/i386/i386at/gpl/linux/include/net/snmp.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * - * SNMP MIB entries for the IP subsystem. - * - * Alan Cox <gw4pts@gw4pts.ampr.org> - * - * We don't chose to implement SNMP in the kernel (this would - * be silly as SNMP is a pain in the backside in places). We do - * however need to collect the MIB statistics and export them - * out of /proc (eventually) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - */ - -#ifndef _SNMP_H -#define _SNMP_H - -/* - * We use all unsigned longs. Linux will soon be so reliable that even these - * will rapidly get too small 8-). Seriously consider the IpInReceives count - * on the 20Gb/s + networks people expect in a few years time! - */ - -struct ip_mib -{ - unsigned long IpForwarding; - unsigned long IpDefaultTTL; - unsigned long IpInReceives; - unsigned long IpInHdrErrors; - unsigned long IpInAddrErrors; - unsigned long IpForwDatagrams; - unsigned long IpInUnknownProtos; - unsigned long IpInDiscards; - unsigned long IpInDelivers; - unsigned long IpOutRequests; - unsigned long IpOutDiscards; - unsigned long IpOutNoRoutes; - unsigned long IpReasmTimeout; - unsigned long IpReasmReqds; - unsigned long IpReasmOKs; - unsigned long IpReasmFails; - unsigned long IpFragOKs; - unsigned long IpFragFails; - unsigned long IpFragCreates; -}; - - -struct icmp_mib -{ - unsigned long IcmpInMsgs; - unsigned long IcmpInErrors; - unsigned long IcmpInDestUnreachs; - unsigned long IcmpInTimeExcds; - unsigned long IcmpInParmProbs; - unsigned long IcmpInSrcQuenchs; - unsigned long IcmpInRedirects; - unsigned long IcmpInEchos; - unsigned long IcmpInEchoReps; - unsigned long IcmpInTimestamps; - unsigned long IcmpInTimestampReps; - unsigned long IcmpInAddrMasks; - unsigned long IcmpInAddrMaskReps; - unsigned long IcmpOutMsgs; - unsigned long IcmpOutErrors; - unsigned long IcmpOutDestUnreachs; - unsigned long IcmpOutTimeExcds; - unsigned long IcmpOutParmProbs; - unsigned long IcmpOutSrcQuenchs; - unsigned long IcmpOutRedirects; - unsigned long IcmpOutEchos; - unsigned long IcmpOutEchoReps; - unsigned long IcmpOutTimestamps; - unsigned long IcmpOutTimestampReps; - unsigned long IcmpOutAddrMasks; - unsigned long IcmpOutAddrMaskReps; -}; - -struct tcp_mib -{ - unsigned long TcpRtoAlgorithm; - unsigned long TcpRtoMin; - unsigned long TcpRtoMax; - unsigned long TcpMaxConn; - unsigned long TcpActiveOpens; - unsigned long TcpPassiveOpens; - unsigned long TcpAttemptFails; - unsigned long TcpEstabResets; - unsigned long TcpCurrEstab; - unsigned long TcpInSegs; - unsigned long TcpOutSegs; - unsigned long TcpRetransSegs; -}; - -struct udp_mib -{ - unsigned long UdpInDatagrams; - unsigned long UdpNoPorts; - unsigned long UdpInErrors; - unsigned long UdpOutDatagrams; -}; - - -#endif diff --git a/i386/i386at/gpl/linux/include/net/sock.h b/i386/i386at/gpl/linux/include/net/sock.h deleted file mode 100644 index dc7a4a9..0000000 --- a/i386/i386at/gpl/linux/include/net/sock.h +++ /dev/null @@ -1,486 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions for the AF_INET socket handler. - * - * Version: @(#)sock.h 1.0.4 05/13/93 - * - * Authors: Ross Biro, <bir7@leland.Stanford.Edu> - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * Corey Minyard <wf-rch!minyard@relay.EU.net> - * Florian La Roche <flla@stud.uni-sb.de> - * - * Fixes: - * Alan Cox : Volatiles in skbuff pointers. See - * skbuff comments. May be overdone, - * better to prove they can be removed - * than the reverse. - * Alan Cox : Added a zapped field for tcp to note - * a socket is reset and must stay shut up - * Alan Cox : New fields for options - * Pauline Middelink : identd support - * Alan Cox : Eliminate low level recv/recvfrom - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _SOCK_H -#define _SOCK_H - -#include <linux/timer.h> -#include <linux/ip.h> /* struct options */ -#include <linux/in.h> /* struct sockaddr_in */ -#include <linux/tcp.h> /* struct tcphdr */ -#include <linux/config.h> - -#include <linux/netdevice.h> -#include <linux/skbuff.h> /* struct sk_buff */ -#include <net/protocol.h> /* struct inet_protocol */ -#ifdef CONFIG_AX25 -#include <net/ax25.h> -#ifdef CONFIG_NETROM -#include <net/netrom.h> -#endif -#endif -#ifdef CONFIG_IPX -#include <net/ipx.h> -#endif -#ifdef CONFIG_ATALK -#include <linux/atalk.h> -#endif - -#include <linux/igmp.h> - -/* Think big (also on some systems a byte is faster) */ -#define SOCK_ARRAY_SIZE 256 - - -/* - * The AF_UNIX specific socket options - */ - -struct unix_opt -{ - int family; - char * name; - int locks; - struct inode * inode; - struct semaphore readsem; - struct sock * other; -}; - -/* - * IP packet socket options - */ - -struct inet_packet_opt -{ - struct notifier_block notifier; /* Used when bound */ - struct device *bound_dev; - unsigned long dev_stamp; - struct packet_type *prot_hook; - char device_name[15]; -}; - - -/* - * This structure really needs to be cleaned up. - * Most of it is for TCP, and not used by any of - * the other protocols. - */ -struct sock -{ - struct options *opt; - volatile unsigned long wmem_alloc; - volatile unsigned long rmem_alloc; - unsigned long allocation; /* Allocation mode */ - __u32 write_seq; - __u32 sent_seq; - __u32 acked_seq; - __u32 copied_seq; - __u32 rcv_ack_seq; - __u32 window_seq; - __u32 fin_seq; - __u32 urg_seq; - __u32 urg_data; - int users; /* user count */ - /* - * Not all are volatile, but some are, so we - * might as well say they all are. - */ - volatile char dead, - urginline, - intr, - blog, - done, - reuse, - keepopen, - linger, - delay_acks, - destroy, - ack_timed, - no_check, - zapped, /* In ax25 & ipx means not linked */ - broadcast, - nonagle, - bsdism; - unsigned long lingertime; - int proc; - struct sock *next; - struct sock *prev; /* Doubly linked chain.. */ - struct sock *pair; - struct sk_buff * volatile send_head; - struct sk_buff * volatile send_tail; - struct sk_buff_head back_log; - struct sk_buff *partial; - struct timer_list partial_timer; - long retransmits; - struct sk_buff_head write_queue, - receive_queue; - struct proto *prot; - struct wait_queue **sleep; - __u32 daddr; - __u32 saddr; /* Sending source */ - __u32 rcv_saddr; /* Bound address */ - unsigned short max_unacked; - unsigned short window; - __u32 lastwin_seq; /* sequence number when we last updated the window we offer */ - volatile unsigned long ato; /* ack timeout */ - volatile unsigned long lrcvtime; /* jiffies at last rcv */ - unsigned short bytes_rcv; -/* - * mss is min(mtu, max_window) - */ - unsigned short mtu; /* mss negotiated in the syn's */ - volatile unsigned short mss; /* current eff. mss - can change */ - volatile unsigned short user_mss; /* mss requested by user in ioctl */ - volatile unsigned short max_window; - unsigned long window_clamp; - unsigned short num; - volatile unsigned short cong_window; - volatile unsigned short cong_count; - volatile unsigned short ssthresh; - volatile unsigned short packets_out; - volatile unsigned short shutdown; - volatile unsigned long rtt; - volatile unsigned long mdev; - volatile unsigned long rto; - -/* - * currently backoff isn't used, but I'm maintaining it in case - * we want to go back to a backoff formula that needs it - */ - - volatile unsigned short backoff; - volatile int err, err_soft; /* Soft holds errors that don't - cause failure but are the cause - of a persistent failure not just - 'timed out' */ - unsigned char protocol; - volatile unsigned char state; - volatile unsigned char ack_backlog; - unsigned char max_ack_backlog; - unsigned char priority; - unsigned char debug; - unsigned short rcvbuf; - unsigned short sndbuf; - unsigned short type; - unsigned char localroute; /* Route locally only */ -#ifdef CONFIG_IPX -/* - * Once the IPX ncpd patches are in these are going into protinfo - */ - ipx_address ipx_dest_addr; - ipx_interface *ipx_intrfc; - unsigned short ipx_port; - -/* To handle asynchronous messages from the NetWare server, we have to - * know the connection this socket belongs to. Sorry to blow up this - * structure even more. */ - struct ncp_server *ipx_ncp_server; - -#ifdef CONFIG_IPX_INTERN - unsigned char ipx_node[IPX_NODE_LEN]; -#endif - unsigned short ipx_type; -#endif -#ifdef CONFIG_AX25 - ax25_cb *ax25; -#ifdef CONFIG_NETROM - nr_cb *nr; -#endif -#endif - -/* - * This is where all the private (optional) areas that don't - * overlap will eventually live. - */ - - union - { - struct unix_opt af_unix; -#ifdef CONFIG_ATALK - struct atalk_sock af_at; -#endif -#ifdef CONFIG_INET - struct inet_packet_opt af_packet; -#endif - } protinfo; - -/* - * IP 'private area' or will be eventually - */ - int ip_ttl; /* TTL setting */ - int ip_tos; /* TOS */ - struct tcphdr dummy_th; - struct timer_list keepalive_timer; /* TCP keepalive hack */ - struct timer_list retransmit_timer; /* TCP retransmit timer */ - struct timer_list ack_timer; /* TCP delayed ack timer */ - int ip_xmit_timeout; /* Why the timeout is running */ - struct rtable *ip_route_cache; /* Cached output route */ - unsigned char ip_hdrincl; /* Include headers ? */ -#ifdef CONFIG_IP_MULTICAST - int ip_mc_ttl; /* Multicasting TTL */ - int ip_mc_loop; /* Loopback */ - char ip_mc_name[MAX_ADDR_LEN];/* Multicast device name */ - struct ip_mc_socklist *ip_mc_list; /* Group array */ -#endif - -/* - * This part is used for the timeout functions (timer.c). - */ - - int timeout; /* What are we waiting for? */ - struct timer_list timer; /* This is the TIME_WAIT/receive timer - * when we are doing IP - */ - struct timeval stamp; - - /* - * Identd - */ - - struct socket *socket; - - /* - * Callbacks - */ - - void (*state_change)(struct sock *sk); - void (*data_ready)(struct sock *sk,int bytes); - void (*write_space)(struct sock *sk); - void (*error_report)(struct sock *sk); - -}; - -/* - * IP protocol blocks we attach to sockets. - */ - -struct proto -{ - void (*close)(struct sock *sk, unsigned long timeout); - int (*build_header)(struct sk_buff *skb, - __u32 saddr, - __u32 daddr, - struct device **dev, int type, - struct options *opt, int len, - int tos, int ttl, struct rtable ** rp); - int (*connect)(struct sock *sk, - struct sockaddr_in *usin, int addr_len); - struct sock * (*accept) (struct sock *sk, int flags); - void (*queue_xmit)(struct sock *sk, - struct device *dev, struct sk_buff *skb, - int free); - void (*retransmit)(struct sock *sk, int all); - void (*write_wakeup)(struct sock *sk); - void (*read_wakeup)(struct sock *sk); - int (*rcv)(struct sk_buff *buff, struct device *dev, - struct options *opt, __u32 daddr, - unsigned short len, __u32 saddr, - int redo, struct inet_protocol *protocol); - int (*select)(struct sock *sk, int which, - select_table *wait); - int (*ioctl)(struct sock *sk, int cmd, - unsigned long arg); - int (*init)(struct sock *sk); - void (*shutdown)(struct sock *sk, int how); - int (*setsockopt)(struct sock *sk, int level, int optname, - char *optval, int optlen); - int (*getsockopt)(struct sock *sk, int level, int optname, - char *optval, int *option); - int (*sendmsg)(struct sock *sk, struct msghdr *msg, int len, - int noblock, int flags); - int (*recvmsg)(struct sock *sk, struct msghdr *msg, int len, - int noblock, int flags, int *addr_len); - int (*bind)(struct sock *sk, struct sockaddr *uaddr, int addr_len); - unsigned short max_header; - unsigned long retransmits; - char name[32]; - int inuse, highestinuse; - struct sock * sock_array[SOCK_ARRAY_SIZE]; -}; - -#define TIME_WRITE 1 -#define TIME_CLOSE 2 -#define TIME_KEEPOPEN 3 -#define TIME_DESTROY 4 -#define TIME_DONE 5 /* Used to absorb those last few packets */ -#define TIME_PROBE0 6 -/* - * About 10 seconds - */ -#define SOCK_DESTROY_TIME (10*HZ) - - -/* - * Sockets 0-1023 can't be bound too unless you are superuser - */ - -#define PROT_SOCK 1024 - - -#define SHUTDOWN_MASK 3 -#define RCV_SHUTDOWN 1 -#define SEND_SHUTDOWN 2 - -/* - * Used by processes to "lock" a socket state, so that - * interrupts and bottom half handlers won't change it - * from under us. It essentially blocks any incoming - * packets, so that we won't get any new data or any - * packets that change the state of the socket. - * - * Note the 'barrier()' calls: gcc may not move a lock - * "downwards" or a unlock "upwards" when optimizing. - */ -extern void __release_sock(struct sock *sk); - -static inline void lock_sock(struct sock *sk) -{ -#if 1 -/* debugging code: the test isn't even 100% correct, but it can catch bugs */ -/* Note that a double lock is ok in theory - it's just _usually_ a bug */ - if (sk->users) { - __label__ here; - printk("double lock on socket at %p\n", &&here); -here: - } -#endif - sk->users++; - barrier(); -} - -static inline void release_sock(struct sock *sk) -{ - barrier(); -#if 1 -/* debugging code: remove me when ok */ - if (sk->users == 0) { - __label__ here; - sk->users = 1; - printk("trying to unlock unlocked socket at %p\n", &&here); -here: - } -#endif - if (!--sk->users) - __release_sock(sk); -} - - -extern void destroy_sock(struct sock *sk); -extern unsigned short get_new_socknum(struct proto *, - unsigned short); -extern void put_sock(unsigned short, struct sock *); -extern struct sock *get_sock(struct proto *, unsigned short, - unsigned long, unsigned short, - unsigned long); -extern struct sock *get_sock_mcast(struct sock *, unsigned short, - unsigned long, unsigned short, - unsigned long); -extern struct sock *get_sock_raw(struct sock *, unsigned short, - unsigned long, unsigned long); - -extern struct sk_buff *sock_wmalloc(struct sock *sk, - unsigned long size, int force, - int priority); -extern struct sk_buff *sock_rmalloc(struct sock *sk, - unsigned long size, int force, - int priority); -extern void sock_wfree(struct sock *sk, - struct sk_buff *skb); -extern void sock_rfree(struct sock *sk, - struct sk_buff *skb); -extern unsigned long sock_rspace(struct sock *sk); -extern unsigned long sock_wspace(struct sock *sk); - -extern int sock_setsockopt(struct sock *sk, int level, - int op, char *optval, - int optlen); - -extern int sock_getsockopt(struct sock *sk, int level, - int op, char *optval, - int *optlen); -extern struct sk_buff *sock_alloc_send_skb(struct sock *skb, - unsigned long size, - unsigned long fallback, - int noblock, - int *errcode); - -/* - * Queue a received datagram if it will fit. Stream and sequenced - * protocols can't normally use this as they need to fit buffers in - * and play with them. - * - * Inlined as its very short and called for pretty much every - * packet ever received. - */ - -extern __inline__ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) -{ - unsigned long flags; - if(sk->rmem_alloc + skb->truesize >= sk->rcvbuf) - return -ENOMEM; - save_flags(flags); - cli(); - sk->rmem_alloc+=skb->truesize; - skb->sk=sk; - restore_flags(flags); - skb_queue_tail(&sk->receive_queue,skb); - if(!sk->dead) - sk->data_ready(sk,skb->len); - return 0; -} - -/* - * Recover an error report and clear atomically - */ - -extern __inline__ int sock_error(struct sock *sk) -{ - int err=xchg(&sk->err,0); - return -err; -} - -/* - * Declarations from timer.c - */ - -extern struct sock *timer_base; - -extern void delete_timer (struct sock *); -extern void reset_timer (struct sock *, int, unsigned long); -extern void net_timer (unsigned long); - - -/* - * Enable debug/info messages - */ - -#define NETDEBUG(x) x - -#endif /* _SOCK_H */ diff --git a/i386/i386at/gpl/linux/include/net/tcp.h b/i386/i386at/gpl/linux/include/net/tcp.h deleted file mode 100644 index 3c7eb7d..0000000 --- a/i386/i386at/gpl/linux/include/net/tcp.h +++ /dev/null @@ -1,329 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions for the TCP module. - * - * Version: @(#)tcp.h 1.0.5 05/23/93 - * - * Authors: Ross Biro, <bir7@leland.Stanford.Edu> - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _TCP_H -#define _TCP_H - -#include <linux/tcp.h> -#include <net/checksum.h> - -#define MAX_SYN_SIZE 44 + MAX_HEADER + 15 -#define MAX_FIN_SIZE 40 + MAX_HEADER + 15 -#define MAX_ACK_SIZE 40 + MAX_HEADER + 15 -#define MAX_RESET_SIZE 40 + MAX_HEADER + 15 -#define MAX_WINDOW 32767 /* Never offer a window over 32767 without using - window scaling (not yet supported). Some poor - stacks do signed 16bit maths! */ -#define MIN_WINDOW 2048 -#define MAX_ACK_BACKLOG 2 -#define MIN_WRITE_SPACE 2048 -#define TCP_WINDOW_DIFF 2048 - -/* urg_data states */ -#define URG_VALID 0x0100 -#define URG_NOTYET 0x0200 -#define URG_READ 0x0400 - -#define TCP_RETR1 7 /* - * This is how many retries it does before it - * tries to figure out if the gateway is - * down. - */ - -#define TCP_RETR2 15 /* - * This should take at least - * 90 minutes to time out. - */ - -#define TCP_TIMEOUT_LEN (15*60*HZ) /* should be about 15 mins */ -#define TCP_TIMEWAIT_LEN (60*HZ) /* how long to wait to successfully - * close the socket, about 60 seconds */ -#define TCP_FIN_TIMEOUT (3*60*HZ) /* BSD style FIN_WAIT2 deadlock breaker */ -#define TCP_ACK_TIME (3*HZ) /* time to delay before sending an ACK */ -#define TCP_DONE_TIME (5*HZ/2)/* maximum time to wait before actually - * destroying a socket */ -#define TCP_WRITE_TIME (30*HZ) /* initial time to wait for an ACK, - * after last transmit */ -#define TCP_TIMEOUT_INIT (3*HZ) /* RFC 1122 initial timeout value */ -#define TCP_SYN_RETRIES 10 /* number of times to retry opening a - * connection (TCP_RETR2-....) */ -#define TCP_PROBEWAIT_LEN (1*HZ)/* time to wait between probes when - * I've got something to write and - * there is no window */ - -#define TCP_NO_CHECK 0 /* turn to one if you want the default - * to be no checksum */ - - -/* - * TCP option - */ - -#define TCPOPT_NOP 1 /* Padding */ -#define TCPOPT_EOL 0 /* End of options */ -#define TCPOPT_MSS 2 /* Segment size negotiating */ -/* - * We don't use these yet, but they are for PAWS and big windows - */ -#define TCPOPT_WINDOW 3 /* Window scaling */ -#define TCPOPT_TIMESTAMP 8 /* Better RTT estimations/PAWS */ - - -/* - * The next routines deal with comparing 32 bit unsigned ints - * and worry about wraparound (automatic with unsigned arithmetic). - */ - -extern __inline int before(__u32 seq1, __u32 seq2) -{ - return (__s32)(seq1-seq2) < 0; -} - -extern __inline int after(__u32 seq1, __u32 seq2) -{ - return (__s32)(seq2-seq1) < 0; -} - - -/* is s2<=s1<=s3 ? */ -extern __inline int between(__u32 seq1, __u32 seq2, __u32 seq3) -{ - return (after(seq1+1, seq2) && before(seq1, seq3+1)); -} - -static __inline__ int min(unsigned int a, unsigned int b) -{ - if (a < b) - return(a); - return(b); -} - -extern struct proto tcp_prot; -extern struct tcp_mib tcp_statistics; -extern struct wait_queue *master_select_wakeup; - -extern void tcp_err(int type, int code, unsigned char *header, __u32 daddr, - __u32, struct inet_protocol *protocol); -extern void tcp_shutdown (struct sock *sk, int how); -extern int tcp_rcv(struct sk_buff *skb, struct device *dev, - struct options *opt, __u32 daddr, - unsigned short len, __u32 saddr, int redo, - struct inet_protocol *protocol); - -extern int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg); - -extern void tcp_read_wakeup(struct sock *); -extern void tcp_write_xmit(struct sock *); -extern void tcp_time_wait(struct sock *); -extern void tcp_retransmit(struct sock *, int); -extern void tcp_do_retransmit(struct sock *, int); -extern void tcp_send_check(struct tcphdr *th, unsigned long saddr, - unsigned long daddr, int len, struct sk_buff *skb); - -/* tcp_output.c */ - -extern void tcp_send_probe0(struct sock *); -extern void tcp_send_partial(struct sock *); -extern void tcp_write_wakeup(struct sock *); -extern void tcp_send_fin(struct sock *sk); -extern void tcp_send_synack(struct sock *, struct sock *, struct sk_buff *); -extern void tcp_send_skb(struct sock *, struct sk_buff *); -extern void tcp_send_ack(u32, u32, struct sock *sk, struct tcphdr *th, u32); -extern void tcp_send_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, - struct proto *prot, struct options *opt, struct device *dev, int tos, int ttl); - -extern void tcp_enqueue_partial(struct sk_buff *, struct sock *); -extern struct sk_buff * tcp_dequeue_partial(struct sock *); - -/* tcp_input.c */ -extern void tcp_cache_zap(void); - -/* tcp_timer.c */ -#define tcp_reset_msl_timer(x,y,z) reset_timer(x,y,z) -extern void tcp_reset_xmit_timer(struct sock *, int, unsigned long); -extern void tcp_retransmit_timer(unsigned long); - -/* - * Default sequence number picking algorithm. - * As close as possible to RFC 793, which - * suggests using a 250kHz clock. - * Further reading shows this assumes 2MB/s networks. - * For 10MB/s ethernet, a 1MHz clock is appropriate. - * That's funny, Linux has one built in! Use it! - */ - -static inline u32 tcp_init_seq(void) -{ - struct timeval tv; - do_gettimeofday(&tv); - return tv.tv_usec+tv.tv_sec*1000000; -} - -/* - * This function returns the amount that we can raise the - * usable window based on the following constraints - * - * 1. The window can never be shrunk once it is offered (RFC 793) - * 2. We limit memory per socket - */ - -static __inline__ unsigned short tcp_raise_window(struct sock *sk) -{ - long free_space = sock_rspace(sk); - long window; - - if (free_space > 1024) - free_space &= ~0x3FF; /* make free space a multiple of 1024 */ - - if(sk->window_clamp) - free_space = min(sk->window_clamp, free_space); - - /* - * compute the actual window i.e. - * old_window - received_bytes_on_that_win - */ - - window = sk->window - (sk->acked_seq - sk->lastwin_seq); - - if (sk->mss == 0) - sk->mss = sk->mtu; - - if ( window < 0 ) { - window = 0; - printk(KERN_DEBUG "TRW: win < 0 w=%d 1=%u 2=%u\n", - sk->window, sk->acked_seq, sk->lastwin_seq); - } - - if ( (free_space - window) >= min(sk->mss, MAX_WINDOW/2) ) - return ((free_space - window) / sk->mss) * sk->mss; - - return 0; -} - -static __inline__ unsigned short tcp_select_window(struct sock *sk) -{ - long free_space = sock_rspace(sk); - long window; - - if (free_space > 1024) - free_space &= ~0x3FF; /* make free space a multiple of 1024 */ - - if (sk->window_clamp) - free_space = min(sk->window_clamp, free_space); - - /* - * compute the actual window i.e. - * old_window - received_bytes_on_that_win - */ - - if (sk->mss == 0) - sk->mss = sk->mtu; - - window = sk->window - (sk->acked_seq - sk->lastwin_seq); - - if ( window < 0 ) { - window = 0; - printk(KERN_DEBUG "TSW: win < 0 w=%d 1=%u 2=%u\n", - sk->window, sk->acked_seq, sk->lastwin_seq); - } - - /* - * RFC 1122: - * "the suggested [SWS] avoidance algoritm for the receiver is to keep - * RECV.NEXT + RCV.WIN fixed until: - * RCV.BUFF - RCV.USER - RCV.WINDOW >= min(1/2 RCV.BUFF, MSS)" - * - * i.e. don't raise the right edge of the window until you can't raise - * it MSS bytes - */ - - if ( (free_space - window) >= min(sk->mss, MAX_WINDOW/2) ) - window += ((free_space - window) / sk->mss) * sk->mss; - - sk->window = window; - sk->lastwin_seq = sk->acked_seq; - - return sk->window; -} - -/* - * List all states of a TCP socket that can be viewed as a "connected" - * state. This now includes TCP_SYN_RECV, although I am not yet fully - * convinced that this is the solution for the 'getpeername(2)' - * problem. Thanks to Stephen A. Wood <saw@cebaf.gov> -FvK - */ - -extern __inline const int tcp_connected(const int state) -{ - return(state == TCP_ESTABLISHED || state == TCP_CLOSE_WAIT || - state == TCP_FIN_WAIT1 || state == TCP_FIN_WAIT2 || - state == TCP_SYN_RECV); -} - -/* - * Calculate(/check) TCP checksum - */ -static __inline__ u16 tcp_check(struct tcphdr *th, int len, - unsigned long saddr, unsigned long daddr, unsigned long base) -{ - return csum_tcpudp_magic(saddr,daddr,len,IPPROTO_TCP,base); -} - -#undef STATE_TRACE - -#ifdef STATE_TRACE -static char *statename[]={ - "Unused","Established","Syn Sent","Syn Recv", - "Fin Wait 1","Fin Wait 2","Time Wait", "Close", - "Close Wait","Last ACK","Listen","Closing" -}; -#endif - -static __inline__ void tcp_set_state(struct sock *sk, int state) -{ - int oldstate = sk->state; - - sk->state = state; - -#ifdef STATE_TRACE - if(sk->debug) - printk("TCP sk=%p, State %s -> %s\n",sk, statename[oldstate],statename[state]); -#endif - - switch (state) { - case TCP_ESTABLISHED: - if (oldstate != TCP_ESTABLISHED) { - tcp_statistics.TcpCurrEstab++; - /* This is a hack but it doesn't occur often and it's going to - be a real to fix nicely */ - if (oldstate == TCP_SYN_RECV) - wake_up_interruptible(&master_select_wakeup); - } - break; - - case TCP_CLOSE: - tcp_cache_zap(); - /* Should be about 2 rtt's */ - reset_timer(sk, TIME_DONE, min(sk->rtt * 2, TCP_DONE_TIME)); - /* fall through */ - default: - if (oldstate==TCP_ESTABLISHED) - tcp_statistics.TcpCurrEstab--; - } -} - -#endif /* _TCP_H */ diff --git a/i386/i386at/gpl/linux/include/net/udp.h b/i386/i386at/gpl/linux/include/net/udp.h deleted file mode 100644 index 13735d1..0000000 --- a/i386/i386at/gpl/linux/include/net/udp.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * INET An implementation of the TCP/IP protocol suite for the LINUX - * operating system. INET is implemented using the BSD Socket - * interface as the means of communication with the user level. - * - * Definitions for the UDP module. - * - * Version: @(#)udp.h 1.0.2 05/07/93 - * - * Authors: Ross Biro, <bir7@leland.Stanford.Edu> - * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> - * - * Fixes: - * Alan Cox : Turned on udp checksums. I don't want to - * chase 'memory corruption' bugs that aren't! - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - */ -#ifndef _UDP_H -#define _UDP_H - -#include <linux/udp.h> - - -#define UDP_NO_CHECK 0 - - -extern struct proto udp_prot; - - -extern void udp_err(int type, int code, unsigned char *header, __u32 daddr, - __u32 saddr, struct inet_protocol *protocol); -extern void udp_send_check(struct udphdr *uh, __u32 saddr, - __u32 daddr, int len, struct sock *sk); -extern int udp_recvfrom(struct sock *sk, unsigned char *to, - int len, int noblock, unsigned flags, - struct sockaddr_in *sin, int *addr_len); -extern int udp_read(struct sock *sk, unsigned char *buff, - int len, int noblock, unsigned flags); -extern int udp_connect(struct sock *sk, - struct sockaddr_in *usin, int addr_len); -extern int udp_rcv(struct sk_buff *skb, struct device *dev, - struct options *opt, __u32 daddr, - unsigned short len, __u32 saddr, int redo, - struct inet_protocol *protocol); -extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); -extern void udp_cache_zap(void); /* Remove udp last socket cache */ - -#endif /* _UDP_H */ |