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
Kirill Smelkov
linux
Commits
5cb39380
Commit
5cb39380
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 2.3.99pre7
parent
0f0078de
Changes
19
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
3676 additions
and
1405 deletions
+3676
-1405
Documentation/sound/via82cxxx.txt
Documentation/sound/via82cxxx.txt
+50
-37
Documentation/usb/ov511.txt
Documentation/usb/ov511.txt
+9
-2
drivers/cdrom/cdrom.c
drivers/cdrom/cdrom.c
+17
-15
drivers/ide/ide-cd.c
drivers/ide/ide-cd.c
+26
-20
drivers/ide/ide-cd.h
drivers/ide/ide-cd.h
+1
-11
drivers/net/starfire.c
drivers/net/starfire.c
+1
-1
drivers/sound/Config.in
drivers/sound/Config.in
+2
-1
drivers/sound/Makefile
drivers/sound/Makefile
+1
-1
drivers/sound/emu10k1/main.c
drivers/sound/emu10k1/main.c
+2
-2
drivers/sound/soundmodule.h
drivers/sound/soundmodule.h
+1
-1
drivers/sound/via82cxxx_audio.c
drivers/sound/via82cxxx_audio.c
+2240
-426
drivers/usb/ov511.c
drivers/usb/ov511.c
+1172
-799
drivers/usb/ov511.h
drivers/usb/ov511.h
+68
-49
drivers/video/clgenfb.c
drivers/video/clgenfb.c
+5
-4
drivers/video/vesafb.c
drivers/video/vesafb.c
+9
-2
fs/buffer.c
fs/buffer.c
+1
-3
include/linux/swap.h
include/linux/swap.h
+7
-2
mm/filemap.c
mm/filemap.c
+62
-25
mm/vmscan.c
mm/vmscan.c
+2
-4
No files found.
Documentation/sound/via82cxxx.txt
View file @
5cb39380
...
@@ -13,12 +13,11 @@ The via82cxxx audio driver found in the drivers/sound directory
...
@@ -13,12 +13,11 @@ The via82cxxx audio driver found in the drivers/sound directory
of the kernel source tree is a PCI audio driver for audio chips
of the kernel source tree is a PCI audio driver for audio chips
found on Via-based motherboards, such as the MVP4.
found on Via-based motherboards, such as the MVP4.
Currently the driver provides audio via SoundBlaster Pro compatibility,
Currently the driver exports the following features:
and MIDI via MPU-401 compatibility. An AC97 mixing device is also
supported, and is generally preferred over the SoundBlaster mixer.
IMPORTANT NOTE: Some users report that the SoundBlaster mixer does
* /dev/dsp and /dev/audio support
not work at all -- use the AC97 mixer if possible.
* 16-bit stereo PCM output channel
* AC97 mixer
Please send bug reports to the mailing list linux-via@gtf.org.
Please send bug reports to the mailing list linux-via@gtf.org.
To subscribe, e-mail majordomo@gtf.org with "subscribe linux-via" in the
To subscribe, e-mail majordomo@gtf.org with "subscribe linux-via" in the
...
@@ -27,7 +26,7 @@ body of the message.
...
@@ -27,7 +26,7 @@ body of the message.
Thanks
Thanks
------------------------------------------------------------------------
------------------------------------------------------------------------
Via for providing e-mail support, specs, and NDA'
s
source code.
Via for providing e-mail support, specs, and NDA'
d
source code.
MandrakeSoft for providing hacking time.
MandrakeSoft for providing hacking time.
...
@@ -40,15 +39,10 @@ Installation
...
@@ -40,15 +39,10 @@ Installation
If the driver is being statically compiled into the kernel, no
If the driver is being statically compiled into the kernel, no
configuration should be necessary.
configuration should be necessary.
If the driver is being compiled as a module, generally
two lines
must
If the driver is being compiled as a module, generally
one line
must
be added to your /etc/conf.modules (or /etc/modules.conf) file:
be added to your /etc/conf.modules (or /etc/modules.conf) file:
alias sound via82cxxx
alias sound via82cxxx_audio
options sb support=1
The second line is very important: it tells the required 'sb' module
not to load SoundBlaster support, but to instead let the Via driver
do so at a later time.
...
@@ -63,8 +57,8 @@ Some architecture remains for multiple cards, feel free to submit
...
@@ -63,8 +57,8 @@ Some architecture remains for multiple cards, feel free to submit
a patch to clean some of that up. Ideally,
a patch to clean some of that up. Ideally,
No consideration for SMP, this chipset is not known to be found on
No consideration for SMP, this chipset is not known to be found on
any SMP motherboards. However,
this will change when we start handling
any SMP motherboards. However,
spin_locks must be used anyway in order
our own interrupts in "native mode."
to handle interrupts correctly.
GNU indent formatting options: -kr -i8 -pcs
GNU indent formatting options: -kr -i8 -pcs
...
@@ -76,29 +70,17 @@ The following is an _incomplete_ list of motherboards supported by this
...
@@ -76,29 +70,17 @@ The following is an _incomplete_ list of motherboards supported by this
audio driver. If your motherboard (or notebook) is not listed here,
audio driver. If your motherboard (or notebook) is not listed here,
please e-mail the maintainer with details.
please e-mail the maintainer with details.
AOpen MX59 Pro (Apollo MVP4)
AOpen MX59 Pro
Compaq Presario 1247
The Future
Random Developer Notes / Comments
------------------------------------------------------------------------
------------------------------------------------------------------------
Via has graciously donated e-mail support and source code to help further
Via has graciously donated e-mail support and source code to help further
the development of this driver. Their assistance has been invaluable
the development of this driver. Their assistance has been invaluable
in the design and coding of the next major version of this driver.
in the design and coding of the next major version of this driver.
This audio chip supports a DirectSound(tm)-style hardware interface,
with a single 16-bit stereo input channel, and a single 16-bit stereo
output channel. Data is transferred to/from the hardware using
table-driven scatter-gather DMA buffers.
Work is currently underway to support this "native mode" of the chip.
When complete, SoundBlaster legacy mode will be completely removed.
After a round of testing, this code will become version 2.0.0.
Following the 2.0.0 release, the last major task to complete is
MIDI support. MPU-401 legacy support is available currently, but
not well tested at all.
The Via audio chip apparently provides a second PCM scatter-gather
The Via audio chip apparently provides a second PCM scatter-gather
DMA channel just for FM data, but does not have a full hardware MIDI
DMA channel just for FM data, but does not have a full hardware MIDI
processor. I haven't put much thought towards a solution here, but it
processor. I haven't put much thought towards a solution here, but it
...
@@ -109,11 +91,15 @@ support altogether and using the FM PCM channel as a second (input? output?)
...
@@ -109,11 +91,15 @@ support altogether and using the FM PCM channel as a second (input? output?)
General To-do List (patches/suggestions welcome)
General To-do List (patches/suggestions welcome)
------------------------------------------------------------------------
------------------------------------------------------------------------
Better docs
Recording support
Code review by sound guru(s)
mmap support
Native DSP audio driver using scatter-gather DMA, as described above
Other advanced ioctls
Better docs
Code review
Native MIDI driver, as described above
Native MIDI driver, as described above
...
@@ -121,8 +107,35 @@ Native MIDI driver, as described above
...
@@ -121,8 +107,35 @@ Native MIDI driver, as described above
Known bugs (patches/suggestions welcome)
Known bugs (patches/suggestions welcome)
------------------------------------------------------------------------
------------------------------------------------------------------------
1) Two MIDI devices are loaded by the sound driver. Eliminate one of them.
1) Volume too low on many systems. Workaround: use mixer program
such as xmixer to increase volume.
2) RealPlayer output very scratchy.
3) Applications which attempt to open the sound device in read/write
mode (O_RDWR) will fail. This is incorrect OSS behavior, but since
this driver will eventually support recording as well as playback,
we will be able to (in the future) support even broken programs which
unconditionally use O_RDWR.
Submitting a bug report
------------------------------------------------------------------------
Describe the application you were using to play/record sound, and how
to reproduce the problem.
Obtain the via-audio-diag diagnostics program from
http://gtf.org/garzik/drivers/via82cxxx/ and provide a dump of the
audio chip's registers while the problem is occurring. Sample command line:
./via-audio-diag -aps > diag-output.txt
Define "VIA_DEBUG" at the beginning of the driver, then capture and email
the kernel log output. This can be viewed in the system kernel log (if
enabled), or via the 'dmesg' program.
If you wish to increase the size of the buffer displayed by 'dmesg', then
change the LOG_BUF_LEN macro at the top of linux/kernel/printk.c, recompile
your kernel, and pass the "-s <size>" option to 'dmesg'.
2) Two mixer devices are loaded by the sound driver. Eliminate one of
them. At least one bug report says that SB mixer does not work at all,
only AC97 mixer.
Documentation/usb/ov511.txt
View file @
5cb39380
...
@@ -6,8 +6,11 @@ Author: Mark McClelland
...
@@ -6,8 +6,11 @@ Author: Mark McClelland
Homepage: http://alpha.dyndns.org/ov511
Homepage: http://alpha.dyndns.org/ov511
NEW IN THIS VERSION:
NEW IN THIS VERSION:
o Support for OV511+
o Improvements to sensor detection code
o Support for OV7620
o Added "i2c_detect_tries" and "aperture" parameters
o proc filesystem status support
o read() fixed partially
o code cleanups and minor fixes
INTRODUCTION:
INTRODUCTION:
...
@@ -151,11 +154,13 @@ WORKING FEATURES:
...
@@ -151,11 +154,13 @@ WORKING FEATURES:
o Monochrome
o Monochrome
o Setting/getting of saturation, contrast and brightness (no hue yet; only
o Setting/getting of saturation, contrast and brightness (no hue yet; only
works with OV7610, not the OV7620 or OV7620AE)
works with OV7610, not the OV7620 or OV7620AE)
o proc status reporting
EXPERIMENTAL FEATURES:
EXPERIMENTAL FEATURES:
o fix_rgb_offset: Sometimes works, but other times causes errors with xawtv and
o fix_rgb_offset: Sometimes works, but other times causes errors with xawtv and
corrupted frames.
corrupted frames.
o Snapshot mode (only works with some read() based apps; see below for more)
o Snapshot mode (only works with some read() based apps; see below for more)
o read() support
TODO:
TODO:
o Fix the noise / grainy image problem.
o Fix the noise / grainy image problem.
...
@@ -180,6 +185,8 @@ TODO:
...
@@ -180,6 +185,8 @@ TODO:
o Get rid of the memory management functions (put them in videodev.c??)
o Get rid of the memory management functions (put them in videodev.c??)
o Setting of contrast and brightness not working with 7620
o Setting of contrast and brightness not working with 7620
o Driver/camera state save/restore for when USB supports suspend/resume
o Driver/camera state save/restore for when USB supports suspend/resume
o Multiple cameras reportedly do not work simultaneously
o Problems with OHCI
HOW TO CONTACT ME:
HOW TO CONTACT ME:
...
...
drivers/cdrom/cdrom.c
View file @
5cb39380
...
@@ -200,10 +200,21 @@
...
@@ -200,10 +200,21 @@
-- Clear header length in mode_select unconditionally.
-- Clear header length in mode_select unconditionally.
-- Removed the register_disk() that was added, not needed here.
-- Removed the register_disk() that was added, not needed here.
3.08 May 1, 2000 - Jens Axboe <axboe@suse.de>
-- Fix direction flag in setup_send_key and setup_report_key. This
gave some SCSI adapters problems.
-- Always return -EROFS for write opens
-- Convert to module_init/module_exit style init and remove some
of the #ifdef MODULE stuff
-- Fix several dvd errors - DVD_LU_SEND_ASF should pass agid,
DVD_HOST_SEND_RPC_STATE did not set buffer size in cdb, and
dvd_do_auth passed uninitialized data to drive because init_cdrom_command
did not clear a 0 sized buffer.
-------------------------------------------------------------------------*/
-------------------------------------------------------------------------*/
#define REVISION "Revision: 3.0
7
"
#define REVISION "Revision: 3.0
8
"
#define VERSION "Id: cdrom.c 3.0
7 2000/02/02
"
#define VERSION "Id: cdrom.c 3.0
8 2000/05/01
"
/* I use an error-log mask to give fine grain control over the type of
/* I use an error-log mask to give fine grain control over the type of
messages dumped to the system logs. The available masks include: */
messages dumped to the system logs. The available masks include: */
...
@@ -432,17 +443,6 @@ struct cdrom_device_info *cdrom_find_device(kdev_t dev)
...
@@ -432,17 +443,6 @@ struct cdrom_device_info *cdrom_find_device(kdev_t dev)
while
(
cdi
!=
NULL
&&
cdi
->
dev
!=
dev
)
while
(
cdi
!=
NULL
&&
cdi
->
dev
!=
dev
)
cdi
=
cdi
->
next
;
cdi
=
cdi
->
next
;
/* we need to find the device this way when IDE devices such
* as /dev/hdc2 are opened. SCSI drives will be found above and
* so will /dev/hdc, for instance.
*/
if
(
cdi
==
NULL
)
{
kdev_t
cd_dev
=
MKDEV
(
MAJOR
(
dev
),
MINOR
(
dev
)
|
CD_PART_MASK
);
cdi
=
topCdromPtr
;
while
(
cdi
!=
NULL
&&
cdi
->
dev
!=
cd_dev
)
cdi
=
cdi
->
next
;
}
return
cdi
;
return
cdi
;
}
}
...
@@ -834,7 +834,7 @@ static int cdrom_media_changed(kdev_t dev)
...
@@ -834,7 +834,7 @@ static int cdrom_media_changed(kdev_t dev)
/* This talks to the VFS, which doesn't like errors - just 1 or 0.
/* This talks to the VFS, which doesn't like errors - just 1 or 0.
* Returning "0" is always safe (media hasn't been changed). Do that
* Returning "0" is always safe (media hasn't been changed). Do that
* if the low-level cdrom driver dosn't support media changed. */
* if the low-level cdrom driver dosn't support media changed. */
if
(
cdi
->
ops
->
media_changed
==
NULL
)
if
(
cdi
==
NULL
||
cdi
->
ops
->
media_changed
==
NULL
)
return
0
;
return
0
;
if
(
!
CDROM_CAN
(
CDC_MEDIA_CHANGED
))
if
(
!
CDROM_CAN
(
CDC_MEDIA_CHANGED
))
return
0
;
return
0
;
...
@@ -994,6 +994,7 @@ static int dvd_do_auth(struct cdrom_device_info *cdi, dvd_authinfo *ai)
...
@@ -994,6 +994,7 @@ static int dvd_do_auth(struct cdrom_device_info *cdi, dvd_authinfo *ai)
struct
cdrom_generic_command
cgc
;
struct
cdrom_generic_command
cgc
;
struct
cdrom_device_ops
*
cdo
=
cdi
->
ops
;
struct
cdrom_device_ops
*
cdo
=
cdi
->
ops
;
memset
(
buf
,
0
,
sizeof
(
buf
));
init_cdrom_command
(
&
cgc
,
buf
,
0
,
CGC_DATA_READ
);
init_cdrom_command
(
&
cgc
,
buf
,
0
,
CGC_DATA_READ
);
switch
(
ai
->
type
)
{
switch
(
ai
->
type
)
{
...
@@ -1052,7 +1053,7 @@ static int dvd_do_auth(struct cdrom_device_info *cdi, dvd_authinfo *ai)
...
@@ -1052,7 +1053,7 @@ static int dvd_do_auth(struct cdrom_device_info *cdi, dvd_authinfo *ai)
case
DVD_LU_SEND_ASF
:
case
DVD_LU_SEND_ASF
:
cdinfo
(
CD_DVD
,
"entering DVD_LU_SEND_ASF
\n
"
);
cdinfo
(
CD_DVD
,
"entering DVD_LU_SEND_ASF
\n
"
);
setup_report_key
(
&
cgc
,
ai
->
lsasf
.
a
sf
,
5
);
setup_report_key
(
&
cgc
,
ai
->
lsasf
.
a
gid
,
5
);
if
((
ret
=
cdo
->
generic_packet
(
cdi
,
&
cgc
)))
if
((
ret
=
cdo
->
generic_packet
(
cdi
,
&
cgc
)))
return
ret
;
return
ret
;
...
@@ -1113,6 +1114,7 @@ static int dvd_do_auth(struct cdrom_device_info *cdi, dvd_authinfo *ai)
...
@@ -1113,6 +1114,7 @@ static int dvd_do_auth(struct cdrom_device_info *cdi, dvd_authinfo *ai)
case
DVD_HOST_SEND_RPC_STATE
:
case
DVD_HOST_SEND_RPC_STATE
:
cdinfo
(
CD_DVD
,
"entering DVD_HOST_SEND_RPC_STATE
\n
"
);
cdinfo
(
CD_DVD
,
"entering DVD_HOST_SEND_RPC_STATE
\n
"
);
setup_send_key
(
&
cgc
,
0
,
6
);
setup_send_key
(
&
cgc
,
0
,
6
);
buf
[
1
]
=
6
;
buf
[
4
]
=
ai
->
hrpcs
.
pdrc
;
buf
[
4
]
=
ai
->
hrpcs
.
pdrc
;
if
((
ret
=
cdo
->
generic_packet
(
cdi
,
&
cgc
)))
if
((
ret
=
cdo
->
generic_packet
(
cdi
,
&
cgc
)))
...
...
drivers/ide/ide-cd.c
View file @
5cb39380
...
@@ -282,9 +282,12 @@
...
@@ -282,9 +282,12 @@
* - cdrom_read_capacity returns one frame too little.
* - cdrom_read_capacity returns one frame too little.
* - Fix real capacity reporting.
* - Fix real capacity reporting.
*
*
* 4.58 May 1, 2000 - Clean up ACER50 stuff.
* - Fix small problem with ide_cdrom_capacity
*
*************************************************************************/
*************************************************************************/
#define IDECD_VERSION "4.5
7
"
#define IDECD_VERSION "4.5
8
"
#include <linux/config.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/module.h>
...
@@ -1521,7 +1524,7 @@ cdrom_lockdoor(ide_drive_t *drive, int lockflag, struct request_sense *sense)
...
@@ -1521,7 +1524,7 @@ cdrom_lockdoor(ide_drive_t *drive, int lockflag, struct request_sense *sense)
memset
(
&
pc
,
0
,
sizeof
(
pc
));
memset
(
&
pc
,
0
,
sizeof
(
pc
));
pc
.
sense
=
sense
;
pc
.
sense
=
sense
;
pc
.
c
[
0
]
=
GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL
;
pc
.
c
[
0
]
=
GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL
;
pc
.
c
[
4
]
=
(
lockflag
!=
0
)
;
pc
.
c
[
4
]
=
lockflag
?
3
:
0
;
stat
=
cdrom_queue_packet_command
(
drive
,
&
pc
);
stat
=
cdrom_queue_packet_command
(
drive
,
&
pc
);
}
}
...
@@ -1857,6 +1860,10 @@ static int ide_cdrom_packet(struct cdrom_device_info *cdi,
...
@@ -1857,6 +1860,10 @@ static int ide_cdrom_packet(struct cdrom_device_info *cdi,
pc
.
buffer
=
cgc
->
buffer
;
pc
.
buffer
=
cgc
->
buffer
;
pc
.
buflen
=
cgc
->
buflen
;
pc
.
buflen
=
cgc
->
buflen
;
cgc
->
stat
=
cdrom_queue_packet_command
(
drive
,
&
pc
);
cgc
->
stat
=
cdrom_queue_packet_command
(
drive
,
&
pc
);
/*
* FIXME: copy sense, don't just assign pointer!!
*/
cgc
->
sense
=
pc
.
sense
;
cgc
->
sense
=
pc
.
sense
;
return
cgc
->
stat
;
return
cgc
->
stat
;
...
@@ -2159,9 +2166,9 @@ static int ide_cdrom_register (ide_drive_t *drive, int nslots)
...
@@ -2159,9 +2166,9 @@ static int ide_cdrom_register (ide_drive_t *drive, int nslots)
{
{
struct
cdrom_info
*
info
=
drive
->
driver_data
;
struct
cdrom_info
*
info
=
drive
->
driver_data
;
struct
cdrom_device_info
*
devinfo
=
&
info
->
devinfo
;
struct
cdrom_device_info
*
devinfo
=
&
info
->
devinfo
;
int
minor
=
(
drive
->
select
.
b
.
unit
)
<<
PARTN_BITS
;
int
minor
=
(
drive
->
select
.
b
.
unit
)
<<
PARTN_BITS
;
devinfo
->
dev
=
MKDEV
(
HWIF
(
drive
)
->
major
,
minor
|
CD_PART_MASK
);
devinfo
->
dev
=
MKDEV
(
HWIF
(
drive
)
->
major
,
minor
);
devinfo
->
ops
=
&
ide_cdrom_dops
;
devinfo
->
ops
=
&
ide_cdrom_dops
;
devinfo
->
mask
=
0
;
devinfo
->
mask
=
0
;
*
(
int
*
)
&
devinfo
->
speed
=
CDROM_STATE_FLAGS
(
drive
)
->
current_speed
;
*
(
int
*
)
&
devinfo
->
speed
=
CDROM_STATE_FLAGS
(
drive
)
->
current_speed
;
...
@@ -2195,22 +2202,23 @@ static int ide_cdrom_register (ide_drive_t *drive, int nslots)
...
@@ -2195,22 +2202,23 @@ static int ide_cdrom_register (ide_drive_t *drive, int nslots)
return
register_cdrom
(
devinfo
);
return
register_cdrom
(
devinfo
);
}
}
/*
* the buffer struct used by ide_cdrom_get_capabilities()
*/
struct
get_capabilities_buf
{
char
pad
[
8
];
struct
atapi_capabilities_page
cap
;
char
extra_cap
[
4
];
};
static
static
int
ide_cdrom_get_capabilities
(
ide_drive_t
*
drive
,
struct
atapi_capabilities_page
*
cap
)
int
ide_cdrom_get_capabilities
(
ide_drive_t
*
drive
,
struct
atapi_capabilities_page
*
cap
)
{
{
struct
cdrom_info
*
info
=
drive
->
driver_data
;
struct
cdrom_info
*
info
=
drive
->
driver_data
;
struct
cdrom_device_info
*
cdi
=
&
info
->
devinfo
;
struct
cdrom_device_info
*
cdi
=
&
info
->
devinfo
;
struct
cdrom_generic_command
cgc
;
struct
cdrom_generic_command
cgc
;
int
stat
,
attempts
=
3
;
int
stat
,
attempts
=
3
,
size
=
sizeof
(
*
cap
);
/*
* ACER50 (and others?) require the full spec length mode sense
* page capabilities size, but older drives break.
*/
if
(
drive
->
id
)
{
if
(
!
(
!
strcmp
(
drive
->
id
->
model
,
"ATAPI CD ROM DRIVE 50X MAX"
)
||
!
strcmp
(
drive
->
id
->
model
,
"WPI CDS-32X"
)))
size
-=
sizeof
(
cap
->
pad
);
}
/* we have to cheat a little here. the packet will eventually
/* we have to cheat a little here. the packet will eventually
* be queued with ide_cdrom_packet(), which extracts the
* be queued with ide_cdrom_packet(), which extracts the
...
@@ -2220,7 +2228,7 @@ int ide_cdrom_get_capabilities(ide_drive_t *drive, struct atapi_capabilities_pag
...
@@ -2220,7 +2228,7 @@ int ide_cdrom_get_capabilities(ide_drive_t *drive, struct atapi_capabilities_pag
*/
*/
cdi
->
handle
=
(
ide_drive_t
*
)
drive
;
cdi
->
handle
=
(
ide_drive_t
*
)
drive
;
cdi
->
ops
=
&
ide_cdrom_dops
;
cdi
->
ops
=
&
ide_cdrom_dops
;
init_cdrom_command
(
&
cgc
,
cap
,
size
of
(
*
cap
)
,
CGC_DATA_UNKNOWN
);
init_cdrom_command
(
&
cgc
,
cap
,
size
,
CGC_DATA_UNKNOWN
);
do
{
/* we seem to get stat=0x01,err=0x00 the first time (??) */
do
{
/* we seem to get stat=0x01,err=0x00 the first time (??) */
stat
=
cdrom_mode_sense
(
cdi
,
&
cgc
,
GPMODE_CAPABILITIES_PAGE
,
0
);
stat
=
cdrom_mode_sense
(
cdi
,
&
cgc
,
GPMODE_CAPABILITIES_PAGE
,
0
);
if
(
!
stat
)
if
(
!
stat
)
...
@@ -2513,9 +2521,8 @@ void ide_cdrom_release (struct inode *inode, struct file *file,
...
@@ -2513,9 +2521,8 @@ void ide_cdrom_release (struct inode *inode, struct file *file,
static
static
int
ide_cdrom_check_media_change
(
ide_drive_t
*
drive
)
int
ide_cdrom_check_media_change
(
ide_drive_t
*
drive
)
{
{
return
cdrom_fops
.
check_media_change
return
cdrom_fops
.
check_media_change
(
MKDEV
(
HWIF
(
drive
)
->
major
,
(
MKDEV
(
HWIF
(
drive
)
->
major
,
(
drive
->
select
.
b
.
unit
)
<<
PARTN_BITS
));
(
drive
->
select
.
b
.
unit
)
<<
PARTN_BITS
));
}
}
static
static
...
@@ -2545,8 +2552,7 @@ unsigned long ide_cdrom_capacity (ide_drive_t *drive)
...
@@ -2545,8 +2552,7 @@ unsigned long ide_cdrom_capacity (ide_drive_t *drive)
{
{
unsigned
capacity
;
unsigned
capacity
;
capacity
=
cdrom_read_capacity
(
drive
,
&
capacity
,
NULL
);
return
cdrom_read_capacity
(
drive
,
&
capacity
,
NULL
)
?
0
:
capacity
*
SECTORS_PER_FRAME
;
return
capacity
?
0
:
capacity
*
SECTORS_PER_FRAME
;
}
}
static
static
...
...
drivers/ide/ide-cd.h
View file @
5cb39380
...
@@ -10,15 +10,6 @@
...
@@ -10,15 +10,6 @@
#include <linux/cdrom.h>
#include <linux/cdrom.h>
#include <asm/byteorder.h>
#include <asm/byteorder.h>
/*
* Apparently older drives have problems with filling out the entire
* mode_sense capability structure. Define this to 1 if your drive isn't
* probed correctly.
*/
#ifndef BROKEN_CAP_PAGE
#define BROKEN_CAP_PAGE 0
#endif
/* Turn this on to have the driver print out the meanings of the
/* Turn this on to have the driver print out the meanings of the
ATAPI error codes. This will use up additional kernel-space
ATAPI error codes. This will use up additional kernel-space
memory, though. */
memory, though. */
...
@@ -114,6 +105,7 @@ struct packet_command {
...
@@ -114,6 +105,7 @@ struct packet_command {
char
*
buffer
;
char
*
buffer
;
int
buflen
;
int
buflen
;
int
stat
;
int
stat
;
int
quiet
;
struct
request_sense
*
sense
;
struct
request_sense
*
sense
;
unsigned
char
c
[
12
];
unsigned
char
c
[
12
];
};
};
...
@@ -410,9 +402,7 @@ struct atapi_capabilities_page {
...
@@ -410,9 +402,7 @@ struct atapi_capabilities_page {
unsigned
short
buffer_size
;
unsigned
short
buffer_size
;
/* Current speed (in kB/s). */
/* Current speed (in kB/s). */
unsigned
short
curspeed
;
unsigned
short
curspeed
;
#if !BROKEN_CAP_PAGE
char
pad
[
4
];
char
pad
[
4
];
#endif
};
};
...
...
drivers/net/starfire.c
View file @
5cb39380
...
@@ -102,7 +102,7 @@ static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
...
@@ -102,7 +102,7 @@ static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
static
char
version1
[]
__devinitdata
=
static
char
version1
[]
__devinitdata
=
"starfire.c:v0.15+LK1.1.2 4/28/2000 Written by Donald Becker <becker@scyld.com>
\n
"
;
"starfire.c:v0.15+LK1.1.2 4/28/2000 Written by Donald Becker <becker@scyld.com>
\n
"
;
static
char
version2
[]
__devinitdata
=
static
char
version2
[]
__devinitdata
=
" U
n
dates and info at http://www.scyld.com/network/starfire.html
\n
"
;
" U
p
dates and info at http://www.scyld.com/network/starfire.html
\n
"
;
MODULE_AUTHOR
(
"Donald Becker <becker@scyld.com>"
);
MODULE_AUTHOR
(
"Donald Becker <becker@scyld.com>"
);
MODULE_DESCRIPTION
(
"Adaptec Starfire Ethernet driver"
);
MODULE_DESCRIPTION
(
"Adaptec Starfire Ethernet driver"
);
...
...
drivers/sound/Config.in
View file @
5cb39380
...
@@ -79,6 +79,8 @@ if [ "$CONFIG_SOUND_MSNDPIN" = "y" -o "$CONFIG_SOUND_MSNDCLAS" = "y" ]; then
...
@@ -79,6 +79,8 @@ if [ "$CONFIG_SOUND_MSNDPIN" = "y" -o "$CONFIG_SOUND_MSNDCLAS" = "y" ]; then
int 'MSND buffer size (kB)' CONFIG_MSND_FIFOSIZE 128
int 'MSND buffer size (kB)' CONFIG_MSND_FIFOSIZE 128
fi
fi
tristate ' VIA 82C686 Audio Codec' CONFIG_SOUND_VIA82CXXX
dep_tristate ' OSS sound modules' CONFIG_SOUND_OSS $CONFIG_SOUND
dep_tristate ' OSS sound modules' CONFIG_SOUND_OSS $CONFIG_SOUND
if [ "$CONFIG_SOUND_OSS" = "y" -o "$CONFIG_SOUND_OSS" = "m" ]; then
if [ "$CONFIG_SOUND_OSS" = "y" -o "$CONFIG_SOUND_OSS" = "m" ]; then
...
@@ -144,7 +146,6 @@ if [ "$CONFIG_SOUND_OSS" = "y" -o "$CONFIG_SOUND_OSS" = "m" ]; then
...
@@ -144,7 +146,6 @@ if [ "$CONFIG_SOUND_OSS" = "y" -o "$CONFIG_SOUND_OSS" = "m" ]; then
fi
fi
fi
fi
dep_tristate ' VIA 82C686 Audio Codec' CONFIG_SOUND_VIA82CXXX $CONFIG_SOUND_OSS
dep_tristate ' Yamaha FM synthesizer (YM3812/OPL-3) support' CONFIG_SOUND_YM3812 $CONFIG_SOUND_OSS
dep_tristate ' Yamaha FM synthesizer (YM3812/OPL-3) support' CONFIG_SOUND_YM3812 $CONFIG_SOUND_OSS
dep_tristate ' Yamaha OPL3-SA1 audio controller' CONFIG_SOUND_OPL3SA1 $CONFIG_SOUND_OSS
dep_tristate ' Yamaha OPL3-SA1 audio controller' CONFIG_SOUND_OPL3SA1 $CONFIG_SOUND_OSS
dep_tristate ' Yamaha OPL3-SA2, SA3, and SAx based PnP cards' CONFIG_SOUND_OPL3SA2 $CONFIG_SOUND_OSS
dep_tristate ' Yamaha OPL3-SA2, SA3, and SAx based PnP cards' CONFIG_SOUND_OPL3SA2 $CONFIG_SOUND_OSS
...
...
drivers/sound/Makefile
View file @
5cb39380
...
@@ -66,7 +66,7 @@ obj-$(CONFIG_SOUND_AD1816) += ad1816.o
...
@@ -66,7 +66,7 @@ obj-$(CONFIG_SOUND_AD1816) += ad1816.o
obj-$(CONFIG_SOUND_ACI_MIXER)
+=
aci.o
obj-$(CONFIG_SOUND_ACI_MIXER)
+=
aci.o
obj-$(CONFIG_SOUND_AWE32_SYNTH)
+=
awe_wave.o
obj-$(CONFIG_SOUND_AWE32_SYNTH)
+=
awe_wave.o
obj-$(CONFIG_SOUND_VIA82CXXX)
+=
via82cxxx_audio.o
sb_lib.o uart401.o ac97
.o
obj-$(CONFIG_SOUND_VIA82CXXX)
+=
via82cxxx_audio.o
ac97_codec
.o
obj-$(CONFIG_SOUND_MSNDCLAS)
+=
msnd.o msnd_classic.o
obj-$(CONFIG_SOUND_MSNDCLAS)
+=
msnd.o msnd_classic.o
obj-$(CONFIG_SOUND_MSNDPIN)
+=
msnd.o msnd_pinnacle.o
obj-$(CONFIG_SOUND_MSNDPIN)
+=
msnd.o msnd_pinnacle.o
obj-$(CONFIG_SOUND_VWSND)
+=
vwsnd.o
obj-$(CONFIG_SOUND_VWSND)
+=
vwsnd.o
...
...
drivers/sound/emu10k1/main.c
View file @
5cb39380
...
@@ -80,7 +80,7 @@ static char *card_names[] __devinitdata = {
...
@@ -80,7 +80,7 @@ static char *card_names[] __devinitdata = {
"EMU10K1"
,
"EMU10K1"
,
};
};
static
struct
pci_device_id
emu10k1_pci_tbl
[]
__initdata
=
{
static
struct
pci_device_id
emu10k1_pci_tbl
[]
=
{
{
PCI_VENDOR_ID_CREATIVE
,
PCI_DEVICE_ID_CREATIVE_EMU10K1
,
{
PCI_VENDOR_ID_CREATIVE
,
PCI_DEVICE_ID_CREATIVE_EMU10K1
,
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
EMU10K1
},
PCI_ANY_ID
,
PCI_ANY_ID
,
0
,
0
,
EMU10K1
},
{
0
,}
{
0
,}
...
@@ -763,7 +763,7 @@ static void __devexit emu10k1_remove(struct pci_dev *pci_dev)
...
@@ -763,7 +763,7 @@ static void __devexit emu10k1_remove(struct pci_dev *pci_dev)
MODULE_AUTHOR
(
"Bertrand Lee, Cai Ying. (Email to: emu10k1-devel@opensource.creative.com)"
);
MODULE_AUTHOR
(
"Bertrand Lee, Cai Ying. (Email to: emu10k1-devel@opensource.creative.com)"
);
MODULE_DESCRIPTION
(
"Creative EMU10K1 PCI Audio Driver v"
DRIVER_VERSION
"
\n
Copyright (C) 1999 Creative Technology Ltd."
);
MODULE_DESCRIPTION
(
"Creative EMU10K1 PCI Audio Driver v"
DRIVER_VERSION
"
\n
Copyright (C) 1999 Creative Technology Ltd."
);
static
struct
pci_driver
emu10k1_pci_driver
__initdata
=
{
static
struct
pci_driver
emu10k1_pci_driver
=
{
name:
"emu10k1"
,
name:
"emu10k1"
,
id_table:
emu10k1_pci_tbl
,
id_table:
emu10k1_pci_tbl
,
probe:
emu10k1_probe
,
probe:
emu10k1_probe
,
...
...
drivers/sound/soundmodule.h
View file @
5cb39380
...
@@ -26,4 +26,4 @@ static struct notifier_block sound_notifier=
...
@@ -26,4 +26,4 @@ static struct notifier_block sound_notifier=
0
0
};
};
#endif
#endif
/* _SOUNDMODULE_H */
drivers/sound/via82cxxx_audio.c
View file @
5cb39380
This diff is collapsed.
Click to expand it.
drivers/usb/ov511.c
View file @
5cb39380
This diff is collapsed.
Click to expand it.
drivers/usb/ov511.h
View file @
5cb39380
#ifndef __LINUX_OV511_H
#ifndef __LINUX_OV511_H
#define __LINUX_OV511_H
#define __LINUX_OV511_H
#include <asm/uaccess.h>
#include <linux/videodev.h>
#include <linux/smp_lock.h>
#define OV511_DEBUG
/* Turn on debug messages */
#define OV511_DEBUG
/* Turn on debug messages */
#ifdef OV511_DEBUG
#ifdef OV511_DEBUG
# define PDEBUG(level, fmt, args...) \
# define PDEBUG(level, fmt, args...) \
if (debug >= level) printk("ov511:
" fmt "\n"
, ## args)
if (debug >= level) printk("ov511:
[" __PRETTY_FUNCTION__ ":%d] " fmt "\n", __LINE__
, ## args)
#else
#else
# define PDEBUG(level, fmt, args...) do {} while(0)
# define PDEBUG(level, fmt, args...) do {} while(0)
#endif
#endif
...
@@ -114,7 +118,7 @@ if (debug >= level) printk("ov511: " fmt "\n" , ## args)
...
@@ -114,7 +118,7 @@ if (debug >= level) printk("ov511: " fmt "\n" , ## args)
#define OV511PLUS_ALT_SIZE_769 6
#define OV511PLUS_ALT_SIZE_769 6
#define OV511PLUS_ALT_SIZE_961 7
#define OV511PLUS_ALT_SIZE_961 7
/*
ov
7610 registers */
/*
OV
7610 registers */
#define OV7610_REG_GAIN 0x00
#define OV7610_REG_GAIN 0x00
#define OV7610_REG_BLUE 0x01
#define OV7610_REG_BLUE 0x01
#define OV7610_REG_RED 0x02
#define OV7610_REG_RED 0x02
...
@@ -265,7 +269,12 @@ struct usb_ov511 {
...
@@ -265,7 +269,12 @@ struct usb_ov511 {
/* Device structure */
/* Device structure */
struct
usb_device
*
dev
;
struct
usb_device
*
dev
;
#if 0
unsigned char customid; /* Type of camera */
unsigned char customid; /* Type of camera */
#else
int
customid
;
int
desc
;
#endif
unsigned
char
iface
;
unsigned
char
iface
;
...
@@ -303,6 +312,16 @@ struct usb_ov511 {
...
@@ -303,6 +312,16 @@ struct usb_ov511 {
int
sensor
;
/* Type of image sensor chip */
int
sensor
;
/* Type of image sensor chip */
int
packet_size
;
/* Frame size per isoc desc */
int
packet_size
;
/* Frame size per isoc desc */
/* proc interface */
struct
semaphore
param_lock
;
/* params lock for this camera */
struct
proc_dir_entry
*
proc_entry
;
/* /proc/ov511/videoX */
};
struct
cam_list
{
int
id
;
char
*
description
;
};
};
#endif
#endif
...
...
drivers/video/clgenfb.c
View file @
5cb39380
...
@@ -31,9 +31,10 @@
...
@@ -31,9 +31,10 @@
*
*
*/
*/
#define CLGEN_VERSION "1.9.
5
"
#define CLGEN_VERSION "1.9.
6
"
#include <linux/config.h>
#include <linux/config.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/errno.h>
...
@@ -2652,14 +2653,14 @@ static int __init clgen_pci_setup (struct clgenfb_info *info,
...
@@ -2652,14 +2653,14 @@ static int __init clgen_pci_setup (struct clgenfb_info *info,
if
(
!
request_mem_region
(
board_addr
,
board_size
,
"clgenfb"
))
{
if
(
!
request_mem_region
(
board_addr
,
board_size
,
"clgenfb"
))
{
pci_write_config_word
(
pdev
,
PCI_COMMAND
,
tmp16
);
pci_write_config_word
(
pdev
,
PCI_COMMAND
,
tmp16
);
printk
(
KERN_ERR
"clgen: cannot reserve region 0x%l
u
, abort
\n
"
,
printk
(
KERN_ERR
"clgen: cannot reserve region 0x%l
x
, abort
\n
"
,
board_addr
);
board_addr
);
return
-
1
;
return
-
1
;
}
}
#if 0 /* if the system didn't claim this region, we would... */
#if 0 /* if the system didn't claim this region, we would... */
if (!request_mem_region(0xA0000, 65535, "clgenfb")) {
if (!request_mem_region(0xA0000, 65535, "clgenfb")) {
pci_write_config_word (pdev, PCI_COMMAND, tmp16);
pci_write_config_word (pdev, PCI_COMMAND, tmp16);
printk(KERN_ERR "clgen: cannot reserve region 0x%l
u
, abort\n",
printk(KERN_ERR "clgen: cannot reserve region 0x%l
x
, abort\n",
0xA0000L);
0xA0000L);
release_mem_region(board_addr, board_size);
release_mem_region(board_addr, board_size);
return -1;
return -1;
...
@@ -2760,7 +2761,7 @@ static int __init clgen_zorro_setup (struct clgenfb_info *info,
...
@@ -2760,7 +2761,7 @@ static int __init clgen_zorro_setup (struct clgenfb_info *info,
info
->
board_size
=
board_size
=
z
->
resource
.
end
-
z
->
resource
.
start
+
1
;
info
->
board_size
=
board_size
=
z
->
resource
.
end
-
z
->
resource
.
start
+
1
;
if
(
!
request_mem_region
(
board_addr
,
board_size
,
"clgenfb"
))
{
if
(
!
request_mem_region
(
board_addr
,
board_size
,
"clgenfb"
))
{
printk
(
KERN_ERR
"clgen: cannot reserve region 0x%l
u
, abort
\n
"
,
printk
(
KERN_ERR
"clgen: cannot reserve region 0x%l
x
, abort
\n
"
,
board_addr
);
board_addr
);
return
-
1
;
return
-
1
;
}
}
...
...
drivers/video/vesafb.c
View file @
5cb39380
...
@@ -543,12 +543,19 @@ int __init vesafb_init(void)
...
@@ -543,12 +543,19 @@ int __init vesafb_init(void)
if
(
!
request_mem_region
(
video_base
,
video_size
,
"vesafb"
))
{
if
(
!
request_mem_region
(
video_base
,
video_size
,
"vesafb"
))
{
printk
(
KERN_ERR
printk
(
KERN_ERR
"vesafb: abort, cannot reserve video memory at 0x%l
u
\n
"
,
"vesafb: abort, cannot reserve video memory at 0x%l
x
\n
"
,
video_base
);
video_base
);
return
-
1
;
return
-
EBUSY
;
}
}
video_vbase
=
ioremap
(
video_base
,
video_size
);
video_vbase
=
ioremap
(
video_base
,
video_size
);
if
(
!
video_vbase
)
{
release_mem_region
(
video_base
,
video_size
);
printk
(
KERN_ERR
"vesafb: abort, cannot ioremap video memory 0x%lx @ 0x%lx
\n
"
,
video_size
,
video_base
);
return
-
EIO
;
}
printk
(
KERN_INFO
"vesafb: framebuffer at 0x%lx, mapped to 0x%p, size %dk
\n
"
,
printk
(
KERN_INFO
"vesafb: framebuffer at 0x%lx, mapped to 0x%p, size %dk
\n
"
,
video_base
,
video_vbase
,
video_size
/
1024
);
video_base
,
video_vbase
,
video_size
/
1024
);
...
...
fs/buffer.c
View file @
5cb39380
...
@@ -2129,9 +2129,7 @@ static void sync_page_buffers(struct buffer_head *bh)
...
@@ -2129,9 +2129,7 @@ static void sync_page_buffers(struct buffer_head *bh)
do
{
do
{
struct
buffer_head
*
p
=
tmp
;
struct
buffer_head
*
p
=
tmp
;
tmp
=
tmp
->
b_this_page
;
tmp
=
tmp
->
b_this_page
;
if
(
buffer_locked
(
p
))
if
(
buffer_dirty
(
p
)
&&
!
buffer_locked
(
p
))
__wait_on_buffer
(
p
);
else
if
(
buffer_dirty
(
p
))
ll_rw_block
(
WRITE
,
1
,
&
p
);
ll_rw_block
(
WRITE
,
1
,
&
p
);
}
while
(
tmp
!=
bh
);
}
while
(
tmp
!=
bh
);
}
}
...
...
include/linux/swap.h
View file @
5cb39380
...
@@ -171,13 +171,18 @@ do { \
...
@@ -171,13 +171,18 @@ do { \
spin_unlock(&pagemap_lru_lock); \
spin_unlock(&pagemap_lru_lock); \
} while (0)
} while (0)
#define __lru_cache_del(page) \
do { \
list_del(&(page)->lru); \
nr_lru_pages--; \
} while (0)
#define lru_cache_del(page) \
#define lru_cache_del(page) \
do { \
do { \
if (!PageLocked(page)) \
if (!PageLocked(page)) \
BUG(); \
BUG(); \
spin_lock(&pagemap_lru_lock); \
spin_lock(&pagemap_lru_lock); \
list_del(&(page)->lru); \
__lru_cache_del(page); \
nr_lru_pages--; \
spin_unlock(&pagemap_lru_lock); \
spin_unlock(&pagemap_lru_lock); \
} while (0)
} while (0)
...
...
mm/filemap.c
View file @
5cb39380
...
@@ -67,7 +67,7 @@ void __add_page_to_hash_queue(struct page * page, struct page **p)
...
@@ -67,7 +67,7 @@ void __add_page_to_hash_queue(struct page * page, struct page **p)
PAGE_BUG
(
page
);
PAGE_BUG
(
page
);
}
}
static
void
remove_page_from_hash_queue
(
struct
page
*
page
)
static
inline
void
remove_page_from_hash_queue
(
struct
page
*
page
)
{
{
if
(
page
->
pprev_hash
)
{
if
(
page
->
pprev_hash
)
{
if
(
page
->
next_hash
)
if
(
page
->
next_hash
)
...
@@ -92,44 +92,71 @@ static inline int sync_page(struct page *page)
...
@@ -92,44 +92,71 @@ static inline int sync_page(struct page *page)
* sure the page is locked and that nobody else uses it - or that usage
* sure the page is locked and that nobody else uses it - or that usage
* is safe.
* is safe.
*/
*/
static
inline
void
__remove_inode_page
(
struct
page
*
page
)
{
remove_page_from_inode_queue
(
page
);
remove_page_from_hash_queue
(
page
);
page
->
mapping
=
NULL
;
}
void
remove_inode_page
(
struct
page
*
page
)
void
remove_inode_page
(
struct
page
*
page
)
{
{
if
(
!
PageLocked
(
page
))
if
(
!
PageLocked
(
page
))
PAGE_BUG
(
page
);
PAGE_BUG
(
page
);
spin_lock
(
&
pagecache_lock
);
spin_lock
(
&
pagecache_lock
);
remove_page_from_inode_queue
(
page
);
__remove_inode_page
(
page
);
remove_page_from_hash_queue
(
page
);
page
->
mapping
=
NULL
;
spin_unlock
(
&
pagecache_lock
);
spin_unlock
(
&
pagecache_lock
);
}
}
#define ITERATIONS 100
void
invalidate_inode_pages
(
struct
inode
*
inode
)
void
invalidate_inode_pages
(
struct
inode
*
inode
)
{
{
struct
list_head
*
head
,
*
curr
;
struct
list_head
*
head
,
*
curr
;
struct
page
*
page
;
struct
page
*
page
;
int
count
;
repeat:
head
=
&
inode
->
i_mapping
->
pages
;
head
=
&
inode
->
i_mapping
->
pages
;
while
(
head
!=
head
->
next
)
{
spin_lock
(
&
pagecache_lock
);
spin_lock
(
&
pagecache_lock
);
spin_lock
(
&
pagemap_lru_lock
);
head
=
&
inode
->
i_mapping
->
pages
;
curr
=
head
->
next
;
curr
=
head
->
next
;
count
=
0
;
while
(
curr
!=
head
)
{
while
((
curr
!=
head
)
&&
(
count
++
<
ITERATIONS
)
)
{
page
=
list_entry
(
curr
,
struct
page
,
list
);
page
=
list_entry
(
curr
,
struct
page
,
list
);
curr
=
curr
->
next
;
curr
=
curr
->
next
;
/* We cannot invalidate a locked page */
/* We cannot invalidate a locked page */
if
(
TryLockPage
(
page
))
if
(
TryLockPage
(
page
))
continue
;
continue
;
spin_unlock
(
&
pagecache_lock
);
lru_cache_del
(
page
);
__
lru_cache_del
(
page
);
remove_inode_page
(
page
);
__
remove_inode_page
(
page
);
UnlockPage
(
page
);
UnlockPage
(
page
);
page_cache_release
(
page
);
page_cache_release
(
page
);
goto
repeat
;
}
}
/* At this stage we have passed through the list
* once, and there may still be locked pages. */
if
(
head
->
next
!=
head
)
{
page
=
list_entry
(
head
->
next
,
struct
page
,
list
);
get_page
(
page
);
spin_unlock
(
&
pagemap_lru_lock
);
spin_unlock
(
&
pagecache_lock
);
spin_unlock
(
&
pagecache_lock
);
/* We need to block */
lock_page
(
page
);
UnlockPage
(
page
);
page_cache_release
(
page
);
}
else
{
spin_unlock
(
&
pagemap_lru_lock
);
spin_unlock
(
&
pagecache_lock
);
}
}
}
}
/*
/*
...
@@ -160,10 +187,10 @@ void truncate_inode_pages(struct address_space * mapping, loff_t lstart)
...
@@ -160,10 +187,10 @@ void truncate_inode_pages(struct address_space * mapping, loff_t lstart)
/* page wholly truncated - free it */
/* page wholly truncated - free it */
if
(
offset
>=
start
)
{
if
(
offset
>=
start
)
{
if
(
TryLockPage
(
page
))
{
if
(
TryLockPage
(
page
))
{
spin_unlock
(
&
pagecache_lock
);
get_page
(
page
);
get_page
(
page
);
spin_unlock
(
&
pagecache_lock
);
wait_on_page
(
page
);
wait_on_page
(
page
);
p
ut_pag
e
(
page
);
p
age_cache_releas
e
(
page
);
goto
repeat
;
goto
repeat
;
}
}
get_page
(
page
);
get_page
(
page
);
...
@@ -253,7 +280,19 @@ int shrink_mmap(int priority, int gfp_mask)
...
@@ -253,7 +280,19 @@ int shrink_mmap(int priority, int gfp_mask)
goto
dispose_continue
;
goto
dispose_continue
;
count
--
;
count
--
;
/*
* I'm ambivalent on this one.. Should we try to
* maintain LRU on the LRU list, and put pages that
* are old at the end of the queue, even if that
* means that we'll re-scan then again soon and
* often waste CPU time? Or should be just let any
* pages we do not want to touch now for one reason
* or another percolate to be "young"?
*
dispose = &old;
dispose = &old;
*
*/
/*
/*
* Avoid unscalable SMP locking for pages we can
* Avoid unscalable SMP locking for pages we can
...
@@ -323,9 +362,7 @@ int shrink_mmap(int priority, int gfp_mask)
...
@@ -323,9 +362,7 @@ int shrink_mmap(int priority, int gfp_mask)
/* is it a page-cache page? */
/* is it a page-cache page? */
if
(
page
->
mapping
)
{
if
(
page
->
mapping
)
{
if
(
!
PageDirty
(
page
)
&&
!
pgcache_under_min
())
{
if
(
!
PageDirty
(
page
)
&&
!
pgcache_under_min
())
{
remove_page_from_inode_queue
(
page
);
__remove_inode_page
(
page
);
remove_page_from_hash_queue
(
page
);
page
->
mapping
=
NULL
;
spin_unlock
(
&
pagecache_lock
);
spin_unlock
(
&
pagecache_lock
);
goto
made_inode_progress
;
goto
made_inode_progress
;
}
}
...
...
mm/vmscan.c
View file @
5cb39380
...
@@ -347,7 +347,6 @@ static int swap_out(unsigned int priority, int gfp_mask)
...
@@ -347,7 +347,6 @@ static int swap_out(unsigned int priority, int gfp_mask)
struct
task_struct
*
p
;
struct
task_struct
*
p
;
int
counter
;
int
counter
;
int
__ret
=
0
;
int
__ret
=
0
;
int
assign
=
0
;
lock_kernel
();
lock_kernel
();
/*
/*
...
@@ -364,7 +363,7 @@ static int swap_out(unsigned int priority, int gfp_mask)
...
@@ -364,7 +363,7 @@ static int swap_out(unsigned int priority, int gfp_mask)
* Think of swap_cnt as a "shadow rss" - it tells us which process
* Think of swap_cnt as a "shadow rss" - it tells us which process
* we want to page out (always try largest first).
* we want to page out (always try largest first).
*/
*/
counter
=
nr_threads
/
(
priority
+
1
);
counter
=
(
nr_threads
<<
1
)
>>
(
priority
>>
1
);
if
(
counter
<
1
)
if
(
counter
<
1
)
counter
=
1
;
counter
=
1
;
...
@@ -372,6 +371,7 @@ static int swap_out(unsigned int priority, int gfp_mask)
...
@@ -372,6 +371,7 @@ static int swap_out(unsigned int priority, int gfp_mask)
unsigned
long
max_cnt
=
0
;
unsigned
long
max_cnt
=
0
;
struct
mm_struct
*
best
=
NULL
;
struct
mm_struct
*
best
=
NULL
;
int
pid
=
0
;
int
pid
=
0
;
int
assign
=
0
;
select:
select:
read_lock
(
&
tasklist_lock
);
read_lock
(
&
tasklist_lock
);
p
=
init_task
.
next_task
;
p
=
init_task
.
next_task
;
...
@@ -391,8 +391,6 @@ static int swap_out(unsigned int priority, int gfp_mask)
...
@@ -391,8 +391,6 @@ static int swap_out(unsigned int priority, int gfp_mask)
}
}
}
}
read_unlock
(
&
tasklist_lock
);
read_unlock
(
&
tasklist_lock
);
if
(
assign
==
1
)
assign
=
2
;
if
(
!
best
)
{
if
(
!
best
)
{
if
(
!
assign
)
{
if
(
!
assign
)
{
assign
=
1
;
assign
=
1
;
...
...
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