Commit 8f0ec1f9 authored by Linus Torvalds's avatar Linus Torvalds

Import 1.3.22

parent 13e53911
......@@ -522,8 +522,9 @@ S: Germany
N: Mark Lord
E: mlord@bnr.ca
E: mlord@achilles.net
D: IDE drive support in hd.c
D: Author of IDE driver (ide.c), hd.c support
D: Triton Bus Master IDE driver
D: Hard Disk Parameter (hdparm) utility
S: 33 Ridgefield Cr
S: Nepean, Ontario
S: Canada K2H 6S3
......
This diff is collapsed.
This diff is collapsed.
......@@ -31,7 +31,8 @@ You will generally select the minimal set that is needed to boot:
What has been left out is generally loadable as a modules.
The set of modules is rapidly increasing, but so far these are known:
Most filesystems: minix, xiafs, msdos, umsdos, sysv, isofs
Most filesystems: minix, xiafs, msdos, umsdos, sysv, isofs, hpfs,
smbfs, nfs
Some SCSI drivers: aha1542, in2000
......
VERSION = 1
PATCHLEVEL = 3
SUBLEVEL = 21
SUBLEVEL = 22
ARCH = i386
......
......@@ -42,6 +42,10 @@ DOCUMENTATION:
Project) books. This README is not meant to be documentation on the
system: there are much better sources available.
- There are various readme's in the kernel doc/ subdirectory: these are
mainly used for kernel developers and some very kernel-specific
installation notes for some drivers for example.
INSTALLING the kernel:
- If you install the full sources, do a
......
......@@ -10,7 +10,11 @@
NM := nm -B
# enable this for linking under OSF/1:
LINKFLAGS = -non_shared -T 0xfffffc0000310000 -N
# enable this for linking under Linux:
#LINKFLAGS = -static -T arch/alpha/vmlinux.lds -N
CFLAGS := $(CFLAGS) -mno-fp-regs
HEAD := arch/alpha/kernel/head.o
......
......@@ -8,22 +8,32 @@
# Copyright (C) 1994 by Linus Torvalds
#
# enable this for linking under OSF/1:
LINKFLAGS = -non_shared -T 0x20000000 -N
# enable this for linking under Linux:
#LINKFLAGS = -static -T bootloader.lds -N
.S.s:
$(CC) -D__ASSEMBLY__ -traditional -E -o $*.o $<
.S.o:
$(CC) -D__ASSEMBLY__ -traditional -c -o $*.o $<
OBJECTS = head.o main.o
TARGETS = tools/lxboot tools/bootlx vmlinux vmlinux.gz
all: tools/lxboot tools/bootlx vmlinux
@echo run mkfloppy on machine with floppy drive
all: $(TARGETS)
@echo Ready to install kernel in $(shell pwd)/vmlinux.gz
msb: tools/lxboot tools/bootlx vmlinux
( cat tools/lxboot tools/bootlx vmlinux ) > /dev/rz0a
disklabel -rw rz0 'linux' tools/lxboot tools/bootlx
vmlinux.gz: vmlinux
gzip -fv vmlinux
vmlinux: tools/build $(TOPDIR)/vmlinux
tools/build -v $(TOPDIR)/vmlinux > vmlinux
cp $(TOPDIR)/vmlinux vmlinux
quickstrip vmlinux
tools/lxboot: tools/build
tools/build > tools/lxboot
......@@ -35,13 +45,13 @@ tools/build: tools/build.c
$(HOSTCC) tools/build.c -o tools/build
bootloader: $(OBJECTS)
$(LD) -non_shared -T 0x20000000 -N \
$(LD) $(LINKFLAGS) \
$(OBJECTS) \
$(LIBS) \
-o bootloader || \
(rm -f bootloader && exit 1)
clean:
rm -f vmlinux bootloader tools/build tools/bootlx tools/lxboot
rm -f $(TARGETS) bootloader tools/build
dep:
......@@ -40,6 +40,7 @@ SECTIONS
.sbss : {
*(.sbss)
*(.scommon)
. = ALIGN(16);
}
.bss : {
*(.bss)
......
......@@ -2,7 +2,6 @@
# For a description of the syntax of this configuration file,
# see the Configure script.
#
comment 'General setup'
bool 'Normal floppy disk support' CONFIG_BLK_DEV_FD y
......@@ -22,9 +21,27 @@ fi
bool 'XT harddisk support' CONFIG_BLK_DEV_XD n
bool 'Networking support' CONFIG_NET y
bool 'PCI alpha motherboard' CONFIG_PCI n
choice 'Alpha system type' \
"Jensen CONFIG_ALPHA_JENSEN \
Noname CONFIG_ALPHA_NONAME \
Cabriolet CONFIG_ALPHA_CABRIOLET \
EB66 CONFIG_ALPHA_EB66 \
EB66+ CONFIG_ALPHA_EB66P \
EB64 CONFIG_ALPHA_EB64 \
EB64+ CONFIG_ALPHA_EB64P" Jensen
if [ "$CONFIG_ALPHA_NONAME" = "y" ]; then
define_bool CONFIG_PCI y
define_bool CONFIG_ALPHA_LCA y
fi
if [ "$CONFIG_ALPHA_CABRIOLET" = "y" -o "$CONFIG_ALPHA_EB66" = "y" \
-o "$CONFIG_ALPHA_EB64" = "y" -o "$CONFIG_ALPHA_EB64P" = "y" ]
then
define_bool CONFIG_PCI y
define_bool CONFIG_ALPHA_APECS y
fi
if [ "$CONFIG_PCI" = "y" ]; then
bool ' PCI bridge optimisation (experimental)' CONFIG_PCI_OPTIMIZE n
bool 'PCI bridge optimisation (experimental)' CONFIG_PCI_OPTIMIZE n
fi
bool 'System V IPC' CONFIG_SYSVIPC y
bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF n
......
......@@ -13,7 +13,7 @@
$(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
OBJS = entry.o traps.o process.o osf_sys.o irq.o signal.o setup.o \
lca.o bios32.o ptrace.o
bios32.o ptrace.o apecs.o lca.o
all: kernel.o head.o
......
This diff is collapsed.
This diff is collapsed.
......@@ -35,6 +35,11 @@
#define TASK_BLOCKED 32
#define TASK_FLAGS 40
/*
* task flags (must match include/linux/sched.h):
*/
#define PF_PTRACED 0x00000010
/*
* This defines the normal kernel pt-regs layout.
*
......@@ -373,9 +378,27 @@ entUnaUser:
ldq $0,0($30) /* restore original $0 */
lda $30,256($30) /* pop entUna's stack frame */
SAVE_ALL /* setup normal kernel stack */
lda $30,-56($30)
stq $9,0($30)
stq $10,8($30)
stq $11,16($30)
stq $12,24($30)
stq $13,32($30)
stq $14,40($30)
stq $15,48($30)
lda $27,do_entUnaUser
lda $26,ret_from_sys_call
jsr $31,($27),do_entUnaUser
bis $31,$30,$19
jsr $26,($27),do_entUnaUser
ldq $9,0($30)
ldq $10,8($30)
ldq $11,16($30)
ldq $12,24($30)
ldq $13,32($30)
ldq $14,40($30)
ldq $15,48($30)
lda $30,56($30)
br $31,ret_from_sys_call
.end entUnaUser
.align 3
......@@ -424,27 +447,14 @@ entSys:
beq $1,1f
ldq $27,0($2)
1: jsr $26,($27),do_entSys
ldq $1,0($30) /* We have to handle ptrace specially */
subq $1,26,$1 /* since it returns a pointer value it will*/
bne $1,3f /* set up a3 and v0 in the return frame */
ldq $1,72($30)
stq $1,0($30)
stq $0,72($30)
bis $31,$31,$1
br $31,ret_from_sys_call
3: bis $31,$31,$1
bge $0,2f /* the call succeeded */
bis $31,$31,$26 /* tell "ret_from_sys_call" that we can restart */
ldq $19,0($30) /* .. with this syscall nr */
ldq $20,72($30) /* .. and this a3 */
addq $31,1,$1 /* set a3 for errno return */
subq $31,$0,$0 /* with error in v0 */
2: stq $0,0($30)
stq $1,72($30) /* a3 for return */
blt $0,syscall_error /* the call failed */
stq $0,0($30)
ret_success:
stq $31,72($30) /* a3=0 => no error */
.align 3
ret_from_sys_call:
ldq $0,SP_OFF($30)
cmovne $26,0,$19
cmovne $26,0,$19 /* $19 = 0 => non-restartable */
and $0,8,$0
beq $0,restore_all
ret_from_reschedule:
......@@ -463,6 +473,27 @@ ret_from_reschedule:
restore_all:
RESTORE_ALL
rti
.align 3
syscall_error:
/*
* Some system calls (e.g., ptrace) can return arbitrary
* values which might normally be mistaken as error numbers.
* Those functions must setup $0 (v0) directly in the stack frame
* and return with value -255.
*/
addq $0,255,$1
beq $1,ret_success
bis $31,$31,$26 /* tell "ret_from_sys_call" that we can restart */
ldq $19,0($30) /* .. with this syscall nr */
ldq $20,72($30) /* .. and this a3 */
subq $31,$0,$0 /* with error in v0 */
addq $31,1,$1 /* set a3 for errno return */
stq $0,0($30)
stq $1,72($30) /* a3 for return */
br $31,ret_from_sys_call
.align 3
signal_return:
bis $30,$30,$17
......@@ -478,8 +509,8 @@ signal_return:
.ent reschedule
reschedule:
subq $30,16,$30
stq $19,0($30)
stq $20,8($30)
stq $19,0($30) /* save syscall nr */
stq $20,8($30) /* and error indication (a3) */
lda $27,schedule
jsr $26,($27),schedule
ldq $19,0($30)
......@@ -510,7 +541,7 @@ sys_sigsuspend:
jsr $26,($27),do_sigsuspend
lda $30,SWITCH_STACK_SIZE($30)
br $31,ret_from_sys_call
.end sys_sigreturn
.end sys_sigsuspend
.align 3
.globl sys_call_table
......@@ -525,7 +556,7 @@ sys_call_table:
.quad do_entSys, sys_sync, sys_kill, do_entSys, sys_setpgid
.quad do_entSys, sys_dup, sys_pipe, do_entSys, do_entSys
.quad sys_open, do_entSys, sys_getxgid, osf_sigprocmask, do_entSys
/*50*/ .quad do_entSys, do_entSys, do_entSys, do_entSys, sys_ioctl
/*50*/ .quad do_entSys, sys_acct, do_entSys, do_entSys, sys_ioctl
.quad do_entSys, do_entSys, sys_symlink, sys_readlink, sys_execve
.quad sys_umask, do_entSys, do_entSys, sys_getpgrp, sys_getpagesize
.quad do_entSys, osf_vfork, sys_newstat, sys_newlstat, do_entSys
......@@ -579,6 +610,6 @@ sys_call_table:
/* linux-specific system calls start at 300 */
/*300*/ .quad sys_bdflush, sys_sethae, sys_mount, sys_adjtimex, sys_swapoff
.quad sys_getdents, sys_create_module, sys_init_module, sys_delete_module, sys_get_kernel_syms
.quad sys_syslog, do_entSys, do_entSys, do_entSys, do_entSys
.quad sys_syslog, sys_reboot, do_entSys, do_entSys, do_entSys
.quad do_entSys, do_entSys, do_entSys, do_entSys, do_entSys
This diff is collapsed.
......@@ -11,6 +11,7 @@
#include <linux/bios32.h>
#include <linux/pci.h>
#include <asm/ptrace.h>
#include <asm/system.h>
#include <asm/io.h>
......@@ -18,7 +19,7 @@
* BIOS32-style PCI interface:
*/
#ifdef CONFIG_PCI
#ifdef CONFIG_ALPHA_LCA
#define vulp volatile unsigned long *
......@@ -76,7 +77,7 @@ static int mk_conf_addr(unsigned char bus, unsigned char device_fn,
if (device > 12) {
return -1;
} /* if */
}
*((volatile unsigned long*) LCA_IOC_CONF) = 0;
addr = (1 << (11 + device)) | (func << 8) | where;
......@@ -84,19 +85,19 @@ static int mk_conf_addr(unsigned char bus, unsigned char device_fn,
/* type 1 configuration cycle: */
*((volatile unsigned long*) LCA_IOC_CONF) = 1;
addr = (bus << 16) | (device_fn << 8) | where;
} /* if */
}
*pci_addr = addr;
return 0;
}
static unsigned int conf_read(unsigned long addr)
{
unsigned long old_ipl, code, stat0;
unsigned long flags, code, stat0;
unsigned int value;
old_ipl = swpipl(7); /* avoid getting hit by machine check */
save_flags(flags);
cli();
/* reset status register to avoid loosing errors: */
stat0 = *((volatile unsigned long*)LCA_IOC_STAT0);
......@@ -123,17 +124,17 @@ static unsigned int conf_read(unsigned long addr)
value = 0xffffffff;
}
swpipl(old_ipl);
restore_flags(flags);
return value;
}
static void conf_write(unsigned long addr, unsigned int value)
{
unsigned long old_ipl, code, stat0;
unsigned long flags, code, stat0;
old_ipl = swpipl(7); /* avoid getting hit by machine check */
save_flags(flags); /* avoid getting hit by machine check */
cli();
/* reset status register to avoid loosing errors: */
stat0 = *((volatile unsigned long*)LCA_IOC_STAT0);
......@@ -158,7 +159,7 @@ static void conf_write(unsigned long addr, unsigned int value)
mb();
wrmces(0x7); /* reset machine check */
}
swpipl(old_ipl);
restore_flags(flags);
}
......@@ -172,12 +173,9 @@ int pcibios_read_config_byte (unsigned char bus, unsigned char device_fn,
if (mk_conf_addr(bus, device_fn, where, &pci_addr) < 0) {
return PCIBIOS_SUCCESSFUL;
} /* if */
}
addr |= (pci_addr << 5) + 0x00;
*value = conf_read(addr) >> ((where & 3) * 8);
return PCIBIOS_SUCCESSFUL;
}
......@@ -192,14 +190,11 @@ int pcibios_read_config_word (unsigned char bus, unsigned char device_fn,
if (where & 0x1) {
return PCIBIOS_BAD_REGISTER_NUMBER;
} /* if */
}
if (mk_conf_addr(bus, device_fn, where, &pci_addr)) {
return PCIBIOS_SUCCESSFUL;
} /* if */
}
addr |= (pci_addr << 5) + 0x08;
*value = conf_read(addr) >> ((where & 3) * 8);
return PCIBIOS_SUCCESSFUL;
}
......@@ -212,19 +207,14 @@ int pcibios_read_config_dword (unsigned char bus, unsigned char device_fn,
unsigned long pci_addr;
*value = 0xffffffff;
if (where & 0x3) {
return PCIBIOS_BAD_REGISTER_NUMBER;
} /* if */
}
if (mk_conf_addr(bus, device_fn, where, &pci_addr)) {
return PCIBIOS_SUCCESSFUL;
} /* if */
}
addr |= (pci_addr << 5) + 0x18;
*value = conf_read(addr);
return PCIBIOS_SUCCESSFUL;
}
......@@ -237,12 +227,9 @@ int pcibios_write_config_byte (unsigned char bus, unsigned char device_fn,
if (mk_conf_addr(bus, device_fn, where, &pci_addr) < 0) {
return PCIBIOS_SUCCESSFUL;
} /* if */
}
addr |= (pci_addr << 5) + 0x00;
conf_write(addr, value << ((where & 3) * 8));
return PCIBIOS_SUCCESSFUL;
}
......@@ -255,12 +242,9 @@ int pcibios_write_config_word (unsigned char bus, unsigned char device_fn,
if (mk_conf_addr(bus, device_fn, where, &pci_addr) < 0) {
return PCIBIOS_SUCCESSFUL;
} /* if */
}
addr |= (pci_addr << 5) + 0x08;
conf_write(addr, value << ((where & 3) * 8));
return PCIBIOS_SUCCESSFUL;
}
......@@ -273,12 +257,9 @@ int pcibios_write_config_dword (unsigned char bus, unsigned char device_fn,
if (mk_conf_addr(bus, device_fn, where, &pci_addr) < 0) {
return PCIBIOS_SUCCESSFUL;
} /* if */
}
addr |= (pci_addr << 5) + 0x18;
conf_write(addr, value << ((where & 3) * 8));
return PCIBIOS_SUCCESSFUL;
}
......@@ -295,10 +276,20 @@ unsigned long lca_init(unsigned long mem_start, unsigned long mem_end)
*(vulp)LCA_IOC_W_BASE0 = 1UL<<33 | LCA_DMA_WIN_BASE;
*(vulp)LCA_IOC_W_MASK0 = LCA_DMA_WIN_SIZE - 1;
*(vulp)LCA_IOC_T_BASE0 = 0;
return mem_start;
}
#endif /* CONFIG_PCI */
/*** end of lca.c ***/
void lca_machine_check (unsigned long vector, unsigned long la, struct pt_regs *regs)
{
unsigned long mces;
mces = rdmces();
wrmces(mces); /* reset machine check asap */
printk("Machine check (la=0x%lx,mces=0x%lx)\n", la, mces);
printk("esr=%lx, ear=%lx, ioc_stat0=%lx, ioc_stat1=%lx\n",
*(unsigned long*)LCA_MEM_ESR, *(unsigned long*)LCA_MEM_EAR,
*(unsigned long*)LCA_IOC_STAT0, *(unsigned long*)LCA_IOC_STAT1);
}
#endif /* CONFIG_ALPHA_LCA */
......@@ -91,9 +91,7 @@ void flush_thread(void)
*/
int alpha_fork(struct switch_stack * swstack)
{
return do_fork(COPYVM | SIGCHLD,
rdusp(),
(struct pt_regs *) (swstack+1));
return do_fork(SIGCHLD, rdusp(), (struct pt_regs *) (swstack+1));
}
extern void ret_from_sys_call(void);
......@@ -169,17 +167,11 @@ asmlinkage int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
* This doesn't actually work correctly like this: we need to do the
* same stack setups that fork() does first.
*/
asmlinkage int sys_clone(unsigned long a0, unsigned long a1, unsigned long a2,
asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, unsigned long a2,
unsigned long a3, unsigned long a4, unsigned long a5,
struct pt_regs regs)
{
unsigned long clone_flags = a0;
unsigned long newsp;
newsp = rdusp();
if (newsp == a1 || !a1)
clone_flags |= COPYVM;
else
newsp = a1;
if (!newsp)
newsp = rdusp();
return do_fork(clone_flags, newsp, &regs);
}
This diff is collapsed.
......@@ -73,7 +73,8 @@ static unsigned long find_end_memory(void)
struct memclust_struct * cluster;
struct memdesc_struct * memdesc;
memdesc = (struct memdesc_struct *) (INIT_HWRPB->mddt_offset + (unsigned long) INIT_HWRPB);
memdesc = (struct memdesc_struct *)
(INIT_HWRPB->mddt_offset + (unsigned long) INIT_HWRPB);
cluster = memdesc->cluster;
for (i = memdesc->numclusters ; i > 0; i--, cluster++) {
unsigned long tmp;
......@@ -93,7 +94,8 @@ void setup_arch(char **cmdline_p,
hwrpb = (struct hwrpb_struct*)(IDENT_ADDR + INIT_HWRPB->phys_addr);
set_hae(hae.cache); /* sync HAE register w/hae_cache */
set_hae(hae.cache); /* sync HAE register w/hae_cache */
wrmces(0x7); /* reset enable correctable error reports */
ROOT_DEV = 0x0802; /* sda2 */
command_line[COMMAND_LINE_SIZE - 1] = '\0';
......@@ -103,8 +105,10 @@ void setup_arch(char **cmdline_p,
*memory_start_p = (unsigned long) &_end;
*memory_end_p = find_end_memory();
#ifdef CONFIG_PCI
#if defined(CONFIG_ALPHA_LCA)
*memory_start_p = lca_init(*memory_start_p, *memory_end_p);
#elif defined(CONFIG_ALPHA_APECS)
*memory_start_p = apecs_init(*memory_start_p, *memory_end_p);
#endif
}
......@@ -122,22 +126,27 @@ int get_cpuinfo(char *buffer)
const char *cpu_name[] = {
"EV3", "EV4", "Unknown 1", "LCA4", "EV5", "EV45"
};
# define SYSTYPE_NAME_BIAS 20
const char *systype_name[] = {
"ADU", "Cobra", "Ruby", "Flamingo", "Unknown 1", "Jensen",
"Pelican", "Unknown 2", "Sable", "AXPvme", "Noname",
"Turbolaser", "Avanti", "Mustang", "Alcor", "Unknown 3",
"Mikasa", "Unknown3", "EB66", "EB64+"
"Cabriolet", "EB66P", "-18", "-17", "-16", "-15",
"-14", "-13", "-12", "-11", "-10", "-9", "-8",
"-7", "-6", "-5", "-4", "-3", "-2", "-1", "0",
"ADU", "Cobra", "Ruby", "Flamingo", "5", "Jensen",
"Pelican", "8", "Sable", "AXPvme", "Noname",
"Turbolaser", "Avanti", "Mustang", "Alcor", "16",
"Mikasa", "18", "EB66", "EB64+"
};
struct percpu_struct *cpu;
unsigned int cpu_index, system_index;
unsigned int cpu_index;
long sysname_index;
extern struct unaligned_stat {
unsigned long count, va, pc;
} unaligned;
} unaligned[2];
# define N(a) (sizeof(a)/sizeof(a[0]))
cpu = (struct percpu_struct*)((char*)hwrpb + hwrpb->processor_offset);
cpu_index = (unsigned) (cpu->type - 1);
system_index = (unsigned) (hwrpb->sys_type - 1);
sysname_index = hwrpb->sys_type + SYSTYPE_NAME_BIAS;
return sprintf(buffer,
"cpu\t\t\t: Alpha\n"
......@@ -155,11 +164,14 @@ int get_cpuinfo(char *buffer)
"phys. address bits\t: %ld\n"
"max. addr. space #\t: %ld\n"
"BogoMIPS\t\t: %lu.%02lu\n"
"unaligned accesses\t: %ld (pc=%lx,va=%lx)\n",
"kernel unaligned acc\t: %ld (pc=%lx,va=%lx)\n"
"user unaligned acc\t: %ld (pc=%lx,va=%lx)\n",
(cpu_index < N(cpu_name) ? cpu_name[cpu_index] : "Unknown"),
(cpu_index < N(cpu_name)
? cpu_name[cpu_index] : "Unknown"),
cpu->variation, cpu->revision, (char*)cpu->serial_no,
(system_index < N(systype_name) ? systype_name[system_index] : "Unknown"),
(sysname_index < N(systype_name)
? systype_name[sysname_index] : "Unknown"),
hwrpb->sys_variation, hwrpb->sys_revision,
(char*)hwrpb->ssn,
hwrpb->cycle_freq,
......@@ -169,6 +181,7 @@ int get_cpuinfo(char *buffer)
hwrpb->pa_bits,
hwrpb->max_asn,
loops_per_sec / 500000, (loops_per_sec / 5000) % 100,
unaligned.count, unaligned.pc, unaligned.va);
unaligned[0].count, unaligned[0].pc, unaligned[0].va,
unaligned[1].count, unaligned[1].pc, unaligned[1].va);
# undef N
}
......@@ -25,6 +25,9 @@ asmlinkage int do_signal(unsigned long, struct pt_regs *, struct switch_stack *,
unsigned long, unsigned long);
asmlinkage void imb(void);
extern int ptrace_set_bpt (struct task_struct *child);
extern int ptrace_cancel_bpt (struct task_struct *child);
/*
* The OSF/1 sigprocmask calling sequence is different from the
* C sigprocmask() sequence..
......@@ -119,13 +122,19 @@ asmlinkage void do_sigreturn(struct sigcontext_struct * sc,
regs->gp = get_fs_quad(sc->sc_regs+29);
for (i = 0; i < 31; i++)
sw->fp[i] = get_fs_quad(sc->sc_fpregs+i);
/* send SIGTRAP if we're single-stepping: */
if (ptrace_cancel_bpt (current))
send_sig(SIGTRAP, current, 1);
}
/*
* Set up a signal frame...
*/
static void setup_frame(struct sigaction * sa, struct sigcontext_struct ** fp, unsigned long pc,
struct pt_regs * regs, struct switch_stack * sw, int signr, unsigned long oldmask)
static void setup_frame(struct sigaction * sa, struct sigcontext_struct ** fp,
unsigned long pc, struct pt_regs * regs,
struct switch_stack * sw, int signr,
unsigned long oldmask)
{
int i;
struct sigcontext_struct * sc;
......@@ -212,11 +221,10 @@ asmlinkage int do_signal(unsigned long oldmask,
unsigned long handler_signal = 0;
struct sigcontext_struct *frame = NULL;
unsigned long pc = 0;
unsigned long signr;
unsigned long signr, single_stepping;
struct sigaction * sa;
extern ptrace_cancel_bpt (struct task_struct *child);
ptrace_cancel_bpt(current); /* make sure single-step bpt is gone */
single_stepping = ptrace_cancel_bpt(current);
while ((signr = current->signal & mask) != 0) {
signr = ffz(~signr);
......@@ -228,6 +236,7 @@ asmlinkage int do_signal(unsigned long oldmask,
current->state = TASK_STOPPED;
notify_parent(current);
schedule();
single_stepping |= ptrace_cancel_bpt(current);
if (!(signr = current->exit_code))
continue;
current->exit_code = 0;
......@@ -263,6 +272,7 @@ asmlinkage int do_signal(unsigned long oldmask,
SA_NOCLDSTOP))
notify_parent(current);
schedule();
single_stepping |= ptrace_cancel_bpt(current);
continue;
case SIGQUIT: case SIGILL: case SIGTRAP:
......@@ -292,12 +302,16 @@ asmlinkage int do_signal(unsigned long oldmask,
(regs->r0 == ERESTARTNOHAND ||
regs->r0 == ERESTARTSYS ||
regs->r0 == ERESTARTNOINTR)) {
regs->r0 = r0;
regs->r0 = r0; /* reset v0 and a3 and replay syscall */
regs->r19 = r19;
regs->pc -= 4;
}
if (!handler_signal) /* no handler will be called - return 0 */
if (!handler_signal) { /* no handler will be called - return 0 */
if (single_stepping) {
ptrace_set_bpt(current); /* re-set breakpoint */
}
return 0;
}
pc = regs->pc;
frame = (struct sigcontext_struct *) rdusp();
signr = 1;
......@@ -318,5 +332,8 @@ asmlinkage int do_signal(unsigned long oldmask,
imb();
wrusp((unsigned long) frame);
regs->pc = pc; /* "return" to the first handler */
if (single_stepping) {
ptrace_set_bpt(current); /* re-set breakpoint */
}
return 1;
}
......@@ -8,6 +8,7 @@
* This file initializes the trap entry points
*/
#include <linux/mm.h>
#include <linux/sched.h>
#include <linux/tty.h>
......@@ -102,21 +103,27 @@ struct allregs {
struct unaligned_stat {
unsigned long count, va, pc;
} unaligned;
} unaligned[2];
asmlinkage void do_entUna(void * va, unsigned long opcode, unsigned long reg,
unsigned long a3, unsigned long a4, unsigned long a5,
struct allregs regs)
{
static int cnt = 0;
static long last_time = 0;
if (++cnt < 5)
printk("Unaligned trap at %016lx: %p %lx %ld\n",
regs.pc, va, opcode, reg);
if (cnt >= 5 && jiffies - last_time > 5*HZ) {
cnt = 0;
}
if (++cnt < 5) {
printk("kernel: unaligned trap at %016lx: %p %lx %ld\n",
regs.pc - 4, va, opcode, reg);
}
last_time = jiffies;
++unaligned.count;
unaligned.va = (unsigned long) va - 4;
unaligned.pc = regs.pc;
++unaligned[0].count;
unaligned[0].va = (unsigned long) va - 4;
unaligned[0].pc = regs.pc;
/* $16-$18 are PAL-saved, and are offset by 19 entries */
if (reg >= 16 && reg <= 18)
......@@ -141,19 +148,98 @@ asmlinkage void do_entUna(void * va, unsigned long opcode, unsigned long reg,
}
/*
* Handle user-level unaligned fault. For now, simply send a
* SIGBUS---there should be little reason for users not wanting to
* fix their code instead. Notice that we have the regular kernel
* stack layout here, so finding the appropriate registers is a little
* more difficult than in the kernel case. Also, we'd need to do
* a "verify_area()" before accessing memory on behalf of the user.
* Handle user-level unaligned fault. Handling user-level unaligned
* faults is *extremely* slow and produces nasty messages. A user
* program *should* fix unaligned faults ASAP.
*
* Notice that we have (almost) the regular kernel stack layout here,
* so finding the appropriate registers is a little more difficult
* than in the kernel case.
*
* Finally, we handle regular integer load/stores only. In
* particular, load-linked/store-conditionally and floating point
* load/stores are not supported. The former make no sense with
* unaligned faults (they are guaranteed to fail) and I don't think
* the latter will occur in any decent program.
*/
asmlinkage void do_entUnaUser(void *va, unsigned long opcode, unsigned long reg,
unsigned long a3, unsigned long a4, unsigned long a5,
struct pt_regs regs)
asmlinkage void do_entUnaUser(void * va, unsigned long opcode, unsigned long reg,
unsigned long * frame)
{
regs.pc -= 4; /* make pc point to faulting insn */
send_sig(SIGBUS, current, 1);
long dir, size;
unsigned long *reg_addr, *pc_addr, usp, zero = 0;
static int cnt = 0;
static long last_time = 0;
pc_addr = frame + 7 + 20 + 1; /* pc in PAL frame */
if (cnt >= 5 && jiffies - last_time > 5*HZ) {
cnt = 0;
}
if (++cnt < 5) {
printk("%s(%d): unaligned trap at %016lx: %p %lx %ld\n",
current->comm, current->pid,
*pc_addr - 4, va, opcode, reg);
}
last_time = jiffies;
++unaligned[1].count;
unaligned[1].va = (unsigned long) va - 4;
unaligned[1].pc = *pc_addr;
dir = VERIFY_READ;
if (opcode > 0x29) {
/* it's a stl or stq */
dir = VERIFY_WRITE;
}
size = 4;
if (opcode & 1) {
/* it's a quadword op */
size = 8;
}
if (verify_area(dir, va, size)) {
*pc_addr -= 4; /* make pc point to faulting insn */
send_sig(SIGSEGV, current, 1);
return;
}
reg_addr = frame;
if (reg < 9) {
reg_addr += 7 + reg; /* v0-t7 in SAVE_ALL frame */
} else if (reg < 16) {
reg_addr += (reg - 9); /* s0-s6 in entUna frame */
} else if (reg < 19) {
reg_addr += 7 + 20 + 3 + (reg - 16); /* a0-a2 in PAL frame */
} else if (reg < 29) {
reg_addr += 7 + 9 + (reg - 19); /* a3-at in SAVE_ALL frame */
} else {
switch (reg) {
case 29: /* gp in PAL frame */
reg_addr += 7 + 20 + 2;
break;
case 30: /* usp in PAL regs */
usp = rdusp();
reg_addr = &usp;
break;
case 31: /* zero "register" */
reg_addr = &zero;
break;
}
}
switch (opcode) {
case 0x28: *reg_addr = (int) ldl_u(va); break; /* ldl */
case 0x29: *reg_addr = ldq_u(va); break; /* ldq */
case 0x2c: stl_u(*reg_addr, va); break; /* stl */
case 0x2d: stq_u(*reg_addr, va); break; /* stq */
default:
*pc_addr -= 4; /* make pc point to faulting insn */
send_sig(SIGBUS, current, 1);
return;
}
if (reg == 30 && dir == VERIFY_WRITE) {
wrusp(usp);
}
}
/*
......
......@@ -57,13 +57,16 @@ if [ "$CONFIG_IP_FORWARD" = "y" -a "$CONFIG_IP_FIREWALL" = "y" ]; then
bool 'IP: firewall packet logging' CONFIG_IP_FIREWALL_VERBOSE y
bool 'IP: masquerading (ALPHA)' CONFIG_IP_MASQUERADE n
fi
if [ "$CONFIG_IP_FORWARD" = "y" -a "$CONFIG_IP_MULTICAST" = "y" -a "$CONFIG_NET_IPIP" = "y" ]; then
bool 'IP: multicast routing(in progress)' CONFIG_IP_MROUTE n
fi
comment '(it is safe to leave these untouched)'
bool 'IP: PC/TCP compatibility mode' CONFIG_INET_PCTCP n
bool 'IP: Reverse ARP' CONFIG_INET_RARP n
bool 'IP: Assume subnets are local' CONFIG_INET_SNARL y
bool 'IP: Disable NAGLE algorithm (normally enabled)' CONFIG_TCP_NAGLE_OFF n
bool 'IP: Drop source routed frames' CONFIG_IP_NOSR y
bool 'IP: Allow large windows (not recommend if <16Mb of memory)' CONFIG_SKB_LARGE y
bool 'IP: Allow large windows (not recommended if <16Mb of memory)' CONFIG_SKB_LARGE y
fi
bool 'The IPX protocol' CONFIG_IPX n
bool 'Appletalk DDP' CONFIG_ATALK n
......@@ -142,6 +145,8 @@ if [ "$CONFIG_PPP" = "y" ]; then
fi
if [ "$CONFIG_AX25" = "y" ]; then
bool 'Z8530 SCC kiss emulation driver for AX.25' CONFIG_SCC y
else
bool 'Z8530 SCC kiss emulation driver for AX.25' CONFIG_SCC n
fi
bool 'PLIP (parallel port) support' CONFIG_PLIP n
bool 'EQL (serial line load balancing) support' CONFIG_EQUALIZER n
......@@ -218,7 +223,7 @@ comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)'
bool 'Sony CDU31A/CDU33A CDROM support' CONFIG_CDU31A n
bool 'Standard Mitsumi [no XA/Multisession] CDROM support' CONFIG_MCD n
bool 'Experimental Mitsumi [XA/MultiSession, no Audio] support' CONFIG_MCDX n
bool 'Experimental Mitsumi [XA/MultiSession] support' CONFIG_MCDX n
bool 'Matsushita/Panasonic CDROM support' CONFIG_SBPCD n
if [ "$CONFIG_SBPCD" = "y" ]; then
bool 'Matsushita/Panasonic second CDROM controller support' CONFIG_SBPCD2 n
......
......@@ -295,7 +295,7 @@ static void math_error_irq(int cpl, struct pt_regs *regs)
static void no_action(int cpl, struct pt_regs * regs) { }
unsigned int probe_irq_on (void)
unsigned long probe_irq_on (void)
{
unsigned int i, irqs = 0, irqmask;
unsigned long delay;
......@@ -325,7 +325,7 @@ unsigned int probe_irq_on (void)
return irqs;
}
int probe_irq_off (unsigned int irqs)
int probe_irq_off (unsigned long irqs)
{
unsigned int i, irqmask;
......
......@@ -232,12 +232,17 @@ void dump_thread(struct pt_regs * regs, struct user * dump)
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;
if (verify_area(VERIFY_READ, (void *) dump->u_tsize, dump->u_dsize) < 0)
dump->u_dsize = 0;
dump->u_ssize = 0;
for (i = 0; i < 8; i++)
dump->u_debugreg[i] = current->debugreg[i];
if (dump->start_stack < TASK_SIZE)
if (dump->start_stack < TASK_SIZE) {
dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> 12;
if (verify_area(VERIFY_READ, (void *) dump->start_stack, dump->u_ssize) < 0)
dump->u_ssize = 0;
}
dump->regs = *regs;
......@@ -246,12 +251,11 @@ void dump_thread(struct pt_regs * regs, struct user * dump)
asmlinkage int sys_fork(struct pt_regs regs)
{
return do_fork(COPYVM | SIGCHLD, regs.esp, &regs);
return do_fork(SIGCHLD, regs.esp, &regs);
}
asmlinkage int sys_clone(struct pt_regs regs)
{
#ifdef CLONE_ACTUALLY_WORKS_OK
unsigned long clone_flags;
unsigned long newsp;
......@@ -259,12 +263,7 @@ asmlinkage int sys_clone(struct pt_regs regs)
clone_flags = regs.ecx;
if (!newsp)
newsp = regs.esp;
if (newsp == regs.esp)
clone_flags |= COPYVM;
return do_fork(clone_flags, newsp, &regs);
#else
return -ENOSYS;
#endif
}
/*
......
......@@ -177,7 +177,7 @@ static void put_long(struct vm_area_struct * vma, unsigned long addr,
*(unsigned long *) (page + (addr & ~PAGE_MASK)) = data;
/* we're bypassing pagetables, so we have to set the dirty bit ourselves */
/* this should also re-instate whatever read-only mode there was before */
*pgtable = pte_mkdirty(mk_pte(page, vma->vm_page_prot));
set_pte(pgtable, pte_mkdirty(mk_pte(page, vma->vm_page_prot)));
invalidate();
}
......
......@@ -93,7 +93,7 @@ static void mark_screen_rdonly(struct task_struct * tsk)
pte = pte_offset(pmd, 0xA0000);
for (i = 0; i < 32; i++) {
if (pte_present(*pte))
*pte = pte_wrprotect(*pte);
set_pte(pte, pte_wrprotect(*pte));
pte++;
}
invalidate();
......
......@@ -157,7 +157,7 @@ unsigned long paging_init(unsigned long start_mem, unsigned long end_mem)
pg_dir++;
for (tmp = 0 ; tmp < PTRS_PER_PTE ; tmp++,pg_table++) {
if (address < end_mem)
*pg_table = mk_pte(address, PAGE_SHARED);
set_pte(pg_table, mk_pte(address, PAGE_SHARED));
else
pte_clear(pg_table);
address += PAGE_SIZE;
......
......@@ -87,7 +87,7 @@ void flush_thread(void)
#define IS_CLONE (regs->orig_reg2 == __NR_clone)
unsigned long copy_thread(int nr, unsigned long clone_flags, struct task_struct * p, struct pt_regs * regs)
void copy_thread(int nr, unsigned long clone_flags, struct task_struct * p, struct pt_regs * regs)
{
struct pt_regs * childregs;
......@@ -109,16 +109,6 @@ unsigned long copy_thread(int nr, unsigned long clone_flags, struct task_struct
p->tss.cp0_status = regs->cp0_status &
~(ST0_CU1|ST0_CU0|ST0_KSU|ST0_ERL|ST0_EXL);
childregs->cp0_status &= ~(ST0_CU1|ST0_CU0);
if (IS_CLONE) {
if (regs->reg4)
childregs->reg29 = regs->reg4;
clone_flags = regs->reg5;
if (childregs->reg29 == regs->reg29)
clone_flags |= COPYVM;
}
return clone_flags;
}
/*
......
......@@ -156,7 +156,7 @@ static void put_long(struct vm_area_struct * vma, unsigned long addr,
}
/* we're bypassing pagetables, so we have to set the dirty bit ourselves */
/* this should also re-instate whatever read-only mode there was before */
*pgtable = pte_mkdirty(mk_pte(page, vma->vm_page_prot));
set_pte(pgtable, pte_mkdirty(mk_pte(page, vma->vm_page_prot)));
invalidate();
}
......
......@@ -163,7 +163,7 @@ unsigned long paging_init(unsigned long start_mem, unsigned long end_mem)
pg_dir++;
for (tmp = 0 ; tmp < PTRS_PER_PAGE ; tmp++,pg_table++) {
if (address < end_mem)
*pg_table = mk_pte(address, PAGE_SHARED);
set_pte(pg_table, mk_pte(address, PAGE_SHARED));
else
pte_clear(pg_table);
address += PAGE_SIZE;
......
......@@ -139,7 +139,7 @@ void dump_thread(struct pt_regs * regs, struct user * dump)
asmlinkage int sys_fork(struct pt_regs *regs)
{
return do_fork(COPYVM | SIGCHLD, regs->u_regs[14], regs);
return do_fork(SIGCHLD, regs->u_regs[14], regs);
}
/*
......
......@@ -10,6 +10,7 @@
#include <asm/pgtable.h>
void (*invalidate)(void);
void (*set_pte)(pte_t *ptep, pte_t entry);
unsigned int pmd_shift, pmd_size, pmd_mask;
unsigned int (*pmd_align)(unsigned int);
......
......@@ -427,6 +427,13 @@ srmmu_invalidate(void)
return;
}
void
srmmu_set_pte(pte_t *ptep, pte_t entry)
{
/* for now... */
*ptep = entry;
}
/* XXX Needs to be written */
void
srmmu_switch_to_context(int context)
......@@ -840,6 +847,7 @@ ld_mmu_srmmu(void)
/* Functions */
invalidate = srmmu_invalidate;
set_pte = srmmu_set_pte;
switch_to_context = srmmu_switch_to_context;
pmd_align = srmmu_pmd_align;
pgdir_align = srmmu_pgdir_align;
......
......@@ -363,6 +363,13 @@ sun4c_invalidate(void)
flush_vac_context();
}
void
sun4c_set_pte(pte_t *ptep, pte_t entry)
{
/* for now... */
*ptep = entry;
}
void
sun4c_switch_to_context(int context)
{
......@@ -630,6 +637,7 @@ ld_mmu_sun4c(void)
/* Functions */
invalidate = sun4c_invalidate;
set_pte = sun4c_set_pte;
switch_to_context = sun4c_switch_to_context;
pmd_align = sun4c_pmd_align;
pgdir_align = sun4c_pgdir_align;
......
$Id: README.aztcd,v 1.60 1995/08/09 12:37:46 root Exp root $
$Id: README.aztcd,v 1.70 1995/08/19 16:21:05 root Exp root $
Readme-File README.aztcd
for Aztech CD-ROM CDA268-01A, ORCHID CD-3110, OKANO/WEARNES CDD110
CD-ROM Driver
Version 1.6 and newer
Version 1.7 and newer
(for other drives see 6.-8.)
NOTE: THIS DRIVER WILL WORK WITH THE CD-ROM DRIVES LISTED, WHICH HAVE
......@@ -20,12 +20,12 @@ Contents of this file:
2. INSTALLATION
3. CONFIGURING YOUR KERNEL
4. RECOMPILING YOUR KERNEL
4.1 AZTCD AS A RUN-TIME LOADABLE MODULE
4.2 CDROM CONNECTED TO A SOUNDCARD
4.1 AZTCD AS A RUN-TIME LOADABLE MODULE
4.2 CDROM CONNECTED TO A SOUNDCARD
5. KNOWN PROBLEMS, FUTURE DEVELOPMENTS
5.1 MULTISESSION SUPPORT
5.2 STATUS RECOGNITION
5.3 DOSEMU's CDROM SUPPORT
5.1 MULTISESSION SUPPORT
5.2 STATUS RECOGNITION
5.3 DOSEMU's CDROM SUPPORT
6. BUG REPORTS
7. OTHER DRIVES
8. IF YOU DON'T SUCCEED ... DEBUGGING
......@@ -181,11 +181,22 @@ configured and mail me (see 6.) the appropriate information.
5. KNOWN PROBLEMS, FUTURE DEVELOPMENTS
5.1 MULTISESSION SUPPORT
I have now (July 1995) started support of multisession CDs. Unfortunately I
do only have one multisession CD and no appropriate applications, so I can
program, but testing is a little too less :-(. If you'd like to help me,
please contact me. As of version 1.4 you can enable the multisession support
in aztcd.h by setting AZT_MULTISESSION to 1.
Multisession support for CD's still is a myth. I implemented and tested a basic
support for multisession and XA CDs, but I still have not enough CDs and appli-
cations to test it rigourously. So if you'd like to help me, please contact me
(Email address see below). As of version 1.4 and newer you can enable the
multisession support in aztcd.h by setting AZT_MULTISESSION to 1. Doing so
will cause the ISO9660-filesystem to deal with multisession CDs, ie. redirect
requests to the Table of Contents (TOC) information from the last session,
which contains the info of all previous sessions etc.. If you do set
AZT_MULTISESSION to 0, you can use multisession CDs anyway. In that case the
drive's firmware will do automatic redirection. For the ISO9660-filesystem any
multisession CD will then look like a 'normal' single session CD. But never-
theless the data of all sessions is viewable and accessible. So with practical-
ly all real world applications you won't notice the difference. But as future
applications may make use of advanced multisession features, I've started to
implement the interface for the ISO9660 multisession interface via ioctl
CDROMMULTISESSION.
5.2 STATUS RECOGNITION
The drive status recognition does not work correctly in all cases. Changing
......
......@@ -27,28 +27,31 @@ NEW! (both are now probed for)
- support for interrupt unmasking during I/O (better than hd.c)
- improved handshaking and error detection/recovery
- can co-exist with hd.c controlling the first interface
- support for reliable operation of buggy CMD-640 interfaces
NEW! - use kernel command line option: ide1=serialize
- experimental support for DTC-2278D interfaces
NEW! - use kernel command line option: ide1=dtc2278
- run-time selectable 32bit interface support (using hdparm-2.3)
NEW! - support for reliable operation of buggy RZ1000 interfaces
NEW! - PCI support is automatic
NEW! - support for reliable operation of buggy CMD-640 interfaces
NEW! - PCI support is automatic
NEW! - for VLB, use kernel command line option: ide0=cmd640_vlb
NEW! - this support also enables the secondary i/f on most cards
NEW! - support for secondary interface on the FGI/Holtek HT-6560B VLB i/f
NEW! - use kernel command line option: ide1=ht6560
NEW! - experimental support for DTC-2278D interfaces
NEW! - use kernel command line option: ide1=dtc2278
NEW! - support for drives with a stuck WRERR_STAT bit
NEW! - support for removeable devices, including door lock/unlock
NEW! - transparent support for DiskManager 6.0x and "Dynamic Disk Overlay"
NEW! - works with Linux fdisk, LILO, loadlin, bootln, etc..
NEW! - should work for for EZ-Drive disks as well (not verified)
- works with Linux fdisk, LILO, loadlin, bootln, etc..
NEW! - ide-cd.c now compiles separate from ide.c
NEW! - Bus-Master DMA support for Intel PCI Triton chipset IDE interfaces
- for details, see comments at top of triton.c
NEW! - for details, see comments at top of triton.c
For work in progress, see the comments in ide.c, ide-cd.c, and triton.c.
***
*** IMPORTANT NOTICES:
*** ==================
***
*** IMPORTANT NOTICES (for kernel versions prior to 1.3.22)
*** =================
*** "CMD" EIDE Interfaces will not (by default) work *reliably* when drives
*** are attached to the second interface. This is due to a flaw in the
*** hardware. To "fix" this, supply the special kernel "command line"
......@@ -63,7 +66,21 @@ For work in progress, see the comments in ide.c, ide-cd.c, and triton.c.
*** and is only a problem when "hdparm -u1" is used after booting.
***
*** Failure to abide by these restrictions can cause severe data corruption!
*** IMPORTANT NOTICES (for kernel versions after 1.3.21)
*** =================
*** PCI versions of the CMD640 and RZ1000 interfaces are now detected
*** automatically at startup when PCI BIOS support is configured.
*** Linux disables the "pre-fetch" or "read-ahead" modes of these interfaces
*** to prevent data corruption possible due to hardware design flaws.
*** Use of the "serialize" option is no longer necessary.
***
*** The CMD640 is also used on some Vesa Local Bus (VLB) cards, and is *NOT*
*** automatically detected by Linux. For safe, reliable operation with such
*** interfaces, one *MUST* use the "ide0=cmd640_vlb" kernel option.
*** Use of the "serialize" option is no longer necessary.
To access devices on the 2nd/3rd/4th interfaces, device entries must first be
created in /dev for them. To create such entries, simply run the included
......@@ -184,6 +201,9 @@ The following two are valid ONLY on ide0 or ide1:
"idex=dtc2278" : look for and try to initialize a dtc2278
"idex=serialize" : do not overlap operations on ide0 and ide1.
"idex=ht6560b" : enables use of HT6560B secondary i/f
"idex=cmd640_vlb" : required for VLB cards with the CMD640 chip
(not for PCI versions)
Everything else is rejected with a "BAD OPTION" message.
......@@ -374,3 +394,32 @@ kernels I think.
Vladimir Myslik
comp.sys.intel #41571 (1 + 2 more) --(1)--(1)+-(1)--(1)
From: triblet@almaden.ibm.com (Chuck Tribolet) \-(1)--(1)--(1)--(1)
Newsgroups: comp.sys.intel,comp.os.os2.bugs
[1] Re: RZ1000 errorIntel motherboards and RZ1000
Date: Tue Aug 29 11:00:12 EDT 1995
Organization: IBM Almaden Research Center
Lines: 20
X-Newsreader: IBM NewsReader/2 v1.02
In <41ip85$gf9@park.uvsc.edu>, Terry Lambert <terry@cs.weber.edu> writes:
>Try running a real OS. BIOS drivers so not initiate bus mastering
>DMA, and DOS does not interleave I/O.
1: The RZ1000 can't do DMA.
2: I was running OS/2 (2.11 back then).
I agreed that you might be able to concoct a benchmark that was affected,
but it has had no real world effect for me or a lot of other people. Disabling
IDE prefetch has the effect of a small increase in PCI bus busy at a time
when the CPU is giving all it's CPU cycles to the IDE driver (because the
RZ1000 can't run DMA and the driver has to be in a PIO loop) and therefore
the CPU can't do much of anything else anyway.
Chuck Tribolet
Triblet@Almaden.IBM.Com
San Jose, CA
Silicon Valley - best day job in the world
This driver does not support XA or MultiSession CDs (PhotoCDs). Use the
experimental driver mcdx.c for that.
You can use mcd for one interface, and mcdx for another; this way, you
can use the audio functions with the "old" driver, and read XA CDs with
the "new" driver (if you have at least two drives).
You can use mcd for one interface, and mcdx for another.
......@@ -5,13 +5,17 @@ drives: each driver can use his own drive.
To allow this "coexistence" as long as mcdx.c is not a superset of mcd.c,
this driver has to use its own device files. We use MAJOR 20 for it. So,
you have to do
# mknod /dev/mcdx0 b 20 0
# mknod /dev/mcdx1 b 20 1
and so on, one entry for each drive to support, once.
If you are using the driver as a module, you can specify your ports and IRQs
like
# insmod mcdx.o mcdx=0x300,11,0x304,5
and so on ("address,IRQ" pairs).
This will override the configuration in mcdx.h.
......@@ -23,10 +27,10 @@ This driver:
IRQs, i/o ports and slots);
o uses much less kernel memory than the standard mcd driver
(no extra driver internal buffers!).
o plays audio (like the `old' driver, I hope)
This version doesn't support yet:
o audio functions;
o shared IRQs (but it seems to be possible - I've successfully
connected two drives to the same irq. So it's `only' a
problem of the driver.)
......@@ -35,3 +39,6 @@ This driver never will:
o Read digital audio (i.e. copy directly), due to missing
hardware features.
heiko@lotte.sax.de
This diff is collapsed.
......@@ -128,7 +128,7 @@ static void floppy_off(unsigned int nr);
#define DEVICE_NAME "harddisk"
#define DEVICE_INTR do_hd
#define DEVICE_TIMEOUT HD_TIMER
#define TIMEOUT_VALUE 600
#define TIMEOUT_VALUE (6*HZ)
#define DEVICE_REQUEST do_hd_request
#define DEVICE_NR(device) (MINOR(device)>>6)
#define DEVICE_ON(device)
......@@ -138,7 +138,7 @@ static void floppy_off(unsigned int nr);
#define DEVICE_NAME "scsidisk"
#define DEVICE_INTR do_sd
#define TIMEOUT_VALUE 200
#define TIMEOUT_VALUE (2*HZ)
#define DEVICE_REQUEST do_sd_request
#define DEVICE_NR(device) (MINOR(device) >> 4)
#define DEVICE_ON(device)
......
......@@ -625,7 +625,7 @@ restart_on_error(void)
}
current->state = TASK_INTERRUPTIBLE;
current->timeout = jiffies + 200;
current->timeout = jiffies + 2*HZ;
schedule();
do_sony_cd_cmd(SONY_READ_TOC_CMD, NULL, 0, res_reg, &res_size);
......@@ -834,6 +834,7 @@ do_sony_cd_cmd(unsigned char cmd,
result_buffer[0] = 0x20;
result_buffer[1] = SONY_SIGNAL_OP_ERR;
*result_size = 2;
restore_flags(flags);
return;
}
}
......@@ -887,7 +888,7 @@ do_sony_cd_cmd(unsigned char cmd,
{
num_retries++;
current->state = TASK_INTERRUPTIBLE;
current->timeout = jiffies + 10; /* Wait .1 seconds on retries */
current->timeout = jiffies + HZ/10; /* Wait .1 seconds on retries */
schedule();
goto retry_cd_operation;
}
......@@ -2137,6 +2138,7 @@ read_audio(struct cdrom_read_audio *ra,
interruptible_sleep_on(&sony_wait);
if (current->signal & ~current->blocked)
{
restore_flags(flags);
return -EAGAIN;
}
}
......
......@@ -126,9 +126,9 @@ static int cm206_irq = CM206_IRQ;
#define POLLOOP 10000
#define READ_AHEAD 1 /* defines private buffer, waste! */
#define BACK_AHEAD 1 /* defines adapter-read ahead */
#define DATA_TIMEOUT 300 /* measured in jiffies (10 ms) */
#define UART_TIMEOUT 5
#define DSB_TIMEOUT 700 /* time for the slowest command to finish */
#define DATA_TIMEOUT (3*HZ) /* measured in jiffies (10 ms) */
#define UART_TIMEOUT (5*HZ/100)
#define DSB_TIMEOUT (7*HZ) /* time for the slowest command to finish */
#define RAW_SECTOR_SIZE 2352 /* ok, is also defined in cdrom.h */
#define ISO_SECTOR_SIZE 2048
......
......@@ -908,7 +908,7 @@ static void fd_watchdog(void)
} else {
del_timer(&fd_timer);
fd_timer.function = (timeout_fn) fd_watchdog;
fd_timer.expires = jiffies + 10;
fd_timer.expires = jiffies + HZ / 10;
add_timer(&fd_timer);
}
}
......@@ -1031,7 +1031,7 @@ static void setup_DMA(void)
static int output_byte(char byte)
{
int counter;
unsigned char status;
unsigned char status = 0; /* keep gcc quiet */
unsigned char rstatus;
if (FDCS->reset)
......@@ -1065,7 +1065,7 @@ static int output_byte(char byte)
/* gets the response from the fdc */
static int result(void)
{
int i = 0, counter, status;
int i = 0, counter, status = 0;
if (FDCS->reset)
return -1;
......
......@@ -15,6 +15,8 @@
* with information provided by OnTrack. This now works for linux fdisk
* and LILO, as well as loadlin and bootln. Note that disks other than
* /dev/hda *must* have a "DOS" type 0x51 partition in the first slot (hda1).
*
* Added support for "missing/deleted" extended partitions - mlord@bnr.ca
*/
#include <linux/config.h>
......@@ -98,17 +100,19 @@ static void extended_partition(struct gendisk *hd, int dev)
bh->b_dirt = 0;
bh->b_uptodate = 0;
bh->b_req = 0;
if (*(unsigned short *) (bh->b_data+510) == 0xAA55) {
p = (struct partition *) (0x1BE + bh->b_data);
if (*(unsigned short *) (bh->b_data+510) != 0xAA55)
goto done;
p = (struct partition *) (0x1BE + bh->b_data);
/*
* Process the first entry, which should be the real
* data partition.
*/
if (p->sys_ind == EXTENDED_PARTITION || !p->nr_sects)
goto done; /* shouldn't happen */
if (p->sys_ind == EXTENDED_PARTITION)
goto done; /* shouldn't happen */
if (p->sys_ind && p->nr_sects)
add_partition(hd, current_minor, this_sector+p->start_sect, p->nr_sects);
current_minor++;
p++;
current_minor++;
p++;
/*
* Process the second entry, which should be a link
* to the next logical partition. Create a minor
......@@ -116,15 +120,13 @@ static void extended_partition(struct gendisk *hd, int dev)
* table. The minor will be reused for the real
* data partition.
*/
if (p->sys_ind != EXTENDED_PARTITION ||
!(hd->part[current_minor].nr_sects = p->nr_sects))
goto done; /* no more logicals in this partition */
hd->part[current_minor].start_sect = first_sector + p->start_sect;
this_sector = first_sector + p->start_sect;
dev = ((hd->major) << 8) | current_minor;
brelse(bh);
} else
goto done;
if (p->sys_ind != EXTENDED_PARTITION ||
!(hd->part[current_minor].nr_sects = p->nr_sects))
goto done; /* no more logicals in this partition */
hd->part[current_minor].start_sect = first_sector + p->start_sect;
this_sector = first_sector + p->start_sect;
dev = ((hd->major) << 8) | current_minor;
brelse(bh);
}
done:
brelse(bh);
......
This diff is collapsed.
......@@ -30,8 +30,20 @@
#ifndef OK_TO_RESET_CONTROLLER /* 1 needed for good error recovery */
#define OK_TO_RESET_CONTROLLER 1 /* 0 for use with AH2372A/B interface */
#endif
#ifndef SUPPORT_RZ1000 /* 1 to support RZ1000 chipset */
#define SUPPORT_RZ1000 1 /* 0 to reduce kernel size */
#endif
#ifndef SUPPORT_CMD640 /* 1 to support CMD640 chipset */
#define SUPPORT_CMD640 1 /* 0 to reduce kernel size */
#endif
#ifndef SUPPORT_HT6560B /* 1 to support HT6560B chipset */
#define SUPPORT_HT6560B 1 /* 0 to reduce kernel size */
#endif
#ifndef SUPPORT_DTC2278 /* 1 to support DTC2278 chipset */
#define SUPPORT_DTC2278 1 /* 0 to reduce kernel size */
#ifndef SET_DTC2278_MODE4
#define SET_DTC2278_MODE4 0 /* 1 to init primary i/f for PIO mode4 */
#endif
#endif
#ifndef FANCY_STATUS_DUMPS /* 1 for human-readable drive errors */
#define FANCY_STATUS_DUMPS 1 /* 0 to reduce kernel size */
......@@ -287,7 +299,7 @@ typedef struct hwif_s {
unsigned short dma_base; /* base addr for dma ports (triton) */
byte irq; /* our irq number */
byte major; /* our major number */
byte drivecount; /* how many drives attached */
byte select; /* pri/sec hwif select for ht6560b */
char name[5]; /* name of interface, eg. "ide0" */
unsigned noprobe : 1; /* don't probe for this interface */
unsigned present : 1; /* this interface exists */
......@@ -415,6 +427,6 @@ void ide_cdrom_setup (ide_drive_t *);
#endif /* CONFIG_BLK_DEV_IDECD */
#ifdef CONFIG_BLK_DEV_TRITON
void ide_init_triton (ide_hwif_t *);
void ide_init_triton (byte, byte);
#endif /* CONFIG_BLK_DEV_TRITON */
......@@ -1662,6 +1662,7 @@ void cleanup_module(void)
return;
}
release_region(mcd_port,4);
free_irq(mcd_irq);
printk("mcd module released.\n");
}
#endif MODULE
This diff is collapsed.
......@@ -46,6 +46,7 @@
copied from sjcd.c, with a few changes.
Updated README.optcd. Submitted for
inclusion in 1.3.21
29-9-95 v0.4a Fixed bug that prevented compilation as module
*/
#include <linux/major.h>
......@@ -1442,7 +1443,7 @@ int init_module(void) {
if ( isp16_config( optcd_port, ISP16_SONY, 0, 0 ) < 0 ) {
printk( "ISP16 cdrom interface has not been properly configured.\n" );
return(mem_start);
RETURN_EIO;
}
}
}
......
This diff is collapsed.
......@@ -380,13 +380,13 @@ static void sjcd_status_timer( void ){
} else if( --sjcd_status_timeout <= 0 ){
wake_up( &sjcd_waitq );
} else {
SJCD_SET_TIMER( sjcd_status_timer, 1 );
SJCD_SET_TIMER( sjcd_status_timer, HZ/100 );
}
}
static int sjcd_wait_for_status( void ){
sjcd_status_timeout = SJCD_WAIT_FOR_STATUS_TIMEOUT;
SJCD_SET_TIMER( sjcd_status_timer, 1 );
SJCD_SET_TIMER( sjcd_status_timer, HZ/100 );
sleep_on( &sjcd_waitq );
if( sjcd_status_timeout <= 0 )
printk( "sjcd: Error Wait For Status.\n" );
......@@ -1223,7 +1223,7 @@ static void sjcd_poll( void ){
/*
* Get back in some time.
*/
SJCD_SET_TIMER( sjcd_poll, 1 );
SJCD_SET_TIMER( sjcd_poll, HZ/100 );
}
static void do_sjcd_request( void ){
......@@ -1252,7 +1252,7 @@ static void do_sjcd_request( void ){
}
}
sjcd_transfer_state = SJCD_S_START;
SJCD_SET_TIMER( sjcd_poll, 1 );
SJCD_SET_TIMER( sjcd_poll, HZ/100 );
}
break;
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -2030,7 +2030,7 @@ long con_init(long kmem_start)
timer_table[BLANK_TIMER].fn = blank_screen;
timer_table[BLANK_TIMER].expires = 0;
if (blankinterval) {
timer_table[BLANK_TIMER].expires = jiffies+blankinterval;
timer_table[BLANK_TIMER].expires = jiffies + blankinterval;
timer_active |= 1<<BLANK_TIMER;
}
......@@ -2051,7 +2051,8 @@ long con_init(long kmem_start)
video_type = VIDEO_TYPE_MDA;
video_mem_term = 0xb2000;
display_desc = "*MDA";
request_region(0x3b0,16,"mda");
request_region(0x3b0,12,"mda");
request_region(0x3bf, 1,"mda");
}
}
else /* If not, it is color. */
......
......@@ -1025,13 +1025,13 @@ check_wild_interrupts(void)
* Delay for 0.1 seconds -- we use a busy loop since this may
* occur during the bootup sequence
*/
timeout = jiffies+10;
timeout = jiffies+HZ/10;
while (timeout >= jiffies)
;
cy_triggered = 0; /* Reset after letting things settle */
timeout = jiffies+10;
timeout = jiffies+HZ/10;
while (timeout >= jiffies)
;
......@@ -1072,7 +1072,7 @@ get_auto_irq(int card)
base_addr[CySRER] |= CyTxMpty;
sti();
timeout = jiffies+2;
timeout = jiffies+2*HZ/100;
while (timeout >= jiffies) {
if (cy_irq_triggered)
break;
......@@ -2302,7 +2302,7 @@ cy_close(struct tty_struct * tty, struct file * filp)
if (info->flags & ASYNC_CALLOUT_ACTIVE)
info->callout_termios = *tty->termios;
if (info->flags & ASYNC_INITIALIZED)
tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */
tty_wait_until_sent(tty, 30*HZ); /* 30 seconds timeout */
shutdown(info);
if (tty->driver.flush_buffer)
tty->driver.flush_buffer(tty);
......
......@@ -409,7 +409,7 @@ static int lp_ioctl(struct inode *inode, struct file *file,
return -ENODEV;
switch ( cmd ) {
case LPTIME:
LP_TIME(minor) = arg;
LP_TIME(minor) = arg * HZ/100;
break;
case LPCHAR:
LP_CHAR(minor) = arg;
......
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