aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-06-04Staging: Eliminate a NULL pointer dereferenceJulia Lawall2-5/+2
Eliminate a NULL or near NULL pointer dereference. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ expression E,E1; identifier f; statement S1,S2,S3; @@ if ((E == NULL && ...) || ...) { ... when != if (...) S1 else S2 when != E = E1 * E->f ... when any return ...; } else S3 // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04staging: Use GFP_ATOMIC when a lock is heldJulia Lawall3-3/+3
In each case, the containing function is only called from one place, where a spin lock is held. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @gfp exists@ identifier fn; position p; @@ fn(...) { ... when != spin_unlock when any GFP_KERNEL@p ... when any } @locked@ identifier gfp.fn; @@ spin_lock(...) ... when != spin_unlock fn(...) @depends on locked@ position gfp.p; @@ - GFP_KERNEL@p + GFP_ATOMIC // </smpl> Signed-off-by: Julia Lawall <[email protected]> Cc: Jonathan Cameron <[email protected]> Cc: Marek Lindner <[email protected]> Cc: Martyn Welch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi - correct parameter gainlkup for DAQCard-6024E in driver ↵Martin Homuth-Rosemann1-1/+1
ni_mio_cs.c Correct at least one of the incorrect specs for a national instrument data acquisition card DAQCard-6024E. This card has only four different gain settings (+-10V, +-5V, +-0.5V, +-0.05V). Signed-off-by: Martin Homuth-Rosemann <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: fixing ni_labpc to mite dependancyAlexander Kurz1-0/+1
the dependancy of ni_labpc on mite was missing, Signed-off-by: Alexander Kurz <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> index 0aa2b0d..79f5f2e 100644
2010-06-04Staging: wlags49_h2, wlags49_h25: fixed Kconfig dependenciesHenk de Groot2-10/+14
Fixes Kconfig so the wlags49_h2 and wlags49_h25 drivers can be selected from menuconfig without having to select another WLAN driver first. Before it could only be selected when another driver already selected WIRELESS_EXT. Also adds WEXT_PRIV on which the driver also depends. Align help text in Kconfig. Signed-off-by: Henk de Groot <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: phison: depends on ATA_BMDMARandy Dunlap1-1/+1
phison uses interfaces and data that are built only when ATA_BMDMA is enabled, so it should depend on that symbol. drivers/staging/phison/phison.c:43: error: implicit declaration of function 'ATA_BMDMA_SHT' drivers/staging/phison/phison.c:43: error: initializer element is not constant drivers/staging/phison/phison.c:43: error: (near initialization for 'phison_sht.module') drivers/staging/phison/phison.c:47: error: 'ata_bmdma_port_ops' undeclared here (not in a function) Signed-off-by: Randy Dunlap <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: iio-utils: fix memory overflow for dynamically allocateded memory ↵Barry Song1-2/+1
to hold filename Signed-off-by: Barry Song <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: adis16255: add proper section markings to hotplug funcsMike Frysinger1-2/+2
Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: adis16255: fix typo in KconfigMike Frysinger1-1/+1
Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: batman-adv: Don't allocate icmp packet with GFP_KERNELSven Eckelmann1-1/+1
A new buffer for a packet is created when a icmp packet is received. This happens in a context with disabled irq. Thus we are not allowed to sleep or call function which might sleep. kmalloc must be called with GFP_ATOMIC instead of GFP_KERNEL to ensure that it does not sleep. Signed-off-by: Sven Eckelmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: batman-adv: Don't call free_netdev twiceSven Eckelmann1-0/+3
Free_netdev is registered as destructor in interface_setup for every soft_device. This destructor is automatically called from unregister_netdev and we must not call it again for the freed net_device. Signed-off-by: Sven Eckelmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: batman-adv: Call unregister_netdev on failures to get rtnl lockSven Eckelmann1-1/+1
We must call unregister_netdev when we couldn't initialise the batman-adv module and the soft_device was registered. There are two version of the function which we can use: * unregister_netdevice - removes device * unregister_netdev - takes rtnl semaphore and remove device We don't hold the semaphore in an error situation. So we must use unregister_netdev. Signed-off-by: Sven Eckelmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: batman-adv: fix rogue packets on shutdownMarek Lindner1-9/+15
On module shutdown batman-adv would purge the internal packet queue by sending all remaining packets which could confuse other nodes. Now, the packets are silently discarded. Signed-off-by: Marek Lindner <[email protected]> Signed-off-by: Sven Eckelmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: add MSM framebuffer driverStepan Moskovchenko70-0/+30037
Qualcomm development of the MSM SOC framebuffer driver has diverged significantly from the driver used by Android. This is a snapshot of our current driver, in all it's agony. We are putting this in staging to help with the process of converging the two drivers. At this point, the driver has been tested only in dumb framebuffer mode. Signed-off-by: Stepan Moskovchenko <[email protected]> Signed-off-by: David Brown <[email protected]> Signed-off-by: Abhijeet Dharmapurikar <[email protected]> [[email protected]: added a small compile fix and TODO.] Signed-off-by: Daniel Walker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: fixing ni_tio to mite PCI dependancyAlexander Kurz1-1/+1
On Wed, 19 May 2010, Randy Dunlap wrote: > linux-next of 2010-0519: > when CONFIG_PCI is not enabled: > > drivers/staging/comedi/drivers/mite.c: In function 'mite_init': > drivers/staging/comedi/drivers/mite.c:89: error: implicit declaration of function 'pci_dev_get' > drivers/staging/comedi/drivers/mite.c:89: warning: assignment makes pointer from integer without a cast > make[5]: *** [drivers/staging/comedi/drivers/mite.o] Error 1 This patch fixes the problem. Signed-off-by: Alexander Kurz <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: fix 8255 and DAS08 Kconfig dependancies.Alexander Kurz2-23/+59
Both drivers support directly or indirectly multiple bus types, hence both are listed independent of bus types. Signed-off-by: Alexander Kurz <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: For COMEDI_BUFINFO, check access to commandIan Abbott1-3/+16
Don't allow COMEDI_BUFINFO ioctl if some other file object has locked the subdevice or has an active command. If there is no active command, just report back the last buffer position. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: COMEDI_BUFINFO with no async - report no bytes read or writtenIan Abbott1-0/+2
When the COMEDI_BUFINFO ioctl is used on a subdevice without asynchronous streaming command support, set 'bytes_read = 0' and 'bytes_written = 0' in the buffer info returned back to the user. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: don't write to buffer if command finishedIan Abbott1-10/+13
For write(), any data copied to the data buffer after the previously set up streaming acquisition command has finished won't be used, but a non-empty write() does not currently return 0 (or -EPIPE on error) after the command has finished until the data buffer has been filled up. Change this behavior to return 0 (or -EPIPE) any time after the command has finished, without bothering to fill up the buffer with more useless data. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: amplc_dio200: Protect counter subdevice with spinlockIan Abbott1-10/+25
The internal state of an 82C54 counter timer chip will get messed up if several threads read, write, configure, or check the status of the chip simultaneously. Protect the register access sequences with a spin lock. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: adv_pci_dio: Support Advantech PCI-1735UIan Abbott1-11/+169
Add support for the Advantech PCI-1735U card, including support for a counter subdevice (based on an 82C54 counter timer chip). The counter subdevice needs more testing, as the only person I know who tried it couldn't get it to work! Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: addi-data: don't overwrite name for request_irq()Ian Abbott1-5/+1
The Addi-Data PCI drivers for Comedi use sprintf() in their comedi "attach" routine to construct a string to pass as the name in the call to request_irq(). All calls to "attach" routine share the same static buffer for this name, but the contents will differ on each call (including the comedi device number and the comedi board name). This changes the name displayed in /proc/interrupts for previous calls to request_irq() using the same buffer. Just use the board name instead; it has slightly less information (no comedi device number) but at least it doesn't change over the lifetime of the IRQ handler. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: comedi: Give the addi_apci_* drivers different driver namesIan Abbott17-2/+38
It is not currently possible for more than one of the addi_apci_* drivers to register themselves with comedi at once because they all use the same comedi driver name "addi_common". Give them different names. Signed-off-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04Staging: mid: Intel MID touch screen driverSreedhara DS6-0/+879
Touchscreen driver used by intel mid devices. Some clean up by Alan Cox. This driver is basically ready for upstreaming properly but is tied wrongly to the SPI layer and needs firmware/SFI changes to fix that. Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-04staging: Add framebuffer driver for XGI chipsets[email protected]24-0/+28503
This driver handles XG20, XG21, XG40, XG42 chipsets from XGI. They're also known as Z7,Z9,Z11 chipsets. It's based on the SiS fb driver but has been heavily modified by XGI to support their newer chipsets. Signed-off-by: Arnaud Patard <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-06-03Merge branch 'upstream-linus' of ↵Linus Torvalds8-8/+80
git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: libata: implement on-demand HPA unlocking libata: use the enlarged capacity after late HPA unlock SCSI: implement sd_unlock_native_capacity() libata-sff: trivial corrections to Kconfig help text sata_nv: don't diddle with nIEN on mcp55 sata_via: magic vt6421 fix for transmission problems w/ WD drives
2010-06-03Merge branch 'sched-fixes-for-linus' of ↵Linus Torvalds4-26/+41
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched, trace: Fix sched_switch() prev_state argument sched: Fix wake_affine() vs RT tasks sched: Make sure timers have migrated before killing the migration_thread
2010-06-03Merge branch 'x86-fixes-for-linus' of ↵Linus Torvalds5-23/+27
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, smpboot: Fix cores per node printing on boot x86/amd-iommu: Fall back to GART if initialization fails x86/amd-iommu: Fix crash when request_mem_region fails x86/mm: Remove unused DBG() macro arch/x86/kernel: Add missing spin_unlock
2010-06-03Merge branch 'merge' of ↵Linus Torvalds18-53/+67
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: powerpc/macio: Fix probing of macio devices by using the right of match table agp/uninorth: Fix oops caused by flushing too much powerpc/pasemi: Update MAINTAINERS file powerpc/cell: Fix integer constant warning powerpc/kprobes: Remove resume_execution() in kprobes powerpc/macio: Don't dereference pointer before null check
2010-06-03Merge branch 'for-linus/bugfixes' of ↵Linus Torvalds2-3/+3
git://xenbits.xensource.com/people/ianc/linux-2.6 * 'for-linus/bugfixes' of git://xenbits.xensource.com/people/ianc/linux-2.6: xen: avoid allocation causing potential swap activity on the resume path xen: ensure timer tick is resumed even on CPU driving the resume
2010-06-03Merge branch 'perf-fixes-for-linus-2' of ↵Linus Torvalds15-176/+309
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'perf-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf: Fix crash in swevents perf buildid-list: Fix --with-hits event processing perf scripts python: Give field dict to unhandled callback perf hist: fix objdump output parsing perf-record: Check correct pid when forking perf: Do the comm inheritance per thread in event__process_task perf: Use event__process_task from perf sched perf: Process comm events by tid blktrace: Fix new kernel-doc warnings perf_events: Fix unincremented buffer base on partial copy perf_events: Fix event scheduling issues introduced by transactional API perf_events, trace: Fix perf_trace_destroy(), mutex went missing perf_events, trace: Fix probe unregister race perf_events: Fix races in group composition perf_events: Fix races and clean up perf_event and perf_mmap_data interaction
2010-06-03Merge branch 'virtio' of ↵Linus Torvalds2-4/+14
git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus * 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: virtio: console: Fix crash when port is unplugged and blocked for write virtio: console: Fix crash when hot-unplugging a port and read is blocked virtio-blk: fix minimum number of S/G elements
2010-06-03Merge branch 'i2c-for-linus' of ↵Linus Torvalds85-287/+191
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: i2c: Remove all i2c_set_clientdata(client, NULL) in drivers i2c/busses: Move two drivers to embedded section i2c: Rename i2c_check_addr to i2c_check_addr_busy i2c: Document reserved I2C addresses i2c: Check for address validity on client registration i2c: Share the I2C device presence detection code Documentation/i2c: Checkpatch cleanup
2010-06-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6Linus Torvalds1-58/+65
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: crypto4xx - Fix build breakage n2_crypto: Plumb fallback ahash requests properly. n2_crypto: Fix MAU kmem_cache name. n2_crypto: Fix build after of_device/of_platform_driver changes.
2010-06-03perf: Fix crash in sweventsPeter Zijlstra1-9/+15
Frederic reported that because swevents handling doesn't disable IRQs anymore, we can get a recursion of perf_adjust_period(), once from overflow handling and once from the tick. If both call ->disable, we get a double hlist_del_rcu() and trigger a LIST_POISON2 dereference. Since we don't actually need to stop/start a swevent to re-programm the hardware (lack of hardware to program), simply nop out these callbacks for the swevent pmu. Reported-by: Frederic Weisbecker <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> LKML-Reference: <1275557609.27810.35218.camel@twins> Signed-off-by: Ingo Molnar <[email protected]>
2010-06-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6Linus Torvalds1-0/+1
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: cifs: fix page refcount leak
2010-06-03Merge branch 'drm-linus' of ↵Linus Torvalds48-321/+3538
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (41 commits) drm/radeon/kms: make sure display hw is disabled when suspending drm/vmwgfx: Allow userspace to change default layout. Bump minor. drm/vmwgfx: Fix framebuffer modesetting drm/vmwgfx: Fix vga save / restore with display topology. vgaarb: use MIT license vgaarb: convert pr_devel() to pr_debug() drm: fix typos in Linux DRM Developer's Guide drm/radeon/kms/pm: voltage fixes drm/radeon/kms/pm: radeon_set_power_state fixes drm/radeon/kms/pm: patch default power state with default clocks/voltages on r6xx+ drm/radeon/kms/pm: enable SetVoltage on r7xx/evergreen drm/radeon/kms/pm: add support for SetVoltage cmd table (V2) drm/radeon/kms/evergreen: add initial CS parser drm/kms: disable/enable poll around switcheroo on/off drm/nouveau: fixup confusion over which handle the DSM is hanging off. drm/nouveau: attempt to get bios from ACPI v3 drm/nv50: cast IGP memory location to u64 before shifting drm/ttm: Fix ttm_page_alloc.c drm/ttm: Fix cached TTM page allocation. drm/vmwgfx: Remove some leftover debug messages. ...
2010-06-03Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds26-64/+67
* 'merge' of git://git.secretlab.ca/git/linux-2.6: of/powerpc: fix fsl_msi device node pointer of/watchdog: gef_wdt.c: fix build breakage of/edac: fix build breakage in drivers of/net: fs_enet/mii-bitbang.c: fix build breakage of/usb: fsl_qe_udc.c: fix build breakage of/crypto: crypto4xx_core.c: fix build breakage of/dma: fix build breakage in ppc4xx adma driver of/mtd: nand: fix build breakage in drivers of/video: fix build breakage in FB drivers of/pcmcia: m8xx_pcmcia.c: Fix build failures of/rtc: rtc-mpc5121.c: Fix build failures of/dma: mpc512x_dma.c: Fix build failures of/mtd/nand: mpc5121_nfc.c: Fix build failures of/spi: mpc512x_psc_spi.c: Fix build failures watchdog: Fix build failure with OF changes of/spi: Fix build failure on spi_ppc4xx.c of/usb: fix build error due to of_node pointer move of/powerpc: fix 85xx RapidIO device node pointer
2010-06-03virtio: console: Fix crash when port is unplugged and blocked for writeAmit Shah1-0/+4
When a program that has a virtio port opened and blocked for a write operation, a port hot-unplug event will later led to a crash when SIGTERM was sent to the program. Fix that. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-06-03virtio: console: Fix crash when hot-unplugging a port and read is blockedAmit Shah1-3/+7
When removing a port we don't check if a program was blocked for read. This leads to a crash when SIGTERM is sent to the program after hot-unplugging the port. Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
2010-06-03virtio-blk: fix minimum number of S/G elementsChristoph Hellwig1-1/+3
We need at least one S/G element to operate properly, as does the block layer which increments it to one anyway. We hit this due to a qemu bug which advertises a sg_elements of 0 under some circumstances. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Rusty Russell <[email protected]> (tweaked logic)
2010-06-03i2c: Remove all i2c_set_clientdata(client, NULL) in driversWolfram Sang75-141/+4
I2C drivers can use the clientdata-pointer to point to private data. As I2C devices are not really unregistered, but merely detached from their driver, it used to be the drivers obligation to clear this pointer during remove() or a failed probe(). As a couple of drivers forgot to do this, it was agreed that it was cleaner if the i2c-core does this clearance when appropriate, as there is no guarantee for the lifetime of the clientdata-pointer after remove() anyhow. This feature was added to the core with commit e4a7b9b04de15f6b63da5ccdd373ffa3057a3681 to fix the faulty drivers. As there is no need anymore to clear the clientdata-pointer, remove all current occurrences in the drivers to simplify the code and prevent confusion. Signed-off-by: Wolfram Sang <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Acked-by: Richard Purdie <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-06-03i2c/busses: Move two drivers to embedded sectionWolfram Sang2-23/+23
And fix a typo while we are here Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-06-03i2c: Rename i2c_check_addr to i2c_check_addr_busyJean Delvare1-19/+19
Otherwise it's not clear what it is checking. Also move the function to save a forward declaration. Signed-off-by: Jean Delvare <[email protected]>
2010-06-03i2c: Document reserved I2C addressesJean Delvare1-3/+25
Move strict I2C address validity check to a single function, and document the reserved I2C addresses there. Signed-off-by: Jean Delvare <[email protected]> Cc: Hans Verkuil <[email protected]>
2010-06-03i2c: Check for address validity on client registrationJean Delvare1-7/+26
Do basic address validity checks when a client is being registered. We already had checks in place for devices which are being detected, but not for devices which are simply instantiated. This is a very basic check. We don't want to do strict checking here because some devices are known to infringe the I2C address constraints (e.g. IR receivers at 7-bit address 0x7a while this value is supposedly reserved for 10-bit addresses.) So we assume the caller knows what it is doing. Signed-off-by: Jean Delvare <[email protected]> Cc: Matthieu Castet <[email protected]>
2010-06-03i2c: Share the I2C device presence detection codeJean Delvare1-40/+40
Use the same I2C device presence detection code for legacy and new device detection functions. This is more consistent and makes the code smaller. Signed-off-by: Jean Delvare <[email protected]> Cc: Matthieu Castet <[email protected]>
2010-06-03Documentation/i2c: Checkpatch cleanupAndrea Gelmini7-54/+54
Remove all trailing whitespace in Documentation/i2c. Signed-off-by: Andrea Gelmini <[email protected]> Signed-off-by: Jean Delvare <[email protected]>
2010-06-03xen: avoid allocation causing potential swap activity on the resume pathIan Campbell1-1/+1
Since the device we are resuming could be the device containing the swap device we should ensure that the allocation cannot cause IO. On resume, this path is triggered when the running system tries to continue using its devices. If it cannot then the resume will fail; to try to avoid this we let it dip into the emergency pools. The majority of these changes were made when linux-2.6.18-xen.hg changeset e8b49cfbdac0 was ported upstream in a144ff09bc52ef3f3684ed23eadc9c7c0e57b3aa but somehow this hunk was dropped. Signed-off-by: Ian Campbell <[email protected]> Acked-by: Jeremy Fitzhardinge <[email protected]> Cc: Stable Kernel <[email protected]> # .32.x
2010-06-03xen: ensure timer tick is resumed even on CPU driving the resumeIan Campbell1-2/+2
The core suspend/resume code is run from stop_machine on CPU0 but parts of the suspend/resume machinery (including xen_arch_resume) are run on whichever CPU happened to schedule the xenwatch kernel thread. As part of the non-core resume code xen_arch_resume is called in order to restart the timer tick on non-boot processors. The boot processor itself is taken care of by core timekeeping code. xen_arch_resume uses smp_call_function which does not call the given function on the current processor. This means that we can end up with one CPU not receiving timer ticks if the xenwatch thread happened to be scheduled on CPU > 0. Use on_each_cpu instead of smp_call_function to ensure the timer tick is resumed everywhere. Signed-off-by: Ian Campbell <[email protected]> Acked-by: Jeremy Fitzhardinge <[email protected]> Cc: Stable Kernel <[email protected]> # .32.x