aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* remoteproc: add runtime PM autosuspend supportFernando Guzman Lugo2011-07-083-4/+289
| | | | | | | | | | | | | | | | | | Going to suspend and resuming is a heavy task with much latency. For that reason remoteproc should go to suspend after some time of inactivity. However, the remoteproc driver cannot know by itself if activity is being performing on the remote processor (the driver is only in charge of turning it on/off). That is why remoteproc adds new APIs to be notified when the remote processor is used and then restart suspend timeout. Remote proc users need to use these new APIs. Besides, if they have issues when the remote processor goes to suspend without their knowledge, they need to register for suspend/resume notifications. Returning an error in the notification callback means they are using the remote processor and the autosuspend should be cancelled. Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* virtio_ring: export function more_used()Fernando Guzman Lugo2011-07-082-0/+10
| | | | | | | | | Expose more_used() as virtqueue_more_used(). That way, users can know if they have pending messages. Change-Id: Ie14404f9f3116c28a7a43e9f51232df856fda0eb Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* OMAP: mailbox: fix NULL nb in omap_mbox_putFernando Guzman Lugo2011-07-081-1/+2
| | | | | | | | omap_mbox_put must check nb for NULL before trying to unregister it Change-Id: I49620e28e23ad24549e495548cac3e538cbcd751 Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* OMAP: remoteproc: implement fatal error notificationsFernando Guzman Lugo2011-07-081-20/+58
| | | | | Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* remoteproc: add fatal error notifications for rproc usersFernando Guzman Lugo2011-07-082-1/+103
| | | | | | | | | | | | Two new functions are added, so that rproc users can register/unregister for fatal error notifications. Once a fatal error is notified, the remote processor is not usable anymore, and the rproc handle should be released. This patch also includes MMU faults notifications. New fatal errors will be added in the future. Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* OMAP: iommu: disable interrupts if mmufault is not handledFernando Guzman Lugo2011-07-082-2/+1
| | | | | | | | | | | | | | | | | If the mmufault callback registered by the user is not able to manage the mmufault, we need to disable the interrupts to avoid being interrupted again and again. Before, when an iommu fault happended, iommu_disable() was being called. However, it gives an unhandled abort when user calls iommu_put() because the module clocks are already disabled. Also, it removes irq acking from omap2_iommu_fault_isr function, due to MMU tables not being updated with a valid pa, so there is no point acking since the interrupt and status flag will be set again. Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* ARM: omap2: dvfs/pd: fix plist usages not that lock is removedDima Zavin2011-07-082-4/+3
| | | | | Change-Id: I8613c7449ca0d05bbf81a863e7bcf22fb8d2385c Signed-off-by: Dima Zavin <dima@android.com>
* plist: Remove the need to supply locks to plist headsDima Zavin2011-07-088-68/+14
| | | | | | | | | | | | | | | This was legacy code brought over from the RT tree and is no longer necessary. Signed-off-by: Dima Zavin <dima@android.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Cc: Daniel Walker <dwalker@codeaurora.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Andi Kleen <andi@firstfloor.org> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Link: http://lkml.kernel.org/r/1310084879-10351-2-git-send-email-dima@android.com Signed-off-by: Ingo Molnar <mingo@elte.hu>
* Merge branch 'linux-omap-pm-3.0' into linux-omap-3.0Colin Cross2011-07-0627-36/+296
|\
| * Merge branch 'omap-pm-integration' of ↵Colin Cross2011-07-0627-36/+296
| |\ |/ / | | | | git://github.com/nmenon/linux-omap-ti-pm into linux-omap-pm-3.0
| * OMAP: Redefine mandatory barriers for OMAP to includeSantosh Shilimkar2011-07-067-14/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | interconnect barrier. On OMAP4 SOC intecronnects has many write buffers in the async bridges and they can be drained only with stongly ordered accesses. There are two ports as below from MPU and both needs to be drained. - MPU --> L3 T2ASYNC FIFO - MPU --> DDR T2ASYNC FIFO Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Richard Woodruff <r-woodruff2@ti.com>
| * OMAP4: PM: create fdif as a processor_deviceMiguel Vadillo2011-07-062-0/+10
| | | | | | | | | | | | | | Needed to be able to add the opp values for fdif Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Miguel Vadillo <vadillo@ti.com>
| * OMAP4: OPP: Add entries for FDIF and the DSPPaul Hunt2011-07-061-2/+28
| | | | | | | | | | | | | | Add FDIF and DSP entries to the OPP table. Acked-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Paul Hunt <hunt@ti.com>
| * OMAP: ID: add production ID informationNishanth Menon2011-07-062-0/+13
| | | | | | | | | | | | Add ability to print out the silicon unique production ID as well. Signed-off-by: Nishanth Menon <nm@ti.com>
| * OMAP4: clockdomain: Keep L4 PER and L4 CFG depedency with MPUSS and DUCATISantosh Shilimkar2011-07-061-5/+11
| | | | | | | | | | | | | | | | | | It has been observed that L4 PER isn't coming out of idle on MPU accesses to L4 PER modules. This indicates that dynamic dependency isn't working on L4 clockdomains. This patch keeps the static dependency for L4 CFG and L4 PER with MPU and DUCATI. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
| * i2c-omap: OMAP4: PM: (re)init for every transfer to support off-modeRajendra Nayak2011-07-061-2/+2
| | | | | | | | | | | | | | | | Make sure the i2c registers are reinited on OMAP4 as its needed to support OFF mode. This was earlier only done on OMAP3 platform. Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
| * OMAP4: trim quirk: Fix incorrect CPU revision checkVolodymyr Riazantsev2011-07-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix incorrect check CPU revision during check for eFUSE trim as some early samples of CPUs revs ES 2.2 and ES 2.3 4430 and 4460s also need the "s/w workaround". Since untrimmed parts are not really supposed to be seen on the field, put a message on log to search for. [nm@ti.com: pulled back into k3.0 from k35] Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Volodymyr Riazantsev <x0153367@ti.com>
| * OMAP2+: hwmod: Fix smart-standby + wakeup supportCousson Benoit2011-07-062-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 86009eb326afde34ffdc5648cd344aa86b8d58d4 was adding the wakeup support for new OMAP4 IPs. This support is incomplete for busmaster IPs that need as well to use smart-standby with wakeup. This new standbymode is suported on HSI and USB_HOST_FS for the moment. Add the new MSTANDBY_SMART_WKUP flag to mark the IPs that support this capability. Enable this new mode when applicable in _enable_wakeup, _disable_wakeup, _enable_sysc and _idle_sysc. The omap_hwmod_44xx_data.c will have to be updated to add this new flag. Acked-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Benoit Cousson <b-cousson@ti.com> Signed-off-by: Djamil Elaidi <d-elaidi@ti.com> Cc: Paul Walmsley <paul@pwsan.com>
| * OMAP: OPP: Do a round_rate before adding into OPP tableRajendra Nayak2011-07-061-0/+19
| | | | | | | | | | | | | | | | | | | | | | Most clock rates can vary to some extent based on the exact M/N values used to lock a dpll. Do a round_rate before updating the rates into the OPP table so that the 'exact' rates appear and a subsequent clk_set_rate works without issues. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com>
| * OMAP4: clock: Fix round_rate for mpu and l3 virtual clocksRajendra Nayak2011-07-062-2/+2
| | | | | | | | | | | | | | | | round_rate api for virtual clocks (mpu and l3) was wrongly passing the clk pointer instead of clk->parent pointer, while calling the parents round_rate api. Signed-off-by: Rajendra Nayak <rnayak@ti.com>
| * ARM: mm: Add strongly ordered descriptor and memory allocate API.Santosh Shilimkar2011-07-065-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | On certain architectures, there might be a need to mark certain addresses with strongly ordered memory attributes to avoid ordering issues at the interconnect level. On OMAP4, the asynchronous bridge buffers can only be drained with strongly ordered accesses and hence the need to mark the memory strongly ordered. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Woodruff Richard <r-woodruff2@ti.com>
| * OMAP2+: PMIC: fix build issues with pmic_updateNishanth Menon2011-07-062-3/+4
|/ | | | | | | | | | | | | | Fixes two things: a) ability to build with TPS disabled - fails with: arch/arm/mach-omap2/pm.h fails at inline defn, "nt" instead of "int" b) build warning: arch/arm/mach-omap2/omap_pmic.c: In function 'omap_pmic_update': arch/arm/mach-omap2/omap_pmic.c:84:4: warning: too many arguments for format arch/arm/mach-omap2/omap_pmic.c:97:1: warning: control reaches end of non-void function Reported-by: Colin Cross <ccross@google.com> Acked-by: Colin Cross <ccross@google.com> Signed-off-by: Nishanth Menon <nm@ti.com>
* arm: omap4: pm: set smart-idle/wakeup for gpio2Girish S Ghongdemath2011-07-061-2/+1
| | | | | | | | For GPIO2, hwmod is set for SWSUP idling of GPIO2 instead of smartidle. This patch allows hwmod to set SMART-IDLE-WAKEUP and ENAWAKUP for GPIO2. Signed-off-by: Girish S G <girishsg@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* mmc: omap_hsmmc: fix build breakageNishanth Menon2011-07-051-0/+1
| | | | | | | | | | | | | | | | | | | commit 85255805d902a9f447ffd5d715deefb668152981 Author: Dmitry Shmidt <dimitrysh@google.com> mmc: omap_hsmmc: Skip mmc suspend/resume ops for SDIO device breaks build with: drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_suspend': drivers/mmc/host/omap_hsmmc.c:2364:42: error: dereferencing pointer to incomplete type drivers/mmc/host/omap_hsmmc.c:2364:52: error: 'MMC_TYPE_SDIO' undeclared (first use in this function) drivers/mmc/host/omap_hsmmc.c:2364:52: note: each undeclared identifier is reported only once for each function it appears in drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_resume': drivers/mmc/host/omap_hsmmc.c:2426:42: error: dereferencing pointer to incomplete type drivers/mmc/host/omap_hsmmc.c:2426:52: error: 'MMC_TYPE_SDIO' undeclared (first use in this function) include card.h to prevent the breakage Signed-off-by: Nishanth Menon <nm@ti.com>
* mmc: omap_hsmmc: Skip mmc suspend/resume ops for SDIO deviceDmitry Shmidt2011-07-011-2/+4
| | | | Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* OMAP4-SGX: Initial DVFS implementation for SGX driverHemant Hariyani2011-06-305-5/+154
| | | | | | | | | This is initial DVFS implementation for SGX driver. It supports scaling between overdrive and low power modes. In case overdrive mode is not supported, normal operating frequency is used. Change-Id: I3ad98261c09508d9c5eab2d6e4af0a67eba7dec3 Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
* Merge remote branch 'omap/linux-omap-dss-3.0' into linux-omap-3.0Rebecca Schultz Zavin2011-06-301-1/+6
|\
| * OMAP: DSS2: DSI: Support non-dcs long readArve Hjønnevåg2011-06-291-1/+6
| | | | | | | | | | Change-Id: I18168c887e1384c07dc033a1ffc57abdacb26073 Signed-off-by: Arve Hjønnevåg <arve@android.com>
* | OMAP4: I2C: Enable FIFO usage for OMAP4Shubhrajyoti Datta2011-06-301-5/+4
| | | | | | | | | | | | | | | | | | | | Currently the fifo depth is set to zero for OMAP4 which disables the FIFO usage. This patch enables the FIFO usage for I2C transactions on OMAP4 also. Change-Id: I15bb4a4c2b5ac13d8763231517d246770d4cae7b Reported-By: Nishanth Menon <nm@ti.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
* | OMAP4: PM debug: fixup section mismatch warningsTodd Poynor2011-06-301-2/+2
| | | | | | | | | | Change-Id: I712b9c2bd78947bf5ab34be7dc157fd62cafb058 Signed-off-by: Todd Poynor <toddpoynor@google.com>
* | rpmsg: resmgr: request / release constraintsMiguel Vadillo2011-06-302-64/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the ability to request and release constraints on the devices each remoteproc has requested: Frequency constraints(OPP): - IVA Latency constraints: - IVA - ISS - FDIF Bw constraints: - IVA (on L3 bus) - ISS (on L3 bus) - FDIF (on L3 bus) Change-Id: I9445ba4f3b9491da317e3fe6fce3efe2cc6fbb10 Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
* | omap: rpres: adding constraints APIMiguel Vadillo2011-06-303-5/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding PM constraints to rpres driver: - scale_dev: request a change in the opp of the device or the domain the device is part of. - set_lat: request a latency constraint on the device or the domain the device is part of. - set_bw: set the minimum bus troughput for this device. Change-Id: I711fc5c68d2cab812c399764f429d1ada37ced2b Signed-off-by: Miguel Vadillo <vadillo@ti.com> Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
* | OMAP: DSSCOMP: Fix apply command to wait for vsyncSunita Nadampalli2011-06-291-1/+1
| | | | | | | | | | | | | | | | DSSCOMP apply method is corrected to make sure that the requested composition structure is applied before returning from the method. Signed-off-by: Sunita Nadampalli <sunitan@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* | Merge remote branch 'omap/linux-omap-mm-3.0' into linux-omap-3.0Rebecca Schultz Zavin2011-06-292-56/+77
|\ \
| * | TILER: Modify ION APIs to use address arrays and return number of virt pagesAndy Gross2011-06-272-56/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed use of scatterlists in favor of address arrays. Modified tiler_memsize API to provide number of required virtual pages for userspace mapping. Modified tiler_alloc_block_area to fill in, if present, and array of tiler addresses necessary to mmap block to userspace. Signed-off-by: Andy Gross <andy.gross@ti.com>
* | | OMAP4: Print reset reasons at bootTodd Poynor2011-06-292-1/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example dmesg output after reboot command: Last reset was warm software reset (PRM_RSTST=0x2) Example after watchdog bite: Last reset was MPU Watchdog Timer reset (PRM_RSTST=0x8) Example after power off or battery pull: Last reset was cold reset (PRM_RSTST=0x1) Change-Id: I44d312d726ee41a0f0be0e77521bbe4ffbbd7a08 Signed-off-by: Todd Poynor <toddpoynor@google.com>
* | | Merge commit 'v3.0-rc5' into linux-omap-3.0Colin Cross2011-06-29182-1116/+1464
|\ \ \
| * | | Linux 3.0-rc5Linus Torvalds2011-06-271-1/+1
| | | |
| * | | drm/i915: more struct_mutex lockingHugh Dickins2011-06-272-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When auditing the locking in i915_gem.c (for a prospective change which I then abandoned), I noticed two places where struct_mutex is not held across GEM object manipulations that would usually require it. Since one is in initial setup and the other in driver unload, I'm guessing the mutex is not required for either; but post a patch in case it is. Signed-off-by: Hugh Dickins <hughd@google.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Keith Packard <keithp@keithp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | | drm/i915: use shmem_truncate_rangeHugh Dickins2011-06-271-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interface to ->truncate_range is changing very slightly: once "tmpfs: take control of its truncate_range" has been applied, this can be applied. For now there is only a slight inefficiency while this remains unapplied, but it will soon become essential for managing shmem's use of swap. Change i915_gem_object_truncate() to use shmem_truncate_range() directly: which should also spare i915 later change if we switch from inode_operations->truncate_range to file_operations->fallocate. Signed-off-by: Hugh Dickins <hughd@google.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Keith Packard <keithp@keithp.com> Cc: Dave Airlie <airlied@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | | drm/i915: use shmem_read_mapping_pageHugh Dickins2011-06-272-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Soon tmpfs will stop supporting ->readpage and read_cache_page_gfp(): once "tmpfs: add shmem_read_mapping_page_gfp" has been applied, this patch can be applied to ease the transition. Make i915_gem_object_get_pages_gtt() use shmem_read_mapping_page_gfp() in the one place it's needed; elsewhere use shmem_read_mapping_page(), with the mapping's gfp_mask properly initialized. Forget about __GFP_COLD: since tmpfs initializes its pages with memset, asking for a cold page is counter-productive. Include linux/shmem_fs.h also in drm_gem.c: with shmem_file_setup() now declared there too, we shall remove the prototype from linux/mm.h later. Signed-off-by: Hugh Dickins <hughd@google.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Keith Packard <keithp@keithp.com> Cc: Dave Airlie <airlied@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | | drm/ttm: use shmem_read_mapping_pageHugh Dickins2011-06-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Soon tmpfs will stop supporting ->readpage and read_mapping_page(): once "tmpfs: add shmem_read_mapping_page_gfp" has been applied, this patch can be applied to ease the transition. ttm_tt_swapin() and ttm_tt_swapout() use shmem_read_mapping_page() in place of read_mapping_page(), since their swap_space has been created with shmem_file_setup(). Signed-off-by: Hugh Dickins <hughd@google.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: Dave Airlie <airlied@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | | drivers/tty/serial/8250_pci.c: fix warningAndrew Morton2011-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fis the warning drivers/tty/serial/8250_pci.c:1457: warning: initialization from incompatible pointer type Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | | drivers/misc/ioc4.c: fix section mismatch / race conditionRalf Baechle2011-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix this section mismatch: WARNING: drivers/misc/ioc4.o(.data+0x144): Section mismatch in reference from the variable ioc4_load_modules_work to the function .devinit.text:ioc4_load_modules() The variable ioc4_load_modules_work references the function __devinit ioc4_load_modules() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console This one is potentially fatal; by the time ioc4_load_modules is invoked it may already have been freed. For that reason ioc4_load_modules_work can't be turned to __devinitdata but also because it's referenced in ioc4_exit. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Acked-by: Brent Casavant <bcasavan@sgi.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | | drivers/leds/leds-lp5523.c: fix section mismatchesRalf Baechle2011-06-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix this section mismatch: WARNING: drivers/leds/leds-lp5523.o(.text+0x12f4): Section mismatch in reference from the function lp5523_probe() to the function .init.text:lp5523_init_led() The function lp5523_probe() references the function __init lp5523_init_led(). This is often because lp5523_probe lacks a __init annotation or the annotation of lp5523_init_led is wrong. Fixing this one triggers one more mismatch, fix that one as well. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | | drivers/leds/leds-lp5521.c: fix section mismatchesRalf Baechle2011-06-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix this section mismatch: WARNING: drivers/leds/leds-lp5521.o(.text+0xf2c): Section mismatch in reference from the function lp5521_probe() to the function .init.text:lp5521_init_led() The function lp5521_probe() references the function __init lp5521_init_led(). This is often because lp5521_probe lacks a __init annotation or the annotation of lp5521_init_led is wrong. Fixing this mismatch triggers one more mismatch, fix that one as well. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | | memcg: fix direct softlimit reclaim to be called in limit pathKAMEZAWA Hiroyuki2011-06-271-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit d149e3b25d7c ("memcg: add the soft_limit reclaim in global direct reclaim") adds a softlimit hook to shrink_zones(). By this, soft limit is called as try_to_free_pages() do_try_to_free_pages() shrink_zones() mem_cgroup_soft_limit_reclaim() Then, direct reclaim is memcg softlimit hint aware, now. But, the memory cgroup's "limit" path can call softlimit shrinker. try_to_free_mem_cgroup_pages() do_try_to_free_pages() shrink_zones() mem_cgroup_soft_limit_reclaim() This will cause a global reclaim when a memcg hits limit. This is bug. soft_limit_reclaim() should be called when scanning_global_lru(sc) == true. And the commit adds a variable "total_scanned" for counting softlimit scanned pages....it's not "total". This patch removes the variable and update sc->nr_scanned instead of it. This will affect shrink_slab()'s scan condition but, global LRU is scanned by softlimit and I think this change makes sense. TODO: avoid too much scanning of a zone when softlimit did enough work. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Cc: Ying Han <yinghan@google.com> Cc: Michal Hocko <mhocko@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | | taskstats: don't allow duplicate entries in listener modeVasiliy Kulikov2011-06-271-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently a single process may register exit handlers unlimited times. It may lead to a bloated listeners chain and very slow process terminations. Eg after 10KK sent TASKSTATS_CMD_ATTR_REGISTER_CPUMASKs ~300 Mb of kernel memory is stolen for the handlers chain and "time id" shows 2-7 seconds instead of normal 0.003. It makes it possible to exhaust all kernel memory and to eat much of CPU time by triggerring numerous exits on a single CPU. The patch limits the number of times a single process may register itself on a single CPU to one. One little issue is kept unfixed - as taskstats_exit() is called before exit_files() in do_exit(), the orphaned listener entry (if it was not explicitly deregistered) is kept until the next someone's exit() and implicit deregistration in send_cpu_listeners(). So, if a process registered itself as a listener exits and the next spawned process gets the same pid, it would inherit taskstats attributes. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Cc: Balbir Singh <bsingharora@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | | mm: fix assertion mapping->nrpages == 0 in end_writeback()Jan Kara2011-06-273-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under heavy memory and filesystem load, users observe the assertion mapping->nrpages == 0 in end_writeback() trigger. This can be caused by page reclaim reclaiming the last page from a mapping in the following race: CPU0 CPU1 ... shrink_page_list() __remove_mapping() __delete_from_page_cache() radix_tree_delete() evict_inode() truncate_inode_pages() truncate_inode_pages_range() pagevec_lookup() - finds nothing end_writeback() mapping->nrpages != 0 -> BUG page->mapping = NULL mapping->nrpages-- Fix the problem by doing a reliable check of mapping->nrpages under mapping->tree_lock in end_writeback(). Analyzed by Jay <jinshan.xiong@whamcloud.com>, lost in LKML, and dug out by Miklos Szeredi <mszeredi@suse.de>. Cc: Jay <jinshan.xiong@whamcloud.com> Cc: Miklos Szeredi <mszeredi@suse.de> Signed-off-by: Jan Kara <jack@suse.cz> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | | mm/memory-failure.c: fix spinlock vs mutex orderPeter Zijlstra2011-06-272-18/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot take a mutex while holding a spinlock, so flip the order and fix the locking documentation. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>