aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-07-21mmc: tmio: fix a deadlockGuennadi Liakhovetski3-3/+11
Currently the tmio-mmc driver contains a recursive runtime PM method invocation, which leads to a deadlock on a mutex. Avoid it by taking care not to request DMA too early. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-07-21mmc: tmio: fix a recently introduced bug in DMA codeGuennadi Liakhovetski1-1/+1
A recent commit "mmc: tmio: Share register access functions" has swapped arguments of a macro and broken DMA with TMIO MMC. This patch fixes the arguments back. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-07-21mmc: sh_mmcif: maximize power savingGuennadi Liakhovetski1-9/+18
This patch uses runtime PM to allow the system to power down the MMC controller, when the MMC closk is switched off. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-07-21mmc: tmio: maximize power savingGuennadi Liakhovetski2-27/+39
This patch uses runtime PM to allow the system to power down the MMC controller, when the MMC closk is switched off. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-07-21mmc: tmio: fix recursive spinlock, don't schedule with interrupts disabledGuennadi Liakhovetski2-7/+34
Calling mmc_request_done() under a spinlock with interrupts disabled leads to a recursive spin-lock on request retry path and to scheduling in atomic context. This patch fixes both these problems by moving mmc_request_done() to the scheduler workqueue. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-07-21mmc: Added quirks for Ricoh 1180:e823 lower base clock frequencyManoj Iyer1-0/+23
Ricoh 1180:e823 does not recognize certain types of SD/MMC cards, as reported at http://launchpad.net/bugs/773524. Lowering the SD base clock frequency from 200Mhz to 50Mhz fixes this issue. This solution was suggest by Koji Matsumuro, Ricoh Company, Ltd. This change has no negative performance effect on standard SD cards, though it's quite possible that there will be one on UHS-1 cards. Signed-off-by: Manoj Iyer <[email protected]> Tested-by: Daniel Manrique <[email protected]> Cc: Koji Matsumuro <[email protected]> Cc: <[email protected]> Acked-by: Jesse Barnes <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-07-21mmc: omap_hsmmc: fix oops in omap_hsmmc_dma_cb()Adrian Hunter1-1/+2
In the case of an I/O error, the DMA will have been cleaned up in the MMC interrupt and the request structure pointer will be null. In that case, it is essential to check if the DMA is over before dereferencing host->mrq->data. Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-07-21mmc: omap_hsmmc: refactor duplicated codeAndy Shevchenko1-44/+41
There are a few places with the same functionality. This patch creates two functions omap_hsmmc_set_bus_width() and omap_hsmmc_set_bus_mode() to do the job. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-07-21mmc: omap_hsmmc: fix a few bugs when setting the clock divisorAndy Shevchenko1-31/+28
There are two pieces of code which are similar, but not the same. Each of them contains a bug. The SYSCTL register should be read before writing to it in omap_hsmmc_context_restore() to retain the state of the reserved bits. Before setting the clock divisor and DTO bits the value from the SYSCTL register should be masked properly. We were lucky to have no problems with DTO bits. So, make sure we have clear DTO bits properly in omap_hsmmc_set_ios(). Additionally get rid of msleep(1). The actual time is rarely higher than 30us on OMAP 3630. The resulting pieces of code are refactored into the omap_hsmmc_set_clock() function. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-07-21mmc: omap_hsmmc: introduce start_clock and re-use stop_clockAndy Shevchenko1-6/+13
There is similar code in two functions which enable the clock. Refactor this code to omap_hsmmc_start_clock(). Re-use omap_hsmmc_stop_clock() in omap_hsmmc_context_restore() as well. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-07-21mmc: omap_hsmmc: split duplicate code to calc_divisor() functionAndy Shevchenko1-27/+19
There are two places where the same calculations are done. Let's split them into a separate function. In addition, simplify by using the DIV_ROUND_UP kernel macro. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-07-21mmc: omap_hsmmc: move hardcoded frequency constants to definesAndy Shevchenko1-2/+4
Move the min and max frequency constants to the definition block in the source file. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-07-21mmc: omap_hsmmc: correct debug report error status mnemonicsAdrian Hunter1-8/+11
CERR and BADA were in the wrong place and there are only 32 not 35. Signed-off-by: Adrian Hunter <[email protected]> Reviewed-by: Venkatraman S <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-07-21mmc: block: fixed NULL pointer dereferenceJaehoon Chung1-0/+3
We already check for ongoing async transfers when handling discard requests, but not in mmc_blk_issue_flush(). This patch fixes that omission. Tested with an SDHCI controller and eMMC4.41. Signed-off-by: Jaehoon Chung <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Acked-by: Per Forlin <[email protected]> Cc: <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-07-21mmc: documentation of mmc non-blocking request usage and design.Per Forlin2-0/+89
Documentation about the background and the design of mmc non-blocking. Host driver guidelines to minimize request preparation overhead. Signed-off-by: Per Forlin <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Chris Ball <[email protected]>
2011-07-21HID: hid-multitouch: add one new multitouch device's VID/PIDice chien4-0/+9
This patch adds support for the CSR panel built by XAT. Signed-off-by: Ice Chien <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2011-07-21HID: prodikeys: remove a redundant forward declaration of struct pcmidi_sndAxel Lin1-2/+0
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2011-07-21HID: prodikeys: make needlessly global symbols staticAxel Lin1-7/+8
The following symbols are not referenced outside this file so there's no need for it to be in the global name space. pcmidi_sustained_note_release init_sustain_timers stop_sustain_timers pcmidi_handle_report pcmidi_setup_extra_keys pcmidi_snd_initialise pcmidi_snd_terminate Make them static. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2011-07-21netfilter: ipset: fix compiler warnings "'hash_ip4_data_next' declared ↵Chris Friesen1-1/+1
inline after being called" Some gcc versions warn about prototypes without "inline" when the declaration includes the "inline" keyword. The fix generates a false error message "marked inline, but without a definition" with sparse below 0.4.2. Signed-off-by: Chris Friesen <[email protected]> Signed-off-by: Jozsef Kadlecsik <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
2011-07-21netfilter: ipset: hash:net,iface fixed to handle overlapping nets behind ↵Jozsef Kadlecsik8-51/+117
different interfaces If overlapping networks with different interfaces was added to the set, the type did not handle it properly. Example ipset create test hash:net,iface ipset add test 192.168.0.0/16,eth0 ipset add test 192.168.0.0/24,eth1 Now, if a packet was sent from 192.168.0.0/24,eth0, the type returned a match. In the patch the algorithm is fixed in order to correctly handle overlapping networks. Limitation: the same network cannot be stored with more than 64 different interfaces in a single set. Signed-off-by: Jozsef Kadlecsik <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
2011-07-21netfilter: ipset: make possible to hash some part of the data element onlyJozsef Kadlecsik1-4/+10
Signed-off-by: Jozsef Kadlecsik <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
2011-07-21perf tools: Make test use the preset debugfs pathJiri Olsa1-2/+2
Use preset debugfs path instead of hardcoded one. Signed-off-by: Jiri Olsa <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-07-21perf tools: Add automated tests for events parsingJiri Olsa1-0/+245
Adding builtin test for parse_events function, which is responsible for parsing/processing "-e" option for stat/top/record commands. This new test will run within the builtin test command suite (perf test). One or several tests were added for each type of event. More tests could be added easily if needed. Signed-off-by: Jiri Olsa <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-07-21perf tools: De-opt the parse_events functionJiri Olsa5-14/+24
Moving out the option parameter from parse_events function, and adding new parse_events_option function instead. The option parameter is used only to carry "struct perf_evlist" pointer for chaining new events. Putting it away, enable us to call parse_events from other places without using the option parameter. Signed-off-by: Jiri Olsa <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-07-21perf script: Fix display of IP address for non-callchain pathDavid Ahern1-1/+1
Non-callchain path is using al.addr which prints as: openssl 14564 17672.003587: 7862d _x86_64_AES_encrypt_compact This should be sample->ip to print as: openssl 14564 17672.003587: 3f7867862d _x86_64_AES_encrypt_compact Signed-off-by: David Ahern <[email protected]> Acked-by: Frederic Weisbecker <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-07-21x86, smpboot: Mark the names[] array in __inquire_remote_apic() as constGreg Dietsche1-1/+1
This array is read-only. Make it explicit by marking as const. Signed-off-by: Greg Dietsche <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-07-21perf tools: Fix endian conversion reading event attr from file headerDavid Ahern3-13/+23
The perf_event_attr struct has two __u32's at the top and they need to be swapped individually. With this change I was able to analyze a perf.data collected in a 32-bit PPC VM on an x86 system. I tested both 32-bit and 64-bit binaries for the Intel analysis side; both read the PPC perf.data file correctly. -v2: - changed the existing perf_event__attr_swap() to swap only elements of perf_event_attr and exported it for use in swapping the attributes in the file header - updated swap_ops used for processing events Signed-off-by: David Ahern <[email protected]> Acked-by: Frederic Weisbecker <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-07-21perf tools: Add missing 'node' alias to the hw_cache[] arrayJiri Olsa1-5/+8
Add "node" as a simple alias for NODE cache events. The addition of NODE cache events broke the parse_alias function, so any mismatched event caused the segfault, like: # ./perf stat -e krava ls The hw_cache/hw_cache_op/hw_cache_result arrays needs to follow PERF_COUNT_HW_CACHE_*MAX enums. Adding those MAXs to be size of those arrays, so possible ommision in future wil not lead to segfault. Adding read/write/prefetch as allowed operations for node cache event. Signed-off-by: Jiri Olsa <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-07-21vhost: handle wrap around in # of bufs mathShirley Ma1-3/+9
The meth for calculating the # of outstanding buffers gives incorrect results when vq->upend_idx wraps around zero. Fix that. Signed-off-by: Shirley Ma <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
2011-07-21mutex: Make mutex_destroy() an inline functionJean Delvare1-1/+1
The non-debug variant of mutex_destroy is a no-op, currently implemented as a macro which does nothing. This approach fails to check the type of the parameter, so an error would only show when debugging gets enabled. Using an inline function instead, offers type checking for earlier bug catching. Signed-off-by: Jean Delvare <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-07-21Merge branch 'tip/perf/core' of ↵Ingo Molnar26-1003/+1663
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/core
2011-07-21Merge branch 'perf/urgent' into perf/coreIngo Molnar7-38/+148
Merge reason: pick up the latest fixes - they won't make v3.0. Signed-off-by: Ingo Molnar <[email protected]>
2011-07-21vhost-net: update used ring on backend changeMichael S. Tsirkin1-1/+5
On backend change, we flushed out outstanding skbs but forgot to update the used ring, so that done entries were left in the ubuf_info ring. As a result we lose heads or complete incorrect ones, crashing the guest or leaking memory. Fix by updating the used ring. Signed-off-by: Michael S. Tsirkin <[email protected]>
2011-07-21x86: Serialize EFI time accesses on rtc_lockJan Beulich1-6/+33
The EFI specification requires that callers of the time related runtime functions serialize with other CMOS accesses in the kernel, as the EFI time functions may choose to also use the legacy CMOS RTC. Besides fixing a latent bug, this is a prerequisite to safely enable the rtc-efi driver for x86, which ought to be preferred over rtc-cmos on all EFI platforms. Signed-off-by: Jan Beulich <[email protected]> Acked-by: Matthew Garrett <[email protected]> Cc: <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]> Cc: Matthew Garrett <[email protected]>
2011-07-21x86: Serialize SMP bootup CMOS accesses on rtc_lockJan Beulich1-0/+8
With CPU hotplug, there is a theoretical race between other CMOS (namely RTC) accesses and those done in the SMP secondary processor bringup path. I am unware of the problem having been noticed by anyone in practice, but it would very likely be rather spurious and very hard to reproduce. So to be on the safe side, acquire rtc_lock around those accesses. Signed-off-by: Jan Beulich <[email protected]> Cc: John Stultz <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-07-21x86: Fix write lock scalability 64-bit issueJan Beulich6-28/+73
With the write lock path simply subtracting RW_LOCK_BIAS there is, on large systems, the theoretical possibility of overflowing the 32-bit value that was used so far (namely if 128 or more CPUs manage to do the subtraction, but don't get to do the inverse addition in the failure path quickly enough). A first measure is to modify RW_LOCK_BIAS itself - with the new value chosen, it is good for up to 2048 CPUs each allowed to nest over 2048 times on the read path without causing an issue. Quite possibly it would even be sufficient to adjust the bias a little further, assuming that allowing for significantly less nesting would suffice. However, as the original value chosen allowed for even more nesting levels, to support more than 2048 CPUs (possible currently only for 64-bit kernels) the lock itself gets widened to 64 bits. Signed-off-by: Jan Beulich <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-07-21x86: Unify rwsem assembly implementationJan Beulich5-100/+62
Rather than having two functionally identical implementations for 32- and 64-bit configurations, use the previously extended assembly abstractions to fold the rwsem two implementations into a shared one. Signed-off-by: Jan Beulich <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-07-21x86: Unify rwlock assembly implementationJan Beulich6-90/+56
Rather than having two functionally identical implementations for 32- and 64-bit configurations, extend the existing assembly abstractions enough to fold the two rwlock implementations into a shared one. Signed-off-by: Jan Beulich <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2011-07-20fs:update the NOTE of the file_operations structureWanlong Gao1-5/+0
Big kernel lock had been removed and setlease now use the lock_flocks() to hold a special spin lock file_lock_lock by Matthew. So just remove the out-of-date NOTE. Signed-off-by: Wanlong Gao <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-07-21CIFS: Fix wrong length in cifs_iovec_readPavel Shilovsky1-1/+1
Signed-off-by: Pavel Shilovsky <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Steve French <[email protected]>
2011-07-20Remove dead code in dget_parent()Al Viro1-5/+0
->d_parent is never NULL... Signed-off-by: Al Viro <[email protected]>
2011-07-20AFS: Fix silly characters in a commentDavid Howells1-1/+1
Fix silly characters in a comment in AFS code (some weird characters replaced the word 'flag' some point way back). Reported-by: [email protected] Signed-off-by: David Howells <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-07-20switch d_add_ci() to d_splice_alias() in "found negative" case as wellAl Viro1-19/+5
Signed-off-by: Al Viro <[email protected]>
2011-07-20simplify gfs2_lookup()Al Viro1-11/+3
d_splice_alias() will DTRT when given NULL or ERR_PTR Signed-off-by: Al Viro <[email protected]>
2011-07-20jfs_lookup(): don't bother with . or ..Al Viro1-24/+15
they'll never be passed to ->lookup() Signed-off-by: Al Viro <[email protected]>
2011-07-20get rid of useless dget_parent() in btrfs rename() and link()Al Viro1-4/+2
->d_parent is locked and stable there... Signed-off-by: Al Viro <[email protected]>
2011-07-20get rid of useless dget_parent() in fs/btrfs/ioctl.cAl Viro1-12/+4
both callers there have dentry->d_parent stabilized by the fact that their caller had obtained dentry from lookup_one_len() and had not dropped ->i_mutex on parent since then. Signed-off-by: Al Viro <[email protected]>
2011-07-20fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlersJosef Bacik71-164/+462
Btrfs needs to be able to control how filemap_write_and_wait_range() is called in fsync to make it less of a painful operation, so push down taking i_mutex and the calling of filemap_write_and_wait() down into the ->fsync() handlers. Some file systems can drop taking the i_mutex altogether it seems, like ext3 and ocfs2. For correctness sake I just pushed everything down in all cases to make sure that we keep the current behavior the same for everybody, and then each individual fs maintainer can make up their mind about what to do from there. Thanks, Acked-by: Jan Kara <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-07-20drivers: fix up various ->llseek() implementationsJosef Bacik4-0/+14
Fix up a few ->llseek() implementations that won't deal with SEEK_HOLE/SEEK_DATA properly. Make them future proof so that if we ever add new options they will return -EINVAL. Thanks, Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: Al Viro <[email protected]>
2011-07-20fs: handle SEEK_HOLE/SEEK_DATA properly in all fs's that define their own llseekJosef Bacik7-12/+66
This converts everybody to handle SEEK_HOLE/SEEK_DATA properly. In some cases we just return -EINVAL, in others we do the normal generic thing, and in others we're simply making sure that the properly due-dilligence is done. For example in NFS/CIFS we need to make sure the file size is update properly for the SEEK_HOLE and SEEK_DATA case, but since it calls the generic llseek stuff itself that is all we have to do. Thanks, Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: Al Viro <[email protected]>