Commit 30714577 authored by Linus Torvalds's avatar Linus Torvalds

Import 1.1.77

parent 2c0a2456
VERSION = 1
PATCHLEVEL = 1
SUBLEVEL = 76
SUBLEVEL = 77
ARCH = i386
......@@ -83,16 +83,13 @@ endif
# Include the make variables (CC, etc...)
#
include arch/$(ARCH)/Makefile
ARCHIVES =kernel/kernel.o mm/mm.o fs/fs.o net/net.o ipc/ipc.o
FILESYSTEMS =fs/filesystems.a
DRIVERS =drivers/block/block.a \
drivers/char/char.a \
drivers/net/net.a \
ibcs/ibcs.o
drivers/net/net.a
LIBS =lib/lib.a
SUBDIRS =kernel drivers mm fs net ipc ibcs lib
SUBDIRS =kernel drivers mm fs net ipc lib
ifdef CONFIG_SCSI
DRIVERS := $(DRIVERS) drivers/scsi/scsi.a
......@@ -102,9 +99,7 @@ ifdef CONFIG_SOUND
DRIVERS := $(DRIVERS) drivers/sound/sound.a
endif
ifdef CONFIG_MATH_EMULATION
DRIVERS := $(DRIVERS) drivers/FPU-emu/math.a
endif
include arch/$(ARCH)/Makefile
.c.s:
$(CC) $(CFLAGS) -S -o $*.s $<
......@@ -112,6 +107,10 @@ endif
$(AS) -o $*.o $<
.c.o:
$(CC) $(CFLAGS) -c -o $*.o $<
.S.s:
$(CC) -D__ASSEMBLY__ -traditional -E -o $*.o $<
.S.o:
$(CC) -D__ASSEMBLY__ -traditional -c -o $*.o $<
Version: dummy
rm -f include/linux/version.h
......@@ -119,8 +118,8 @@ Version: dummy
boot: vmlinux
@$(MAKE) -C arch/$(ARCH)/boot
vmlinux: $(CONFIGURATION) kernel/head.o init/main.o init/version.o linuxsubdirs
$(LD) $(LINKFLAGS) kernel/head.o init/main.o init/version.o \
vmlinux: $(CONFIGURATION) init/main.o init/version.o linuxsubdirs
$(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o \
$(ARCHIVES) \
$(FILESYSTEMS) \
$(DRIVERS) \
......@@ -130,9 +129,6 @@ vmlinux: $(CONFIGURATION) kernel/head.o init/main.o init/version.o linuxsubdirs
symlinks:
rm -f include/asm
( cd include ; ln -sf asm-$(ARCH) asm)
ln -sf ../arch/$(ARCH)/traps.c kernel/traps.c
ln -sf ../arch/$(ARCH)/entry.S kernel/entry.S
ln -sf ../arch/$(ARCH)/head.S kernel/head.S
oldconfig: symlinks
$(CONFIG_SHELL) Configure -d arch/$(ARCH)/config.in
......@@ -169,11 +165,6 @@ include/linux/version.h: $(CONFIGURATION) Makefile newversion
fi >> include/linux/version.h
@echo \#define LINUX_COMPILER \"`$(HOSTCC) -v 2>&1 | tail -1`\" >> include/linux/version.h
kernel/head.o: kernel/head.s
kernel/head.s: kernel/head.S include/linux/tasks.h
$(CPP) -traditional -o $*.s $<
init/version.o: init/version.c include/linux/version.h
$(CC) $(CFLAGS) -DUTS_MACHINE='"$(ARCH)"' -c -o init/version.o init/version.c
......@@ -201,6 +192,10 @@ drivers: dummy
net: dummy
$(MAKE) linuxsubdirs SUBDIRS=net
modules: dummy
@set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i modules; done
clean: archclean
rm -f kernel/ksyms.lst
rm -f core `find . -name '*.[oas]' -print`
......@@ -212,7 +207,7 @@ mrproper: clean
rm -f include/linux/autoconf.h include/linux/version.h
rm -f drivers/sound/local.h
rm -f .version .config* config.in config.old
rm -f include/asm kernel/entry.S kernel/head.S kernel/traps.c
rm -f include/asm
rm -f .depend `find . -name .depend -print`
distclean: mrproper
......
......@@ -11,6 +11,11 @@
LINKFLAGS = -non_shared -T 0xfffffc0000304000 -N
CFLAGS := $(CFLAGS) -mno-fp-regs
HEAD := arch/alpha/kernel/head.o
SUBDIRS := $(SUBDIRS) arch/alpha/kernel
ARCHIVES := arch/alpha/kernel/kernel.o $(ARCHIVES)
archclean:
archdep:
#
# Makefile for the linux kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now in the main makefile...
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o:
$(AS) -o $*.o $<
.c.o:
$(CC) $(CFLAGS) -c $<
.S.s:
$(CPP) -D__ASSEMBLY__ -traditional $< -o $*.s
.S.o:
$(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
OBJS = entry.o traps.o
all: kernel.o head.o
head.o: head.s
head.s: head.S $(TOPDIR)/include/asm-alpha/system.h
$(CPP) -traditional -o $*.s $<
kernel.o: $(OBJS)
$(LD) -r -o kernel.o $(OBJS)
sync
dep:
$(CPP) -M *.c > .depend
dummy:
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
......@@ -4,7 +4,6 @@
* kernel entry-points
*/
#define __ASSEMBLY__
#include <asm/system.h>
#define halt .long PAL_halt
......
......@@ -37,6 +37,21 @@ CFLAGS := $(CFLAGS) -m386
endif
endif
HEAD := arch/i386/kernel/head.o
SUBDIRS := $(SUBDIRS) arch/i386/kernel
ARCHIVES := arch/i386/kernel/kernel.o $(ARCHIVES)
ifdef CONFIG_IBCS
SUBDIRS := $(SUBDIRS) arch/i386/ibcs
DRIVERS := $(DRIVERS) arch/i386/ibcs/ibcs.o
endif
ifdef CONFIG_MATH_EMULATION
SUBDIRS := $(SUBDIRS) arch/i386/math-emu
DRIVERS := $(DRIVERS) arch/i386/math-emu/math.a
endif
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
zImage: vmlinux
......@@ -47,6 +62,12 @@ compressed: zImage
zlilo: vmlinux
@$(MAKEBOOT) zlilo
zdisk: vmlinux
@$(MAKEBOOT) zdisk
install: vmlinux
@$(MAKEBOOT) install
archclean:
@$(MAKEBOOT) clean
......
......@@ -28,6 +28,9 @@ zlilo: $(CONFIGURE) zImage
cp $(TOPDIR)/System.map $(INSTALL_PATH)/
if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
install: $(CONFIGURE) zImage
sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)"
tools/build: tools/build.c
$(HOSTCC) $(CFLAGS) -o $@ $< -I$(TOPDIR)/include
......
#
# linux/archi/i386/boot/compressed/Makefile
# linux/arch/i386/boot/compressed/Makefile
#
# create a compressed vmlinux image from the original vmlinux
#
......
......@@ -16,7 +16,6 @@
#include <unistd.h> /* contains read/write */
#include <fcntl.h>
#include <a.out.h>
#include <linux/config.h>
#define N_MAGIC_OFFSET 1024
......
#!/bin/sh
#
# arch/i386/boot/install.sh
#
# This file is subject to the terms and conditions of the GNU General Public
# License. See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 1995 by Linus Torvalds
#
# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
#
# "make install" script for i386 architecture
#
# Arguments:
# $1 - kernel version
# $2 - kernel image file
# $3 - kernel map file
# $4 - default install path (blank if root directory)
#
# User may have a custom install script
if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi
# Default install - same as make zlilo
if [ -f $4/vmlinuz ]; then
mv $4/vmlinuz $4/vmlinuz.old
fi
if [ -f $4/System.map ]; then
mv $4/System.map $4/System.old
fi
cat $2 > $4/vmlinuz
cp $3 $4/System.map
if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
......@@ -28,8 +28,8 @@
#include <sys/sysmacros.h>
#include <unistd.h> /* contains read/write */
#include <fcntl.h>
#include <linux/config.h>
#include <linux/a.out.h>
#include <linux/config.h>
#define MINIX_HEADER 32
......
......@@ -16,7 +16,7 @@ if [ "$CONFIG_ST506" = "y" ]; then
bool ' Use new IDE driver for primary/secondary i/f' CONFIG_BLK_DEV_IDE y
fi
if [ "$CONFIG_BLK_DEV_IDE" = "y" ]; then
bool ' Include support for IDE CDROM (ATAPI)' CONFIG_BLK_DEV_IDECD n
bool ' Include support for IDE/ATAPI CDROMs' CONFIG_BLK_DEV_IDECD n
fi
fi
......@@ -169,10 +169,10 @@ fi
fi
fi
comment 'CD-ROM drivers'
comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)'
bool 'Sony CDU31A/CDU33A CDROM driver support' CONFIG_CDU31A n
bool 'Mitsumi CDROM driver support' CONFIG_MCD n
bool 'Mitsumi (not IDE/ATAPI) CDROM driver support' CONFIG_MCD n
bool 'Matsushita/Panasonic CDROM driver support' CONFIG_SBPCD n
if [ "$CONFIG_SBPCD" = "y" ]; then
bool 'Matsushita/Panasonic second CDROM controller support' CONFIG_SBPCD2 n
......
#
# Makefile for the linux kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now in the main makefile...
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o:
$(AS) -o $*.o $<
.c.o:
$(CC) $(CFLAGS) -c $<
.S.s:
$(CPP) -D__ASSEMBLY__ -traditional $< -o $*.s
.S.o:
$(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
OBJS = process.o signal.o entry.o traps.o irq.o vm86.o bios32.o ptrace.o ioport.o ldt.o
all: kernel.o head.o
head.o: head.s
head.s: head.S $(TOPDIR)/include/linux/tasks.h
$(CPP) -traditional -o $*.s $<
kernel.o: $(OBJS)
$(LD) -r -o kernel.o $(OBJS)
sync
dep:
$(CPP) -M *.c > .depend
dummy:
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
......@@ -12,6 +12,10 @@
* Drew@Colorado.EDU
* +1 (303) 786-7975
*
* Pciprobe added by Frederic Potter 1994
* Potter@Cao-Vlsi.Ibp.FR
*
*
* For more information, please consult
*
* PCI BIOS Specification Revision
......@@ -407,6 +411,173 @@ char *pcibios_strerror (int error)
}
}
/* Recognize multi-function device */
int multi_function(unsigned char bus,unsigned char dev_fn)
{
unsigned char header;
pcibios_read_config_byte(
bus, dev_fn, (unsigned char) PCI_HEADER_TYPE, &header);
return (header&7==7);
}
/* Returns Interrupt register */
int interrupt_decod(unsigned char bus,unsigned char dev_fn)
{
unsigned char interrupt;
pcibios_read_config_byte(
bus, dev_fn, (unsigned char) PCI_INTERRUPT_LINE, &interrupt);
if (interrupt>16) return 0;
return interrupt;
}
/* probe for being bist capable */
int bist_probe(unsigned char bus,unsigned char dev_fn)
{
unsigned char bist;
pcibios_read_config_byte(
bus, dev_fn, (unsigned char) PCI_BIST, &bist);
return (bist & PCI_BIST_CAPABLE !=0);
}
/* Get the chip revision */
int revision_decode(unsigned char bus,unsigned char dev_fn)
{
unsigned char revision;
pcibios_read_config_byte(
bus, dev_fn, (unsigned char) PCI_CLASS_REVISION, &revision);
return revision;
}
/* Gives the Class code using the 16 higher bits */
/* of the PCI_CLASS_REVISION configuration register */
int class_decode(unsigned char bus,unsigned char dev_fn)
{
struct pci_class_type pci_class[PCI_CLASS_NUM+1] = PCI_CLASS_TYPE;
int i;
unsigned long class;
pcibios_read_config_dword(
bus, dev_fn, (unsigned char) PCI_CLASS_REVISION, &class);
class=class >> 16;
for (i=0;i<PCI_CLASS_NUM;i++)
if (class==pci_class[i].class_id) break;
return i;
}
int device_decode(unsigned char bus,unsigned char dev_fn,unsigned short vendor)
{
struct pci_device_type pci_device[PCI_DEVICE_NUM+1] = PCI_DEVICE_TYPE;
int i;
unsigned short device;
pcibios_read_config_word(
bus, dev_fn, (unsigned char) PCI_DEVICE_ID, &device);
for (i=0;i<PCI_DEVICE_NUM;i++)
if ((device==pci_device[i].device_id)
&& (vendor==pci_device[i].vendor_id)) break;
return i;
}
int vendor_decode(unsigned char bus,unsigned char dev_fn)
{
struct pci_vendor_type pci_vendor[PCI_VENDOR_NUM+1] = PCI_VENDOR_TYPE;
int i;
unsigned short vendor;
pcibios_read_config_word(
bus, dev_fn, (unsigned char) PCI_VENDOR_ID, &vendor);
for (i=0;i<PCI_VENDOR_NUM;i++)
if (vendor==pci_vendor[i].vendor_id) return i;
return i;
}
/* Call all the information procedures */
void info(unsigned char bus,unsigned char dev_fn)
{
struct pci_class_type pci_class[PCI_CLASS_NUM+1] = PCI_CLASS_TYPE;
struct pci_vendor_type pci_vendor[PCI_VENDOR_NUM+1] = PCI_VENDOR_TYPE;
struct pci_device_type pci_device[PCI_DEVICE_NUM+1] = PCI_DEVICE_TYPE;
int pr;
pr=vendor_decode(bus,dev_fn);
printk(" %s : %s %s (rev %d). "
,pci_class[class_decode(bus,dev_fn)].class_name
,pci_vendor[pr].vendor_name
,pci_device[device_decode(bus,dev_fn,pci_vendor[pr].vendor_id)].device_name
,revision_decode(bus,dev_fn));
if (bist_probe(bus,dev_fn))
printk("BIST capable. ");
if ((pr=interrupt_decod(bus,dev_fn))!=0)
printk("8259's interrupt %d.",pr);
printk("\n");
}
/* In futur version in case we detect a PCI to PCi bridge, we will go
for a recursive device search*/
void probe_devices(unsigned char bus)
{
unsigned long res;
unsigned char dev_fn;
/* For a mysterious reason, my PC crash if I try to probe device 31 function 7 */
/* (i.e. dev_fn=0xff) It can be a bug in my BIOS, or I havn't understood all about */
/* PCI */
for (dev_fn=0x0;dev_fn<0xff;dev_fn++) {
pcibios_read_config_dword(
bus, dev_fn, (unsigned char) PCI_CLASS_REVISION, &res);
/* First we won't try to talk to non_present chip */
/* Second, we get rid of non multi-function device that seems to be lazy */
/* and not fully decode the function number */
if ((res!=0xffffffff) &&
(((dev_fn & 7) == 0) || multi_function(bus,dev_fn))) {
printk("Bus %d Device %d Function %d.\n",
(int) bus,
(int) ((dev_fn & 0xf8) >> 3),
(int) (dev_fn & 7));
info(bus,dev_fn);
}
}
}
void probe_pci(void)
{
if (pcibios_present()==0) printk("ProbePci PCI bios not detected.\n");
else {
printk( "Probing PCI hardware.\n");
probe_devices(0);
}
}
#endif
unsigned long bios32_init(unsigned long memory_start, unsigned long memory_end)
......@@ -460,6 +631,7 @@ unsigned long bios32_init(unsigned long memory_start, unsigned long memory_end)
#ifdef CONFIG_PCI
if (bios32_entry) {
memory_start = pcibios_init (memory_start, memory_end);
probe_pci();
}
#endif
return memory_start;
......
......@@ -40,7 +40,6 @@
* 40(%esp) - %oldss
*/
#define __ASSEMBLY__
#include <linux/sys.h>
#include <asm/segment.h>
......
......@@ -12,6 +12,13 @@
#include <linux/ioport.h>
static unsigned long ioport_registrar[IO_BITMAP_SIZE] = {0, /* ... */};
#define IOPORTNAMES_NUM 32
#define IOPORTNAMES_LEN 26
struct { int from;
int num;
int flags;
char name[IOPORTNAMES_LEN];
} ioportnames[IOPORTNAMES_NUM];
#define _IODEBUG
......@@ -44,8 +51,7 @@ static void dump_io_bitmap(void)
#endif
/* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */
asmlinkage void set_bitmap(unsigned long *bitmap,
short base, short extent, int new_value)
asmlinkage void set_bitmap(unsigned long *bitmap, short base, short extent, int new_value)
{
int mask;
unsigned long *bitmap_base = bitmap + (base >> 5);
......@@ -108,23 +114,21 @@ asmlinkage int check_bitmap(unsigned long *bitmap, short base, short extent)
return 0;
}
/*
* This generates the report for /proc/ioports
*/
int get_ioport_list(char *buf)
{ int len=0,num,from;
for(num=0;num<IO_BITMAP_SIZE*32;num++)
if(check_bitmap(ioport_registrar,num,1)) {
from=num;
while(check_bitmap(ioport_registrar,num+1,1)
&& num+1<IO_BITMAP_SIZE*32 )
num++;
if(from==num)
len+=sprintf(buf+len,"%04x\n",num);
else
len+=sprintf(buf+len,"%04x-%04x\n",from,num);
if(len>4000) {
len+=sprintf((buf+len),"4k-Limit reached!\n");
return len;
}
{ int i=0,len=0;
while(i<IOPORTNAMES_LEN && len<4000)
{ if(ioportnames[i].flags)
len+=sprintf(buf+len,"%04x-%04x : %s\n",
ioportnames[i].from,
ioportnames[i].from+ioportnames[i].num-1,
ioportnames[i].name);
i++;
}
if(len>=4000)
len+=sprintf(buf+len,"4k-Limit reached!\n");
return len;
}
......@@ -174,8 +178,10 @@ asmlinkage int sys_iopl(long ebx,long ecx,long edx,
return 0;
}
void snarf_region(unsigned int from, unsigned int num)
/*
* This is the 'old' snarfing worker function
*/
void do_snarf_region(unsigned int from, unsigned int num)
{
if (from > IO_BITMAP_SIZE*32)
return;
......@@ -185,7 +191,39 @@ void snarf_region(unsigned int from, unsigned int num)
return;
}
void release_region(unsigned int from, unsigned int num)
/*
* Call this from the device driver to register the ioport region.
*/
void register_iomem(unsigned int from, unsigned int num, char *name)
{
int i=0;
while(ioportnames[i].flags && i<IOPORTNAMES_NUM)
i++;
if(i==IOPORTNAMES_NUM)
printk("warning:ioportname-table is full");
else
{
strncpy(ioportnames[i].name,name,IOPORTNAMES_LEN);
ioportnames[i].name[IOPORTNAMES_LEN-1]=(char)0;
ioportnames[i].from=from;
ioportnames[i].num=num;
ioportnames[i].flags=1;
}
do_snarf_region(from,num);
}
/*
* This is for compatibilty with older drivers.
* It can be removed when all driver call the new function.
*/
void snarf_region(unsigned int from, unsigned int num)
{ register_iomem(from,num,"No name given.");
}
/*
* The worker for releasing
*/
void do_release_region(unsigned int from, unsigned int num)
{
if (from > IO_BITMAP_SIZE*32)
return;
......@@ -195,6 +233,22 @@ void release_region(unsigned int from, unsigned int num)
return;
}
/*
* Call this when the device driver is unloaded
*/
void release_region(unsigned int from, unsigned int num)
{ int i=0;
while(i<IOPORTNAMES_NUM)
{ if(ioportnames[i].from==from && ioportnames[i].num==num)
ioportnames[i].flags=0;
i++;
}
do_release_region(from,num);
}
/*
* Call this to check the ioport region before probing
*/
int check_region(unsigned int from, unsigned int num)
{
if (from > IO_BITMAP_SIZE*32)
......@@ -210,5 +264,5 @@ void reserve_setup(char *str, int *ints)
int i;
for (i = 1; i < ints[0]; i += 2)
snarf_region(ints[i], ints[i+1]);
register_iomem(ints[i], ints[i+1],"reserved");
}
......@@ -39,11 +39,6 @@
static unsigned char cache_21 = 0xff;
static unsigned char cache_A1 = 0xff;
unsigned long intr_count = 0;
unsigned long bh_active = 0;
unsigned long bh_mask = 0xFFFFFFFF;
struct bh_struct bh_base[32];
void disable_irq(unsigned int irq_nr)
{
unsigned long flags;
......@@ -84,34 +79,6 @@ void enable_irq(unsigned int irq_nr)
restore_flags(flags);
}
/*
* do_bottom_half() runs at normal kernel priority: all interrupts
* enabled. do_bottom_half() is atomic with respect to itself: a
* bottom_half handler need not be re-entrant.
*/
asmlinkage void do_bottom_half(void)
{
unsigned long active;
unsigned long mask, left;
struct bh_struct *bh;
bh = bh_base;
active = bh_active & bh_mask;
for (mask = 1, left = ~0 ; left & active ; bh++,mask += mask,left += left) {
if (mask & active) {
void (*fn)(void *);
bh_active &= ~mask;
fn = bh->routine;
if (!fn)
goto bad_bh;
fn(bh->data);
}
}
return;
bad_bh:
printk ("irq.c:bad bottom half entry %08lx\n", mask);
}
/*
* This builds up the IRQ handler stubs using some ugly macros in irq.h
*
......@@ -400,12 +367,4 @@ void init_IRQ(void)
printk("Unable to get IRQ2 for cascade\n");
if (request_irq(13,math_error_irq, 0, "math error"))
printk("Unable to get IRQ13 for math-error handler\n");
/* initialize the bottom half routines. */
for (i = 0; i < 32; i++) {
bh_base[i].routine = NULL;
bh_base[i].data = NULL;
}
bh_active = 0;
intr_count = 0;
}
......@@ -4,7 +4,6 @@
* Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
*/
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/string.h>
......
/*
* linux/arch/i386/kernel/process.c
*
* Copyright (C) 1995 Linus Torvalds
*/
/*
* This file handles the architecture-dependent parts of process handling..
*/
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/stddef.h>
#include <linux/unistd.h>
#include <linux/ptrace.h>
#include <linux/malloc.h>
#include <linux/ldt.h>
#include <linux/user.h>
#include <linux/a.out.h>
#include <asm/segment.h>
#include <asm/system.h>
asmlinkage void ret_from_sys_call(void) __asm__("ret_from_sys_call");
/*
* The idle loop on a i386..
*/
asmlinkage int sys_idle(void)
{
int i;
if (current->pid != 0)
return -EPERM;
/* Map out the low memory: it's no longer needed */
for (i = 0 ; i < 768 ; i++)
swapper_pg_dir[i] = 0;
/* endless idle loop with no priority at all */
current->counter = -100;
for (;;) {
if (hlt_works_ok && !need_resched)
__asm__("hlt");
schedule();
}
}
/*
* Do necessary setup to start up a newly executed thread.
*/
void start_thread(struct pt_regs * regs, unsigned long eip, unsigned long esp)
{
regs->eip = eip;
regs->esp = esp;
}
/*
* Free current thread data structures etc..
*/
void exit_thread(void)
{
/* forget local segments */
__asm__ __volatile__("mov %w0,%%fs ; mov %w0,%%gs ; lldt %w0"
: /* no outputs */
: "r" (0));
current->tss.ldt = 0;
if (current->ldt) {
void * ldt = current->ldt;
current->ldt = NULL;
vfree(ldt);
}
}
void flush_thread(void)
{
int i;
if (current->ldt) {
free_page((unsigned long) current->ldt);
current->ldt = NULL;
for (i=1 ; i<NR_TASKS ; i++) {
if (task[i] == current) {
set_ldt_desc(gdt+(i<<1)+
FIRST_LDT_ENTRY,&default_ldt, 1);
load_ldt(i);
}
}
}
for (i=0 ; i<8 ; i++)
current->debugreg[i] = 0;
}
#define IS_CLONE (regs->orig_eax == __NR_clone)
unsigned long copy_thread(int nr, unsigned long clone_flags, struct task_struct * p, struct pt_regs * regs)
{
int i;
struct pt_regs * childregs;
p->tss.es = KERNEL_DS;
p->tss.cs = KERNEL_CS;
p->tss.ss = KERNEL_DS;
p->tss.ds = KERNEL_DS;
p->tss.fs = USER_DS;
p->tss.gs = KERNEL_DS;
p->tss.ss0 = KERNEL_DS;
p->tss.esp0 = p->kernel_stack_page + PAGE_SIZE;
p->tss.tr = _TSS(nr);
childregs = ((struct pt_regs *) (p->kernel_stack_page + PAGE_SIZE)) - 1;
p->tss.esp = (unsigned long) childregs;
p->tss.eip = (unsigned long) ret_from_sys_call;
*childregs = *regs;
childregs->eax = 0;
p->tss.back_link = 0;
p->tss.eflags = regs->eflags & 0xffffcfff; /* iopl is always 0 for a new process */
if (IS_CLONE) {
if (regs->ebx)
childregs->esp = regs->ebx;
clone_flags = regs->ecx;
if (childregs->esp == regs->esp)
clone_flags |= COPYVM;
}
p->tss.ldt = _LDT(nr);
if (p->ldt) {
p->ldt = (struct desc_struct*) vmalloc(LDT_ENTRIES*LDT_ENTRY_SIZE);
if (p->ldt != NULL)
memcpy(p->ldt, current->ldt, LDT_ENTRIES*LDT_ENTRY_SIZE);
}
set_tss_desc(gdt+(nr<<1)+FIRST_TSS_ENTRY,&(p->tss));
if (p->ldt)
set_ldt_desc(gdt+(nr<<1)+FIRST_LDT_ENTRY,p->ldt, 512);
else
set_ldt_desc(gdt+(nr<<1)+FIRST_LDT_ENTRY,&default_ldt, 1);
p->tss.bitmap = offsetof(struct thread_struct,io_bitmap);
for (i = 0; i < IO_BITMAP_SIZE+1 ; i++) /* IO bitmap is actually SIZE+1 */
p->tss.io_bitmap[i] = ~0;
if (last_task_used_math == current)
__asm__("clts ; fnsave %0 ; frstor %0":"=m" (p->tss.i387));
return clone_flags;
}
/*
* fill in the user structure for a core dump..
*/
void dump_thread(struct pt_regs * regs, struct user * dump)
{
int i;
/* changed the size calculations - should hopefully work better. lbt */
dump->magic = CMAGIC;
dump->start_code = 0;
dump->start_stack = regs->esp & ~(PAGE_SIZE - 1);
dump->u_tsize = ((unsigned long) current->mm->end_code) >> 12;
dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> 12;
dump->u_dsize -= dump->u_tsize;
dump->u_ssize = 0;
for (i = 0; i < 8; i++)
dump->u_debugreg[i] = current->debugreg[i];
if (dump->start_stack < TASK_SIZE)
dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> 12;
dump->regs = *regs;
/* Flag indicating the math stuff is valid. We don't support this for the
soft-float routines yet */
if (hard_math) {
if ((dump->u_fpvalid = current->used_math) != 0) {
if (last_task_used_math == current)
__asm__("clts ; fnsave %0": :"m" (dump->i387));
else
memcpy(&dump->i387,&current->tss.i387.hard,sizeof(dump->i387));
}
} else {
/* we should dump the emulator state here, but we need to
convert it into standard 387 format first.. */
dump->u_fpvalid = 0;
}
}
/*
* sys_execve() executes a new program.
*/
asmlinkage int sys_execve(struct pt_regs regs)
{
int error;
char * filename;
error = getname((char *) regs.ebx, &filename);
if (error)
return error;
error = do_execve(filename, (char **) regs.ecx, (char **) regs.edx, &regs);
putname(filename);
return error;
}
/*
* linux/arch/i386/kernel/signal.c
*
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/signal.h>
#include <linux/errno.h>
#include <linux/wait.h>
#include <linux/ptrace.h>
#include <linux/unistd.h>
#include <asm/segment.h>
#define _S(nr) (1<<((nr)-1))
#define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP)))
asmlinkage int sys_waitpid(pid_t pid,unsigned long * stat_addr, int options);
/*
* atomically swap in the new signal mask, and wait for a signal.
*/
asmlinkage int sys_sigsuspend(int restart, unsigned long oldmask, unsigned long set)
{
unsigned long mask;
struct pt_regs * regs = (struct pt_regs *) &restart;
mask = current->blocked;
current->blocked = set & _BLOCKABLE;
regs->eax = -EINTR;
while (1) {
current->state = TASK_INTERRUPTIBLE;
schedule();
if (do_signal(mask,regs))
return -EINTR;
}
}
/*
* This sets regs->esp even though we don't actually use sigstacks yet..
*/
asmlinkage int sys_sigreturn(unsigned long __unused)
{
#define COPY(x) regs->x = context.x
#define COPY_SEG(x) \
if ((context.x & 0xfffc) && (context.x & 3) != 3) goto badframe; COPY(x);
#define COPY_SEG_STRICT(x) \
if (!(context.x & 0xfffc) || (context.x & 3) != 3) goto badframe; COPY(x);
struct sigcontext_struct context;
struct pt_regs * regs;
regs = (struct pt_regs *) &__unused;
if (verify_area(VERIFY_READ, (void *) regs->esp, sizeof(context)))
goto badframe;
memcpy_fromfs(&context,(void *) regs->esp, sizeof(context));
current->blocked = context.oldmask & _BLOCKABLE;
COPY_SEG(ds);
COPY_SEG(es);
COPY_SEG(fs);
COPY_SEG(gs);
COPY_SEG_STRICT(ss);
COPY_SEG_STRICT(cs);
COPY(eip);
COPY(ecx); COPY(edx);
COPY(ebx);
COPY(esp); COPY(ebp);
COPY(edi); COPY(esi);
regs->eflags &= ~0x40DD5;
regs->eflags |= context.eflags & 0x40DD5;
regs->orig_eax = -1; /* disable syscall checks */
return context.eax;
badframe:
do_exit(SIGSEGV);
}
/*
* Set up a signal frame... Make the stack look the way iBCS2 expects
* it to look.
*/
void setup_frame(struct sigaction * sa, unsigned long ** fp, unsigned long eip,
struct pt_regs * regs, int signr, unsigned long oldmask)
{
unsigned long * frame;
#define __CODE ((unsigned long)(frame+24))
#define CODE(x) ((unsigned long *) ((x)+__CODE))
frame = *fp;
if (regs->ss != USER_DS)
frame = (unsigned long *) sa->sa_restorer;
frame -= 32;
if (verify_area(VERIFY_WRITE,frame,32*4))
do_exit(SIGSEGV);
/* set up the "normal" stack seen by the signal handler (iBCS2) */
put_fs_long(__CODE,frame);
if (current->exec_domain && current->exec_domain->signal_invmap)
put_fs_long(current->exec_domain->signal_invmap[signr], frame+1);
else
put_fs_long(signr, frame+1);
put_fs_long(regs->gs, frame+2);
put_fs_long(regs->fs, frame+3);
put_fs_long(regs->es, frame+4);
put_fs_long(regs->ds, frame+5);
put_fs_long(regs->edi, frame+6);
put_fs_long(regs->esi, frame+7);
put_fs_long(regs->ebp, frame+8);
put_fs_long((long)*fp, frame+9);
put_fs_long(regs->ebx, frame+10);
put_fs_long(regs->edx, frame+11);
put_fs_long(regs->ecx, frame+12);
put_fs_long(regs->eax, frame+13);
put_fs_long(current->tss.trap_no, frame+14);
put_fs_long(current->tss.error_code, frame+15);
put_fs_long(eip, frame+16);
put_fs_long(regs->cs, frame+17);
put_fs_long(regs->eflags, frame+18);
put_fs_long(regs->esp, frame+19);
put_fs_long(regs->ss, frame+20);
put_fs_long(0,frame+21); /* 387 state pointer - not implemented*/
/* non-iBCS2 extensions.. */
put_fs_long(oldmask, frame+22);
put_fs_long(current->tss.cr2, frame+23);
/* set up the return code... */
put_fs_long(0x0000b858, CODE(0)); /* popl %eax ; movl $,%eax */
put_fs_long(0x80cd0000, CODE(4)); /* int $0x80 */
put_fs_long(__NR_sigreturn, CODE(2));
*fp = frame;
#undef __CODE
#undef CODE
}
/*
* Note that 'init' is a special process: it doesn't get signals it doesn't
* want to handle. Thus you cannot kill init even with a SIGKILL even by
* mistake.
*
* Note that we go through the signals twice: once to check the signals that
* the kernel can handle, and then we build all the user-level signal handling
* stack-frames in one go after that.
*/
asmlinkage int do_signal(unsigned long oldmask, struct pt_regs * regs)
{
unsigned long mask = ~current->blocked;
unsigned long handler_signal = 0;
unsigned long *frame = NULL;
unsigned long eip = 0;
unsigned long signr;
struct sigaction * sa;
while ((signr = current->signal & mask)) {
__asm__("bsf %2,%1\n\t"
"btrl %1,%0"
:"=m" (current->signal),"=r" (signr)
:"1" (signr));
sa = current->sigaction + signr;
signr++;
if ((current->flags & PF_PTRACED) && signr != SIGKILL) {
current->exit_code = signr;
current->state = TASK_STOPPED;
notify_parent(current);
schedule();
if (!(signr = current->exit_code))
continue;
current->exit_code = 0;
if (signr == SIGSTOP)
continue;
if (_S(signr) & current->blocked) {
current->signal |= _S(signr);
continue;
}
sa = current->sigaction + signr - 1;
}
if (sa->sa_handler == SIG_IGN) {
if (signr != SIGCHLD)
continue;
/* check for SIGCHLD: it's special */
while (sys_waitpid(-1,NULL,WNOHANG) > 0)
/* nothing */;
continue;
}
if (sa->sa_handler == SIG_DFL) {
if (current->pid == 1)
continue;
switch (signr) {
case SIGCONT: case SIGCHLD: case SIGWINCH:
continue;
case SIGSTOP: case SIGTSTP: case SIGTTIN: case SIGTTOU:
if (current->flags & PF_PTRACED)
continue;
current->state = TASK_STOPPED;
current->exit_code = signr;
if (!(current->p_pptr->sigaction[SIGCHLD-1].sa_flags &
SA_NOCLDSTOP))
notify_parent(current);
schedule();
continue;
case SIGQUIT: case SIGILL: case SIGTRAP:
case SIGIOT: case SIGFPE: case SIGSEGV:
if (current->binfmt && current->binfmt->core_dump) {
if (current->binfmt->core_dump(signr, regs))
signr |= 0x80;
}
/* fall through */
default:
current->signal |= _S(signr & 0x7f);
do_exit(signr);
}
}
/*
* OK, we're invoking a handler
*/
if (regs->orig_eax >= 0) {
if (regs->eax == -ERESTARTNOHAND ||
(regs->eax == -ERESTARTSYS && !(sa->sa_flags & SA_RESTART)))
regs->eax = -EINTR;
}
handler_signal |= 1 << (signr-1);
mask &= ~sa->sa_mask;
}
if (regs->orig_eax >= 0 &&
(regs->eax == -ERESTARTNOHAND ||
regs->eax == -ERESTARTSYS ||
regs->eax == -ERESTARTNOINTR)) {
regs->eax = regs->orig_eax;
regs->eip -= 2;
}
if (!handler_signal) /* no handler will be called - return 0 */
return 0;
eip = regs->eip;
frame = (unsigned long *) regs->esp;
signr = 1;
sa = current->sigaction;
for (mask = 1 ; mask ; sa++,signr++,mask += mask) {
if (mask > handler_signal)
break;
if (!(mask & handler_signal))
continue;
setup_frame(sa,&frame,eip,regs,signr,oldmask);
eip = (unsigned long) sa->sa_handler;
if (sa->sa_flags & SA_ONESHOT)
sa->sa_handler = NULL;
/* force a supervisor-mode page-in of the signal handler to reduce races */
__asm__("testb $0,%%fs:%0": :"m" (*(char *) eip));
regs->cs = USER_CS; regs->ss = USER_DS;
regs->ds = USER_DS; regs->es = USER_DS;
regs->gs = USER_DS; regs->fs = USER_DS;
current->blocked |= sa->sa_mask;
oldmask |= sa->sa_mask;
}
regs->esp = (unsigned long) frame;
regs->eip = eip; /* "return" to the first handler */
current->tss.trap_no = current->tss.error_code = 0;
return 1;
}
#
# sparc/Makefile
#
# Makefile for the architecture dependant flags and dependancies on the
# Sparc.
#
# Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
#
#
# How to link, we send the linker the address at which the text section
# is to start. The prom loads us at 0x0-kernel_size. There is also an
# alias of this address space at 0xf8000000-(0xf8000000+kernel_size) but
# I ignore it and eliminate those mappings during vm initialization and
# just leave the low mapping.
#
LINKFLAGS = -N -Ttext 0x00004000
CFLAGS := $(CFLAGS) -pipe
HEAD := arch/sparc/kernel/head.o
SUBDIRS := $(SUBDIRS) arch/sparc/kernel
ARCHIVES := arch/sparc/kernel/kernel.o $(ARCHIVES)
archclean:
archdep:
This diff is collapsed.
#define KERNSIZE 134217728
#define KERNBASE -134217728
#define NBPG 4096
#define UPAGES 2
#define PROM_BASE -1568768
#
# arch/sparc/config.in
#
# Bare minimum configuration file for the Sparc.
#
# Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
#
# For a description of the syntax of this configuration file,
# see the Configure script.
#
comment 'Sparc Kernel setup'
bool 'Sparc V8 kernel' CONFIG_SPARC_V8 y
bool 'Sparc SMP support' CONFIG_LINUX_SMP n
bool 'Networking support' CONFIG_NET y
bool 'Limit memory to low 16MB' CONFIG_MAX_16M n
bool 'System V IPC' CONFIG_SYSVIPC y
if [ "$CONFIG_NET" = "y" ]; then
comment 'Networking options'
bool 'TCP/IP networking' CONFIG_INET y
if [ "$CONFIG_INET" "=" "y" ]; then
bool 'IP forwarding/gatewaying' CONFIG_IP_FORWARD n
bool 'IP multicasting (ALPHA)' CONFIG_IP_MULTICAST n
bool 'IP firewalling' CONFIG_IP_FIREWALL n
bool 'IP accounting' CONFIG_IP_ACCT n
comment '(it is safe to leave these untouched)'
bool 'PC/TCP compatibility mode' CONFIG_INET_PCTCP n
bool 'Reverse ARP' CONFIG_INET_RARP n
bool 'Assume subnets are local' CONFIG_INET_SNARL y
bool 'Disable NAGLE algorithm (normally enabled)' CONFIG_TCP_NAGLE_OFF n
fi
bool 'The IPX protocol' CONFIG_IPX n
#bool 'Amateur Radio AX.25 Level 2' CONFIG_AX25 n
fi
comment 'SCSI support'
bool 'SCSI support?' CONFIG_SCSI n
if [ "$CONFIG_SCSI" = "n" ]; then
comment 'Skipping SCSI configuration options...'
else
comment 'SCSI support type (disk, tape, CDrom)'
bool 'Scsi disk support' CONFIG_BLK_DEV_SD y
bool 'Scsi tape support' CONFIG_CHR_DEV_ST n
bool 'Scsi CDROM support' CONFIG_BLK_DEV_SR n
bool 'Scsi generic support' CONFIG_CHR_DEV_SG n
comment 'SCSI low-level drivers'
bool 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X n
bool 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 y
bool 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 n
bool 'Adaptec AHA274X/284X support' CONFIG_SCSI_AHA274X n
bool 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC n
bool 'UltraStor 14F/34F support' CONFIG_SCSI_U14_34F n
bool 'Future Domain 16xx SCSI support' CONFIG_SCSI_FUTURE_DOMAIN n
bool 'Generic NCR5380 SCSI support' CONFIG_SCSI_GENERIC_NCR5380 n
if [ "$CONFIG_PCI" = "y" ]; then
bool 'NCR53c7,8xx SCSI support' CONFIG_SCSI_NCR53C7xx n
fi
bool 'Always IN2000 SCSI support (test release)' CONFIG_SCSI_IN2000 n
bool 'PAS16 SCSI support' CONFIG_SCSI_PAS16 n
bool 'QLOGIC SCSI support' CONFIG_SCSI_QLOGIC n
bool 'Seagate ST-02 and Future Domain TMC-8xx SCSI support' CONFIG_SCSI_SEAGATE n
bool 'Trantor T128/T128F/T228 SCSI support' CONFIG_SCSI_T128 n
bool 'UltraStor SCSI support' CONFIG_SCSI_ULTRASTOR n
bool '7000FASST SCSI support' CONFIG_SCSI_7000FASST n
bool 'EATA ISA/EISA (DPT PM2011/021/012/022/122/322) support' CONFIG_SCSI_EATA n
#bool 'SCSI debugging host adapter' CONFIG_SCSI_DEBUG n
fi
if [ "$CONFIG_NET" = "y" ]; then
comment 'Network device support'
bool 'Network device support?' CONFIG_NETDEVICES y
if [ "$CONFIG_NETDEVICES" = "n" ]; then
comment 'Skipping network driver configuration options...'
else
bool 'Dummy net driver support' CONFIG_DUMMY n
bool 'SLIP (serial line) support' CONFIG_SLIP n
if [ "$CONFIG_SLIP" = "y" ]; then
bool ' CSLIP compressed headers' SL_COMPRESSED y
bool ' 16 channels instead of 4' SL_SLIP_LOTS n
# bool ' SLIP debugging on' SL_DUMP y
fi
bool 'PPP (point-to-point) support' CONFIG_PPP n
bool 'PLIP (parallel port) support' CONFIG_PLIP n
bool 'Load balancing support (experimental)' CONFIG_SLAVE_BALANCING n
bool 'Do you want to be offered ALPHA test drivers' CONFIG_NET_ALPHA n
bool 'Western Digital/SMC cards' CONFIG_NET_VENDOR_SMC n
if [ "$CONFIG_NET_VENDOR_SMC" = "y" ]; then
bool 'WD80*3 support' CONFIG_WD80x3 n
bool 'SMC Ultra support' CONFIG_ULTRA n
fi
bool 'AMD LANCE and PCnet (AT1500 and NE2100) support' CONFIG_LANCE n
bool '3COM cards' CONFIG_NET_VENDOR_3COM y
if [ "$CONFIG_NET_VENDOR_3COM" = "y" ]; then
bool '3c501 support' CONFIG_EL1 n
bool '3c503 support' CONFIG_EL2 n
if [ "$CONFIG_NET_ALPHA" = "y" ]; then
bool '3c505 support' CONFIG_ELPLUS n
bool '3c507 support' CONFIG_EL16 n
fi
bool '3c509/3c579 support' CONFIG_EL3 y
fi
bool 'Other ISA cards' CONFIG_NET_ISA n
if [ "$CONFIG_NET_ISA" = "y" ]; then
bool 'Cabletron E21xx support' CONFIG_E2100 n
bool 'DEPCA support' CONFIG_DEPCA n
bool 'EtherWorks 3 support' CONFIG_EWRK3 n
if [ "$CONFIG_NET_ALPHA" = "y" ]; then
# bool 'Arcnet support' CONFIG_ARCNET n
bool 'AT1700 support' CONFIG_AT1700 n
# bool 'EtherExpressPro support' CONFIG_EEXPRESS_PRO n
bool 'EtherExpress support' CONFIG_EEXPRESS n
bool 'NI5210 support' CONFIG_NI52 n
bool 'NI6510 support' CONFIG_NI65 n
fi
bool 'HP PCLAN+ (27247B and 27252A) support' CONFIG_HPLAN_PLUS n
bool 'HP PCLAN (27245 and other 27xxx series) support' CONFIG_HPLAN n
bool 'NE2000/NE1000 support' CONFIG_NE2000 y
bool 'SK_G16 support' CONFIG_SK_G16 n
fi
bool 'EISA, VLB, PCI and on board controllers' CONFIG_NET_EISA n
if [ "$CONFIG_NET_EISA" = "y" ]; then
if [ "$CONFIG_NET_ALPHA" = "y" ]; then
bool 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n
fi
bool 'Apricot Xen-II on board ethernet' CONFIG_APRICOT n
# bool 'DEC 21040 PCI support' CONFIG_DEC_ELCP n
# bool 'LPL T100V 100Mbs support' CONFIG_LPL_T100 n
# bool 'PCnet32 (32 bit VLB and PCI LANCE) support' CONFIG_PCNET32 n
bool 'Zenith Z-Note support' CONFIG_ZNET y
fi
bool 'Pocket and portable adaptors' CONFIG_NET_POCKET n
if [ "$CONFIG_NET_POCKET" = "y" ]; then
bool 'AT-LAN-TEC/RealTek pocket adaptor support' CONFIG_ATP n
bool 'D-Link DE600 pocket adaptor support' CONFIG_DE600 n
bool 'D-Link DE620 pocket adaptor support' CONFIG_DE620 n
# bool 'Silicom pocket adaptor support' CONFIG_SILICOM_PEA n
# bool 'WaveLAN PCMCIA support' CONFIG_WaveLAN n
# bool '3 Com 3c589 PCMCIA support' CONFIG_3C589 n
fi
fi
fi
comment 'CD-ROM drivers'
bool 'Sony CDU31A/CDU33A CDROM driver support' CONFIG_CDU31A n
bool 'Mitsumi CDROM driver support' CONFIG_MCD n
bool 'Matsushita/Panasonic CDROM driver support' CONFIG_SBPCD n
if [ "$CONFIG_SBPCD" = "y" ]; then
bool 'Matsushita/Panasonic second CDROM controller support' CONFIG_SBPCD2 n
if [ "$CONFIG_SBPCD2" = "y" ]; then
bool 'Matsushita/Panasonic third CDROM controller support' CONFIG_SBPCD3 n
if [ "$CONFIG_SBPCD3" = "y" ]; then
bool 'Matsushita/Panasonic fourth CDROM controller support' CONFIG_SBPCD4 n
fi
fi
fi
comment 'Filesystems'
bool 'Standard (minix) fs support' CONFIG_MINIX_FS y
bool 'Extended fs support' CONFIG_EXT_FS n
bool 'Second extended fs support' CONFIG_EXT2_FS y
bool 'xiafs filesystem support' CONFIG_XIA_FS n
bool 'msdos fs support' CONFIG_MSDOS_FS y
if [ "$CONFIG_MSDOS_FS" = "y" ]; then
bool 'umsdos: Unix like fs on top of std MSDOS FAT fs' CONFIG_UMSDOS_FS n
fi
bool '/proc filesystem support' CONFIG_PROC_FS y
if [ "$CONFIG_INET" = "y" ]; then
bool 'NFS filesystem support' CONFIG_NFS_FS y
fi
if [ "$CONFIG_BLK_DEV_SR" = "y" -o "$CONFIG_CDU31A" = "y" -o "$CONFIG_MCD" = "y" -o "$CONFIG_SBPCD" = "y" -o "$CONFIG_BLK_DEV_IDECD" = "y" ]; then
bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS y
else
bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS n
fi
bool 'OS/2 HPFS filesystem support (read only)' CONFIG_HPFS_FS n
bool 'System V and Coherent filesystem support' CONFIG_SYSV_FS n
comment 'character devices'
bool 'Cyclades async mux support' CONFIG_CYCLADES n
bool 'Parallel printer support' CONFIG_PRINTER n
bool 'Logitech busmouse support' CONFIG_BUSMOUSE n
bool 'PS/2 mouse (aka "auxiliary device") support' CONFIG_PSMOUSE n
if [ "$CONFIG_PSMOUSE" = "y" ]; then
bool 'C&T 82C710 mouse port support (as on TI Travelmate)' CONFIG_82C710_MOUSE y
fi
bool 'Microsoft busmouse support' CONFIG_MS_BUSMOUSE n
bool 'ATIXL busmouse support' CONFIG_ATIXL_BUSMOUSE n
bool 'Selection (cut and paste for virtual consoles)' CONFIG_SELECTION n
bool 'VESA Power Saving Protocol Support' CONFIG_VESA_PSPM n
if [ "$CONFIG_VESA_PSPM" = "y" ]; then
bool 'VESA PSPM Force Off' CONFIG_PSPM_FORCE_OFF n
fi
bool 'QIC-02 tape support' CONFIG_QIC02_TAPE n
if [ "$CONFIG_QIC02_TAPE" = "y" ]; then
bool 'Do you want runtime configuration for QIC-02' CONFIG_QIC02_DYNCONF y
if [ "$CONFIG_QIC02_DYNCONF" != "y" ]; then
comment '>>> Edit configuration parameters in ./include/linux/tpqic02.h!'
else
comment '>>> Setting runtime QIC-02 configuration is done with qic02conf'
comment '>>> Which is available from ftp://ftp.funet.fi/pub/OS/Linux/BETA/QIC-02/'
fi
fi
bool 'QIC-117 tape support' CONFIG_FTAPE n
if [ "$CONFIG_FTAPE" = "y" ]; then
int ' number of ftape buffers' NR_FTAPE_BUFFERS 3
fi
comment 'Sound'
bool 'Sound card support' CONFIG_SOUND n
comment 'Kernel hacking'
#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC n
bool 'Kernel profiling support' CONFIG_PROFILE n
if [ "$CONFIG_PROFILE" = "y" ]; then
int ' Profile shift count' CONFIG_PROFILE_SHIFT 2
fi
if [ "$CONFIG_SCSI" = "y" ]; then
bool 'Verbose scsi error reporting (kernel size +=12K)' CONFIG_SCSI_CONSTANTS y
fi
#
# Makefile for the linux kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now in the main makefile...
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o:
$(AS) -o $*.o $<
.c.o:
$(CC) $(CFLAGS) -c $<
.S.s:
$(CPP) -D__ASSEMBLY__ -traditional $< -o $*.s
.S.o:
$(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
OBJS = entry.o traps.o
all: kernel.o head.o
head.o: head.s
head.s: head.S $(TOPDIR)/include/asm-sparc/head.h
$(CPP) -traditional -o $*.s $<
kernel.o: $(OBJS)
$(LD) -r -o kernel.o $(OBJS)
sync
dep:
$(CPP) -M *.c > .depend
dummy:
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif
/* arch/sparc/kernel/entry.S: Sparc trap low-level entry points.
*
* Sparc traps are so ugly, this code is going to go through a lot
* of changes as I find out more interesting things. See head.S for
* the trap table and how it works, this will show you how we get
* to these routines.
*
* Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
*/
#include <asm/head.h>
.text
.align 4
/* Default trap handler */
.globl my_trap_handler
my_trap_handler:
rd %wim, %l4
or %g0, 0x1, %l5
sll %l5, %l0, %l5
cmp %l4, %l5 ! are we in the invalid register?
#if 0 /* work in progress */
be wash_trap_win
#endif
nop
or %%g0, %l3, %o0
call _do_hw_interrupt
or %%g0, %%g0, %o1
wr %l0, 0x20, %psr ! re-enable traps and reset the condition codes
nop
nop
nop ! click our heels three times, "no place like home"
jmp %l1
rett %l2
/* This is cheese and only works reliably if not coming from userland. */
.globl fill_window_entry
fill_window_entry:
wr %g0, 0, %wim ! let us into the invalid window
! without inducing another trap
restore
nop
nop ! no guarentees until 3 insns later
restore
restore %g0, 1, %l1
rd %psr, %l0
sll %l1, %l0, %l0
wr %l0, 0, %wim
save %g0, %g0, %g0
/* load up the window */
ldd [%sp], %l0
ldd [%sp + 8], %l2
ldd [%sp + 16], %l4
ldd [%sp + 24], %l6
ldd [%sp + 32], %i0
ldd [%sp + 40], %i2
ldd [%sp + 48], %i4
ldd [%sp + 56], %i6
save %g0, %g0, %g0
save %g0, %g0, %g0
jmp %l1
rett %l2
/* Cheese number two, give this a bad stack pointer and get scared. */
.globl spill_window_entry
spill_window_entry:
save %g0, %g0, %g0 ! save into next 'valid' window
std %l0, [%sp] ! acquire some scratch registers
rd %psr, %l0
or %g0, 0x1, %l1
sll %l1, %l0, %l0
wr %l0, 0, %wim ! make window we are saving the 'invalid' one
std %l2, [%sp + 8]
std %l4, [%sp + 16]
std %l6, [%sp + 24]
std %i0, [%sp + 32]
std %i2, [%sp + 40]
std %i4, [%sp + 48]
std %i6, [%sp + 56]
restore ! restore back into the window we want to use
jmp %l1
rett %l2 ! return from spill handler
/* This is where most generic traps enter, the registers should be:
%l0 == %psr
%l1 == %pc
%l2 == %npc
%l4 == trap_type
%l7 == trap_handler
*/
trap_entry:
srl %l0, 0x6, %l5 ! shift over to previous priv bit
andcc %l5, 0x1, %g0 ! 1 == from kernel 0 == from user
bz 2f
nop ! we dont handle users yet ;-(
or %g0, 0x1, %l5
sll %l5, %l0, %l5 ! a trick, only least 5 bits are
! significant in a register shift
! count.
rd %wim, %l6
andcc %l6, %l5, %g0 ! if (((1<<CWP)&(%wim))==1) we are
! in an 'invalid' window
bz,a 3f
sub %fp, C_STACK+80, %sp ! cool, just set stack and go
! this window is valid to use
/* we aparently need to clean the trap window, inline this for speed */
or %g0, %g7, %l7 ! set up g6 and g7 for scratch
or %g0, %g6, %l6
save %g0, %g0, %g0 ! enter next window after the invalid one
std %l0, [%sp] ! and store it on the stack for later
std %l2, [%sp + 8] ! retrieval
std %l4, [%sp + 16]
std %l6, [%sp + 24]
std %i0, [%sp + 32]
std %i2, [%sp + 40]
std %i4, [%sp + 48]
std %i6, [%sp + 56]
rd %psr, %g7 ! read the current window pointer
or %g0, 0x1, %g6 ! and mask it over into the %wim
sll %g6, %g7, %g6 ! value
wr %g6, 0, %wim ! make this window the now 'invalid' one
and %g6, 31, %g6
restore ! re-enter the trap window, it is ok now
or %g0, %l6, %g6 ! bring back in the old temporaries
or %g0, %l7, %g7 ! to the locals they were in
b 3f
sub %fp, C_STACK+80, %sp ! fix stack pointer
/* for now if we get a from-user trap you lose... */
.data
.align 4
tfu_youlose: .asciz "trap from userland, you lose...\n"
.align 4
.text
2:
sethi %hi(tfu_youlose), %o0
sethi %hi(prom_printf), %o1
ld [%o1 + %lo(prom_printf)], %o1
call %o1
or %o0, %lo(tfu_youlose), %o0
sethi %hi(prom_halt), %o1
ld [%o1 + %lo(prom_halt)], %o1
call %o1 ! its over
nop
/* nop and just return, here is where I would jump to the
* appropriate handler.
*/
jmp %1
rett %l2
nop
This diff is collapsed.
/*
* linux/arch/i386/kernel/process.c
*
* Copyright (C) 1995 Linus Torvalds
*/
/*
* This file handles the architecture-dependent parts of process handling..
*/
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/stddef.h>
#include <linux/unistd.h>
#include <linux/ptrace.h>
#include <linux/malloc.h>
#include <linux/ldt.h>
#include <linux/user.h>
#include <linux/a.out.h>
#include <asm/segment.h>
#include <asm/system.h>
void ret_from_sys_call(void) { __asm__("nop"); }
/*
* The idle loop on a i386..
*/
asmlinkage int sys_idle(void)
{
int i;
if (current->pid != 0)
return -EPERM;
/* Map out the low memory: it's no longer needed */
/* Sparc version RSN */
/* endless idle loop with no priority at all */
current->counter = -100;
for (;;) {
if (!need_resched)
__asm__("nop");
schedule();
}
}
/*
* Do necessary setup to start up a newly executed thread.
*/
void start_thread(struct pt_regs * regs, unsigned long sp, unsigned long fp)
{
regs->sp = sp;
regs->fp = fp;
regs->psr = psr;
}
/*
* Free current thread data structures etc..
*/
void exit_thread(void)
{
return; /* i'm getting to it */
}
void flush_thread(void)
{
return;
}
unsigned long copy_thread(int nr, unsigned long clone_flags, struct task_struct * p, struct pt_regs * regs)
{
struct pt_regs * childregs;
childregs = ((struct pt_regs *) (p->kernel_stack_page + PAGE_SIZE)) - 1;
p->tss.sp = (unsigned long) childregs;
*childregs = *regs;
p->tss.back_link = 0;
p->tss.psr = regs->psr; /* for condition codes */
return clone_flags;
}
/*
* fill in the user structure for a core dump..
*/
void dump_thread(struct pt_regs * regs, struct user * dump)
{
return; /* solaris does this enough */
}
/*
* sys_execve() executes a new program.
*/
asmlinkage int sys_execve(struct pt_regs regs)
{
int error;
char * filename;
error = do_execve(filename, (char **) regs.reg_window[0],
(char **) regs.reg_window[1], &regs);
putname(filename);
return error;
}
/*
* arch/sparc/kernel/traps.c
*
* Copyright 1994 David S. Miller (davem@caip.rutgers.edu)
*/
/*
* I hate traps on the sparc, grrr...
*/
void do_hw_interrupt(unsigned long type, unsigned long vector)
{
if (vector == 14) {
jiffies++;
return;
}
/* Just print garbage for everything else for now. */
printk("Unimplemented Sparc TRAP, vector = %lx type = %lx\n", vector, type);
return;
}
extern unsigned int *trapbase;
void trap_init(void)
{
/* load up the trap table */
__asm__("wr %0, 0x0, %%tbr\n\t"
"nop; nop; nop\n\t" : :
"r" (trapbase));
return;
}
/* string.h: Efficient string functions in sparc-assembly for
the linux kernel.
Copyright 1994 (c) David S. Miller (davem@caip.rutgers.edu)
*/
/* If we are smart we will use only the output and global registers
as that will allow us to avoid a window save which would be nice.
*/
/* Believe it or not the following strlen is not optimized enough!
In the future I may play games with doing word reads and reducing
the per-word comparisons to *one*, yes I have seen it done.
*/
.align 4
.globl _strlen
_strlen:
mov %o0, %g3 ! leaf-procedure optimization, here
ldsb [%g3], %g2 ! I only use the register sent to me
cmp %g2, 0 ! and the globals. Now, this routine
be 1f ! is callable from boot code.
nop
add %o0, 1, %o0
0: ldsb [%o0], %g2
cmp %g2, 0
bne,a 0b ! annulling branch, yuck
add %o0, 1, %o0
1: retl
sub %o0, %g3, %o0 ! since %g3 holds the original pointer
! and %o0 is at the end byte, we can
! subtract and the result is strlen.
/* String concatenate function. I am too lazy to honor the third count
argument at this time. Once again, this could be optimized so much
more to use word accesses instead of slooow byte loads.
*/
.align 4
.globl _strcat
_strcat:
mov %o0, %g4
ldsb [%g4], %g3
cmp %g3, 0
be,a 2f
ldub [%o1], %g3
add %o0, 1, %o0
0: ldsb [%o0], %g3
cmp %g3, 0
bne,a 0b
add %o0, 1, %o0
1: ldub [%o1], %g3
2: add %o1, 1, %o1
stb %g3, [%o0]
cmp %g3, 0
bne 1b
add %o0, 1, %o0
retl
mov %g4, %o0
/* Aieee, this code is starting to give me a headache. I shouldn't
have tried to do this in one sitting :-(
*/
.align 4
.globl _strcmp
_strcmp: b 2f
ldsb [%o1], %g4
0: sll %o2, 24, %g3
cmp %g3, 0
bne 1f
add %o0, 1, %o0
b 3f
or %g0, %g0, %o0
1: ldsb [%o1], %g4
2: ldsb [%o0], %g3
add %o1, 1, %o1
cmp %g3, %g4
be 0b
mov %g3, %o2
ldub [%o2], %g3
ldub [%o1-1], %o0 ! oh man, no joke
sub %g2, %o0, %o0
3: retl
nop
/* Ok, strcpy() should be easy enough. Maybe I catch some sleep after
this one....
*/
.align 4
.globl _strcpy
_strcpy: ldub [%o1], %g3
mov %o0, %g4
cmp %g3, 0
be 1f
stb %g3, [%g4]
0: add %o1, 1, %o1
ldub [%o1], %g3
add %o0, 1, %o0
cmp %g3, 0
bne 0b
stb %g3, [%o0]
1: retl
mov %g4, %o0
......@@ -16,11 +16,7 @@
.c.o:
$(CC) $(CFLAGS) -c $<
SUBDIRS = block char net
ifdef CONFIG_MATH_EMULATION
SUBDIRS := $(SUBDIRS) FPU-emu
endif
SUBDIRS = block char net #streams
ifdef CONFIG_SCSI
SUBDIRS := $(SUBDIRS) scsi
......@@ -35,6 +31,9 @@ all: driversubdirs
driversubdirs: dummy
set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i; done
modules: dummy
set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i modules; done
dep:
set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i dep; done
......
......@@ -79,6 +79,7 @@ block.a: $(OBJS)
dep:
$(CPP) -M $(SRCS) > .depend
modules:
dummy:
#
......
......@@ -9,7 +9,7 @@ Major features of ide.c & ide-cd.c:
- support for up to two IDE interfaces on one or two IRQs
- support for any mix of up to four disk and/or cdrom drives
- support for reading IDE ATAPI cdrom drives (NEC, MITSUMI, VERSA)
- support for reading IDE ATAPI cdrom drives (NEC, MITSUMI, VERSA, SONY)
- support for audio functions on FX400,NEC-260 cdrom drives (others?)
- auto-detection of interfaces, drives, IRQs, and disk geometries
- support for BIOSs which report "more than 16 heads" on disk drives
......@@ -47,15 +47,25 @@ or hdx=cdrom
where hdx can be any of {hda,hdb,hdc,hdd}, or simply hd, for the "next" drive
in sequence. Only the first three parameters are required (cyls,heads,sects),
and wpcom is ignored for IDE drives.
and wpcom is ignored for IDE drives. For example:
Example: hdc=1050,32,64 hdd=cdrom
hdc=1050,32,64 hdd=cdrom
If an irq number is given, it will apply to both drives on the same interface,
either {hda,hdb} or {hdc,hdd}. The results of successful auto-probing may
override the physical geometry/irq specified, though the "original" geometry
is retained as the "logical" geometry for partitioning purposes (fdisk).
If the auto-probing during boot time confuses a drive (ie. the drive works
with hd.c but not with ide.c), then an command line option may be specified
for each drive for which you'd like the drive to skip the hardware
probe/identification sequence. For example:
hdb=noprobe
or
hdc=768,16,32
hdc=noprobe
Courtesy of Scott Snyder, the driver now supports ATAPI cdrom drives
such as the NEC-260 and the new MITSUMI triple/quad speed drives.
Such drives will be identified at boot time, as hda,hdb,hdc or hdd,
......@@ -95,7 +105,7 @@ has more than 1024 cylinders. This presents two problems to most systems:
addresses, giving a limit of 1024cyls for programs which use it.
2. The physical geometry fields of the disk partition table only
allows 10-bits for cylinder addresses, giving a similar limit of 1024
allow 10-bits for cylinder addresses, giving a similar limit of 1024
cyls for operating systems that do not use the "sector count" fields
instead of the physical Cyl/Head/Sect (CHS) geometry fields.
......@@ -106,7 +116,7 @@ fields of the partition table instead of the physical CHS geometry fields.
a) Most folks use LILO to load linux. LILO uses the INT13 interface
to the BIOS to load the kernel at boot time. Therefore, LILO can only
load linux if the files it needs (usually just the kernel images) are
located below the magic 1024 cylinder "boundary".
located below the magic 1024 cylinder "boundary" (more on this later).
b) Many folks also like to have bootable DOS partitions on their
drive(s). DOS also uses the INT13 interface to the BIOS, not only
......@@ -127,17 +137,17 @@ between the cylinder and head number fields. This is activated by entering
a translated logical geometry into the BIOS/CMOS setup for the drive.
Thus, if the drive has a geometry of 2100/16/63 (CHS), then the BIOS could
present a "logical" geometry of 525/64/63 by "shifting" two bits from the
cylinder number into the head number field for purposes of the partition table, CMOS setup, and INT13 interfaces. Linux kernels 1.1.39 and higher detect and
cylinder number into the head number field for purposes of the partition table,
CMOS setup, and INT13 interfaces. Linux kernels 1.1.39 and higher detect and
"handle" this translation automatically, making this a rather painless solution
for the 1024 cyls problem. If for some reason Linux gets confused (unlikely),
then use the kernel command line parameters to pass the *logical* geometry,
as in: hda=525,64,63
If the BIOS does not support this form of drive translation, then several
options remain, listed below in order of increasing popularity:
options remain, listed below in inverse order of popularity:
- rewrite LILO to bypass the BIOS and talk directly to the drive
- boot from a floppy disk instead of the hard drive (takes 10 seconds)
- boot from a floppy disk instead of the hard drive (takes 10 seconds).
- use a partition below the 1024 cyl boundary to hold the linux
boot files (kernel images and /boot directory), and place the rest
of linux anywhere else on the drive. These files can reside in a DOS
......@@ -145,9 +155,9 @@ options remain, listed below in order of increasing popularity:
If you cannot use drive translation, *and* your BIOS also restricts you to
entering no more than 1024 cylinders in the geometry field in the CMOS setup,
then you'll have to set it to 1024. As of v3.5 of this driver, Linux will
automatically determine the *real* number of cylinders for fdisk to use,
allowing easy access to the full disk capacity.
then just set it to 1024. As of v3.5 of this driver, Linux automatically
determines the *real* number of cylinders for fdisk to use, allowing easy
access to the full disk capacity without having to fiddle around.
Regardless of what you do, all DOS partitions *must* be contained entirely
within the first 1024 logical cylinders. For a 1Gig WD disk drive, here's
......@@ -158,16 +168,29 @@ a good "half and half" partitioning scheme to start with:
/dev/hda2 from cyl 993 to 1023 swap
/dev/hda3 from cyl 1024 to 2100 linux
After installing slackware (or whatever), boot from floppy and mount the dos
partition under /dos, and then move the /boot directory to /dos/boot,
and move the /vmlinuz kernel file into /dos/boot. Then create a symlink
to put it back where the filesystem standard wants it: ln -s /dos/boot /boot
Finally, edit /etc/lilo.conf and change the reference to /vmlinuz to point
at /boot/vmlinuz and then re-run lilo. Have Fun. :)
To ensure that LILO can boot linux, the boot files (kernel and /boot/*)
must reside within the first 1024 cylinders of the drive. If your linux
root partition is *not* completely within the first 1024 cyls (quite common),
then you can use LILO to boot linux from files on your DOS partition
by doing the following after installing slackware (or whatever):
0. Boot from the "boot floppy" created during the installation
1. Mount your DOS partition as /dos (and stick it in /etc/fstab)
2. Move your kernel (/vmlinuz) to /dos/vmlinuz with: mv /vmlinuz /dos
3. Edit /etc/lilo.conf to change /vmlinuz to /dos/vmlinuz
4. Move /boot to /dos/boot with: cp -a /boot /dos ; rm -r /boot
5. Create a symlink for LILO to use with: ln -s /dos/boot /boot
6. Re-run LILO with: lilo
If you "don't do DOS", then partition as you please, but remember to create
a small partition to hold the /boot directory (and vmlinuz) as described above
such that it all lies within the first 1024 cylinders.
such that they stay within the first 1024 cylinders.
Note that when creating partitions that span beyond cylinder 1024,
Linux fdisk will complain about "Partition X has different physical/logical
endings" and emit messages such as "This is larger than 1024, and may cause
problems with some software". Ignore them for linux partitions. The "some
software" refers to DOS, the BIOS, and LILO, as described previously.
Western Digital now ships a "DiskManager 6.03" diskette with all of their big
hard drives. Burn it! That idiotic piece of garbage isn't even universally
......
This README belongs to release 2.9 or newer of the SoundBlaster Pro
This README belongs to release 3.0 or newer of the SoundBlaster Pro
(Matsushita, Kotobuki, Panasonic, CreativeLabs, Longshine and soon TEAC, too)
CD-ROM driver for Linux.
......@@ -17,11 +17,20 @@ an internal drive, and you can use it as an internal, too - f.e. plug it into
a soundcard).
The quad-speed TEAC CD-55A drive uses the same interface types, but has a
totally different command and flow control scheme. It is not supported yet,
but I plan to add it.
CreativeLabs has a new drive "CD-200". This drive is not supported yet, but
I plan to add it.
totally different command and flow control scheme. Support is under
construction.
CreativeLabs has a new drive "CD-200". Support is under construction.
Detection should already work.
Regarding CD200 and CD-55A support:
Please, don't mail me about it if you are not a competent BETA tester
(if you are: mail!; I do not have such drives).
Please, don't drop simple questions about the new drives in the
newsgroups. Full support needs more or less time.
If you are able to set the appropriate DBG-xxx switches, you can mail me
the "SBPCD:..." messages, regarding the new drives. But I mostly will
not answer (just use) it.
This driver is NOT for Mitsumi or Sony or Aztech or Philips or XXX drives.
For Aztech CDA-268 drives (and for some Wearnes, Okano and Orchid drives),
......
......@@ -3,6 +3,7 @@
#include <linux/blkdev.h>
#include <linux/locks.h>
#include <linux/config.h>
/*
* NR_REQUEST is the number of entries in the request-queue.
......
......@@ -2863,7 +2863,7 @@ cdu31a_init(unsigned long mem_start, unsigned long mem_end)
if (drive_found)
{
snarf_region(sony_cd_base_io, 4);
register_iomem(sony_cd_base_io, 4,"cdu31a");
if (register_blkdev(MAJOR_NR,"cdu31a",&scd_fops))
{
......
......@@ -2096,7 +2096,7 @@ static void copy_buffer(int ssize, int max_sector, int max_sector_2)
floppy_track_buffer + (max_buffer_sectors << 10) ||
dma_buffer < floppy_track_buffer ){
DPRINT1("buffer overrun in copy buffer %d\n",
(floppy_track_buffer - dma_buffer) >>9);
(int) ((floppy_track_buffer - dma_buffer) >>9));
printk("sector_t=%d buffer_min=%d\n",
sector_t, buffer_min);
printk("current_count_sectors=%ld\n",
......@@ -2107,7 +2107,7 @@ static void copy_buffer(int ssize, int max_sector, int max_sector_2)
printk("write\n");
break;
}
if ( ((int)buffer) % 512 )
if ( ((unsigned long)buffer) % 512 )
DPRINT1("%p buffer not aligned\n", buffer);
#endif
if ( CT(COMMAND) == FD_READ )
......@@ -2328,7 +2328,7 @@ static int make_raw_rw_request(void)
raw_cmd.length, current_count_sectors);
if ( current_addr != CURRENT->buffer )
printk("addr=%d, length=%ld\n",
(current_addr - floppy_track_buffer ) >> 9,
(int) ((current_addr - floppy_track_buffer ) >> 9),
current_count_sectors);
printk("st=%d ast=%d mse=%d msi=%d\n",
sector_t, aligned_sector_t, max_sector, max_size);
......
......@@ -10,7 +10,6 @@
* in the early extended-partition checks and added DM partitions
*/
#include <linux/config.h>
#include <linux/fs.h>
#include <linux/genhd.h>
#include <linux/kernel.h>
......
......@@ -31,7 +31,6 @@
#include <linux/kernel.h>
#include <linux/hdreg.h>
#include <linux/genhd.h>
#include <linux/config.h>
#include <linux/malloc.h>
#include <linux/string.h>
......
......@@ -870,7 +870,7 @@ cdrom_read_subchannel (ide_dev_t *dev,
}
/* modeflag: 0 = current, 1 = changable mask, 2 = default, 3 = saved */
/* modeflag: 0 = current, 1 = changeable mask, 2 = default, 3 = saved */
static int
cdrom_mode_sense (ide_dev_t *dev, int pageno, int modeflag,
char *buf, int buflen)
......
This diff is collapsed.
......@@ -1168,7 +1168,7 @@ mcd_init(unsigned long mem_start, unsigned long mem_end)
printk("Unable to get IRQ%d for Mitsumi CD-ROM\n", mcd_irq);
return mem_start;
}
snarf_region(mcd_port, 4);
register_iomem(mcd_port, 4,"mcd");
outb(MCMD_CONFIG_DRIVE, MCDPORT(0));
outb(0x02,MCDPORT(0));
......
......@@ -8,7 +8,6 @@
*/
#include <linux/config.h>
#include <linux/sched.h>
#include <linux/minix_fs.h>
#include <linux/ext2_fs.h>
......
This diff is collapsed.
Thu Jan 5 21:21:57 1995 <dhinds@allegro.stanford.edu>
* serial.c: (receive_char): Added counter to prevent infinite loop
when a PCMCIA serial device is ejected.
Thu Dec 29 17:53:48 1994 <tytso@rsx-11.mit.edu>
* tty_io.c (check_tty_count): New procedure which checks
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment