aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-31ARM: omap: remove mmc platform data dma_mask and initializationRussell King6-7/+0
DMAengine uses the DMA engine device structure when mapping/unmapping memory for DMA, so the MMC devices do not need their DMA masks initialized (this reflects hardware: the MMC device is not the device doing DMA.) Tested-by: Tony Lindgren <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31mmc: omap: remove private DMA API implementationRussell King1-229/+6
Remove the private DMA API implementation from omap, making it use entirely the DMA engine API. Tested-by: Tony Lindgren <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31mmc: omap: add DMA engine supportRussell King2-12/+190
Add DMA engine support to the OMAP driver. This supplements the private DMA API implementation contained within this driver, and the driver can be switched at build time between using DMA engine and the private DMA API. Tested-by: Tony Lindgren <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31mmc: omap_hsmmc: remove private DMA API implementationRussell King1-200/+63
Remove the private DMA API implementation from omap_hsmmc, making it use entirely the DMA engine API. Tested-by: Tony Lindgren <[email protected]> Tested-by: Venkatraman S <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31mmc: omap_hsmmc: add DMA engine supportRussell King1-27/+165
Add DMA engine support to the OMAP HSMMC driver. This supplements the private DMA API implementation contained within this driver, and the driver can be switched at build time between using DMA engine and the private DMA API. Tested-by: Grazvydas Ignotas <[email protected]> Tested-by: Tony Lindgren <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31dmaengine: omap: add support for cyclic DMARussell King1-4/+89
Add support for cyclic DMA to the OMAP DMA engine driver. Signed-off-by: Russell King <[email protected]>
2012-07-31dmaengine: omap: add support for setting fiRussell King1-2/+3
Signed-off-by: Russell King <[email protected]>
2012-07-31dmaengine: omap: add support for returning residue in tx_state methodRussell King1-5/+64
Add support for returning the residue for a particular descriptor by reading the current DMA address for the source or destination side of the transfer as appropriate, and walking the scatterlist until we find an entry containing the current DMA address. Signed-off-by: Russell King <[email protected]>
2012-07-31dmaengine: add OMAP DMA engine driverRussell King4-0/+553
Tested-by: Tony Lindgren <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31ARM: 7479/1: mm: avoid NULL dereference when flushing gate_vma with VIVT cachesWill Deacon1-2/+6
The vivt_flush_cache_{range,page} functions check that the mm_struct of the VMA being flushed has been active on the current CPU before performing the cache maintenance. The gate_vma has a NULL mm_struct pointer and, as such, will cause a kernel fault if we try to flush it with the above operations. This happens during ELF core dumps, which include the gate_vma as it may be useful for debugging purposes. This patch adds checks to the VIVT cache flushing functions so that VMAs with a NULL mm_struct are flushed unconditionally (the vectors page may be dirty if we use it to store the current TLS pointer). Cc: <[email protected]> # 3.4+ Reported-by: Gilles Chanteperdrix <[email protected]> Tested-by: Uros Bizjak <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31ARM: Fix undefined instruction exception handlingRussell King4-62/+92
While trying to get a v3.5 kernel booted on the cubox, I noticed that VFP does not work correctly with VFP bounce handling. This is because of the confusion over 16-bit vs 32-bit instructions, and where PC is supposed to point to. The rule is that FP handlers are entered with regs->ARM_pc pointing at the _next_ instruction to be executed. However, if the exception is not handled, regs->ARM_pc points at the faulting instruction. This is easy for ARM mode, because we know that the next instruction and previous instructions are separated by four bytes. This is not true of Thumb2 though. Since all FP instructions are 32-bit in Thumb2, it makes things easy. We just need to select the appropriate adjustment. Do this by moving the adjustment out of do_undefinstr() into the assembly code, as only the assembly code knows whether it's dealing with a 32-bit or 16-bit instruction. Cc: <[email protected]> Acked-by: Will Deacon <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31Merge branch 'upstream' of ↵Jens Axboe1-2/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/floppy into for-3.6/drivers
2012-07-31floppy: remove duplicated flag FD_RAW_NEED_DISKFengguang Wu1-2/+1
Fix coccinelle warning (without behavior change): drivers/block/floppy.c:2518:32-48: duplicated argument to & or | Signed-off-by: Fengguang Wu <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-07-31ARM: 7480/1: only call smp_send_stop() on SMPJavier Martinez Canillas1-1/+2
On reboot or poweroff (machine_shutdown()) a call to smp_send_stop() is made (to stop the others CPU's) when CONFIG_SMP=y. arch/arm/kernel/process.c: void machine_shutdown(void) { #ifdef CONFIG_SMP smp_send_stop(); #endif } smp_send_stop() calls the function pointer smp_cross_call(), which is set on the smp_init_cpus() function for OMAP processors. arch/arm/mach-omap2/omap-smp.c: void __init smp_init_cpus(void) { ... set_smp_cross_call(gic_raise_softirq); ... } But the ARM setup_arch() function only calls smp_init_cpus() if CONFIG_SMP=y && is_smp(). arm/kernel/setup.c: void __init setup_arch(char **cmdline_p) { ... #ifdef CONFIG_SMP if (is_smp()) smp_init_cpus(); #endif ... } Newer OMAP CPU's are SMP machines so omap2plus_defconfig sets CONFIG_SMP=y. Unfortunately on an OMAP UP machine is_smp() returns false and smp_init_cpus() is never called and the smp_cross_call() function remains NULL. If the machine is rebooted or powered off, smp_send_stop() will be called (since CONFIG_SMP=y) leading to the following error: [ 42.815551] Restarting system. [ 42.819030] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 42.827667] pgd = d7a74000 [ 42.830566] [00000000] *pgd=96ce7831, *pte=00000000, *ppte=00000000 [ 42.837249] Internal error: Oops: 80000007 [#1] SMP ARM [ 42.842773] Modules linked in: [ 42.846008] CPU: 0 Not tainted (3.5.0-rc3-next-20120622-00002-g62e87ba-dirty #44) [ 42.854278] PC is at 0x0 [ 42.856994] LR is at smp_send_stop+0x4c/0xe4 [ 42.861511] pc : [<00000000>] lr : [<c00183a4>] psr: 60000013 [ 42.861511] sp : d6c85e70 ip : 00000000 fp : 00000000 [ 42.873626] r10: 00000000 r9 : d6c84000 r8 : 00000002 [ 42.879150] r7 : c07235a0 r6 : c06dd2d0 r5 : 000f4241 r4 : d6c85e74 [ 42.886047] r3 : 00000000 r2 : 00000000 r1 : 00000006 r0 : d6c85e74 [ 42.892944] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 42.900482] Control: 10c5387d Table: 97a74019 DAC: 00000015 [ 42.906555] Process reboot (pid: 1166, stack limit = 0xd6c842f8) [ 42.912902] Stack: (0xd6c85e70 to 0xd6c86000) [ 42.917510] 5e60: c07235a0 00000000 00000000 d6c84000 [ 42.926177] 5e80: 01234567 c00143d0 4321fedc c00511bc d6c85ebc 00000168 00000460 00000000 [ 42.934814] 5ea0: c1017950 a0000013 c1017900 d8014390 d7ec3858 c0498e48 c1017950 00000000 [ 42.943481] 5ec0: d6ddde10 d6c85f78 00000003 00000000 d6ddde10 d6c84000 00000000 00000000 [ 42.952117] 5ee0: 00000002 00000000 00000000 c0088c88 00000002 00000000 00000000 c00f4b90 [ 42.960784] 5f00: 00000000 d6c85ebc d8014390 d7e311c8 60000013 00000103 00000002 d6c84000 [ 42.969421] 5f20: c00f3274 d6e00a00 00000001 60000013 d6c84000 00000000 00000000 c00895d4 [ 42.978057] 5f40: 00000002 d8007c80 d781f000 c00f6150 d8010cc0 c00f3274 d781f000 d6c84000 [ 42.986694] 5f60: c0013020 d6e00a00 00000001 20000010 0001257c ef000000 00000000 c00895d4 [ 42.995361] 5f80: 00000002 00000001 00000003 00000000 00000001 00000003 00000000 00000058 [ 43.003997] 5fa0: c00130c8 c0012f00 00000001 00000003 fee1dead 28121969 01234567 00000002 [ 43.012634] 5fc0: 00000001 00000003 00000000 00000058 00012584 0001257c 00000001 00000000 [ 43.021270] 5fe0: 000124bc bec5cc6c 00008f9c 4a2f7c40 20000010 fee1dead 00000000 00000000 [ 43.029968] [<c00183a4>] (smp_send_stop+0x4c/0xe4) from [<c00143d0>] (machine_restart+0xc/0x4c) [ 43.039154] [<c00143d0>] (machine_restart+0xc/0x4c) from [<c00511bc>] (sys_reboot+0x144/0x1f0) [ 43.048278] [<c00511bc>] (sys_reboot+0x144/0x1f0) from [<c0012f00>] (ret_fast_syscall+0x0/0x3c) [ 43.057464] Code: bad PC value [ 43.060760] ---[ end trace c3988d1dd0b8f0fb ]--- Add a check so smp_cross_call() is only called when there is more than one CPU on-line. Cc: <[email protected]> Signed-off-by: Javier Martinez Canillas <javier at dowhile0.org> Acked-by: Will Deacon <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31ARM: 7478/1: errata: extend workaround for erratum #720789Will Deacon1-0/+12
Commit cdf357f1 ("ARM: 6299/1: errata: TLBIASIDIS and TLBIMVAIS operations can broadcast a faulty ASID") replaced by-ASID TLB flushing operations with all-ASID variants to workaround A9 erratum #720789. This patch extends the workaround to include the tlb_range operations, which were overlooked by the original patch. Cc: <[email protected]> Tested-by: Steve Capper <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31ARM: 7477/1: vfp: Always save VFP state in vfp_pm_suspend on UPColin Cross1-0/+6
vfp_pm_suspend should save the VFP state in suspend after any lazy context switch. If it only saves when the VFP is enabled, the state can get lost when, on a UP system: Thread 1 uses the VFP Context switch occurs to thread 2, VFP is disabled but the VFP context is not saved Thread 2 initiates suspend vfp_pm_suspend is called with the VFP disabled, and the unsaved VFP context of Thread 1 in the registers Modify vfp_pm_suspend to save the VFP context whenever vfp_current_hw_state is not NULL. Includes a fix from Ido Yariv <[email protected]>, who pointed out that on SMP systems, the state pointer can be pointing to a freed task struct if a task exited on another cpu, fixed by using #ifndef CONFIG_SMP in the new if clause. Cc: Barry Song <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Ido Yariv <[email protected]> Cc: Daniel Drake <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Signed-off-by: Colin Cross <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31ARM: 7476/1: vfp: only clear vfp state for current cpu in vfp_pm_suspendColin Cross1-1/+1
vfp_pm_suspend runs on each cpu, only clear the hardware state pointer for the current cpu. Prevents a possible crash if one cpu clears the hw state pointer when another cpu has already checked if it is valid. Cc: [email protected] Signed-off-by: Colin Cross <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31ARM: 7468/1: ftrace: Trace function entry before updating indexColin Cross1-8/+9
Commit 722b3c74695377d11d18a52f3da08114d37f3f37 modified x86 ftrace to avoid tracing all functions called from irqs when function graph was used with a filter. Port the same fix to ARM. Acked-by: Steven Rostedt <[email protected]> Signed-off-by: Colin Cross <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31ARM: 7467/1: mutex: use generic xchg-based implementation for ARMv6+Will Deacon1-115/+4
The open-coded mutex implementation for ARMv6+ cores suffers from a severe lack of barriers, so in the uncontended case we don't actually protect any accesses performed during the critical section. Furthermore, the code is largely a duplication of the ARMv6+ atomic_dec code but optimised to remove a branch instruction, as the mutex fastpath was previously inlined. Now that this is executed out-of-line, we can reuse the atomic access code for the locking (in fact, we use the xchg code as this produces shorter critical sections). This patch uses the generic xchg based implementation for mutexes on ARMv6+, which introduces barriers to the lock/unlock operations and also has the benefit of removing a fair amount of inline assembly code. Cc: <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Reported-by: Shan Kang <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31ARM: 7466/1: disable interrupt before spinning endlesslyShawn Guo1-0/+2
The CPU will endlessly spin at the end of machine_halt and machine_restart calls. However, this will lead to a soft lockup warning after about 20 seconds, if CONFIG_LOCKUP_DETECTOR is enabled, as system timer is still alive. Disable interrupt before going to spin endlessly, so that the lockup warning will never be seen. Cc: <[email protected]> Reported-by: Marek Vasut <[email protected]> Signed-off-by: Shawn Guo <[email protected]> Signed-off-by: Russell King <[email protected]>
2012-07-31ALSA: hda - Fix mute-LED GPIO initialization for IDT codecsTakashi Iwai1-1/+6
The IDT codecs initializes the GPIO setup for mute LEDs via snd_hda_sync_vmaster_hook(). This works in most cases except for the very first call, which is called before PCM and control creations. Thus before Master switch is set manually via alsactl, the mute LED may show the wrong state, depending on the polarity. Now it's fixed by calling the LED-status update function manually when no vmaster is set yet. Cc: <[email protected]> [v3.4+] Signed-off-by: Takashi Iwai <[email protected]>
2012-07-31ALSA: hda - Add descriptions for missing IDT 92HD83x modelsTakashi Iwai1-0/+4
Signed-off-by: Takashi Iwai <[email protected]>
2012-07-31ALSA: hda - Fix polarity of mute LED on HP Mini 210Takashi Iwai1-0/+5
The commit a3e199732b made the LED working again on HP Mini 210 but with a wrong polarity. This patch fixes the polarity for this machine, and also introduce a new model string "hp-inv-led". Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=772923 Cc: <[email protected]> [v3.3+] Signed-off-by: Takashi Iwai <[email protected]>
2012-07-31blk: pass from_schedule to non-request unplug functions.NeilBrown5-7/+7
This will allow md/raid to know why the unplug was called, and will be able to act according - if !from_schedule it is safe to perform tasks which could themselves schedule. Signed-off-by: NeilBrown <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2012-07-31block: stack unplugShaohua Li1-8/+7
MD raid1 prepares to dispatch request in unplug callback. If make_request in low level queue also uses unplug callback to dispatch request, the low level queue's unplug callback will not be called. Recheck the callback list helps this case. Signed-off-by: Shaohua Li <[email protected]> Signed-off-by: NeilBrown <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2012-07-31blk: centralize non-request unplug handling.NeilBrown5-83/+49
Both md and umem has similar code for getting notified on an blk_finish_plug event. Centralize this code in block/ and allow each driver to provide its distinctive difference. Signed-off-by: NeilBrown <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2012-07-31md: remove plug_cnt feature of plugging.NeilBrown5-14/+5
This seemed like a good idea at the time, but after further thought I cannot see it making a difference other than very occasionally and testing to try to exercise the case it is most likely to help did not show any performance difference by removing it. So remove the counting of active plugs and allow 'pending writes' to be activated at any time, not just when no plugs are active. This is only relevant when there is a write-intent bitmap, and the updating of the bitmap will likely introduce enough delay that the single-threading of bitmap updates will be enough to collect large numbers of updates together. Removing this will make it easier to centralise the unplug code, and will clear the other for other unplug enhancements which have a measurable effect. Signed-off-by: NeilBrown <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2012-07-31block/nbd: micro-optimization in nbd request completionChetan Loke1-1/+1
Add in-flight cmds to the tail. That way while searching (during request completion),we will always get a hit on the first element. Signed-off-by: Chetan Loke <[email protected]> Acked-by: [email protected] Signed-off-by: Jens Axboe <[email protected]>
2012-07-31Documentation: Correct s_umount state for freeze_fs/unfreeze_fsValerie Aurora1-2/+2
freeze_fs/unfreeze_fs ops are called with s_umount held for write, not read. Signed-off-by: Valerie Aurora <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-07-31fs: Remove old freezing mechanismJan Kara2-6/+0
Now that all users are converted, we can remove functions, variables, and constants defined by the old freezing mechanism. BugLink: https://bugs.launchpad.net/bugs/897421 Tested-by: Kamal Mostafa <[email protected]> Tested-by: Peter M. Petrakis <[email protected]> Tested-by: Dann Frazier <[email protected]> Tested-by: Massimo Morana <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-07-31ext2: Implement freezingJan Kara2-1/+37
The only missing piece to make freezing work reliably with ext2 is to stop iput() of unlinked inode from deleting the inode on frozen filesystem. So add a necessary protection to ext2_evict_inode(). We also provide appropriate ->freeze_fs and ->unfreeze_fs functions. Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-07-31btrfs: Convert to new freezing mechanismJan Kara4-5/+14
We convert btrfs_file_aio_write() to use new freeze check. We also add proper freeze protection to btrfs_page_mkwrite(). We also add freeze protection to the transaction mechanism to avoid starting transactions on frozen filesystem. At minimum this is necessary to stop iput() of unlinked file to change frozen filesystem during truncation. Checks in cleaner_kthread() and transaction_kthread() can be safely removed since btrfs_freeze() will lock the mutexes and thus block the threads (and they shouldn't have anything to do anyway). CC: [email protected] CC: Chris Mason <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-07-31nilfs2: Convert to new freezing mechanismJan Kara3-10/+15
We change nilfs_page_mkwrite() to provide proper freeze protection for writeable page faults (we must wait for frozen filesystem even if the page is fully mapped). We remove all vfs_check_frozen() checks since they are now handled by the generic code. CC: [email protected] CC: KONISHI Ryusuke <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-07-31ntfs: Convert to new freezing mechanismJan Kara1-1/+2
Move check in ntfs_file_aio_write_nolock() to ntfs_file_aio_write() and use new freeze protection. CC: [email protected] CC: Anton Altaparmakov <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-07-31fuse: Convert to new freezing mechanismJan Kara1-2/+2
Convert check in fuse_file_aio_write() to using new freeze protection. CC: [email protected] CC: Miklos Szeredi <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-07-31gfs2: Convert to new freezing mechanismJan Kara2-12/+7
We update gfs2_page_mkwrite() to use new freeze protection and the transaction code to use freeze protection while the transaction is running. That is needed to stop iput() of unlinked file from modifying the filesystem. The rest is handled by the generic code. CC: [email protected] CC: Steven Whitehouse <[email protected]> Acked-by: Steven Whitehouse <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-07-31ocfs2: Convert to new freezing mechanismJan Kara4-5/+29
Protect ocfs2_page_mkwrite() and ocfs2_file_aio_write() using the new freeze protection. We also protect several ioctl entry points which were missing the protection. Finally, we add freeze protection to the journaling mechanism so that iput() of unlinked inode cannot modify a frozen filesystem. CC: Mark Fasheh <[email protected]> CC: Joel Becker <[email protected]> CC: [email protected] Acked-by: Joel Becker <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-07-31xfs: Convert to new freezing codeJan Kara10-16/+109
Generic code now blocks all writers from standard write paths. So we add blocking of all writers coming from ioctl (we get a protection of ioctl against racing remount read-only as a bonus) and convert xfs_file_aio_write() to a non-racy freeze protection. We also keep freeze protection on transaction start to block internal filesystem writes such as removal of preallocated blocks. CC: Ben Myers <[email protected]> CC: Alex Elder <[email protected]> CC: [email protected] Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-07-31ext4: Convert to new freezing mechanismJan Kara3-29/+23
We remove most of frozen checks since upper layer takes care of blocking all writes. We have to handle protection in ext4_page_mkwrite() in a special way because we cannot use generic block_page_mkwrite(). Also we add a freeze protection to ext4_evict_inode() so that iput() of unlinked inode cannot modify a frozen filesystem (we cannot easily instrument ext4_journal_start() / ext4_journal_stop() with freeze protection because we are missing the superblock pointer in ext4_journal_stop() in nojournal mode). CC: [email protected] CC: "Theodore Ts'o" <[email protected]> BugLink: https://bugs.launchpad.net/bugs/897421 Tested-by: Kamal Mostafa <[email protected]> Tested-by: Peter M. Petrakis <[email protected]> Tested-by: Dann Frazier <[email protected]> Tested-by: Massimo Morana <[email protected]> Acked-by: "Theodore Ts'o" <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-07-31fs: Protect write paths by sb_start_write - sb_end_writeJan Kara5-23/+26
There are several entry points which dirty pages in a filesystem. mmap (handled by block_page_mkwrite()), buffered write (handled by __generic_file_aio_write()), splice write (generic_file_splice_write), truncate, and fallocate (these can dirty last partial page - handled inside each filesystem separately). Protect these places with sb_start_write() and sb_end_write(). ->page_mkwrite() calls are particularly complex since they are called with mmap_sem held and thus we cannot use standard sb_start_write() due to lock ordering constraints. We solve the problem by using a special freeze protection sb_start_pagefault() which ranks below mmap_sem. BugLink: https://bugs.launchpad.net/bugs/897421 Tested-by: Kamal Mostafa <[email protected]> Tested-by: Peter M. Petrakis <[email protected]> Tested-by: Dann Frazier <[email protected]> Tested-by: Massimo Morana <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-07-31fs: Skip atime update on frozen filesystemJan Kara1-2/+6
It is unexpected to block reading of frozen filesystem because of atime update. Also handling blocking on frozen filesystem because of atime update would make locking more complex than it already is. So just skip atime update when filesystem is frozen like we skip it when filesystem is remounted read-only. BugLink: https://bugs.launchpad.net/bugs/897421 Tested-by: Kamal Mostafa <[email protected]> Tested-by: Peter M. Petrakis <[email protected]> Tested-by: Dann Frazier <[email protected]> Tested-by: Massimo Morana <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-07-31fs: Add freezing handling to mnt_want_write() / mnt_drop_write()Jan Kara5-24/+85
Most of places where we want freeze protection coincides with the places where we also have remount-ro protection. So make mnt_want_write() and mnt_drop_write() (and their _file alternative) prevent freezing as well. For the few cases that are really interested only in remount-ro protection provide new function variants. BugLink: https://bugs.launchpad.net/bugs/897421 Tested-by: Kamal Mostafa <[email protected]> Tested-by: Peter M. Petrakis <[email protected]> Tested-by: Dann Frazier <[email protected]> Tested-by: Massimo Morana <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-07-31fs: Improve filesystem freezing handlingJan Kara2-28/+373
vfs_check_frozen() tests are racy since the filesystem can be frozen just after the test is performed. Thus in write paths we can end up marking some pages or inodes dirty even though the file system is already frozen. This creates problems with flusher thread hanging on frozen filesystem. Another problem is that exclusion between ->page_mkwrite() and filesystem freezing has been handled by setting page dirty and then verifying s_frozen. This guaranteed that either the freezing code sees the faulted page, writes it, and writeprotects it again or we see s_frozen set and bail out of page fault. This works to protect from page being marked writeable while filesystem freezing is running but has an unpleasant artefact of leaving dirty (although unmodified and writeprotected) pages on frozen filesystem resulting in similar problems with flusher thread as the first problem. This patch aims at providing exclusion between write paths and filesystem freezing. We implement a writer-freeze read-write semaphore in the superblock. Actually, there are three such semaphores because of lock ranking reasons - one for page fault handlers (->page_mkwrite), one for all other writers, and one of internal filesystem purposes (used e.g. to track running transactions). Write paths which should block freezing (e.g. directory operations, ->aio_write(), ->page_mkwrite) hold reader side of the semaphore. Code freezing the filesystem takes the writer side. Only that we don't really want to bounce cachelines of the semaphores between CPUs for each write happening. So we implement the reader side of the semaphore as a per-cpu counter and the writer side is implemented using s_writers.frozen superblock field. [AV: microoptimize sb_start_write(); we want it fast in normal case] BugLink: https://bugs.launchpad.net/bugs/897421 Tested-by: Kamal Mostafa <[email protected]> Tested-by: Peter M. Petrakis <[email protected]> Tested-by: Dann Frazier <[email protected]> Tested-by: Massimo Morana <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
2012-07-31switch the protection of percpu_counter list to spinlockAl Viro1-7/+7
... making percpu_counter_destroy() non-blocking Signed-off-by: Al Viro <[email protected]>
2012-07-31powerpc/kvm/book3s_32: Fix MTMSR_EERI macroAlexander Graf1-1/+0
Commit b38c77d82e4 moved the MTMSR_EERI macro from the KVM code to generic ppc_asm.h code. However, while adding it in the headers for the ppc32 case, it missed out to remove the former definition in the KVM code. This patch fixes compilation on server type PPC32 targets with CONFIG_KVM enabled. Signed-off-by: Alexander Graf <[email protected]> Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2012-07-31Merge remote-tracking branch 'kumar/merge' into mergeBenjamin Herrenschmidt6-54/+121
Kumar says: "A few patches that missed the initial 3.6 window. These are bug fixes at this point."
2012-07-30Merge tag 'writeback-proportions' of ↵Linus Torvalds8-50/+448
git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux Pull writeback updates from Wu Fengguang: "Use time based periods to age the writeback proportions, which can adapt equally well to fast/slow devices." Fix up trivial conflict in comment in fs/sync.c * tag 'writeback-proportions' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux: writeback: Fix some comment errors block: Convert BDI proportion calculations to flexible proportions lib: Fix possible deadlock in flexible proportion code lib: Proportions with flexible period
2012-07-30[media] tlg2300: Declare MODULE_FIRMWARE usageTim Gardner1-1/+3
Cc: Huang Shijie <[email protected]> Cc: Kang Yong <[email protected]> Cc: Zhang Xiaobing <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: [email protected] Signed-off-by: Tim Gardner <[email protected]> Acked-by: Huang Shijie <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-07-30[media] lgs8gxx: Declare MODULE_FIRMWARE usageTim Gardner1-1/+4
Cc: Mauro Carvalho Chehab <[email protected]> Cc: Hans Verkuil <[email protected]> Cc: [email protected] Signed-off-by: Tim Gardner <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2012-07-30[media] xc5000: Add MODULE_FIRMWARE statementsTim Gardner1-2/+6
This will make modinfo more useful with regard to discovering necessary firmware files. Cc: Mauro Carvalho Chehab <[email protected]> Cc: Michael Krufky <[email protected]> Cc: Eddi De Pieri <[email protected]> Cc: [email protected] Signed-off-by: Tim Gardner <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>