├── include ├── asm-sparc │ ├── version.h │ ├── signal.h │ ├── param.h │ ├── dma.h │ ├── sysen.h │ ├── vaddrs.h │ ├── cprefix.h │ ├── idprom.h │ ├── asi4m.h │ ├── irq.h │ ├── contregs.h │ ├── bugs.h │ ├── delay.h │ ├── ptrace.h │ ├── asi.h │ ├── types.h │ └── memerr.h ├── linux │ ├── param.h │ ├── utime.h │ ├── linkage.h │ ├── minix_fs_i.h │ ├── ext_fs_i.h │ ├── times.h │ ├── nfs_fs_i.h │ ├── dirent.h │ ├── mouse.h │ ├── un.h │ ├── iso_fs_i.h │ ├── tasks.h │ ├── hpfs_fs.h │ ├── stddef.h │ ├── delay.h │ ├── head.h │ ├── vfs.h │ ├── sysv_fs_i.h │ ├── if_slip.h │ ├── xia_fs_i.h │ ├── scsicam.h │ ├── symtab_end.h │ ├── symtab_begin.h │ ├── nfs_fs_sb.h │ ├── ext_fs_sb.h │ ├── minix_fs_sb.h │ ├── tty_flip.h │ ├── utsname.h │ ├── ptrace.h │ ├── if_plip.h │ ├── kernel_stat.h │ ├── limits.h │ ├── iso_fs_sb.h │ ├── wait.h │ ├── udp.h │ ├── math_emu.h │ ├── ext2_fs_i.h │ ├── ldt.h │ ├── hpfs_fs_i.h │ ├── msdos_fs_sb.h │ ├── mman.h │ ├── malloc.h │ ├── xia_fs_sb.h │ ├── config.h │ ├── sys.h │ ├── ioport.h │ ├── ctype.h │ ├── locks.h │ ├── pipe_fs_i.h │ ├── time.h │ ├── blkdev.h │ ├── in_systm.h │ ├── string.h │ ├── hpfs_fs_sb.h │ ├── msdos_fs_i.h │ ├── fcntl.h │ ├── nfs_mount.h │ ├── tty_ldisc.h │ ├── etherdevice.h │ ├── vt.h │ ├── genhd.h │ └── tcp.h ├── asm-m68k │ ├── dma.h │ ├── irq.h │ ├── io.h │ └── delay.h ├── asm-alpha │ ├── signal.h │ ├── param.h │ ├── string.h │ ├── bugs.h │ ├── io.h │ ├── console.h │ ├── delay.h │ ├── ptrace.h │ ├── irq.h │ └── types.h ├── asm-i386 │ ├── param.h │ ├── signal.h │ ├── ptrace.h │ ├── types.h │ └── delay.h ├── asm-mips │ ├── param.h │ ├── slots.h │ ├── irq.h │ ├── signal.h │ ├── bugs.h │ ├── cachectl.h │ ├── delay.h │ ├── mipsconfig.h │ └── regdef.h └── asm-generic │ └── bitops.h ├── drivers ├── sound │ ├── .indent.pro │ ├── .blurb │ ├── sb.h │ ├── midi_ctrl.h │ ├── gus_linearvol.h │ ├── tuning.h │ ├── COPYING │ ├── midi_synth.h │ └── gus_hw.h ├── net │ ├── iow.h │ ├── LICENSE.SRC │ ├── README.wavelan │ └── README.3c505 ├── char │ ├── defkeymap.map │ ├── diacr.h │ ├── consolemap.h │ └── vt_kern.h ├── block │ ├── sbpcd2.c │ ├── sbpcd3.c │ ├── sbpcd4.c │ ├── README.hd │ └── MAKEDEV.ide1 ├── scsi │ ├── constants.h │ ├── scsi_ioctl.h │ ├── scsi_debug.h │ ├── qlogic.h │ ├── sr.h │ ├── sd.h │ ├── sg.h │ ├── eata.h │ └── wd7000.h └── Makefile ├── README.md ├── lib ├── errno.c ├── dup.c ├── close.c ├── setsid.c ├── execve.c ├── write.c ├── wait.c ├── _exit.c ├── open.c ├── Makefile └── ctype.c ├── net ├── inet │ ├── p8022call.h │ ├── psnapcall.h │ ├── ipxcall.h │ ├── p8022.h │ ├── psnap.h │ ├── rarp.h │ ├── datalink.h │ ├── arp.h │ ├── pe2.c │ ├── p8023.c │ ├── raw.h │ ├── eth.h │ ├── icmp.h │ ├── Makefile │ └── README ├── unix │ └── Makefile ├── Makefile └── protocols.c ├── arch ├── mips │ ├── kernel │ │ ├── bios32.c │ │ ├── vm86.c │ │ ├── tynedma.c │ │ └── tlb.S │ ├── boot │ │ └── Makefile │ ├── mm │ │ └── Makefile │ └── Makefile ├── i386 │ ├── ibcs │ │ ├── emulate.c │ │ └── Makefile │ ├── boot │ │ ├── compressed │ │ │ ├── crypt.h │ │ │ ├── Makefile │ │ │ ├── head.S │ │ │ └── lzw.h │ │ └── install.sh │ ├── mm │ │ └── Makefile │ ├── math-emu │ │ ├── version.h │ │ ├── fpu_asm.h │ │ ├── Makefile │ │ ├── reg_constant.h │ │ └── div_small.S │ └── kernel │ │ └── Makefile ├── sparc │ ├── kernel │ │ ├── ioport.c │ │ ├── traps.c │ │ └── Makefile │ ├── lib │ │ ├── ashrdi3.S │ │ └── Makefile │ ├── mm │ │ └── Makefile │ └── Makefile └── alpha │ ├── mm │ └── Makefile │ ├── lib │ ├── Makefile │ └── memset.c │ ├── Makefile │ ├── kernel │ ├── Makefile │ └── head.S │ └── boot │ └── Makefile ├── fs ├── hpfs │ ├── hpfs_caps.h │ ├── Makefile │ └── README ├── ChangeLog ├── umsdos │ ├── notes │ ├── Makefile │ └── check.c ├── ext2 │ ├── bitmap.c │ ├── Makefile │ └── acl.c ├── proc │ └── Makefile ├── ext │ └── Makefile ├── nfs │ └── Makefile ├── minix │ └── Makefile ├── isofs │ └── Makefile ├── msdos │ ├── Makefile │ └── msbuffer.h ├── xiafs │ ├── Makefile │ └── xiafs_mac.h └── sysv │ ├── Makefile │ └── README ├── .vscode └── settings.json ├── init └── version.c ├── kernel ├── panic.c ├── info.c ├── Makefile └── softirq.c ├── mm └── Makefile ├── ipc └── Makefile └── versions.mk /include/asm-sparc/version.h: -------------------------------------------------------------------------------- 1 | #define WHO_COMPILED_ME "someone@somewhere.domain" 2 | -------------------------------------------------------------------------------- /drivers/sound/.indent.pro: -------------------------------------------------------------------------------- 1 | -bad 2 | -bap 3 | -nfca 4 | -bl 5 | -psl 6 | -di16 7 | -lp 8 | -ip5 9 | -------------------------------------------------------------------------------- /drivers/net/iow.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASM_IOW_H 2 | #define _ASM_IOW_H 3 | 4 | /* no longer used */ 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # read-linux-1.2.13-net-code 2 | linux网络源码分析 3 | 4 | 文章:https://zhuanlan.zhihu.com/c_1094189343643652096 5 | -------------------------------------------------------------------------------- /include/linux/param.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_PARAM_H 2 | #define _LINUX_PARAM_H 3 | 4 | #include 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /drivers/char/defkeymap.map: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theanarkh/read-linux-1.2.13-net-code/HEAD/drivers/char/defkeymap.map -------------------------------------------------------------------------------- /lib/errno.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/lib/errno.c 3 | * 4 | * Copyright (C) 1991, 1992 Linus Torvalds 5 | */ 6 | 7 | int errno; 8 | -------------------------------------------------------------------------------- /net/inet/p8022call.h: -------------------------------------------------------------------------------- 1 | /* Separate to keep compilation of Space.c simpler */ 2 | extern void p8022_proto_init(struct net_proto *); 3 | -------------------------------------------------------------------------------- /net/inet/psnapcall.h: -------------------------------------------------------------------------------- 1 | /* Separate to keep compilation of Space.c simpler */ 2 | extern void snap_proto_init(struct net_proto *); 3 | -------------------------------------------------------------------------------- /include/asm-m68k/dma.h: -------------------------------------------------------------------------------- 1 | #ifndef _M68K_DMA_H 2 | #define _M68K_DMA_H 1 3 | 4 | /* dummy for m68k */ 5 | 6 | #endif /* _M68K_DMA_H */ 7 | -------------------------------------------------------------------------------- /include/asm-m68k/irq.h: -------------------------------------------------------------------------------- 1 | #ifndef _M68K_IRQ_H_ 2 | #define _M68K_IRQ_H_ 3 | 4 | /* dummy for m68k */ 5 | 6 | #endif /* _M68K_IRQ_H_ */ 7 | -------------------------------------------------------------------------------- /net/inet/ipxcall.h: -------------------------------------------------------------------------------- 1 | /* Separate to keep compilation of protocols.c simpler */ 2 | extern void ipx_proto_init(struct net_proto *pro); 3 | -------------------------------------------------------------------------------- /drivers/block/sbpcd2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * duplication of sbpcd.c for multiple interfaces 3 | */ 4 | #define SBPCD_ISSUE 2 5 | #include "sbpcd.c" 6 | -------------------------------------------------------------------------------- /drivers/block/sbpcd3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * duplication of sbpcd.c for multiple interfaces 3 | */ 4 | #define SBPCD_ISSUE 3 5 | #include "sbpcd.c" 6 | -------------------------------------------------------------------------------- /drivers/block/sbpcd4.c: -------------------------------------------------------------------------------- 1 | /* 2 | * duplication of sbpcd.c for multiple interfaces 3 | */ 4 | #define SBPCD_ISSUE 4 5 | #include "sbpcd.c" 6 | -------------------------------------------------------------------------------- /net/inet/p8022.h: -------------------------------------------------------------------------------- 1 | struct datalink_proto *register_8022_client(unsigned char type, int (*rcvfunc)(struct sk_buff *, struct device *, struct packet_type *)); 2 | 3 | -------------------------------------------------------------------------------- /net/inet/psnap.h: -------------------------------------------------------------------------------- 1 | struct datalink_proto *register_snap_client(unsigned char *desc, int (*rcvfunc)(struct sk_buff *, struct device *, struct packet_type *)); 2 | 3 | -------------------------------------------------------------------------------- /include/linux/utime.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_UTIME_H 2 | #define _LINUX_UTIME_H 3 | 4 | struct utimbuf { 5 | time_t actime; 6 | time_t modtime; 7 | }; 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /arch/mips/kernel/bios32.c: -------------------------------------------------------------------------------- 1 | /* 2 | * bios 32 replacement 3 | */ 4 | unsigned long bios32_init(unsigned long memory_start, unsigned long memory_end) 5 | { 6 | return memory_start; 7 | } 8 | -------------------------------------------------------------------------------- /drivers/char/diacr.h: -------------------------------------------------------------------------------- 1 | #ifndef _DIACR_H 2 | #define _DIACR_H 3 | #include 4 | 5 | extern struct kbdiacr accent_table[]; 6 | extern unsigned int accent_table_size; 7 | 8 | #endif /* _DIACR_H */ 9 | -------------------------------------------------------------------------------- /include/linux/linkage.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_LINKAGE_H 2 | #define _LINUX_LINKAGE_H 3 | 4 | #ifdef __cplusplus 5 | #define asmlinkage extern "C" 6 | #else 7 | #define asmlinkage 8 | #endif 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /lib/dup.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/lib/dup.c 3 | * 4 | * Copyright (C) 1991, 1992 Linus Torvalds 5 | */ 6 | 7 | #define __LIBRARY__ 8 | #include 9 | 10 | _syscall1(int,dup,int,fd) 11 | 12 | -------------------------------------------------------------------------------- /fs/hpfs/hpfs_caps.h: -------------------------------------------------------------------------------- 1 | unsigned hpfs_char_to_linux (unsigned c); 2 | unsigned hpfs_char_to_lower_linux (unsigned c); 3 | unsigned hpfs_char_to_upper_linux (unsigned c); 4 | unsigned linux_char_to_upper_linux (unsigned c); 5 | -------------------------------------------------------------------------------- /include/linux/minix_fs_i.h: -------------------------------------------------------------------------------- 1 | #ifndef _MINIX_FS_I 2 | #define _MINIX_FS_I 3 | 4 | /* 5 | * minix fs inode data in memory 6 | */ 7 | struct minix_inode_info { 8 | __u16 i_data[16]; 9 | }; 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /lib/close.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/lib/close.c 3 | * 4 | * Copyright (C) 1991, 1992 Linus Torvalds 5 | */ 6 | 7 | #define __LIBRARY__ 8 | #include 9 | 10 | _syscall1(int,close,int,fd) 11 | 12 | -------------------------------------------------------------------------------- /include/linux/ext_fs_i.h: -------------------------------------------------------------------------------- 1 | #ifndef _EXT_FS_I 2 | #define _EXT_FS_I 3 | 4 | /* 5 | * extended file system inode data in memory 6 | */ 7 | struct ext_inode_info { 8 | unsigned long i_data[16]; 9 | }; 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /include/linux/times.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_TIMES_H 2 | #define _LINUX_TIMES_H 3 | 4 | struct tms { 5 | clock_t tms_utime; 6 | clock_t tms_stime; 7 | clock_t tms_cutime; 8 | clock_t tms_cstime; 9 | }; 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /include/linux/nfs_fs_i.h: -------------------------------------------------------------------------------- 1 | #ifndef _NFS_FS_I 2 | #define _NFS_FS_I 3 | 4 | #include 5 | 6 | /* 7 | * nfs fs inode data in memory 8 | */ 9 | struct nfs_inode_info { 10 | struct nfs_fh fhandle; 11 | }; 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /lib/setsid.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/lib/setsid.c 3 | * 4 | * Copyright (C) 1991, 1992 Linus Torvalds 5 | */ 6 | 7 | #define __LIBRARY__ 8 | #include 9 | #include 10 | 11 | _syscall0(pid_t,setsid) 12 | 13 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "minix_fs.h": "c", 4 | "netdevice.h": "c", 5 | "etherdevice.h": "c", 6 | "malloc.h": "c", 7 | "ext_fs.h": "c", 8 | "config.h": "c" 9 | } 10 | } -------------------------------------------------------------------------------- /lib/execve.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/lib/execve.c 3 | * 4 | * Copyright (C) 1991, 1992 Linus Torvalds 5 | */ 6 | 7 | #define __LIBRARY__ 8 | #include 9 | 10 | _syscall3(int,execve,const char *,file,char **,argv,char **,envp) 11 | 12 | -------------------------------------------------------------------------------- /arch/i386/ibcs/emulate.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/abi/emulate.c 3 | * 4 | * Copyright (C) 1993 Linus Torvalds 5 | */ 6 | 7 | /* 8 | * Yes, sir, this file is completely empty, waiting for some real code.. 9 | * I still copyright it, silly me. 10 | */ 11 | -------------------------------------------------------------------------------- /include/linux/dirent.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_DIRENT_H 2 | #define _LINUX_DIRENT_H 3 | 4 | #include 5 | 6 | struct dirent { 7 | long d_ino; 8 | off_t d_off; 9 | unsigned short d_reclen; 10 | char d_name[NAME_MAX+1]; 11 | }; 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /include/linux/mouse.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_MOUSE_H 2 | #define _LINUX_MOUSE_H 3 | 4 | #define BUSMOUSE_MINOR 0 5 | #define PSMOUSE_MINOR 1 6 | #define MS_BUSMOUSE_MINOR 2 7 | #define ATIXL_BUSMOUSE_MINOR 3 8 | 9 | unsigned long mouse_init(unsigned long); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /include/linux/un.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_UN_H 2 | #define _LINUX_UN_H 3 | 4 | #define UNIX_PATH_MAX 108 5 | 6 | struct sockaddr_un { 7 | unsigned short sun_family; /* AF_UNIX */ 8 | char sun_path[UNIX_PATH_MAX]; /* pathname */ 9 | }; 10 | 11 | #endif /* _LINUX_UN_H */ 12 | -------------------------------------------------------------------------------- /lib/write.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/lib/write.c 3 | * 4 | * Copyright (C) 1991, 1992 Linus Torvalds 5 | */ 6 | 7 | #define __LIBRARY__ 8 | #include 9 | #include 10 | 11 | _syscall3(int,write,int,fd,const char *,buf,off_t,count) 12 | 13 | -------------------------------------------------------------------------------- /include/linux/iso_fs_i.h: -------------------------------------------------------------------------------- 1 | #ifndef _ISO_FS_I 2 | #define _ISO_FS_I 3 | 4 | /* 5 | * iso fs inode data in memory 6 | */ 7 | struct iso_inode_info { 8 | unsigned int i_first_extent; 9 | unsigned int i_backlink; 10 | unsigned char i_file_format; 11 | }; 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /include/asm-sparc/signal.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASMSPARC_SIGNAL_H 2 | #define _ASMSPARC_SIGNAL_H 3 | 4 | struct sigcontext_struct { 5 | /* 6 | * Have to find out what SUNOS and Solaris do. This could 7 | * get real ugly. David S. Miller (davem@caip.rutgers.edu) 8 | */ 9 | }; 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /include/linux/tasks.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_TASKS_H 2 | #define _LINUX_TASKS_H 3 | 4 | /* 5 | * This is the maximum nr of tasks - change it if you need to 6 | */ 7 | #define NR_TASKS 512 8 | 9 | #define MAX_TASKS_PER_USER (NR_TASKS/2) 10 | #define MIN_TASKS_LEFT_FOR_ROOT 4 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /drivers/scsi/constants.h: -------------------------------------------------------------------------------- 1 | #ifndef _CONSTANTS_H 2 | #define _CONSTANTS_H 3 | extern void print_command(unsigned char *); 4 | extern int print_msg(unsigned char *); 5 | extern void print_sense(char *, Scsi_Cmnd *); 6 | extern void print_status(int); 7 | extern void print_Scsi_Cmnd (Scsi_Cmnd *); 8 | #endif /* def _CONSTANTS_H */ 9 | -------------------------------------------------------------------------------- /include/asm-alpha/signal.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASMAXP_SIGNAL_H 2 | #define _ASMAXP_SIGNAL_H 3 | 4 | struct sigcontext_struct { 5 | /* 6 | * what should we have here? I'd probably better use the same 7 | * stack layout as OSF/1, just in case we ever want to try 8 | * running their binaries.. 9 | */ 10 | }; 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /arch/mips/kernel/vm86.c: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/mips/vm86.c 3 | * 4 | * Copyright (C) 1994 Waldorf GMBH, 5 | * written by Ralf Baechle 6 | */ 7 | #include 8 | #include 9 | #include 10 | 11 | asmlinkage int sys_vm86(struct vm86_struct * v86) 12 | { 13 | return -ENOSYS; 14 | } 15 | -------------------------------------------------------------------------------- /fs/ChangeLog: -------------------------------------------------------------------------------- 1 | Mon Oct 24 23:27:42 1994 Theodore Y. Ts'o (tytso@rt-11) 2 | 3 | * fcntl.c (sys_fcntl): Liberalize security checks which Alan Cox 4 | put in. 5 | 6 | Thu Oct 20 23:44:22 1994 Theodore Y. Ts'o (tytso@rt-11) 7 | 8 | * fcntl.c (sys_fcntl): Add more of a security check to the 9 | F_SETOWN fcntl(). 10 | 11 | -------------------------------------------------------------------------------- /include/linux/hpfs_fs.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_HPFS_FS_H 2 | #define _LINUX_HPFS_FS_H 3 | 4 | /* HPFS magic number (word 0 of block 16) */ 5 | 6 | #define HPFS_SUPER_MAGIC 0xf995e849 7 | 8 | /* The entry point for a VFS */ 9 | 10 | extern struct super_block *hpfs_read_super (struct super_block *, void *, int); 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /include/linux/stddef.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_STDDEF_H 2 | #define _LINUX_STDDEF_H 3 | 4 | #ifndef _SIZE_T 5 | #define _SIZE_T 6 | typedef unsigned int size_t; 7 | #endif 8 | 9 | #undef NULL 10 | #define NULL ((void *)0) 11 | 12 | #undef offsetof 13 | #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /arch/i386/boot/compressed/crypt.h: -------------------------------------------------------------------------------- 1 | /* crypt.h (dummy version) -- do not perform encryption 2 | * Hardly worth copyrighting :-) 3 | */ 4 | 5 | #ifdef CRYPT 6 | # undef CRYPT /* dummy version */ 7 | #endif 8 | 9 | #define RAND_HEAD_LEN 12 /* length of encryption random header */ 10 | 11 | #define zencode 12 | #define zdecode 13 | -------------------------------------------------------------------------------- /include/linux/delay.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_DELAY_H 2 | #define _LINUX_DELAY_H 3 | 4 | /* 5 | * Copyright (C) 1993 Linus Torvalds 6 | * 7 | * Delay routines, using a pre-computed "loops_per_second" value. 8 | */ 9 | 10 | extern unsigned long loops_per_sec; 11 | 12 | #include 13 | 14 | #endif /* defined(_LINUX_DELAY_H) */ 15 | -------------------------------------------------------------------------------- /drivers/sound/.blurb: -------------------------------------------------------------------------------- 1 | 2 | ********************************************************* 3 | * IF YOU HAVE ANY PROBLEMS WITH THE SOUND DRIVER, * 4 | * PLEASE READ THE SOUND-HOWTO. IT'S AVAILABLE FROM YOUR * 5 | * NEAREST LINUX FTP SITE AND CONTAINS ANSWER TO YOUR * 6 | * PROBLEM. * 7 | ********************************************************* 8 | -------------------------------------------------------------------------------- /lib/wait.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/lib/wait.c 3 | * 4 | * Copyright (C) 1991, 1992 Linus Torvalds 5 | */ 6 | 7 | #define __LIBRARY__ 8 | #include 9 | #include 10 | 11 | _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) 12 | 13 | pid_t wait(int * wait_stat) 14 | { 15 | return waitpid(-1,wait_stat,0); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /include/asm-alpha/param.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASMAXP_PARAM_H 2 | #define _ASMAXP_PARAM_H 3 | 4 | #ifndef HZ 5 | #define HZ 1024 6 | #endif 7 | 8 | #define EXEC_PAGESIZE 8192 9 | 10 | #ifndef NGROUPS 11 | #define NGROUPS 32 12 | #endif 13 | 14 | #ifndef NOGROUP 15 | #define NOGROUP (-1) 16 | #endif 17 | 18 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /include/asm-i386/param.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASMi386_PARAM_H 2 | #define _ASMi386_PARAM_H 3 | 4 | #ifndef HZ 5 | #define HZ 100 6 | #endif 7 | 8 | #define EXEC_PAGESIZE 4096 9 | 10 | #ifndef NGROUPS 11 | #define NGROUPS 32 12 | #endif 13 | 14 | #ifndef NOGROUP 15 | #define NOGROUP (-1) 16 | #endif 17 | 18 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /drivers/char/consolemap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * consolemap.h 3 | * 4 | * Interface between console.c, selection.c and consolemap.c 5 | */ 6 | #define NORM_MAP 0 7 | #define GRAF_MAP 1 8 | #define NULL_MAP 2 9 | #define USER_MAP 3 10 | 11 | extern int hashtable_contents_valid; 12 | extern unsigned char inverse_translate(unsigned char c); 13 | extern unsigned char *set_translate(int m); 14 | -------------------------------------------------------------------------------- /include/asm-sparc/param.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASMSPARC_PARAM_H 2 | #define _ASMSPARC_PARAM_H 3 | 4 | #ifndef HZ 5 | #define HZ 100 6 | #endif 7 | 8 | #define EXEC_PAGESIZE 4096 9 | 10 | #ifndef NGROUPS 11 | #define NGROUPS 32 12 | #endif 13 | 14 | #ifndef NOGROUP 15 | #define NOGROUP (-1) 16 | #endif 17 | 18 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /include/linux/head.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_HEAD_H 2 | #define _LINUX_HEAD_H 3 | 4 | typedef struct desc_struct { 5 | unsigned long a,b; 6 | } desc_table[256]; 7 | 8 | extern desc_table idt,gdt; 9 | 10 | #define GDT_NUL 0 11 | #define GDT_CODE 1 12 | #define GDT_DATA 2 13 | #define GDT_TMP 3 14 | 15 | #define LDT_NUL 0 16 | #define LDT_CODE 1 17 | #define LDT_DATA 2 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /include/linux/vfs.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_VFS_H 2 | #define _LINUX_VFS_H 3 | 4 | typedef struct { 5 | long val[2]; 6 | } fsid_t; 7 | 8 | struct statfs { 9 | long f_type; 10 | long f_bsize; 11 | long f_blocks; 12 | long f_bfree; 13 | long f_bavail; 14 | long f_files; 15 | long f_ffree; 16 | fsid_t f_fsid; 17 | long f_namelen; 18 | long f_spare[6]; 19 | }; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /drivers/block/README.hd: -------------------------------------------------------------------------------- 1 | This hard disk driver (hd.c) includes support for IDE Multiple Mode 2 | and IRQ-unmasking during I/O (both disabled by default), as well as 3 | support for drives where the BIOS reports "more than 16 heads". 4 | 5 | The hdparm.c program for controlling various features is now packaged 6 | separately. Look for it on your favorite linux FTP site. 7 | 8 | -mlord@bnr.ca 9 | -------------------------------------------------------------------------------- /lib/_exit.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/lib/_exit.c 3 | * 4 | * Copyright (C) 1991, 1992 Linus Torvalds 5 | */ 6 | 7 | #define __LIBRARY__ 8 | #include 9 | 10 | #define exit __sys_exit 11 | static inline _syscall0(int, exit) 12 | #undef exit 13 | 14 | volatile void _exit(int exit_code) 15 | { 16 | fake_volatile: 17 | __sys_exit(); 18 | goto fake_volatile; 19 | } 20 | 21 | 22 | -------------------------------------------------------------------------------- /include/asm-alpha/string.h: -------------------------------------------------------------------------------- 1 | #ifndef __ALPHA_STRING_H 2 | #define __ALPHA_STRING_H 3 | 4 | extern void * __constant_c_memset(void *, unsigned long, long); 5 | extern void * __memset(void *, char, size_t); 6 | 7 | #define memset(s, c, count) \ 8 | (__builtin_constant_p(c) ? \ 9 | __constant_c_memset((s),(0x01010101UL*(unsigned char)c),(count)) : \ 10 | __memset((s),(c),(count))) 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /net/inet/rarp.h: -------------------------------------------------------------------------------- 1 | /* linux/net/inet/rarp.h */ 2 | #ifndef _RARP_H 3 | #define _RARP_H 4 | 5 | extern int rarp_ioctl(unsigned int cmd, void *arg); 6 | extern int rarp_rcv(struct sk_buff *skb, 7 | struct device *dev, 8 | struct packet_type *pt); 9 | extern int rarp_get_info(char *buffer, 10 | char **start, 11 | off_t offset, 12 | int length); 13 | #endif /* _RARP_H */ 14 | 15 | -------------------------------------------------------------------------------- /include/asm-alpha/bugs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/asm-alpha/bugs.h 3 | * 4 | * Copyright (C) 1994 Linus Torvalds 5 | */ 6 | 7 | /* 8 | * This is included by init/main.c to check for architecture-dependent bugs. 9 | * 10 | * Needs: 11 | * void check_bugs(void); 12 | */ 13 | 14 | /* 15 | * I don't know of any alpha bugs yet.. Nice chip 16 | */ 17 | 18 | static void check_bugs(void) 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /include/asm-mips/param.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_MIPS_PARAM_H 2 | #define __ASM_MIPS_PARAM_H 3 | 4 | #ifndef HZ 5 | #define HZ 100 6 | #endif 7 | 8 | #define EXEC_PAGESIZE 4096 9 | 10 | #ifndef NGROUPS 11 | #define NGROUPS 32 12 | #endif 13 | 14 | #ifndef NOGROUP 15 | #define NOGROUP (-1) 16 | #endif 17 | 18 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ 19 | 20 | #endif /* __ASM_MIPS_PARAM_H */ 21 | -------------------------------------------------------------------------------- /include/linux/sysv_fs_i.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYSV_FS_I 2 | #define _SYSV_FS_I 3 | 4 | /* 5 | * SystemV/Coherent FS inode data in memory 6 | */ 7 | struct sysv_inode_info { 8 | unsigned long i_data[10+1+1+1]; /* zone numbers: max. 10 data blocks, 9 | * then 1 indirection block, 10 | * then 1 double indirection block, 11 | * then 1 triple indirection block. 12 | */ 13 | }; 14 | 15 | #endif 16 | 17 | -------------------------------------------------------------------------------- /include/linux/if_slip.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Swansea University Computer Society NET3 3 | * 4 | * This file declares the constants of special use with the SLIP/CSLIP/ 5 | * KISS TNC driver. 6 | */ 7 | 8 | #ifndef __LINUX_SLIP_H 9 | #define __LINUX_SLIP_H 10 | 11 | #define SL_MODE_SLIP 0 12 | #define SL_MODE_CSLIP 1 13 | #define SL_MODE_KISS 4 14 | 15 | #define SL_OPT_SIXBIT 2 16 | #define SL_OPT_ADAPTIVE 8 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /arch/sparc/kernel/ioport.c: -------------------------------------------------------------------------------- 1 | /* ioport.c: I/O access on the Sparc. Work in progress.. Most of the things 2 | * in this file are for the sole purpose of getting the kernel 3 | * through the compiler. :-) 4 | * 5 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | -------------------------------------------------------------------------------- /include/asm-mips/slots.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/asm-mips/slots.h 3 | * 4 | * Copyright (C) 1994 by Waldorf Electronics 5 | * Written by Ralf Baechle 6 | */ 7 | #ifndef __ASM_MIPS_SLOTS_H 8 | #define __ASM_MIPS_SLOTS_H 9 | 10 | /* 11 | * SLOTSPACE is the address to which the physical address 0 12 | * of the Slotspace is mapped by the chipset in the main CPU's 13 | * address space. 14 | */ 15 | #define SLOTSPACE 0xe1000000 16 | 17 | #endif /* __ASM_MIPS_SLOTS_H */ 18 | -------------------------------------------------------------------------------- /include/linux/xia_fs_i.h: -------------------------------------------------------------------------------- 1 | #ifndef _XIA_FS_I_H 2 | #define _XIA_FS_I_H 3 | 4 | /* 5 | * include/linux/xia_fs_i.h 6 | * 7 | * Copyright (C) Q. Frank Xia, 1993. 8 | * 9 | * Based on Linus' minix_fs_i.h. 10 | * Copyright (C) Linus Torvalds, 1991, 1992. 11 | */ 12 | 13 | struct xiafs_inode_info { /* for data zone pointers */ 14 | unsigned long i_zone[8]; 15 | unsigned long i_ind_zone; 16 | unsigned long i_dind_zone; 17 | }; 18 | 19 | #endif /* _XIA_FS_I_H */ 20 | -------------------------------------------------------------------------------- /fs/umsdos/notes: -------------------------------------------------------------------------------- 1 | This file contain idea and things I don't want to forget 2 | 3 | Possible bug in fs/read_write.c 4 | Function sys_readdir() 5 | 6 | There is a call the verify_area that does not take in account 7 | the count parameter. I guess it should read 8 | 9 | error = verify_area(VERIFY_WRITE, dirent, count*sizeof (*dirent)); 10 | 11 | instead of 12 | 13 | error = verify_area(VERIFY_WRITE, dirent, sizeof (*dirent)); 14 | 15 | Of course, now , count is always 1 16 | 17 | 18 | -------------------------------------------------------------------------------- /net/inet/datalink.h: -------------------------------------------------------------------------------- 1 | #ifndef _NET_INET_DATALINK_H_ 2 | #define _NET_INET_DATALINK_H_ 3 | 4 | struct datalink_proto { 5 | unsigned short type_len; 6 | unsigned char type[8]; 7 | char *string_name; 8 | unsigned short header_length; 9 | int (*rcvfunc)(struct sk_buff *, struct device *, 10 | struct packet_type *); 11 | void (*datalink_header)(struct datalink_proto *, struct sk_buff *, 12 | unsigned char *); 13 | struct datalink_proto *next; 14 | }; 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /include/asm-alpha/io.h: -------------------------------------------------------------------------------- 1 | #ifndef __ALPHA_IO_H 2 | #define __ALPHA_IO_H 3 | 4 | #include 5 | 6 | #ifndef mb 7 | #define mb() __asm__ __volatile__("mb": : :"memory") 8 | #endif 9 | 10 | /* 11 | * There are different version of the alpha motherboards: the 12 | * "interesting" (read: slightly braindead) Jensen type hardware 13 | * and the PCI version 14 | */ 15 | #ifdef CONFIG_PCI 16 | #include /* get chip-specific definitions */ 17 | #else 18 | #include 19 | #endif 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /include/linux/scsicam.h: -------------------------------------------------------------------------------- 1 | /* 2 | * scsicam.h - SCSI CAM support functions, use for HDIO_GETGEO, etc. 3 | * 4 | * Copyright 1993, 1994 Drew Eckhardt 5 | * Visionary Computing 6 | * (Unix and Linux consulting and custom programming) 7 | * drew@Colorado.EDU 8 | * +1 (303) 786-7975 9 | * 10 | * For more information, please consult the SCSI-CAM draft. 11 | */ 12 | 13 | #ifndef SCSICAM_H 14 | #define SCSICAM_H 15 | extern int scsicam_bios_param (Disk *disk, int dev, int *ip); 16 | #endif /* def SCSICAM_H */ 17 | -------------------------------------------------------------------------------- /include/asm-mips/irq.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/asm-mips/irq.h 3 | * 4 | * This file is subject to the terms and conditions of the GNU General Public 5 | * License. See the file "COPYING" in the main directory of this archive 6 | * for more details. 7 | * 8 | * Copyright (C) 1994 by Waldorf GMBH 9 | * written by Ralf Baechle 10 | * 11 | */ 12 | #ifndef __ASM_MIPS_IRQ_H 13 | #define __ASM_MIPS_IRQ_H 14 | 15 | extern void disable_irq(unsigned int); 16 | extern void enable_irq(unsigned int); 17 | 18 | #endif /* __ASM_MIPS_IRQ_H */ 19 | -------------------------------------------------------------------------------- /include/linux/symtab_end.h: -------------------------------------------------------------------------------- 1 | #ifdef CONFIG_MODVERSIONS /* CONFIG_MODVERSIONS */ 2 | #undef _set_ver 3 | #if defined(MODULE) && !defined(__GENKSYMS__) 4 | #define _set_ver(sym,vers) sym ## _R ## vers 5 | #else 6 | #define _set_ver(a,b) a 7 | #endif 8 | #endif /* CONFIG_MODVERSIONS */ 9 | #undef X 10 | #undef EMPTY 11 | /* mark end of table, last entry above ended with a comma! */ 12 | { (void *)0, (char *)0 } 13 | }, 14 | /* no module refs, insmod will take care of that instead! */ 15 | { { (struct module *)0, (struct module_ref *)0 } } 16 | -------------------------------------------------------------------------------- /lib/open.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/lib/open.c 3 | * 4 | * Copyright (C) 1991, 1992 Linus Torvalds 5 | */ 6 | 7 | #define __LIBRARY__ 8 | #include 9 | #include 10 | 11 | #define open __sys_open 12 | static inline _syscall3(int, open, const char *, filename, int, flag, int, mode) 13 | #undef open 14 | 15 | int open(const char * filename, int flag, ...) 16 | { 17 | int res; 18 | va_list arg; 19 | 20 | va_start(arg,flag); 21 | res = __sys_open(filename, flag, va_arg(arg, int)); 22 | va_end(arg); 23 | return res; 24 | } 25 | -------------------------------------------------------------------------------- /include/asm-sparc/dma.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/asm-sparc/dma.h 3 | * 4 | * Don't even ask, I am figuring out how this crap works 5 | * on the Sparc. It may end up being real hairy to plug 6 | * into this code, maybe not, we'll see. 7 | * 8 | * Copyright (C) David S. Miller (davem@caip.rutgers.edu) 9 | */ 10 | 11 | #include /* for invalidate's, etc. */ 12 | 13 | #define MAX_DMA_CHANNELS 8 14 | #define MAX_DMA_ADDRESS 0x0 15 | 16 | #ifndef _ASM_SPARC_DMA_H 17 | #define _ASM_SPARC_DMA_H 18 | 19 | 20 | #endif /* !(_ASM_SPARC_DMA_H) */ 21 | -------------------------------------------------------------------------------- /include/asm-sparc/sysen.h: -------------------------------------------------------------------------------- 1 | #ifndef _SPARC_SYSEN_H 2 | #define _SPARC_SYSEN_H 3 | 4 | /* sysen.h: Bit fields within the "System Enable" register accessed via 5 | the ASI_CONTROL address space at address AC_SYSENABLE. 6 | 7 | Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu) 8 | */ 9 | 10 | #define SENABLE_DVMA 0x20 /* enable dvma transfers */ 11 | #define SENABLE_CACHE 0x10 /* enable VAC cache */ 12 | #define SENABLE_RESET 0x04 /* reset the whole machine, danger Will Robinson */ 13 | 14 | #endif /* _SPARC_SYSEN_H */ 15 | -------------------------------------------------------------------------------- /include/linux/symtab_begin.h: -------------------------------------------------------------------------------- 1 | #ifdef CONFIG_MODVERSIONS /* CONFIG_MODVERSIONS */ 2 | #undef _set_ver 3 | #undef X 4 | #ifndef __GENKSYMS__ 5 | #ifdef MODULE 6 | #define _set_ver(sym,ver) { (void *) & sym ## _R ## ver, "_" #sym "_R" #ver } 7 | #else /* MODULE */ 8 | #define _set_ver(sym,ver) { (void *) & sym, "_" #sym "_R" #ver } 9 | #endif /* MODULE */ 10 | #define X(a) a 11 | #endif /* __GENKSYMS__ */ 12 | #else /* CONFIG_MODVERSIONS */ 13 | #define X(sym) { (void *) & sym, "_" #sym } 14 | #endif /* CONFIG_MODVERSIONS */ 15 | #define EMPTY {0,0} 16 | 0, 0, 0, { 17 | -------------------------------------------------------------------------------- /init/version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/version.c 3 | * 4 | * Copyright (C) 1992 Theodore Ts'o 5 | * 6 | * May be freely distributed as part of Linux. 7 | */ 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | struct new_utsname system_utsname = { 14 | UTS_SYSNAME, UTS_NODENAME, UTS_RELEASE, UTS_VERSION, 15 | UTS_MACHINE, UTS_DOMAINNAME 16 | }; 17 | 18 | char *linux_banner = 19 | "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" 20 | LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n"; 21 | -------------------------------------------------------------------------------- /include/asm-mips/signal.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_MIPS_SIGNAL_H 2 | #define __ASM_MIPS_SIGNAL_H 3 | 4 | struct sigcontext_struct { 5 | unsigned long sc_at, sc_v0, sc_v1, sc_a0, sc_a1, sc_a2, sc_a3; 6 | unsigned long sc_t0, sc_t1, sc_t2, sc_t3, sc_t4, sc_t5, sc_t6, sc_t7; 7 | unsigned long sc_s0, sc_s1, sc_s2, sc_s3, sc_s4, sc_s5, sc_s6, sc_s7; 8 | unsigned long sc_t8, sc_t9, sc_gp, sc_sp, sc_fp, sc_ra; 9 | 10 | unsigned long sc_epc; 11 | unsigned long sc_cause; 12 | 13 | unsigned long oldmask; 14 | }; 15 | 16 | #endif /* __ASM_MIPS_SIGNAL_H */ 17 | -------------------------------------------------------------------------------- /include/linux/nfs_fs_sb.h: -------------------------------------------------------------------------------- 1 | #ifndef _NFS_FS_SB 2 | #define _NFS_FS_SB 3 | 4 | #include 5 | 6 | struct nfs_server { 7 | struct file *file; 8 | int lock; 9 | struct wait_queue *wait; 10 | int flags; 11 | int rsize; 12 | int wsize; 13 | int timeo; 14 | int retrans; 15 | int acregmin; 16 | int acregmax; 17 | int acdirmin; 18 | int acdirmax; 19 | char hostname[256]; 20 | }; 21 | 22 | /* 23 | * nfs super-block data in memory 24 | */ 25 | 26 | struct nfs_sb_info { 27 | struct nfs_server s_server; 28 | struct nfs_fh s_root; 29 | }; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /arch/mips/boot/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # arch/mips/boot/Makefile 3 | # 4 | # This file is subject to the terms and conditions of the GNU General Public 5 | # License. See the file "COPYING" in the main directory of this archive 6 | # for more details. 7 | # 8 | # Copyright (C) 1995 by Waldorf Electronics, 9 | # written by Ralf Baechle 10 | # 11 | 12 | # 13 | # Fake compressed boot 14 | # 15 | zImage: $(CONFIGURE) $(TOPDIR)/vmlinux 16 | ln -fs $(TOPDIR)/vmlinux zImage 17 | 18 | zdisk: zImage 19 | mcopy -n $(TOPDIR)/vmlinux a:vmlinux 20 | 21 | dep: 22 | 23 | clean: 24 | rm -f zImage 25 | -------------------------------------------------------------------------------- /include/asm-sparc/vaddrs.h: -------------------------------------------------------------------------------- 1 | #ifndef _SPARC_VADDRS_H 2 | #define _SPARC_VADDRS_H 3 | 4 | /* asm-sparc/vaddrs.h: Here will be define the virtual addresses at 5 | * which important I/O addresses will be mapped. 6 | * For instance the timer register virtual address 7 | * is defined here. 8 | * 9 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 10 | */ 11 | 12 | #define TIMER_VADDR 0x3000 /* Next page after where the interrupt enable 13 | * register gets mapped at boot. 14 | */ 15 | 16 | #endif /* !(_SPARC_VADDRS_H) */ 17 | -------------------------------------------------------------------------------- /include/linux/ext_fs_sb.h: -------------------------------------------------------------------------------- 1 | #ifndef _EXT_FS_SB 2 | #define _EXT_FS_SB 3 | 4 | /* 5 | * extended-fs super-block data in memory 6 | */ 7 | struct ext_sb_info { 8 | unsigned long s_ninodes; 9 | unsigned long s_nzones; 10 | unsigned long s_firstdatazone; 11 | unsigned long s_log_zone_size; 12 | unsigned long s_max_size; 13 | unsigned long s_firstfreeblocknumber; 14 | unsigned long s_freeblockscount; 15 | struct buffer_head * s_firstfreeblock; 16 | unsigned long s_firstfreeinodenumber; 17 | unsigned long s_freeinodescount; 18 | struct buffer_head * s_firstfreeinodeblock; 19 | }; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /drivers/block/MAKEDEV.ide1: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | makedev () { 3 | rm -f /dev/$1 4 | echo mknod /dev/$1 $2 $3 $4 && 5 | mknod /dev/$1 $2 $3 $4 && 6 | chown $5 /dev/$1 && 7 | chmod $6 /dev/$1 8 | } 9 | 10 | # Create /dev/hdc* 11 | makedev hdc b 22 0 root:$disk 660 12 | for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 13 | do 14 | makedev hdc$part b 22 `expr 0 + $part` root:$disk 660 15 | done 16 | echo " " 17 | 18 | # Create /dev/hdd* 19 | makedev hdd b 22 64 root:$disk 660 20 | for part in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 21 | do 22 | makedev hdd$part b 22 `expr 64 + $part` root:$disk 660 23 | done 24 | 25 | -------------------------------------------------------------------------------- /arch/sparc/lib/ashrdi3.S: -------------------------------------------------------------------------------- 1 | /* ashrdi3.S: The filesystem code creates all kinds of references to 2 | * this little routine on the sparc with gcc. 3 | * 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 5 | */ 6 | 7 | #include 8 | 9 | .globl C_LABEL(__ashrdi3) 10 | C_LABEL(__ashrdi3): 11 | tst %o2 12 | be 3f 13 | or %g0, 32, %g2 14 | sub %g2, %o2, %g2 15 | tst %g2 16 | bg 1f 17 | sra %o0, %o2, %o4 18 | sra %o0, 31, %o4 19 | sub %g0, %g2, %g2 20 | ba 2f 21 | sra %o0, %g2, %o5 22 | 1: sll %o0, %g2, %g3 23 | srl %o1, %o2, %g2 24 | or %g2, %g3, %o5 25 | 2: or %g0, %o4, %o0 26 | or %g0, %o5, %o1 27 | 3: jmpl %o7 + 8, %g0 28 | nop 29 | -------------------------------------------------------------------------------- /include/asm-sparc/cprefix.h: -------------------------------------------------------------------------------- 1 | /* cprefix.h: This file is included by assembly source which needs 2 | * to know what the c-label prefixes are. The newer versions 3 | * of cpp that come with gcc predefine such things to help 4 | * us out. The reason this stuff is needed is to make 5 | * solaris compiles of the kernel work. 6 | * 7 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 8 | */ 9 | 10 | 11 | #ifndef __svr4__ 12 | #define C_LABEL_PREFIX _ 13 | #else 14 | #define C_LABEL_PREFIX 15 | #endif 16 | 17 | #define CONCAT1(a, b) CONCAT2(a, b) 18 | #define CONCAT2(a, b) a##b 19 | 20 | #define C_LABEL(name) CONCAT1(C_LABEL_PREFIX, name) 21 | -------------------------------------------------------------------------------- /include/linux/minix_fs_sb.h: -------------------------------------------------------------------------------- 1 | #ifndef _MINIX_FS_SB 2 | #define _MINIX_FS_SB 3 | 4 | /* 5 | * minix super-block data in memory 6 | */ 7 | struct minix_sb_info { 8 | unsigned long s_ninodes; 9 | unsigned long s_nzones; 10 | unsigned long s_imap_blocks; 11 | unsigned long s_zmap_blocks; 12 | unsigned long s_firstdatazone; 13 | unsigned long s_log_zone_size; 14 | unsigned long s_max_size; 15 | struct buffer_head * s_imap[8]; 16 | struct buffer_head * s_zmap[8]; 17 | unsigned long s_dirsize; 18 | unsigned long s_namelen; 19 | struct buffer_head * s_sbh; 20 | struct minix_super_block * s_ms; 21 | unsigned short s_mount_state; 22 | }; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /include/linux/tty_flip.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_TTY_FLIP_H 2 | #define _LINUX_TTY_FLIP_H 3 | 4 | #ifdef INCLUDE_INLINE_FUNCS 5 | #define _INLINE_ extern 6 | #else 7 | #define _INLINE_ extern __inline__ 8 | #endif 9 | 10 | _INLINE_ void tty_insert_flip_char(struct tty_struct *tty, 11 | unsigned char ch, char flag) 12 | { 13 | if (tty->flip.count++ >= TTY_FLIPBUF_SIZE) 14 | return; 15 | *tty->flip.flag_buf_ptr++ = flag; 16 | *tty->flip.char_buf_ptr++ = ch; 17 | } 18 | 19 | _INLINE_ void tty_schedule_flip(struct tty_struct *tty) 20 | { 21 | queue_task(&tty->flip.tqueue, &tq_timer); 22 | } 23 | 24 | #undef _INLINE_ 25 | 26 | 27 | #endif /* _LINUX_TTY_FLIP_H */ 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /include/linux/utsname.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_UTSNAME_H 2 | #define _LINUX_UTSNAME_H 3 | 4 | #define __OLD_UTS_LEN 8 5 | 6 | struct oldold_utsname { 7 | char sysname[9]; 8 | char nodename[9]; 9 | char release[9]; 10 | char version[9]; 11 | char machine[9]; 12 | }; 13 | 14 | #define __NEW_UTS_LEN 64 15 | 16 | struct old_utsname { 17 | char sysname[65]; 18 | char nodename[65]; 19 | char release[65]; 20 | char version[65]; 21 | char machine[65]; 22 | }; 23 | 24 | struct new_utsname { 25 | char sysname[65]; 26 | char nodename[65]; 27 | char release[65]; 28 | char version[65]; 29 | char machine[65]; 30 | char domainname[65]; 31 | }; 32 | 33 | extern struct new_utsname system_utsname; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /include/linux/ptrace.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_PTRACE_H 2 | #define _LINUX_PTRACE_H 3 | /* ptrace.h */ 4 | /* structs and defines to help the user use the ptrace system call. */ 5 | 6 | /* has the defines to get at the registers. */ 7 | 8 | #define PTRACE_TRACEME 0 9 | #define PTRACE_PEEKTEXT 1 10 | #define PTRACE_PEEKDATA 2 11 | #define PTRACE_PEEKUSR 3 12 | #define PTRACE_POKETEXT 4 13 | #define PTRACE_POKEDATA 5 14 | #define PTRACE_POKEUSR 6 15 | #define PTRACE_CONT 7 16 | #define PTRACE_KILL 8 17 | #define PTRACE_SINGLESTEP 9 18 | 19 | #define PTRACE_ATTACH 0x10 20 | #define PTRACE_DETACH 0x11 21 | 22 | #define PTRACE_SYSCALL 24 23 | 24 | #include 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /fs/ext2/bitmap.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/fs/ext2/bitmap.c 3 | * 4 | * Copyright (C) 1992, 1993, 1994, 1995 5 | * Remy Card (card@masi.ibp.fr) 6 | * Laboratoire MASI - Institut Blaise Pascal 7 | * Universite Pierre et Marie Curie (Paris VI) 8 | */ 9 | 10 | #include 11 | #include 12 | 13 | static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0}; 14 | 15 | unsigned long ext2_count_free (struct buffer_head * map, unsigned int numchars) 16 | { 17 | unsigned int i; 18 | unsigned long sum = 0; 19 | 20 | if (!map) 21 | return (0); 22 | for (i = 0; i < numchars; i++) 23 | sum += nibblemap[map->b_data[i] & 0xf] + 24 | nibblemap[(map->b_data[i] >> 4) & 0xf]; 25 | return (sum); 26 | } 27 | -------------------------------------------------------------------------------- /include/asm-sparc/idprom.h: -------------------------------------------------------------------------------- 1 | /* idprom.h: Macros and defines for idprom routines 2 | * 3 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 4 | */ 5 | 6 | extern struct linux_romvec *romvec; 7 | 8 | #define IDPROM_ADDR (0xffd04000 + 0x7d8) 9 | #define IDPROM_SIZE 36 10 | 11 | struct idp_struct 12 | { 13 | unsigned char id_f_id; /* format identifier */ 14 | unsigned char id_machtype; /* Machine type */ 15 | unsigned char id_eaddr[6]; /* hardware ethernet address */ 16 | long id_domf; /* Date when this machine was manufactured */ 17 | unsigned int id_sernum:24; /* Unique serial number */ 18 | unsigned char id_cksum; /* XXX */ 19 | unsigned char dummy[16]; /* XXX */ 20 | }; 21 | 22 | -------------------------------------------------------------------------------- /include/linux/if_plip.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NET3 PLIP tuning facilities for the new Niibe PLIP. 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License 6 | * as published by the Free Software Foundation; either version 7 | * 2 of the License, or (at your option) any later version. 8 | * 9 | */ 10 | 11 | #ifndef _LINUX_IF_PLIP_H 12 | #define _LINUX_IF_PLIP_H 13 | 14 | #include 15 | 16 | #define SIOCDEVPLIP SIOCDEVPRIVATE 17 | 18 | struct plipconf 19 | { 20 | unsigned short pcmd; 21 | unsigned long nibble; 22 | unsigned long trigger; 23 | }; 24 | 25 | #define PLIP_GET_TIMEOUT 0x1 26 | #define PLIP_SET_TIMEOUT 0x2 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /include/asm-i386/signal.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASMi386_SIGNAL_H 2 | #define _ASMi386_SIGNAL_H 3 | 4 | struct sigcontext_struct { 5 | unsigned short gs, __gsh; 6 | unsigned short fs, __fsh; 7 | unsigned short es, __esh; 8 | unsigned short ds, __dsh; 9 | unsigned long edi; 10 | unsigned long esi; 11 | unsigned long ebp; 12 | unsigned long esp; 13 | unsigned long ebx; 14 | unsigned long edx; 15 | unsigned long ecx; 16 | unsigned long eax; 17 | unsigned long trapno; 18 | unsigned long err; 19 | unsigned long eip; 20 | unsigned short cs, __csh; 21 | unsigned long eflags; 22 | unsigned long esp_at_signal; 23 | unsigned short ss, __ssh; 24 | unsigned long i387; 25 | unsigned long oldmask; 26 | unsigned long cr2; 27 | }; 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /fs/hpfs/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux HPFS filesystem routines. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .c.s: 11 | $(CC) $(CFLAGS) -S $< 12 | .c.o: 13 | $(CC) $(CFLAGS) -c $< 14 | .s.o: 15 | $(AS) -o $*.o $< 16 | 17 | OBJS= hpfs_fs.o hpfs_caps.o 18 | 19 | hpfs.o: $(OBJS) 20 | $(LD) -r -o hpfs.o $(OBJS) 21 | 22 | dep: 23 | $(CPP) -M *.c > .depend 24 | 25 | # 26 | # include a dependency file if one exists 27 | # 28 | ifeq (.depend,$(wildcard .depend)) 29 | include .depend 30 | endif 31 | -------------------------------------------------------------------------------- /include/asm-m68k/io.h: -------------------------------------------------------------------------------- 1 | #ifndef _M68K_IO_H 2 | #define _M68K_IO_H 3 | 4 | static inline unsigned char get_user_byte_io(const char * addr) 5 | { 6 | register unsigned char _v; 7 | 8 | __asm__ __volatile__ ("moveb %1,%0":"=r" (_v):"m" (*addr)); 9 | return _v; 10 | } 11 | #define inb_p(addr) get_user_byte_io((char *)(addr)) 12 | #define inb(addr) get_user_byte_io((char *)(addr)) 13 | 14 | static inline void put_user_byte_io(char val,char *addr) 15 | { 16 | __asm__ __volatile__ ("moveb %0,%1" 17 | : /* no outputs */ 18 | :"r" (val),"m" (*addr) 19 | : "memory"); 20 | } 21 | #define outb_p(x,addr) put_user_byte_io((x),(char *)(addr)) 22 | #define outb(x,addr) put_user_byte_io((x),(char *)(addr)) 23 | 24 | #endif /* _M68K_IO_H */ 25 | -------------------------------------------------------------------------------- /include/linux/kernel_stat.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_KERNEL_STAT_H 2 | #define _LINUX_KERNEL_STAT_H 3 | 4 | /* 5 | * 'kernel_stat.h' contains the definitions needed for doing 6 | * some kernel statistics (cpu usage, context switches ...), 7 | * used by rstatd/perfmeter 8 | */ 9 | 10 | #define DK_NDRIVE 4 11 | 12 | struct kernel_stat { 13 | unsigned int cpu_user, cpu_nice, cpu_system; 14 | unsigned int dk_drive[DK_NDRIVE]; 15 | unsigned int pgpgin, pgpgout; 16 | unsigned int pswpin, pswpout; 17 | unsigned int interrupts[16]; 18 | unsigned int ipackets, opackets; 19 | unsigned int ierrors, oerrors; 20 | unsigned int collisions; 21 | unsigned int context_swtch; 22 | }; 23 | 24 | extern struct kernel_stat kstat; 25 | 26 | #endif /* _LINUX_KERNEL_STAT_H */ 27 | -------------------------------------------------------------------------------- /net/unix/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the UNIX Protocol Family. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definition is now in the main makefile... 9 | 10 | .c.o: 11 | $(CC) $(CFLAGS) -c $< 12 | .s.o: 13 | $(AS) -o $*.o $< 14 | .c.s: 15 | $(CC) $(CFLAGS) -S $< 16 | 17 | OBJS = sock.o proc.o 18 | 19 | unix.o: $(OBJS) 20 | $(LD) -r -o unix.o $(OBJS) 21 | 22 | dep: 23 | $(CPP) -M *.c > .depend 24 | 25 | tar: 26 | tar -cvf /dev/f1 . 27 | 28 | # 29 | # include a dependency file if one exists 30 | # 31 | ifeq (.depend,$(wildcard .depend)) 32 | include .depend 33 | endif 34 | -------------------------------------------------------------------------------- /arch/i386/mm/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux i386-specific parts of the memory manager. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definition is now in the main makefile... 9 | 10 | .c.o: 11 | $(CC) $(CFLAGS) -c $< 12 | .s.o: 13 | $(AS) -o $*.o $< 14 | .c.s: 15 | $(CC) $(CFLAGS) -S $< 16 | 17 | OBJS = init.o fault.o 18 | 19 | mm.o: $(OBJS) 20 | $(LD) -r -o mm.o $(OBJS) 21 | 22 | modules: 23 | 24 | dep: 25 | $(CPP) -M *.c > .depend 26 | 27 | # 28 | # include a dependency file if one exists 29 | # 30 | ifeq (.depend,$(wildcard .depend)) 31 | include .depend 32 | endif 33 | -------------------------------------------------------------------------------- /arch/mips/mm/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux mips-specific parts of the memory manager. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definition is now in the main makefile... 9 | 10 | .c.o: 11 | $(CC) $(CFLAGS) -c $< 12 | .s.o: 13 | $(AS) -o $*.o $< 14 | .c.s: 15 | $(CC) $(CFLAGS) -S $< 16 | 17 | OBJS = fault.o init.o 18 | 19 | mm.o: $(OBJS) 20 | $(LD) -r -o mm.o $(OBJS) 21 | 22 | modules: 23 | 24 | dep: 25 | $(CPP) -M *.c > .depend 26 | 27 | # 28 | # include a dependency file if one exists 29 | # 30 | ifeq (.depend,$(wildcard .depend)) 31 | include .depend 32 | endif 33 | -------------------------------------------------------------------------------- /kernel/panic.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/kernel/panic.c 3 | * 4 | * Copyright (C) 1991, 1992 Linus Torvalds 5 | */ 6 | 7 | /* 8 | * This function is used through-out the kernel (including mm and fs) 9 | * to indicate a major problem. 10 | */ 11 | #include 12 | 13 | #include 14 | #include 15 | 16 | asmlinkage void sys_sync(void); /* it's really int */ 17 | 18 | NORET_TYPE void panic(const char * fmt, ...) 19 | { 20 | static char buf[1024]; 21 | va_list args; 22 | 23 | va_start(args, fmt); 24 | vsprintf(buf, fmt, args); 25 | va_end(args); 26 | printk(KERN_EMERG "Kernel panic: %s\n",buf); 27 | if (current == task[0]) 28 | printk(KERN_EMERG "In swapper task - not syncing\n"); 29 | else 30 | sys_sync(); 31 | for(;;); 32 | } 33 | -------------------------------------------------------------------------------- /arch/alpha/mm/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux alpha-specific parts of the memory manager. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definition is now in the main makefile... 9 | 10 | .c.o: 11 | $(CC) $(CFLAGS) -c $< 12 | .s.o: 13 | $(AS) -o $*.o $< 14 | .c.s: 15 | $(CC) $(CFLAGS) -S $< 16 | 17 | OBJS = init.o fault.o 18 | 19 | mm.o: $(OBJS) 20 | $(LD) -r -o mm.o $(OBJS) 21 | 22 | modules: 23 | 24 | dep: 25 | $(CPP) -M *.c > .depend 26 | 27 | # 28 | # include a dependency file if one exists 29 | # 30 | ifeq (.depend,$(wildcard .depend)) 31 | include .depend 32 | endif 33 | -------------------------------------------------------------------------------- /fs/proc/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux proc-filesystem routines. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .c.s: 11 | $(CC) $(CFLAGS) -S $< 12 | .c.o: 13 | $(CC) $(CFLAGS) -c $< 14 | .s.o: 15 | $(AS) -o $*.o $< 16 | 17 | OBJS= inode.o root.o base.o mem.o link.o fd.o array.o kmsg.o net.o 18 | 19 | proc.o: $(OBJS) 20 | $(LD) -r -o proc.o $(OBJS) 21 | 22 | dep: 23 | $(CPP) -M *.c > .depend 24 | 25 | # 26 | # include a dependency file if one exists 27 | # 28 | ifeq (.depend,$(wildcard .depend)) 29 | include .depend 30 | endif 31 | -------------------------------------------------------------------------------- /include/asm-mips/bugs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/asm-mips/bugs.h 3 | * 4 | * Copyright (C) 1995 Waldorf Electronics 5 | * written by Ralf Baechle 6 | */ 7 | #include 8 | 9 | /* 10 | * This is included by init/main.c to check for architecture-dependent bugs. 11 | * 12 | * Needs: 13 | * void check_bugs(void); 14 | */ 15 | 16 | extern struct bootinfo boot_info; 17 | 18 | static void check_wait(void) 19 | { 20 | printk("Checking for 'wait' instruction... "); 21 | switch(boot_info.cputype) { 22 | case CPU_R4200: 23 | case CPU_R4600: 24 | wait_available = 1; 25 | printk(" available.\n"); 26 | break; 27 | default: 28 | printk(" unavailable.\n"); 29 | break; 30 | } 31 | } 32 | 33 | static void check_bugs(void) 34 | { 35 | check_wait(); 36 | } 37 | -------------------------------------------------------------------------------- /lib/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for some libs needed in the kernel. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | 9 | .c.s: 10 | $(CC) $(CFLAGS) -S $< 11 | .s.o: 12 | $(AS) -c -o $*.o $< 13 | .c.o: 14 | $(CC) $(CFLAGS) -c $< 15 | 16 | OBJS = ctype.o _exit.o open.o close.o errno.o write.o dup.o setsid.o \ 17 | execve.o wait.o string.o vsprintf.o 18 | 19 | lib.a: $(OBJS) 20 | $(AR) rcs lib.a $(OBJS) 21 | sync 22 | 23 | modules: 24 | dep: 25 | $(CPP) -M *.c > .depend 26 | 27 | # 28 | # include a dependency file if one exists 29 | # 30 | ifeq (.depend,$(wildcard .depend)) 31 | include .depend 32 | endif 33 | 34 | -------------------------------------------------------------------------------- /arch/sparc/mm/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux Sparc-specific parts of the memory manager. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definition is now in the main makefile... 9 | 10 | .c.o: 11 | $(CC) $(CFLAGS) -c $< 12 | .s.o: 13 | $(AS) -o $*.o $< 14 | .c.s: 15 | $(CC) $(CFLAGS) -S $< 16 | 17 | OBJS = fault.o vac-flush.o init.o 18 | 19 | mm.o: $(OBJS) 20 | $(LD) -r -o mm.o $(OBJS) 21 | 22 | modules: 23 | 24 | dep: 25 | $(CPP) -M *.c > .depend 26 | 27 | # 28 | # include a dependency file if one exists 29 | # 30 | ifeq (.depend,$(wildcard .depend)) 31 | include .depend 32 | endif 33 | -------------------------------------------------------------------------------- /drivers/scsi/scsi_ioctl.h: -------------------------------------------------------------------------------- 1 | #ifndef _SCSI_IOCTL_H 2 | #define _SCSI_IOCTL_H 3 | 4 | #define SCSI_IOCTL_PROBE_HOST 0 5 | #define SCSI_IOCTL_SEND_COMMAND 1 6 | #define SCSI_IOCTL_TEST_UNIT_READY 2 7 | #define SCSI_IOCTL_BENCHMARK_COMMAND 3 8 | #define SCSI_IOCTL_SYNC 4 /* Request synchronous parameters */ 9 | /* The door lock/unlock constants are compatible with Sun constants for 10 | the cdrom */ 11 | #define SCSI_IOCTL_DOORLOCK 0x5380 /* lock the eject mechanism */ 12 | #define SCSI_IOCTL_DOORUNLOCK 0x5381 /* unlock the mechanism */ 13 | 14 | #define SCSI_REMOVAL_PREVENT 1 15 | #define SCSI_REMOVAL_ALLOW 0 16 | 17 | extern int scsi_ioctl (Scsi_Device *dev, int cmd, void *arg); 18 | extern int kernel_scsi_ioctl (Scsi_Device *dev, int cmd, void *arg); 19 | 20 | #endif 21 | 22 | 23 | -------------------------------------------------------------------------------- /mm/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux memory manager. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definition is now in the main makefile... 9 | 10 | .c.o: 11 | $(CC) $(CFLAGS) -c $< 12 | .s.o: 13 | $(AS) -o $*.o $< 14 | .c.s: 15 | $(CC) $(CFLAGS) -S $< 16 | 17 | OBJS = memory.o swap.o mmap.o filemap.o mprotect.o kmalloc.o vmalloc.o 18 | 19 | mm.o: $(OBJS) 20 | $(LD) -r -o mm.o $(OBJS) 21 | 22 | modules: 23 | 24 | dep: 25 | $(CPP) -M *.c > .depend 26 | 27 | # 28 | # include a dependency file if one exists 29 | # 30 | ifeq (.depend,$(wildcard .depend)) 31 | include .depend 32 | endif 33 | -------------------------------------------------------------------------------- /arch/alpha/lib/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for alpha-specific library files.. 3 | # 4 | 5 | .c.s: 6 | $(CC) $(CFLAGS) -S $< 7 | .s.o: 8 | $(AS) -c -o $*.o $< 9 | .c.o: 10 | $(CC) $(CFLAGS) -c $< 11 | 12 | OBJS = __divqu.o __remqu.o __divlu.o __remlu.o memset.o 13 | 14 | lib.a: $(OBJS) 15 | $(AR) rcs lib.a $(OBJS) 16 | sync 17 | 18 | __divqu.o: divide.S 19 | $(CC) -DDIV -c -o __divqu.o divide.S 20 | 21 | __remqu.o: divide.S 22 | $(CC) -DREM -c -o __remqu.o divide.S 23 | 24 | __divlu.o: divide.S 25 | $(CC) -DDIV -DINTSIZE -c -o __divlu.o divide.S 26 | 27 | __remlu.o: divide.S 28 | $(CC) -DREM -DINTSIZE -c -o __remlu.o divide.S 29 | 30 | dep: 31 | 32 | # 33 | # include a dependency file if one exists 34 | # 35 | ifeq (.depend,$(wildcard .depend)) 36 | include .depend 37 | endif 38 | 39 | -------------------------------------------------------------------------------- /fs/ext/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux ext-filesystem routines. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .c.s: 11 | $(CC) $(CFLAGS) -S $< 12 | .c.o: 13 | $(CC) $(CFLAGS) -c $< 14 | .s.o: 15 | $(AS) -o $*.o $< 16 | 17 | OBJS= freelists.o truncate.o namei.o inode.o \ 18 | file.o dir.o symlink.o fsync.o 19 | 20 | ext.o: $(OBJS) 21 | $(LD) -r -o ext.o $(OBJS) 22 | 23 | dep: 24 | $(CPP) -M *.c > .depend 25 | 26 | # 27 | # include a dependency file if one exists 28 | # 29 | ifeq (.depend,$(wildcard .depend)) 30 | include .depend 31 | endif 32 | -------------------------------------------------------------------------------- /include/linux/limits.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_LIMITS_H 2 | #define _LINUX_LIMITS_H 3 | 4 | #define NR_OPEN 256 5 | 6 | #define NGROUPS_MAX 32 /* supplemental group IDs are available */ 7 | #define ARG_MAX 131072 /* # bytes of args + environ for exec() */ 8 | #define CHILD_MAX 999 /* no limit :-) */ 9 | #define OPEN_MAX 256 /* # open files a process may have */ 10 | #define LINK_MAX 127 /* # links a file may have */ 11 | #define MAX_CANON 255 /* size of the canonical input queue */ 12 | #define MAX_INPUT 255 /* size of the type-ahead buffer */ 13 | #define NAME_MAX 255 /* # chars in a file name */ 14 | #define PATH_MAX 1024 /* # chars in a path name */ 15 | #define PIPE_BUF 4096 /* # bytes in atomic write to a pipe */ 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /fs/nfs/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux nfs-filesystem routines. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .c.s: 11 | $(CC) $(CFLAGS) -S $< 12 | .c.o: 13 | $(CC) $(CFLAGS) -c $< 14 | .s.o: 15 | $(AS) -o $*.o $< 16 | 17 | OBJS= proc.o sock.o inode.o file.o dir.o \ 18 | symlink.o mmap.o 19 | 20 | nfs.o: $(OBJS) 21 | $(LD) -r -o nfs.o $(OBJS) 22 | 23 | dep: 24 | $(CPP) -M *.c > .depend 25 | 26 | modules: nfs.o 27 | 28 | # 29 | # include a dependency file if one exists 30 | # 31 | ifeq (.depend,$(wildcard .depend)) 32 | include .depend 33 | endif 34 | -------------------------------------------------------------------------------- /net/inet/arp.h: -------------------------------------------------------------------------------- 1 | /* linux/net/inet/arp.h */ 2 | #ifndef _ARP_H 3 | #define _ARP_H 4 | 5 | extern void arp_init(void); 6 | extern void arp_destroy(unsigned long paddr, int force); 7 | extern void arp_device_down(struct device *dev); 8 | extern int arp_rcv(struct sk_buff *skb, struct device *dev, 9 | struct packet_type *pt); 10 | extern int arp_find(unsigned char *haddr, unsigned long paddr, 11 | struct device *dev, unsigned long saddr, struct sk_buff *skb); 12 | extern int arp_get_info(char *buffer, char **start, off_t origin, int length); 13 | extern int arp_ioctl(unsigned int cmd, void *arg); 14 | extern void arp_send(int type, int ptype, unsigned long dest_ip, 15 | struct device *dev, unsigned long src_ip, 16 | unsigned char *dest_hw, unsigned char *src_hw); 17 | 18 | #endif /* _ARP_H */ 19 | -------------------------------------------------------------------------------- /drivers/scsi/scsi_debug.h: -------------------------------------------------------------------------------- 1 | #ifndef _SCSI_DEBUG_H 2 | 3 | #include 4 | 5 | int scsi_debug_detect(Scsi_Host_Template *); 6 | int scsi_debug_command(Scsi_Cmnd *); 7 | int scsi_debug_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)); 8 | int scsi_debug_abort(Scsi_Cmnd *); 9 | int scsi_debug_biosparam(Disk *, int, int[]); 10 | int scsi_debug_reset(Scsi_Cmnd *); 11 | 12 | #ifndef NULL 13 | #define NULL 0 14 | #endif 15 | 16 | #define SCSI_DEBUG_MAILBOXES 8 17 | 18 | #define SCSI_DEBUG {NULL, NULL, "SCSI DEBUG", scsi_debug_detect, NULL, \ 19 | NULL, scsi_debug_command, \ 20 | scsi_debug_queuecommand, \ 21 | scsi_debug_abort, \ 22 | scsi_debug_reset, \ 23 | NULL, \ 24 | scsi_debug_biosparam, \ 25 | SCSI_DEBUG_MAILBOXES, 7, SG_ALL, 1, 0, 1, ENABLE_CLUSTERING} 26 | #endif 27 | -------------------------------------------------------------------------------- /fs/minix/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux minix-filesystem routines. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .c.s: 11 | $(CC) $(CFLAGS) -S $< 12 | .c.o: 13 | $(CC) $(CFLAGS) -c $< 14 | .s.o: 15 | $(AS) -o $*.o $< 16 | 17 | OBJS= bitmap.o truncate.o namei.o inode.o \ 18 | file.o dir.o symlink.o fsync.o 19 | 20 | minix.o: $(OBJS) 21 | $(LD) -r -o minix.o $(OBJS) 22 | 23 | dep: 24 | $(CPP) -M *.c > .depend 25 | 26 | modules: minix.o 27 | 28 | # 29 | # include a dependency file if one exists 30 | # 31 | ifeq (.depend,$(wildcard .depend)) 32 | include .depend 33 | endif 34 | -------------------------------------------------------------------------------- /include/linux/iso_fs_sb.h: -------------------------------------------------------------------------------- 1 | #ifndef _ISOFS_FS_SB 2 | #define _ISOFS_FS_SB 3 | 4 | /* 5 | * minix super-block data in memory 6 | */ 7 | struct isofs_sb_info { 8 | unsigned long s_ninodes; 9 | unsigned long s_nzones; 10 | unsigned long s_firstdatazone; 11 | unsigned long s_log_zone_size; 12 | unsigned long s_max_size; 13 | 14 | unsigned char s_high_sierra; /* A simple flag */ 15 | unsigned char s_mapping; 16 | unsigned char s_conversion; 17 | unsigned char s_rock; 18 | unsigned char s_cruft; /* Broken disks with high 19 | byte of length containing 20 | junk */ 21 | unsigned char s_unhide; 22 | unsigned char s_nosuid; 23 | unsigned char s_nodev; 24 | mode_t s_mode; 25 | gid_t s_gid; 26 | uid_t s_uid; 27 | }; 28 | 29 | #endif 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /arch/i386/ibcs/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the iBCS emulator files 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .S.s: 11 | $(CPP) -traditional $< -o $*.s 12 | .c.s: 13 | $(CC) $(CFLAGS) -S $< 14 | .s.o: 15 | $(AS) -c -o $*.o $< 16 | .c.o: 17 | $(CC) $(CFLAGS) -c $< 18 | 19 | SUBDIRS = 20 | 21 | OBJS = emulate.o 22 | 23 | ibcs.o: $(OBJS) 24 | $(LD) -r -o ibcs.o $(OBJS) 25 | sync 26 | 27 | dep: 28 | $(CPP) -M *.c > .depend 29 | 30 | dummy: 31 | 32 | # 33 | # include a dependency file if one exists 34 | # 35 | ifeq (.depend,$(wildcard .depend)) 36 | include .depend 37 | endif 38 | -------------------------------------------------------------------------------- /fs/ext2/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux ext2-filesystem routines. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .c.s: 11 | $(CC) $(CFLAGS) -S $< 12 | .c.o: 13 | $(CC) $(CFLAGS) -c $< 14 | .s.o: 15 | $(AS) -o $*.o $< 16 | 17 | OBJS= acl.o balloc.o bitmap.o dir.o file.o fsync.o ialloc.o \ 18 | inode.o ioctl.o namei.o super.o symlink.o truncate.o 19 | 20 | ext2.o: $(OBJS) 21 | $(LD) -r -o ext2.o $(OBJS) 22 | 23 | dep: 24 | $(CPP) -M *.c > .depend 25 | 26 | # 27 | # include a dependency file if one exists 28 | # 29 | ifeq (.depend,$(wildcard .depend)) 30 | include .depend 31 | endif 32 | -------------------------------------------------------------------------------- /drivers/sound/sb.h: -------------------------------------------------------------------------------- 1 | #define DSP_RESET (sbc_base + 0x6) 2 | #define DSP_READ (sbc_base + 0xA) 3 | #define DSP_WRITE (sbc_base + 0xC) 4 | #define DSP_COMMAND (sbc_base + 0xC) 5 | #define DSP_STATUS (sbc_base + 0xC) 6 | #define DSP_DATA_AVAIL (sbc_base + 0xE) 7 | #define DSP_DATA_AVL16 (sbc_base + 0xF) 8 | #define MIXER_ADDR (sbc_base + 0x4) 9 | #define MIXER_DATA (sbc_base + 0x5) 10 | #define OPL3_LEFT (sbc_base + 0x0) 11 | #define OPL3_RIGHT (sbc_base + 0x2) 12 | #define OPL3_BOTH (sbc_base + 0x8) 13 | /* DSP Commands */ 14 | 15 | #define DSP_CMD_SPKON 0xD1 16 | #define DSP_CMD_SPKOFF 0xD3 17 | #define DSP_CMD_DMAON 0xD0 18 | #define DSP_CMD_DMAOFF 0xD4 19 | 20 | #define IMODE_NONE 0 21 | #define IMODE_OUTPUT 1 22 | #define IMODE_INPUT 2 23 | #define IMODE_INIT 3 24 | #define IMODE_MIDI 4 25 | 26 | #define NORMAL_MIDI 0 27 | #define UART_MIDI 1 28 | 29 | -------------------------------------------------------------------------------- /fs/isofs/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux isofs-filesystem routines. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .c.s: 11 | $(CC) $(CFLAGS) -S $< 12 | .c.o: 13 | $(CC) $(CFLAGS) -c $< 14 | .s.o: 15 | $(AS) -o $*.o $< 16 | 17 | OBJS= namei.o inode.o file.o dir.o util.o rock.o symlink.o 18 | 19 | isofs.o: $(OBJS) 20 | $(LD) -r -o isofs.o $(OBJS) 21 | 22 | modules: isofs.o 23 | ln -sf ../fs/isofs/isofs.o $(TOPDIR)/modules 24 | 25 | dep: 26 | $(CPP) -M *.c > .depend 27 | 28 | # 29 | # include a dependency file if one exists 30 | # 31 | ifeq (.depend,$(wildcard .depend)) 32 | include .depend 33 | endif 34 | -------------------------------------------------------------------------------- /drivers/scsi/qlogic.h: -------------------------------------------------------------------------------- 1 | #ifndef _QLOGIC_H 2 | #define _QLOGIC_H 3 | 4 | int qlogic_detect(Scsi_Host_Template * ); 5 | const char * qlogic_info(struct Scsi_Host *); 6 | int qlogic_command(Scsi_Cmnd *); 7 | int qlogic_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *)); 8 | int qlogic_abort(Scsi_Cmnd *); 9 | int qlogic_reset(Scsi_Cmnd *); 10 | int qlogic_biosparam(Disk *,int,int[]); 11 | 12 | #ifndef NULL 13 | #define NULL (0) 14 | #endif 15 | 16 | #define QLOGIC { \ 17 | NULL, \ 18 | NULL, \ 19 | NULL, \ 20 | qlogic_detect, \ 21 | NULL, \ 22 | qlogic_info, \ 23 | qlogic_command, \ 24 | qlogic_queuecommand, \ 25 | qlogic_abort, \ 26 | qlogic_reset, \ 27 | NULL, \ 28 | qlogic_biosparam, \ 29 | 0, \ 30 | -1, \ 31 | SG_ALL, \ 32 | 1, \ 33 | 0, \ 34 | 0, \ 35 | DISABLE_CLUSTERING \ 36 | } 37 | 38 | #endif /* _QLOGIC_H */ 39 | -------------------------------------------------------------------------------- /fs/msdos/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux MS-DOS-filesystem routines. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .c.s: 11 | $(CC) $(CFLAGS) -S $< 12 | .c.o: 13 | $(CC) $(CFLAGS) -c $< 14 | .s.o: 15 | $(AS) -o $*.o $< 16 | 17 | OBJS= buffer.o namei.o inode.o file.o dir.o misc.o fat.o mmap.o 18 | 19 | msdos.o: $(OBJS) 20 | $(LD) -r -o msdos.o $(OBJS) 21 | 22 | modules: msdos.o 23 | ln -sf ../fs/msdos/msdos.o $(TOPDIR)/modules 24 | 25 | dep: 26 | $(CPP) -M *.c > .depend 27 | 28 | # 29 | # include a dependency file if one exists 30 | # 31 | ifeq (.depend,$(wildcard .depend)) 32 | include .depend 33 | endif 34 | -------------------------------------------------------------------------------- /fs/xiafs/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the XIAFS filesystem routines. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .c.s: 11 | $(CC) $(CFLAGS) -S $< 12 | .c.o: 13 | $(CC) $(CFLAGS) -c $< 14 | .s.o: 15 | $(AS) -o $*.o $< 16 | 17 | OBJS= bitmap.o truncate.o namei.o inode.o \ 18 | file.o dir.o symlink.o fsync.o 19 | 20 | xiafs.o: $(OBJS) 21 | $(LD) -r -o xiafs.o $(OBJS) 22 | 23 | modules: xiafs.o 24 | ln -sf ../fs/xiafs/xiafs.o $(TOPDIR)/modules 25 | 26 | dep: 27 | $(CPP) -M *.c > .depend 28 | 29 | # 30 | # include a dependency file if one exists 31 | # 32 | ifeq (.depend,$(wildcard .depend)) 33 | include .depend 34 | endif 35 | -------------------------------------------------------------------------------- /include/asm-sparc/asi4m.h: -------------------------------------------------------------------------------- 1 | #ifndef _SPARC_ASI4M_H 2 | #define _SPARC_ASI4M_H 3 | 4 | /* asi4m.h: Address Space Identifier values for sun4m 5 | 6 | Copyright (C) 1995 Paul Hatchman (paul@sfe.com.au) 7 | */ 8 | 9 | #define ASI_PTE 0x0 10 | 11 | #define ASI_NULL1 0x0 12 | #define ASI_NULL2 0x1 13 | #define ASI_CONTROL 0x4 /* hmm? */ 14 | #define ASI_USERTXT 0x8 /* user text */ 15 | #define ASI_KERNELTXT 0x9 /* kernel text */ 16 | #define ASI_USERDATA 0xA /* user data */ 17 | #define ASI_KERNELDATA 0xB /* kernel data */ 18 | 19 | /* cache flushing */ 20 | #define ASI_FLUSHPG 0x10 21 | #define ASI_FLUSHSEG 0x11 22 | #define ASI_FLUSHRGN 0x12 23 | #define ASI_FLUSHCTX 0x13 24 | 25 | /* MMU REGS */ 26 | #define SRMMU_CTL 0x000 27 | #define SRMMU_CTP 0x100 /* set/get context pointer */ 28 | #define SRMMU_CTX 0x200 /* get/set context */ 29 | #endif _SPARC_ASI4M_H 30 | -------------------------------------------------------------------------------- /include/linux/wait.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_WAIT_H 2 | #define _LINUX_WAIT_H 3 | 4 | #define WNOHANG 0x00000001 5 | #define WUNTRACED 0x00000002 6 | 7 | #define __WCLONE 0x80000000 8 | 9 | #ifdef __KERNEL__ 10 | 11 | struct wait_queue { 12 | struct task_struct * task; 13 | struct wait_queue * next; 14 | }; 15 | 16 | struct semaphore { 17 | int count; 18 | struct wait_queue * wait; 19 | }; 20 | 21 | #define MUTEX ((struct semaphore) { 1, NULL }) 22 | #define MUTEX_LOCKED ((struct semaphore) { 0, NULL }) 23 | 24 | struct select_table_entry { 25 | struct wait_queue wait; 26 | struct wait_queue ** wait_address; 27 | }; 28 | 29 | typedef struct select_table_struct { 30 | int nr; 31 | struct select_table_entry * entry; 32 | } select_table; 33 | 34 | #define __MAX_SELECT_TABLE_ENTRIES (4096 / sizeof (struct select_table_entry)) 35 | 36 | #endif /* __KERNEL__ */ 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /ipc/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux ipc. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definition is now in the main makefile... 9 | 10 | .c.o: 11 | $(CC) $(CFLAGS) -c $< 12 | .s.o: 13 | $(AS) -o $*.o $< 14 | .c.s: 15 | $(CC) $(CFLAGS) -S $< 16 | 17 | OBJS = util.o 18 | SRCS = util.c 19 | 20 | ifdef CONFIG_SYSVIPC 21 | OBJS := $(OBJS) msg.o sem.o shm.o 22 | SRCS := $(SRCS) msg.c sem.c shm.c 23 | endif 24 | 25 | ipc.o: $(OBJS) 26 | $(LD) -r -o ipc.o $(OBJS) 27 | 28 | dep: 29 | $(CPP) -M $(SRCS) > .depend 30 | 31 | modules: 32 | dummy: 33 | 34 | # 35 | # include a dependency file if one exists 36 | # 37 | ifeq (.depend,$(wildcard .depend)) 38 | include .depend 39 | endif 40 | -------------------------------------------------------------------------------- /fs/sysv/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the Linux SystemV/Coherent-filesystem routines. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .c.s: 11 | $(CC) $(CFLAGS) -S $< 12 | .c.o: 13 | $(CC) $(CFLAGS) -c $< 14 | .s.o: 15 | $(AS) -o $*.o $< 16 | 17 | OBJS= ialloc.o balloc.o inode.o file.o dir.o symlink.o namei.o \ 18 | fsync.o truncate.o 19 | 20 | sysv.o: $(OBJS) 21 | $(LD) -r -o sysv.o $(OBJS) 22 | 23 | modules: sysv.o 24 | ln -sf ../fs/sysv/sysv.o $(TOPDIR)/modules 25 | 26 | dep: 27 | $(CPP) -M *.c > .depend 28 | 29 | # 30 | # include a dependency file if one exists 31 | # 32 | ifeq (.depend,$(wildcard .depend)) 33 | include .depend 34 | endif 35 | -------------------------------------------------------------------------------- /arch/i386/math-emu/version.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------+ 2 | | version.h | 3 | | | 4 | | | 5 | | Copyright (C) 1992,1993,1994 | 6 | | W. Metzenthen, 22 Parker St, Ormond, Vic 3163, | 7 | | Australia. E-mail billm@vaxc.cc.monash.edu.au | 8 | | | 9 | | | 10 | +---------------------------------------------------------------------------*/ 11 | 12 | #define FPU_VERSION "wm-FPU-emu version 1.20" 13 | -------------------------------------------------------------------------------- /arch/mips/kernel/tynedma.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Tiny Tyne DMA buffer allocator 3 | * 4 | * Copyright (C) 1995 Ralf Baechle 5 | */ 6 | #include 7 | #include 8 | #include 9 | 10 | #ifdef CONFIG_DESKSTATION_TYNE 11 | 12 | static unsigned long allocated; 13 | 14 | /* 15 | * Not very sophisticated, but should suffice for now... 16 | */ 17 | unsigned long deskstation_tyne_dma_alloc(size_t size) 18 | { 19 | unsigned long ret = allocated; 20 | allocated += size; 21 | if (allocated > boot_info.dma_cache_size) 22 | ret = -1; 23 | return ret; 24 | } 25 | 26 | void deskstation_tyne_dma_init(void) 27 | { 28 | if (boot_info.machtype != MACH_DESKSTATION_TYNE) 29 | return; 30 | allocated = 0; 31 | printk ("Deskstation Tyne DMA (%luk) buffer initialized.\n", 32 | boot_info.dma_cache_size >> 10); 33 | } 34 | 35 | #endif /* CONFIG_DESKSTATION_TYNE */ 36 | -------------------------------------------------------------------------------- /drivers/char/vt_kern.h: -------------------------------------------------------------------------------- 1 | #ifndef _VT_KERN_H 2 | #define _VT_KERN_H 3 | 4 | /* 5 | * this really is an extension of the vc_cons structure in console.c, but 6 | * with information needed by the vt package 7 | */ 8 | 9 | #include 10 | 11 | extern struct vt_struct { 12 | int vc_num; /* The console number */ 13 | unsigned char vc_mode; /* KD_TEXT, ... */ 14 | unsigned char vc_kbdraw; 15 | unsigned char vc_kbde0; 16 | unsigned char vc_kbdleds; 17 | struct vt_mode vt_mode; 18 | int vt_pid; 19 | int vt_newvt; 20 | struct wait_queue *paste_wait; 21 | } *vt_cons[MAX_NR_CONSOLES]; 22 | 23 | void kd_mksound(unsigned int count, unsigned int ticks); 24 | int vc_allocate(unsigned int console); 25 | int vc_cons_allocated(unsigned int console); 26 | int vc_resize(unsigned long lines, unsigned long cols); 27 | void vc_disallocate(unsigned int console); 28 | 29 | #endif /* _VT_KERN_H */ 30 | -------------------------------------------------------------------------------- /include/asm-mips/cachectl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/asm-mips/cachectl.h 3 | * 4 | * Written by Ralf Baechle, 5 | * Copyright (C) 1994 by Waldorf GMBH 6 | * 7 | * Defines for Risc/OS compatible cacheflush systemcall 8 | */ 9 | #ifndef __ASM_MIPS_CACHECTL 10 | #define __ASM_MIPS_CACHECTL 11 | 12 | /* 13 | * cachectl.h -- defines for MIPS cache control system calls 14 | */ 15 | 16 | /* 17 | * Options for cacheflush system call 18 | */ 19 | #define ICACHE (1<<0) /* flush instruction cache */ 20 | #define DCACHE (1<<1) /* writeback and flush data cache */ 21 | #define BCACHE (ICACHE|DCACHE) /* flush both caches */ 22 | 23 | #define CACHELINES 512 /* number of cachelines */ 24 | 25 | #ifdef __KERNEL__ 26 | #ifndef __ASSEMBLY__ 27 | 28 | extern int sys_cacheflush(void *addr, int nbytes, int cache); 29 | 30 | #endif 31 | #endif 32 | #endif /* __ASM_MIPS_CACHECTL */ 33 | -------------------------------------------------------------------------------- /arch/mips/kernel/tlb.S: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/mips/kernel/head.S 3 | * 4 | * Copyright (C) 1994 Waldorf Electronics 5 | * Written by Ralf Baechle and Andreas Busse 6 | * 7 | * Head.S contains the MIPS exception handler and startup code. 8 | * Flush the TLB 9 | * 10 | * FIXME: knows only how to handle R4x00 11 | * Read appendix f of the R4000 manual before you change something! 12 | */ 13 | 14 | #include 15 | #include 16 | #include 17 | 18 | .globl _tlbflush 19 | _tlbflush: li t0,PM_4K 20 | mtc0 t0,CP0_PAGEMASK 21 | lw t0,_boot_info+OFFSET_BOOTINFO_TLB_ENTRIES(t0) 22 | li t0,48 23 | dmtc0 zero,CP0_ENTRYLO0 24 | dmtc0 zero,CP0_ENTRYLO1 25 | mfc0 t2,CP0_WIRED 26 | 1: subu t0,t0,1 27 | mtc0 t0,CP0_INDEX 28 | lui t1,0x0008 29 | or t1,t0,t1 30 | dsll t1,t1,13 31 | dmtc0 t1,CP0_ENTRYHI 32 | bne t2,t0,1b 33 | tlbwi # delay slot 34 | jr ra 35 | nop 36 | -------------------------------------------------------------------------------- /include/linux/udp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * INET An implementation of the TCP/IP protocol suite for the LINUX 3 | * operating system. INET is implemented using the BSD Socket 4 | * interface as the means of communication with the user level. 5 | * 6 | * Definitions for the UDP protocol. 7 | * 8 | * Version: @(#)udp.h 1.0.2 04/28/93 9 | * 10 | * Author: Fred N. van Kempen, 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU General Public License 14 | * as published by the Free Software Foundation; either version 15 | * 2 of the License, or (at your option) any later version. 16 | */ 17 | #ifndef _LINUX_UDP_H 18 | #define _LINUX_UDP_H 19 | 20 | 21 | struct udphdr { 22 | unsigned short source; 23 | unsigned short dest; 24 | unsigned short len; 25 | unsigned short check; 26 | }; 27 | 28 | 29 | #endif /* _LINUX_UDP_H */ 30 | -------------------------------------------------------------------------------- /arch/alpha/lib/memset.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/arch/alpha/lib/memset.c 3 | * 4 | * Copyright (C) 1995 Linus Torvalds 5 | */ 6 | 7 | /* 8 | * These are only slightly optimized so far.. 9 | */ 10 | 11 | #include 12 | 13 | void * __constant_c_memset(void * s, unsigned long c, long count) 14 | { 15 | unsigned long xs = (unsigned long) s; 16 | 17 | /* 18 | * the first and last parts could be done with just one 19 | * unaligned load/store, but I don't want to think about it 20 | */ 21 | while (count > 0 && (xs & 7)) { 22 | *(char *) xs = c; 23 | count--; xs++; 24 | } 25 | while (count > 7) { 26 | *(unsigned long *) xs = c; 27 | count -=8; xs += 8; 28 | } 29 | while (count > 0) { 30 | *(char *) xs = c; 31 | count--; xs++; 32 | } 33 | return s; 34 | } 35 | 36 | void * __memset(void * s,char c,size_t count) 37 | { 38 | char *xs = (char *) s; 39 | 40 | while (count--) 41 | *xs++ = c; 42 | 43 | return s; 44 | } 45 | -------------------------------------------------------------------------------- /drivers/net/LICENSE.SRC: -------------------------------------------------------------------------------- 1 | Code in this directory written at the IDA Supercomputing Research Center 2 | carries the following copyright and license. 3 | 4 | Copyright 1993 United States Government as represented by the 5 | Director, National Security Agency. This software may be used 6 | and distributed according to the terms of the GNU Public License, 7 | incorporated herein by reference. 8 | 9 | In addition to the disclaimers in the GPL, SRC expressly disclaims any 10 | and all warranties, expressed or implied, concerning the enclosed software. 11 | This software was developed at SRC for use in internal research, and the 12 | intent in sharing this software is to promote the productive interchange 13 | of ideas throughout the research community. All software is furnished 14 | on an "as-is" basis. No further updates to this software should be 15 | expected. Although updates may occur, no commitment exists. 16 | -------------------------------------------------------------------------------- /include/linux/math_emu.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_MATH_EMU_H 2 | #define _LINUX_MATH_EMU_H 3 | 4 | struct fpu_reg { 5 | char sign; 6 | char tag; 7 | long exp; 8 | unsigned sigl; 9 | unsigned sigh; 10 | }; 11 | 12 | 13 | /* This structure matches the layout of the data saved to the stack 14 | following a device-not-present interrupt, part of it saved 15 | automatically by the 80386/80486. 16 | */ 17 | struct info { 18 | long ___orig_eip; 19 | long ___ret_from_system_call; 20 | long ___ebx; 21 | long ___ecx; 22 | long ___edx; 23 | long ___esi; 24 | long ___edi; 25 | long ___ebp; 26 | long ___eax; 27 | long ___ds; 28 | long ___es; 29 | long ___fs; 30 | long ___gs; 31 | long ___orig_eax; 32 | long ___eip; 33 | long ___cs; 34 | long ___eflags; 35 | long ___esp; 36 | long ___ss; 37 | long ___vm86_es; /* This and the following only in vm86 mode */ 38 | long ___vm86_ds; 39 | long ___vm86_fs; 40 | long ___vm86_gs; 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /net/inet/pe2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "datalink.h" 4 | #include 5 | #include 6 | 7 | static void 8 | pEII_datalink_header(struct datalink_proto *dl, 9 | struct sk_buff *skb, unsigned char *dest_node) 10 | { 11 | struct device *dev = skb->dev; 12 | unsigned long len = skb->len; 13 | unsigned long hard_len = dev->hard_header_len; 14 | 15 | dev->hard_header(skb->data, dev, ETH_P_IPX, 16 | dest_node, NULL, len - hard_len, skb); 17 | skb->h.raw = skb->data + hard_len; 18 | } 19 | 20 | struct datalink_proto * 21 | make_EII_client(void) 22 | { 23 | struct datalink_proto *proto; 24 | 25 | proto = (struct datalink_proto *) kmalloc(sizeof(*proto), GFP_ATOMIC); 26 | if (proto != NULL) { 27 | proto->type_len = 0; 28 | proto->header_length = 0; 29 | proto->datalink_header = pEII_datalink_header; 30 | proto->string_name = "EtherII"; 31 | } 32 | 33 | return proto; 34 | } 35 | 36 | -------------------------------------------------------------------------------- /arch/sparc/lib/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for Sparc library files.. 3 | # 4 | 5 | CFLAGS := $(CFLAGS) -ansi 6 | 7 | .c.s: 8 | $(CC) $(CFLAGS) -S $< 9 | .s.o: 10 | $(AS) -c -o $*.o $< 11 | .c.o: 12 | $(CC) $(CFLAGS) -c $< 13 | 14 | OBJS = mul.o rem.o sdiv.o udiv.o umul.o urem.o ashrdi3.o 15 | 16 | lib.a: $(OBJS) 17 | $(AR) rcs lib.a $(OBJS) 18 | sync 19 | 20 | mul.o: mul.S 21 | $(CC) -c -o mul.o mul.S 22 | 23 | rem.o: rem.S 24 | $(CC) -DST_DIV0=0x2 -c -o rem.o rem.S 25 | 26 | sdiv.o: sdiv.S 27 | $(CC) -DST_DIV0=0x2 -c -o sdiv.o sdiv.S 28 | 29 | udiv.o: udiv.S 30 | $(CC) -DST_DIV0=0x2 -c -o udiv.o udiv.S 31 | 32 | umul.o: umul.S 33 | $(CC) -c -o umul.o umul.S 34 | 35 | urem.o: urem.S 36 | $(CC) -DST_DIV0=0x2 -c -o urem.o urem.S 37 | 38 | ashrdi3.o: ashrdi3.S 39 | $(CC) -c -o ashrdi3.o ashrdi3.S 40 | 41 | dep: 42 | 43 | # 44 | # include a dependency file if one exists 45 | # 46 | ifeq (.depend,$(wildcard .depend)) 47 | include .depend 48 | endif 49 | -------------------------------------------------------------------------------- /net/inet/p8023.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "datalink.h" 4 | #include 5 | #include 6 | 7 | static void 8 | p8023_datalink_header(struct datalink_proto *dl, 9 | struct sk_buff *skb, unsigned char *dest_node) 10 | { 11 | struct device *dev = skb->dev; 12 | unsigned long len = skb->len; 13 | unsigned long hard_len = dev->hard_header_len; 14 | 15 | dev->hard_header(skb->data, dev, len - hard_len, 16 | dest_node, NULL, len - hard_len, skb); 17 | skb->h.raw = skb->data + hard_len; 18 | } 19 | 20 | struct datalink_proto * 21 | make_8023_client(void) 22 | { 23 | struct datalink_proto *proto; 24 | 25 | proto = (struct datalink_proto *) kmalloc(sizeof(*proto), GFP_ATOMIC); 26 | if (proto != NULL) { 27 | proto->type_len = 0; 28 | proto->header_length = 0; 29 | proto->datalink_header = p8023_datalink_header; 30 | proto->string_name = "802.3"; 31 | } 32 | 33 | return proto; 34 | } 35 | 36 | -------------------------------------------------------------------------------- /arch/i386/boot/compressed/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # linux/arch/i386/boot/compressed/Makefile 3 | # 4 | # create a compressed vmlinux image from the original vmlinux 5 | # 6 | 7 | HEAD = head.o 8 | SYSTEM = $(TOPDIR)/vmlinux 9 | 10 | OBJECTS = $(HEAD) inflate.o unzip.o misc.o 11 | 12 | CFLAGS = -O2 -DSTDC_HEADERS 13 | 14 | .c.s: 15 | $(CC) $(CFLAGS) -S $< 16 | .s.o: 17 | $(AS) -o $*.o $< 18 | .c.o: 19 | $(CC) $(CFLAGS) -c $< 20 | 21 | all: vmlinux 22 | 23 | vmlinux: piggy.o $(OBJECTS) 24 | $(LD) $(ZLINKFLAGS) -o vmlinux $(OBJECTS) piggy.o 25 | 26 | head.o: head.s 27 | 28 | head.s: head.S $(TOPDIR)/include/linux/tasks.h 29 | $(CPP) -traditional head.S -o head.s 30 | 31 | piggy.o: $(SYSTEM) xtract piggyback 32 | ./xtract $(SYSTEM) | gzip -9 | ./piggyback > piggy.o 33 | 34 | xtract: xtract.c 35 | $(HOSTCC) $(CFLAGS) -o xtract xtract.c 36 | 37 | piggyback: piggyback.c 38 | $(HOSTCC) $(CFLAGS) -o piggyback piggyback.c 39 | 40 | clean: 41 | rm -f xtract piggyback vmlinux 42 | -------------------------------------------------------------------------------- /include/linux/ext2_fs_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/include/linux/ext2_fs_i.h 3 | * 4 | * Copyright (C) 1992, 1993, 1994, 1995 5 | * Remy Card (card@masi.ibp.fr) 6 | * Laboratoire MASI - Institut Blaise Pascal 7 | * Universite Pierre et Marie Curie (Paris VI) 8 | * 9 | * from 10 | * 11 | * linux/include/linux/minix_fs_i.h 12 | * 13 | * Copyright (C) 1991, 1992 Linus Torvalds 14 | */ 15 | 16 | #ifndef _LINUX_EXT2_FS_I 17 | #define _LINUX_EXT2_FS_I 18 | 19 | /* 20 | * second extended file system inode data in memory 21 | */ 22 | struct ext2_inode_info { 23 | __u32 i_data[15]; 24 | __u32 i_flags; 25 | __u32 i_faddr; 26 | __u8 i_frag_no; 27 | __u8 i_frag_size; 28 | __u16 i_osync; 29 | __u32 i_file_acl; 30 | __u32 i_dir_acl; 31 | __u32 i_dtime; 32 | __u32 i_version; 33 | __u32 i_block_group; 34 | __u32 i_next_alloc_block; 35 | __u32 i_next_alloc_goal; 36 | __u32 i_prealloc_block; 37 | __u32 i_prealloc_count; 38 | }; 39 | 40 | #endif /* _LINUX_EXT2_FS_I */ 41 | -------------------------------------------------------------------------------- /include/linux/ldt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ldt.h 3 | * 4 | * Definitions of structures used with the modify_ldt system call. 5 | */ 6 | #ifndef _LINUX_LDT_H 7 | #define _LINUX_LDT_H 8 | 9 | /* Maximum number of LDT entries supported. */ 10 | #define LDT_ENTRIES 8192 11 | /* The size of each LDT entry. */ 12 | #define LDT_ENTRY_SIZE 8 13 | 14 | struct modify_ldt_ldt_s { 15 | unsigned int entry_number; 16 | unsigned long base_addr; 17 | unsigned int limit; 18 | unsigned int seg_32bit:1; 19 | unsigned int contents:2; 20 | unsigned int read_exec_only:1; 21 | unsigned int limit_in_pages:1; 22 | unsigned int seg_not_present:1; 23 | }; 24 | 25 | #define MODIFY_LDT_CONTENTS_DATA 0 26 | #define MODIFY_LDT_CONTENTS_STACK 1 27 | #define MODIFY_LDT_CONTENTS_CODE 2 28 | 29 | extern int get_ldt(void *buffer); 30 | extern int set_ldt_entry(int entry, unsigned long base, unsigned int limit, 31 | int seg_32bit_flag, int contents, int read_only_flag, 32 | int limit_in_pages_flag); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /include/linux/hpfs_fs_i.h: -------------------------------------------------------------------------------- 1 | #ifndef _HPFS_FS_I 2 | #define _HPFS_FS_I 3 | 4 | struct hpfs_inode_info { 5 | ino_t i_parent_dir; /* (directories) gives fnode of parent dir */ 6 | unsigned i_dno; /* (directories) root dnode */ 7 | unsigned i_dpos; /* (directories) temp for readdir */ 8 | unsigned i_dsubdno; /* (directories) temp for readdir */ 9 | unsigned i_file_sec; /* (files) minimalist cache of alloc info */ 10 | unsigned i_disk_sec; /* (files) minimalist cache of alloc info */ 11 | unsigned i_n_secs; /* (files) minimalist cache of alloc info */ 12 | unsigned i_conv : 2; /* (files) crlf->newline hackery */ 13 | }; 14 | 15 | #define i_hpfs_dno u.hpfs_i.i_dno 16 | #define i_hpfs_parent_dir u.hpfs_i.i_parent_dir 17 | #define i_hpfs_n_secs u.hpfs_i.i_n_secs 18 | #define i_hpfs_file_sec u.hpfs_i.i_file_sec 19 | #define i_hpfs_disk_sec u.hpfs_i.i_disk_sec 20 | #define i_hpfs_dpos u.hpfs_i.i_dpos 21 | #define i_hpfs_dsubdno u.hpfs_i.i_dsubdno 22 | #define i_hpfs_conv u.hpfs_i.i_conv 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /versions.mk: -------------------------------------------------------------------------------- 1 | ifdef CONFIG_MODVERSIONS 2 | TOPINCL := $(TOPDIR)/include/linux 3 | 4 | # Uses SYMTAB_OBJS 5 | # Separate the object into "normal" objects and "exporting" objects 6 | # Exporting objects are: all objects that define symbol tables 7 | # 8 | # Add dependence on $(SYMTAB_OBJS) to the main target 9 | # 10 | 11 | .SUFFIXES: .ver 12 | 13 | .c.ver: 14 | @if [ ! -x /sbin/genksyms ]; then echo "Please read: README.modules"; fi 15 | $(CC) $(CFLAGS) -E -DCONFIG_MODVERSIONS -D__GENKSYMS__ $< | /sbin/genksyms -w $(TOPINCL)/modules 16 | @ln -sf $(TOPINCL)/modules/$@ . 17 | 18 | $(SYMTAB_OBJS): 19 | $(CC) $(CFLAGS) -DEXPORT_SYMTAB -c $(@:.o=.c) 20 | 21 | $(SYMTAB_OBJS:.o=.ver): $(TOPINCL)/autoconf.h 22 | 23 | $(TOPINCL)/modversions.h: $(SYMTAB_OBJS:.o=.ver) 24 | @echo updating $(TOPINCL)/modversions.h 25 | @(cd $(TOPINCL)/modules; for f in *.ver;\ 26 | do echo "#include "; done) \ 27 | > $(TOPINCL)/modversions.h 28 | 29 | dep: $(TOPINCL)/modversions.h 30 | 31 | endif 32 | -------------------------------------------------------------------------------- /arch/sparc/kernel/traps.c: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/sparc/kernel/traps.c 3 | * 4 | * Copyright 1994 David S. Miller (davem@caip.rutgers.edu) 5 | */ 6 | 7 | /* 8 | * I hate traps on the sparc, grrr... 9 | */ 10 | 11 | #include /* for jiffies */ 12 | #include 13 | 14 | void do_hw_interrupt(unsigned long type, unsigned long vector) 15 | { 16 | if (vector == 14) { 17 | jiffies++; 18 | return; 19 | } 20 | 21 | /* Just print garbage for everything else for now. */ 22 | 23 | printk("Unimplemented Sparc TRAP, vector = %lx type = %lx\n", vector, type); 24 | 25 | return; 26 | } 27 | 28 | extern unsigned long *trapbase; 29 | 30 | void trap_init(void) 31 | { 32 | 33 | /* load up the trap table */ 34 | 35 | #if 0 /* not yet */ 36 | __asm__("wr %0, 0x0, %%tbr\n\t" 37 | "nop; nop; nop\n\t" : : 38 | "r" (trapbase)); 39 | #endif 40 | 41 | return; 42 | } 43 | 44 | void die_if_kernel(char * str, struct pt_regs * regs, long err) 45 | { 46 | return; 47 | } 48 | -------------------------------------------------------------------------------- /arch/alpha/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # alpha/Makefile 3 | # 4 | # This file is subject to the terms and conditions of the GNU General Public 5 | # License. See the file "COPYING" in the main directory of this archive 6 | # for more details. 7 | # 8 | # Copyright (C) 1994 by Linus Torvalds 9 | # 10 | 11 | NM := nm -B 12 | 13 | LINKFLAGS = -non_shared -T 0xfffffc0000310000 -N 14 | CFLAGS := $(CFLAGS) -mno-fp-regs 15 | 16 | HEAD := arch/alpha/kernel/head.o 17 | 18 | SUBDIRS := $(SUBDIRS) arch/alpha/kernel arch/alpha/mm arch/alpha/lib 19 | ARCHIVES := arch/alpha/kernel/kernel.o arch/alpha/mm/mm.o $(ARCHIVES) 20 | LIBS := $(TOPDIR)/arch/alpha/lib/lib.a $(LIBS) $(TOPDIR)/arch/alpha/lib/lib.a 21 | 22 | MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot 23 | 24 | # 25 | # my boot writes directly to a specific disk partition, I doubt most 26 | # people will want to do that without changes.. 27 | # 28 | msb my-special-boot: 29 | @$(MAKEBOOT) msb 30 | 31 | archclean: 32 | @$(MAKEBOOT) clean 33 | 34 | archdep: 35 | @$(MAKEBOOT) dep 36 | -------------------------------------------------------------------------------- /fs/hpfs/README: -------------------------------------------------------------------------------- 1 | Linux can read, but not write, OS/2 HPFS partitions. 2 | 3 | Mount options are the same as for msdos partitions. 4 | 5 | uid=nnn All files in the partition will be owned by user id nnn. 6 | gid=nnn All files in the partition will be in group nnn. 7 | umask=nnn The permission mask (see umask(1)) for the partition. 8 | conv=binary Data is returned exactly as is, with CRLF's. [default] 9 | conv=text (Carriage return, line feed) is replaced with newline. 10 | conv=auto Chooses, file by file, conv=binary or conv=text (by guessing) 11 | 12 | There is one mount option unique to HPFS. 13 | 14 | case=lower Convert file names to lower case. [default] 15 | case=asis Return file names as is, in mixed case. 16 | 17 | Case is not significant in filename matching, like real HPFS. 18 | 19 | 20 | Command line example 21 | mkdir -p /os2/c 22 | mount -t hpfs -o uid=100,gid=100 /dev/sda6 /os2/c 23 | 24 | /etc/fstab example 25 | /dev/sdb5 /d/f hpfs ro,uid=402,gid=402,umask=002 26 | -------------------------------------------------------------------------------- /include/linux/msdos_fs_sb.h: -------------------------------------------------------------------------------- 1 | #ifndef _MSDOS_FS_SB 2 | #define _MSDOS_FS_SB 3 | 4 | /* 5 | * MS-DOS file system in-core superblock data 6 | */ 7 | 8 | struct msdos_sb_info { 9 | unsigned short cluster_size; /* sectors/cluster */ 10 | unsigned char fats,fat_bits; /* number of FATs, FAT bits (12 or 16) */ 11 | unsigned short fat_start,fat_length; /* FAT start & length (sec.) */ 12 | unsigned short dir_start,dir_entries; /* root dir start & entries */ 13 | unsigned short data_start; /* first data sector */ 14 | unsigned long clusters; /* number of clusters */ 15 | uid_t fs_uid; 16 | gid_t fs_gid; 17 | int quiet; /* fake successful chmods and chowns */ 18 | unsigned short fs_umask; 19 | unsigned char name_check; /* r = relaxed, n = normal, s = strict */ 20 | unsigned char conversion; /* b = binary, t = text, a = auto */ 21 | struct wait_queue *fat_wait; 22 | int fat_lock; 23 | int prev_free; /* previously returned free cluster number */ 24 | int free_clusters; /* -1 if undefined */ 25 | }; 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /include/linux/mman.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_MMAN_H 2 | #define _LINUX_MMAN_H 3 | 4 | #define PROT_READ 0x1 /* page can be read */ 5 | #define PROT_WRITE 0x2 /* page can be written */ 6 | #define PROT_EXEC 0x4 /* page can be executed */ 7 | #define PROT_NONE 0x0 /* page can not be accessed */ 8 | 9 | #define MAP_SHARED 1 /* Share changes */ 10 | #define MAP_PRIVATE 2 /* Changes are private */ 11 | #define MAP_TYPE 0xf /* Mask for type of mapping */ 12 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ 13 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ 14 | 15 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ 16 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ 17 | #define MAP_EXECUTABLE 0x1000 /* mark it as a executable */ 18 | 19 | #define MS_ASYNC 1 /* sync memory asynchronously */ 20 | #define MS_INVALIDATE 2 /* invalidate the caches */ 21 | #define MS_SYNC 4 /* synchronous memory sync */ 22 | 23 | #endif /* _LINUX_MMAN_H */ 24 | -------------------------------------------------------------------------------- /include/linux/malloc.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_MALLOC_H 2 | #define _LINUX_MALLOC_H 3 | 4 | #include 5 | #include 6 | 7 | #ifdef CONFIG_DEBUG_MALLOC 8 | #define kmalloc(a,b) deb_kmalloc(__FILE__,__LINE__,a,b) 9 | #define kfree_s(a,b) deb_kfree_s(__FILE__,__LINE__,a,b) 10 | 11 | void *deb_kmalloc(const char *deb_file, unsigned short deb_line,unsigned int size, int priority); 12 | void deb_kfree_s (const char *deb_file, unsigned short deb_line,void * obj, int size); 13 | void deb_kcheck_s(const char *deb_file, unsigned short deb_line,void * obj, int size); 14 | 15 | #define kfree(a) deb_kfree_s(__FILE__,__LINE__, a,0) 16 | #define kcheck(a) deb_kcheck_s(__FILE__,__LINE__, a,0) 17 | #define kcheck_s(a,b) deb_kcheck_s(__FILE__,__LINE__, a,b) 18 | 19 | #else /* !debug */ 20 | 21 | void * kmalloc(unsigned int size, int priority); 22 | void kfree_s(void * obj, int size); 23 | 24 | #define kcheck_s(a,b) 0 25 | 26 | #define kfree(x) kfree_s((x), 0) 27 | #define kcheck(x) kcheck_s((x), 0) 28 | 29 | #endif 30 | 31 | #endif /* _LINUX_MALLOC_H */ 32 | -------------------------------------------------------------------------------- /arch/sparc/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # sparc/Makefile 3 | # 4 | # Makefile for the architecture dependent flags and dependencies on the 5 | # Sparc. 6 | # 7 | # Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu) 8 | # 9 | 10 | 11 | # If the solaris /bin/sh wasn't so broken, I wouldn't need the following 12 | # line... 13 | SHELL =/bin/bash 14 | 15 | # 16 | # How to link, we send the linker the address at which the text section 17 | # is to start. The prom loads us at 0x0-kernel_size. There is also an 18 | # alias of this address space at 0xf8000000-(0xf8000000+kernel_size) but 19 | # I ignore it and eliminate those mappings during vm initialization and 20 | # just leave the low mapping. 21 | # 22 | LINKFLAGS = -N -Ttext 0x00004000 23 | CFLAGS := $(CFLAGS) -pipe 24 | 25 | HEAD := arch/sparc/kernel/head.o 26 | 27 | SUBDIRS := $(SUBDIRS) arch/sparc/kernel arch/sparc/lib arch/sparc/mm 28 | ARCHIVES := arch/sparc/kernel/kernel.o arch/sparc/mm/mm.o $(ARCHIVES) 29 | LIBS := $(TOPDIR)/lib/lib.a $(LIBS) $(TOPDIR)/arch/sparc/lib/lib.a 30 | 31 | archclean: 32 | 33 | archdep: 34 | -------------------------------------------------------------------------------- /fs/umsdos/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the umsdos unix-like filesystem routines. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .c.s: 11 | $(CC) $(CFLAGS) -S $< 12 | .c.o: 13 | $(CC) $(CFLAGS) -c $< 14 | .s.o: 15 | $(AS) -o $*.o $< 16 | 17 | OBJS= dir.o emd.o file.o inode.o ioctl.o mangle.o namei.o\ 18 | rdir.o symlink.o #check.o 19 | 20 | umsdos.o: $(OBJS) 21 | $(LD) -r -o umsdos.o $(OBJS) 22 | 23 | modules: umsdos.o 24 | ln -sf ../fs/umsdos/umsdos.o $(TOPDIR)/modules 25 | 26 | clean: 27 | rm -f core *.o *.a *.s 28 | 29 | dep: 30 | $(CPP) -M *.c > .depend 31 | 32 | p: 33 | proto *.c >/usr/include/linux/umsdos_fs.p 34 | 35 | doc: 36 | nadoc -i -p umsdos.doc - /tmp/umsdos.mpg 37 | 38 | # 39 | # include a dependency file if one exists 40 | # 41 | ifeq (.depend,$(wildcard .depend)) 42 | include .depend 43 | endif 44 | -------------------------------------------------------------------------------- /include/asm-sparc/irq.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALPHA_IRQ_H 2 | #define _ALPHA_IRQ_H 3 | 4 | /* 5 | * linux/include/asm-sparc/irq.h 6 | * 7 | * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu) 8 | */ 9 | 10 | #include 11 | 12 | extern void disable_irq(unsigned int); 13 | extern void enable_irq(unsigned int); 14 | 15 | #define __STR(x) #x 16 | #define STR(x) __STR(x) 17 | 18 | #define SAVE_ALL "xx" 19 | 20 | #define SAVE_MOST "yy" 21 | 22 | #define RESTORE_MOST "zz" 23 | 24 | #define ACK_FIRST(mask) "aa" 25 | 26 | #define ACK_SECOND(mask) "dummy" 27 | 28 | #define UNBLK_FIRST(mask) "dummy" 29 | 30 | #define UNBLK_SECOND(mask) "dummy" 31 | 32 | #define IRQ_NAME2(nr) nr##_interrupt(void) 33 | #define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr) 34 | #define FAST_IRQ_NAME(nr) IRQ_NAME2(fast_IRQ##nr) 35 | #define BAD_IRQ_NAME(nr) IRQ_NAME2(bad_IRQ##nr) 36 | 37 | #define BUILD_IRQ(chip,nr,mask) \ 38 | asmlinkage void IRQ_NAME(nr); \ 39 | asmlinkage void FAST_IRQ_NAME(nr); \ 40 | asmlinkage void BAD_IRQ_NAME(nr); \ 41 | asm code comes here 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /arch/i386/math-emu/fpu_asm.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------+ 2 | | fpu_asm.h | 3 | | | 4 | | Copyright (C) 1992 W. Metzenthen, 22 Parker St, Ormond, Vic 3163, | 5 | | Australia. E-mail billm@vaxc.cc.monash.edu.au | 6 | | | 7 | +---------------------------------------------------------------------------*/ 8 | 9 | #ifndef _FPU_ASM_H_ 10 | #define _FPU_ASM_H_ 11 | 12 | #include "fpu_emu.h" 13 | 14 | #define EXCEPTION _exception 15 | 16 | 17 | #define PARAM1 8(%ebp) 18 | #define PARAM2 12(%ebp) 19 | #define PARAM3 16(%ebp) 20 | #define PARAM4 20(%ebp) 21 | 22 | #define SIGL_OFFSET 8 23 | #define SIGN(x) (x) 24 | #define TAG(x) 1(x) 25 | #define EXP(x) 4(x) 26 | #define SIG(x) SIGL_OFFSET##(x) 27 | #define SIGL(x) SIGL_OFFSET##(x) 28 | #define SIGH(x) 12(x) 29 | 30 | #endif _FPU_ASM_H_ 31 | -------------------------------------------------------------------------------- /kernel/info.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/kernel/info.c 3 | * 4 | * Copyright (C) 1992 Darren Senn 5 | */ 6 | 7 | /* This implements the sysinfo() system call */ 8 | 9 | #include 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | asmlinkage int sys_sysinfo(struct sysinfo *info) 18 | { 19 | int error; 20 | struct sysinfo val; 21 | struct task_struct **p; 22 | 23 | error = verify_area(VERIFY_WRITE, info, sizeof(struct sysinfo)); 24 | if (error) 25 | return error; 26 | memset((char *)&val, 0, sizeof(struct sysinfo)); 27 | 28 | val.uptime = jiffies / HZ; 29 | 30 | val.loads[0] = avenrun[0] << (SI_LOAD_SHIFT - FSHIFT); 31 | val.loads[1] = avenrun[1] << (SI_LOAD_SHIFT - FSHIFT); 32 | val.loads[2] = avenrun[2] << (SI_LOAD_SHIFT - FSHIFT); 33 | 34 | for (p = &LAST_TASK; p > &FIRST_TASK; p--) 35 | if (*p) val.procs++; 36 | 37 | si_meminfo(&val); 38 | si_swapinfo(&val); 39 | 40 | memcpy_tofs(info, &val, sizeof(struct sysinfo)); 41 | return 0; 42 | } 43 | -------------------------------------------------------------------------------- /arch/alpha/kernel/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux kernel. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .c.s: 11 | $(CC) $(CFLAGS) -S $< 12 | .s.o: 13 | $(AS) -o $*.o $< 14 | .c.o: 15 | $(CC) $(CFLAGS) -c $< 16 | .S.s: 17 | $(CPP) -D__ASSEMBLY__ -traditional $< -o $*.s 18 | .S.o: 19 | $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o 20 | 21 | OBJS = entry.o traps.o process.o irq.o signal.o setup.o 22 | 23 | all: kernel.o head.o 24 | 25 | head.o: head.s 26 | 27 | head.s: head.S $(TOPDIR)/include/asm-alpha/system.h 28 | $(CPP) -traditional -o $*.s $< 29 | 30 | kernel.o: $(OBJS) 31 | $(LD) -r -o kernel.o $(OBJS) 32 | sync 33 | 34 | dep: 35 | $(CPP) -M *.c > .depend 36 | 37 | dummy: 38 | 39 | # 40 | # include a dependency file if one exists 41 | # 42 | ifeq (.depend,$(wildcard .depend)) 43 | include .depend 44 | endif 45 | 46 | 47 | -------------------------------------------------------------------------------- /arch/i386/boot/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # arch/i386/boot/install.sh 4 | # 5 | # This file is subject to the terms and conditions of the GNU General Public 6 | # License. See the file "COPYING" in the main directory of this archive 7 | # for more details. 8 | # 9 | # Copyright (C) 1995 by Linus Torvalds 10 | # 11 | # Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin 12 | # 13 | # "make install" script for i386 architecture 14 | # 15 | # Arguments: 16 | # $1 - kernel version 17 | # $2 - kernel image file 18 | # $3 - kernel map file 19 | # $4 - default install path (blank if root directory) 20 | # 21 | 22 | # User may have a custom install script 23 | 24 | if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi 25 | 26 | # Default install - same as make zlilo 27 | 28 | if [ -f $4/vmlinuz ]; then 29 | mv $4/vmlinuz $4/vmlinuz.old 30 | fi 31 | 32 | if [ -f $4/System.map ]; then 33 | mv $4/System.map $4/System.old 34 | fi 35 | 36 | cat $2 > $4/vmlinuz 37 | cp $3 $4/System.map 38 | 39 | if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi 40 | -------------------------------------------------------------------------------- /include/linux/xia_fs_sb.h: -------------------------------------------------------------------------------- 1 | #ifndef _XIA_FS_SB_H 2 | #define _XIA_FS_SB_H 3 | 4 | /* 5 | * include/linux/xia_fs_sb.h 6 | * 7 | * Copyright (C) Q. Frank Xia, 1993. 8 | * 9 | * Based on Linus' minix_fs_sb.h. 10 | * Copyright (C) Linus Torvalds, 1991, 1992. 11 | */ 12 | 13 | #define _XIAFS_IMAP_SLOTS 8 14 | #define _XIAFS_ZMAP_SLOTS 32 15 | 16 | struct xiafs_sb_info { 17 | u_long s_nzones; 18 | u_long s_ninodes; 19 | u_long s_ndatazones; 20 | u_long s_imap_zones; 21 | u_long s_zmap_zones; 22 | u_long s_firstdatazone; 23 | u_long s_zone_shift; 24 | u_long s_max_size; /* 32 bytes */ 25 | struct buffer_head * s_imap_buf[_XIAFS_IMAP_SLOTS]; /* 32 bytes */ 26 | struct buffer_head * s_zmap_buf[_XIAFS_ZMAP_SLOTS]; /* 128 bytes */ 27 | int s_imap_iznr[_XIAFS_IMAP_SLOTS]; /* 32 bytes */ 28 | int s_zmap_zznr[_XIAFS_ZMAP_SLOTS]; /* 128 bytes */ 29 | u_char s_imap_cached; /* flag for cached imap */ 30 | u_char s_zmap_cached; /* flag for cached imap */ 31 | }; 32 | 33 | #endif /* _XIA_FS_SB_H */ 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /include/asm-i386/ptrace.h: -------------------------------------------------------------------------------- 1 | #ifndef _I386_PTRACE_H 2 | #define _I386_PTRACE_H 3 | 4 | #define EBX 0 5 | #define ECX 1 6 | #define EDX 2 7 | #define ESI 3 8 | #define EDI 4 9 | #define EBP 5 10 | #define EAX 6 11 | #define DS 7 12 | #define ES 8 13 | #define FS 9 14 | #define GS 10 15 | #define ORIG_EAX 11 16 | #define EIP 12 17 | #define CS 13 18 | #define EFL 14 19 | #define UESP 15 20 | #define SS 16 21 | 22 | 23 | /* this struct defines the way the registers are stored on the 24 | stack during a system call. */ 25 | 26 | struct pt_regs { 27 | long ebx; 28 | long ecx; 29 | long edx; 30 | long esi; 31 | long edi; 32 | long ebp; 33 | long eax; 34 | unsigned short ds, __dsu; 35 | unsigned short es, __esu; 36 | unsigned short fs, __fsu; 37 | unsigned short gs, __gsu; 38 | long orig_eax; 39 | long eip; 40 | unsigned short cs, __csu; 41 | long eflags; 42 | long esp; 43 | unsigned short ss, __ssu; 44 | }; 45 | 46 | #ifdef __KERNEL__ 47 | #define user_mode(regs) ((VM_MASK & (regs)->eflags) || (3 & (regs)->cs)) 48 | extern void show_regs(struct pt_regs *); 49 | #endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /include/linux/config.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_CONFIG_H 2 | #define _LINUX_CONFIG_H 3 | 4 | #include 5 | 6 | /* 7 | * Defines for what uname() should return 8 | */ 9 | #ifndef UTS_SYSNAME 10 | #define UTS_SYSNAME "Linux" 11 | #endif 12 | 13 | #ifndef UTS_MACHINE 14 | #define UTS_MACHINE "unknown" 15 | #endif 16 | 17 | #ifndef UTS_NODENAME 18 | #define UTS_NODENAME "(none)" /* set by sethostname() */ 19 | #endif 20 | 21 | #ifndef UTS_DOMAINNAME 22 | #define UTS_DOMAINNAME "(none)" /* set by setdomainname() */ 23 | #endif 24 | 25 | /* 26 | * The definitions for UTS_RELEASE and UTS_VERSION are now defined 27 | * in linux/version.h, and should only be used by linux/version.c 28 | */ 29 | 30 | /* Don't touch these, unless you really know what your doing. */ 31 | #define DEF_INITSEG 0x9000 32 | #define DEF_SYSSEG 0x1000 33 | #define DEF_SETUPSEG 0x9020 34 | #define DEF_SYSSIZE 0x7F00 35 | 36 | /* internal svga startup constants */ 37 | #define NORMAL_VGA 0xffff /* 80x25 mode */ 38 | #define EXTENDED_VGA 0xfffe /* 80x50 mode */ 39 | #define ASK_VGA 0xfffd /* ask for it at bootup */ 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /arch/sparc/kernel/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux kernel. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .c.s: 11 | $(CC) $(CFLAGS) -S $< 12 | .s.o: 13 | $(AS) -o $*.o $< 14 | .c.o: 15 | $(CC) $(CFLAGS) -c $< 16 | .S.s: 17 | $(CPP) -D__ASSEMBLY__ -ansi $< -o $*.s 18 | .S.o: 19 | $(CC) -D__ASSEMBLY__ -ansi -c $< -o $*.o 20 | 21 | OBJS = entry.o traps.o irq.o process.o promops.o signal.o ioport.o setup.o \ 22 | idprom.o probe.o 23 | 24 | all: kernel.o head.o 25 | 26 | head.o: head.s 27 | 28 | head.s: head.S $(TOPDIR)/include/asm-sparc/head.h 29 | $(CPP) -D__ASSEMBLY__ -ansi -o $*.s $< 30 | 31 | kernel.o: $(OBJS) 32 | $(LD) -r -o kernel.o $(OBJS) 33 | sync 34 | 35 | dep: 36 | $(CPP) -M *.c > .depend 37 | 38 | dummy: 39 | 40 | # 41 | # include a dependency file if one exists 42 | # 43 | ifeq (.depend,$(wildcard .depend)) 44 | include .depend 45 | endif 46 | 47 | 48 | -------------------------------------------------------------------------------- /drivers/sound/midi_ctrl.h: -------------------------------------------------------------------------------- 1 | static unsigned char ctrl_def_values[128] = 2 | { 3 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 0 to 7 */ 4 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 8 to 15 */ 5 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 16 to 23 */ 6 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 24 to 31 */ 7 | 8 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 32 to 39 */ 9 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 40 to 47 */ 10 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 48 to 55 */ 11 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 56 to 63 */ 12 | 13 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 64 to 71 */ 14 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 72 to 79 */ 15 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 80 to 87 */ 16 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 88 to 95 */ 17 | 18 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 96 to 103 */ 19 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 104 to 111 */ 20 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 112 to 119 */ 21 | 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, /* 120 to 127 */ 22 | }; 23 | -------------------------------------------------------------------------------- /arch/i386/kernel/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux kernel. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .c.s: 11 | $(CC) $(CFLAGS) -S $< 12 | .s.o: 13 | $(AS) -o $*.o $< 14 | .c.o: 15 | $(CC) $(CFLAGS) -c $< 16 | .S.s: 17 | $(CPP) -D__ASSEMBLY__ -traditional $< -o $*.s 18 | .S.o: 19 | $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o 20 | 21 | OBJS = process.o signal.o entry.o traps.o irq.o vm86.o bios32.o ptrace.o ioport.o ldt.o setup.o 22 | 23 | all: kernel.o head.o 24 | 25 | head.o: head.s 26 | 27 | head.s: head.S $(TOPDIR)/include/linux/tasks.h 28 | $(CPP) -traditional -o $*.s $< 29 | 30 | kernel.o: $(OBJS) 31 | $(LD) -r -o kernel.o $(OBJS) 32 | sync 33 | 34 | dep: 35 | $(CPP) -M *.c > .depend 36 | 37 | modules: 38 | 39 | dummy: 40 | 41 | # 42 | # include a dependency file if one exists 43 | # 44 | ifeq (.depend,$(wildcard .depend)) 45 | include .depend 46 | endif 47 | 48 | 49 | -------------------------------------------------------------------------------- /include/asm-sparc/contregs.h: -------------------------------------------------------------------------------- 1 | #ifndef _SPARC_CONTREGS_H 2 | #define _SPARC_CONTREGS_H 3 | 4 | /* contregs.h: Addresses of registers in the ASI_CONTROL alternate address 5 | space. These are for the mmu's context register, etc. 6 | 7 | Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu) 8 | */ 9 | 10 | #define AC_CONTEXT 0x30000000 /* current mmu-context, handy for invalidate()'s ;-) */ 11 | #define AC_SENABLE 0x40000000 /* system dvma/cache enable, plus special reset poking */ 12 | #define AC_CACHETAGS 0x80000000 /* direct access to the VAC cache, unused... */ 13 | #define AC_SYNC_ERR 0x60000000 /* what type of synchronous memory error happened */ 14 | #define AC_SYNC_VA 0x60000004 /* what virtual address caused the error to occur */ 15 | #define AC_ASYNC_ERR 0x60000008 /* what type of asynchronous mem-error happened */ 16 | #define AC_ASYNC_VA 0x6000000c /* what virtual address caused the async-err to happen */ 17 | #define AC_CACHEDDATA 0x90000000 /* where the actual VAC cached data sits */ 18 | 19 | #endif /* _SPARC_CONTREGS_H */ 20 | -------------------------------------------------------------------------------- /drivers/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux kernel device drivers. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .S.s: 11 | $(CPP) -traditional $< -o $*.s 12 | .c.s: 13 | $(CC) $(CFLAGS) -S $< 14 | .s.o: 15 | $(AS) -c -o $*.o $< 16 | .c.o: 17 | $(CC) $(CFLAGS) -c $< 18 | 19 | SUBDIRS = block char net #streams 20 | 21 | ifdef CONFIG_SCSI 22 | SUBDIRS := $(SUBDIRS) scsi 23 | endif 24 | 25 | ifdef CONFIG_SOUND 26 | SUBDIRS := $(SUBDIRS) sound 27 | endif 28 | 29 | all: driversubdirs 30 | 31 | driversubdirs: dummy 32 | set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i; done 33 | 34 | modules: dummy 35 | set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i modules; done 36 | 37 | dep: 38 | set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i dep; done 39 | 40 | dummy: 41 | 42 | # 43 | # include a dependency file if one exists 44 | # 45 | ifeq (.depend,$(wildcard .depend)) 46 | include .depend 47 | endif 48 | 49 | -------------------------------------------------------------------------------- /include/linux/sys.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_SYS_H 2 | #define _LINUX_SYS_H 3 | 4 | /* 5 | * system call entry points ... but not all are defined 6 | */ 7 | #define NR_syscalls 256 8 | 9 | /* 10 | * These are system calls that will be removed at some time 11 | * due to newer versions existing.. 12 | * (please be careful - ibcs2 may need some of these). 13 | */ 14 | #ifdef notdef 15 | #define _sys_waitpid _sys_old_syscall /* _sys_wait4 */ 16 | #define _sys_olduname _sys_old_syscall /* _sys_newuname */ 17 | #define _sys_uname _sys_old_syscall /* _sys_newuname */ 18 | #define _sys_stat _sys_old_syscall /* _sys_newstat */ 19 | #define _sys_fstat _sys_old_syscall /* _sys_newfstat */ 20 | #define _sys_lstat _sys_old_syscall /* _sys_newlstat */ 21 | #define _sys_signal _sys_old_syscall /* _sys_sigaction */ 22 | #define _sys_sgetmask _sys_old_syscall /* _sys_sigprocmask */ 23 | #define _sys_ssetmask _sys_old_syscall /* _sys_sigprocmask */ 24 | #endif 25 | 26 | /* 27 | * These are system calls that haven't been implemented yet 28 | * but have an entry in the table for future expansion.. 29 | */ 30 | #define _sys_quotactl _sys_ni_syscall 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /kernel/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux kernel. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definitions are now in the main makefile... 9 | 10 | .S.s: 11 | $(CPP) -traditional $< -o $*.s 12 | .c.s: 13 | $(CC) $(CFLAGS) -S $< 14 | .s.o: 15 | $(AS) -o $*.o $< 16 | .c.o: 17 | $(CC) $(CFLAGS) -c $< 18 | 19 | OBJS = sched.o dma.o fork.o exec_domain.o panic.o printk.o sys.o \ 20 | module.o exit.o signal.o itimer.o info.o time.o softirq.o \ 21 | resource.o 22 | 23 | SYMTAB_OBJS = ksyms.o 24 | 25 | all: kernel.o 26 | 27 | include ../versions.mk 28 | 29 | kernel.o: $(SYMTAB_OBJS) $(OBJS) 30 | $(LD) -r -o kernel.o $(SYMTAB_OBJS) $(OBJS) 31 | sync 32 | 33 | sched.o: sched.c 34 | $(CC) $(CFLAGS) $(PROFILING) -fno-omit-frame-pointer -c $< 35 | 36 | dep: 37 | $(CPP) -M *.c > .depend 38 | 39 | dummy: 40 | modules: 41 | 42 | # 43 | # include a dependency file if one exists 44 | # 45 | ifeq (.depend,$(wildcard .depend)) 46 | include .depend 47 | endif 48 | 49 | -------------------------------------------------------------------------------- /include/asm-m68k/delay.h: -------------------------------------------------------------------------------- 1 | #ifndef _M68K_DELAY_H 2 | #define _M68K_DELAY_H 3 | 4 | /* 5 | * Copyright (C) 1994 Hamish Macdonald 6 | * 7 | * Delay routines, using a pre-computed "loops_per_second" value. 8 | */ 9 | 10 | extern __inline__ void __delay(int loops) 11 | { 12 | __asm__("\n\tmovel %0,d0\n1:\tsubql #1,d0\n\tbpls 1b\n" 13 | : /* no outputs */ 14 | : "g" (loops) 15 | : "d0"); 16 | } 17 | 18 | /* 19 | * division by multiplication: you don't have to worry about 20 | * loss of precision. 21 | * 22 | * Use only for very small delays ( < 1 msec). Should probably use a 23 | * lookup table, really, as the multiplications take much too long with 24 | * short delays. This is a "reasonable" implementation, though (and the 25 | * first constant multiplications gets optimized away if the delay is 26 | * a constant) 27 | */ 28 | extern __inline__ void udelay(unsigned long usecs) 29 | { 30 | asm ("mulul %1,d0,%0\n\t" 31 | "divul %2,d0,%0" 32 | : "=d" (usecs) 33 | : "d" (usecs), 34 | "i" (1000000), 35 | "0" (loops_per_sec) 36 | : "d0"); 37 | __delay(usecs); 38 | } 39 | 40 | #endif /* defined(_M68K_DELAY_H) */ 41 | -------------------------------------------------------------------------------- /drivers/sound/gus_linearvol.h: -------------------------------------------------------------------------------- 1 | static unsigned short gus_linearvol[128] = { 2 | 0x0000, 0x08ff, 0x09ff, 0x0a80, 0x0aff, 0x0b40, 0x0b80, 0x0bc0, 3 | 0x0bff, 0x0c20, 0x0c40, 0x0c60, 0x0c80, 0x0ca0, 0x0cc0, 0x0ce0, 4 | 0x0cff, 0x0d10, 0x0d20, 0x0d30, 0x0d40, 0x0d50, 0x0d60, 0x0d70, 5 | 0x0d80, 0x0d90, 0x0da0, 0x0db0, 0x0dc0, 0x0dd0, 0x0de0, 0x0df0, 6 | 0x0dff, 0x0e08, 0x0e10, 0x0e18, 0x0e20, 0x0e28, 0x0e30, 0x0e38, 7 | 0x0e40, 0x0e48, 0x0e50, 0x0e58, 0x0e60, 0x0e68, 0x0e70, 0x0e78, 8 | 0x0e80, 0x0e88, 0x0e90, 0x0e98, 0x0ea0, 0x0ea8, 0x0eb0, 0x0eb8, 9 | 0x0ec0, 0x0ec8, 0x0ed0, 0x0ed8, 0x0ee0, 0x0ee8, 0x0ef0, 0x0ef8, 10 | 0x0eff, 0x0f04, 0x0f08, 0x0f0c, 0x0f10, 0x0f14, 0x0f18, 0x0f1c, 11 | 0x0f20, 0x0f24, 0x0f28, 0x0f2c, 0x0f30, 0x0f34, 0x0f38, 0x0f3c, 12 | 0x0f40, 0x0f44, 0x0f48, 0x0f4c, 0x0f50, 0x0f54, 0x0f58, 0x0f5c, 13 | 0x0f60, 0x0f64, 0x0f68, 0x0f6c, 0x0f70, 0x0f74, 0x0f78, 0x0f7c, 14 | 0x0f80, 0x0f84, 0x0f88, 0x0f8c, 0x0f90, 0x0f94, 0x0f98, 0x0f9c, 15 | 0x0fa0, 0x0fa4, 0x0fa8, 0x0fac, 0x0fb0, 0x0fb4, 0x0fb8, 0x0fbc, 16 | 0x0fc0, 0x0fc4, 0x0fc8, 0x0fcc, 0x0fd0, 0x0fd4, 0x0fd8, 0x0fdc, 17 | 0x0fe0, 0x0fe4, 0x0fe8, 0x0fec, 0x0ff0, 0x0ff4, 0x0ff8, 0x0ffc 18 | }; 19 | -------------------------------------------------------------------------------- /include/linux/ioport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * portio.h Definitions of routines for detecting, reserving and 3 | * allocating system resources. 4 | * 5 | * Version: 0.01 8/30/93 6 | * 7 | * Author: Donald Becker (becker@super.org) 8 | */ 9 | 10 | #ifndef _LINUX_PORTIO_H 11 | #define _LINUX_PORTIO_H 12 | 13 | #define HAVE_PORTRESERVE 14 | /* 15 | * Call check_region() before probing for your hardware. 16 | * Once you have found you hardware, register it with snarf_region(). 17 | * If you unload the driver, use release_region to free ports. 18 | */ 19 | extern void reserve_setup(char *str, int *ints); 20 | extern int check_region(unsigned int from, unsigned int extent); 21 | extern void snarf_region(unsigned int from, unsigned int extent); 22 | extern void request_region(unsigned int from, unsigned int extent,const char *name); 23 | extern void release_region(unsigned int from, unsigned int extent); 24 | extern int get_ioport_list(char *); 25 | 26 | 27 | #define HAVE_AUTOIRQ 28 | extern void *irq2dev_map[16]; /* Use only if you own the IRQ. */ 29 | extern void autoirq_setup(int waittime); 30 | extern int autoirq_report(int waittime); 31 | 32 | #endif /* _LINUX_PORTIO_H */ 33 | -------------------------------------------------------------------------------- /include/asm-sparc/bugs.h: -------------------------------------------------------------------------------- 1 | /* include/asm-sparc/bugs.h: Sparc probes for various bugs. 2 | * 3 | * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu) 4 | */ 5 | 6 | /* 7 | * This is included by init/main.c to check for architecture-dependent bugs. 8 | * 9 | * Needs: 10 | * void check_bugs(void); 11 | */ 12 | 13 | #define CONFIG_BUGSPARC 14 | 15 | #include 16 | 17 | extern struct linux_romvec *romvec; 18 | extern int tbase_needs_unmapping; /* We do the bug workaround in pagetables.c */ 19 | 20 | static void check_mmu(void) 21 | { 22 | register struct linux_romvec *lvec; 23 | register int root_node; 24 | unsigned int present; 25 | 26 | lvec = romvec; 27 | 28 | root_node = (*(romvec->pv_nodeops->no_nextnode))(0); 29 | tbase_needs_unmapping=0; 30 | 31 | present = 0; 32 | (*(romvec->pv_nodeops->no_getprop))(root_node, "buserr-type", 33 | (char *) &present); 34 | if(present == 1) 35 | { 36 | tbase_needs_unmapping=1; 37 | printk("MMU bug found: not allowing trapbase to be cached\n"); 38 | } 39 | 40 | return; 41 | } 42 | 43 | 44 | static void 45 | check_bugs(void) 46 | { 47 | check_mmu(); 48 | } 49 | -------------------------------------------------------------------------------- /include/asm-sparc/delay.h: -------------------------------------------------------------------------------- 1 | #ifndef __SPARC_DELAY_H 2 | #define __SPARC_DELAY_H 3 | 4 | extern unsigned long loops_per_sec; 5 | 6 | /* 7 | * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu). 8 | * 9 | * Delay quick inlined code using 'loops_per_second' which is 10 | * calculated in calibrate_delay() in main.c (ie. BogoMIPS :-) 11 | */ 12 | 13 | extern __inline__ void __delay(unsigned int loops) 14 | { 15 | __asm__ __volatile__("\n1:\tcmp %0, 0\n\t" 16 | "bne,a 1b\n\t" 17 | "sub %0, 1, %0\n": "=&r" (loops) : "0" (loops)); 18 | } 19 | 20 | /* udelay(usecs) is used for very short delays up to 1 millisecond. */ 21 | 22 | extern __inline__ void udelay(unsigned int usecs) 23 | { 24 | usecs *= 0x000010c6; /* Sparc is 32-bit just like ix86 */ 25 | 26 | __asm__("sethi %hi(_loops_per_sec), %o1\n\t" 27 | "ld [%o1 + %lo(_loops_per_sec)], %o1\n\t" 28 | "call ___delay\n\t" 29 | "umul %o1, %o0, %o0\n\t"); 30 | } 31 | 32 | /* calibrate_delay() wants this... */ 33 | 34 | extern __inline__ unsigned long muldiv(unsigned long a, unsigned long b, unsigned long c) 35 | { 36 | return ((a*b)/c); 37 | } 38 | 39 | #endif /* defined(__SPARC_DELAY_H) */ 40 | 41 | -------------------------------------------------------------------------------- /include/asm-sparc/ptrace.h: -------------------------------------------------------------------------------- 1 | #ifndef _SPARC_PTRACE_H 2 | #define _SPARC_PTRACE_H 3 | 4 | /* I have not looked enough into how this should be done. Without playing 5 | * lots of tricks to optimize I think we need to save the whole register 6 | * window frame plus the floating-point registers. We'll see... 7 | */ 8 | 9 | /* this struct defines the way the registers are stored on the 10 | stack during a system call. */ 11 | 12 | struct pt_regs { 13 | unsigned long ps; /* previous supervisor, same as alpha I believe */ 14 | unsigned long pc; /* current and next program counter */ 15 | unsigned long npc; 16 | unsigned long sp; /* stack and frame pointer */ 17 | unsigned long fp; 18 | unsigned long psr; /* for condition codes */ 19 | unsigned long nuwin; /* number of user windows */ 20 | /* not sure yet whether all regs are necessary 21 | * but this is how it is traditionally done on the sparc. 22 | */ 23 | unsigned long u_regs[24*16]; 24 | unsigned long f_regs[64]; /* yuck yuck yuck */ 25 | }; 26 | 27 | #ifdef __KERNEL__ 28 | #define user_mode(regs) (0x0) /* if previous supervisor is 0, came from user */ 29 | extern void show_regs(struct pt_regs *); 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /include/linux/ctype.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_CTYPE_H 2 | #define _LINUX_CTYPE_H 3 | 4 | #define _U 0x01 /* upper */ 5 | #define _L 0x02 /* lower */ 6 | #define _D 0x04 /* digit */ 7 | #define _C 0x08 /* cntrl */ 8 | #define _P 0x10 /* punct */ 9 | #define _S 0x20 /* white space (space/lf/tab) */ 10 | #define _X 0x40 /* hex digit */ 11 | #define _SP 0x80 /* hard space (0x20) */ 12 | 13 | extern unsigned char _ctype[]; 14 | extern char _ctmp; 15 | 16 | #define isalnum(c) ((_ctype+1)[c]&(_U|_L|_D)) 17 | #define isalpha(c) ((_ctype+1)[c]&(_U|_L)) 18 | #define iscntrl(c) ((_ctype+1)[c]&(_C)) 19 | #define isdigit(c) ((_ctype+1)[c]&(_D)) 20 | #define isgraph(c) ((_ctype+1)[c]&(_P|_U|_L|_D)) 21 | #define islower(c) ((_ctype+1)[c]&(_L)) 22 | #define isprint(c) ((_ctype+1)[c]&(_P|_U|_L|_D|_SP)) 23 | #define ispunct(c) ((_ctype+1)[c]&(_P)) 24 | #define isspace(c) ((_ctype+1)[c]&(_S)) 25 | #define isupper(c) ((_ctype+1)[c]&(_U)) 26 | #define isxdigit(c) ((_ctype+1)[c]&(_D|_X)) 27 | 28 | #define isascii(c) (((unsigned) c)<=0x7f) 29 | #define toascii(c) (((unsigned) c)&0x7f) 30 | 31 | #define tolower(c) (_ctmp=c,isupper(_ctmp)?_ctmp-('A'-'a'):_ctmp) 32 | #define toupper(c) (_ctmp=c,islower(_ctmp)?_ctmp-('a'-'A'):_ctmp) 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /arch/i386/math-emu/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for wm-FPU-emu 3 | # 4 | 5 | #DEBUG = -DDEBUGGING 6 | DEBUG = 7 | PARANOID = -DPARANOID 8 | CFLAGS := $(CFLAGS) $(PARANOID) $(DEBUG) -fno-builtin 9 | 10 | .c.o: 11 | $(CC) $(CFLAGS) $(MATH_EMULATION) -c $< 12 | 13 | .S.o: 14 | $(CC) -D__ASSEMBLER__ $(PARANOID) -c $< 15 | 16 | .s.o: 17 | $(CC) -c $< 18 | 19 | OBJS = fpu_entry.o div_small.o errors.o \ 20 | fpu_arith.o fpu_aux.o fpu_etc.o fpu_trig.o \ 21 | load_store.o get_address.o \ 22 | poly_atan.o poly_l2.o poly_2xm1.o poly_sin.o poly_tan.o \ 23 | reg_add_sub.o reg_compare.o reg_constant.o reg_ld_str.o \ 24 | reg_div.o reg_mul.o reg_norm.o \ 25 | reg_u_add.o reg_u_div.o reg_u_mul.o reg_u_sub.o \ 26 | reg_round.o \ 27 | wm_shrx.o wm_sqrt.o \ 28 | div_Xsig.o polynom_Xsig.o round_Xsig.o \ 29 | shr_Xsig.o mul_Xsig.o 30 | 31 | math.a: $(OBJS) 32 | rm -f math.a 33 | $(AR) rcs math.a $(OBJS) 34 | sync 35 | 36 | dep: 37 | $(CPP) -M *.c > .depend 38 | $(CPP) -D__ASSEMBLER__ -M *.S >> .depend 39 | 40 | proto: 41 | cproto -e -DMAKING_PROTO *.c >fpu_proto.h 42 | 43 | modules: 44 | 45 | dummy: 46 | 47 | # 48 | # include a dependency file if one exists 49 | # 50 | ifeq (.depend,$(wildcard .depend)) 51 | include .depend 52 | endif 53 | -------------------------------------------------------------------------------- /fs/msdos/msbuffer.h: -------------------------------------------------------------------------------- 1 | /* buffer.c 13/12/94 20.19.10 */ 2 | struct buffer_head *msdos_bread (struct super_block *sb, int block); 3 | struct buffer_head *msdos_getblk (struct super_block *sb, int block); 4 | void msdos_brelse (struct super_block *sb, struct buffer_head *bh); 5 | void msdos_mark_buffer_dirty (struct super_block *sb, 6 | struct buffer_head *bh, 7 | int dirty_val); 8 | void msdos_set_uptodate (struct super_block *sb, 9 | struct buffer_head *bh, 10 | int val); 11 | int msdos_is_uptodate (struct super_block *sb, struct buffer_head *bh); 12 | void msdos_ll_rw_block (struct super_block *sb, int opr, 13 | int nbreq, struct buffer_head *bh[32]); 14 | 15 | /* These macros exist to avoid modifying all the code */ 16 | /* They should be removed one day I guess */ 17 | 18 | /* The versioning mechanism of the modules system define those macros */ 19 | /* This remove some warnings */ 20 | #ifdef brelse 21 | #undef brelse 22 | #endif 23 | #ifdef bread 24 | #undef bread 25 | #endif 26 | #ifdef getblk 27 | #undef getblk 28 | #endif 29 | 30 | #define brelse(b) msdos_brelse(sb,b) 31 | #define bread(d,b,s) msdos_bread(sb,b) 32 | #define getblk(d,b,s) msdos_getblk(sb,b) 33 | #define mark_buffer_dirty(b,v) msdos_mark_buffer_dirty(sb,b,v) 34 | 35 | -------------------------------------------------------------------------------- /fs/umsdos/check.c: -------------------------------------------------------------------------------- 1 | #ifdef MODULE 2 | #include 3 | #endif 4 | 5 | #include 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | extern unsigned long high_memory; 18 | 19 | static int check_one_table(struct pde * page_dir) 20 | { 21 | if (pgd_none(*page_dir)) 22 | return 0; 23 | if (pgd_bad(*page_dir)) 24 | return 1; 25 | return 0; 26 | } 27 | 28 | /* 29 | * This function checks all page tables of "current" 30 | */ 31 | void check_page_tables(void) 32 | { 33 | struct pgd * pg_dir; 34 | static int err = 0; 35 | 36 | int stack_level = (long)(&pg_dir)-current->kernel_stack_page; 37 | if (stack_level < 1500) printk ("** %d ** ",stack_level); 38 | pg_dir = PAGE_DIR_OFFSET(current, 0); 39 | if (err == 0) { 40 | int i; 41 | for (i = 0 ; i < PTRS_PER_PAGE ; i++,page_dir++){ 42 | int notok = check_one_table(page_dir); 43 | if (notok){ 44 | err++; 45 | printk ("|%d:%08lx| ",i, page_dir->pgd); 46 | } 47 | } 48 | if (err) printk ("\nErreur MM %d\n",err); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /fs/ext2/acl.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/fs/ext2/acl.c 3 | * 4 | * Copyright (C) 1993, 1994, 1995 5 | * Remy Card (card@masi.ibp.fr) 6 | * Laboratoire MASI - Institut Blaise Pascal 7 | * Universite Pierre et Marie Curie (Paris VI) 8 | */ 9 | 10 | /* 11 | * This file will contain the Access Control Lists management for the 12 | * second extended file system. 13 | */ 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | /* 22 | * ext2_permission () 23 | * 24 | * Check for access rights 25 | */ 26 | int ext2_permission (struct inode * inode, int mask) 27 | { 28 | unsigned short mode = inode->i_mode; 29 | 30 | /* 31 | * Nobody gets write access to an immutable file 32 | */ 33 | if ((mask & S_IWOTH) && IS_IMMUTABLE(inode)) 34 | return -EACCES; 35 | /* 36 | * Special case, access is always granted for root 37 | */ 38 | if (fsuser()) 39 | return 0; 40 | /* 41 | * If no ACL, checks using the file mode 42 | */ 43 | else if (current->fsuid == inode->i_uid) 44 | mode >>= 6; 45 | else if (in_group_p (inode->i_gid)) 46 | mode >>= 3; 47 | if (((mode & mask & S_IRWXO) == mask)) 48 | return 0; 49 | else 50 | return -EACCES; 51 | } 52 | -------------------------------------------------------------------------------- /net/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the linux networking. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definition is now in the main makefile... 9 | 10 | # only these two lines should need to be changed to remove inet sockets. 11 | # (and the inet/tcpip.o in net.o) 12 | 13 | SUBDIRS := unix inet 14 | 15 | SUBOBJS := $(foreach f,$(SUBDIRS),$f/$f.o) 16 | 17 | .c.o: 18 | $(CC) $(CFLAGS) -c $< 19 | .s.o: 20 | $(AS) -o $*.o $< 21 | .c.s: 22 | $(CC) $(CFLAGS) -S $< 23 | 24 | OBJS = socket.o protocols.o 25 | 26 | all: net.o 27 | 28 | net.o: $(OBJS) network.a 29 | $(LD) -r -o net.o $(OBJS) network.a 30 | 31 | network.a: subdirs 32 | rm -f $@ 33 | ar rc $@ $(SUBOBJS) 34 | ranlib $@ 35 | 36 | subdirs: dummy 37 | set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i; done 38 | 39 | dep: 40 | $(CPP) -M *.c > .depend 41 | set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i dep; done 42 | 43 | modules: 44 | 45 | dummy: 46 | 47 | # 48 | # include a dependency file if one exists 49 | # 50 | ifeq (.depend,$(wildcard .depend)) 51 | include .depend 52 | endif 53 | 54 | -------------------------------------------------------------------------------- /include/asm-alpha/console.h: -------------------------------------------------------------------------------- 1 | #ifndef __AXP_CONSOLE_H 2 | #define __AXP_CONSOLE_H 3 | 4 | /* 5 | * Console callback routine numbers 6 | */ 7 | #define CCB_GETC 0x01 8 | #define CCB_PUTS 0x02 9 | #define CCB_RESET_TERM 0x03 10 | #define CCB_SET_TERM_INT 0x04 11 | #define CCB_SET_TERM_CTL 0x05 12 | #define CCB_PROCESS_KEYCODE 0x06 13 | 14 | #define CCB_OPEN 0x10 15 | #define CCB_CLOSE 0x11 16 | #define CCB_IOCTL 0x12 17 | #define CCB_READ 0x13 18 | #define CCB_WRITE 0x14 19 | 20 | #define CCB_SET_ENV 0x20 21 | #define CCB_RESET_ENV 0x21 22 | #define CCB_GET_ENV 0x22 23 | #define CCB_SAVE_ENV 0x23 24 | 25 | /* 26 | * Environment variable numbers 27 | */ 28 | #define ENV_AUTO_ACTION 0x01 29 | #define ENV_BOOT_DEV 0x02 30 | #define ENV_BOOTDEF_DEV 0x03 31 | #define ENV_BOOTED_DEV 0x04 32 | #define ENV_BOOT_FILE 0x05 33 | #define ENV_BOOTED_FILE 0x06 34 | #define ENV_BOOT_OSFLAGS 0x07 35 | #define ENV_BOOTED_OSFLAGS 0x08 36 | #define ENV_BOOT_RESET 0x09 37 | #define ENV_DUMP_DEV 0x0A 38 | #define ENV_ENABLE_AUDIT 0x0B 39 | #define ENV_LICENCE 0x0C 40 | #define ENV_CHAR_SET 0x0D 41 | #define ENV_LANGUAGE 0x0E 42 | #define ENV_TTY_DEV 0x0F 43 | 44 | extern unsigned long dispatch(unsigned long code, ...); 45 | #define puts(x,l) dispatch(CCB_PUTS,0,x,l) 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /include/asm-sparc/asi.h: -------------------------------------------------------------------------------- 1 | #ifndef _SPARC_ASI_H 2 | #define _SPARC_ASI_H 3 | 4 | /* asi.h: Address Space Identifier values for the sparc. 5 | 6 | Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu) 7 | */ 8 | 9 | /* These are sun4c, beware on other architectures. Although things should 10 | * be similar under regular sun4's. 11 | */ 12 | 13 | #include 14 | #ifdef CONFIG_SUN4M 15 | #include "asi4m.h" 16 | #else 17 | 18 | #define ASI_NULL1 0x0 19 | #define ASI_NULL2 0x1 20 | 21 | /* sun4c and sun4 control registers and mmu/vac ops */ 22 | #define ASI_CONTROL 0x2 23 | #define ASI_SEGMAP 0x3 24 | #define ASI_PTE 0x4 25 | #define ASI_HWFLUSHSEG 0x5 /* These are to initiate hw flushes of the cache */ 26 | #define ASI_HWFLUSHPAGE 0x6 27 | #define ASI_HWFLUSHCONTEXT 0x7 28 | 29 | 30 | #define ASI_USERTXT 0x8 31 | #define ASI_KERNELTXT 0x9 32 | #define ASI_USERDATA 0xa 33 | #define ASI_KERNELDATA 0xb 34 | 35 | /* VAC Cache flushing on sun4c and sun4 */ 36 | 37 | #define ASI_FLUSHSEG 0xc /* These are for "software" flushes of the cache */ 38 | #define ASI_FLUSHPG 0xd 39 | #define ASI_FLUSHCTX 0xe 40 | 41 | 42 | #endif /* CONFIG_SUN4M */ 43 | #endif /* _SPARC_ASI_H */ 44 | -------------------------------------------------------------------------------- /include/asm-i386/types.h: -------------------------------------------------------------------------------- 1 | #ifndef _I386_TYPES_H 2 | #define _I386_TYPES_H 3 | 4 | #ifndef _SIZE_T 5 | #define _SIZE_T 6 | typedef unsigned int size_t; 7 | #endif 8 | 9 | #ifndef _SSIZE_T 10 | #define _SSIZE_T 11 | typedef int ssize_t; 12 | #endif 13 | 14 | #ifndef _PTRDIFF_T 15 | #define _PTRDIFF_T 16 | typedef int ptrdiff_t; 17 | #endif 18 | 19 | /* 20 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 21 | * header files exported to user space 22 | */ 23 | 24 | typedef __signed__ char __s8; 25 | typedef unsigned char __u8; 26 | 27 | typedef __signed__ short __s16; 28 | typedef unsigned short __u16; 29 | 30 | typedef __signed__ long __s32; 31 | typedef unsigned long __u32; 32 | 33 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 34 | typedef __signed__ long long __s64; 35 | typedef unsigned long long __u64; 36 | #endif 37 | 38 | /* 39 | * These aren't exported outside the kernel to avoid name space clashes 40 | */ 41 | #ifdef __KERNEL__ 42 | 43 | typedef signed char s8; 44 | typedef unsigned char u8; 45 | 46 | typedef signed short s16; 47 | typedef unsigned short u16; 48 | 49 | typedef signed long s32; 50 | typedef unsigned long u32; 51 | 52 | typedef signed long long s64; 53 | typedef unsigned long long u64; 54 | 55 | #endif /* __KERNEL__ */ 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /net/inet/raw.h: -------------------------------------------------------------------------------- 1 | /* 2 | * INET An implementation of the TCP/IP protocol suite for the LINUX 3 | * operating system. INET is implemented using the BSD Socket 4 | * interface as the means of communication with the user level. 5 | * 6 | * Definitions for the RAW-IP module. 7 | * 8 | * Version: @(#)raw.h 1.0.2 05/07/93 9 | * 10 | * Author: Fred N. van Kempen, 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU General Public License 14 | * as published by the Free Software Foundation; either version 15 | * 2 of the License, or (at your option) any later version. 16 | */ 17 | #ifndef _RAW_H 18 | #define _RAW_H 19 | 20 | 21 | extern struct proto raw_prot; 22 | 23 | 24 | extern void raw_err(int err, unsigned char *header, unsigned long daddr, 25 | unsigned long saddr, struct inet_protocol *protocol); 26 | extern int raw_recvfrom(struct sock *sk, unsigned char *to, 27 | int len, int noblock, unsigned flags, 28 | struct sockaddr_in *sin, int *addr_len); 29 | extern int raw_read(struct sock *sk, unsigned char *buff, 30 | int len, int noblock, unsigned flags); 31 | extern int raw_rcv(struct sock *, struct sk_buff *, struct device *, 32 | long, long); 33 | 34 | #endif /* _RAW_H */ 35 | -------------------------------------------------------------------------------- /include/asm-i386/delay.h: -------------------------------------------------------------------------------- 1 | #ifndef _I386_DELAY_H 2 | #define _I386_DELAY_H 3 | 4 | /* 5 | * Copyright (C) 1993 Linus Torvalds 6 | * 7 | * Delay routines, using a pre-computed "loops_per_second" value. 8 | */ 9 | 10 | extern __inline__ void __delay(int loops) 11 | { 12 | __asm__(".align 2,0x90\n1:\tdecl %0\n\tjns 1b": :"a" (loops):"ax"); 13 | } 14 | 15 | /* 16 | * division by multiplication: you don't have to worry about 17 | * loss of precision. 18 | * 19 | * Use only for very small delays ( < 1 msec). Should probably use a 20 | * lookup table, really, as the multiplications take much too long with 21 | * short delays. This is a "reasonable" implementation, though (and the 22 | * first constant multiplications gets optimized away if the delay is 23 | * a constant) 24 | */ 25 | extern __inline__ void udelay(unsigned long usecs) 26 | { 27 | usecs *= 0x000010c6; /* 2**32 / 1000000 */ 28 | __asm__("mull %0" 29 | :"=d" (usecs) 30 | :"a" (usecs),"0" (loops_per_sec) 31 | :"ax"); 32 | __delay(usecs); 33 | } 34 | 35 | extern __inline__ unsigned long muldiv(unsigned long a, unsigned long b, unsigned long c) 36 | { 37 | __asm__("mull %1 ; divl %2" 38 | :"=a" (a) 39 | :"d" (b), 40 | "r" (c), 41 | "0" (a) 42 | :"dx"); 43 | return a; 44 | } 45 | 46 | #endif /* defined(_I386_DELAY_H) */ 47 | -------------------------------------------------------------------------------- /arch/i386/math-emu/reg_constant.h: -------------------------------------------------------------------------------- 1 | /*---------------------------------------------------------------------------+ 2 | | reg_constant.h | 3 | | | 4 | | Copyright (C) 1992 W. Metzenthen, 22 Parker St, Ormond, Vic 3163, | 5 | | Australia. E-mail billm@vaxc.cc.monash.edu.au | 6 | | | 7 | +---------------------------------------------------------------------------*/ 8 | 9 | #ifndef _REG_CONSTANT_H_ 10 | #define _REG_CONSTANT_H_ 11 | 12 | #include "fpu_emu.h" 13 | 14 | extern FPU_REG const CONST_1; 15 | extern FPU_REG const CONST_2; 16 | extern FPU_REG const CONST_HALF; 17 | extern FPU_REG const CONST_L2T; 18 | extern FPU_REG const CONST_L2E; 19 | extern FPU_REG const CONST_PI; 20 | extern FPU_REG const CONST_PI2; 21 | extern FPU_REG const CONST_PI2extra; 22 | extern FPU_REG const CONST_PI4; 23 | extern FPU_REG const CONST_LG2; 24 | extern FPU_REG const CONST_LN2; 25 | extern FPU_REG const CONST_Z; 26 | extern FPU_REG const CONST_PINF; 27 | extern FPU_REG const CONST_INF; 28 | extern FPU_REG const CONST_MINF; 29 | extern FPU_REG const CONST_QNaN; 30 | 31 | #endif _REG_CONSTANT_H_ 32 | -------------------------------------------------------------------------------- /include/linux/locks.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_LOCKS_H 2 | #define _LINUX_LOCKS_H 3 | 4 | /* 5 | * Buffer cache locking - note that interrupts may only unlock, not 6 | * lock buffers. 7 | */ 8 | extern void __wait_on_buffer(struct buffer_head *); 9 | 10 | extern inline void wait_on_buffer(struct buffer_head * bh) 11 | { 12 | if (bh->b_lock) 13 | __wait_on_buffer(bh); 14 | } 15 | 16 | extern inline void lock_buffer(struct buffer_head * bh) 17 | { 18 | if (bh->b_lock) 19 | __wait_on_buffer(bh); 20 | bh->b_lock = 1; 21 | } 22 | 23 | extern inline void unlock_buffer(struct buffer_head * bh) 24 | { 25 | bh->b_lock = 0; 26 | wake_up(&bh->b_wait); 27 | } 28 | 29 | /* 30 | * super-block locking. Again, interrupts may only unlock 31 | * a super-block (although even this isn't done right now. 32 | * nfs may need it). 33 | */ 34 | extern void __wait_on_super(struct super_block *); 35 | 36 | extern inline void wait_on_super(struct super_block * sb) 37 | { 38 | if (sb->s_lock) 39 | __wait_on_super(sb); 40 | } 41 | 42 | extern inline void lock_super(struct super_block * sb) 43 | { 44 | if (sb->s_lock) 45 | __wait_on_super(sb); 46 | sb->s_lock = 1; 47 | } 48 | 49 | extern inline void unlock_super(struct super_block * sb) 50 | { 51 | sb->s_lock = 0; 52 | wake_up(&sb->s_wait); 53 | } 54 | 55 | #endif /* _LINUX_LOCKS_H */ 56 | 57 | -------------------------------------------------------------------------------- /drivers/scsi/sr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * sr.h by David Giller 3 | * CD-ROM disk driver header file 4 | * 5 | * adapted from: 6 | * sd.h Copyright (C) 1992 Drew Eckhardt 7 | * SCSI disk driver header file by 8 | * Drew Eckhardt 9 | * 10 | * 11 | * 12 | * Modified by Eric Youngdale eric@tantalus.nrl.navy.mil to 13 | * add scatter-gather, multiple outstanding request, and other 14 | * enhancements. 15 | */ 16 | 17 | #ifndef _SR_H 18 | #define _SR_H 19 | 20 | #include "scsi.h" 21 | 22 | typedef struct 23 | { 24 | unsigned capacity; /* size in blocks */ 25 | unsigned sector_size; /* size in bytes */ 26 | Scsi_Device *device; 27 | unsigned long mpcd_sector; /* for reading multisession-CD's */ 28 | char xa_flags; /* some flags for handling XA-CD's */ 29 | unsigned char sector_bit_size; /* sector size = 2^sector_bit_size */ 30 | unsigned char sector_bit_shift; /* sectors/FS block = 2^sector_bit_shift*/ 31 | unsigned needs_sector_size:1; /* needs to get sector size */ 32 | unsigned ten:1; /* support ten byte commands */ 33 | unsigned remap:1; /* support remapping */ 34 | unsigned use:1; /* is this device still supportable */ 35 | } Scsi_CD; 36 | 37 | extern Scsi_CD * scsi_CDs; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /include/asm-mips/delay.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_MIPS_DELAY_H 2 | #define __ASM_MIPS_DELAY_H 3 | 4 | extern __inline__ void __delay(int loops) 5 | { 6 | __asm__ __volatile__ ( 7 | ".set\tnoreorder\n\t" 8 | ".set\tnoat\n\t" 9 | "1:\tbne\t$0,%0,1b\n\t" 10 | "subu\t%0,%0,1\n\t" 11 | ".set\tat\n\t" 12 | ".set\treorder" 13 | :"=r" (loops) 14 | :"0" (loops)); 15 | } 16 | 17 | /* 18 | * division by multiplication: you don't have to worry about 19 | * loss of precision. 20 | * 21 | * Use only for very small delays ( < 1 msec). Should probably use a 22 | * lookup table, really, as the multiplications take much too long with 23 | * short delays. This is a "reasonable" implementation, though (and the 24 | * first constant multiplications gets optimized away if the delay is 25 | * a constant) 26 | */ 27 | extern __inline__ void udelay(unsigned long usecs) 28 | { 29 | usecs *= 0x000010c6; /* 2**32 / 1000000 */ 30 | __asm__("mul\t%0,%0,%1" 31 | :"=r" (usecs) 32 | :"0" (usecs),"r" (loops_per_sec)); 33 | __delay(usecs); 34 | } 35 | 36 | /* 37 | * 64-bit integers means we don't have to worry about overflow as 38 | * on some other architectures.. 39 | */ 40 | extern __inline__ unsigned long muldiv(unsigned long a, unsigned long b, unsigned long c) 41 | { 42 | return (a*b)/c; 43 | } 44 | 45 | #endif /* __ASM_MIPS_DELAY_H */ 46 | -------------------------------------------------------------------------------- /include/linux/pipe_fs_i.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_PIPE_FS_I_H 2 | #define _LINUX_PIPE_FS_I_H 3 | 4 | struct pipe_inode_info { 5 | struct wait_queue * wait; 6 | char * base; 7 | unsigned int start; 8 | unsigned int len; 9 | unsigned int lock; 10 | unsigned int rd_openers; 11 | unsigned int wr_openers; 12 | unsigned int readers; 13 | unsigned int writers; 14 | }; 15 | 16 | #define PIPE_WAIT(inode) ((inode).u.pipe_i.wait) 17 | #define PIPE_BASE(inode) ((inode).u.pipe_i.base) 18 | #define PIPE_START(inode) ((inode).u.pipe_i.start) 19 | #define PIPE_LEN(inode) ((inode).u.pipe_i.len) 20 | #define PIPE_RD_OPENERS(inode) ((inode).u.pipe_i.rd_openers) 21 | #define PIPE_WR_OPENERS(inode) ((inode).u.pipe_i.wr_openers) 22 | #define PIPE_READERS(inode) ((inode).u.pipe_i.readers) 23 | #define PIPE_WRITERS(inode) ((inode).u.pipe_i.writers) 24 | #define PIPE_LOCK(inode) ((inode).u.pipe_i.lock) 25 | #define PIPE_SIZE(inode) PIPE_LEN(inode) 26 | 27 | #define PIPE_EMPTY(inode) (PIPE_SIZE(inode)==0) 28 | #define PIPE_FULL(inode) (PIPE_SIZE(inode)==PIPE_BUF) 29 | #define PIPE_FREE(inode) (PIPE_BUF - PIPE_LEN(inode)) 30 | #define PIPE_END(inode) ((PIPE_START(inode)+PIPE_LEN(inode))&\ 31 | (PIPE_BUF-1)) 32 | #define PIPE_MAX_RCHUNK(inode) (PIPE_BUF - PIPE_START(inode)) 33 | #define PIPE_MAX_WCHUNK(inode) (PIPE_BUF - PIPE_END(inode)) 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /arch/alpha/kernel/head.S: -------------------------------------------------------------------------------- 1 | /* 2 | * alpha/boot/head.S 3 | * 4 | * initial boot stuff.. At this point, the bootloader has already 5 | * switched into OSF/1 PAL-code, and loaded us at the correct address 6 | * (START_ADDR). So there isn't much left for us to do: just set up 7 | * the kernel global pointer and jump to the kernel entry-point. 8 | */ 9 | 10 | #define __ASSEMBLY__ 11 | #include 12 | #include 13 | 14 | #define halt .long PAL_halt 15 | 16 | .globl swapper_pg_dir 17 | swapper_pg_dir=SWAPPER_PGD 18 | 19 | .set noreorder 20 | .globl __start 21 | .ent __start 22 | __start: 23 | br $27,1f 24 | 1: ldgp $29,0($27) 25 | lda $27,start_kernel 26 | jsr $26,($27),start_kernel 27 | halt 28 | .end __start 29 | 30 | .align 5 31 | .globl wrent 32 | .ent wrent 33 | wrent: 34 | .long PAL_wrent 35 | ret ($26) 36 | .end wrent 37 | 38 | .align 5 39 | .globl wrkgp 40 | .ent wrkgp 41 | wrkgp: 42 | .long PAL_wrkgp 43 | ret ($26) 44 | .end wrkgp 45 | 46 | .align 5 47 | .globl wrusp 48 | .ent wrusp 49 | wrusp: 50 | .long PAL_wrusp 51 | ret ($26) 52 | .end wrusp 53 | 54 | .align 5 55 | .globl rdusp 56 | .ent rdusp 57 | rdusp: 58 | .long PAL_rdusp 59 | ret ($26) 60 | .end rdusp 61 | 62 | .align 9 63 | .globl floppy_track_buffer 64 | floppy_track_buffer: 65 | .space 512*2*MAX_BUFFER_SECTORS,1 66 | -------------------------------------------------------------------------------- /include/linux/time.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_TIME_H 2 | #define _LINUX_TIME_H 3 | 4 | struct timeval { 5 | long tv_sec; /* seconds */ 6 | long tv_usec; /* microseconds */ 7 | }; 8 | 9 | struct timezone { 10 | int tz_minuteswest; /* minutes west of Greenwich */ 11 | int tz_dsttime; /* type of dst correction */ 12 | }; 13 | 14 | #define NFDBITS __NFDBITS 15 | 16 | #ifdef __KERNEL__ 17 | void do_gettimeofday(struct timeval *tv); 18 | #include 19 | #include 20 | #define FD_SETSIZE __FD_SETSIZE 21 | #define FD_SET(fd,fdsetp) set_bit(fd,fdsetp) 22 | #define FD_CLR(fd,fdsetp) clear_bit(fd,fdsetp) 23 | #define FD_ISSET(fd,fdsetp) (0 != test_bit(fd,fdsetp)) 24 | #define FD_ZERO(fdsetp) memset(fdsetp, 0, sizeof(struct fd_set)) 25 | #else 26 | #define FD_SETSIZE __FD_SETSIZE 27 | #define FD_SET(fd,fdsetp) __FD_SET(fd,fdsetp) 28 | #define FD_CLR(fd,fdsetp) __FD_CLR(fd,fdsetp) 29 | #define FD_ISSET(fd,fdsetp) __FD_ISSET(fd,fdsetp) 30 | #define FD_ZERO(fdsetp) __FD_ZERO(fdsetp) 31 | #endif 32 | 33 | /* 34 | * Names of the interval timers, and structure 35 | * defining a timer setting. 36 | */ 37 | #define ITIMER_REAL 0 38 | #define ITIMER_VIRTUAL 1 39 | #define ITIMER_PROF 2 40 | 41 | struct itimerval { 42 | struct timeval it_interval; /* timer interval */ 43 | struct timeval it_value; /* current value */ 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /fs/sysv/README: -------------------------------------------------------------------------------- 1 | This is the implementation of the SystemV/Coherent filesystem for Linux. 2 | It implements all of 3 | - Xenix FS, 4 | - SystemV/386 FS, 5 | - Coherent FS. 6 | 7 | This is version beta 4. 8 | 9 | To install: 10 | * Answer the 'System V and Coherent filesystem support' question with 'y' 11 | when configuring the kernel. 12 | * To mount a disk or a partition, use 13 | mount [-r] -t sysv device mountpoint 14 | The file system type names 15 | -t sysv 16 | -t xenix 17 | -t coherent 18 | may be used interchangeably, but the last two will eventually disappear. 19 | 20 | Bugs in the present implementation: 21 | - Coherent FS: 22 | - The "free list interleave" n:m is currently ignored. 23 | - Only file systems with no filesystem name and no pack name are recognized. 24 | (See Coherent "man mkfs" for a description of these features.) 25 | - SystemV Release 2 FS: 26 | The superblock is only searched in the blocks 9, 15, 18, which corresponds to the 27 | beginning of track 1 on floppy disks. No support for this FS on hard disk yet. 28 | 29 | 30 | Please report any bugs and suggestions to 31 | Bruno Haible or 32 | Pascal Haible . 33 | 34 | 35 | Bruno Haible 36 | 37 | 38 | -------------------------------------------------------------------------------- /include/linux/blkdev.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_BLKDEV_H 2 | #define _LINUX_BLKDEV_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | /* 9 | * Ok, this is an expanded form so that we can use the same 10 | * request for paging requests when that is implemented. In 11 | * paging, 'bh' is NULL, and the semaphore is used to wait 12 | * for read/write completion. 13 | */ 14 | struct request { 15 | int dev; /* -1 if no request */ 16 | int cmd; /* READ or WRITE */ 17 | int errors; 18 | unsigned long sector; 19 | unsigned long nr_sectors; 20 | unsigned long current_nr_sectors; 21 | char * buffer; 22 | struct semaphore * sem; 23 | struct buffer_head * bh; 24 | struct buffer_head * bhtail; 25 | struct request * next; 26 | }; 27 | 28 | struct blk_dev_struct { 29 | void (*request_fn)(void); 30 | struct request * current_request; 31 | }; 32 | 33 | struct sec_size { 34 | unsigned block_size; 35 | unsigned block_size_bits; 36 | }; 37 | 38 | extern struct sec_size * blk_sec[MAX_BLKDEV]; 39 | extern struct blk_dev_struct blk_dev[MAX_BLKDEV]; 40 | extern struct wait_queue * wait_for_request; 41 | extern void resetup_one_dev(struct gendisk *dev, int drive); 42 | 43 | extern int * blk_size[MAX_BLKDEV]; 44 | 45 | extern int * blksize_size[MAX_BLKDEV]; 46 | 47 | extern int * hardsect_size[MAX_BLKDEV]; 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /include/linux/in_systm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * INET An implementation of the TCP/IP protocol suite for the LINUX 3 | * operating system. INET is implemented using the BSD Socket 4 | * interface as the means of communication with the user level. 5 | * 6 | * Miscellaneous internetwork definitions for kernel. 7 | * 8 | * Version: @(#)in_systm.h 1.0.0 12/17/93 9 | * 10 | * Authors: Original taken from Berkeley BSD UNIX 4.3-RENO. 11 | * Fred N. van Kempen, 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 16 | * 2 of the License, or (at your option) any later version. 17 | */ 18 | #ifndef _LINUX_IN_SYSTM_H 19 | #define _LINUX_IN_SYSTM_H 20 | 21 | /* 22 | * Network types. 23 | * The n_ types are network-order variants of their natural 24 | * equivalents. The Linux kernel NET-2 code does not use 25 | * them (yet), but it might in the future. This is mostly 26 | * there for compatibility with BSD user-level programs. 27 | */ 28 | typedef u_short n_short; /* short as received from the net */ 29 | typedef u_long n_long; /* long as received from the net */ 30 | typedef u_long n_time; /* ms since 00:00 GMT, byte rev */ 31 | 32 | #endif /* _LINUX_IN_SYSTM_H */ 33 | -------------------------------------------------------------------------------- /drivers/sound/tuning.h: -------------------------------------------------------------------------------- 1 | #ifdef SEQUENCER_C 2 | 3 | unsigned short semitone_tuning[24] = 4 | { 5 | /* 0 */ 10000, 10595, 11225, 11892, 12599, 13348, 14142, 14983, 6 | /* 8 */ 15874, 16818, 17818, 18877, 20000, 21189, 22449, 23784, 7 | /* 16 */ 25198, 26697, 28284, 29966, 31748, 33636, 35636, 37755 8 | }; 9 | 10 | unsigned short cent_tuning[100] = 11 | { 12 | /* 0 */ 10000, 10006, 10012, 10017, 10023, 10029, 10035, 10041, 13 | /* 8 */ 10046, 10052, 10058, 10064, 10070, 10075, 10081, 10087, 14 | /* 16 */ 10093, 10099, 10105, 10110, 10116, 10122, 10128, 10134, 15 | /* 24 */ 10140, 10145, 10151, 10157, 10163, 10169, 10175, 10181, 16 | /* 32 */ 10187, 10192, 10198, 10204, 10210, 10216, 10222, 10228, 17 | /* 40 */ 10234, 10240, 10246, 10251, 10257, 10263, 10269, 10275, 18 | /* 48 */ 10281, 10287, 10293, 10299, 10305, 10311, 10317, 10323, 19 | /* 56 */ 10329, 10335, 10341, 10347, 10353, 10359, 10365, 10371, 20 | /* 64 */ 10377, 10383, 10389, 10395, 10401, 10407, 10413, 10419, 21 | /* 72 */ 10425, 10431, 10437, 10443, 10449, 10455, 10461, 10467, 22 | /* 80 */ 10473, 10479, 10485, 10491, 10497, 10503, 10509, 10515, 23 | /* 88 */ 10521, 10528, 10534, 10540, 10546, 10552, 10558, 10564, 24 | /* 96 */ 10570, 10576, 10582, 10589 25 | }; 26 | #else 27 | extern unsigned short semitone_tuning[24]; 28 | extern unsigned short cent_tuning[100]; 29 | #endif 30 | -------------------------------------------------------------------------------- /lib/ctype.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/lib/ctype.c 3 | * 4 | * Copyright (C) 1991, 1992 Linus Torvalds 5 | */ 6 | 7 | #include 8 | 9 | char _ctmp; 10 | unsigned char _ctype[] = {0x00, /* EOF */ 11 | _C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */ 12 | _C,_C|_S,_C|_S,_C|_S,_C|_S,_C|_S,_C,_C, /* 8-15 */ 13 | _C,_C,_C,_C,_C,_C,_C,_C, /* 16-23 */ 14 | _C,_C,_C,_C,_C,_C,_C,_C, /* 24-31 */ 15 | _S|_SP,_P,_P,_P,_P,_P,_P,_P, /* 32-39 */ 16 | _P,_P,_P,_P,_P,_P,_P,_P, /* 40-47 */ 17 | _D,_D,_D,_D,_D,_D,_D,_D, /* 48-55 */ 18 | _D,_D,_P,_P,_P,_P,_P,_P, /* 56-63 */ 19 | _P,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U, /* 64-71 */ 20 | _U,_U,_U,_U,_U,_U,_U,_U, /* 72-79 */ 21 | _U,_U,_U,_U,_U,_U,_U,_U, /* 80-87 */ 22 | _U,_U,_U,_P,_P,_P,_P,_P, /* 88-95 */ 23 | _P,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L, /* 96-103 */ 24 | _L,_L,_L,_L,_L,_L,_L,_L, /* 104-111 */ 25 | _L,_L,_L,_L,_L,_L,_L,_L, /* 112-119 */ 26 | _L,_L,_L,_P,_P,_P,_P,_C, /* 120-127 */ 27 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 128-143 */ 28 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 144-159 */ 29 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 160-175 */ 30 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 176-191 */ 31 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 192-207 */ 32 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 208-223 */ 33 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 224-239 */ 34 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; /* 240-255 */ 35 | 36 | -------------------------------------------------------------------------------- /net/inet/eth.h: -------------------------------------------------------------------------------- 1 | /* 2 | * INET An implementation of the TCP/IP protocol suite for the LINUX 3 | * operating system. NET is implemented using the BSD Socket 4 | * interface as the means of communication with the user level. 5 | * 6 | * Definitions for the Ethernet handlers. 7 | * 8 | * Version: @(#)eth.h 1.0.4 05/13/93 9 | * 10 | * Authors: Ross Biro, 11 | * Fred N. van Kempen, 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 16 | * 2 of the License, or (at your option) any later version. 17 | */ 18 | #ifndef _ETH_H 19 | #define _ETH_H 20 | 21 | 22 | #include 23 | 24 | 25 | extern char *eth_print(unsigned char *ptr); 26 | extern void eth_dump(struct ethhdr *eth); 27 | extern int eth_header(unsigned char *buff, struct device *dev, 28 | unsigned short type, unsigned long daddr, 29 | unsigned long saddr, unsigned len); 30 | extern int eth_rebuild_header(void *buff, struct device *dev); 31 | extern void eth_add_arp(unsigned long addr, struct sk_buff *skb, 32 | struct device *dev); 33 | extern unsigned short eth_type_trans(struct sk_buff *skb, struct device *dev); 34 | 35 | #endif /* _ETH_H */ 36 | -------------------------------------------------------------------------------- /net/inet/icmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * INET An implementation of the TCP/IP protocol suite for the LINUX 3 | * operating system. INET is implemented using the BSD Socket 4 | * interface as the means of communication with the user level. 5 | * 6 | * Definitions for the ICMP module. 7 | * 8 | * Version: @(#)icmp.h 1.0.4 05/13/93 9 | * 10 | * Authors: Ross Biro, 11 | * Fred N. van Kempen, 12 | * 13 | * This program is free software; you can redistribute it and/or 14 | * modify it under the terms of the GNU General Public License 15 | * as published by the Free Software Foundation; either version 16 | * 2 of the License, or (at your option) any later version. 17 | */ 18 | #ifndef _ICMP_H 19 | #define _ICMP_H 20 | 21 | #include 22 | 23 | 24 | extern struct icmp_err icmp_err_convert[]; 25 | extern struct icmp_mib icmp_statistics; 26 | 27 | 28 | extern void icmp_send(struct sk_buff *skb_in, int type, int code, 29 | unsigned long info, struct device *dev); 30 | extern int icmp_rcv(struct sk_buff *skb1, struct device *dev, 31 | struct options *opt, unsigned long daddr, 32 | unsigned short len, unsigned long saddr, 33 | int redo, struct inet_protocol *protocol); 34 | 35 | extern int icmp_ioctl(struct sock *sk, int cmd, 36 | unsigned long arg); 37 | 38 | #endif /* _ICMP_H */ 39 | -------------------------------------------------------------------------------- /net/protocols.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Protocol initializer table. Here separately for convenience 3 | * 4 | */ 5 | 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | 13 | #define CONFIG_UNIX /* always present... */ 14 | 15 | #ifdef CONFIG_UNIX 16 | #include "unix/unix.h" 17 | #endif 18 | #ifdef CONFIG_INET 19 | #include 20 | #endif 21 | #ifdef CONFIG_IPX 22 | #include "inet/ipxcall.h" 23 | #include "inet/p8022call.h" 24 | #endif 25 | #ifdef CONFIG_AX25 26 | #include "inet/ax25call.h" 27 | #endif 28 | #ifdef CONFIG_ATALK 29 | #ifndef CONFIG_IPX 30 | #include "inet/p8022call.h" 31 | #endif 32 | #include "inet/atalkcall.h" 33 | #endif 34 | #include "inet/psnapcall.h" 35 | 36 | /* 37 | * Protocol Table 38 | */ 39 | 40 | struct net_proto protocols[] = { 41 | #ifdef CONFIG_UNIX 42 | { "UNIX", unix_proto_init }, 43 | #endif 44 | #if defined(CONFIG_IPX)||defined(CONFIG_ATALK) 45 | { "802.2", p8022_proto_init }, 46 | { "SNAP", snap_proto_init }, 47 | #endif 48 | #ifdef CONFIG_AX25 49 | { "AX.25", ax25_proto_init }, 50 | #endif 51 | #ifdef CONFIG_INET 52 | { "INET", inet_proto_init }, 53 | #endif 54 | #ifdef CONFIG_IPX 55 | { "IPX", ipx_proto_init }, 56 | #endif 57 | #ifdef CONFIG_ATALK 58 | { "DDP", atalk_proto_init }, 59 | #endif 60 | { NULL, NULL } 61 | }; 62 | 63 | 64 | -------------------------------------------------------------------------------- /include/linux/string.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_STRING_H_ 2 | #define _LINUX_STRING_H_ 3 | 4 | #include /* for size_t */ 5 | 6 | #ifndef NULL 7 | #define NULL ((void *) 0) 8 | #endif 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | extern char * ___strtok; 15 | extern char * strcpy(char *,const char *); 16 | extern char * strncpy(char *,const char *,size_t); 17 | extern char * strcat(char *, const char *); 18 | extern char * strncat(char *, const char *, size_t); 19 | extern char * strchr(const char *,int); 20 | extern char * strpbrk(const char *,const char *); 21 | extern char * strtok(char *,const char *); 22 | extern char * strstr(const char *,const char *); 23 | extern size_t strlen(const char *); 24 | extern size_t strnlen(const char *,size_t); 25 | extern size_t strspn(const char *,const char *); 26 | extern int strcmp(const char *,const char *); 27 | extern int strncmp(const char *,const char *,size_t); 28 | 29 | extern void * memset(void *,int,size_t); 30 | extern void * memcpy(void *,const void *,size_t); 31 | extern void * memmove(void *,const void *,size_t); 32 | extern void * memscan(void *,int,size_t); 33 | extern int memcmp(const void *,const void *,size_t); 34 | 35 | /* 36 | * Include machine specific inline routines 37 | */ 38 | #include 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | #endif /* _LINUX_STRING_H_ */ 45 | -------------------------------------------------------------------------------- /include/linux/hpfs_fs_sb.h: -------------------------------------------------------------------------------- 1 | #ifndef _HPFS_FS_SB 2 | #define _HPFS_FS_SB 3 | 4 | struct hpfs_sb_info { 5 | ino_t sb_root; /* inode number of root dir */ 6 | unsigned sb_fs_size; /* file system size, sectors */ 7 | unsigned sb_bitmaps; /* sector number of bitmap list */ 8 | unsigned sb_dirband_size; /* directory band size, dnodes */ 9 | unsigned sb_dmap; /* sector number of dnode bit map */ 10 | unsigned sb_n_free; /* free blocks for statfs, or -1 */ 11 | unsigned sb_n_free_dnodes; /* free dnodes for statfs, or -1 */ 12 | uid_t sb_uid; /* uid from mount options */ 13 | gid_t sb_gid; /* gid from mount options */ 14 | umode_t sb_mode; /* mode from mount options */ 15 | unsigned sb_lowercase : 1; /* downcase filenames hackery */ 16 | unsigned sb_conv : 2; /* crlf->newline hackery */ 17 | }; 18 | 19 | #define s_hpfs_root u.hpfs_sb.sb_root 20 | #define s_hpfs_fs_size u.hpfs_sb.sb_fs_size 21 | #define s_hpfs_bitmaps u.hpfs_sb.sb_bitmaps 22 | #define s_hpfs_dirband_size u.hpfs_sb.sb_dirband_size 23 | #define s_hpfs_dmap u.hpfs_sb.sb_dmap 24 | #define s_hpfs_uid u.hpfs_sb.sb_uid 25 | #define s_hpfs_gid u.hpfs_sb.sb_gid 26 | #define s_hpfs_mode u.hpfs_sb.sb_mode 27 | #define s_hpfs_n_free u.hpfs_sb.sb_n_free 28 | #define s_hpfs_n_free_dnodes u.hpfs_sb.sb_n_free_dnodes 29 | #define s_hpfs_lowercase u.hpfs_sb.sb_lowercase 30 | #define s_hpfs_conv u.hpfs_sb.sb_conv 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /include/linux/msdos_fs_i.h: -------------------------------------------------------------------------------- 1 | #ifndef _MSDOS_FS_I 2 | #define _MSDOS_FS_I 3 | 4 | #ifndef _LINUX_PIPE_FS_I_H 5 | #include 6 | #endif 7 | 8 | /* 9 | * MS-DOS file system inode data in memory 10 | */ 11 | 12 | struct msdos_inode_info { 13 | /* 14 | UMSDOS manage special file and fifo as normal empty 15 | msdos file. fifo inode processing conflict with msdos 16 | processing. So I insert the pipe_inode_info so the 17 | information does not overlap. This increases the size of 18 | the msdos_inode_info, but the clear winner here is 19 | the ext2_inode_info. So it does not change anything to 20 | the total size of a struct inode. 21 | 22 | I have not put it conditional. With the advent of loadable 23 | file system drivers, it would be very easy to compile 24 | a MsDOS FS driver unaware of UMSDOS and then later to 25 | load a (then incompatible) UMSDOS FS driver. 26 | */ 27 | struct pipe_inode_info reserved; 28 | int i_start; /* first cluster or 0 */ 29 | int i_attrs; /* unused attribute bits */ 30 | int i_busy; /* file is either deleted but still open, or 31 | inconsistent (mkdir) */ 32 | struct inode *i_depend; /* pointer to inode that depends on the 33 | current inode */ 34 | struct inode *i_old; /* pointer to the old inode this inode 35 | depends on */ 36 | int i_binary; /* file contains non-text data */ 37 | }; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /include/asm-mips/mipsconfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/include/asm-mips/mipsconfig.h 3 | * 4 | * This file is subject to the terms and conditions of the GNU General Public 5 | * License. See the file "COPYING" in the main directory of this archive 6 | * for more details. 7 | * 8 | * Copyright (C) 1994, 1995 by Waldorf Electronics 9 | * written by Ralf Baechle 10 | * 11 | */ 12 | #ifndef __ASM_MIPS_MIPS_CONFIG_H 13 | #define __ASM_MIPS_MIPS_CONFIG_H 14 | 15 | /* 16 | * This is the virtual address to which all ports are being mapped. 17 | * Must be a value that can be load with a lui instruction. 18 | */ 19 | #define PORT_BASE 0xe0000000 20 | 21 | /* #define NUMBER_OF_TLB_ENTRIES 48 */ /* see bootinfo.h -- Andy */ 22 | #define NUMBER_OF_TLB_ENTRIES 48 23 | 24 | /* 25 | * Pagetables are 4MB mapped at 0xe3000000 26 | * Must be a value that can be load with a lui instruction. 27 | */ 28 | #define TLBMAP 0xe4000000 29 | 30 | /* 31 | * The virtual address where we'll map the pagetables 32 | * For a base address of 0xe3000000 this is 0xe338c000 33 | * For a base address of 0xe4000000 this is 0xe4390000 34 | * FIXME: Gas miscomputes the following expression! 35 | #define TLB_ROOT (TLBMAP + (TLBMAP >> (12-2))) 36 | */ 37 | #define TLB_ROOT 0xe4390000 38 | 39 | /* 40 | * This ASID is reserved for the swapper 41 | */ 42 | #define SWAPPER_ASID 0 43 | 44 | #endif /* __ASM_MIPS_MIPS_CONFIG_H */ 45 | -------------------------------------------------------------------------------- /kernel/softirq.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/kernel/softirq.c 3 | * 4 | * Copyright (C) 1992 Linus Torvalds 5 | * 6 | * do_bottom_half() runs at normal kernel priority: all interrupts 7 | * enabled. do_bottom_half() is atomic with respect to itself: a 8 | * bottom_half handler need not be re-entrant. 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #define INCLUDE_INLINE_FUNCS 25 | #include 26 | 27 | unsigned long intr_count = 0; 28 | 29 | unsigned long bh_active = 0; 30 | unsigned long bh_mask = 0; 31 | struct bh_struct bh_base[32]; 32 | 33 | 34 | asmlinkage void do_bottom_half(void) 35 | { 36 | unsigned long active; 37 | unsigned long mask, left; 38 | struct bh_struct *bh; 39 | 40 | bh = bh_base; 41 | active = bh_active & bh_mask; 42 | for (mask = 1, left = ~0 ; left & active ; bh++,mask += mask,left += left) { 43 | if (mask & active) { 44 | void (*fn)(void *); 45 | bh_active &= ~mask; 46 | fn = bh->routine; 47 | if (!fn) 48 | goto bad_bh; 49 | fn(bh->data); 50 | } 51 | } 52 | return; 53 | bad_bh: 54 | printk ("irq.c:bad bottom half entry %08lx\n", mask); 55 | } 56 | -------------------------------------------------------------------------------- /include/asm-alpha/delay.h: -------------------------------------------------------------------------------- 1 | #ifndef __ALPHA_DELAY_H 2 | #define __ALPHA_DELAY_H 3 | 4 | extern unsigned long loops_per_sec; 5 | 6 | /* 7 | * Copyright (C) 1993 Linus Torvalds 8 | * 9 | * Delay routines, using a pre-computed "loops_per_second" value. 10 | */ 11 | 12 | extern __inline__ void __delay(unsigned long loops) 13 | { 14 | __asm__ __volatile__(".align 3\n" 15 | "1:\tsubq %0,1,%0\n\t" 16 | "bge %0,1b": "=r" (loops) : "0" (loops)); 17 | } 18 | 19 | /* 20 | * division by multiplication: you don't have to worry about 21 | * loss of precision. 22 | * 23 | * Use only for very small delays ( < 1 msec). Should probably use a 24 | * lookup table, really, as the multiplications take much too long with 25 | * short delays. This is a "reasonable" implementation, though (and the 26 | * first constant multiplications gets optimized away if the delay is 27 | * a constant) 28 | */ 29 | extern __inline__ void udelay(unsigned long usecs) 30 | { 31 | usecs *= 0x000010c6f7a0b5edUL; /* 2**64 / 1000000 */ 32 | __asm__("umulh %1,%2,%0" 33 | :"=r" (usecs) 34 | :"r" (usecs),"r" (loops_per_sec)); 35 | __delay(usecs); 36 | } 37 | 38 | /* 39 | * 64-bit integers means we don't have to worry about overflow as 40 | * on some other architectures.. 41 | */ 42 | extern __inline__ unsigned long muldiv(unsigned long a, unsigned long b, unsigned long c) 43 | { 44 | return (a*b)/c; 45 | } 46 | 47 | #endif /* defined(__ALPHA_DELAY_H) */ 48 | -------------------------------------------------------------------------------- /drivers/sound/COPYING: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright by Hannu Savolainen 1993 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * 13 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | * SUCH DAMAGE. 24 | * 25 | */ 26 | -------------------------------------------------------------------------------- /drivers/scsi/sd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * sd.h Copyright (C) 1992 Drew Eckhardt 3 | * SCSI disk driver header file by 4 | * Drew Eckhardt 5 | * 6 | * 7 | * 8 | * Modified by Eric Youngdale eric@tantalus.nrl.navy.mil to 9 | * add scatter-gather, multiple outstanding request, and other 10 | * enhancements. 11 | */ 12 | #ifndef _SD_H 13 | #define _SD_H 14 | /* 15 | $Header: /usr/src/linux/kernel/blk_drv/scsi/RCS/sd.h,v 1.1 1992/07/24 06:27:38 root Exp root $ 16 | */ 17 | 18 | #ifndef _SCSI_H 19 | #include "scsi.h" 20 | #endif 21 | 22 | #ifndef _GENDISK_H 23 | #include 24 | #endif 25 | 26 | /* 27 | This is an arbitrary constant, and may be changed to whatever 28 | suits your purposes. Note that smaller will get you a few bytes 29 | more in kernel space if that is your thing. 30 | */ 31 | 32 | extern struct hd_struct * sd; 33 | 34 | typedef struct scsi_disk { 35 | unsigned capacity; /* size in blocks */ 36 | unsigned sector_size; /* size in bytes */ 37 | Scsi_Device *device; 38 | unsigned char sector_bit_size; /* sector_size = 2 to the bit size power */ 39 | unsigned char sector_bit_shift; /* power of 2 sectors per FS block */ 40 | unsigned ten:1; /* support ten byte read / write */ 41 | unsigned remap:1; /* support remapping */ 42 | unsigned has_part_table:1; /* has partition table */ 43 | } Scsi_Disk; 44 | 45 | extern Scsi_Disk * rscsi_disks; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /drivers/scsi/sg.h: -------------------------------------------------------------------------------- 1 | /* 2 | History: 3 | Started: Aug 9 by Lawrence Foard (entropy@world.std.com), to allow user 4 | process control of SCSI devices. 5 | Development Sponsored by Killy Corp. NY NY 6 | */ 7 | 8 | /* 9 | An SG device is accessed by writing "packets" to it, the replies 10 | are then read using the read call. The same header is used for 11 | reply, just ignore reply_len field. 12 | */ 13 | 14 | struct sg_header 15 | { 16 | int pack_len; /* length of incoming packet <4096 (including header) */ 17 | int reply_len; /* maximum length <4096 of expected reply */ 18 | int pack_id; /* id number of packet */ 19 | int result; /* 0==ok, otherwise refer to errno codes */ 20 | unsigned int twelve_byte:1; /* Force 12 byte command length for group 6 & 7 commands */ 21 | unsigned int other_flags:31; /* for future use */ 22 | unsigned char sense_buffer[16]; /* used only by reads */ 23 | /* command follows then data for command */ 24 | }; 25 | 26 | /* ioctl's */ 27 | #define SG_SET_TIMEOUT 0x2201 /* set timeout *(int *)arg==timeout */ 28 | #define SG_GET_TIMEOUT 0x2202 /* get timeout return timeout */ 29 | 30 | #define SG_DEFAULT_TIMEOUT 6000 /* 1 minute timeout */ 31 | #define SG_DEFAULT_RETRIES 1 32 | 33 | #define SG_MAX_QUEUE 4 /* maximum outstanding request, arbitrary, may be 34 | changed if sufficient DMA buffer room available */ 35 | 36 | #define SG_BIG_BUFF 32768 37 | -------------------------------------------------------------------------------- /include/linux/fcntl.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_FCNTL_H 2 | #define _LINUX_FCNTL_H 3 | 4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files 5 | located on an ext2 file system */ 6 | #define O_ACCMODE 0003 7 | #define O_RDONLY 00 8 | #define O_WRONLY 01 9 | #define O_RDWR 02 10 | #define O_CREAT 0100 /* not fcntl */ 11 | #define O_EXCL 0200 /* not fcntl */ 12 | #define O_NOCTTY 0400 /* not fcntl */ 13 | #define O_TRUNC 01000 /* not fcntl */ 14 | #define O_APPEND 02000 15 | #define O_NONBLOCK 04000 16 | #define O_NDELAY O_NONBLOCK 17 | #define O_SYNC 010000 18 | #define FASYNC 020000 /* fcntl, for BSD compatibility */ 19 | 20 | #define F_DUPFD 0 /* dup */ 21 | #define F_GETFD 1 /* get f_flags */ 22 | #define F_SETFD 2 /* set f_flags */ 23 | #define F_GETFL 3 /* more flags (cloexec) */ 24 | #define F_SETFL 4 25 | #define F_GETLK 5 26 | #define F_SETLK 6 27 | #define F_SETLKW 7 28 | 29 | #define F_SETOWN 8 /* for sockets. */ 30 | #define F_GETOWN 9 /* for sockets. */ 31 | 32 | /* for F_[GET|SET]FL */ 33 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ 34 | 35 | #define F_RDLCK 0 36 | #define F_WRLCK 1 37 | #define F_UNLCK 2 38 | 39 | /* For bsd flock () */ 40 | #define F_EXLCK 4 /* or 3 */ 41 | #define F_SHLCK 8 /* or 4 */ 42 | 43 | struct flock { 44 | short l_type; 45 | short l_whence; 46 | off_t l_start; 47 | off_t l_len; 48 | pid_t l_pid; 49 | }; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /include/asm-alpha/ptrace.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASMAXP_PTRACE_H 2 | #define _ASMAXP_PTRACE_H 3 | 4 | 5 | /* 6 | * This struct defines the way the registers are stored on the 7 | * kernel stack during a system call or other kernel entry 8 | * 9 | * NOTE! I want to minimize the overhead of system calls, so this 10 | * struct has as little information as possible. I does not have 11 | * 12 | * - floating point regs: the kernel doesn't change those 13 | * - r9-15: saved by the C compiler 14 | * 15 | * This makes "fork()" and "exec()" a bit more complex, but should 16 | * give us low system call latency. 17 | */ 18 | 19 | struct pt_regs { 20 | unsigned long r0; 21 | unsigned long r1; 22 | unsigned long r2; 23 | unsigned long r3; 24 | unsigned long r4; 25 | unsigned long r5; 26 | unsigned long r6; 27 | unsigned long r7; 28 | unsigned long r8; 29 | unsigned long r19; 30 | unsigned long r20; 31 | unsigned long r21; 32 | unsigned long r22; 33 | unsigned long r23; 34 | unsigned long r24; 35 | unsigned long r25; 36 | unsigned long r26; 37 | unsigned long r27; 38 | unsigned long r28; 39 | unsigned long hae; 40 | /* These are saved by PAL-code: */ 41 | unsigned long ps; 42 | unsigned long pc; 43 | unsigned long gp; 44 | unsigned long r16; 45 | unsigned long r17; 46 | unsigned long r18; 47 | }; 48 | 49 | #ifdef __KERNEL__ 50 | #define user_mode(regs) ((regs)->ps & 8) 51 | extern void show_regs(struct pt_regs *); 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /include/linux/nfs_mount.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_NFS_MOUNT_H 2 | #define _LINUX_NFS_MOUNT_H 3 | 4 | /* 5 | * linux/include/linux/nfs_mount.h 6 | * 7 | * Copyright (C) 1992 Rick Sladkey 8 | * 9 | * structure passed from user-space to kernel-space during an nfs mount 10 | */ 11 | 12 | /* 13 | * WARNING! Do not delete or change the order of these fields. If 14 | * a new field is required then add it to the end. The version field 15 | * tracks which fields are present. This will ensure some measure of 16 | * mount-to-kernel version compatibility. Some of these aren't used yet 17 | * but here they are anyway. 18 | */ 19 | 20 | #define NFS_MOUNT_VERSION 1 /* current version */ 21 | 22 | struct nfs_mount_data { 23 | int version; /* 1 */ 24 | int fd; /* 1 */ 25 | struct nfs_fh root; /* 1 */ 26 | int flags; /* 1 */ 27 | int rsize; /* 1 */ 28 | int wsize; /* 1 */ 29 | int timeo; /* 1 */ 30 | int retrans; /* 1 */ 31 | int acregmin; /* 1 */ 32 | int acregmax; /* 1 */ 33 | int acdirmin; /* 1 */ 34 | int acdirmax; /* 1 */ 35 | struct sockaddr_in addr; /* 1 */ 36 | char hostname[256]; /* 1 */ 37 | }; 38 | 39 | /* bits in the flags field */ 40 | 41 | #define NFS_MOUNT_SOFT 0x0001 /* 1 */ 42 | #define NFS_MOUNT_INTR 0x0002 /* 1 */ 43 | #define NFS_MOUNT_SECURE 0x0004 /* 1 */ 44 | #define NFS_MOUNT_POSIX 0x0008 /* 1 */ 45 | #define NFS_MOUNT_NOCTO 0x0010 /* 1 */ 46 | #define NFS_MOUNT_NOAC 0x0020 /* 1 */ 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /arch/alpha/boot/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # arch/alpha/boot/Makefile 3 | # 4 | # This file is subject to the terms and conditions of the GNU General Public 5 | # License. See the file "COPYING" in the main directory of this archive 6 | # for more details. 7 | # 8 | # Copyright (C) 1994 by Linus Torvalds 9 | # 10 | 11 | .c.s: 12 | $(CC) $(CFLAGS) -S -o $*.s $< 13 | .s.o: 14 | $(AS) -o $*.o $< 15 | .c.o: 16 | $(CC) $(CFLAGS) -c -o $*.o $< 17 | .S.s: 18 | $(CC) -D__ASSEMBLY__ -traditional -E -o $*.o $< 19 | .S.o: 20 | $(CC) -D__ASSEMBLY__ -traditional -c -o $*.o $< 21 | 22 | OBJECTS = head.o main.o 23 | 24 | all: tools/lxboot tools/bootlx vmlinux 25 | @echo run mkfloppy on machine with floppy drive 26 | 27 | msb: tools/lxboot tools/bootlx vmlinux 28 | ( cat tools/lxboot tools/bootlx vmlinux ) > /dev/rz0a 29 | disklabel -rw rz0 'linux' tools/lxboot tools/bootlx 30 | 31 | vmlinux: tools/build $(TOPDIR)/vmlinux 32 | tools/build -v $(TOPDIR)/vmlinux > vmlinux 33 | 34 | tools/lxboot: tools/build 35 | tools/build > tools/lxboot 36 | 37 | tools/bootlx: bootloader tools/build 38 | tools/build -vb bootloader > tools/bootlx 39 | 40 | tools/build: tools/build.c 41 | $(HOSTCC) tools/build.c -o tools/build 42 | 43 | bootloader: $(OBJECTS) 44 | $(LD) -non_shared -T 0x20000000 -N \ 45 | $(OBJECTS) \ 46 | $(LIBS) \ 47 | -o bootloader || \ 48 | (rm -f bootloader && exit 1) 49 | 50 | clean: 51 | rm -f vmlinux bootloader tools/build tools/bootlx tools/lxboot 52 | 53 | dep: 54 | -------------------------------------------------------------------------------- /drivers/net/README.wavelan: -------------------------------------------------------------------------------- 1 | #if defined(CONFIG_WAVELAN) 2 | 3 | Thu Feb 23 00:10:31 EST 1995 4 | 5 | 1. At present the driver autoprobes for a WaveLAN card only at I/O address 0x390. 6 | The version of the card that I use (NCR) supports four I/O addresses (selectable 7 | via a pair of DIP switches). If you want the driver to autoprobe a different 8 | subset of the four valid addresses then you will need to edit 9 | .../drivers/net/wavelan.c (near line 714) and change the initialisation of the 10 | `iobase[]' array. Normally, I use a LILO configuration file directive to 11 | obviate the need for autoprobing entirely, a course of action I heartily 12 | recommend. 13 | 14 | 2. By default, the driver uses the Network ID (NWID) stored in the card's Parameter 15 | Storage Area (PSA). However, the PSA NWID can be overridden by a value passed 16 | explicitly as the third numeric argument to LILO's "ether=" directive, either 17 | at the LILO prompt at boot time or within LILO's configuration file. 18 | For example, the following line from such a LILO configuration file would 19 | auto-configure the IRQ value, set the I/O base to 0x390 and set the NWID to 20 | 0x4321, all on a WaveLAN card labelled "eth0": 21 | 22 | .. 23 | append ="ether=0,0x390,0x4321,eth0" 24 | .. 25 | 26 | 3. If you encounter any problems send me some email. 27 | 28 | Good luck, 29 | Bruce Janson (bruce@cs.usyd.edu.au) 30 | 31 | #endif /* defined(CONFIG_WAVELAN) */ 32 | -------------------------------------------------------------------------------- /include/linux/tty_ldisc.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_TTY_LDISC_H 2 | #define _LINUX_TTY_LDISC_H 3 | 4 | /* 5 | * Definitions for the tty line discipline 6 | */ 7 | 8 | #include 9 | #include 10 | 11 | struct tty_ldisc { 12 | int magic; 13 | int num; 14 | int flags; 15 | /* 16 | * The following routines are called from above. 17 | */ 18 | int (*open)(struct tty_struct *); 19 | void (*close)(struct tty_struct *); 20 | void (*flush_buffer)(struct tty_struct *tty); 21 | int (*chars_in_buffer)(struct tty_struct *tty); 22 | int (*read)(struct tty_struct * tty, struct file * file, 23 | unsigned char * buf, unsigned int nr); 24 | int (*write)(struct tty_struct * tty, struct file * file, 25 | unsigned char * buf, unsigned int nr); 26 | int (*ioctl)(struct tty_struct * tty, struct file * file, 27 | unsigned int cmd, unsigned long arg); 28 | void (*set_termios)(struct tty_struct *tty, struct termios * old); 29 | int (*select)(struct tty_struct * tty, struct inode * inode, 30 | struct file * file, int sel_type, 31 | struct select_table_struct *wait); 32 | 33 | /* 34 | * The following routines are called from below. 35 | */ 36 | void (*receive_buf)(struct tty_struct *, unsigned char *cp, 37 | char *fp, int count); 38 | int (*receive_room)(struct tty_struct *); 39 | void (*write_wakeup)(struct tty_struct *); 40 | }; 41 | 42 | #define TTY_LDISC_MAGIC 0x5403 43 | 44 | #define LDISC_FLAG_DEFINED 0x00000001 45 | 46 | #endif /* _LINUX_TTY_LDISC_H */ 47 | -------------------------------------------------------------------------------- /include/asm-generic/bitops.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASM_GENERIC_BITOPS_H_ 2 | #define _ASM_GENERIC_BITOPS_H_ 3 | 4 | /* 5 | * For the benefit of those who are trying to port Linux to another 6 | * architecture, here are some C-language equivalents. You should 7 | * recode these in the native assembly language, if at all possible. 8 | * To guarantee atomicity, these routines call cli() and sti() to 9 | * disable interrupts while they operate. (You have to provide inline 10 | * routines to cli() and sti().) 11 | * 12 | * Also note, these routines assume that you have 32 bit integers. 13 | * You will have to change this if you are trying to port Linux to the 14 | * Alpha architecture or to a Cray. :-) 15 | * 16 | * C language equivalents written by Theodore Ts'o, 9/26/92 17 | */ 18 | 19 | extern __inline__ int set_bit(int nr,int * addr) 20 | { 21 | int mask, retval; 22 | 23 | addr += nr >> 5; 24 | mask = 1 << (nr & 0x1f); 25 | cli(); 26 | retval = (mask & *addr) != 0; 27 | *addr |= mask; 28 | sti(); 29 | return retval; 30 | } 31 | 32 | extern __inline__ int clear_bit(int nr, int * addr) 33 | { 34 | int mask, retval; 35 | 36 | addr += nr >> 5; 37 | mask = 1 << (nr & 0x1f); 38 | cli(); 39 | retval = (mask & *addr) != 0; 40 | *addr &= ~mask; 41 | sti(); 42 | return retval; 43 | } 44 | 45 | extern __inline__ int test_bit(int nr, int * addr) 46 | { 47 | int mask; 48 | 49 | addr += nr >> 5; 50 | mask = 1 << (nr & 0x1f); 51 | return ((mask & *addr) != 0); 52 | } 53 | #endif /* _ASM_GENERIC_BITOPS_H */ 54 | -------------------------------------------------------------------------------- /fs/xiafs/xiafs_mac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/fs/xiafs/xiafs_mac.h 3 | * 4 | * Copyright (C) Q. Frank Xia, 1993. 5 | */ 6 | 7 | extern char internal_error_message[]; 8 | #define INTERN_ERR internal_error_message, __FILE__, __LINE__ 9 | #define WHERE_ERR __FILE__, __LINE__ 10 | 11 | #define XIAFS_ZSHIFT(sp) ((sp)->u.xiafs_sb.s_zone_shift) 12 | #define XIAFS_ZSIZE(sp) (BLOCK_SIZE << XIAFS_ZSHIFT(sp)) 13 | #define XIAFS_ZSIZE_BITS(sp) (BLOCK_SIZE_BITS + XIAFS_ZSHIFT(sp)) 14 | #define XIAFS_ADDRS_PER_Z(sp) (BLOCK_SIZE >> (2 - XIAFS_ZSHIFT(sp))) 15 | #define XIAFS_ADDRS_PER_Z_BITS(sp) (BLOCK_SIZE_BITS - 2 + XIAFS_ZSHIFT(sp)) 16 | #define XIAFS_BITS_PER_Z(sp) (BLOCK_SIZE << (3 + XIAFS_ZSHIFT(sp))) 17 | #define XIAFS_BITS_PER_Z_BITS(sp) (BLOCK_SIZE_BITS + 3 + XIAFS_ZSHIFT(sp)) 18 | #define XIAFS_INODES_PER_Z(sp) (_XIAFS_INODES_PER_BLOCK << XIAFS_ZSHIFT(sp)) 19 | 20 | /* Use the most significant bytes of zone pointers to store block counter. */ 21 | /* This is ugly, but it works. Note, We have another 7 bytes for "expansion". */ 22 | 23 | #define XIAFS_GET_BLOCKS(row_ip, blocks) \ 24 | blocks=((((row_ip)->i_zone[0] >> 24) & 0xff )|\ 25 | (((row_ip)->i_zone[1] >> 16) & 0xff00 )|\ 26 | (((row_ip)->i_zone[2] >> 8) & 0xff0000 ) ) 27 | 28 | /* XIAFS_PUT_BLOCKS should be called before saving zone pointers */ 29 | #define XIAFS_PUT_BLOCKS(row_ip, blocks) \ 30 | (row_ip)->i_zone[2]=((blocks)<< 8) & 0xff000000;\ 31 | (row_ip)->i_zone[1]=((blocks)<<16) & 0xff000000;\ 32 | (row_ip)->i_zone[0]=((blocks)<<24) & 0xff000000 33 | -------------------------------------------------------------------------------- /include/linux/etherdevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | * INET An implementation of the TCP/IP protocol suite for the LINUX 3 | * operating system. NET is implemented using the BSD Socket 4 | * interface as the means of communication with the user level. 5 | * 6 | * Definitions for the Ethernet handlers. 7 | * 8 | * Version: @(#)eth.h 1.0.4 05/13/93 9 | * 10 | * Authors: Ross Biro, 11 | * Fred N. van Kempen, 12 | * 13 | * Relocated to include/linux where it belongs by Alan Cox 14 | * 15 | * 16 | * This program is free software; you can redistribute it and/or 17 | * modify it under the terms of the GNU General Public License 18 | * as published by the Free Software Foundation; either version 19 | * 2 of the License, or (at your option) any later version. 20 | * 21 | * WARNING: This move may well be temporary. This file will get merged with others RSN. 22 | * 23 | */ 24 | #ifndef _LINUX_ETHERDEVICE_H 25 | #define _LINUX_ETHERDEVICE_H 26 | 27 | 28 | #include 29 | 30 | #ifdef __KERNEL__ 31 | extern int eth_header(unsigned char *buff, struct device *dev, 32 | unsigned short type, void *daddr, 33 | void *saddr, unsigned len, 34 | struct sk_buff *skb); 35 | extern int eth_rebuild_header(void *buff, struct device *dev, 36 | unsigned long raddr, struct sk_buff *skb); 37 | extern unsigned short eth_type_trans(struct sk_buff *skb, struct device *dev); 38 | 39 | #endif 40 | 41 | #endif /* _LINUX_ETHERDEVICE_H */ 42 | -------------------------------------------------------------------------------- /include/asm-sparc/types.h: -------------------------------------------------------------------------------- 1 | #ifndef _SPARC_TYPES_H 2 | #define _SPARC_TYPES_H 3 | 4 | /* 5 | * _xx is ok: it doesn't pollute the POSIX namespace. Use these in the 6 | * header files exported to user space <-- Linus sez this 7 | */ 8 | 9 | /* NOTE: I will have to change these when the V9 sparcs come into play, 10 | * however this won't be for a while. 11 | */ 12 | 13 | #ifndef _SIZE_T 14 | #define _SIZE_T 15 | #ifdef __svr4__ 16 | typedef unsigned int size_t; /* solaris sucks */ 17 | #else 18 | typedef long unsigned int size_t; /* sunos is much better */ 19 | #endif /* !(__svr4__) */ 20 | #endif 21 | 22 | #ifndef _SSIZE_T 23 | #define _SSIZE_T 24 | typedef int ssize_t; 25 | #endif 26 | 27 | #ifndef _PTRDIFF_T 28 | #define _PTRDIFF_T 29 | typedef int ptrdiff_t; 30 | #endif 31 | 32 | typedef signed char __s8; 33 | typedef unsigned char __u8; 34 | 35 | typedef signed short __s16; 36 | typedef unsigned short __u16; 37 | 38 | typedef signed int __s32; 39 | typedef unsigned int __u32; 40 | 41 | /* Only 32-bit sparcs for now so.... */ 42 | 43 | typedef signed long long __s64; 44 | typedef unsigned long long __u64; 45 | 46 | #ifdef __KERNEL__ 47 | 48 | typedef signed char s8; 49 | typedef unsigned char u8; 50 | 51 | typedef signed short s16; 52 | typedef unsigned short u16; 53 | 54 | typedef signed int s32; 55 | typedef unsigned int u32; 56 | 57 | /* Again, only have to worry about 32-bits */ 58 | 59 | typedef signed long long s64; 60 | typedef unsigned long long u64; 61 | 62 | #endif /* __KERNEL__ */ 63 | 64 | #endif /* defined(_SPARC_TYPES_H) */ 65 | -------------------------------------------------------------------------------- /include/linux/vt.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_VT_H 2 | #define _LINUX_VT_H 3 | 4 | /* 0x56 is 'V', to avoid collision with termios and kd */ 5 | 6 | #define VT_OPENQRY 0x5600 /* find available vt */ 7 | 8 | struct vt_mode { 9 | char mode; /* vt mode */ 10 | char waitv; /* if set, hang on writes if not active */ 11 | short relsig; /* signal to raise on release req */ 12 | short acqsig; /* signal to raise on acquisition */ 13 | short frsig; /* unused (set to 0) */ 14 | }; 15 | #define VT_GETMODE 0x5601 /* get mode of active vt */ 16 | #define VT_SETMODE 0x5602 /* set mode of active vt */ 17 | #define VT_AUTO 0x00 /* auto vt switching */ 18 | #define VT_PROCESS 0x01 /* process controls switching */ 19 | #define VT_ACKACQ 0x02 /* acknowledge switch */ 20 | 21 | struct vt_stat { 22 | ushort v_active; /* active vt */ 23 | ushort v_signal; /* signal to send */ 24 | ushort v_state; /* vt bitmask */ 25 | }; 26 | #define VT_GETSTATE 0x5603 /* get global vt state info */ 27 | #define VT_SENDSIG 0x5604 /* signal to send to bitmask of vts */ 28 | 29 | #define VT_RELDISP 0x5605 /* release display */ 30 | 31 | #define VT_ACTIVATE 0x5606 /* make vt active */ 32 | #define VT_WAITACTIVE 0x5607 /* wait for vt active */ 33 | #define VT_DISALLOCATE 0x5608 /* free memory associated to vt */ 34 | 35 | struct vt_sizes { 36 | ushort v_rows; /* number of rows */ 37 | ushort v_cols; /* number of columns */ 38 | ushort v_scrollsize; /* number of lines of scrollback */ 39 | }; 40 | #define VT_RESIZE 0x5609 /* set kernel's idea of screensize */ 41 | 42 | #endif /* _LINUX_VT_H */ 43 | -------------------------------------------------------------------------------- /include/asm-mips/regdef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/asm-mips/regdefs.h 3 | * 4 | * This file is subject to the terms and conditions of the GNU General Public 5 | * License. See the file "COPYING" in the main directory of this archive 6 | * for more details. 7 | * 8 | * Copyright (C) 1994 by Ralf Baechle 9 | */ 10 | 11 | #ifndef __ASM_MIPS_REGSDEFS_H 12 | #define __ASM_MIPS_REGSDEFS_H 13 | 14 | /* 15 | * Symbolic register names 16 | */ 17 | #define zero $0 /* wired zero */ 18 | #define AT $1 /* assembler temp (uprcase, because ".set at") */ 19 | #define v0 $2 /* return value */ 20 | #define v1 $3 21 | #define a0 $4 /* argument registers */ 22 | #define a1 $5 23 | #define a2 $6 24 | #define a3 $7 25 | #define t0 $8 /* caller saved */ 26 | #define t1 $9 27 | #define t2 $10 28 | #define t3 $11 29 | #define t4 $12 30 | #define t5 $13 31 | #define t6 $14 32 | #define t7 $15 33 | #define s0 $16 /* callee saved */ 34 | #define s1 $17 35 | #define s2 $18 36 | #define s3 $19 37 | #define s4 $20 38 | #define s5 $21 39 | #define s6 $22 40 | #define s7 $23 41 | #define t8 $24 /* caller saved */ 42 | #define t9 $25 43 | #define k0 $26 /* kernel scratch */ 44 | #define k1 $27 45 | #define gp $28 /* global pointer */ 46 | #define sp $29 /* stack pointer */ 47 | #define fp $30 /* frame pointer */ 48 | #define ra $31 /* return address */ 49 | 50 | #endif /* __ASM_MIPS_REGSDEFS_H */ 51 | -------------------------------------------------------------------------------- /arch/i386/boot/compressed/head.S: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/boot/head.S 3 | * 4 | * Copyright (C) 1991, 1992, 1993 Linus Torvalds 5 | */ 6 | 7 | /* 8 | * head.S contains the 32-bit startup code. 9 | * 10 | * NOTE!!! Startup happens at absolute address 0x00001000, which is also where 11 | * the page directory will exist. The startup code will be overwritten by 12 | * the page directory. 13 | * 14 | * Page 0 is deliberately kept safe, since System Management Mode code in 15 | * laptops may need to access the BIOS data stored there. This is also 16 | * useful for future device drivers that either access the BIOS via VM86 17 | * mode. 18 | */ 19 | .text 20 | 21 | #define __ASSEMBLY__ 22 | #include 23 | 24 | startup_32: 25 | cld 26 | cli 27 | movl $(KERNEL_DS),%eax 28 | mov %ax,%ds 29 | mov %ax,%es 30 | mov %ax,%fs 31 | mov %ax,%gs 32 | lss _stack_start,%esp 33 | xorl %eax,%eax 34 | 1: incl %eax # check that A20 really IS enabled 35 | movl %eax,0x000000 # loop forever if it isn't 36 | cmpl %eax,0x100000 37 | je 1b 38 | /* 39 | * Initialize eflags. Some BIOS's leave bits like NT set. This would 40 | * confuse the debugger if this code is traced. 41 | * XXX - best to initialize before switching to protected mode. 42 | */ 43 | pushl $0 44 | popfl 45 | /* 46 | * Clear BSS 47 | */ 48 | xorl %eax,%eax 49 | movl $__edata,%edi 50 | movl $__end,%ecx 51 | subl %edi,%ecx 52 | cld 53 | rep 54 | stosb 55 | /* 56 | * Do the decompression, and jump to the new kernel.. 57 | */ 58 | call _decompress_kernel 59 | ljmp $(KERNEL_CS), $0x100000 60 | -------------------------------------------------------------------------------- /drivers/net/README.3c505: -------------------------------------------------------------------------------- 1 | The address and IRQ used by the 3c505 driver can be configured at boot 2 | time by typing 'ether=eth0,15,0x300' (replace IRQ and base address with 3 | ones that tell how your adapter is jumpered). 4 | 5 | If no base address is given at the boot time, the driver will look for 6 | a 3c505 adapter at addresses 0x300, 0x280 and 0x310 in this order, 7 | possibly messing up any other hardware residing in these addresses. 8 | If a base address is given, it will be verified. 9 | 10 | There's two #defines one may need to change in the 3c505 driver: 11 | ELP_KERNEL_TYPE 12 | this exists just to adapt the driver with pretty wide range of kernels. 13 | See 3c505.c for exact information. 14 | 15 | ELP_NEED_HARD_RESET 16 | some DOS drivers seem to get the adapter to some irrecoverable state 17 | if the machine is "warm booted" from DOS to Linux. If you experience 18 | problems when warm booting, but "cold boot" works, #defining this 19 | to 1 may help. 20 | 21 | 22 | Known problems: 23 | when 'ifconfig up' is run for the first time after bootup, the driver 24 | complains: 25 | elp_interrupt(): irq 15 for unknown device. 26 | ^^ 27 | There should be the IRQ the ELPlus adapter is using. IF the IRQ doesn't 28 | match, something is seriously wrong. 29 | 30 | Authors: 31 | The driver is mainly written by Craig Southeren, email c/o 32 | . 33 | Parts of the driver (adapting the driver to 1.1.4+ kernels, 34 | IRQ/address detection, minor changes) and this (lousy) 'readme' 35 | by Juha Laiho . 36 | -------------------------------------------------------------------------------- /drivers/scsi/eata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * eata.h - used by the low-level driver for EATA/DMA SCSI host adapters. 3 | * 4 | */ 5 | #ifndef _EATA_H 6 | #define _EATA_H 7 | 8 | #include 9 | 10 | #define EATA_VERSION "2.00.00" 11 | 12 | int eata2x_detect(Scsi_Host_Template *); 13 | int eata2x_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)); 14 | int eata2x_abort(Scsi_Cmnd *); 15 | int eata2x_reset(Scsi_Cmnd *); 16 | 17 | #define EATA { \ 18 | NULL, /* Ptr for modules */ \ 19 | NULL, /* usage count for modules */ \ 20 | "EATA/DMA 2.0x rev. " EATA_VERSION " ", \ 21 | eata2x_detect, \ 22 | NULL, /* Release */ \ 23 | NULL, \ 24 | NULL, \ 25 | eata2x_queuecommand, \ 26 | eata2x_abort, \ 27 | eata2x_reset, \ 28 | NULL, \ 29 | scsicam_bios_param, \ 30 | 0, /* can_queue, reset by detect */ \ 31 | 7, /* this_id, reset by detect */ \ 32 | 0, /* sg_tablesize, reset by detect */ \ 33 | 0, /* cmd_per_lun, reset by detect */ \ 34 | 0, /* number of boards present */ \ 35 | 1, /* unchecked isa dma, reset by detect */ \ 36 | ENABLE_CLUSTERING \ 37 | } 38 | #endif 39 | -------------------------------------------------------------------------------- /net/inet/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for the Linux TCP/IP (INET) layer. 3 | # 4 | # Note! Dependencies are done automagically by 'make dep', which also 5 | # removes any old dependencies. DON'T put your own dependencies here 6 | # unless it's something special (ie not a .c file). 7 | # 8 | # Note 2! The CFLAGS definition is now in the main makefile... 9 | 10 | .c.o: 11 | $(CC) $(CFLAGS) -c $< 12 | .s.o: 13 | $(AS) -o $*.o $< 14 | .c.s: 15 | $(CC) $(CFLAGS) -S $< 16 | 17 | 18 | OBJS := sock.o eth.o dev.o dev_mcast.o skbuff.o datagram.o 19 | 20 | ifdef CONFIG_INET 21 | 22 | OBJS := $(OBJS) utils.o route.o proc.o timer.o protocol.o packet.o \ 23 | arp.o ip.o raw.o icmp.o tcp.o udp.o devinet.o af_inet.o \ 24 | igmp.o ip_fw.o 25 | 26 | ifdef CONFIG_INET_RARP 27 | 28 | OBJS := $(OBJS) rarp.o 29 | 30 | endif 31 | endif 32 | 33 | ifdef CONFIG_AX25 34 | 35 | OBJS := $(OBJS) ax25.o ax25_in.o ax25_out.o ax25_route.o ax25_subr.o ax25_timer.o 36 | 37 | endif 38 | 39 | ifdef CONFIG_IPX 40 | 41 | OBJS := $(OBJS) ipx.o pe2.o p8022.o p8023.o 42 | SNAPO := psnap.o 43 | 44 | endif 45 | 46 | ifdef CONFIG_ATALK 47 | 48 | OBJS := $(OBJS) aarp.o ddp.o 49 | SNAPO := psnap.o 50 | endif 51 | 52 | OBJS := $(OBJS) $(SNAPO) 53 | 54 | ifdef CONFIG_NET 55 | 56 | inet.o: $(OBJS) 57 | $(LD) -r -o inet.o $(OBJS) 58 | 59 | else 60 | 61 | inet.o: 62 | $(AR) rcs inet.o 63 | 64 | endif 65 | 66 | dep: 67 | $(CPP) -M *.c > .depend 68 | 69 | tar: 70 | tar -cvf /dev/f1 . 71 | 72 | # 73 | # include a dependency file if one exists 74 | # 75 | ifeq (.depend,$(wildcard .depend)) 76 | include .depend 77 | endif 78 | -------------------------------------------------------------------------------- /include/asm-alpha/irq.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALPHA_IRQ_H 2 | #define _ALPHA_IRQ_H 3 | 4 | /* 5 | * linux/include/alpha/irq.h 6 | * 7 | * (C) 1994 Linus Torvalds 8 | */ 9 | 10 | #include 11 | 12 | extern void disable_irq(unsigned int); 13 | extern void enable_irq(unsigned int); 14 | 15 | #define __STR(x) #x 16 | #define STR(x) __STR(x) 17 | 18 | #define SAVE_ALL "xx" 19 | 20 | /* 21 | * SAVE_MOST/RESTORE_MOST is used for the faster version of IRQ handlers, 22 | * installed by using the SA_INTERRUPT flag. These kinds of IRQ's don't 23 | * call the routines that do signal handling etc on return, and can have 24 | * more relaxed register-saving etc. They are also atomic, and are thus 25 | * suited for small, fast interrupts like the serial lines or the harddisk 26 | * drivers, which don't actually need signal handling etc. 27 | * 28 | * Also note that we actually save only those registers that are used in 29 | * C subroutines, so if you do something weird, you're on your own. 30 | */ 31 | #define SAVE_MOST "yy" 32 | 33 | #define RESTORE_MOST "zz" 34 | 35 | #define ACK_FIRST(mask) "aa" 36 | 37 | #define ACK_SECOND(mask) "dummy" 38 | 39 | #define UNBLK_FIRST(mask) "dummy" 40 | 41 | #define UNBLK_SECOND(mask) "dummy" 42 | 43 | #define IRQ_NAME2(nr) nr##_interrupt(void) 44 | #define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr) 45 | #define FAST_IRQ_NAME(nr) IRQ_NAME2(fast_IRQ##nr) 46 | #define BAD_IRQ_NAME(nr) IRQ_NAME2(bad_IRQ##nr) 47 | 48 | #define BUILD_IRQ(chip,nr,mask) \ 49 | asmlinkage void IRQ_NAME(nr); \ 50 | asmlinkage void FAST_IRQ_NAME(nr); \ 51 | asmlinkage void BAD_IRQ_NAME(nr); \ 52 | asm code comes here 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /drivers/scsi/wd7000.h: -------------------------------------------------------------------------------- 1 | #ifndef _WD7000_H 2 | 3 | /* $Id: $ 4 | * 5 | * Header file for the WD-7000 driver for Linux 6 | * 7 | * John Boyd Jan 1994: 8 | * This file has been reduced to only the definitions needed for the 9 | * WD7000 host structure. 10 | * 11 | */ 12 | 13 | #include 14 | 15 | int wd7000_detect(Scsi_Host_Template *); 16 | int wd7000_command(Scsi_Cmnd *); 17 | int wd7000_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)); 18 | int wd7000_abort(Scsi_Cmnd *); 19 | int wd7000_reset(Scsi_Cmnd *); 20 | int wd7000_biosparam(Disk *, int, int*); 21 | 22 | #ifndef NULL 23 | #define NULL 0L 24 | #endif 25 | 26 | /* 27 | * In this version, sg_tablesize now defaults to WD7000_SG, and will 28 | * be set to SG_NONE for older boards. This is the reverse of the 29 | * previous default, and was changed so that the driver-level 30 | * Scsi_Host_Template would reflect the driver's support for scatter/ 31 | * gather. 32 | * 33 | * Also, it has been reported that boards at Revision 6 support scatter/ 34 | * gather, so the new definition of an "older" board has been changed 35 | * accordingly. 36 | */ 37 | #define WD7000_Q 16 38 | #define WD7000_SG 16 39 | 40 | #define WD7000 { NULL, NULL, \ 41 | "Western Digital WD-7000", \ 42 | wd7000_detect, \ 43 | NULL, \ 44 | NULL, \ 45 | wd7000_command, \ 46 | wd7000_queuecommand, \ 47 | wd7000_abort, \ 48 | wd7000_reset, \ 49 | NULL, \ 50 | wd7000_biosparam, \ 51 | WD7000_Q, 7, WD7000_SG, 1, 0, 1, ENABLE_CLUSTERING} 52 | #endif 53 | -------------------------------------------------------------------------------- /drivers/sound/midi_synth.h: -------------------------------------------------------------------------------- 1 | int midi_synth_ioctl (int dev, 2 | unsigned int cmd, unsigned int arg); 3 | int midi_synth_kill_note (int dev, int channel, int note, int velocity); 4 | int midi_synth_set_instr (int dev, int channel, int instr_no); 5 | int midi_synth_start_note (int dev, int channel, int note, int volume); 6 | void midi_synth_reset (int dev); 7 | int midi_synth_open (int dev, int mode); 8 | void midi_synth_close (int dev); 9 | void midi_synth_hw_control (int dev, unsigned char *event); 10 | int midi_synth_load_patch (int dev, int format, snd_rw_buf * addr, 11 | int offs, int count, int pmgr_flag); 12 | void midi_synth_panning (int dev, int channel, int pressure); 13 | void midi_synth_aftertouch (int dev, int channel, int pressure); 14 | void midi_synth_controller (int dev, int channel, int ctrl_num, int value); 15 | int midi_synth_patchmgr (int dev, struct patmgr_info *rec); 16 | void midi_synth_bender (int dev, int chn, int value); 17 | 18 | 19 | #ifndef _MIDI_SYNTH_C_ 20 | static struct synth_info std_synth_info = 21 | {MIDI_SYNTH_NAME, 0, SYNTH_TYPE_MIDI, 0, 0, 128, 0, 128, MIDI_SYNTH_CAPS}; 22 | 23 | static struct synth_operations std_midi_synth = 24 | { 25 | &std_synth_info, 26 | 0, 27 | SYNTH_TYPE_MIDI, 28 | 0, 29 | midi_synth_open, 30 | midi_synth_close, 31 | midi_synth_ioctl, 32 | midi_synth_kill_note, 33 | midi_synth_start_note, 34 | midi_synth_set_instr, 35 | midi_synth_reset, 36 | midi_synth_hw_control, 37 | midi_synth_load_patch, 38 | midi_synth_aftertouch, 39 | midi_synth_controller, 40 | midi_synth_panning, 41 | NULL, 42 | midi_synth_patchmgr, 43 | midi_synth_bender 44 | }; 45 | #endif 46 | -------------------------------------------------------------------------------- /include/asm-sparc/memerr.h: -------------------------------------------------------------------------------- 1 | #ifndef _SPARC_MEMERR_H 2 | #define _SPARC_MEMERR_H 3 | 4 | /* memerr.h: Bit fields in the asynchronous and synchronous memory error 5 | registers used to determine what 'type' of error has just 6 | induced a trap. 7 | 8 | Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu) 9 | */ 10 | 11 | /* synchronous error register fields come first... */ 12 | 13 | #define SYNCER_WRITE 0x8000 /* write error... */ 14 | #define SYNCER_INVAL 0x0080 /* invalid page access was attempted */ 15 | #define SYNCER_PROT 0x0040 /* protection violation */ 16 | #define SYNCER_TIMEOUT 0x0020 /* mem-bus access timeout (mem does not exist). */ 17 | #define SYNCER_SBUSERR 0x0010 /* same as above, but for an SBUS access */ 18 | #define SYNCER_MEMERR 0x0008 /* Bus parity error, lose lose... panic time */ 19 | #define SYNCER_SZERR 0x0002 /* an attempted access was of BAD size, whoops */ 20 | #define SYNCER_WATCHDOG 0x0001 /* although we never see these, the prom will.. */ 21 | 22 | /* asynchronous error bits go here */ 23 | 24 | #define ASYNCER_WBINVAL 0x80 /* situation arose where the cache tried to write 25 | * back a page for which the valid bit was not set 26 | * within the mmu. This is due to bad mm kernel bugs. 27 | */ 28 | 29 | #define ASYNCER_TIMEOUT 0x20 /* mem-access bus timeout... */ 30 | #define ASYNCER_DVMAERR 0x10 /* dvma transfer to/from memory bombed... */ 31 | 32 | #endif /* _SPARC_MEMERR_H */ 33 | -------------------------------------------------------------------------------- /arch/i386/boot/compressed/lzw.h: -------------------------------------------------------------------------------- 1 | /* lzw.h -- define the lzw functions. 2 | * Copyright (C) 1992-1993 Jean-loup Gailly. 3 | * This is free software; you can redistribute it and/or modify it under the 4 | * terms of the GNU General Public License, see the file COPYING. 5 | */ 6 | 7 | #if !defined(OF) && defined(lint) 8 | # include "gzip.h" 9 | #endif 10 | 11 | #ifndef BITS 12 | # define BITS 16 13 | #endif 14 | #define INIT_BITS 9 /* Initial number of bits per code */ 15 | 16 | #define LZW_MAGIC "\037\235" /* Magic header for lzw files, 1F 9D */ 17 | 18 | #define BIT_MASK 0x1f /* Mask for 'number of compression bits' */ 19 | /* Mask 0x20 is reserved to mean a fourth header byte, and 0x40 is free. 20 | * It's a pity that old uncompress does not check bit 0x20. That makes 21 | * extension of the format actually undesirable because old compress 22 | * would just crash on the new format instead of giving a meaningful 23 | * error message. It does check the number of bits, but it's more 24 | * helpful to say "unsupported format, get a new version" than 25 | * "can only handle 16 bits". 26 | */ 27 | 28 | #define BLOCK_MODE 0x80 29 | /* Block compression: if table is full and compression rate is dropping, 30 | * clear the dictionary. 31 | */ 32 | 33 | #define LZW_RESERVED 0x60 /* reserved bits */ 34 | 35 | #define CLEAR 256 /* flush the dictionary */ 36 | #define FIRST (CLEAR+1) /* first free entry */ 37 | 38 | extern int maxbits; /* max bits per code for LZW */ 39 | extern int block_mode; /* block compress mode -C compatible with 2.0 */ 40 | 41 | extern void lzw OF((int in, int out)); 42 | extern void unlzw OF((int in, int out)); 43 | -------------------------------------------------------------------------------- /include/linux/genhd.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_GENHD_H 2 | #define _LINUX_GENHD_H 3 | 4 | /* 5 | * genhd.h Copyright (C) 1992 Drew Eckhardt 6 | * Generic hard disk header file by 7 | * Drew Eckhardt 8 | * 9 | * 10 | */ 11 | 12 | #define EXTENDED_PARTITION 5 13 | 14 | struct partition { 15 | unsigned char boot_ind; /* 0x80 - active */ 16 | unsigned char head; /* starting head */ 17 | unsigned char sector; /* starting sector */ 18 | unsigned char cyl; /* starting cylinder */ 19 | unsigned char sys_ind; /* What partition type */ 20 | unsigned char end_head; /* end head */ 21 | unsigned char end_sector; /* end sector */ 22 | unsigned char end_cyl; /* end cylinder */ 23 | unsigned int start_sect; /* starting sector counting from 0 */ 24 | unsigned int nr_sects; /* nr of sectors in partition */ 25 | }; 26 | 27 | struct hd_struct { 28 | long start_sect; 29 | long nr_sects; 30 | }; 31 | 32 | struct gendisk { 33 | int major; /* major number of driver */ 34 | char *major_name; /* name of major driver */ 35 | int minor_shift; /* number of times minor is shifted to 36 | get real minor */ 37 | int max_p; /* maximum partitions per device */ 38 | int max_nr; /* maximum number of real devices */ 39 | 40 | void (*init)(void); /* Initialization called before we do our thing */ 41 | struct hd_struct *part; /* partition table */ 42 | int *sizes; /* size of device in blocks */ 43 | int nr_real; /* number of real devices */ 44 | 45 | void *real_devices; /* internal use */ 46 | struct gendisk *next; 47 | }; 48 | 49 | extern int NR_GENDISKS; /* total */ 50 | extern struct gendisk *gendisk_head; /* linked list of disks */ 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /include/linux/tcp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * INET An implementation of the TCP/IP protocol suite for the LINUX 3 | * operating system. INET is implemented using the BSD Socket 4 | * interface as the means of communication with the user level. 5 | * 6 | * Definitions for the TCP protocol. 7 | * 8 | * Version: @(#)tcp.h 1.0.2 04/28/93 9 | * 10 | * Author: Fred N. van Kempen, 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU General Public License 14 | * as published by the Free Software Foundation; either version 15 | * 2 of the License, or (at your option) any later version. 16 | */ 17 | #ifndef _LINUX_TCP_H 18 | #define _LINUX_TCP_H 19 | 20 | 21 | #define HEADER_SIZE 64 /* maximum header size */ 22 | 23 | 24 | struct tcphdr { 25 | __u16 source; 26 | __u16 dest; 27 | __u32 seq; 28 | __u32 ack_seq; 29 | #if defined(LITTLE_ENDIAN_BITFIELD) 30 | __u16 res1:4, 31 | doff:4, 32 | fin:1, 33 | syn:1, 34 | rst:1, 35 | psh:1, 36 | ack:1, 37 | urg:1, 38 | res2:2; 39 | #elif defined(BIG_ENDIAN_BITFIELD) 40 | __u16 doff:4, 41 | res1:4, 42 | res2:2, 43 | urg:1, 44 | ack:1, 45 | psh:1, 46 | rst:1, 47 | syn:1, 48 | fin:1; 49 | #else 50 | #error "Adjust your defines" 51 | #endif 52 | __u16 window; 53 | __u16 check; 54 | __u16 urg_ptr; 55 | }; 56 | 57 | 58 | enum { 59 | TCP_ESTABLISHED = 1, 60 | TCP_SYN_SENT, 61 | TCP_SYN_RECV, 62 | TCP_FIN_WAIT1, 63 | TCP_FIN_WAIT2, 64 | TCP_TIME_WAIT, 65 | TCP_CLOSE, 66 | TCP_CLOSE_WAIT, 67 | TCP_LAST_ACK, 68 | TCP_LISTEN, 69 | TCP_CLOSING /* now a valid state */ 70 | }; 71 | 72 | #endif /* _LINUX_TCP_H */ 73 | -------------------------------------------------------------------------------- /arch/i386/math-emu/div_small.S: -------------------------------------------------------------------------------- 1 | .file "div_small.S" 2 | /*---------------------------------------------------------------------------+ 3 | | div_small.S | 4 | | | 5 | | Divide a 64 bit integer by a 32 bit integer & return remainder. | 6 | | | 7 | | Copyright (C) 1992 W. Metzenthen, 22 Parker St, Ormond, Vic 3163, | 8 | | Australia. E-mail billm@vaxc.cc.monash.edu.au | 9 | | | 10 | | | 11 | +---------------------------------------------------------------------------*/ 12 | 13 | /*---------------------------------------------------------------------------+ 14 | | unsigned long div_small(unsigned long long *x, unsigned long y) | 15 | +---------------------------------------------------------------------------*/ 16 | 17 | #include "fpu_asm.h" 18 | 19 | .text 20 | .align 2,144 21 | 22 | .globl _div_small 23 | 24 | _div_small: 25 | pushl %ebp 26 | movl %esp,%ebp 27 | 28 | pushl %esi 29 | 30 | movl PARAM1,%esi /* pointer to num */ 31 | movl PARAM2,%ecx /* The denominator */ 32 | 33 | movl 4(%esi),%eax /* Get the current num msw */ 34 | xorl %edx,%edx 35 | divl %ecx 36 | 37 | movl %eax,4(%esi) 38 | 39 | movl (%esi),%eax /* Get the num lsw */ 40 | divl %ecx 41 | 42 | movl %eax,(%esi) 43 | 44 | movl %edx,%eax /* Return the remainder in eax */ 45 | 46 | popl %esi 47 | 48 | leave 49 | ret 50 | 51 | -------------------------------------------------------------------------------- /arch/mips/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # arch/mips/Makefile 3 | # 4 | # This file is included by the global makefile so that you can add your own 5 | # architecture-specific flags and dependencies. Remember to do have actions 6 | # for "archclean" and "archdep" for cleaning up and making dependencies for 7 | # this architecture 8 | # 9 | # This file is subject to the terms and conditions of the GNU General Public 10 | # License. See the file "COPYING" in the main directory of this archive 11 | # for more details. 12 | # 13 | # Copyright (C) 1994, 1995 by Waldorf Electronics, 14 | # written by Ralf Baechle 15 | # 16 | 17 | AS = mips-linux-as 18 | ASFLAGS = -mips3 -mcpu=r4000 19 | LD = mips-linux-ld 20 | LINKFLAGS = -Ttext 0xa0000000 21 | #HOSTCC = gcc 22 | # 23 | # KERNELBASE is quite useless, but I need it to work 24 | # around a hardware bug in my Wreckstation board. Other people 25 | # would burn that @#!%# thing... 26 | # 27 | CC = mips-linux-gcc -V 2.5.8 -D__KERNEL__ -I$(TOPDIR)/include 28 | CPP = $(CC) -E $(CFLAGS) 29 | AR = mips-linux-ar 30 | RANLIB = mips-linux-ranlib 31 | STRIP = mips-linux-strip 32 | 33 | CFLAGS := $(CFLAGS) #-pipe 34 | 35 | CFLAGS := $(CFLAGS) -DKERNELBASE=0xa0000000 36 | 37 | ifdef CONFIG_R4X00 38 | CFLAGS := $(CFLAGS) -Wa,-mips3 -mcpu=r4000 -D__R4000__ 39 | endif 40 | 41 | HEAD := arch/mips/kernel/head.o 42 | 43 | SUBDIRS := $(SUBDIRS) arch/mips/kernel arch/mips/mm 44 | ARCHIVES := arch/mips/kernel/kernel.o arch/mips/mm/mm.o $(ARCHIVES) 45 | 46 | MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot 47 | 48 | zImage: vmlinux 49 | @$(MAKEBOOT) zImage 50 | 51 | compressed: zImage 52 | 53 | zdisk: vmlinux 54 | @$(MAKEBOOT) zdisk 55 | 56 | archclean: 57 | @$(MAKEBOOT) clean 58 | 59 | archdep: 60 | @$(MAKEBOOT) dep 61 | -------------------------------------------------------------------------------- /include/asm-alpha/types.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALPHA_TYPES_H 2 | #define _ALPHA_TYPES_H 3 | 4 | #ifndef _SIZE_T 5 | #define _SIZE_T 6 | typedef unsigned long size_t; 7 | #endif 8 | 9 | #ifndef _SSIZE_T 10 | #define _SSIZE_T 11 | typedef long ssize_t; 12 | #endif 13 | 14 | #ifndef _PTRDIFF_T 15 | #define _PTRDIFF_T 16 | typedef long ptrdiff_t; 17 | #endif 18 | 19 | /* 20 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 21 | * header files exported to user space 22 | */ 23 | 24 | typedef __signed__ char __s8; 25 | typedef unsigned char __u8; 26 | 27 | typedef __signed__ short __s16; 28 | typedef unsigned short __u16; 29 | 30 | typedef __signed__ int __s32; 31 | typedef unsigned int __u32; 32 | 33 | /* 34 | * There are 32-bit compilers for the alpha out there.. 35 | */ 36 | #if ((~0UL) == 0xffffffff) 37 | 38 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 39 | typedef __signed__ long long __s64; 40 | typedef unsigned long long __u64; 41 | #endif 42 | 43 | #else 44 | 45 | typedef __signed__ long __s64; 46 | typedef unsigned long __u64; 47 | 48 | #endif 49 | 50 | /* 51 | * These aren't exported outside the kernel to avoid name space clashes 52 | */ 53 | #ifdef __KERNEL__ 54 | 55 | typedef signed char s8; 56 | typedef unsigned char u8; 57 | 58 | typedef signed short s16; 59 | typedef unsigned short u16; 60 | 61 | typedef signed int s32; 62 | typedef unsigned int u32; 63 | 64 | /* 65 | * There are 32-bit compilers for the alpha out there.. 66 | */ 67 | #if ((~0UL) == 0xffffffff) 68 | 69 | typedef signed long long s64; 70 | typedef unsigned long long u64; 71 | 72 | #else 73 | 74 | typedef signed long s64; 75 | typedef unsigned long u64; 76 | 77 | #endif 78 | 79 | #endif /* __KERNEL__ */ 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /net/inet/README: -------------------------------------------------------------------------------- 1 | Upgrade Notes from 1.0 2 | [Alan Cox - Alan.Cox@linux.org] 3 | 4 | Upgrading to 1.2.0 from a 1.0 kernel networking set. If you are using 5 | a complete 1.2 distribution you can ignore this. 6 | 7 | This doesn't attempt to list the changes. That would be too large. Instead 8 | just what you need and can change 9 | 10 | arp,ifconfig, etc. Get net-tools-1.1.95 (or 1.2.0 if its out) from 11 | ftp.linux.org.uk:/pub/Linux/Networking/PROGRAMS/NetTools, and install 12 | these. You will also acquire a couple of new tools "plipconfig" for tuning 13 | plip links and "ipfw" for ip firewall management. 14 | 15 | bootpd: The original bootpd has a bug that the 1.2 kernel spots. You will 16 | need to upgrade this to the version in 17 | ftp.linux.org.uk:/pub/Linux/Networking/PROGRAMS/Upgrades 18 | 19 | 20 | Standard programs that you ought to update are 21 | 22 | named 4.7.x to 4.9.x Stops named dying occasionally 23 | pop3d 1.001 to 1.004 Fixes a bug that can lose mail 24 | 25 | A complete current networking set for Linux can be obtained by getting 26 | the NetKit[A,B...] series archives from ftp.funet.fi. Funet also carries 27 | binaries for Linux mbone applications if you now wish to make use of 28 | these facilities. 29 | 30 | For commercial UK custom Linux networking projects, drivers and development 31 | (but not free support!) I can be contacted via 32 | 33 | I^2IT Ltd, The Innovation Centre, University Of Wales 34 | Swansea SA2 8PP. 35 | Fax: +44 1792 295811 36 | Tel: +44 1792 295213 37 | 38 | Please don't send commercial queries to my email address as I have that 39 | in an academic and _not_ commercial capacity. On the other hand feel 40 | free to send bug reports, queries and enhancements that way. 41 | 42 | Alan 43 | -------------------------------------------------------------------------------- /drivers/sound/gus_hw.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * I/O addresses 4 | */ 5 | 6 | #define u_Base (gus_base + 0x000) 7 | #define u_Mixer u_Base 8 | #define u_Status (gus_base + 0x006) 9 | #define u_TimerControl (gus_base + 0x008) 10 | #define u_TimerData (gus_base + 0x009) 11 | #define u_IRQDMAControl (gus_base + 0x00b) 12 | #define u_MidiControl (gus_base + 0x100) 13 | #define MIDI_RESET 0x03 14 | #define MIDI_ENABLE_XMIT 0x20 15 | #define MIDI_ENABLE_RCV 0x80 16 | #define u_MidiStatus u_MidiControl 17 | #define MIDI_RCV_FULL 0x01 18 | #define MIDI_XMIT_EMPTY 0x02 19 | #define MIDI_FRAME_ERR 0x10 20 | #define MIDI_OVERRUN 0x20 21 | #define MIDI_IRQ_PEND 0x80 22 | #define u_MidiData (gus_base + 0x101) 23 | #define u_Voice (gus_base + 0x102) 24 | #define u_Command (gus_base + 0x103) 25 | #define u_DataLo (gus_base + 0x104) 26 | #define u_DataHi (gus_base + 0x105) 27 | #define u_MixData (gus_base + 0x106) /* Rev. 3.7+ mixing */ 28 | #define u_MixSelect (gus_base + 0x506) /* registers. */ 29 | #define u_IrqStatus u_Status 30 | # define MIDI_TX_IRQ 0x01 /* pending MIDI xmit IRQ */ 31 | # define MIDI_RX_IRQ 0x02 /* pending MIDI recv IRQ */ 32 | # define GF1_TIMER1_IRQ 0x04 /* general purpose timer */ 33 | # define GF1_TIMER2_IRQ 0x08 /* general purpose timer */ 34 | # define WAVETABLE_IRQ 0x20 /* pending wavetable IRQ */ 35 | # define ENVELOPE_IRQ 0x40 /* pending volume envelope IRQ */ 36 | # define DMA_TC_IRQ 0x80 /* pending dma tc IRQ */ 37 | 38 | #define ICS2101 1 39 | # define ICS_MIXDEVS 6 40 | # define DEV_MIC 0 41 | # define DEV_LINE 1 42 | # define DEV_CD 2 43 | # define DEV_GF1 3 44 | # define DEV_UNUSED 4 45 | # define DEV_VOL 5 46 | 47 | # define CHN_LEFT 0 48 | # define CHN_RIGHT 1 49 | #define CS4231 2 50 | #define u_DRAMIO (gus_base + 0x107) 51 | --------------------------------------------------------------------------------