Commit a96e1f22 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Import 2.0.1

parent 81e05330
......@@ -491,8 +491,13 @@ ftp://sunsite.unc.edu/pub/Linux/devel/make/make-3.74-direntfix-elf.tgz
Linux C++ Library
=================
ftp://sunsite.unc.edu/pub/Linux/GCC/libg++-2.7.1.3.bin.tar.gz
ftp://sunsite.unc.edu/pub/Linux/GCC/libg++-2.7.1.4.bin.tar.gz
Use libc5.2.18 with 2.7.1.3, libc5.3.12 with 2.7.1.4
Installation notes:
ftp://sunsite.unc.edu/pub/Linux/GCC/release.libg++-2.7.1.3
ftp://sunsite.unc.edu/pub/Linux/GCC/release.libg++-2.7.1.4
Dynamic Linker
......
......@@ -42,7 +42,7 @@ foo \kill}%
%
\title{{\bf Linux Allocated Devices}}
\author{Maintained by H. Peter Anvin $<$hpa@zytor.com$>$}
\date{Last revised: May 12, 1996}
\date{Last revised: June 9, 1996}
\maketitle
%
\noindent
......@@ -78,6 +78,10 @@ an unreasonable effort.
In particular, please don't sent patches for this list to Linus, at
least not without contacting me first.
I do not have any information about these devices beyond what appears
on this list. Any such information requests will be deleted without
reply.
\section{Major numbers}
\begin{devicelist}
......@@ -157,7 +161,7 @@ least not without contacting me first.
\major{39}{}{char }{ML-16P experimental I/O board}
\major{ }{}{block}{Reserved for Linux/AP+}
\major{40}{}{char }{Matrox Meteor frame grabber}
\major{ }{}{block}{Syquest EZ135 removable drive}
\major{ }{}{block}{Syquest EZ135 parallel port removable drive}
\major{41}{}{char }{Yet Another Micro Monitor}
\major{42}{}{}{Demo/sample use}
\major{43}{}{char }{isdn4linux virtual modem}
......@@ -169,7 +173,9 @@ least not without contacting me first.
\major{49}{}{char }{SDL RISCom serial card -- alternate devices}
\major{50}{}{char }{Reserved for GLINT}
\major{51}{}{char }{Baycom radio modem}
\major{52}{--59}{}{Unallocated}
\major{52}{}{char }{Spellcaster DataComm/BRI ISDN card}
\major{53}{}{char }{BDM interface for remote debugging MC683xx microcontrollers}
\major{54}{--59}{}{Unallocated}
\major{60}{--63}{}{Local/experimental use}
\major{64}{--119}{}{Unallocated}
\major{120}{--127}{}{Local/experimental use}
......@@ -972,8 +978,8 @@ networking device.
\major{40}{}{char }{Matrox Meteor frame grabber}
\minor{0}{/dev/mmetfgrab}{Matrox Meteor frame grabber}
\\
\major{ }{}{block}{Syquest EZ135 removable drive}
\minor{0}{/dev/eza}{First EZ135 drive whole disk}
\major{ }{}{block}{Syquest EZ135 parallel port removable drive}
\minor{0}{/dev/eza}{Parallel EZ135 drive whole disk}
\end{devicelist}
\noindent
......@@ -1065,7 +1071,32 @@ driver with this number should not cause ill effects to the system
\end{devicelist}
\begin{devicelist}
\major{52}{--59}{}{Unallocated}
\major{52}{}{char }{Spellcaster DataComm/BRI ISDN card}
\minor{0}{/dev/dcbri0}{First DataComm card}
\minor{1}{/dev/dcbri1}{Second DataComm card}
\minor{2}{/dev/dcbri2}{Third DataComm card}
\minor{3}{/dev/dcbri3}{Fourth DataComm card}
\end{devicelist}
\begin{devicelist}
\major{53}{}{char }{BDM interface for remote debugging MC683xx
microcontrollers}
\minor{0}{/dev/pd\_bdm0}{PD BDM interface on {\file lp0}}
\minor{1}{/dev/pd\_bdm1}{PD BDM interface on {\file lp1}}
\minor{2}{/dev/pd\_bdm2}{PD BDM interface on {\file lp2}}
\minor{4}{/dev/icd\_bdm0}{ICD BDM interface on {\file lp0}}
\minor{5}{/dev/icd\_bdm1}{ICD BDM interface on {\file lp1}}
\minor{6}{/dev/icd\_bdm2}{ICD BDM interface on {\file lp2}}
\end{devicelist}
\noindent
This device is used for the interfacing to the MC683xx
microcontrollers via Background Debug Mode by use of a Parallel Port
interface. PD is the Motorola Public Domain Interface and ICD is the
commercial interface by P\&E.
\begin{devicelist}
\major{54}{--59}{}{Unallocated}
\end{devicelist}
\begin{devicelist}
......@@ -1119,7 +1150,8 @@ These links should exist on all systems:
\end{nodelist}
\noindent
Note: The last device is: letter {\tt X}-digit {\tt 0}-letter {\tt R}.
Note: The last device is: $<$letter {\tt X}$>$-$<$digit {\tt
0}$>$-$<$letter {\tt R}$>$.
\subsection{Recommended links}
......@@ -1128,6 +1160,7 @@ It is recommended that these links exist on all systems:
\begin{nodelist}
\link{/dev/core}{/proc/kcore}{symbolic}{Backward compatibility}
\link{/dev/ramdisk}{ram0}{symbolic}{Backward compatibility}
\link{/dev/ftape}{rft0}{symbolic}{Backward compatibility}
\link{/dev/scd?}{sr?}{hard}{Alternate name for CD-ROMs}
%\link{/dev/fd?H*}{fd?D*}{hard}{Compatible floppy formats}
%\link{/dev/fd?E*}{fd?D*}{hard}{Compatible floppy formats}
......
......@@ -2,7 +2,7 @@
Maintained by H. Peter Anvin <hpa@zytor.com>
Last revised: May 12, 1996
Last revised: June 9, 1996
This list is the successor to Rick Miller's Linux Device List, which
he stopped maintaining when he got busy with other things in 1993. It
......@@ -35,6 +35,10 @@ an unreasonable effort.
In particular, please don't sent patches for this list to Linus, at
least not without contacting me first.
I do not have any information about these devices beyond what appears
on this list. Any such information requests will be deleted without
reply.
0 Unnamed devices (e.g. non-device mounts)
0 = reserved as null device number
......@@ -461,7 +465,14 @@ least not without contacting me first.
3 = /dev/sbpcd7 Panasonic CD-ROM controller 1 unit 3
27 char QIC-117 tape
0 = /dev/ftape QIC-117 tape
0 = /dev/rft0 Unit 0, rewind-on-close
1 = /dev/rft1 Unit 1, rewind-on-close
2 = /dev/rft2 Unit 2, rewind-on-close
3 = /dev/rft3 Unit 3, rewind-on-close
4 = /dev/nrft0 Unit 0, no rewind-on-close
5 = /dev/nrft1 Unit 1, no rewind-on-close
6 = /dev/nrft2 Unit 2, no rewind-on-close
7 = /dev/nrft3 Unit 3, no rewind-on-close
block Third Matsushita (Panasonic/SoundBlaster) CD-ROM
0 = /dev/sbpcd8 Panasonic CD-ROM controller 2 unit 0
1 = /dev/sbpcd9 Panasonic CD-ROM controller 2 unit 1
......@@ -670,8 +681,8 @@ least not without contacting me first.
40 char Matrox Meteor frame grabber
0 = /dev/mmetfgrab Matrox Meteor frame grabber
block Syquest EZ135 removable drive
0 = /dev/eza First EZ135 drive, whole disk
block Syquest EZ135 parallel port removable drive
0 = /dev/eza Parallel EZ135 drive, whole disk
Partitions are handled in the same way as IDE disks
(see major number 3).
......@@ -740,7 +751,27 @@ least not without contacting me first.
1 = /dev/bc1 Second Baycom radio modem
...
52-59 UNALLOCATED
52 char Spellcaster DataComm/BRI ISDN card
0 = /dev/dcbri0 First DataComm card
1 = /dev/dcbri1 Second DataComm card
2 = /dev/dcbri2 Third DataComm card
3 = /dev/dcbri3 Fourth DataComm card
53 char BDM interface for remote debugging MC683xx microcontrollers
0 = /dev/pd_bdm0 PD BDM interface on lp0
1 = /dev/pd_bdm1 PD BDM interface on lp1
2 = /dev/pd_bdm2 PD BDM interface on lp2
4 = /dev/icd_bdm0 ICD BDM interface on lp0
5 = /dev/icd_bdm1 ICD BDM interface on lp1
6 = /dev/icd_bdm2 ICD BDM interface on lp2
This device is used for the interfacing to the MC683xx
microcontrollers via Background Debug Mode by use of a
Parallel Port interface. PD is the Motorola Public
Domain Interface and ICD is the commercial interface
by P&E.
54-59 UNALLOCATED
60-63 LOCAL/EXPERIMENTAL USE
Allocated for local/experimental use. For devices not
......@@ -780,7 +811,7 @@ These links should exist on all systems:
/dev/nfsd socksys symbolic Required by iBCS-2
/dev/X0R null symbolic Required by iBCS-2
Note: the last device is letter X-digit 0-letter R.
Note: the last device is <letter X>-<digit 0>-<letter R>.
Recommended links
......@@ -788,6 +819,7 @@ It is recommended that these links exist on all systems:
/dev/core /proc/kcore symbolic Backward compatibility
/dev/ramdisk ram0 symbolic Backward compatibility
/dev/ftape rft0 symbolic Backward compatibility
/dev/scd? sr? hard Alternate SCSI CD-ROM name
......
Ioctl Numbers
29 May 1996
12 Jun 1996
Michael Chastain
<mec@duracef.shout.net>
......@@ -98,6 +98,7 @@ Code Seq# Include File Comments
't' 80-8F linux/isdn_ppp.h
'u' all linux/smb_fs.h
'v' all linux/ext2_fs.h
'w' all CERN SCI driver (in development)
0x89 00-0F asm-i386/sockios.h
0x89 10-FF linux/sockios.h
0x90 00 linux/sbpcd.h
$Id: INTERFACE,v 1.2 1996/05/18 15:58:53 fritz Exp $
$Id: INTERFACE,v 1.3 1996/06/25 17:52:41 fritz Exp $
Description of the Interface between Linklevel and Hardwarelevel
of isdn4linux:
......@@ -255,7 +255,7 @@ Description of the Interface between Linklevel and Hardwarelevel
This command is intended for performing ioctl-calls for configuring
hardware or similar purposes (setting port-addresses, loading firmware
etc.) For this purpose, in the LL all ioctl-calls with an argument
>= ISDN_IOCTL_DRVIOCTL (0x100) will be handed transparently to this
>= IIOCDRVCTL (0x100) will be handed transparently to this
function after subtracting 0x100 and placing the result in arg.
Example:
If a userlevel-program calls ioctl(0x101,...) the function gets
......@@ -264,7 +264,7 @@ Description of the Interface between Linklevel and Hardwarelevel
Parameter:
driver = driver-Id.
command = ISDN_CMD_IOCTL
arg = Original ioctl-cmd - ISDN_IOCTL_DRVIOCTL
arg = Original ioctl-cmd - IIOCDRVCTL
num = first bytes filled with (unsigned long)arg
Returnvalue:
......
......@@ -43,8 +43,9 @@ options you wish enabled:
4 D channel Q.931 (call control messages)
8 D channel Q.921
16 B channel X.75
32 Lowlevel (irq and Layer1 stuff)
For example 'teles/telesctrl MyTeles 1 31' enables full
For example 'teles/telesctrl MyTeles 1 63' enables full
debugging.
Questions
......
This is the full-colour version of the currenly unofficial Linux logo
This is the full-colour version of the currently unofficial Linux logo
("currently unofficial" just means that there has been no paperwork and
that I haven't really announced it yet). It was created by Larry Ewing,
and is freely usable as long as you acknowledge Larry as the original
......
......@@ -148,7 +148,7 @@ current kernel. (Read more about this in the module utilities package.)
Whenever a program wants the kernel to use a feature that is only
available as a loadable module, and if the kernel hasn't got the
module installed yet, the kernel will ask the kerneld deamon to take
module installed yet, the kernel will ask the kerneld daemon to take
care of the situation and make the best of it.
This is what happens:
......@@ -166,7 +166,7 @@ This is what happens:
has decided that the kernel needs. Every module will be
configured according to the "options" lines in "/etc/conf.modules".
- modprobe exits and kerneld tells the kernel that the request
succeded (or failed...)
succeeded (or failed...)
- The kernel uses the freshly installed feature just as if it
had been configured into the kernel as a "resident" part.
......
VERSION = 2
PATCHLEVEL = 0
SUBLEVEL = 0
SUBLEVEL = 1
ARCH = i386
......
......@@ -76,14 +76,14 @@ INSTALLING the kernel:
the current directory, but an alternative directory can be specified
as the second argument.
- make sure your /usr/include/linux and /usr/include/asm directories
are just symlinks to the kernel sources:
- make sure your /usr/include/asm, /usr/include/linux, and /usr/include/scsi
directories are just symlinks to the kernel sources:
cd /usr/include
rm -rf linux
rm -rf asm
ln -s /usr/src/linux/include/linux linux
rm -rf asm linux scsi
ln -s /usr/src/linux/include/asm-i386 asm
ln -s /usr/src/linux/include/linux linux
ln -s /usr/src/linux/include/scsi scsi
- make sure you have no stale .o files and dependencies lying around:
......@@ -139,6 +139,9 @@ COMPILING the kernel:
"make zlilo" if you have lilo installed to suit the kernel makefiles,
but you may want to check your particular lilo setup first.
- if your kernel is too large for "make zImage", use "make bzImage"
instead.
- if you configured any of the parts of the kernel as `modules', you
will have to do "make modules" followed by "make modules_install".
Read Documentation/modules.txt for more information. For example,
......
......@@ -24,18 +24,19 @@ CONFIG_NATIVE=y
# CONFIG_ALPHA_EB66 is not set
# CONFIG_ALPHA_EB66P is not set
# CONFIG_ALPHA_EB64P is not set
CONFIG_ALPHA_EB164=y
# CONFIG_ALPHA_EB164 is not set
# CONFIG_ALPHA_PC164 is not set
# CONFIG_ALPHA_JENSEN is not set
# CONFIG_ALPHA_NONAME is not set
# CONFIG_ALPHA_MIKASA is not set
# CONFIG_ALPHA_ALCOR is not set
CONFIG_ALPHA_ALCOR=y
# CONFIG_ALPHA_P2K is not set
CONFIG_PCI=y
CONFIG_ALPHA_EV5=y
CONFIG_ALPHA_CIA=y
CONFIG_ALPHA_SRM=y
# CONFIG_SERIAL_ECHO is not set
# CONFIG_TGA_CONSOLE is not set
CONFIG_TGA_CONSOLE=y
CONFIG_NET=y
CONFIG_SYSVIPC=y
CONFIG_BINFMT_AOUT=y
......@@ -126,13 +127,11 @@ CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_NCR53C406A is not set
CONFIG_SCSI_NCR53C7xx=y
CONFIG_SCSI_NCR53C7xx_sync=y
CONFIG_SCSI_NCR53C7xx_FAST=y
# CONFIG_SCSI_NCR53C7xx_DISCONNECT is not set
# CONFIG_SCSI_NCR53C7xx is not set
# CONFIG_SCSI_PPA is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
CONFIG_SCSI_QLOGIC_ISP=y
# CONFIG_SCSI_SEAGATE is not set
# CONFIG_SCSI_T128 is not set
# CONFIG_SCSI_U14_34F is not set
......
......@@ -10,7 +10,7 @@
#define __ASSEMBLY__
#include <asm/system.h>
#define halt .long PAL_halt
#define halt call_pal PAL_halt
.globl swapper_pg_dir
.globl _stext
......@@ -32,7 +32,7 @@ __start:
.globl wrent
.ent wrent
wrent:
.long PAL_wrent
call_pal PAL_wrent
ret ($26)
.end wrent
......@@ -40,7 +40,7 @@ wrent:
.globl wrkgp
.ent wrkgp
wrkgp:
.long PAL_wrkgp
call_pal PAL_wrkgp
ret ($26)
.end wrkgp
......@@ -48,7 +48,7 @@ wrkgp:
.globl wrusp
.ent wrusp
wrusp:
.long PAL_wrusp
call_pal PAL_wrusp
ret ($26)
.end wrusp
......@@ -56,7 +56,7 @@ wrusp:
.globl rdusp
.ent rdusp
rdusp:
.long PAL_rdusp
call_pal PAL_rdusp
ret ($26)
.end rdusp
......@@ -64,7 +64,7 @@ rdusp:
.globl tbi
.ent tbi
tbi:
.long PAL_tbi
call_pal PAL_tbi
ret ($26)
.end tbi
......@@ -72,7 +72,7 @@ tbi:
.globl imb
.ent imb
imb:
.long PAL_imb
call_pal PAL_imb
ret ($26)
.end imb
......
......@@ -28,109 +28,83 @@
extern void timer_interrupt(struct pt_regs * regs);
static unsigned char cache_21 = 0xff;
static unsigned char cache_A1 = 0xff;
#if NR_IRQS == 48
static unsigned int cache_irq_mask = 0x7fffffff; /* enable EISA */
#elif NR_IRQS == 33
static unsigned int cache_804 = 0x00ffffef;
#elif NR_IRQS == 32
#ifdef CONFIG_ALPHA_MIKASA
static unsigned short cache_536 = 0xffff;
#else
static unsigned char cache_26 = 0xdf;
static unsigned char cache_27 = 0xff;
#endif
#if NR_IRQS > 64
# error Unable to handle more than 64 irq levels.
#endif
static void mask_irq(int irq)
{
unsigned long mask;
/*
* Shadow-copy of masked interrupts.
* The bits are used as follows:
* 0.. 7 first ISA PIC (irq level 0..7)
* 8..15 second ISA PIC (irq level 8..15)
* Systems with 32 PCI interrupt lines (e.g., Alcor):
* 16..47 PCI interrupts 0..31 (int at GRU_INT_MASK)
* Mikasa:
* 16..31 PCI interrupts 0..15 (short at I/O port 536)
* Other systems (not Mikasa) with 16 PCI interrupt lines:
* 16..23 PCI interrupts 0.. 7 (char at I/O port 26)
* 24..31 PCI interrupts 8..15 (char at I/O port 27)
* Systems with 17 PCI interrupt lines (e.g., Cabriolet and eb164):
* 16..32 PCI interrupts 0..31 (int at I/O port 804)
*/
static unsigned long irq_mask = ~0UL;
if (irq < 16) {
mask = 1 << (irq & 7);
if (irq < 8) {
cache_21 |= mask;
outb(cache_21, 0x21);
} else {
cache_A1 |= mask;
outb(cache_A1, 0xA1);
}
/*
* Update the hardware with the irq mask passed in MASK. The function
* exploits the fact that it is known that only bit IRQ has changed.
*/
static void update_hw(unsigned long irq, unsigned long mask)
{
switch (irq) {
#if NR_IRQS == 48
} else {
mask = 1 << (irq - 16);
cache_irq_mask |= mask;
*(unsigned int *)GRU_INT_MASK = ~cache_irq_mask; /* invert */
default:
/* note inverted sense of mask bits: */
*(unsigned int *)GRU_INT_MASK = ~(mask >> 16);
mb();
break;
#elif NR_IRQS == 33
} else {
mask = 1 << (irq - 16);
cache_804 |= mask;
outl(cache_804, 0x804);
default:
outl(mask >> 16, 0x804);
break;
#elif defined(CONFIG_ALPHA_MIKASA)
default:
outw(~(mask >> 16), 0x536); /* note invert */
break;
#elif NR_IRQS == 32
#ifdef CONFIG_ALPHA_MIKASA
} else {
mask = 1 << (irq & 15);
cache_536 |= mask;
outw(~cache_536, 0x536); /* note invert */
#else
} else {
mask = 1 << (irq & 7);
if (irq < 24) {
cache_26 |= mask;
outb(cache_26, 0x26);
} else {
cache_27 |= mask;
outb(cache_27, 0x27);
}
#endif
case 16 ... 23:
outb(mask >> 16, 0x26);
break;
default:
outb(mask >> 24, 0x27);
break;
#endif
/* handle ISA irqs last---fast devices belong on PCI... */
case 0 ... 7: /* ISA PIC1 */
outb(mask, 0x21);
break;
case 8 ...15: /* ISA PIC2 */
outb(mask >> 8, 0xA1);
break;
}
}
static void unmask_irq(unsigned long irq)
static inline void mask_irq(unsigned long irq)
{
unsigned long mask;
if (irq < 16) {
mask = ~(1 << (irq & 7));
if (irq < 8) {
cache_21 &= mask;
outb(cache_21, 0x21);
} else {
cache_A1 &= mask;
outb(cache_A1, 0xA1);
}
#if NR_IRQS == 48
} else {
mask = ~(1 << (irq - 16));
cache_irq_mask &= mask;
*(unsigned int *)GRU_INT_MASK = ~cache_irq_mask; /* invert */
#elif NR_IRQS == 33
} else {
mask = ~(1 << (irq - 16));
cache_804 &= mask;
outl(cache_804, 0x804);
#elif NR_IRQS == 32
#ifdef CONFIG_ALPHA_MIKASA
} else {
mask = ~(1 << (irq & 15));
cache_536 &= mask;
outw(~cache_536, 0x536); /* note invert */
#else
} else {
mask = ~(1 << (irq & 7));
irq_mask |= (1UL << irq);
update_hw(irq, irq_mask);
}
if (irq < 24) {
cache_26 &= mask;
outb(cache_26, 0x26);
} else {
cache_27 &= mask;
outb(cache_27, 0x27);
}
#endif
#endif
}
static inline void unmask_irq(unsigned long irq)
{
irq_mask &= ~(1UL << irq);
update_hw(irq, irq_mask);
}
void disable_irq(unsigned int irq_nr)
......@@ -193,13 +167,16 @@ static inline void ack_irq(int irq)
/* .. then the master */
outb(0xE0 | irq, 0x20);
}
#if 0
/* This is not needed since all interrupt are level-sensitive */
#if defined(CONFIG_ALPHA_ALCOR)
/* on ALCOR, need to dismiss interrupt via GRU */
*(int *)GRU_INT_CLEAR = 0x80000000;
*(int *)GRU_INT_CLEAR = 0x80000000;
mb();
*(int *)GRU_INT_CLEAR = 0x00000000;
mb();
#endif /* CONFIG_ALPHA_ALCOR */
#endif
}
int request_irq(unsigned int irq,
......@@ -344,17 +321,6 @@ static inline void device_interrupt(int irq, int ack, struct pt_regs * regs)
kstat.interrupts[irq]++;
action = irq_action[irq];
if (action) {
/* quick interrupts get executed with no extra overhead */
if (action->flags & SA_INTERRUPT) {
while (action) {
action->handler(irq, action->dev_id, regs);
action = action->next;
}
ack_irq(ack);
return;
}
}
/*
* For normal interrupts, we mask it out, and then ACK it.
* This way another (more timing-critical) interrupt can
......@@ -370,10 +336,10 @@ static inline void device_interrupt(int irq, int ack, struct pt_regs * regs)
return;
if (action->flags & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
while (action) {
do {
action->handler(irq, action->dev_id, regs);
action = action->next;
}
} while (action);
unmask_irq(ack);
}
......@@ -436,8 +402,8 @@ static inline void isa_device_interrupt(unsigned long vector,
* write only. This is not true.
*/
pic = inb(0x20) | (inb(0xA0) << 8); /* read isr */
pic &= ~((cache_A1 << 8) | cache_21); /* apply mask */
pic &= 0xFFFB; /* mask out cascade */
pic &= ~irq_mask; /* apply mask */
pic &= 0xFFFB; /* mask out cascade & hibits */
while (pic) {
j = ffz(~pic);
......@@ -568,17 +534,13 @@ static inline void srm_device_interrupt(unsigned long vector, struct pt_regs * r
restore_flags(flags) ;
}
#if NR_IRQS > 64
# error Number of irqs limited to 64 due to interrupt-probing.
#endif
/*
* Start listening for interrupts..
*/
unsigned long probe_irq_on(void)
{
struct irqaction * action;
unsigned long irqs = 0, irqmask;
unsigned long irqs = 0;
unsigned long delay;
unsigned int i;
......@@ -589,27 +551,15 @@ unsigned long probe_irq_on(void)
irqs |= (1 << i);
}
}
/* wait for spurious interrupts to mask themselves out again */
/*
* Wait about 100ms for spurious interrupts to mask themselves
* out again...
*/
for (delay = jiffies + HZ/10; delay > jiffies; )
/* about 100 ms delay */;
barrier();
/* now filter out any obviously spurious interrupts */
irqmask = (((unsigned long)cache_A1)<<8) | (unsigned long) cache_21;
#if NR_IRQS == 48
irqmask |= (unsigned long) cache_irq_mask << 16;
#elif NR_IRQS == 33
irqmask |= (unsigned long) cache_804 << 16;
#elif NR_IRQS == 32
#ifdef CONFIG_ALPHA_MIKASA
irqmask |= (unsigned long) cache_536 << 16;
#else
irqmask |= ((((unsigned long)cache_26)<<16) |
(((unsigned long)cache_27)<<24));
#endif
#endif
irqs &= ~irqmask;
return irqs;
return irqs & ~irq_mask;
}
/*
......@@ -619,23 +569,9 @@ unsigned long probe_irq_on(void)
*/
int probe_irq_off(unsigned long irqs)
{
unsigned long irqmask;
int i;
irqmask = (((unsigned int)cache_A1)<<8) | (unsigned int)cache_21;
#if NR_IRQS == 48
irqmask |= (unsigned long) cache_irq_mask << 16;
#elif NR_IRQS == 33
irqmask |= (unsigned long) cache_804 << 16;
#elif NR_IRQS == 32
#ifdef CONFIG_ALPHA_MIKASA
irqmask |= (unsigned long) cache_536 << 16;
#else
irqmask |= ((((unsigned long)cache_26)<<16) |
(((unsigned long)cache_27)<<24));
#endif
#endif
irqs &= irqmask & ~1; /* always mask out irq 0---it's the unused timer */
irqs &= irq_mask & ~1; /* always mask out irq 0---it's the unused timer */
#ifdef CONFIG_ALPHA_P2K
irqs &= ~(1 << 8); /* mask out irq 8 since that's the unused RTC input to PIC */
#endif
......@@ -687,11 +623,11 @@ asmlinkage void do_entInt(unsigned long type, unsigned long vector, unsigned lon
#elif NR_IRQS == 33
cabriolet_and_eb66p_device_interrupt(vector, &regs);
#elif NR_IRQS == 32
#ifdef CONFIG_ALPHA_MIKASA
# ifdef CONFIG_ALPHA_MIKASA
# error we got a problem here Charlie MIKASA should be SRM console
#else
# else
eb66_and_eb64p_device_interrupt(vector, &regs);
#endif
# endif
#elif NR_IRQS == 16
isa_device_interrupt(vector, &regs);
#endif
......@@ -715,16 +651,18 @@ void init_IRQ(void)
dma_outb(0, DMA1_CLR_MASK_REG);
dma_outb(0, DMA2_CLR_MASK_REG);
#if NR_IRQS == 48
*(unsigned int *)GRU_INT_MASK = ~cache_irq_mask; /* invert */
*(unsigned int *)GRU_INT_MASK = ~(irq_mask >> 16); /* invert */
mb();
enable_irq(16 + 31); /* enable EISA PIC cascade */
#elif NR_IRQS == 33
outl(cache_804, 0x804);
outl(irq_mask >> 16, 0x804);
enable_irq(16 + 4); /* enable SIO cascade */
#elif defined(CONFIG_ALPHA_MIKASA)
outw(~(irq_mask >> 16), 0x536); /* note invert */
#elif NR_IRQS == 32
#ifdef CONFIG_ALPHA_MIKASA
outw(~cache_536, 0x536); /* note invert */
#else
outb(cache_26, 0x26);
outb(cache_27, 0x27);
#endif
outb(irq_mask >> 16, 0x26);
outb(irq_mask >> 24, 0x27);
enable_irq(16 + 5); /* enable SIO cascade */
#endif
enable_irq(2); /* enable cascade */
}
......@@ -125,14 +125,22 @@ asmlinkage int osf_getdirentries(unsigned int fd, struct osf_dirent * dirent,
return count - buf.count;
}
asmlinkage int osf_getpriority(int which, int who)
/*
* Alpha syscall convention has no problem returning negative
* values:
*/
asmlinkage int osf_getpriority(int which, int who, int a2, int a3, int a4,
int a5, struct pt_regs regs)
{
extern int sys_getpriority(int, int);
/*
* Alpha syscall convention has no problem returning negative
* values:
*/
return 20 - sys_getpriority(which, who);
int prio;
prio = sys_getpriority(which, who);
if (prio < 0)
return prio;
regs.r0 = 0; /* special return: no errors */
return 20 - prio;
}
......@@ -177,6 +185,7 @@ asmlinkage unsigned long osf_mmap(unsigned long addr, unsigned long len,
if (fd >= NR_OPEN || !(file = current->files->fd[fd]))
return -EBADF;
}
flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
return do_mmap(file, addr, len, prot, flags, off);
}
......
......@@ -8,6 +8,7 @@
* This file handles the architecture-dependent parts of process handling..
*/
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
......@@ -52,6 +53,11 @@ asmlinkage int sys_idle(void)
void hard_reset_now(void)
{
#if defined(CONFIG_ALPHA_SRM) && defined(CONFIG_ALPHA_ALCOR)
/* who said DEC engineer's have no sense of humor? ;-)) */
*(int *) GRU_RESET = 0x0000dead;
mb();
#endif
halt();
}
......
......@@ -130,24 +130,28 @@ asmlinkage void do_sigreturn(struct sigcontext_struct * sc,
/*
* Set up a signal frame...
*/
static void setup_frame(struct sigaction * sa, struct sigcontext_struct ** fp,
unsigned long pc, struct pt_regs * regs,
static void setup_frame(struct sigaction * sa,
struct pt_regs * regs,
struct switch_stack * sw, int signr,
unsigned long oldmask)
{
int i;
unsigned long oldsp;
struct sigcontext_struct * sc;
sc = *fp;
oldsp = rdusp();
sc = ((struct sigcontext_struct *) oldsp) - 1;
/* check here if we would need to switch stacks.. */
sc--;
if (verify_area(VERIFY_WRITE, sc, sizeof(*sc)))
do_exit(SIGSEGV);
wrusp((unsigned long) sc);
put_fs_quad(oldmask, &sc->sc_mask);
put_fs_quad(8, &sc->sc_ps);
put_fs_quad(pc, &sc->sc_pc);
put_fs_quad((unsigned long)*fp, sc->sc_regs+30);
put_fs_quad(regs->pc, &sc->sc_pc);
put_fs_quad(oldsp, sc->sc_regs+30);
put_fs_quad(regs->r0 , sc->sc_regs+0);
put_fs_quad(regs->r1 , sc->sc_regs+1);
......@@ -193,13 +197,50 @@ static void setup_frame(struct sigaction * sa, struct sigcontext_struct ** fp,
*/
put_fs_quad(0x43ecf40047de0410, sc->sc_retcode+0);
put_fs_quad(0x0000000000000083, sc->sc_retcode+1);
imb();
/* "return" to the handler */
regs->r27 = regs->pc = (unsigned long) sa->sa_handler;
regs->r26 = (unsigned long) sc->sc_retcode;
regs->r16 = signr; /* a0: signal number */
regs->r17 = 0; /* a1: exception code; see gentrap.h */
regs->r18 = (unsigned long) sc; /* a2: sigcontext pointer */
*fp = sc;
}
/*
* OK, we're invoking a handler
*/
static inline void handle_signal(unsigned long signr, struct sigaction *sa,
unsigned long oldmask, struct pt_regs * regs, struct switch_stack *sw)
{
setup_frame(sa,regs,sw,signr,oldmask);
if (sa->sa_flags & SA_ONESHOT)
sa->sa_handler = NULL;
if (!(sa->sa_flags & SA_NOMASK))
current->blocked |= (sa->sa_mask | _S(signr)) & _BLOCKABLE;
}
static inline void syscall_restart(unsigned long r0, unsigned long r19,
struct pt_regs * regs, struct sigaction * sa)
{
switch (regs->r0) {
case ERESTARTNOHAND:
no_system_call_restart:
regs->r0 = EINTR;
break;
case ERESTARTSYS:
if (!(sa->sa_flags & SA_RESTART))
goto no_system_call_restart;
/* fallthrough */
case ERESTARTNOINTR:
regs->r0 = r0; /* reset v0 and a3 and replay syscall */
regs->r19 = r19;
regs->pc -= 4;
}
}
/*
* 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
......@@ -219,9 +260,6 @@ asmlinkage int do_signal(unsigned long oldmask,
unsigned long r0, unsigned long r19)
{
unsigned long mask = ~current->blocked;
unsigned long handler_signal = 0;
struct sigcontext_struct *frame = NULL;
unsigned long pc = 0;
unsigned long signr, single_stepping;
struct sigaction * sa;
......@@ -264,7 +302,10 @@ asmlinkage int do_signal(unsigned long oldmask,
case SIGCONT: case SIGCHLD: case SIGWINCH:
continue;
case SIGSTOP: case SIGTSTP: case SIGTTIN: case SIGTTOU:
case SIGTSTP: case SIGTTIN: case SIGTTOU:
if (is_orphaned_pgrp(current->pgrp))
continue;
case SIGSTOP:
if (current->flags & PF_PTRACED)
continue;
current->state = TASK_STOPPED;
......@@ -289,16 +330,13 @@ asmlinkage int do_signal(unsigned long oldmask,
do_exit(signr);
}
}
/*
* OK, we're invoking a handler
*/
if (r0) {
if (regs->r0 == ERESTARTNOHAND ||
(regs->r0 == ERESTARTSYS && !(sa->sa_flags & SA_RESTART)))
regs->r0 = EINTR;
if (r0)
syscall_restart(r0, r19, regs, sa);
handle_signal(signr, sa, oldmask, regs, sw);
if (single_stepping) {
ptrace_set_bpt(current); /* re-set breakpoint */
}
handler_signal |= 1 << (signr-1);
mask &= ~sa->sa_mask;
return 1;
}
if (r0 &&
(regs->r0 == ERESTARTNOHAND ||
......@@ -308,34 +346,8 @@ asmlinkage int do_signal(unsigned long oldmask,
regs->r19 = r19;
regs->pc -= 4;
}
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;
sa = current->sig->action;
for (mask = 1 ; mask ; sa++,signr++,mask += mask) {
if (mask > handler_signal)
break;
if (!(mask & handler_signal))
continue;
setup_frame(sa,&frame,pc,regs,sw,signr,oldmask);
pc = (unsigned long) sa->sa_handler;
regs->r27 = pc;
if (sa->sa_flags & SA_ONESHOT)
sa->sa_handler = NULL;
current->blocked |= sa->sa_mask;
oldmask |= sa->sa_mask;
}
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;
return 0;
}
......@@ -14,6 +14,7 @@ static struct symbol_table arch_symbol_table = {
#ifdef __SMP__
X(apic_reg), /* Needed internally for the I386 inlines */
X(cpu_data),
X(syscall_count),
#endif
#include <linux/symtab_end.h>
};
......
......@@ -248,7 +248,8 @@ static void handle_signal(unsigned long signr, struct sigaction *sa,
if (sa->sa_flags & SA_ONESHOT)
sa->sa_handler = NULL;
current->blocked |= sa->sa_mask;
if (!(sa->sa_flags & SA_NOMASK))
current->blocked |= (sa->sa_mask | _S(signr)) & _BLOCKABLE;
}
/*
......@@ -310,7 +311,10 @@ asmlinkage int do_signal(unsigned long oldmask, struct pt_regs * regs)
case SIGCONT: case SIGCHLD: case SIGWINCH:
continue;
case SIGSTOP: case SIGTSTP: case SIGTTIN: case SIGTTOU:
case SIGTSTP: case SIGTTIN: case SIGTTOU:
if (is_orphaned_pgrp(current->pgrp))
continue;
case SIGSTOP:
if (current->flags & PF_PTRACED)
continue;
current->state = TASK_STOPPED;
......
Tools that manage md devices can be found at sweet-smoke.ufr-info-p7.ibp.fr
in public/Linux/md034.tar.gz.
in public/Linux/md035.tar.gz.
Marc ZYNGIER <zyngier@ufr-info-p7.ibp.fr>
......@@ -1794,7 +1794,7 @@ static int ide_open(struct inode * inode, struct file * filp)
unsigned long flags;
if ((drive = get_info_ptr(inode->i_rdev)) == NULL)
return -ENODEV;
return -ENXIO;
save_flags(flags);
cli();
while (drive->busy)
......
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