Remove PageReserved() calls from core code by tightening VM_RESERVED
handling in mm/ to cover PageReserved functionality.
PageReserved special casing is removed from get_page and put_page.
All setting and clearing of PageReserved is retained, and it is now flagged
in the page_alloc checks to help ensure we don't introduce any refcount
based freeing of Reserved pages.
MAP_PRIVATE, PROT_WRITE of VM_RESERVED regions is tentatively being
deprecated. We never completely handled it correctly anyway, and is be
reintroduced in future if required (Hugh has a proof of concept).
Once PageReserved() calls are removed from kernel/power/swsusp.c, and all
arch/ and driver code, the Set and Clear calls, and the PG_reserved bit can
be trivially removed.
Last real user of PageReserved is swsusp, which uses PageReserved to
determine whether a struct page points to valid memory or not. This still
needs to be addressed (a generic page_is_ram() should work).
A last caveat: the ZERO_PAGE is now refcounted and managed with rmap (and
thus mapcounted and count towards shared rss). These writes to the struct
page could cause excessive cacheline bouncing on big systems. There are a
number of ways this could be addressed if it is an issue.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Refcount bug fix for filemap_xip.c
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
In PM v1, all devices were called at SUSPEND_DISABLE level. Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level. However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.
Since this is obsolete infrastructure which is no longer necessary,
we can remove it. Here's an (untested) patch to do exactly that.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The previous patch adding the ability to nest struct class_device
changed the paramaters to the call class_device_create(). This patch
fixes up all in-kernel users of the function.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The patch fixes Oops from sound drivers using generic platform device
but have no suspend/resume callbacks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
o Added a control for the input source (which can be either
"line" or "mic")
o Mute the speaker/line-out/headphone outputs by default.
o Increased the buffer size from 10 pages to 16.
Signed-off-by: Stuart Brady <sdb@parisc-linux.org>
ALSA Harmony was resetting the capture position when
preparing the capture substream, which it shouldn't do.
This should fix the problem.
Signed-off-by: Stuart Brady <sdb@parisc-linux.org>
ALSA Harmony should no longer play junk (left in the buffers
from a previous stream) at the start of a new stream.
Implement the monitor mixer channel for ALSA Harmony.
Also prevent snd_harmony_volume_get from returning negative values.
Signed-off-by: Stuart Brady <sdb@parisc-linux.org>
Use the graveyard/silence buffers in ALSA Harmony.
Signed-off-by: Stuart Brady <sdb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Convert pa_dev->hpa from an unsigned long to a struct resource.
Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Fix up users of ->hpa to use ->hpa.start instead.
Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
- added typedef unsigned int __nocast gfp_t;
- replaced __nocast uses for gfp flags with gfp_t - it gives exactly
the same warnings as far as sparse is concerned, doesn't change
generated code (from gcc point of view we replaced unsigned int with
typedef) and documents what's going on far better.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
USB generic driver
Add a quirk entry for the external MIDI ports of the
Windows Edition of the Hercules DJ Console.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
USB generic driver
Add a mixer quirk entry for the Hercules DJ Console (Windows Edition)
that uses a different USB product ID.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
EMU10K1/EMU10K2 driver
Fixed the handling of ac97_chip=2 capability type.
The error occurs in snd_ac97_mixer(), not in snd_ac97_bus().
Also, release the unnecessary ac97_bus object in the error path.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
EMU10K1/EMU10K2 driver
Fixed the error at loading SBLive Game board (and possible other models).
The PCI SSIDs of this board conflicts with SB Live 5.1 Platinum, which has
no AC97 chip.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
HDA Codec driver
Mark the ALC882 'LFE Playback Switch' as an input, like the other
playback switch settings.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
HDA Codec driver
Fix a typo (cut & paste) in the alc880_test_mixer structure.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
HDA Codec driver
The ALC260 'Mono Playback Switch' is marked as an output in
patch_realtek.c. It actually does not work unless it is marked as an
input. Go figure... This was tested and confirmed on an HP xw4300.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
USB generic driver
Increase the maximum PCM buffer size to 1 MB. The USB driver doesn't
have any inherent buffer size limit, and big multichannel interfaces
may benefit from this.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
USB generic driver
There is another revision of the PHASE26 with a different product ID;
add a quirk entry for that, too.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
USB generic driver
Add a quirk entry for the Roland RD-700SX.
This should work for the RD-300SX, too.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
AC97 Codec
A single call to the driver suspend/resume method for each device is
enough. The level and SUSPEND_*/RESUME_* arguments are deprecated and
said to be removed eventually anyway (no other subsystem are using them
anymore except platform devices).
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
AC97 Codec
Don't use dev.platform_data to store a reference to the containing
ac97_t structure. Such assignment is redundent since we can deduce the
ac97_t structure location from the contained device structure. This
sets platform_data free for other purposes.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
AC97 Codec
The bus_id is initialized with a generic identifier string which is not
really useful for proper driver matching. Let the driver decide what it
needs via its probe method instead.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
USB generic driver
Add a quirk entry for the Hercules DJ Console to ignore timeouts on
some mixer control transfers.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
HDA Intel driver
Disable the auto-correction of DMA position temporarily.
It doesn't work as expected yet...
Signed-off-by: Takashi Iwai <tiwai@suse.de>
AC97 Codec
No index is templated for si3036 modem controls.
Signed-off-by: Sasha Khapyorsky <sashak@smlink.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
From: Christopher Zimmermann <madroach@zakweb.de>
This patch enables SBus support for the cs4231 sound driver.
It is tested on an Ultra2. Capture and playback both work.
I experienced lags and crashes using certain threaded
players like ogg123 and mp3blaster, while the former is
lagging far more. This behavior may be specific to SMP
systems. It is reproducable using the dummy sound card
driver. Sox works flawlessly.
Setting up the calculation of ptr in snd_cs4231_playback_pointer
was a bit strange. I got it to work by not incrementing the
[pc]_periods_sent counter when starting DMA the first time
in cs4231_dma_trigger. Therefore this dummy thing.
[ I did some minor cleanups -DaveM ]
Signed-off-by: David S. Miller <davem@davemloft.net>
Fix up some pm_message_t types
Signed-Off-By: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>