aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-12-14ARM: mach-shmobile: Fix up pinmux entries in MakefileMagnus Damm1-5/+8
Compiling in multiple CPUs into the same kernel binary requires a Makefile update. With this patch in place it is possible to enable the pinmux code for both the SH7372 and the SH7377. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-12-13Merge branches 'rmobile/ag5' and 'rmobile/mackerel' into rmobile-latestPaul Mundt3-25/+433
2010-12-13ARM: mach-shmobile: mackerel: Add keypad tca6408a supportTony SIM1-0/+38
This patch maps key0/key1/key2/key3 as HOME/MENU/BACK/POWER buttons on mackerel board. Signed-off-by: Tony SIM <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-12-08ARM: mach-shmobile: mackerel: Add Accelerometer sensor supportTony SIM1-0/+15
Signed-off-by: Tony SIM <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-12-03ARM: mach-shmobile: AG5 clock framework improvementsMagnus Damm2-25/+256
This patch improves the state of the AG5 clock framework support. The main clock parent is automatically detected, but most of the clocks are not used by any driver or subsystem at this point. More work is needed for support of multi media hardware such as FSI and/or LCDC/MIPI-DSI. Signed-off-by: Magnus Damm <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-12-01ARM: mach-shmobile: mackerel: Add FSI-AK4643 supportKuninori Morimoto1-0/+84
Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-12-01ARM: mach-shmobile: mackerel: Add LEDs supportKuninori Morimoto1-0/+40
you can control it by echo 0 > /sys/class/leds/led0/brightness echo 1 > /sys/class/leds/led0/brightness Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-30Merge branch 'rmobile/mackerel' into rmobile-latestPaul Mundt4-3/+563
Conflicts: arch/arm/mach-shmobile/Kconfig arch/arm/mach-shmobile/Makefile Signed-off-by: Paul Mundt <[email protected]>
2010-11-30Merge branches 'rmobile/ag5' and 'rmobile/mmcif' into rmobile-latestPaul Mundt6-26/+66
2010-11-30Merge branch 'common/mmcif' into rmobile/mmcifPaul Mundt4-17/+15
2010-11-30ARM: mach-shmobile: mackerel: Add USB1(Host) supportKuninori Morimoto1-1/+68
Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-29ARM: mach-shmobile: mackerel: Add lost GPIO_FN_LCDD 18 - 23Kuninori Morimoto1-0/+6
RGB24 bus needs 18-23 pin Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-29ARM: mach-shmobile: mackerel: Add mackerel defconfigKuninori Morimoto1-0/+138
Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-29ARM: mach-shmobile: mackerel: document switch and pin modes.Kuninori Morimoto1-0/+60
Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-29ARM: mach-shmobile: mackerel: Add LCDC supportKuninori Morimoto1-0/+86
Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-29ARM: mach-shmobile: mackerel: Add SMSC supportKuninori Morimoto1-0/+34
Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-29ARM: mach-shmobile: Add mackerel board supportKuninori Morimoto3-1/+172
Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-29ARM: mach-shmobile: ag5evm: Add FSI resourcesKuninori Morimoto1-0/+41
Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-29sh, mmc: Use defines when setting CE_CLK_CTRLSimon Horman1-8/+9
The 16-19th bits of CE_CLK_CTRL set the MMC clock frequency. Cc: Yusuke Goda <[email protected]> Cc: Magnus Damm <[email protected]> Signed-off-by: Simon Horman <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-29mmc, sh: Correct value for resetSimon Horman1-6/+3
This resolves a regression that I introduced in "mmc, sh: Move constants to sh_mmcif.h". Having examined the manual and tested the code on an AP4EVB board it seems that the correct sequence is. 1) Write 1 to bit 31 and zeros to all other bits 2) Write zero to all bits Cc: Yusuke Goda <[email protected]> Cc: Magnus Damm <[email protected]> Signed-off-by: Simon Horman <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-29sh, mmc: Make mmcif_update_progress static inlineSimon Horman3-3/+3
extern inline doesn't make much sense Cc: Yusuke Goda <[email protected]> Cc: Magnus Damm <[email protected]> Signed-off-by: Simon Horman <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-25Merge branch 'rmobile/mmcif' into rmobile-latestPaul Mundt116-1942/+8336
2010-11-25ARM: mach-shmobile: clock-sh73a0: modify MSTP orderKuninori Morimoto1-9/+10
This patch permuted clock arrays in the order of MSTP Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-25ARM: mach-shmobile: enable MMCIF DMA on ap4evbGuennadi Liakhovetski1-0/+10
Have to add DMA slave configuration to enable DMA for the sh7372 MMCIF controller. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-25mmc: sh_mmcif: add DMA supportGuennadi Liakhovetski3-9/+258
The MMCIF controller on sh-mobile platforms can use the DMA controller for data transfers. Interface to the SH dmaengine driver to enable DMA. We also have to lower the maximum number of segments to match with the number od DMA descriptors on SuperH, this doesn't significantly affect driver's PIO performance. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-25mmc: sh_mmcif: cosmetic clean upGuennadi Liakhovetski1-33/+30
Replace pr_* with respective dev_*, sort headers alphabetically, remove an unused struct member, superfluous variable initialisations and type-casts. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-25ARM: mach-shmobile: add DMA defines for MMCIF on sh7372Guennadi Liakhovetski2-0/+12
Add DMA slave IDs and slave definitions for MMCIF on sh7372. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-25mmc: sh_mmcif: switch to completion, fix flagsGuennadi Liakhovetski1-71/+46
In sh_mmcif.c an event is used as a completion, switch over. When a wait_for_completion*_timeout() returns, it suffices to check the remaining time, setting an additional flag before waking up the waiting task only reduces the race window, but does not eliminate it. This patch switches the driver to use a completion to signal an interrupt, the only case, when an interrupt should not wake up the waiter, is when an automatic CMD12 completes. Also fix MODULE_ALIAS. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2010-11-25Merge branch 'common/mmcif' into rmobile/mmcifPaul Mundt2-28/+34
2010-11-25Merge branch 'hwmon-for-linus' of ↵Linus Torvalds2-6/+6
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging: hwmon: (lis3lv02d_i2c) Fix compile warnings hwmon: (i5k_amb) Fix compile warning
2010-11-25Merge branch 'for-linus' of ↵Linus Torvalds3-16/+56
git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: xen: remove duplicated #include xen: x86/32: perform initial startup on initial_page_table
2010-11-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tileLinus Torvalds3-28/+38
* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: arch/tile: fix memchr() not to dereference memory for zero length arch/tile: make glibc's sysconf(_SC_NPROCESSORS_CONF) work correctly arch/tile: fix rwlock so would-be write lockers don't block new readers
2010-11-25Merge branch 'drivers' of ↵Linus Torvalds19-187/+7210
git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile * 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: pci root complex: support for tile architecture drivers/net/tile/: on-chip network drivers for the tile architecture MAINTAINERS: add drivers/char/hvc_tile.c as maintained by tile
2010-11-25Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds31-54/+124
* master.kernel.org:/home/rmk/linux-2.6-arm: ARM: 6482/2: Fix find_next_zero_bit and related assembly ARM: 6490/1: MM: bugfix: initialize spinlock for init_mm.context ARM: avoid annoying <4>'s in printk output SCSI: arm fas216: fix missing ';' ARM: avoid marking decompressor .stack section as having contents ARM: 6489/1: thumb2: fix incorrect optimisation in usracc ARM: 6488/1: nomadik: prevent sched_clock() wraparound ARM: 6484/1: fix compile warning in mm/init.c ARM: 6473/1: Small update to ux500 specific L2 cache code ARM: improve compiler's ability to optimize page tables mx25: fix spi device registration typo ARM i.MX27 eukrea: Fix compilation ARM i.MX spi: fix compilation for i.MX21 ARM i.MX pcm037 eet: compile fixes ARM i.MX: sdma is merged, so remove #ifdef SDMA_IS_MERGED ARM mx3fb: check for DMA engine type mach-pcm037_eet: Fix section mismatch for eet_init_devices()
2010-11-25Merge branch 'fbdev-fixes-for-linus' of ↵Linus Torvalds17-1281/+285
git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6 * 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6: sisfb: delete osdef.h sisfb: move the CONFIG warning to sis_main.c sisfb: replace SiS_SetMemory with memset_io sisfb: remove InPort/OutPort wrappers sisfb: use CONFIG_FB_SIS_301/315 instead of SIS301/315H sisfb: delete redudant #define SIS_LINUX_KERNEL sisfb: delete dead SIS_XORG_XF86 code sisfb: delete fallback code for pci_map_rom() sisfb: delete obsolete PCI ROM bug workaround fbdev: Update documentation index file. lxfb: Program panel v/h sync output polarity correctly fbcmap: integer overflow bug fbcmap: cleanup white space in fb_alloc_cmap() MAINTAINERS: Add fbdev patchwork entry, tidy up file patterns. fbdev: da8xx: punt duplicated FBIO_WAITFORVSYNC define fbdev: sh_mobile_lcdcfb: fix bug in reconfig()
2010-11-25Merge branch 'sh-fixes-for-linus' of ↵Linus Torvalds10-90/+22
git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 * 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: sh: clkfwk: Build fix for non-legacy CPG changes. sh: Use GCC __builtin_prefetch() to implement prefetch(). sh: fix vsyscall compilation due to .eh_frame issue sh: avoid to flush all cache in sys_cacheflush sh: clkfwk: Disable init clk op for non-legacy clocks. sh: clkfwk: Kill off now unused algo_id in set_rate op. sh: clkfwk: Kill off unused clk_set_rate_ex().
2010-11-25Merge branch 'for-linus' of git://neil.brown.name/mdLinus Torvalds2-2/+5
* 'for-linus' of git://neil.brown.name/md: md: Call blk_queue_flush() to establish flush/fua support md/raid1: really fix recovery looping when single good device fails. md: fix return value of rdev_size_change()
2010-11-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linusLinus Torvalds4-35/+13
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: virtio: fix format of sysfs driver/vendor files Char: virtio_console, fix memory leak virtio: return correct capacity to users module: Update prototype for ref_module (formerly use_module)
2010-11-25arch/x86/include/asm/fixmap.h: mark __set_fixmap_offset as __always_inlineAndrew Morton1-2/+2
When compiling arch/x86/kernel/early_printk_mrst.c with i386 allmodconfig, gcc-4.1.0 generates an out-of-line copy of __set_fixmap_offset() which contains a reference to __this_fixmap_does_not_exist which the compiler cannot elide. Marking __set_fixmap_offset() as __always_inline prevents this. Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Feng Tang <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-25scripts: fix gfp-translate for recent changes to gfp.hMel Gorman1-1/+6
The recent changes to gfp.h to satisfy sparse broke scripts/gfp-translate. This patch fixes it up to work with old and new versions of gfp.h . [[email protected]: use `grep -q', per WANG Cong] Signed-off-by: Mel Gorman <[email protected]> Cc: Namhyung Kim <[email protected]> Reviewed-by: WANG Cong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-25reiserfs: fix inode mutex - reiserfs lock misorderingFrederic Weisbecker1-4/+3
reiserfs_unpack() locks the inode mutex with reiserfs_mutex_lock_safe() to protect against reiserfs lock dependency. However this protection requires to have the reiserfs lock to be locked. This is the case if reiserfs_unpack() is called by reiserfs_ioctl but not from reiserfs_quota_on() when it tries to unpack tails of quota files. Fix the ordering of the two locks in reiserfs_unpack() to fix this issue. Signed-off-by: Frederic Weisbecker <[email protected]> Reported-by: Markus Gapp <[email protected]> Reported-by: Jan Kara <[email protected]> Cc: Jeff Mahoney <[email protected]> Cc: <[email protected]> [2.6.36.x] Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-25backlight: grab ops_lock before testing bd->opsUwe Kleine-König1-6/+6
According to the comment describing ops_lock in the definition of struct backlight_device and when comparing with other functions in backlight.c the mutex must be hold when checking ops to be non-NULL. Fixes a problem added by c835ee7f4154992e6 ("backlight: Add suspend/resume support to the backlight core") in Jan 2009. Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Richard Purdie <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-25drivers/misc/isl29020.c: remove incorrect kfree in isl29020_remove()Axel Lin1-3/+1
struct als_data *data is not used in this driver at all. Also add a missing ">" character for MODULE_AUTHOR. Signed-off-by: Axel Lin <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-25pagemap: set pagemap walk limit to PMD boundaryNaoya Horiguchi1-1/+2
Currently one pagemap_read() call walks in PAGEMAP_WALK_SIZE bytes (== 512 pages.) But there is a corner case where walk_pmd_range() accidentally runs over a VMA associated with a hugetlbfs file. For example, when a process has mappings to VMAs as shown below: # cat /proc/<pid>/maps ... 3a58f6d000-3a58f72000 rw-p 00000000 00:00 0 7fbd51853000-7fbd51855000 rw-p 00000000 00:00 0 7fbd5186c000-7fbd5186e000 rw-p 00000000 00:00 0 7fbd51a00000-7fbd51c00000 rw-s 00000000 00:12 8614 /hugepages/test then pagemap_read() goes into walk_pmd_range() path and walks in the range 0x7fbd51853000-0x7fbd51a53000, but the hugetlbfs VMA should be handled by walk_hugetlb_range(). Otherwise PMD for the hugepage is considered bad and cleared, which causes undesirable results. This patch fixes it by separating pagemap walk range into one PMD. Signed-off-by: Naoya Horiguchi <[email protected]> Cc: Jun'ichi Nomura <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Matt Mackall <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-25mm: remove call to find_vma in pagewalk for non-hugetlbfsDavid Sterba1-2/+3
Commit d33b9f45 ("mm: hugetlb: fix hugepage memory leak in walk_page_range()") introduces a check if a vma is a hugetlbfs one and later in 5dc37642 ("mm hugetlb: add hugepage support to pagemap") it is moved under #ifdef CONFIG_HUGETLB_PAGE but a needless find_vma call is left behind and its result is not used anywhere else in the function. The side-effect of caching vma for @addr inside walk->mm is neither utilized in walk_page_range() nor in called functions. Signed-off-by: David Sterba <[email protected]> Reviewed-by: Naoya Horiguchi <[email protected]> Acked-by: Andi Kleen <[email protected]> Cc: Andy Whitcroft <[email protected]> Cc: David Rientjes <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Lee Schermerhorn <[email protected]> Cc: Matt Mackall <[email protected]> Acked-by: Mel Gorman <[email protected]> Cc: Wu Fengguang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-25mm/page_alloc.c: fix build_all_zonelist() where percpu_alloc() is wrongly ↵KAMEZAWA Hiroyuki1-9/+5
called under stop_machine_run() During memory hotplug, build_allzonelists() may be called under stop_machine_run(). In this function, setup_zone_pageset() is called. But it's bug because it will do page allocation under stop_machine_run(). Here is a report from Alok Kataria. BUG: sleeping function called from invalid context at kernel/mutex.c:94 in_atomic(): 0, irqs_disabled(): 1, pid: 4, name: migration/0 Pid: 4, comm: migration/0 Not tainted 2.6.35.6-45.fc14.x86_64 #1 Call Trace: [<ffffffff8103d12b>] __might_sleep+0xeb/0xf0 [<ffffffff81468245>] mutex_lock+0x24/0x50 [<ffffffff8110eaa6>] pcpu_alloc+0x6d/0x7ee [<ffffffff81048888>] ? load_balance+0xbe/0x60e [<ffffffff8103a1b3>] ? rt_se_boosted+0x21/0x2f [<ffffffff8103e1cf>] ? dequeue_rt_stack+0x18b/0x1ed [<ffffffff8110f237>] __alloc_percpu+0x10/0x12 [<ffffffff81465e22>] setup_zone_pageset+0x38/0xbe [<ffffffff810d6d81>] ? build_zonelists_node.clone.58+0x79/0x8c [<ffffffff81452539>] __build_all_zonelists+0x419/0x46c [<ffffffff8108ef01>] ? cpu_stopper_thread+0xb2/0x198 [<ffffffff8108f075>] stop_machine_cpu_stop+0x8e/0xc5 [<ffffffff8108efe7>] ? stop_machine_cpu_stop+0x0/0xc5 [<ffffffff8108ef57>] cpu_stopper_thread+0x108/0x198 [<ffffffff81467a37>] ? schedule+0x5b2/0x5cc [<ffffffff8108ee4f>] ? cpu_stopper_thread+0x0/0x198 [<ffffffff81065f29>] kthread+0x7f/0x87 [<ffffffff8100aae4>] kernel_thread_helper+0x4/0x10 [<ffffffff81065eaa>] ? kthread+0x0/0x87 [<ffffffff8100aae0>] ? kernel_thread_helper+0x0/0x10 Built 5 zonelists in Node order, mobility grouping on. Total pages: 289456 Policy zone: Normal This patch tries to fix the issue by moving setup_zone_pageset() out from stop_machine_run(). It's obviously not necessary to be called under stop_machine_run(). [[email protected]: remove unneeded local] Reported-by: Alok Kataria <[email protected]> Signed-off-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Petr Vandrovec <[email protected]> Cc: Pekka Enberg <[email protected]> Reviewed-by: Christoph Lameter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-25cgroups: make swap accounting default behavior configurableMichal Hocko3-2/+37
Swap accounting can be configured by CONFIG_CGROUP_MEM_RES_CTLR_SWAP configuration option and then it is turned on by default. There is a boot option (noswapaccount) which can disable this feature. This makes it hard for distributors to enable the configuration option as this feature leads to a bigger memory consumption and this is a no-go for general purpose distribution kernel. On the other hand swap accounting may be very usuful for some workloads. This patch adds a new configuration option which controls the default behavior (CGROUP_MEM_RES_CTLR_SWAP_ENABLED). If the option is selected then the feature is turned on by default. It also adds a new boot parameter swapaccount[=1|0] which enhances the original noswapaccount parameter semantic by means of enable/disable logic (defaults to 1 if no value is provided to be still consistent with noswapaccount). The default behavior is unchanged (if CONFIG_CGROUP_MEM_RES_CTLR_SWAP is enabled then CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED is enabled as well) Signed-off-by: Michal Hocko <[email protected]> Acked-by: Daisuke Nishimura <[email protected]> Cc: Balbir Singh <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-25memcg: avoid deadlock between move charge and try_charge()Daisuke Nishimura1-17/+26
__mem_cgroup_try_charge() can be called under down_write(&mmap_sem)(e.g. mlock does it). This means it can cause deadlock if it races with move charge: Ex.1) move charge | try charge --------------------------------------+------------------------------ mem_cgroup_can_attach() | down_write(&mmap_sem) mc.moving_task = current | .. mem_cgroup_precharge_mc() | __mem_cgroup_try_charge() mem_cgroup_count_precharge() | prepare_to_wait() down_read(&mmap_sem) | if (mc.moving_task) -> cannot aquire the lock | -> true | schedule() Ex.2) move charge | try charge --------------------------------------+------------------------------ mem_cgroup_can_attach() | mc.moving_task = current | mem_cgroup_precharge_mc() | mem_cgroup_count_precharge() | down_read(&mmap_sem) | .. | up_read(&mmap_sem) | | down_write(&mmap_sem) mem_cgroup_move_task() | .. mem_cgroup_move_charge() | __mem_cgroup_try_charge() down_read(&mmap_sem) | prepare_to_wait() -> cannot aquire the lock | if (mc.moving_task) | -> true | schedule() To avoid this deadlock, we do all the move charge works (both can_attach() and attach()) under one mmap_sem section. And after this patch, we set/clear mc.moving_task outside mc.lock, because we use the lock only to check mc.from/to. Signed-off-by: Daisuke Nishimura <[email protected]> Cc: Balbir Singh <[email protected]> Acked-by: KAMEZAWA Hiroyuki <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-25drivers/leds/leds-lp5523.c: perform SW reset before detectionSamu Onkalo1-7/+5
Chip detection may fail if the chip is in some odd state for example after system restart. Chip doesn't have HW reset line. Signed-off-by: Samu Onkalo <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-25drivers/leds/leds-lp5521.c: perform SW reset before detectionSamu Onkalo1-7/+5
Chip detection may fail if the chip is in some odd state for example after system restart. Chip doesn't have HW reset line. Signed-off-by: Samu Onkalo <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>