Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
f8f29af2
Commit
f8f29af2
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 1.3.29
parent
175e8c6e
Changes
48
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
501 additions
and
340 deletions
+501
-340
Documentation/devices.tex
Documentation/devices.tex
+53
-17
Documentation/devices.txt
Documentation/devices.txt
+24
-3
Documentation/modules.txt
Documentation/modules.txt
+3
-1
Documentation/scsi.txt
Documentation/scsi.txt
+30
-0
Makefile
Makefile
+1
-1
Rules.make
Rules.make
+4
-3
arch/alpha/Makefile
arch/alpha/Makefile
+2
-2
arch/alpha/boot/Makefile
arch/alpha/boot/Makefile
+5
-5
arch/alpha/config.in
arch/alpha/config.in
+8
-8
arch/alpha/kernel/traps.c
arch/alpha/kernel/traps.c
+1
-3
arch/alpha/mm/init.c
arch/alpha/mm/init.c
+10
-10
arch/i386/config.in
arch/i386/config.in
+1
-1
arch/i386/kernel/setup.c
arch/i386/kernel/setup.c
+1
-0
arch/i386/mm/init.c
arch/i386/mm/init.c
+10
-10
drivers/block/genhd.c
drivers/block/genhd.c
+9
-2
drivers/net/slip.c
drivers/net/slip.c
+6
-7
drivers/pci/pci.c
drivers/pci/pci.c
+4
-0
drivers/scsi/53c7,8xx.c
drivers/scsi/53c7,8xx.c
+2
-1
drivers/scsi/Makefile
drivers/scsi/Makefile
+6
-1
drivers/scsi/eata_dma.c
drivers/scsi/eata_dma.c
+21
-14
drivers/scsi/eata_dma.h
drivers/scsi/eata_dma.h
+3
-1
drivers/scsi/eata_dma_proc.c
drivers/scsi/eata_dma_proc.c
+1
-1
drivers/scsi/eata_pio.c
drivers/scsi/eata_pio.c
+4
-3
drivers/scsi/hosts.c
drivers/scsi/hosts.c
+1
-1
drivers/scsi/qlogic.c
drivers/scsi/qlogic.c
+1
-1
drivers/scsi/scsi.h
drivers/scsi/scsi.h
+24
-24
drivers/scsi/st.c
drivers/scsi/st.c
+145
-107
drivers/scsi/st.h
drivers/scsi/st.h
+1
-1
drivers/scsi/st_options.h
drivers/scsi/st_options.h
+8
-9
drivers/sound/soundcard.c
drivers/sound/soundcard.c
+2
-2
fs/binfmt_elf.c
fs/binfmt_elf.c
+1
-1
fs/buffer.c
fs/buffer.c
+9
-9
fs/proc/array.c
fs/proc/array.c
+1
-1
fs/proc/link.c
fs/proc/link.c
+1
-1
fs/proc/mem.c
fs/proc/mem.c
+1
-1
fs/proc/root.c
fs/proc/root.c
+12
-5
include/asm-alpha/page.h
include/asm-alpha/page.h
+6
-2
include/asm-alpha/pgtable.h
include/asm-alpha/pgtable.h
+11
-16
include/asm-i386/page.h
include/asm-i386/page.h
+5
-2
include/asm-i386/pgtable.h
include/asm-i386/pgtable.h
+6
-11
include/linux/kdev_t.h
include/linux/kdev_t.h
+3
-3
include/linux/pci.h
include/linux/pci.h
+11
-2
include/linux/proc_fs.h
include/linux/proc_fs.h
+0
-1
ipc/shm.c
ipc/shm.c
+3
-3
kernel/ksyms.c
kernel/ksyms.c
+1
-10
mm/filemap.c
mm/filemap.c
+2
-2
mm/memory.c
mm/memory.c
+11
-11
mm/swap.c
mm/swap.c
+26
-20
No files found.
Documentation/devices.tex
View file @
f8f29af2
...
@@ -42,7 +42,7 @@ foo \kill}%
...
@@ -42,7 +42,7 @@ foo \kill}%
%
%
\title
{{
\bf
Linux Allocated Devices
}}
\title
{{
\bf
Linux Allocated Devices
}}
\author
{
Maintained by H. Peter Anvin
$
<
$
Peter.Anvin@linux.org
$
>
$}
\author
{
Maintained by H. Peter Anvin
$
<
$
Peter.Anvin@linux.org
$
>
$}
\date
{
Last revised: September
6
, 1995
}
\date
{
Last revised: September
20
, 1995
}
\maketitle
\maketitle
%
%
\noindent
\noindent
...
@@ -138,8 +138,10 @@ an unreasonable effort.
...
@@ -138,8 +138,10 @@ an unreasonable effort.
\major
{
}{}{
block
}{
Third IDE hard disk/CD-ROM interface
}
\major
{
}{}{
block
}{
Third IDE hard disk/CD-ROM interface
}
\major
{
34
}{}{
char
}{
Z8530 HDLC driver
}
\major
{
34
}{}{
char
}{
Z8530 HDLC driver
}
\major
{
}{}{
block
}{
Fourth IDE hard disk/CD-ROM interface
}
\major
{
}{}{
block
}{
Fourth IDE hard disk/CD-ROM interface
}
\major
{
35
}{}{
block
}{
Modular RAM disk
}
\major
{
35
}{}{
char
}{
tclmidi MIDI driver
}
\major
{
36--223
}{}{}{
Unallocated
}
\major
{
}{}{
block
}{
Modular RAM disk
}
\major
{
36
}{}{
block
}{
MCA ESDI hard disk
}
\major
{
37--223
}{}{}{
Unallocated
}
\major
{
224--254
}{}{}{
Local use
}
\major
{
224--254
}{}{}{
Local use
}
\major
{
255
}{}{}{
Reserved
}
\major
{
255
}{}{}{
Reserved
}
\end{devicelist}
\end{devicelist}
...
@@ -318,9 +320,9 @@ NOTE: These devices permit both read and write access.
...
@@ -318,9 +320,9 @@ NOTE: These devices permit both read and write access.
\end{devicelist}
\end{devicelist}
\noindent
\noindent
Partitions are handled in the same way as for IDE
Partitions are handled in the same way as for IDE
disks (see major
disks (see major number 3) except that the limit on
number 3) except that the limit on logical partitions is 11 rather
logical partitions is 11 rather
than 59 per disk.
than 59 per disk.
\begin{devicelist}
\begin{devicelist}
\major
{
9
}{}{
char
}{
SCSI tape devices
}
\major
{
9
}{}{
char
}{
SCSI tape devices
}
...
@@ -401,8 +403,8 @@ names for these devices, please let me know.
...
@@ -401,8 +403,8 @@ names for these devices, please let me know.
\end{devicelist}
\end{devicelist}
\noindent
\noindent
Partitions are handled in the same way as
IDE disks
Partitions are handled in the same way as
for IDE disks (see major
(see major
number 3).
number 3).
\begin{devicelist}
\begin{devicelist}
\major
{
14
}{}{
char
}{
Sound card
}
\major
{
14
}{}{
char
}{
Sound card
}
...
@@ -430,8 +432,8 @@ Partitions are handled in the same way as IDE disks
...
@@ -430,8 +432,8 @@ Partitions are handled in the same way as IDE disks
\end{devicelist}
\end{devicelist}
\noindent
\noindent
Partitions are handled in the same way as
IDE disks
Partitions are handled in the same way as
for IDE disks (see major
(see major
number 3).
number 3).
\begin{devicelist}
\begin{devicelist}
\major
{
15
}{}{
char
}{
Joystick
}
\major
{
15
}{}{
char
}{
Joystick
}
...
@@ -517,8 +519,8 @@ See the Double documentation for an explanation of the ``mirror'' devices.
...
@@ -517,8 +519,8 @@ See the Double documentation for an explanation of the ``mirror'' devices.
\end{devicelist}
\end{devicelist}
\noindent
\noindent
Partitions are handled the same way as for the first
Partitions are handled the same way as for the first
interface (see
interface (see
major number 3).
major number 3).
\begin{devicelist}
\begin{devicelist}
\major
{
23
}{}{
char
}{
Digiboard serial card -- alternate devices
}
\major
{
23
}{}{
char
}{
Digiboard serial card -- alternate devices
}
...
@@ -621,9 +623,9 @@ interface (see major number 3).
...
@@ -621,9 +623,9 @@ interface (see major number 3).
\end{devicelist}
\end{devicelist}
\noindent
\noindent
Partitions are handled in the same way as for IDE
Partitions are handled in the same way as for IDE
disks (see major
disks (see major number 3) except that the limit on
number 3) except that the limit on logical partitions is 11 rather
logical partitions is 11 rather
than 59 per disk.
than 59 per disk.
\begin{devicelist}
\begin{devicelist}
\major
{
29
}{}{
char
}{
Universal frame buffer
}
\major
{
29
}{}{
char
}{
Universal frame buffer
}
...
@@ -702,6 +704,7 @@ support reading only.
...
@@ -702,6 +704,7 @@ support reading only.
\minor
{
0
}{
/dev/ttyX0
}{
First Specialix port
}
\minor
{
0
}{
/dev/ttyX0
}{
First Specialix port
}
\minor
{
1
}{
/dev/ttyX1
}{
Second Specialix port
}
\minor
{
1
}{
/dev/ttyX1
}{
Second Specialix port
}
\minordots
\minordots
\\
\major
{
}{}{
block
}{
Philips LMS CM-206 CD-ROM
}
\major
{
}{}{
block
}{
Philips LMS CM-206 CD-ROM
}
\minor
{
0
}{
/dev/cm206cd
}{
Philips LMS CM-206 CD-ROM
}
\minor
{
0
}{
/dev/cm206cd
}{
Philips LMS CM-206 CD-ROM
}
\end{devicelist}
\end{devicelist}
...
@@ -711,6 +714,7 @@ support reading only.
...
@@ -711,6 +714,7 @@ support reading only.
\minor
{
0
}{
/dev/cux0
}{
Callout device corresponding to
{
\file
ttyX0
}}
\minor
{
0
}{
/dev/cux0
}{
Callout device corresponding to
{
\file
ttyX0
}}
\minor
{
1
}{
/dev/cux1
}{
Callout device corresponding to
{
\file
ttyX1
}}
\minor
{
1
}{
/dev/cux1
}{
Callout device corresponding to
{
\file
ttyX1
}}
\minordots
\minordots
\\
\major
{
}{}{
block
}{
Third IDE hard disk/CD-ROM interface
}
\major
{
}{}{
block
}{
Third IDE hard disk/CD-ROM interface
}
\minor
{
0
}{
/dev/hde
}{
Master: whole disk (or CD-ROM)
}
\minor
{
0
}{
/dev/hde
}{
Master: whole disk (or CD-ROM)
}
\minor
{
64
}{
/dev/hdf
}{
Slave: whole disk (or CD-ROM)
}
\minor
{
64
}{
/dev/hdf
}{
Slave: whole disk (or CD-ROM)
}
...
@@ -727,6 +731,13 @@ major number 3).
...
@@ -727,6 +731,13 @@ major number 3).
\minor
{
2
}{
/dev/sc3
}{
Second Z8530, first port
}
\minor
{
2
}{
/dev/sc3
}{
Second Z8530, first port
}
\minor
{
3
}{
/dev/sc4
}{
Second Z8530, second port
}
\minor
{
3
}{
/dev/sc4
}{
Second Z8530, second port
}
\minordots
\minordots
\end{devicelist}
\noindent
The author has indicated that the device names will change in a
subsequent version;
{
\file
/dev/sc1
}
will become
{
\file
/dev/scc0
}
etc.
\begin{devicelist}
\major
{
}{}{
block
}{
Fourth IDE hard disk/CD-ROM interface
}
\major
{
}{}{
block
}{
Fourth IDE hard disk/CD-ROM interface
}
\minor
{
0
}{
/dev/hdg
}{
Master: whole disk (or CD-ROM)
}
\minor
{
0
}{
/dev/hdg
}{
Master: whole disk (or CD-ROM)
}
\minor
{
64
}{
/dev/hdh
}{
Slave: whole disk (or CD-ROM)
}
\minor
{
64
}{
/dev/hdh
}{
Slave: whole disk (or CD-ROM)
}
...
@@ -737,7 +748,21 @@ Partitions are handled the same way as for the first interface (see
...
@@ -737,7 +748,21 @@ Partitions are handled the same way as for the first interface (see
major number 3).
major number 3).
\begin{devicelist}
\begin{devicelist}
\major
{
35
}{}{
block
}{
Modular RAM disk
}
\major
{
35
}{}{
char
}{
tclmidi MIDI driver
}
\minor
{
0
}{
/dev/midi0
}{
First MIDI port, kernel timed
}
\minor
{
1
}{
/dev/midi1
}{
Second MIDI port, kernel timed
}
\minor
{
2
}{
/dev/midi2
}{
Third MIDI port, kernel timed
}
\minor
{
3
}{
/dev/midi3
}{
Fourth MIDI port, kernel timed
}
\minor
{
64
}{
/dev/rmidi0
}{
First MIDI port, untimed
}
\minor
{
65
}{
/dev/rmidi1
}{
Second MIDI port, untimed
}
\minor
{
66
}{
/dev/rmidi2
}{
Third MIDI port, untimed
}
\minor
{
67
}{
/dev/rmidi3
}{
Fourth MIDI port, untimed
}
\minor
{
128
}{
/dev/smpte0
}{
First MIDI port, SMPTE timed
}
\minor
{
129
}{
/dev/smpte1
}{
Second MIDI port, SMPTE timed
}
\minor
{
130
}{
/dev/smpte2
}{
Third MIDI port, SMPTE timed
}
\minor
{
131
}{
/dev/smpte3
}{
Fourth MIDI port, SMPTE timed
}
\\
\major
{
}{}{
block
}{
Modular RAM disk
}
\minor
{
0
}{
/dev/ram0
}{
First modular RAM disk
}
\minor
{
0
}{
/dev/ram0
}{
First modular RAM disk
}
\minor
{
1
}{
/dev/ram1
}{
Second modular RAM disk
}
\minor
{
1
}{
/dev/ram1
}{
Second modular RAM disk
}
\minordots
\minordots
...
@@ -745,7 +770,18 @@ major number 3).
...
@@ -745,7 +770,18 @@ major number 3).
\end{devicelist}
\end{devicelist}
\begin{devicelist}
\begin{devicelist}
\major
{
36
}{
--223
}{}{
Unallocated
}
\major
{
36
}{}{
block
}{
MCA ESDI hard disk
}
\minor
{
0
}{
/dev/eda
}{
First ESDI disk whole disk
}
\minor
{
64
}{
/dev/edb
}{
Second ESDI disk whole disk
}
\minordots
\end{devicelist}
\noindent
Partitions are handled the same way as for IDE disks (see major number
3).
\begin{devicelist}
\major
{
37
}{
--223
}{}{
Unallocated
}
\end{devicelist}
\end{devicelist}
\begin{devicelist}
\begin{devicelist}
...
...
Documentation/devices.txt
View file @
f8f29af2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
Maintained by H. Peter Anvin <Peter.Anvin@linux.org>
Maintained by H. Peter Anvin <Peter.Anvin@linux.org>
Last revised: September
6
, 1995
Last revised: September
20
, 1995
This list is the successor to Rick Miller's Linux Device List, which
This list is the successor to Rick Miller's Linux Device List, which
he stopped maintaining when he lost network access in 1993. It is a
he stopped maintaining when he lost network access in 1993. It is a
...
@@ -503,13 +503,34 @@ an unreasonable effort.
...
@@ -503,13 +503,34 @@ an unreasonable effort.
Partitions are handled the same way as for the first
Partitions are handled the same way as for the first
interface (see major number 3).
interface (see major number 3).
35 block Modular RAM disk device
35 char tclmidi MIDI driver
0 = /dev/midi0 First MIDI port, kernel timed
1 = /dev/midi1 Second MIDI port, kernel timed
2 = /dev/midi2 Third MIDI port, kernel timed
3 = /dev/midi3 Fourth MIDI port, kernel timed
64 = /dev/rmidi0 First MIDI port, untimed
65 = /dev/rmidi1 Second MIDI port, untimed
66 = /dev/rmidi2 Third MIDI port, untimed
67 = /dev/rmidi3 Fourth MIDI port, untimed
128 = /dev/smpte0 First MIDI port, SMPTE timed
129 = /dev/smpte1 Second MIDI port, SMPTE timed
130 = /dev/smpte2 Third MIDI port, SMPTE timed
131 = /dev/smpte3 Fourth MIDI port, SMPTE timed
block Modular RAM disk device
0 = /dev/ram0 First modular RAM disk
0 = /dev/ram0 First modular RAM disk
1 = /dev/ram1 Second modular RAM disk
1 = /dev/ram1 Second modular RAM disk
...
...
255 = /dev/ram255 256th modular RAM disk
255 = /dev/ram255 256th modular RAM disk
36-223 UNALLOCATED
36 block MCA ESDI hard disk
0 = /dev/eda First ESDI disk whole disk
64 = /dev/edb Second ESDI disk whole disk
...
Partitions are handled in the same way as IDE disks
(see major number 3).
37-223 UNALLOCATED
224-254 LOCAL USE
224-254 LOCAL USE
Allocated for local/experimental use
Allocated for local/experimental use
...
...
Documentation/modules.txt
View file @
f8f29af2
...
@@ -34,7 +34,9 @@ The set of modules is rapidly increasing, but so far these are known:
...
@@ -34,7 +34,9 @@ The set of modules is rapidly increasing, but so far these are known:
Most filesystems: minix, xiafs, msdos, umsdos, sysv, isofs, hpfs,
Most filesystems: minix, xiafs, msdos, umsdos, sysv, isofs, hpfs,
smbfs, nfs
smbfs, nfs
Some SCSI drivers: aha1542, in2000
Mid-level SCSI support (required by top and low level scsi drivers).
Most low-level SCSI drivers: (i.e. aha1542, in2000)
All SCSI high-level drivers: disk, tape, cdrom, generic.
Some ethernet drivers:
Some ethernet drivers:
plip, slip, dummy,
plip, slip, dummy,
...
...
Documentation/scsi.txt
0 → 100644
View file @
f8f29af2
The scsi support in the linux kernel can be modularized in a
number of different ways depending upon the needs of the end user. To
understand your options, we should first define a few terms.
The scsi-core contains the core of scsi support. Without it
you can do nothing with any of the other scsi drivers. The scsi core
support can be a module (scsi_mod.o), or it can be build into the kernel.
If the core is a module, it must be the first scsi module loaded, and
if you unload the modules, it will have to be the last one unloaded.
The individual upper and lower level drivers can be loaded in any
order once the scsi core is present in the kernel (either compiled in
or loaded as a module). The disk driver (sd_mod.o), cdrom driver (sr_mod.o),
tape driver (st.o) and scsi generics driver (sg.o) represent the upper level
drivers to support the various assorted devices which can be controlled.
You can for example load the tape driver to use the tape drive, and then
unload it once you have no further need for the driver (and release the
associated memory).
The lower level drivers are the ones that support the
individual cards that are supported for the hardware platform that you
are running under. Examples are aha1542.o to drive Adaptec 1542
cards. Rather than list the drivers which *can* be modularized, it is
easier to list the ones which cannot, since the list only contains a
few entries. The drivers which have NOT been modularized are:
NCR5380 boards of one kind or another including PAS16,
Trantor T128/128F/228,
Makefile
View file @
f8f29af2
VERSION
=
1
VERSION
=
1
PATCHLEVEL
=
3
PATCHLEVEL
=
3
SUBLEVEL
=
2
8
SUBLEVEL
=
2
9
ARCH
=
i386
ARCH
=
i386
...
...
Rules.make
View file @
f8f29af2
...
@@ -92,12 +92,13 @@ ifdef MOD_SUB_DIRS
...
@@ -92,12 +92,13 @@ ifdef MOD_SUB_DIRS
set
-e
;
for
i
in
$(MOD_SUB_DIRS)
;
do
$(MAKE)
-C
$$
i modules
;
done
set
-e
;
for
i
in
$(MOD_SUB_DIRS)
;
do
$(MAKE)
-C
$$
i modules
;
done
endif
endif
ifneq
"$(strip $(MOD_LIST_NAME))" ""
ifneq
"$(strip $(MOD_LIST_NAME))" ""
ifndef
M_OBJS
# Hack for fs subdirectories
rm
-f
$$
TOPDIR/modules/
$(MOD_LIST_NAME)
rm
-f
$$
TOPDIR/modules/
$(MOD_LIST_NAME)
ifdef
MOD_SUB_DIRS
for
i
in
$(MOD_SUB_DIRS)
;
do
\
for
i
in
$(MOD_SUB_DIRS)
;
do
\
echo
`
basename
$$
i
`
.o
>>
$$
TOPDIR/modules/
$(MOD_LIST_NAME)
;
done
echo
`
basename
$$
i
`
.o
>>
$$
TOPDIR/modules/
$(MOD_LIST_NAME)
;
done
else
endif
echo
$(M_OBJS)
>
$$
TOPDIR/modules/
$(MOD_LIST_NAME)
ifdef
M_OBJS
echo
$(M_OBJS)
>>
$$
TOPDIR/modules/
$(MOD_LIST_NAME)
endif
endif
endif
endif
ifdef
M_OBJS
ifdef
M_OBJS
...
...
arch/alpha/Makefile
View file @
f8f29af2
...
@@ -11,9 +11,9 @@
...
@@ -11,9 +11,9 @@
NM
:=
nm
-B
NM
:=
nm
-B
# enable this for linking under OSF/1:
# enable this for linking under OSF/1:
LINKFLAGS
=
-non_shared
-T
0xfffffc0000310000
-N
#
LINKFLAGS = -non_shared -T 0xfffffc0000310000 -N
# enable this for linking under Linux:
# enable this for linking under Linux:
#
LINKFLAGS = -static -T arch/alpha/vmlinux.lds -N
LINKFLAGS
=
-static
-T
arch
/alpha/vmlinux.lds
-N
CFLAGS
:=
$(CFLAGS)
-mno-fp-regs
CFLAGS
:=
$(CFLAGS)
-mno-fp-regs
...
...
arch/alpha/boot/Makefile
View file @
f8f29af2
...
@@ -9,9 +9,9 @@
...
@@ -9,9 +9,9 @@
#
#
# enable this for linking under OSF/1:
# enable this for linking under OSF/1:
LINKFLAGS
=
-non_shared
-T
0x20000000
-N
#
LINKFLAGS = -non_shared -T 0x20000000 -N
# enable this for linking under Linux:
# enable this for linking under Linux:
#
LINKFLAGS = -static -T bootloader.lds -N
LINKFLAGS
=
-static
-T
bootloader.lds
-N
.S.s
:
.S.s
:
$(CC)
-D__ASSEMBLY__
-traditional
-E
-o
$*
.o
$<
$(CC)
-D__ASSEMBLY__
-traditional
-E
-o
$*
.o
$<
...
@@ -32,9 +32,9 @@ vmlinux.gz: vmlinux
...
@@ -32,9 +32,9 @@ vmlinux.gz: vmlinux
gzip
-fv
vmlinux
gzip
-fv
vmlinux
vmlinux
:
tools/build $(TOPDIR)/vmlinux
vmlinux
:
tools/build $(TOPDIR)/vmlinux
tools/build
-v
$(TOPDIR)
/vmlinux
>
vmlinux
#
tools/build -v $(TOPDIR)/vmlinux > vmlinux
#
cp $(TOPDIR)/vmlinux vmlinux
cp
$(TOPDIR)/vmlinux
vmlinux
#
quickstrip vmlinux
quickstrip
vmlinux
tools/lxboot
:
tools/build
tools/lxboot
:
tools/build
tools/build
>
tools/lxboot
tools/build
>
tools/lxboot
...
...
arch/alpha/config.in
View file @
f8f29af2
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
comment 'General setup'
comment 'General setup'
tristate 'Normal floppy disk support' CONFIG_BLK_DEV_FD y
tristate 'Normal floppy disk support' CONFIG_BLK_DEV_FD y
bool 'Normal (MFM/RLL) disk and IDE disk/cdrom support' CONFIG_ST506
n
bool 'Normal (MFM/RLL) disk and IDE disk/cdrom support' CONFIG_ST506
y
if [ "$CONFIG_ST506" = "y" ]; then
if [ "$CONFIG_ST506" = "y" ]; then
comment 'Please see drivers/block/README.ide for help/info on IDE drives'
comment 'Please see drivers/block/README.ide for help/info on IDE drives'
bool ' Use old disk-only driver for primary i/f' CONFIG_BLK_DEV_HD n
bool ' Use old disk-only driver for primary i/f' CONFIG_BLK_DEV_HD n
...
@@ -29,7 +29,7 @@ choice 'Alpha system type' \
...
@@ -29,7 +29,7 @@ choice 'Alpha system type' \
EB66 CONFIG_ALPHA_EB66 \
EB66 CONFIG_ALPHA_EB66 \
EB66+ CONFIG_ALPHA_EB66P \
EB66+ CONFIG_ALPHA_EB66P \
EB64 CONFIG_ALPHA_EB64 \
EB64 CONFIG_ALPHA_EB64 \
EB64+ CONFIG_ALPHA_EB64P"
Jensen
EB64+ CONFIG_ALPHA_EB64P"
Cabriolet
if [ "$CONFIG_ALPHA_NONAME" = "y" ]; then
if [ "$CONFIG_ALPHA_NONAME" = "y" ]; then
define_bool CONFIG_PCI y
define_bool CONFIG_PCI y
define_bool CONFIG_ALPHA_LCA y
define_bool CONFIG_ALPHA_LCA y
...
@@ -110,7 +110,7 @@ comment 'SCSI low-level drivers'
...
@@ -110,7 +110,7 @@ comment 'SCSI low-level drivers'
dep_tristate 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X n $CONFIG_SCSI
dep_tristate 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X n $CONFIG_SCSI
dep_tristate 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 n $CONFIG_SCSI
dep_tristate 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 n $CONFIG_SCSI
dep_tristate 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740
y
$CONFIG_SCSI
dep_tristate 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740
n
$CONFIG_SCSI
dep_tristate 'Adaptec AHA274X/284X/294X support' CONFIG_SCSI_AIC7XXX n $CONFIG_SCSI
dep_tristate 'Adaptec AHA274X/284X/294X support' CONFIG_SCSI_AIC7XXX n $CONFIG_SCSI
dep_tristate 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC n $CONFIG_SCSI
dep_tristate 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC n $CONFIG_SCSI
dep_tristate 'EATA-DMA (DPT, NEC, ATT, Olivetti) support' CONFIG_SCSI_EATA_DMA n $CONFIG_SCSI
dep_tristate 'EATA-DMA (DPT, NEC, ATT, Olivetti) support' CONFIG_SCSI_EATA_DMA n $CONFIG_SCSI
...
@@ -119,7 +119,7 @@ dep_tristate 'UltraStor 14F/34F support' CONFIG_SCSI_U14_34F n $CONFIG_SCSI
...
@@ -119,7 +119,7 @@ dep_tristate 'UltraStor 14F/34F support' CONFIG_SCSI_U14_34F n $CONFIG_SCSI
dep_tristate 'Future Domain 16xx SCSI support' CONFIG_SCSI_FUTURE_DOMAIN n $CONFIG_SCSI
dep_tristate 'Future Domain 16xx SCSI support' CONFIG_SCSI_FUTURE_DOMAIN n $CONFIG_SCSI
bool 'Generic NCR5380 SCSI support' CONFIG_SCSI_GENERIC_NCR5380 n
bool 'Generic NCR5380 SCSI support' CONFIG_SCSI_GENERIC_NCR5380 n
if [ "$CONFIG_PCI" = "y" ]; then
if [ "$CONFIG_PCI" = "y" ]; then
dep_tristate 'NCR53c7,8xx SCSI support' CONFIG_SCSI_NCR53C7xx
n
$CONFIG_SCSI
dep_tristate 'NCR53c7,8xx SCSI support' CONFIG_SCSI_NCR53C7xx
y
$CONFIG_SCSI
fi
fi
dep_tristate 'Always IN2000 SCSI support (test release)' CONFIG_SCSI_IN2000 n $CONFIG_SCSI
dep_tristate 'Always IN2000 SCSI support (test release)' CONFIG_SCSI_IN2000 n $CONFIG_SCSI
bool 'PAS16 SCSI support' CONFIG_SCSI_PAS16 n
bool 'PAS16 SCSI support' CONFIG_SCSI_PAS16 n
...
@@ -176,7 +176,7 @@ if [ "$CONFIG_NET_VENDOR_3COM" = "y" ]; then
...
@@ -176,7 +176,7 @@ if [ "$CONFIG_NET_VENDOR_3COM" = "y" ]; then
fi
fi
tristate '3c509/3c579 support' CONFIG_EL3 y
tristate '3c509/3c579 support' CONFIG_EL3 y
fi
fi
bool 'Other ISA cards' CONFIG_NET_ISA
y
bool 'Other ISA cards' CONFIG_NET_ISA
n
if [ "$CONFIG_NET_ISA" = "y" ]; then
if [ "$CONFIG_NET_ISA" = "y" ]; then
tristate 'Cabletron E21xx support' CONFIG_E2100 n
tristate 'Cabletron E21xx support' CONFIG_E2100 n
tristate 'DEPCA support' CONFIG_DEPCA y
tristate 'DEPCA support' CONFIG_DEPCA y
...
@@ -199,17 +199,17 @@ if [ "$CONFIG_NET_ISA" = "y" ]; then
...
@@ -199,17 +199,17 @@ if [ "$CONFIG_NET_ISA" = "y" ]; then
tristate 'NE2000/NE1000 support' CONFIG_NE2000 n
tristate 'NE2000/NE1000 support' CONFIG_NE2000 n
bool 'SK_G16 support' CONFIG_SK_G16 n
bool 'SK_G16 support' CONFIG_SK_G16 n
fi
fi
bool 'EISA, VLB, PCI and on board controllers' CONFIG_NET_EISA
n
bool 'EISA, VLB, PCI and on board controllers' CONFIG_NET_EISA
y
if [ "$CONFIG_NET_EISA" = "y" ]; then
if [ "$CONFIG_NET_EISA" = "y" ]; then
if [ "$CONFIG_NET_ALPHA" = "y" ]; then
if [ "$CONFIG_NET_ALPHA" = "y" ]; then
tristate 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n
tristate 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n
fi
fi
tristate 'Apricot Xen-II on board ethernet' CONFIG_APRICOT n
tristate 'Apricot Xen-II on board ethernet' CONFIG_APRICOT n
tristate 'DE425, DE434, DE435, DE500 support' CONFIG_DE4X5
n
tristate 'DE425, DE434, DE435, DE500 support' CONFIG_DE4X5
y
# tristate 'DEC 21040 PCI support' CONFIG_DEC_ELCP n
# tristate 'DEC 21040 PCI support' CONFIG_DEC_ELCP n
# bool 'LPL T100V 100Mbs support' CONFIG_LPL_T100 n
# bool 'LPL T100V 100Mbs support' CONFIG_LPL_T100 n
# bool 'PCnet32 (32 bit VLB and PCI LANCE) support' CONFIG_PCNET32 n
# bool 'PCnet32 (32 bit VLB and PCI LANCE) support' CONFIG_PCNET32 n
bool 'Zenith Z-Note support' CONFIG_ZNET
y
bool 'Zenith Z-Note support' CONFIG_ZNET
n
fi
fi
bool 'Pocket and portable adaptors' CONFIG_NET_POCKET n
bool 'Pocket and portable adaptors' CONFIG_NET_POCKET n
if [ "$CONFIG_NET_POCKET" = "y" ]; then
if [ "$CONFIG_NET_POCKET" = "y" ]; then
...
...
arch/alpha/kernel/traps.c
View file @
f8f29af2
...
@@ -42,9 +42,7 @@ void die_if_kernel(char * str, struct pt_regs * regs, long err)
...
@@ -42,9 +42,7 @@ void die_if_kernel(char * str, struct pt_regs * regs, long err)
for
(
i
=
-
3
;
i
<
6
;
i
++
)
for
(
i
=
-
3
;
i
<
6
;
i
++
)
printk
(
"%c%08x%c"
,
i
?
' '
:
'<'
,
pc
[
i
],
i
?
' '
:
'>'
);
printk
(
"%c%08x%c"
,
i
?
' '
:
'<'
,
pc
[
i
],
i
?
' '
:
'>'
);
printk
(
"
\n
"
);
printk
(
"
\n
"
);
for
(
i
=
0
;
i
<
5000000000
;
i
++
)
do_exit
(
SIGSEGV
);
/* pause */
;
halt
();
}
}
asmlinkage
void
do_entArith
(
unsigned
long
summary
,
unsigned
long
write_mask
,
asmlinkage
void
do_entArith
(
unsigned
long
summary
,
unsigned
long
write_mask
,
...
...
arch/alpha/mm/init.c
View file @
f8f29af2
...
@@ -68,12 +68,12 @@ void show_mem(void)
...
@@ -68,12 +68,12 @@ void show_mem(void)
i
=
MAP_NR
(
high_memory
);
i
=
MAP_NR
(
high_memory
);
while
(
i
--
>
0
)
{
while
(
i
--
>
0
)
{
total
++
;
total
++
;
if
(
mem_map
[
i
]
&
MAP_PAGE_RESERVED
)
if
(
mem_map
[
i
]
.
reserved
)
reserved
++
;
reserved
++
;
else
if
(
!
mem_map
[
i
])
else
if
(
!
mem_map
[
i
]
.
count
)
free
++
;
free
++
;
else
else
shared
+=
mem_map
[
i
]
-
1
;
shared
+=
mem_map
[
i
]
.
count
-
1
;
}
}
printk
(
"%d pages of RAM
\n
"
,
total
);
printk
(
"%d pages of RAM
\n
"
,
total
);
printk
(
"%d free pages
\n
"
,
free
);
printk
(
"%d free pages
\n
"
,
free
);
...
@@ -127,7 +127,7 @@ unsigned long paging_init(unsigned long start_mem, unsigned long end_mem)
...
@@ -127,7 +127,7 @@ unsigned long paging_init(unsigned long start_mem, unsigned long end_mem)
continue
;
continue
;
while
(
nr
--
)
while
(
nr
--
)
mem_map
[
pfn
++
]
=
0
;
mem_map
[
pfn
++
]
.
reserved
=
0
;
}
}
/* unmap the console stuff: we don't need it, and we don't want it */
/* unmap the console stuff: we don't need it, and we don't want it */
...
@@ -158,7 +158,7 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
...
@@ -158,7 +158,7 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
*/
*/
tmp
=
KERNEL_START
;
tmp
=
KERNEL_START
;
while
(
tmp
<
start_mem
)
{
while
(
tmp
<
start_mem
)
{
mem_map
[
MAP_NR
(
tmp
)]
=
MAP_PAGE_RESERVED
;
mem_map
[
MAP_NR
(
tmp
)]
.
reserved
=
1
;
tmp
+=
PAGE_SIZE
;
tmp
+=
PAGE_SIZE
;
}
}
...
@@ -171,9 +171,9 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
...
@@ -171,9 +171,9 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
#endif
#endif
for
(
tmp
=
PAGE_OFFSET
;
tmp
<
high_memory
;
tmp
+=
PAGE_SIZE
)
{
for
(
tmp
=
PAGE_OFFSET
;
tmp
<
high_memory
;
tmp
+=
PAGE_SIZE
)
{
if
(
mem_map
[
MAP_NR
(
tmp
)])
if
(
mem_map
[
MAP_NR
(
tmp
)]
.
reserved
)
continue
;
continue
;
mem_map
[
MAP_NR
(
tmp
)]
=
1
;
mem_map
[
MAP_NR
(
tmp
)]
.
count
=
1
;
free_page
(
tmp
);
free_page
(
tmp
);
}
}
tmp
=
nr_free_pages
<<
PAGE_SHIFT
;
tmp
=
nr_free_pages
<<
PAGE_SHIFT
;
...
@@ -191,12 +191,12 @@ void si_meminfo(struct sysinfo *val)
...
@@ -191,12 +191,12 @@ void si_meminfo(struct sysinfo *val)
val
->
freeram
=
nr_free_pages
<<
PAGE_SHIFT
;
val
->
freeram
=
nr_free_pages
<<
PAGE_SHIFT
;
val
->
bufferram
=
buffermem
;
val
->
bufferram
=
buffermem
;
while
(
i
--
>
0
)
{
while
(
i
--
>
0
)
{
if
(
mem_map
[
i
]
&
MAP_PAGE_RESERVED
)
if
(
mem_map
[
i
]
.
reserved
)
continue
;
continue
;
val
->
totalram
++
;
val
->
totalram
++
;
if
(
!
mem_map
[
i
])
if
(
!
mem_map
[
i
]
.
count
)
continue
;
continue
;
val
->
sharedram
+=
mem_map
[
i
]
-
1
;
val
->
sharedram
+=
mem_map
[
i
]
.
count
-
1
;
}
}
val
->
totalram
<<=
PAGE_SHIFT
;
val
->
totalram
<<=
PAGE_SHIFT
;
val
->
sharedram
<<=
PAGE_SHIFT
;
val
->
sharedram
<<=
PAGE_SHIFT
;
...
...
arch/i386/config.in
View file @
f8f29af2
...
@@ -34,7 +34,7 @@ fi
...
@@ -34,7 +34,7 @@ fi
bool 'System V IPC' CONFIG_SYSVIPC y
bool 'System V IPC' CONFIG_SYSVIPC y
tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF y
tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF y
if [ "$CONFIG_BINFMT_ELF" = "y" ]; then
if [ "$CONFIG_BINFMT_ELF" = "y" ]; then
bool 'Compile kernel as ELF - if your GCC is ELF-GCC' CONFIG_KERNEL_ELF
n
bool 'Compile kernel as ELF - if your GCC is ELF-GCC' CONFIG_KERNEL_ELF
y
fi
fi
#bool 'Use -mpentium flag for Pentium-specific optimizations' CONFIG_M586 n
#bool 'Use -mpentium flag for Pentium-specific optimizations' CONFIG_M586 n
#if [ "$CONFIG_M586" = "n" ]; then
#if [ "$CONFIG_M586" = "n" ]; then
...
...
arch/i386/kernel/setup.c
View file @
f8f29af2
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#include <linux/tty.h>
#include <linux/tty.h>
#include <linux/ioport.h>
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/delay.h>
#include <linux/config.h>
#include <asm/segment.h>
#include <asm/segment.h>
#include <asm/system.h>
#include <asm/system.h>
...
...
arch/i386/mm/init.c
View file @
f8f29af2
...
@@ -73,12 +73,12 @@ void show_mem(void)
...
@@ -73,12 +73,12 @@ void show_mem(void)
i
=
high_memory
>>
PAGE_SHIFT
;
i
=
high_memory
>>
PAGE_SHIFT
;
while
(
i
--
>
0
)
{
while
(
i
--
>
0
)
{
total
++
;
total
++
;
if
(
mem_map
[
i
]
&
MAP_PAGE_RESERVED
)
if
(
mem_map
[
i
]
.
reserved
)
reserved
++
;
reserved
++
;
else
if
(
!
mem_map
[
i
])
else
if
(
!
mem_map
[
i
]
.
count
)
free
++
;
free
++
;
else
else
shared
+=
mem_map
[
i
]
-
1
;
shared
+=
mem_map
[
i
]
.
count
-
1
;
}
}
printk
(
"%d pages of RAM
\n
"
,
total
);
printk
(
"%d pages of RAM
\n
"
,
total
);
printk
(
"%d free pages
\n
"
,
free
);
printk
(
"%d free pages
\n
"
,
free
);
...
@@ -192,12 +192,12 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
...
@@ -192,12 +192,12 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
* controller as well..
* controller as well..
*/
*/
while
(
start_low_mem
<
0x9f000
)
{
while
(
start_low_mem
<
0x9f000
)
{
mem_map
[
MAP_NR
(
start_low_mem
)]
=
0
;
mem_map
[
MAP_NR
(
start_low_mem
)]
.
reserved
=
0
;
start_low_mem
+=
PAGE_SIZE
;
start_low_mem
+=
PAGE_SIZE
;
}
}
while
(
start_mem
<
high_memory
)
{
while
(
start_mem
<
high_memory
)
{
mem_map
[
MAP_NR
(
start_mem
)]
=
0
;
mem_map
[
MAP_NR
(
start_mem
)]
.
reserved
=
0
;
start_mem
+=
PAGE_SIZE
;
start_mem
+=
PAGE_SIZE
;
}
}
#ifdef CONFIG_SCSI
#ifdef CONFIG_SCSI
...
@@ -207,7 +207,7 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
...
@@ -207,7 +207,7 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
sound_mem_init
();
sound_mem_init
();
#endif
#endif
for
(
tmp
=
0
;
tmp
<
high_memory
;
tmp
+=
PAGE_SIZE
)
{
for
(
tmp
=
0
;
tmp
<
high_memory
;
tmp
+=
PAGE_SIZE
)
{
if
(
mem_map
[
MAP_NR
(
tmp
)])
{
if
(
mem_map
[
MAP_NR
(
tmp
)]
.
reserved
)
{
if
(
tmp
>=
0xA0000
&&
tmp
<
0x100000
)
if
(
tmp
>=
0xA0000
&&
tmp
<
0x100000
)
reservedpages
++
;
reservedpages
++
;
else
if
(
tmp
<
(
unsigned
long
)
&
_etext
)
else
if
(
tmp
<
(
unsigned
long
)
&
_etext
)
...
@@ -216,7 +216,7 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
...
@@ -216,7 +216,7 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
datapages
++
;
datapages
++
;
continue
;
continue
;
}
}
mem_map
[
MAP_NR
(
tmp
)]
=
1
;
mem_map
[
MAP_NR
(
tmp
)]
.
count
=
1
;
free_page
(
tmp
);
free_page
(
tmp
);
}
}
tmp
=
nr_free_pages
<<
PAGE_SHIFT
;
tmp
=
nr_free_pages
<<
PAGE_SHIFT
;
...
@@ -249,12 +249,12 @@ void si_meminfo(struct sysinfo *val)
...
@@ -249,12 +249,12 @@ void si_meminfo(struct sysinfo *val)
val
->
freeram
=
nr_free_pages
<<
PAGE_SHIFT
;
val
->
freeram
=
nr_free_pages
<<
PAGE_SHIFT
;
val
->
bufferram
=
buffermem
;
val
->
bufferram
=
buffermem
;
while
(
i
--
>
0
)
{
while
(
i
--
>
0
)
{
if
(
mem_map
[
i
]
&
MAP_PAGE_RESERVED
)
if
(
mem_map
[
i
]
.
reserved
)
continue
;
continue
;
val
->
totalram
++
;
val
->
totalram
++
;
if
(
!
mem_map
[
i
])
if
(
!
mem_map
[
i
]
.
count
)
continue
;
continue
;
val
->
sharedram
+=
mem_map
[
i
]
-
1
;
val
->
sharedram
+=
mem_map
[
i
]
.
count
-
1
;
}
}
val
->
totalram
<<=
PAGE_SHIFT
;
val
->
totalram
<<=
PAGE_SHIFT
;
val
->
sharedram
<<=
PAGE_SHIFT
;
val
->
sharedram
<<=
PAGE_SHIFT
;
...
...
drivers/block/genhd.c
View file @
f8f29af2
...
@@ -79,11 +79,12 @@ static void extended_partition(struct gendisk *hd, kdev_t dev)
...
@@ -79,11 +79,12 @@ static void extended_partition(struct gendisk *hd, kdev_t dev)
{
{
struct
buffer_head
*
bh
;
struct
buffer_head
*
bh
;
struct
partition
*
p
;
struct
partition
*
p
;
unsigned
long
first_sector
,
this_sector
,
this_size
;
unsigned
long
first_sector
,
first_size
,
this_sector
,
this_size
;
int
mask
=
(
1
<<
hd
->
minor_shift
)
-
1
;
int
mask
=
(
1
<<
hd
->
minor_shift
)
-
1
;
int
i
;
int
i
;
first_sector
=
hd
->
part
[
MINOR
(
dev
)].
start_sect
;
first_sector
=
hd
->
part
[
MINOR
(
dev
)].
start_sect
;
first_size
=
hd
->
part
[
MINOR
(
dev
)].
nr_sects
;
this_sector
=
first_sector
;
this_sector
=
first_sector
;
while
(
1
)
{
while
(
1
)
{
...
@@ -122,7 +123,13 @@ static void extended_partition(struct gendisk *hd, kdev_t dev)
...
@@ -122,7 +123,13 @@ static void extended_partition(struct gendisk *hd, kdev_t dev)
if
(
!
p
->
nr_sects
||
p
->
sys_ind
==
EXTENDED_PARTITION
)
if
(
!
p
->
nr_sects
||
p
->
sys_ind
==
EXTENDED_PARTITION
)
continue
;
continue
;
if
(
p
->
start_sect
+
p
->
nr_sects
>
this_size
)
/* Check the 3rd and 4th entries -
these sometimes contain random garbage */
if
(
i
>=
2
&&
p
->
start_sect
+
p
->
nr_sects
>
this_size
&&
(
this_sector
+
p
->
start_sect
<
first_sector
||
this_sector
+
p
->
start_sect
+
p
->
nr_sects
>
first_sector
+
first_size
))
continue
;
continue
;
add_partition
(
hd
,
current_minor
,
this_sector
+
p
->
start_sect
,
p
->
nr_sects
);
add_partition
(
hd
,
current_minor
,
this_sector
+
p
->
start_sect
,
p
->
nr_sects
);
...
...
drivers/net/slip.c
View file @
f8f29af2
...
@@ -1163,15 +1163,14 @@ slip_init_ctrl_dev(struct device *dummy)
...
@@ -1163,15 +1163,14 @@ slip_init_ctrl_dev(struct device *dummy)
}
}
/* If not loadable module, a bootstrap Space.c slip_proto dev
#ifdef MODULE
* now needs to be unregistered.
return
status
;
#else
/* Return "not found", so that dev_init() will unlink
* the placeholder device entry for us.
*/
*/
#ifndef MODULE
return
ENODEV
;
/* printk("SLIP: Unregistering bootstrap device "
"'slip_proto' - slip OK\n");*/
unregister_netdev
(
dummy
);
#endif
#endif
return
status
;
}
}
...
...
drivers/pci/pci.c
View file @
f8f29af2
...
@@ -83,6 +83,8 @@ struct pci_dev_info dev_info[] = {
...
@@ -83,6 +83,8 @@ struct pci_dev_info dev_info[] = {
DEVICE
(
SI
,
SI_501
,
"85C501"
),
DEVICE
(
SI
,
SI_501
,
"85C501"
),
DEVICE
(
SI
,
SI_496
,
"85C496"
),
DEVICE
(
SI
,
SI_496
,
"85C496"
),
DEVICE
(
SI
,
SI_601
,
"85C601"
),
DEVICE
(
SI
,
SI_601
,
"85C601"
),
DEVICE
(
SI
,
SI_5511
,
"85C5511"
),
DEVICE
(
SI
,
SI_5513
,
"85C5513"
),
DEVICE
(
HP
,
HP_J2585A
,
"J2585A"
),
DEVICE
(
HP
,
HP_J2585A
,
"J2585A"
),
#if 0
#if 0
DEVICE( SMC, SMC_37C665, "FDC 37C665"), /* 1042 ? */
DEVICE( SMC, SMC_37C665, "FDC 37C665"), /* 1042 ? */
...
@@ -110,6 +112,7 @@ struct pci_dev_info dev_info[] = {
...
@@ -110,6 +112,7 @@ struct pci_dev_info dev_info[] = {
DEVICE
(
LEADTEK
,
LEADTEK_805
,
"S3 805"
),
DEVICE
(
LEADTEK
,
LEADTEK_805
,
"S3 805"
),
DEVICE
(
CONTAQ
,
CONTAQ_82C599
,
"82C599"
),
DEVICE
(
CONTAQ
,
CONTAQ_82C599
,
"82C599"
),
DEVICE
(
CMD
,
CMD_640
,
"640 (buggy)"
),
DEVICE
(
CMD
,
CMD_640
,
"640 (buggy)"
),
DEVICE
(
CMD
,
CMD_646
,
"646"
),
DEVICE
(
VISION
,
VISION_QD8500
,
"QD-8500"
),
DEVICE
(
VISION
,
VISION_QD8500
,
"QD-8500"
),
DEVICE
(
VISION
,
VISION_QD8580
,
"QD-8580"
),
DEVICE
(
VISION
,
VISION_QD8580
,
"QD-8580"
),
DEVICE
(
WINBOND
,
WINBOND_83769
,
"W83769F"
),
DEVICE
(
WINBOND
,
WINBOND_83769
,
"W83769F"
),
...
@@ -123,6 +126,7 @@ struct pci_dev_info dev_info[] = {
...
@@ -123,6 +126,7 @@ struct pci_dev_info dev_info[] = {
DEVICE
(
AL
,
AL_M1461
,
"M1461"
),
DEVICE
(
AL
,
AL_M1461
,
"M1461"
),
DEVICE
(
AL
,
AL_M4803
,
"M4803"
),
DEVICE
(
AL
,
AL_M4803
,
"M4803"
),
DEVICE
(
IMS
,
IMS_8849
,
"8849"
),
DEVICE
(
IMS
,
IMS_8849
,
"8849"
),
DEVICE
(
REALTEK
,
REALTEK_8300
,
"ENW-8300C"
),
DEVICE
(
VIA
,
VIA_82C505
,
"VT 82C505"
),
DEVICE
(
VIA
,
VIA_82C505
,
"VT 82C505"
),
DEVICE
(
VIA
,
VIA_82C561
,
"VT 82C561"
),
DEVICE
(
VIA
,
VIA_82C561
,
"VT 82C561"
),
DEVICE
(
VIA
,
VIA_82C576
,
"VT 82C576 3V"
),
DEVICE
(
VIA
,
VIA_82C576
,
"VT 82C576 3V"
),
...
...
drivers/scsi/53c7,8xx.c
View file @
f8f29af2
...
@@ -994,6 +994,8 @@ int NCR53c7xx_detect(Scsi_Host_Template *tpnt) {
...
@@ -994,6 +994,8 @@ int NCR53c7xx_detect(Scsi_Host_Template *tpnt) {
unsigned
char
pci_bus
,
pci_device_fn
;
unsigned
char
pci_bus
,
pci_device_fn
;
static
short
pci_index
=
0
;
/* Device index to PCI BIOS calls */
static
short
pci_index
=
0
;
/* Device index to PCI BIOS calls */
tpnt
->
proc_dir
=
&
proc_scsi_ncr53c7xx
;
for
(
current_override
=
count
=
0
;
current_override
<
OVERRIDE_LIMIT
;
for
(
current_override
=
count
=
0
;
current_override
<
OVERRIDE_LIMIT
;
++
current_override
)
{
++
current_override
)
{
if
(
overrides
[
current_override
].
pci
?
if
(
overrides
[
current_override
].
pci
?
...
@@ -1120,7 +1122,6 @@ NCR53c8x0_init_fixup (struct Scsi_Host *host) {
...
@@ -1120,7 +1122,6 @@ NCR53c8x0_init_fixup (struct Scsi_Host *host) {
* SCRIPTS.
* SCRIPTS.
*/
*/
tpnt
->
proc_dir
=
&
proc_scsi_ncr53c7xx
;
patch_abs_rwri_data
(
hostdata
->
script
,
0
,
dmode_memory_to_memory
,
tmp
);
patch_abs_rwri_data
(
hostdata
->
script
,
0
,
dmode_memory_to_memory
,
tmp
);
patch_abs_rwri_data
(
hostdata
->
script
,
0
,
dmode_memory_to_ncr
,
memory_to_ncr
);
patch_abs_rwri_data
(
hostdata
->
script
,
0
,
dmode_memory_to_ncr
,
memory_to_ncr
);
...
...
drivers/scsi/Makefile
View file @
f8f29af2
...
@@ -38,7 +38,6 @@ else
...
@@ -38,7 +38,6 @@ else
# Create this before we build anything else.
# Create this before we build anything else.
SCSI_MODULE_VER
:=
scsi_syms.ver
SCSI_MODULE_VER
:=
scsi_syms.ver
SYMTAB_OBJS
:=
scsi_syms.o
SYMTAB_OBJS
:=
scsi_syms.o
include
../../versions.mk
endif
endif
M_OBJS
+=
scsi_mod.o
M_OBJS
+=
scsi_mod.o
endif
endif
...
@@ -235,6 +234,12 @@ endif
...
@@ -235,6 +234,12 @@ endif
include
$(TOPDIR)/Rules.make
include
$(TOPDIR)/Rules.make
ifeq
($(CONFIG_SCSI),m)
ifdef
CONFIG_MODVERSIONS
include
../../versions.mk
endif
endif
aha152x.o
:
aha152x.c
aha152x.o
:
aha152x.c
$(CC)
$(CFLAGS)
$(AHA152X)
-c
aha152x.c
$(CC)
$(CFLAGS)
$(AHA152X)
-c
aha152x.c
...
...
drivers/scsi/eata_dma.c
View file @
f8f29af2
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
* Thanks also to Greg Hosler who did a lot of testing and *
* Thanks also to Greg Hosler who did a lot of testing and *
* found quite a number of bugs during the development. *
* found quite a number of bugs during the development. *
************************************************************
************************************************************
* last change: 95/0
7/18 OS: Linux 1.3.10
*
* last change: 95/0
9/17 OS: Linux 1.3.28
*
************************************************************/
************************************************************/
/* Look in eata_dma.h for configuration and revision information */
/* Look in eata_dma.h for configuration and revision information */
...
@@ -504,10 +504,11 @@ int eata_queue(Scsi_Cmnd * cmd, void (* done) (Scsi_Cmnd *))
...
@@ -504,10 +504,11 @@ int eata_queue(Scsi_Cmnd * cmd, void (* done) (Scsi_Cmnd *))
cmd
->
host_scribble
=
(
char
*
)
&
hd
->
ccb
[
y
];
cmd
->
host_scribble
=
(
char
*
)
&
hd
->
ccb
[
y
];
if
(
eata_send_command
((
u32
)
cp
,
(
u32
)
sh
->
base
,
EATA_CMD_DMA_SEND_CP
)
==
FALSE
)
{
if
(
eata_send_command
((
u32
)
cp
,
(
u32
)
sh
->
base
,
EATA_CMD_DMA_SEND_CP
)
==
FALSE
)
{
cmd
->
result
=
DID_
ERROR
<<
16
;
cmd
->
result
=
DID_
BUS_BUSY
<<
16
;
printk
(
"eata_queue target %d, pid %ld, HBA busy, returning DID_
ERROR,"
printk
(
"eata_queue target %d, pid %ld, HBA busy, returning DID_
BUS_BUSY
\n
"
,
" done.
\n
"
,
cmd
->
target
,
cmd
->
pid
);
cmd
->
target
,
cmd
->
pid
);
done
(
cmd
);
done
(
cmd
);
cp
->
status
=
FREE
;
/* Hmmm..... */
restore_flags
(
flags
);
restore_flags
(
flags
);
return
(
0
);
return
(
0
);
}
}
...
@@ -857,7 +858,6 @@ short register_HBA(u32 base, struct get_conf *gc, Scsi_Host_Template * tpnt,
...
@@ -857,7 +858,6 @@ short register_HBA(u32 base, struct get_conf *gc, Scsi_Host_Template * tpnt,
"Please use the EATA-PIO driver.
\n
"
,
base
);
"Please use the EATA-PIO driver.
\n
"
,
base
);
return
(
FALSE
);
return
(
FALSE
);
}
}
if
(
gc
->
HAA_valid
==
FALSE
||
ntohl
(
gc
->
len
)
<
0x22
)
if
(
gc
->
HAA_valid
==
FALSE
||
ntohl
(
gc
->
len
)
<
0x22
)
gc
->
MAX_CHAN
=
0
;
gc
->
MAX_CHAN
=
0
;
...
@@ -1124,8 +1124,8 @@ void find_EISA(struct get_conf *buf, Scsi_Host_Template * tpnt)
...
@@ -1124,8 +1124,8 @@ void find_EISA(struct get_conf *buf, Scsi_Host_Template * tpnt)
(
int
)
pal1
,
(
int
)
pal2
,
(
int
)
pal3
));
(
int
)
pal1
,
(
int
)
pal2
,
(
int
)
pal3
));
#endif
#endif
if
(
get_conf_PIO
(
base
,
buf
)
==
TRUE
)
{
if
(
get_conf_PIO
(
base
,
buf
)
==
TRUE
)
{
DBG
(
DBG_PROBE
&&
DBG_EISA
,
print_config
(
buf
));
if
(
buf
->
IRQ
)
{
if
(
buf
->
IRQ
)
{
DBG
(
DBG_EISA
,
printk
(
"Registering EISA HBA
\n
"
));
register_HBA
(
base
,
buf
,
tpnt
,
IS_EISA
);
register_HBA
(
base
,
buf
,
tpnt
,
IS_EISA
);
}
else
}
else
printk
(
"eata_dma: No valid IRQ. HBA removed from list
\n
"
);
printk
(
"eata_dma: No valid IRQ. HBA removed from list
\n
"
);
...
@@ -1151,6 +1151,7 @@ void find_ISA(struct get_conf *buf, Scsi_Host_Template * tpnt)
...
@@ -1151,6 +1151,7 @@ void find_ISA(struct get_conf *buf, Scsi_Host_Template * tpnt)
for
(
i
=
0
;
i
<
MAXISA
;
i
++
)
{
for
(
i
=
0
;
i
<
MAXISA
;
i
++
)
{
if
(
ISAbases
[
i
])
{
if
(
ISAbases
[
i
])
{
if
(
get_conf_PIO
(
ISAbases
[
i
],
buf
)
==
TRUE
){
if
(
get_conf_PIO
(
ISAbases
[
i
],
buf
)
==
TRUE
){
DBG
(
DBG_ISA
,
printk
(
"Registering ISA HBA
\n
"
));
register_HBA
(
ISAbases
[
i
],
buf
,
tpnt
,
IS_ISA
);
register_HBA
(
ISAbases
[
i
],
buf
,
tpnt
,
IS_ISA
);
}
else
{
}
else
{
if
(
check_blink_state
(
ISAbases
[
i
]))
if
(
check_blink_state
(
ISAbases
[
i
]))
...
@@ -1176,6 +1177,7 @@ void find_PCI(struct get_conf *buf, Scsi_Host_Template * tpnt)
...
@@ -1176,6 +1177,7 @@ void find_PCI(struct get_conf *buf, Scsi_Host_Template * tpnt)
u16
com_adr
;
u16
com_adr
;
u16
rev_device
;
u16
rev_device
;
u32
error
,
i
,
x
;
u32
error
,
i
,
x
;
u8
pal1
,
pal2
,
pal3
;
if
(
pcibios_present
())
{
if
(
pcibios_present
())
{
for
(
i
=
0
;
i
<=
MAXPCI
;
++
i
,
++
pci_index
)
{
for
(
i
=
0
;
i
<=
MAXPCI
;
++
i
,
++
pci_index
)
{
...
@@ -1218,20 +1220,25 @@ void find_PCI(struct get_conf *buf, Scsi_Host_Template * tpnt)
...
@@ -1218,20 +1220,25 @@ void find_PCI(struct get_conf *buf, Scsi_Host_Template * tpnt)
if
(
base
&
0x01
)
{
if
(
base
&
0x01
)
{
base
&=
0xfffffffe
;
base
&=
0xfffffffe
;
/* EISA tag there ? */
/* EISA tag there ? */
if
((
inb
(
base
)
==
0x12
)
&&
(
inb
(
base
+
1
)
==
0x14
))
pal1
=
inb
(
base
);
continue
;
/* Jep, it's forced, so move on */
pal2
=
inb
(
base
+
1
);
pal3
=
inb
(
base
+
2
);
if
(((
pal1
==
0x12
)
&&
(
pal2
==
0x14
))
||
((
pal1
==
0x38
)
&&
(
pal2
==
0xa3
)
&&
(
pal3
==
0x82
))
||
((
pal1
==
0x06
)
&&
(
pal2
==
0x94
)
&&
(
pal3
==
0x24
)))
base
+=
0x08
;
else
base
+=
0x10
;
/* Now, THIS is the real address */
base
+=
0x10
;
/* Now, THIS is the real address */
if
(
base
!=
0x1f8
)
{
if
(
base
!=
0x1f8
)
{
/* We didn't find it in the primary search */
/* We didn't find it in the primary search */
if
(
get_conf_PIO
(
base
,
buf
)
==
TRUE
)
{
if
(
get_conf_PIO
(
base
,
buf
)
==
TRUE
)
{
if
(
buf
->
FORCADR
)
/* If the address is forced */
continue
;
/* we'll find it later */
/* OK. We made it till here, so we can go now
/* OK. We made it till here, so we can go now
* and register it. We only have to check and
* and register it. We only have to check and
* eventually remove it from the EISA and ISA list
* eventually remove it from the EISA and ISA list
*/
*/
DBG
(
DBG_PCI
,
printk
(
"Registering PCI HBA
\n
"
));
register_HBA
(
base
,
buf
,
tpnt
,
IS_PCI
);
register_HBA
(
base
,
buf
,
tpnt
,
IS_PCI
);
if
(
base
<
0x1000
)
{
if
(
base
<
0x1000
)
{
...
...
drivers/scsi/eata_dma.h
View file @
f8f29af2
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
#define VER_MAJOR 2
#define VER_MAJOR 2
#define VER_MINOR 5
#define VER_MINOR 5
#define VER_SUB "
7b
"
#define VER_SUB "
8
"
/************************************************************************
/************************************************************************
...
@@ -73,6 +73,8 @@ int eata_release(struct Scsi_Host *);
...
@@ -73,6 +73,8 @@ int eata_release(struct Scsi_Host *);
#define eata_release NULL
#define eata_release NULL
#endif
#endif
#include <linux/scsicam.h>
#define EATA_DMA { \
#define EATA_DMA { \
NULL, NULL, \
NULL, NULL, \
NULL,
/* proc_dir_entry */
\
NULL,
/* proc_dir_entry */
\
...
...
drivers/scsi/eata_dma_proc.c
View file @
f8f29af2
...
@@ -369,7 +369,7 @@ int eata_proc_info(char *buffer, char **start, off_t offset, int length,
...
@@ -369,7 +369,7 @@ int eata_proc_info(char *buffer, char **start, off_t offset, int length,
SD
(
HBA_ptr
)
->
writes
[
11
]);
SD
(
HBA_ptr
)
->
writes
[
11
]);
len
+=
size
;
len
+=
size
;
pos
=
begin
+
len
;
pos
=
begin
+
len
;
size
=
sprintf
(
buffer
+
len
,
"Sum :
%12u %12u
\n
"
,
size
=
sprintf
(
buffer
+
len
,
"Sum :%12u %12u
\n
"
,
SD
(
HBA_ptr
)
->
reads
[
12
],
SD
(
HBA_ptr
)
->
reads
[
12
],
SD
(
HBA_ptr
)
->
writes
[
12
]);
SD
(
HBA_ptr
)
->
writes
[
12
]);
len
+=
size
;
len
+=
size
;
...
...
drivers/scsi/eata_pio.c
View file @
f8f29af2
...
@@ -378,11 +378,12 @@ int eata_pio_queue(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
...
@@ -378,11 +378,12 @@ int eata_pio_queue(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
if
(
eata_pio_send_command
(
base
,
EATA_CMD_PIO_SEND_CP
))
if
(
eata_pio_send_command
(
base
,
EATA_CMD_PIO_SEND_CP
))
{
{
cmd
->
result
=
DID_
ERROR
<<
16
;
cmd
->
result
=
DID_
BUS_BUSY
<<
16
;
printk
(
"eata_pio_queue target %d, pid %ld, HBA busy, returning "
printk
(
"eata_pio_queue target %d, pid %ld, HBA busy, returning "
"DID_ERROR, done.
\n
"
,
cmd
->
target
,
cmd
->
pid
);
"DID_BUS_BUSY, done.
\n
"
,
cmd
->
target
,
cmd
->
pid
);
restore_flags
(
flags
);
done
(
cmd
);
done
(
cmd
);
cp
->
status
=
FREE
;
restore_flags
(
flags
);
return
(
0
);
return
(
0
);
}
}
while
(
!
(
inb
(
base
+
HA_RSTATUS
)
&
HA_SDRQ
));
while
(
!
(
inb
(
base
+
HA_RSTATUS
)
&
HA_SDRQ
));
...
...
drivers/scsi/hosts.c
View file @
f8f29af2
...
@@ -416,7 +416,7 @@ void scsi_mem_init(unsigned long memory_end)
...
@@ -416,7 +416,7 @@ void scsi_mem_init(unsigned long memory_end)
Low24
+=
PAGE_SIZE
)
{
Low24
+=
PAGE_SIZE
)
{
unsigned
long
ForbiddenAddress
=
High8
+
Low24
;
unsigned
long
ForbiddenAddress
=
High8
+
Low24
;
if
(
ForbiddenAddress
>=
memory_end
)
goto
next_host
;
if
(
ForbiddenAddress
>=
memory_end
)
goto
next_host
;
mem_map
[
MAP_NR
(
ForbiddenAddress
)]
=
MAP_PAGE_RESERVED
;
mem_map
[
MAP_NR
(
ForbiddenAddress
)]
.
reserved
=
1
;
}
}
}
}
}
}
...
...
drivers/scsi/qlogic.c
View file @
f8f29af2
...
@@ -543,7 +543,7 @@ int qltyp; /* type of chip */
...
@@ -543,7 +543,7 @@ int qltyp; /* type of chip */
struct
Scsi_Host
*
hreg
;
/* registered host structure */
struct
Scsi_Host
*
hreg
;
/* registered host structure */
unsigned
long
flags
;
unsigned
long
flags
;
tpn
t
->
proc_dir
=
&
proc_scsi_qlogic
;
hos
t
->
proc_dir
=
&
proc_scsi_qlogic
;
/* Qlogic Cards only exist at 0x230 or 0x330 (the chip itself decodes the
/* Qlogic Cards only exist at 0x230 or 0x330 (the chip itself decodes the
address - I check 230 first since MIDI cards are typically at 330
address - I check 230 first since MIDI cards are typically at 330
...
...
drivers/scsi/scsi.h
View file @
f8f29af2
...
@@ -511,13 +511,13 @@ static Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors
...
@@ -511,13 +511,13 @@ static Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors
* turned off
* turned off
*/
*/
#define INIT_SCSI_REQUEST \
#define INIT_SCSI_REQUEST \
if (!CURRENT) {\
if (!CURRENT) {
\
CLEAR_INTR; \
CLEAR_INTR; \
restore_flags(flags); \
restore_flags(flags); \
return; \
return; \
} \
} \
if (MAJOR(CURRENT->rq_dev) != MAJOR_NR) \
if (MAJOR(CURRENT->rq_dev) != MAJOR_NR) \
panic(DEVICE_NAME ": request list destroyed");
\
panic(DEVICE_NAME ": request list destroyed");\
if (CURRENT->bh) { \
if (CURRENT->bh) { \
if (!CURRENT->bh->b_lock) \
if (!CURRENT->bh->b_lock) \
panic(DEVICE_NAME ": block not locked"); \
panic(DEVICE_NAME ": block not locked"); \
...
@@ -539,7 +539,7 @@ static Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors
...
@@ -539,7 +539,7 @@ static Scsi_Cmnd * end_scsi_request(Scsi_Cmnd * SCpnt, int uptodate, int sectors
else \
else \
break; \
break; \
} \
} \
remove_wait_queue(QUEUE, &wait);
\
remove_wait_queue(QUEUE, &wait);\
current->state = TASK_RUNNING; \
current->state = TASK_RUNNING; \
}; }
}; }
...
...
drivers/scsi/st.c
View file @
f8f29af2
This diff is collapsed.
Click to expand it.
drivers/scsi/st.h
View file @
f8f29af2
...
@@ -18,7 +18,7 @@ typedef struct {
...
@@ -18,7 +18,7 @@ typedef struct {
int
writing
;
int
writing
;
int
last_result
;
int
last_result
;
int
last_result_fatal
;
int
last_result_fatal
;
unsigned
char
b_data
[
1
]
;
unsigned
char
*
b_data
;
}
ST_buffer
;
}
ST_buffer
;
typedef
struct
{
typedef
struct
{
...
...
drivers/scsi/st_options.h
View file @
f8f29af2
...
@@ -3,12 +3,18 @@
...
@@ -3,12 +3,18 @@
Copyright 1995 Kai Makisara.
Copyright 1995 Kai Makisara.
Last modified:
Sun Sep 10 13:26:02
1995 by root@kai.makisara.fi
Last modified:
Mon Sep 18 21:00:49
1995 by root@kai.makisara.fi
*/
*/
#ifndef _ST_OPTIONS_H
#ifndef _ST_OPTIONS_H
#define _ST_OPTIONS_H
#define _ST_OPTIONS_H
/* The driver allocates the tape buffers when needed if ST_RUNTIME_BUFFERS
is nonzero. Otherwise a number of buffers are allocated at initialization.
The drawback of runtime allocation is that allocation may fail. In any
case the driver tries to allocate a new tape buffer when none is free. */
#define ST_RUNTIME_BUFFERS 0
/* The driver does not wait for some operations to finish before returning
/* The driver does not wait for some operations to finish before returning
to the user program if ST_NOWAIT is non-zero. This helps if the SCSI
to the user program if ST_NOWAIT is non-zero. This helps if the SCSI
adapter does not support multiple outstanding commands. However, the user
adapter does not support multiple outstanding commands. However, the user
...
@@ -30,15 +36,8 @@
...
@@ -30,15 +36,8 @@
SENSE. */
SENSE. */
#define ST_DEFAULT_BLOCK 0
#define ST_DEFAULT_BLOCK 0
/* The tape driver buffer size in kilobytes. When loading as module, the
/* The tape driver buffer size in kilobytes. */
memory block being used is slightly less than a power of two, i.e.,
a 64 kB block is used for a 32 kB buffer => we may as well use what is
being allocated! */
#ifdef MODULE
#define ST_BUFFER_BLOCKS 63
#else
#define ST_BUFFER_BLOCKS 32
#define ST_BUFFER_BLOCKS 32
#endif
/* The number of kilobytes of data in the buffer that triggers an
/* The number of kilobytes of data in the buffer that triggers an
asynchronous write in fixed block mode. See also ST_ASYNC_WRITES
asynchronous write in fixed block mode. See also ST_ASYNC_WRITES
...
...
drivers/sound/soundcard.c
View file @
f8f29af2
...
@@ -618,10 +618,10 @@ sound_mem_init (void)
...
@@ -618,10 +618,10 @@ sound_mem_init (void)
for
(
i
=
MAP_NR
(
start_addr
);
i
<=
MAP_NR
(
end_addr
);
i
++
)
for
(
i
=
MAP_NR
(
start_addr
);
i
<=
MAP_NR
(
end_addr
);
i
++
)
{
{
if
(
mem_map
[
i
])
if
(
mem_map
[
i
]
.
reserved
||
mem_map
[
i
].
count
)
panic
(
"sound_mem_init: Page not free (driver incompatible with kernel).
\n
"
);
panic
(
"sound_mem_init: Page not free (driver incompatible with kernel).
\n
"
);
mem_map
[
i
]
=
MAP_PAGE_RESERVED
;
mem_map
[
i
]
.
reserved
=
1
;
}
}
}
}
}
/* for dev */
}
/* for dev */
...
...
fs/binfmt_elf.c
View file @
f8f29af2
...
@@ -590,7 +590,7 @@ load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
...
@@ -590,7 +590,7 @@ load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
elf_ppnt
->
p_offset
&
0xfffff000
);
elf_ppnt
->
p_offset
&
0xfffff000
);
#ifdef LOW_ELF_STACK
#ifdef LOW_ELF_STACK
if
(
elf_ppnt
->
p_vaddr
&
0xfffff000
<
elf_stack
)
if
(
(
elf_ppnt
->
p_vaddr
&
0xfffff000
)
<
elf_stack
)
elf_stack
=
elf_ppnt
->
p_vaddr
&
0xfffff000
;
elf_stack
=
elf_ppnt
->
p_vaddr
&
0xfffff000
;
#endif
#endif
...
...
fs/buffer.c
View file @
f8f29af2
...
@@ -566,7 +566,7 @@ void refill_freelist(int size)
...
@@ -566,7 +566,7 @@ void refill_freelist(int size)
tmp
=
bh
->
b_next_free
;
tmp
=
bh
->
b_next_free
;
if
(
!
bh
)
break
;
if
(
!
bh
)
break
;
if
(
mem_map
[
MAP_NR
((
unsigned
long
)
bh
->
b_data
)]
!=
1
||
if
(
mem_map
[
MAP_NR
((
unsigned
long
)
bh
->
b_data
)]
.
count
!=
1
||
bh
->
b_dirt
)
{
bh
->
b_dirt
)
{
refile_buffer
(
bh
);
refile_buffer
(
bh
);
continue
;
continue
;
...
@@ -614,7 +614,7 @@ void refill_freelist(int size)
...
@@ -614,7 +614,7 @@ void refill_freelist(int size)
if
(
candidate
[
i
]
==
bh
)
candidate
[
i
]
=
NULL
;
/* Got last one */
if
(
candidate
[
i
]
==
bh
)
candidate
[
i
]
=
NULL
;
/* Got last one */
if
(
bh
->
b_count
||
bh
->
b_size
!=
size
)
if
(
bh
->
b_count
||
bh
->
b_size
!=
size
)
panic
(
"Busy buffer in candidate list
\n
"
);
panic
(
"Busy buffer in candidate list
\n
"
);
if
(
mem_map
[
MAP_NR
((
unsigned
long
)
bh
->
b_data
)]
!=
1
)
if
(
mem_map
[
MAP_NR
((
unsigned
long
)
bh
->
b_data
)]
.
count
!=
1
)
panic
(
"Shared buffer in candidate list
\n
"
);
panic
(
"Shared buffer in candidate list
\n
"
);
if
(
BADNESS
(
bh
))
panic
(
"Buffer in candidate list with BADNESS != 0
\n
"
);
if
(
BADNESS
(
bh
))
panic
(
"Buffer in candidate list with BADNESS != 0
\n
"
);
...
@@ -638,7 +638,7 @@ void refill_freelist(int size)
...
@@ -638,7 +638,7 @@ void refill_freelist(int size)
tmp
=
bh
->
b_next_free
;
tmp
=
bh
->
b_next_free
;
if
(
!
bh
)
break
;
if
(
!
bh
)
break
;
if
(
mem_map
[
MAP_NR
((
unsigned
long
)
bh
->
b_data
)]
!=
1
||
if
(
mem_map
[
MAP_NR
((
unsigned
long
)
bh
->
b_data
)]
.
count
!=
1
||
bh
->
b_dirt
)
{
bh
->
b_dirt
)
{
refile_buffer
(
bh
);
refile_buffer
(
bh
);
continue
;
continue
;
...
@@ -761,7 +761,7 @@ void refile_buffer(struct buffer_head * buf){
...
@@ -761,7 +761,7 @@ void refile_buffer(struct buffer_head * buf){
panic
(
"Attempt to refile free buffer
\n
"
);
panic
(
"Attempt to refile free buffer
\n
"
);
if
(
buf
->
b_dirt
)
if
(
buf
->
b_dirt
)
dispose
=
BUF_DIRTY
;
dispose
=
BUF_DIRTY
;
else
if
(
mem_map
[
MAP_NR
((
unsigned
long
)
buf
->
b_data
)]
>
1
)
else
if
(
mem_map
[
MAP_NR
((
unsigned
long
)
buf
->
b_data
)]
.
count
>
1
)
dispose
=
BUF_SHARED
;
dispose
=
BUF_SHARED
;
else
if
(
buf
->
b_lock
)
else
if
(
buf
->
b_lock
)
dispose
=
BUF_LOCKED
;
dispose
=
BUF_LOCKED
;
...
@@ -1048,7 +1048,7 @@ static unsigned long check_aligned(struct buffer_head * first, unsigned long add
...
@@ -1048,7 +1048,7 @@ static unsigned long check_aligned(struct buffer_head * first, unsigned long add
}
}
if
(
!
aligned
)
if
(
!
aligned
)
return
try_to_align
(
bh
,
nrbuf
,
address
);
return
try_to_align
(
bh
,
nrbuf
,
address
);
mem_map
[
MAP_NR
(
page
)]
++
;
mem_map
[
MAP_NR
(
page
)]
.
count
++
;
read_buffers
(
bh
,
nrbuf
);
/* make sure they are actually read correctly */
read_buffers
(
bh
,
nrbuf
);
/* make sure they are actually read correctly */
while
(
nrbuf
--
>
0
)
while
(
nrbuf
--
>
0
)
brelse
(
bh
[
nrbuf
]);
brelse
(
bh
[
nrbuf
]);
...
@@ -1106,7 +1106,7 @@ static unsigned long try_to_load_aligned(unsigned long address,
...
@@ -1106,7 +1106,7 @@ static unsigned long try_to_load_aligned(unsigned long address,
}
}
buffermem
+=
PAGE_SIZE
;
buffermem
+=
PAGE_SIZE
;
bh
->
b_this_page
=
tmp
;
bh
->
b_this_page
=
tmp
;
mem_map
[
MAP_NR
(
address
)]
++
;
mem_map
[
MAP_NR
(
address
)]
.
count
++
;
buffer_pages
[
MAP_NR
(
address
)]
=
bh
;
buffer_pages
[
MAP_NR
(
address
)]
=
bh
;
read_buffers
(
arr
,
block
);
read_buffers
(
arr
,
block
);
while
(
block
--
>
0
)
while
(
block
--
>
0
)
...
@@ -1308,7 +1308,7 @@ static int try_to_free(struct buffer_head * bh, struct buffer_head ** bhp)
...
@@ -1308,7 +1308,7 @@ static int try_to_free(struct buffer_head * bh, struct buffer_head ** bhp)
buffermem
-=
PAGE_SIZE
;
buffermem
-=
PAGE_SIZE
;
buffer_pages
[
MAP_NR
(
page
)]
=
NULL
;
buffer_pages
[
MAP_NR
(
page
)]
=
NULL
;
free_page
(
page
);
free_page
(
page
);
return
!
mem_map
[
MAP_NR
(
page
)];
return
!
mem_map
[
MAP_NR
(
page
)]
.
count
;
}
}
...
@@ -1471,7 +1471,7 @@ void show_buffers(void)
...
@@ -1471,7 +1471,7 @@ void show_buffers(void)
locked
++
;
locked
++
;
if
(
bh
->
b_dirt
)
if
(
bh
->
b_dirt
)
dirty
++
;
dirty
++
;
if
(
mem_map
[
MAP_NR
(((
unsigned
long
)
bh
->
b_data
))]
!=
1
)
shared
++
;
if
(
mem_map
[
MAP_NR
(((
unsigned
long
)
bh
->
b_data
))]
.
count
!=
1
)
shared
++
;
if
(
bh
->
b_count
)
if
(
bh
->
b_count
)
used
++
,
lastused
=
found
;
used
++
,
lastused
=
found
;
bh
=
bh
->
b_next_free
;
bh
=
bh
->
b_next_free
;
...
@@ -1505,7 +1505,7 @@ static inline int try_to_reassign(struct buffer_head * bh, struct buffer_head **
...
@@ -1505,7 +1505,7 @@ static inline int try_to_reassign(struct buffer_head * bh, struct buffer_head **
*
bhp
=
bh
;
*
bhp
=
bh
;
page
=
(
unsigned
long
)
bh
->
b_data
;
page
=
(
unsigned
long
)
bh
->
b_data
;
page
&=
PAGE_MASK
;
page
&=
PAGE_MASK
;
if
(
mem_map
[
MAP_NR
(
page
)]
!=
1
)
return
0
;
if
(
mem_map
[
MAP_NR
(
page
)]
.
count
!=
1
)
return
0
;
tmp
=
bh
;
tmp
=
bh
;
do
{
do
{
if
(
!
tmp
)
if
(
!
tmp
)
...
...
fs/proc/array.c
View file @
f8f29af2
...
@@ -512,7 +512,7 @@ static inline void statm_pte_range(pmd_t * pmd, unsigned long address, unsigned
...
@@ -512,7 +512,7 @@ static inline void statm_pte_range(pmd_t * pmd, unsigned long address, unsigned
++*
dirty
;
++*
dirty
;
if
(
pte_page
(
page
)
>=
high_memory
)
if
(
pte_page
(
page
)
>=
high_memory
)
continue
;
continue
;
if
(
mem_map
[
MAP_NR
(
pte_page
(
page
))]
>
1
)
if
(
mem_map
[
MAP_NR
(
pte_page
(
page
))]
.
count
>
1
)
++*
shared
;
++*
shared
;
}
while
(
address
<
end
);
}
while
(
address
<
end
);
}
}
...
...
fs/proc/link.c
View file @
f8f29af2
...
@@ -61,7 +61,7 @@ struct inode_operations proc_link_inode_operations = {
...
@@ -61,7 +61,7 @@ struct inode_operations proc_link_inode_operations = {
* looking up the file structure of the newly opened proc fd file, and
* looking up the file structure of the newly opened proc fd file, and
* replacing it with the actual file structure of the process's file
* replacing it with the actual file structure of the process's file
* descriptor. This allows plan 9 semantics, so that the returned
* descriptor. This allows plan 9 semantics, so that the returned
* file descriptor is a
n
dup of the target file descriptor.
* file descriptor is a dup of the target file descriptor.
*/
*/
static
int
proc_fd_dupf
(
struct
inode
*
inode
,
struct
file
*
f
)
static
int
proc_fd_dupf
(
struct
inode
*
inode
,
struct
file
*
f
)
{
{
...
...
fs/proc/mem.c
View file @
f8f29af2
...
@@ -291,7 +291,7 @@ int mem_mmap(struct inode * inode, struct file * file,
...
@@ -291,7 +291,7 @@ int mem_mmap(struct inode * inode, struct file * file,
set_pte
(
src_table
,
pte_mkdirty
(
*
src_table
));
set_pte
(
src_table
,
pte_mkdirty
(
*
src_table
));
set_pte
(
dest_table
,
*
src_table
);
set_pte
(
dest_table
,
*
src_table
);
mem_map
[
MAP_NR
(
pte_page
(
*
src_table
))]
++
;
mem_map
[
MAP_NR
(
pte_page
(
*
src_table
))]
.
count
++
;
stmp
+=
PAGE_SIZE
;
stmp
+=
PAGE_SIZE
;
dtmp
+=
PAGE_SIZE
;
dtmp
+=
PAGE_SIZE
;
...
...
fs/proc/root.c
View file @
f8f29af2
...
@@ -328,8 +328,10 @@ int proc_lookup(struct inode * dir,const char * name, int len,
...
@@ -328,8 +328,10 @@ int proc_lookup(struct inode * dir,const char * name, int len,
}
}
de
=
(
struct
proc_dir_entry
*
)
dir
->
u
.
generic_ip
;
de
=
(
struct
proc_dir_entry
*
)
dir
->
u
.
generic_ip
;
if
(
!
de
)
if
(
!
de
)
{
iput
(
dir
);
return
-
EINVAL
;
return
-
EINVAL
;
}
/* Special case "." and "..": they aren't on the directory list */
/* Special case "." and "..": they aren't on the directory list */
*
result
=
dir
;
*
result
=
dir
;
...
@@ -354,8 +356,10 @@ int proc_lookup(struct inode * dir,const char * name, int len,
...
@@ -354,8 +356,10 @@ int proc_lookup(struct inode * dir,const char * name, int len,
if
(
proc_match
(
len
,
name
,
de
))
if
(
proc_match
(
len
,
name
,
de
))
break
;
break
;
}
}
if
(
!
de
)
if
(
!
de
)
{
iput
(
dir
);
return
-
ENOENT
;
return
-
ENOENT
;
}
ino
=
de
->
low_ino
|
(
dir
->
i_ino
&
~
(
0xffff
));
ino
=
de
->
low_ino
|
(
dir
->
i_ino
&
~
(
0xffff
));
...
@@ -371,11 +375,14 @@ static int proc_root_lookup(struct inode * dir,const char * name, int len,
...
@@ -371,11 +375,14 @@ static int proc_root_lookup(struct inode * dir,const char * name, int len,
struct
inode
**
result
)
struct
inode
**
result
)
{
{
unsigned
int
pid
,
c
;
unsigned
int
pid
,
c
;
int
i
,
ino
;
int
i
,
ino
,
retval
;
int
retval
=
proc_lookup
(
dir
,
name
,
len
,
result
);
dir
->
i_count
++
;
if
(
retval
!=
-
ENOENT
)
retval
=
proc_lookup
(
dir
,
name
,
len
,
result
);
if
(
retval
!=
-
ENOENT
)
{
iput
(
dir
);
return
retval
;
return
retval
;
}
pid
=
0
;
pid
=
0
;
while
(
len
--
>
0
)
{
while
(
len
--
>
0
)
{
...
...
include/asm-alpha/page.h
View file @
f8f29af2
...
@@ -71,9 +71,13 @@ __asm__ __volatile__( \
...
@@ -71,9 +71,13 @@ __asm__ __volatile__( \
#define PAGE_OFFSET 0xFFFFFC0000000000
#define PAGE_OFFSET 0xFFFFFC0000000000
#define MAP_NR(addr) ((((unsigned long) (addr)) - PAGE_OFFSET) >> PAGE_SHIFT)
#define MAP_NR(addr) ((((unsigned long) (addr)) - PAGE_OFFSET) >> PAGE_SHIFT)
#define MAP_PAGE_RESERVED (1<<31)
typedef
unsigned
int
mem_map_t
;
typedef
struct
{
unsigned
count
:
30
,
dirty:
1
,
reserved:
1
;
}
mem_map_t
;
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
...
...
include/asm-alpha/pgtable.h
View file @
f8f29af2
...
@@ -171,35 +171,30 @@ extern inline unsigned long pgd_page(pgd_t pgd)
...
@@ -171,35 +171,30 @@ extern inline unsigned long pgd_page(pgd_t pgd)
extern
inline
int
pte_none
(
pte_t
pte
)
{
return
!
pte_val
(
pte
);
}
extern
inline
int
pte_none
(
pte_t
pte
)
{
return
!
pte_val
(
pte
);
}
extern
inline
int
pte_present
(
pte_t
pte
)
{
return
pte_val
(
pte
)
&
_PAGE_VALID
;
}
extern
inline
int
pte_present
(
pte_t
pte
)
{
return
pte_val
(
pte
)
&
_PAGE_VALID
;
}
extern
inline
int
pte_inuse
(
pte_t
*
ptep
)
{
return
mem_map
[
MAP_NR
(
ptep
)]
!=
1
;
}
extern
inline
int
pte_inuse
(
pte_t
*
ptep
)
{
return
mem_map
[
MAP_NR
(
ptep
)]
.
reserved
||
mem_map
[
MAP_NR
(
ptep
)].
count
!=
1
;
}
extern
inline
void
pte_clear
(
pte_t
*
ptep
)
{
pte_val
(
*
ptep
)
=
0
;
}
extern
inline
void
pte_clear
(
pte_t
*
ptep
)
{
pte_val
(
*
ptep
)
=
0
;
}
extern
inline
void
pte_reuse
(
pte_t
*
ptep
)
extern
inline
void
pte_reuse
(
pte_t
*
ptep
)
{
{
if
(
!
(
mem_map
[
MAP_NR
(
ptep
)]
&
MAP_PAGE_RESERVED
)
)
if
(
!
mem_map
[
MAP_NR
(
ptep
)].
reserved
)
mem_map
[
MAP_NR
(
ptep
)]
++
;
mem_map
[
MAP_NR
(
ptep
)]
.
count
++
;
}
}
extern
inline
int
pmd_none
(
pmd_t
pmd
)
{
return
!
pmd_val
(
pmd
);
}
extern
inline
int
pmd_none
(
pmd_t
pmd
)
{
return
!
pmd_val
(
pmd
);
}
extern
inline
int
pmd_bad
(
pmd_t
pmd
)
{
return
(
pmd_val
(
pmd
)
&
~
_PFN_MASK
)
!=
_PAGE_TABLE
||
pmd_page
(
pmd
)
>
high_memory
;
}
extern
inline
int
pmd_bad
(
pmd_t
pmd
)
{
return
(
pmd_val
(
pmd
)
&
~
_PFN_MASK
)
!=
_PAGE_TABLE
||
pmd_page
(
pmd
)
>
high_memory
;
}
extern
inline
int
pmd_present
(
pmd_t
pmd
)
{
return
pmd_val
(
pmd
)
&
_PAGE_VALID
;
}
extern
inline
int
pmd_present
(
pmd_t
pmd
)
{
return
pmd_val
(
pmd
)
&
_PAGE_VALID
;
}
extern
inline
int
pmd_inuse
(
pmd_t
*
pmdp
)
{
return
mem_map
[
MAP_NR
(
pmdp
)]
!=
1
;
}
extern
inline
int
pmd_inuse
(
pmd_t
*
pmdp
)
{
return
mem_map
[
MAP_NR
(
pmdp
)]
.
reserved
||
mem_map
[
MAP_NR
(
pmdp
)].
count
!=
1
;
}
extern
inline
void
pmd_clear
(
pmd_t
*
pmdp
)
{
pmd_val
(
*
pmdp
)
=
0
;
}
extern
inline
void
pmd_clear
(
pmd_t
*
pmdp
)
{
pmd_val
(
*
pmdp
)
=
0
;
}
extern
inline
void
pmd_reuse
(
pmd_t
*
pmdp
)
extern
inline
void
pmd_reuse
(
pmd_t
*
pmdp
)
{
{
if
(
!
(
mem_map
[
MAP_NR
(
pmdp
)]
&
MAP_PAGE_RESERVED
)
)
if
(
!
mem_map
[
MAP_NR
(
pmdp
)].
reserved
)
mem_map
[
MAP_NR
(
pmdp
)]
++
;
mem_map
[
MAP_NR
(
pmdp
)]
.
count
++
;
}
}
extern
inline
int
pgd_none
(
pgd_t
pgd
)
{
return
!
pgd_val
(
pgd
);
}
extern
inline
int
pgd_none
(
pgd_t
pgd
)
{
return
!
pgd_val
(
pgd
);
}
extern
inline
int
pgd_bad
(
pgd_t
pgd
)
{
return
(
pgd_val
(
pgd
)
&
~
_PFN_MASK
)
!=
_PAGE_TABLE
||
pgd_page
(
pgd
)
>
high_memory
;
}
extern
inline
int
pgd_bad
(
pgd_t
pgd
)
{
return
(
pgd_val
(
pgd
)
&
~
_PFN_MASK
)
!=
_PAGE_TABLE
||
pgd_page
(
pgd
)
>
high_memory
;
}
extern
inline
int
pgd_present
(
pgd_t
pgd
)
{
return
pgd_val
(
pgd
)
&
_PAGE_VALID
;
}
extern
inline
int
pgd_present
(
pgd_t
pgd
)
{
return
pgd_val
(
pgd
)
&
_PAGE_VALID
;
}
extern
inline
int
pgd_inuse
(
pgd_t
*
pgdp
)
{
return
mem_map
[
MAP_NR
(
pgdp
)]
!=
1
;
}
extern
inline
int
pgd_inuse
(
pgd_t
*
pgdp
)
{
return
mem_map
[
MAP_NR
(
pgdp
)]
.
reserved
;
}
extern
inline
void
pgd_clear
(
pgd_t
*
pgdp
)
{
pgd_val
(
*
pgdp
)
=
0
;
}
extern
inline
void
pgd_clear
(
pgd_t
*
pgdp
)
{
pgd_val
(
*
pgdp
)
=
0
;
}
extern
inline
void
pgd_reuse
(
pgd_t
*
pgdp
)
{
if
(
!
(
mem_map
[
MAP_NR
(
pgdp
)]
&
MAP_PAGE_RESERVED
))
mem_map
[
MAP_NR
(
pgdp
)]
++
;
}
/*
/*
* The following only work if pte_present() is true.
* The following only work if pte_present() is true.
...
@@ -273,7 +268,7 @@ extern inline pte_t * pte_offset(pmd_t * dir, unsigned long address)
...
@@ -273,7 +268,7 @@ extern inline pte_t * pte_offset(pmd_t * dir, unsigned long address)
*/
*/
extern
inline
void
pte_free_kernel
(
pte_t
*
pte
)
extern
inline
void
pte_free_kernel
(
pte_t
*
pte
)
{
{
mem_map
[
MAP_NR
(
pte
)]
=
1
;
mem_map
[
MAP_NR
(
pte
)]
.
reserved
=
0
;
free_page
((
unsigned
long
)
pte
);
free_page
((
unsigned
long
)
pte
);
}
}
...
@@ -285,7 +280,7 @@ extern inline pte_t * pte_alloc_kernel(pmd_t *pmd, unsigned long address)
...
@@ -285,7 +280,7 @@ extern inline pte_t * pte_alloc_kernel(pmd_t *pmd, unsigned long address)
if
(
pmd_none
(
*
pmd
))
{
if
(
pmd_none
(
*
pmd
))
{
if
(
page
)
{
if
(
page
)
{
pmd_set
(
pmd
,
page
);
pmd_set
(
pmd
,
page
);
mem_map
[
MAP_NR
(
page
)]
=
MAP_PAGE_RESERVED
;
mem_map
[
MAP_NR
(
page
)]
.
reserved
=
1
;
return
page
+
address
;
return
page
+
address
;
}
}
pmd_set
(
pmd
,
(
pte_t
*
)
BAD_PAGETABLE
);
pmd_set
(
pmd
,
(
pte_t
*
)
BAD_PAGETABLE
);
...
@@ -303,7 +298,7 @@ extern inline pte_t * pte_alloc_kernel(pmd_t *pmd, unsigned long address)
...
@@ -303,7 +298,7 @@ extern inline pte_t * pte_alloc_kernel(pmd_t *pmd, unsigned long address)
extern
inline
void
pmd_free_kernel
(
pmd_t
*
pmd
)
extern
inline
void
pmd_free_kernel
(
pmd_t
*
pmd
)
{
{
mem_map
[
MAP_NR
(
pmd
)]
=
1
;
mem_map
[
MAP_NR
(
pmd
)]
.
reserved
=
0
;
free_page
((
unsigned
long
)
pmd
);
free_page
((
unsigned
long
)
pmd
);
}
}
...
@@ -315,7 +310,7 @@ extern inline pmd_t * pmd_alloc_kernel(pgd_t *pgd, unsigned long address)
...
@@ -315,7 +310,7 @@ extern inline pmd_t * pmd_alloc_kernel(pgd_t *pgd, unsigned long address)
if
(
pgd_none
(
*
pgd
))
{
if
(
pgd_none
(
*
pgd
))
{
if
(
page
)
{
if
(
page
)
{
pgd_set
(
pgd
,
page
);
pgd_set
(
pgd
,
page
);
mem_map
[
MAP_NR
(
page
)]
=
MAP_PAGE_RESERVED
;
mem_map
[
MAP_NR
(
page
)]
.
reserved
=
1
;
return
page
+
address
;
return
page
+
address
;
}
}
pgd_set
(
pgd
,
BAD_PAGETABLE
);
pgd_set
(
pgd
,
BAD_PAGETABLE
);
...
...
include/asm-i386/page.h
View file @
f8f29af2
...
@@ -81,9 +81,12 @@ do { if ((task)->mm == current->mm) invalidate(); } while (0)
...
@@ -81,9 +81,12 @@ do { if ((task)->mm == current->mm) invalidate(); } while (0)
/* This handles the memory map.. */
/* This handles the memory map.. */
#define PAGE_OFFSET 0
#define PAGE_OFFSET 0
#define MAP_NR(addr) (((unsigned long)(addr)) >> PAGE_SHIFT)
#define MAP_NR(addr) (((unsigned long)(addr)) >> PAGE_SHIFT)
#define MAP_PAGE_RESERVED (1<<15)
typedef
unsigned
short
mem_map_t
;
typedef
struct
{
unsigned
count
:
30
,
dirty:
1
,
reserved:
1
;
}
mem_map_t
;
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
...
...
include/asm-i386/pgtable.h
View file @
f8f29af2
...
@@ -143,12 +143,12 @@ do { \
...
@@ -143,12 +143,12 @@ do { \
extern
inline
int
pte_none
(
pte_t
pte
)
{
return
!
pte_val
(
pte
);
}
extern
inline
int
pte_none
(
pte_t
pte
)
{
return
!
pte_val
(
pte
);
}
extern
inline
int
pte_present
(
pte_t
pte
)
{
return
pte_val
(
pte
)
&
_PAGE_PRESENT
;
}
extern
inline
int
pte_present
(
pte_t
pte
)
{
return
pte_val
(
pte
)
&
_PAGE_PRESENT
;
}
extern
inline
int
pte_inuse
(
pte_t
*
ptep
)
{
return
mem_map
[
MAP_NR
(
ptep
)]
!=
1
;
}
extern
inline
int
pte_inuse
(
pte_t
*
ptep
)
{
return
mem_map
[
MAP_NR
(
ptep
)]
.
reserved
||
mem_map
[
MAP_NR
(
ptep
)].
count
!=
1
;
}
extern
inline
void
pte_clear
(
pte_t
*
ptep
)
{
pte_val
(
*
ptep
)
=
0
;
}
extern
inline
void
pte_clear
(
pte_t
*
ptep
)
{
pte_val
(
*
ptep
)
=
0
;
}
extern
inline
void
pte_reuse
(
pte_t
*
ptep
)
extern
inline
void
pte_reuse
(
pte_t
*
ptep
)
{
{
if
(
!
(
mem_map
[
MAP_NR
(
ptep
)]
&
MAP_PAGE_RESERVED
)
)
if
(
!
mem_map
[
MAP_NR
(
ptep
)].
reserved
)
mem_map
[
MAP_NR
(
ptep
)]
++
;
mem_map
[
MAP_NR
(
ptep
)]
.
count
++
;
}
}
extern
inline
int
pmd_none
(
pmd_t
pmd
)
{
return
!
pmd_val
(
pmd
);
}
extern
inline
int
pmd_none
(
pmd_t
pmd
)
{
return
!
pmd_val
(
pmd
);
}
...
@@ -170,13 +170,8 @@ extern inline void pmd_reuse(pmd_t * pmdp) { }
...
@@ -170,13 +170,8 @@ extern inline void pmd_reuse(pmd_t * pmdp) { }
extern
inline
int
pgd_none
(
pgd_t
pgd
)
{
return
0
;
}
extern
inline
int
pgd_none
(
pgd_t
pgd
)
{
return
0
;
}
extern
inline
int
pgd_bad
(
pgd_t
pgd
)
{
return
0
;
}
extern
inline
int
pgd_bad
(
pgd_t
pgd
)
{
return
0
;
}
extern
inline
int
pgd_present
(
pgd_t
pgd
)
{
return
1
;
}
extern
inline
int
pgd_present
(
pgd_t
pgd
)
{
return
1
;
}
extern
inline
int
pgd_inuse
(
pgd_t
*
pgdp
)
{
return
mem_map
[
MAP_NR
(
pgdp
)]
!=
1
;
}
extern
inline
int
pgd_inuse
(
pgd_t
*
pgdp
)
{
return
mem_map
[
MAP_NR
(
pgdp
)]
.
reserved
;
}
extern
inline
void
pgd_clear
(
pgd_t
*
pgdp
)
{
}
extern
inline
void
pgd_clear
(
pgd_t
*
pgdp
)
{
}
extern
inline
void
pgd_reuse
(
pgd_t
*
pgdp
)
{
if
(
!
(
mem_map
[
MAP_NR
(
pgdp
)]
&
MAP_PAGE_RESERVED
))
mem_map
[
MAP_NR
(
pgdp
)]
++
;
}
/*
/*
* The following only work if pte_present() is true.
* The following only work if pte_present() is true.
...
@@ -243,7 +238,7 @@ extern inline pte_t * pte_offset(pmd_t * dir, unsigned long address)
...
@@ -243,7 +238,7 @@ extern inline pte_t * pte_offset(pmd_t * dir, unsigned long address)
*/
*/
extern
inline
void
pte_free_kernel
(
pte_t
*
pte
)
extern
inline
void
pte_free_kernel
(
pte_t
*
pte
)
{
{
mem_map
[
MAP_NR
(
pte
)]
=
1
;
mem_map
[
MAP_NR
(
pte
)]
.
reserved
=
0
;
free_page
((
unsigned
long
)
pte
);
free_page
((
unsigned
long
)
pte
);
}
}
...
@@ -255,7 +250,7 @@ extern inline pte_t * pte_alloc_kernel(pmd_t * pmd, unsigned long address)
...
@@ -255,7 +250,7 @@ extern inline pte_t * pte_alloc_kernel(pmd_t * pmd, unsigned long address)
if
(
pmd_none
(
*
pmd
))
{
if
(
pmd_none
(
*
pmd
))
{
if
(
page
)
{
if
(
page
)
{
pmd_val
(
*
pmd
)
=
_PAGE_TABLE
|
(
unsigned
long
)
page
;
pmd_val
(
*
pmd
)
=
_PAGE_TABLE
|
(
unsigned
long
)
page
;
mem_map
[
MAP_NR
(
page
)]
=
MAP_PAGE_RESERVED
;
mem_map
[
MAP_NR
(
page
)]
.
reserved
=
1
;
return
page
+
address
;
return
page
+
address
;
}
}
pmd_val
(
*
pmd
)
=
_PAGE_TABLE
|
(
unsigned
long
)
BAD_PAGETABLE
;
pmd_val
(
*
pmd
)
=
_PAGE_TABLE
|
(
unsigned
long
)
BAD_PAGETABLE
;
...
...
include/linux/kdev_t.h
View file @
f8f29af2
...
@@ -104,11 +104,11 @@ static inline kdev_t to_kdev_t(int dev)
...
@@ -104,11 +104,11 @@ static inline kdev_t to_kdev_t(int dev)
#else
/* __KERNEL__ */
#else
/* __KERNEL__ */
/*
/*
Some
unfortunate programs want their definitions of MAJOR and MINOR
Some
programs want their definitions of MAJOR and MINOR and MKDEV
from the kernel sources.
from the kernel sources.
These must be the externally visible ones.
*/
*/
#define MAJOR(dev) ((dev)>>8)
#define MAJOR(dev) ((dev)>>8)
#define MINOR(dev) ((dev) & 0xff)
#define MINOR(dev) ((dev) & 0xff)
#define MKDEV(ma,mi) ((ma)<<8 | (mi))
#endif
/* __KERNEL__ */
#endif
/* __KERNEL__ */
#endif
#endif
include/linux/pci.h
View file @
f8f29af2
...
@@ -29,8 +29,11 @@
...
@@ -29,8 +29,11 @@
* - your exact hardware description. Try to find out
* - your exact hardware description. Try to find out
* which device is unknown. It may be you mainboard chipset.
* which device is unknown. It may be you mainboard chipset.
* PCI-CPU bridge or PCI-ISA bridge.
* PCI-CPU bridge or PCI-ISA bridge.
* - Send all that to frederic@cao-vlsi.ibp.fr, and I'll add
* - If you can't find the actual information in your hardware
* your device to the list as soon as possible
* booklet, try to read the references of the chip on the board.
* - Send all that, with the word PCIPROBE in the subject,
* to frederic@cao-vlsi.ibp.fr, and I'll add your device to
* the list as soon as possible
* fred.
* fred.
*/
*/
...
@@ -285,6 +288,8 @@
...
@@ -285,6 +288,8 @@
#define PCI_DEVICE_ID_SI_501 0x0406
#define PCI_DEVICE_ID_SI_501 0x0406
#define PCI_DEVICE_ID_SI_496 0x0496
#define PCI_DEVICE_ID_SI_496 0x0496
#define PCI_DEVICE_ID_SI_601 0x0601
#define PCI_DEVICE_ID_SI_601 0x0601
#define PCI_DEVICE_ID_SI_5511 0x5511
#define PCI_DEVICE_ID_SI_5513 0x5513
#define PCI_VENDOR_ID_HP 0x103c
#define PCI_VENDOR_ID_HP 0x103c
#define PCI_DEVICE_ID_HP_J2585A 0x1030
#define PCI_DEVICE_ID_HP_J2585A 0x1030
...
@@ -345,6 +350,7 @@
...
@@ -345,6 +350,7 @@
#define PCI_VENDOR_ID_CMD 0x1095
#define PCI_VENDOR_ID_CMD 0x1095
#define PCI_DEVICE_ID_CMD_640 0x0640
#define PCI_DEVICE_ID_CMD_640 0x0640
#define PCI_DEVICE_ID_CMD_646 0x0646
#define PCI_VENDOR_ID_VISION 0x1098
#define PCI_VENDOR_ID_VISION 0x1098
#define PCI_DEVICE_ID_VISION_QD8500 0x0001
#define PCI_DEVICE_ID_VISION_QD8500 0x0001
...
@@ -371,6 +377,9 @@
...
@@ -371,6 +377,9 @@
#define PCI_VENDOR_ID_IMS 0x10e0
#define PCI_VENDOR_ID_IMS 0x10e0
#define PCI_DEVICE_ID_IMS_8849 0x8849
#define PCI_DEVICE_ID_IMS_8849 0x8849
#define PCI_VENDOR_ID_REALTEK 0x10ec
#define PCI_DEVICE_ID_REALTEK_8300 0x8029
#define PCI_VENDOR_ID_VIA 0x1106
#define PCI_VENDOR_ID_VIA 0x1106
#define PCI_DEVICE_ID_VIA_82C505 0x0505
#define PCI_DEVICE_ID_VIA_82C505 0x0505
#define PCI_DEVICE_ID_VIA_82C561 0x0561
#define PCI_DEVICE_ID_VIA_82C561 0x0561
...
...
include/linux/proc_fs.h
View file @
f8f29af2
...
@@ -221,7 +221,6 @@ extern int proc_match(int, const char *, struct proc_dir_entry *);
...
@@ -221,7 +221,6 @@ extern int proc_match(int, const char *, struct proc_dir_entry *);
extern
int
proc_readdir
(
struct
inode
*
,
struct
file
*
,
void
*
,
filldir_t
);
extern
int
proc_readdir
(
struct
inode
*
,
struct
file
*
,
void
*
,
filldir_t
);
extern
int
proc_lookup
(
struct
inode
*
,
const
char
*
,
int
,
struct
inode
**
);
extern
int
proc_lookup
(
struct
inode
*
,
const
char
*
,
int
,
struct
inode
**
);
extern
struct
inode_operations
proc_base_inode_operations
;
extern
struct
inode_operations
proc_net_inode_operations
;
extern
struct
inode_operations
proc_net_inode_operations
;
extern
struct
inode_operations
proc_netdir_inode_operations
;
extern
struct
inode_operations
proc_netdir_inode_operations
;
extern
struct
inode_operations
proc_scsi_inode_operations
;
extern
struct
inode_operations
proc_scsi_inode_operations
;
...
...
ipc/shm.c
View file @
f8f29af2
...
@@ -664,7 +664,7 @@ static pte_t shm_swap_in(struct vm_area_struct * shmd, unsigned long offset, uns
...
@@ -664,7 +664,7 @@ static pte_t shm_swap_in(struct vm_area_struct * shmd, unsigned long offset, uns
done:
/* pte_val(pte) == shp->shm_pages[idx] */
done:
/* pte_val(pte) == shp->shm_pages[idx] */
current
->
min_flt
++
;
current
->
min_flt
++
;
mem_map
[
MAP_NR
(
pte_page
(
pte
))]
++
;
mem_map
[
MAP_NR
(
pte_page
(
pte
))]
.
count
++
;
return
pte_modify
(
pte
,
shmd
->
vm_page_prot
);
return
pte_modify
(
pte
,
shmd
->
vm_page_prot
);
}
}
...
@@ -764,7 +764,7 @@ int shm_swap (int prio, unsigned long limit)
...
@@ -764,7 +764,7 @@ int shm_swap (int prio, unsigned long limit)
printk
(
"shm_swap_out: page and pte mismatch
\n
"
);
printk
(
"shm_swap_out: page and pte mismatch
\n
"
);
set_pte
(
page_table
,
set_pte
(
page_table
,
__pte
(
shmd
->
vm_pte
+
SWP_ENTRY
(
0
,
idx
<<
SHM_IDX_SHIFT
)));
__pte
(
shmd
->
vm_pte
+
SWP_ENTRY
(
0
,
idx
<<
SHM_IDX_SHIFT
)));
mem_map
[
MAP_NR
(
pte_page
(
pte
))]
--
;
mem_map
[
MAP_NR
(
pte_page
(
pte
))]
.
count
--
;
if
(
shmd
->
vm_mm
->
rss
>
0
)
if
(
shmd
->
vm_mm
->
rss
>
0
)
shmd
->
vm_mm
->
rss
--
;
shmd
->
vm_mm
->
rss
--
;
invalid
++
;
invalid
++
;
...
@@ -774,7 +774,7 @@ int shm_swap (int prio, unsigned long limit)
...
@@ -774,7 +774,7 @@ int shm_swap (int prio, unsigned long limit)
break
;
break
;
}
}
if
(
mem_map
[
MAP_NR
(
pte_page
(
page
))]
!=
1
)
if
(
mem_map
[
MAP_NR
(
pte_page
(
page
))]
.
count
!=
1
)
goto
check_table
;
goto
check_table
;
shp
->
shm_pages
[
idx
]
=
swap_nr
;
shp
->
shm_pages
[
idx
]
=
swap_nr
;
if
(
invalid
)
if
(
invalid
)
...
...
kernel/ksyms.c
View file @
f8f29af2
...
@@ -92,11 +92,6 @@ int (* dispatch_scsi_info_ptr) (int ino, char *buffer, char **start,
...
@@ -92,11 +92,6 @@ int (* dispatch_scsi_info_ptr) (int ino, char *buffer, char **start,
off_t
offset
,
int
length
,
off_t
offset
,
int
length
,
int
inode
,
int
func
)
=
0
;
/* Dirty hack */
int
inode
,
int
func
)
=
0
;
/* Dirty hack */
#if defined(CONFIG_PROC_FS)
extern
struct
proc_dir_entry
scsi_dir
[];
extern
struct
proc_dir_entry
scsi_hba_dir
[];
#endif
extern
int
sys_tz
;
extern
int
sys_tz
;
extern
int
request_dma
(
unsigned
int
dmanr
,
char
*
deviceID
);
extern
int
request_dma
(
unsigned
int
dmanr
,
char
*
deviceID
);
extern
void
free_dma
(
unsigned
int
dmanr
);
extern
void
free_dma
(
unsigned
int
dmanr
);
...
@@ -290,6 +285,7 @@ struct symbol_table symbol_table = {
...
@@ -290,6 +285,7 @@ struct symbol_table symbol_table = {
X
(
printk
),
X
(
printk
),
X
(
sprintf
),
X
(
sprintf
),
X
(
vsprintf
),
X
(
vsprintf
),
X
(
kdevname
),
X
(
simple_strtoul
),
X
(
simple_strtoul
),
X
(
system_utsname
),
X
(
system_utsname
),
X
(
sys_call_table
),
X
(
sys_call_table
),
...
@@ -416,11 +412,6 @@ struct symbol_table symbol_table = {
...
@@ -416,11 +412,6 @@ struct symbol_table symbol_table = {
*/
*/
X
(
gendisk_head
),
X
(
gendisk_head
),
X
(
resetup_one_dev
),
X
(
resetup_one_dev
),
#if defined(CONFIG_PROC_FS)
X
(
scsi_dir
),
X
(
scsi_hba_dir
),
#endif
X
(
dispatch_scsi_info_ptr
),
X
(
dispatch_scsi_info_ptr
),
#endif
#endif
/* Added to make file system as module */
/* Added to make file system as module */
...
...
mm/filemap.c
View file @
f8f29af2
...
@@ -153,7 +153,7 @@ static pte_t filemap_swapin(struct vm_area_struct * vma,
...
@@ -153,7 +153,7 @@ static pte_t filemap_swapin(struct vm_area_struct * vma,
{
{
unsigned
long
page
=
SWP_OFFSET
(
entry
);
unsigned
long
page
=
SWP_OFFSET
(
entry
);
mem_map
[
page
]
++
;
mem_map
[
page
]
.
count
++
;
page
=
(
page
<<
PAGE_SHIFT
)
+
PAGE_OFFSET
;
page
=
(
page
<<
PAGE_SHIFT
)
+
PAGE_OFFSET
;
return
mk_pte
(
page
,
vma
->
vm_page_prot
);
return
mk_pte
(
page
,
vma
->
vm_page_prot
);
}
}
...
@@ -173,7 +173,7 @@ static inline int filemap_sync_pte(pte_t * ptep, struct vm_area_struct *vma,
...
@@ -173,7 +173,7 @@ static inline int filemap_sync_pte(pte_t * ptep, struct vm_area_struct *vma,
return
0
;
return
0
;
set_pte
(
ptep
,
pte_mkclean
(
pte
));
set_pte
(
ptep
,
pte_mkclean
(
pte
));
page
=
pte_page
(
pte
);
page
=
pte_page
(
pte
);
mem_map
[
MAP_NR
(
page
)]
++
;
mem_map
[
MAP_NR
(
page
)]
.
count
++
;
}
else
{
}
else
{
if
(
pte_none
(
pte
))
if
(
pte_none
(
pte
))
return
0
;
return
0
;
...
...
mm/memory.c
View file @
f8f29af2
...
@@ -207,7 +207,7 @@ static inline void copy_one_pte(pte_t * old_pte, pte_t * new_pte)
...
@@ -207,7 +207,7 @@ static inline void copy_one_pte(pte_t * old_pte, pte_t * new_pte)
set_pte
(
new_pte
,
pte
);
set_pte
(
new_pte
,
pte
);
return
;
return
;
}
}
if
(
pte_page
(
pte
)
>
high_memory
||
(
mem_map
[
MAP_NR
(
pte_page
(
pte
))]
&
MAP_PAGE_RESERVED
)
)
{
if
(
pte_page
(
pte
)
>
high_memory
||
mem_map
[
MAP_NR
(
pte_page
(
pte
))].
reserved
)
{
set_pte
(
new_pte
,
pte
);
set_pte
(
new_pte
,
pte
);
return
;
return
;
}
}
...
@@ -217,7 +217,7 @@ static inline void copy_one_pte(pte_t * old_pte, pte_t * new_pte)
...
@@ -217,7 +217,7 @@ static inline void copy_one_pte(pte_t * old_pte, pte_t * new_pte)
pte
=
pte_mkdirty
(
pte
);
pte
=
pte_mkdirty
(
pte
);
set_pte
(
new_pte
,
pte_mkold
(
pte
));
set_pte
(
new_pte
,
pte_mkold
(
pte
));
set_pte
(
old_pte
,
pte
);
set_pte
(
old_pte
,
pte
);
mem_map
[
MAP_NR
(
pte_page
(
pte
))]
++
;
mem_map
[
MAP_NR
(
pte_page
(
pte
))]
.
count
++
;
}
}
static
inline
int
copy_pte_range
(
pmd_t
*
dst_pmd
,
pmd_t
*
src_pmd
,
unsigned
long
address
,
unsigned
long
size
)
static
inline
int
copy_pte_range
(
pmd_t
*
dst_pmd
,
pmd_t
*
src_pmd
,
unsigned
long
address
,
unsigned
long
size
)
...
@@ -315,7 +315,7 @@ static inline void forget_pte(pte_t page)
...
@@ -315,7 +315,7 @@ static inline void forget_pte(pte_t page)
return
;
return
;
if
(
pte_present
(
page
))
{
if
(
pte_present
(
page
))
{
free_page
(
pte_page
(
page
));
free_page
(
pte_page
(
page
));
if
(
mem_map
[
MAP_NR
(
pte_page
(
page
))]
&
MAP_PAGE_RESERVED
)
if
(
mem_map
[
MAP_NR
(
pte_page
(
page
))]
.
reserved
)
return
;
return
;
if
(
current
->
mm
->
rss
<=
0
)
if
(
current
->
mm
->
rss
<=
0
)
return
;
return
;
...
@@ -479,7 +479,7 @@ static inline void remap_pte_range(pte_t * pte, unsigned long address, unsigned
...
@@ -479,7 +479,7 @@ static inline void remap_pte_range(pte_t * pte, unsigned long address, unsigned
do
{
do
{
pte_t
oldpage
=
*
pte
;
pte_t
oldpage
=
*
pte
;
pte_clear
(
pte
);
pte_clear
(
pte
);
if
(
offset
>=
high_memory
||
(
mem_map
[
MAP_NR
(
offset
)]
&
MAP_PAGE_RESERVED
)
)
if
(
offset
>=
high_memory
||
mem_map
[
MAP_NR
(
offset
)].
reserved
)
set_pte
(
pte
,
mk_pte
(
offset
,
prot
));
set_pte
(
pte
,
mk_pte
(
offset
,
prot
));
forget_pte
(
oldpage
);
forget_pte
(
oldpage
);
address
+=
PAGE_SIZE
;
address
+=
PAGE_SIZE
;
...
@@ -558,7 +558,7 @@ unsigned long put_dirty_page(struct task_struct * tsk, unsigned long page, unsig
...
@@ -558,7 +558,7 @@ unsigned long put_dirty_page(struct task_struct * tsk, unsigned long page, unsig
if
(
page
>=
high_memory
)
if
(
page
>=
high_memory
)
printk
(
"put_dirty_page: trying to put page %08lx at %08lx
\n
"
,
page
,
address
);
printk
(
"put_dirty_page: trying to put page %08lx at %08lx
\n
"
,
page
,
address
);
if
(
mem_map
[
MAP_NR
(
page
)]
!=
1
)
if
(
mem_map
[
MAP_NR
(
page
)]
.
count
!=
1
)
printk
(
"mem_map disagrees with %08lx at %08lx
\n
"
,
page
,
address
);
printk
(
"mem_map disagrees with %08lx at %08lx
\n
"
,
page
,
address
);
pgd
=
pgd_offset
(
tsk
->
mm
,
address
);
pgd
=
pgd_offset
(
tsk
->
mm
,
address
);
pmd
=
pmd_alloc
(
pgd
,
address
);
pmd
=
pmd_alloc
(
pgd
,
address
);
...
@@ -632,9 +632,9 @@ void do_wp_page(struct task_struct * tsk, struct vm_area_struct * vma,
...
@@ -632,9 +632,9 @@ void do_wp_page(struct task_struct * tsk, struct vm_area_struct * vma,
/*
/*
* Do we need to copy?
* Do we need to copy?
*/
*/
if
(
mem_map
[
MAP_NR
(
old_page
)]
!=
1
)
{
if
(
mem_map
[
MAP_NR
(
old_page
)]
.
count
!=
1
)
{
if
(
new_page
)
{
if
(
new_page
)
{
if
(
mem_map
[
MAP_NR
(
old_page
)]
&
MAP_PAGE_RESERVED
)
if
(
mem_map
[
MAP_NR
(
old_page
)]
.
reserved
)
++
vma
->
vm_mm
->
rss
;
++
vma
->
vm_mm
->
rss
;
copy_page
(
old_page
,
new_page
);
copy_page
(
old_page
,
new_page
);
set_pte
(
page_table
,
pte_mkwrite
(
pte_mkdirty
(
mk_pte
(
new_page
,
vma
->
vm_page_prot
))));
set_pte
(
page_table
,
pte_mkwrite
(
pte_mkdirty
(
mk_pte
(
new_page
,
vma
->
vm_page_prot
))));
...
@@ -812,7 +812,7 @@ static int try_to_share(unsigned long to_address, struct vm_area_struct * to_are
...
@@ -812,7 +812,7 @@ static int try_to_share(unsigned long to_address, struct vm_area_struct * to_are
/* is the page reasonable at all? */
/* is the page reasonable at all? */
if
(
pte_page
(
from
)
>=
high_memory
)
if
(
pte_page
(
from
)
>=
high_memory
)
return
0
;
return
0
;
if
(
mem_map
[
MAP_NR
(
pte_page
(
from
))]
&
MAP_PAGE_RESERVED
)
if
(
mem_map
[
MAP_NR
(
pte_page
(
from
))]
.
reserved
)
return
0
;
return
0
;
/* is the destination ok? */
/* is the destination ok? */
to_dir
=
pgd_offset
(
to_area
->
vm_mm
,
to_address
);
to_dir
=
pgd_offset
(
to_area
->
vm_mm
,
to_address
);
...
@@ -862,7 +862,7 @@ static int try_to_share(unsigned long to_address, struct vm_area_struct * to_are
...
@@ -862,7 +862,7 @@ static int try_to_share(unsigned long to_address, struct vm_area_struct * to_are
set_pte
(
from_table
,
pte_mkdirty
(
from
));
set_pte
(
from_table
,
pte_mkdirty
(
from
));
delete_from_swap_cache
(
pte_page
(
from
));
delete_from_swap_cache
(
pte_page
(
from
));
}
}
mem_map
[
MAP_NR
(
pte_page
(
from
))]
++
;
mem_map
[
MAP_NR
(
pte_page
(
from
))]
.
count
++
;
set_pte
(
to_table
,
mk_pte
(
pte_page
(
from
),
to_area
->
vm_page_prot
));
set_pte
(
to_table
,
mk_pte
(
pte_page
(
from
),
to_area
->
vm_page_prot
));
/* Check if we need to do anything at all to the 'from' field */
/* Check if we need to do anything at all to the 'from' field */
if
(
!
pte_write
(
from
))
if
(
!
pte_write
(
from
))
...
@@ -966,7 +966,7 @@ static inline void do_swap_page(struct task_struct * tsk,
...
@@ -966,7 +966,7 @@ static inline void do_swap_page(struct task_struct * tsk,
free_page
(
pte_page
(
page
));
free_page
(
pte_page
(
page
));
return
;
return
;
}
}
if
(
mem_map
[
MAP_NR
(
pte_page
(
page
))]
>
1
&&
!
(
vma
->
vm_flags
&
VM_SHARED
))
if
(
mem_map
[
MAP_NR
(
pte_page
(
page
))]
.
count
>
1
&&
!
(
vma
->
vm_flags
&
VM_SHARED
))
page
=
pte_wrprotect
(
page
);
page
=
pte_wrprotect
(
page
);
++
vma
->
vm_mm
->
rss
;
++
vma
->
vm_mm
->
rss
;
++
tsk
->
maj_flt
;
++
tsk
->
maj_flt
;
...
@@ -1041,7 +1041,7 @@ void do_no_page(struct task_struct * tsk, struct vm_area_struct * vma,
...
@@ -1041,7 +1041,7 @@ void do_no_page(struct task_struct * tsk, struct vm_area_struct * vma,
entry
=
mk_pte
(
page
,
vma
->
vm_page_prot
);
entry
=
mk_pte
(
page
,
vma
->
vm_page_prot
);
if
(
write_access
)
{
if
(
write_access
)
{
entry
=
pte_mkwrite
(
pte_mkdirty
(
entry
));
entry
=
pte_mkwrite
(
pte_mkdirty
(
entry
));
}
else
if
(
mem_map
[
MAP_NR
(
page
)]
>
1
&&
!
(
vma
->
vm_flags
&
VM_SHARED
))
}
else
if
(
mem_map
[
MAP_NR
(
page
)]
.
count
>
1
&&
!
(
vma
->
vm_flags
&
VM_SHARED
))
entry
=
pte_wrprotect
(
entry
);
entry
=
pte_wrprotect
(
entry
);
put_page
(
page_table
,
entry
);
put_page
(
page_table
,
entry
);
}
}
...
...
mm/swap.c
View file @
f8f29af2
...
@@ -367,7 +367,7 @@ static inline int try_to_swap_out(struct task_struct * tsk, struct vm_area_struc
...
@@ -367,7 +367,7 @@ static inline int try_to_swap_out(struct task_struct * tsk, struct vm_area_struc
return
0
;
return
0
;
if
(
page
>=
limit
)
if
(
page
>=
limit
)
return
0
;
return
0
;
if
(
mem_map
[
MAP_NR
(
page
)]
&
MAP_PAGE_RESERVED
)
if
(
mem_map
[
MAP_NR
(
page
)]
.
reserved
)
return
0
;
return
0
;
if
((
pte_dirty
(
pte
)
&&
delete_from_swap_cache
(
page
))
||
pte_young
(
pte
))
{
if
((
pte_dirty
(
pte
)
&&
delete_from_swap_cache
(
page
))
||
pte_young
(
pte
))
{
set_pte
(
page_table
,
pte_mkold
(
pte
));
set_pte
(
page_table
,
pte_mkold
(
pte
));
...
@@ -380,7 +380,7 @@ static inline int try_to_swap_out(struct task_struct * tsk, struct vm_area_struc
...
@@ -380,7 +380,7 @@ static inline int try_to_swap_out(struct task_struct * tsk, struct vm_area_struc
if
(
vma
->
vm_ops
->
swapout
(
vma
,
address
-
vma
->
vm_start
+
vma
->
vm_offset
,
page_table
))
if
(
vma
->
vm_ops
->
swapout
(
vma
,
address
-
vma
->
vm_start
+
vma
->
vm_offset
,
page_table
))
kill_proc
(
pid
,
SIGBUS
,
1
);
kill_proc
(
pid
,
SIGBUS
,
1
);
}
else
{
}
else
{
if
(
mem_map
[
MAP_NR
(
page
)]
!=
1
)
if
(
mem_map
[
MAP_NR
(
page
)]
.
count
!=
1
)
return
0
;
return
0
;
if
(
!
(
entry
=
get_swap_page
()))
if
(
!
(
entry
=
get_swap_page
()))
return
0
;
return
0
;
...
@@ -393,7 +393,7 @@ static inline int try_to_swap_out(struct task_struct * tsk, struct vm_area_struc
...
@@ -393,7 +393,7 @@ static inline int try_to_swap_out(struct task_struct * tsk, struct vm_area_struc
return
1
;
/* we slept: the process may not exist any more */
return
1
;
/* we slept: the process may not exist any more */
}
}
if
((
entry
=
find_in_swap_cache
(
page
)))
{
if
((
entry
=
find_in_swap_cache
(
page
)))
{
if
(
mem_map
[
MAP_NR
(
page
)]
!=
1
)
{
if
(
mem_map
[
MAP_NR
(
page
)]
.
count
!=
1
)
{
set_pte
(
page_table
,
pte_mkdirty
(
pte
));
set_pte
(
page_table
,
pte_mkdirty
(
pte
));
printk
(
"Aiee.. duplicated cached swap-cache entry
\n
"
);
printk
(
"Aiee.. duplicated cached swap-cache entry
\n
"
);
return
0
;
return
0
;
...
@@ -407,7 +407,7 @@ static inline int try_to_swap_out(struct task_struct * tsk, struct vm_area_struc
...
@@ -407,7 +407,7 @@ static inline int try_to_swap_out(struct task_struct * tsk, struct vm_area_struc
vma
->
vm_mm
->
rss
--
;
vma
->
vm_mm
->
rss
--
;
pte_clear
(
page_table
);
pte_clear
(
page_table
);
invalidate
();
invalidate
();
entry
=
mem_map
[
MAP_NR
(
page
)];
entry
=
mem_map
[
MAP_NR
(
page
)]
.
count
;
free_page
(
page
);
free_page
(
page
);
return
entry
;
return
entry
;
}
}
...
@@ -717,21 +717,21 @@ static inline void check_free_buffers(unsigned long addr)
...
@@ -717,21 +717,21 @@ static inline void check_free_buffers(unsigned long addr)
void
free_pages
(
unsigned
long
addr
,
unsigned
long
order
)
void
free_pages
(
unsigned
long
addr
,
unsigned
long
order
)
{
{
if
(
addr
<
high_memory
)
{
if
(
MAP_NR
(
addr
)
<
MAP_NR
(
high_memory
)
)
{
unsigned
long
flag
;
unsigned
long
flag
;
mem_map_t
*
map
=
mem_map
+
MAP_NR
(
addr
);
mem_map_t
*
map
=
mem_map
+
MAP_NR
(
addr
);
if
(
*
map
)
{
if
(
map
->
reserved
)
if
(
!
(
*
map
&
MAP_PAGE_RESERVED
))
{
return
;
if
(
map
->
count
)
{
save_flags
(
flag
);
save_flags
(
flag
);
cli
();
cli
();
if
(
!--*
map
)
{
if
(
!--
map
->
count
)
{
free_pages_ok
(
addr
,
order
);
free_pages_ok
(
addr
,
order
);
delete_from_swap_cache
(
addr
);
delete_from_swap_cache
(
addr
);
}
}
restore_flags
(
flag
);
restore_flags
(
flag
);
if
(
*
map
==
1
)
if
(
map
->
count
==
1
)
check_free_buffers
(
addr
);
check_free_buffers
(
addr
);
}
return
;
return
;
}
}
printk
(
"Trying to free free memory (%08lx): memory probably corrupted
\n
"
,
addr
);
printk
(
"Trying to free free memory (%08lx): memory probably corrupted
\n
"
,
addr
);
...
@@ -775,7 +775,7 @@ do { unsigned long size = PAGE_SIZE << high; \
...
@@ -775,7 +775,7 @@ do { unsigned long size = PAGE_SIZE << high; \
mark_used((unsigned long) addr, high); \
mark_used((unsigned long) addr, high); \
restore_flags(flags); \
restore_flags(flags); \
addr = (struct mem_list *) (size + (unsigned long) addr); \
addr = (struct mem_list *) (size + (unsigned long) addr); \
} mem_map[MAP_NR((unsigned long) addr)] = 1; \
} mem_map[MAP_NR((unsigned long) addr)]
.count
= 1; \
} while (0)
} while (0)
unsigned
long
__get_free_pages
(
int
priority
,
unsigned
long
order
,
unsigned
long
limit
)
unsigned
long
__get_free_pages
(
int
priority
,
unsigned
long
order
,
unsigned
long
limit
)
...
@@ -956,6 +956,8 @@ static int unuse_process(struct task_struct * p, unsigned int type, unsigned lon
...
@@ -956,6 +956,8 @@ static int unuse_process(struct task_struct * p, unsigned int type, unsigned lon
/*
/*
* Go through process' page directory.
* Go through process' page directory.
*/
*/
if
(
!
p
->
mm
||
pgd_inuse
(
p
->
mm
->
pgd
))
return
0
;
vma
=
p
->
mm
->
mmap
;
vma
=
p
->
mm
->
mmap
;
while
(
vma
)
{
while
(
vma
)
{
pgd_t
*
pgd
=
pgd_offset
(
p
->
mm
,
vma
->
vm_start
);
pgd_t
*
pgd
=
pgd_offset
(
p
->
mm
,
vma
->
vm_start
);
...
@@ -1244,7 +1246,7 @@ void si_swapinfo(struct sysinfo *val)
...
@@ -1244,7 +1246,7 @@ void si_swapinfo(struct sysinfo *val)
/*
/*
* set up the free-area data structures:
* set up the free-area data structures:
* - mark all pages
MAP_PAGE_RESERVED
* - mark all pages
reserved
* - mark all memory queues empty
* - mark all memory queues empty
* - clear the memory bitmaps
* - clear the memory bitmaps
*/
*/
...
@@ -1266,8 +1268,12 @@ unsigned long free_area_init(unsigned long start_mem, unsigned long end_mem)
...
@@ -1266,8 +1268,12 @@ unsigned long free_area_init(unsigned long start_mem, unsigned long end_mem)
mem_map
=
(
mem_map_t
*
)
start_mem
;
mem_map
=
(
mem_map_t
*
)
start_mem
;
p
=
mem_map
+
MAP_NR
(
end_mem
);
p
=
mem_map
+
MAP_NR
(
end_mem
);
start_mem
=
LONG_ALIGN
((
unsigned
long
)
p
);
start_mem
=
LONG_ALIGN
((
unsigned
long
)
p
);
while
(
p
>
mem_map
)
while
(
p
>
mem_map
)
{
*--
p
=
MAP_PAGE_RESERVED
;
--
p
;
p
->
count
=
0
;
p
->
dirty
=
0
;
p
->
reserved
=
1
;
}
for
(
i
=
0
;
i
<
NR_MEM_LISTS
;
i
++
)
{
for
(
i
=
0
;
i
<
NR_MEM_LISTS
;
i
++
)
{
unsigned
long
bitmap_size
;
unsigned
long
bitmap_size
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment