Tomi Valkeinen [Mon, 7 Nov 2011 13:50:09 +0000 (15:50 +0200)]
OMAPDSS: DISPC: Add dispc_mgr_get_vsync_irq()
Add dispc_mgr_get_vsync_irq() which returns the irq number for vsync on
the given channel.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Tue, 15 Nov 2011 09:18:12 +0000 (11:18 +0200)]
OMAPDSS: APPLY: separate vsync isr register/unregister
Create separate functions for the vsync isr register/unregister code for
cleaner code.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Sat, 5 Nov 2011 08:59:59 +0000 (10:59 +0200)]
OMAPDSS: store overlays in a list for each manager
Current way of handling overlay-manager links is a bit strange: each
manager has a static array, containing pointers to all the overlays
(even those used by other managers). The overlays contain a pointer to
the manager being used.
This patch makes the system a bit saner: each manager has a linked list
of overlays, and only the overlays linked to that manager are in the
list.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Sat, 5 Nov 2011 08:44:48 +0000 (10:44 +0200)]
OMAPDSS: store managers in an array
Overlay managers are stored in a linked list. There's no need for this
list, as an array would do just as fine.
This patch changes the code to use an array for overlay managers.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Sat, 5 Nov 2011 08:39:59 +0000 (10:39 +0200)]
OMAPDSS: store overlays in an array
Overlays are stored in a linked list. There's no need for this list, as
an array would do just as fine.
This patch changes the code to use an array for overlays.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Tue, 1 Nov 2011 11:58:50 +0000 (13:58 +0200)]
OMAPDSS: APPLY: cleanup dss_mgr_start_update
dss_mgr_start_update() has a loop, of which sole purpose is to find the
manager used for this update. The whole loop is extra, as we already
know the manager.
Remove the loop.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Mon, 7 Nov 2011 13:04:01 +0000 (15:04 +0200)]
OMAPDSS: APPLY: skip isr register and config for disabled displays
There's no need to register the vsync ISR and configure the hardware if
the overlay manager is disabled, so this patch adds a check for disabled
managers to the omap_dss_mgr_apply() function.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 4 Nov 2011 07:35:59 +0000 (09:35 +0200)]
OMAPDSS: APPLY: skip isr register and config for manual update displays
The mechanism to cache manager and overlay settings and configure them
into the HW registers in VSYNC is meant only for auto-update displays,
as it doesn't make sense (and doesn't work) for manual-update displays.
This patchs adds a check so that we skip the above for manual update
displays.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 4 Nov 2011 08:30:47 +0000 (10:30 +0200)]
OMAPDSS: APPLY: track whether a manager is enabled
Add "enabled" field to struct omap_overlay_manager, which tells if the
output is enabled or not. This will be used in apply.c in the following
patches.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 4 Nov 2011 08:22:46 +0000 (10:22 +0200)]
OMAPDSS: hide manager's enable/disable()
omap_overlay_manager struct contains enable() and disable() functions.
However, these are only meant to be used from inside omapdss, and thus
it's bad to expose the functions.
This patch adds dss_mgr_enable() and dss_mgr_disable() functions to
apply.c, which handle enabling and disabling the output.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 4 Nov 2011 07:48:54 +0000 (09:48 +0200)]
OMAPDSS: create apply.c
Create a new file, apply.c, and move code about handling the
apply-mechanism and configuration of the managers and overlays from
manager.c to apply.c.
Not all related code is moved in this patch, but only the core
apply/configure functions. The later patches move rest of the code from
overlay.c and manager.c, adding necessary locking at the same time.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 4 Nov 2011 07:23:10 +0000 (09:23 +0200)]
OMAPDSS: apply affects only one overlay manager
omap_dss_mgr_apply currently applies settings to all overlays and
overlay managers. The reason for this was to support cases where
configuration changes affecting multiple managers are made. However, the
current code doesn't support changing such configurations, so the
functionality is not needed.
Change the apply to affect only the manager given as an argument, and
the overlays attached to that manager.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 4 Nov 2011 07:19:35 +0000 (09:19 +0200)]
OMAPDSS: split omap_dss_mgr_apply() to smaller funcs
Split omap_dss_mgr_apply() into smaller functions for clarity.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 4 Nov 2011 07:04:15 +0000 (09:04 +0200)]
OMAPDSS: add ovl/mgr_manual_update() helpers
Add helper functions ovl_manual_update() and mgr_manual_update() which
return whether the overlay or manager is used with a manual update
display.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 4 Nov 2011 11:00:10 +0000 (13:00 +0200)]
OMAPDSS: remove unneeded dss_ovl_wait_for_go()
There's an unnecessary wrapper function, dss_ovl_wait_for_go(), which
does nothing else than call dss_mgr_wait_for_go_ovl(). The
dss_ovl_wait_for_go() function can be removed.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 4 Nov 2011 16:14:11 +0000 (18:14 +0200)]
OMAPDSS: DISPC: remove unused functions
Remove unused functions:
dispc_mgr_get_default_color
dispc_mgr_get_trans_key
dispc_mgr_trans_key_enabled
dispc_mgr_alpha_fixed_zorder_enabled
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 4 Nov 2011 16:14:20 +0000 (18:14 +0200)]
OMAPDSS: setup manager with dispc_mgr_setup()
Change manager configuration to be similar to overlay configuration by
creating dispc_mgr_setup() which takes omap_overlay_manager_info as
parameter.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 3 Nov 2011 15:03:44 +0000 (17:03 +0200)]
OMAPDSS: separate overlay channel from ovl_setup
Overlay channel is configured with ovl_setup, with all the other overlay
attriutes. This patch separates overlay channel setup so that we can
later configure the channel only when needed.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 3 Nov 2011 15:00:07 +0000 (17:00 +0200)]
OMAPDSS: separate FIFO threshold setup from ovl_setup
Overlay FIFO thresholds are configured with ovl_setup, with all the
other overlay attributes. This patch separates FIFO threshold setup so
that we can later configure FIFO thresholds only when needed.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 3 Nov 2011 14:52:06 +0000 (16:52 +0200)]
OMAPDSS: handle ilace/replication when configuring overlay
Move the configuration of interlace and replication from
omap_dss_mgr_apply() to configure_overlay(). This removes the need to
store the values into the cache data.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 3 Nov 2011 14:08:27 +0000 (16:08 +0200)]
OMAPDSS: DISPC: handle 0 out_width/out_height in ovl_setup()
Overlay out_width/height are set to 0 when scaling is not used by the
users of omapdss. Currently ovl_setup() expects the caller of
ovl_setup() to convert those zero values to width or height.
This patch makes ovl_setup() accept zero values for out_width/height,
making calling ovl_setup() a bit simpler as the overlay_info can be
just passed to this function without modifications.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 18 Nov 2011 09:14:01 +0000 (11:14 +0200)]
OMAPDSS: pass ovl manager to dss_start_update
dss_start_update() takes currently the dss device as a parameter. Change
the parameter to ovl manager, as that is what the dss_start_update()
actually needs. Change the name of the function to
dss_mgr_start_update() to reflect the change.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 3 Nov 2011 14:45:07 +0000 (16:45 +0200)]
OMAPDSS: remove partial update from panel-taal
Partial update for manual update displays has never worked quite well:
* The HW has limitations on the update area, and the x and width need to
be even.
* Showing a part of a scaled overlay causes artifacts.
* Makes the management of dispc very complex
Considering the above points and the fact that partial update is not
used anywhere, this and the following patches remove the partial update
support. This will greatly simplify the following re-write of the apply
mechanism to get proper locking and additional features like fifo-merge.
This patch removes the partial update from the panel-taal.c.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 3 Nov 2011 14:34:20 +0000 (16:34 +0200)]
OMAPDSS: remove partial update from DSI
Partial update for manual update displays has never worked quite well:
* The HW has limitations on the update area, and the x and width need to
be even.
* Showing a part of a scaled overlay causes artifacts.
* Makes the management of dispc very complex
Considering the above points and the fact that partial update is not
used anywhere, this and the following patches remove the partial update
support. This will greatly simplify the following re-write of the apply
mechanism to get proper locking and additional features like fifo-merge.
This patch removes the partial update from the dsi.c.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 3 Nov 2011 14:17:37 +0000 (16:17 +0200)]
OMAPDSS: remove partial update from the overlay manager
Partial update for manual update displays has never worked quite well:
* The HW has limitations on the update area, and the x and width need to
be even.
* Showing a part of a scaled overlay causes artifacts.
* Makes the management of dispc very complex
Considering the above points and the fact that partial update is not
used anywhere, this and the following patches remove the partial update
support. This will greatly simplify the following re-write of the apply
mechanism to get proper locking and additional features like fifo-merge.
This patch removes the partial update from the manager.c.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Mon, 31 Oct 2011 06:58:52 +0000 (08:58 +0200)]
OMAPDSS: DISPC: make dispc_ovl_set_fifo_threshold() public
Make dispc_ovl_set_fifo_threshold() public so that later patches can
handle overlay fifo configuration.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Fri, 28 Oct 2011 12:26:26 +0000 (15:26 +0300)]
OMAPDSS: DISPC: make dispc_ovl_set_channel_out() public
Make dispc_ovl_set_channel_out() public so that later patches can handle
changing overlay's manager.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Mon, 31 Oct 2011 11:47:30 +0000 (13:47 +0200)]
OMAPDSS: remove L4_EXAMPLE code
Some old example code has been left lying around. Remove the example
code.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 27 Oct 2011 10:11:31 +0000 (13:11 +0300)]
OMAPDSS: Remove old fifomerge hacks
Once in a time omapdss had basic support for fifomerge. Fifomerge was
removed as the implementation didn't work properly, and a proper
implementation is a complex problem.
However, some unused fifo-merge related code was left behind. This patch
removes those.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Tue, 15 Nov 2011 08:56:11 +0000 (10:56 +0200)]
OMAPDSS: DISPC: add missing prototype
dispc_mgr_is_enabled() was missing a prototype in dss.h
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 13 Oct 2011 16:22:43 +0000 (19:22 +0300)]
OMAPDSS: DSI: disable DDR_CLK_ALWAYS_ON when entering ULPS
ULPS cannot be entered if the DDR clk is enabled. Thus disable the DDR
clk before entering ULPS.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 13 Oct 2011 16:06:49 +0000 (19:06 +0300)]
OMAPDSS: DSI: improve wait_for_bit_change
We sometimes get timeout when disabling the DSI interface with video
mode. It looks like the disable will stall until the current frame has
been finished, and this can take multiple milliseconds.
wait_for_bit_change() currently uses a busyloop to wait for a bit to
change. This is used in multiple places. The problem is, we don't have
clear understanding how long particular operations can take, so the
function needs to support longer waits.
Improve wait_for_bit_change() to first busy loop for 100 times to see if
the bit changes almost right away. If the bit hasn't changed, move to a
loop with a sleep of 1ms, and poll for 500ms.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 13 Oct 2011 13:18:52 +0000 (16:18 +0300)]
OMAPDSS: DSI: fix lane handling when entering ULPS
The current code always enters ULPS for 3 lanes. This is not right, as
there could be only 2 lanes used, and on OMAP4 we have 5 lanes.
Fix the code to put all used lanes into ULPS.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 13 Oct 2011 13:12:29 +0000 (16:12 +0300)]
OMAPDSS: DSI: remove dsi_get_num_lanes_used
There's no longer need for the dsi_get_num_lanes_used function, so it
can be removed. The lane check in dsi_init_display() can be removed as
the validity of the config will be verified when parsing it.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 13 Oct 2011 13:06:43 +0000 (16:06 +0300)]
OMAPDSS: DSI: use lane config in dsi_cio_enable_lane_override
Use the new lane config in dsi_cio_enable_lane_override(). The function
parameters are also slightly changed.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 13 Oct 2011 12:26:50 +0000 (15:26 +0300)]
OMAPDSS: DSI: use lane config in dsi_cio_wait_tx_clk_esc_reset
Use the new lane config in dsi_cio_wait_tx_clk_esc_reset(). This also
extends the function to support 5 lanes on OMAP4, instead of 3 lanes.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 13 Oct 2011 12:12:23 +0000 (15:12 +0300)]
OMAPDSS: DSI: use lane config in dsi_get_lane_mask
Use the new lane config in dsi_get_lane_mask().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 13 Oct 2011 08:22:39 +0000 (11:22 +0300)]
OMAPDSS: DSI: Use new lane config in dsi_set_lane_config
Use the new lane config in dsi_set_lane_config().
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Thu, 13 Oct 2011 08:22:06 +0000 (11:22 +0300)]
OMAPDSS: DSI: Parse lane config
Parse the lane configuration from the device data into internal lane
config format. This will be used in the following patches to clean up
the lane handling.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Wed, 12 Oct 2011 12:05:59 +0000 (15:05 +0300)]
OMAPDSS: DSI: count with number of lanes
DSI driver currently counts used lanes and number of supported lanes by
using the number of data lanes (i.e. excluding clock lane). This patch
changes this to use the number of all lanes so that the following lane
config patches are cleaner.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Wed, 12 Oct 2011 07:17:02 +0000 (10:17 +0300)]
OMAPDSS: DISPC: Flush posted writes when enabling outputs
Flush posted write in _enable_lcd_out() and _enable_digit_out(). This
ensures the the lcd/digit bit is written before the code starts waiting
for interrupts about enabling/disabling the output.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Wed, 12 Oct 2011 07:13:14 +0000 (10:13 +0300)]
OMAPDSS: DSI: flush posted write in send_bta
Flush posted write after setting the bit to send the BTA to ensure the
BTA is sent right away, as the code in dsi_vc_send_bta_sync() waits for
an interrupt caused indirectly by sending the BTA.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen [Wed, 12 Oct 2011 07:10:21 +0000 (10:10 +0300)]
OMAPDSS: DSI: flush posted write when entering ULPS
Flush posted write between writing the ULPS enable bits and waiting for
the interrupt.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Ilya Yanok [Sun, 20 Nov 2011 18:15:39 +0000 (19:15 +0100)]
OMAPDSS: add FocalTech ETM070003DH6 display support
Add data for the FocalTech ETM070003DH6 display to the generic_dpi_panel
display driver.
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Linus Torvalds [Thu, 1 Dec 2011 22:56:01 +0000 (14:56 -0800)]
Linux 3.2-rc4
Linus Torvalds [Thu, 1 Dec 2011 22:55:34 +0000 (14:55 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jlbec/ocfs2
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: (31 commits)
ocfs2: avoid unaligned access to dqc_bitmap
ocfs2: Use filemap_write_and_wait() instead of write_inode_now()
ocfs2: honor O_(D)SYNC flag in fallocate
ocfs2: Add a missing journal credit in ocfs2_link_credits() -v2
ocfs2: send correct UUID to cleancache initialization
ocfs2: Commit transactions in error cases -v2
ocfs2: make direntry invalid when deleting it
fs/ocfs2/dlm/dlmlock.c: free kmem_cache_zalloc'd data using kmem_cache_free
ocfs2: Avoid livelock in ocfs2_readpage()
ocfs2: serialize unaligned aio
ocfs2: Implement llseek()
ocfs2: Fix ocfs2_page_mkwrite()
ocfs2: Add comment about orphan scanning
ocfs2: Clean up messages in the fs
ocfs2/cluster: Cluster up now includes network connections too
ocfs2/cluster: Add new function o2net_fill_node_map()
ocfs2/cluster: Fix output in file elapsed_time_in_ms
ocfs2/dlm: dlmlock_remote() needs to account for remastery
ocfs2/dlm: Take inflight reference count for remotely mastered resources too
ocfs2/dlm: Cleanup dlm_wait_for_node_death() and dlm_wait_for_node_recovery()
...
Akinobu Mita [Tue, 15 Nov 2011 22:56:34 +0000 (14:56 -0800)]
ocfs2: avoid unaligned access to dqc_bitmap
The dqc_bitmap field of struct ocfs2_local_disk_chunk is 32-bit aligned,
but not 64-bit aligned. The dqc_bitmap is accessed by ocfs2_set_bit(),
ocfs2_clear_bit(), ocfs2_test_bit(), or ocfs2_find_next_zero_bit(). These
are wrapper macros for ext2_*_bit() which need to take an unsigned long
aligned address (though some architectures are able to handle unaligned
address correctly)
So some 64bit architectures may not be able to access the dqc_bitmap
correctly.
This avoids such unaligned access by using another wrapper functions for
ext2_*_bit(). The code is taken from fs/ext4/mballoc.c which also need to
handle unaligned bitmap access.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
Linus Torvalds [Thu, 1 Dec 2011 19:53:54 +0000 (11:53 -0800)]
Merge branch 'fixes' of ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm
* 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
ARM: 7182/1: ARM cpu topology: fix warning
ARM: 7181/1: Restrict kprobes probing SWP instructions to ARMv5 and below
ARM: 7180/1: Change kprobes testcase with unpredictable STRD instruction
ARM: 7177/1: GIC: avoid skipping non-existent PPIs in irq_start calculation
ARM: 7176/1: cpu_pm: register GIC PM notifier only once
ARM: 7175/1: add subname parameter to mfp_set_groupg callers
ARM: 7174/1: Fix build error in kprobes test code on Thumb2 kernels
ARM: 7172/1: dma: Drop GFP_COMP for DMA memory allocations
ARM: 7171/1: unwind: add unwind directives to bitops assembly macros
ARM: 7170/2: fix compilation breakage in entry-armv.S
ARM: 7168/1: use cache type functions for arch_get_unmapped_area
ARM: perf: check that we have a platform device when reserving PMU
ARM: 7166/1: Use PMD_SHIFT instead of PGDIR_SHIFT in dma-consistent.c
ARM: 7165/2: PL330: Fix typo in _prepare_ccr()
ARM: 7163/2: PL330: Only register usable channels
ARM: 7162/1: errata: tidy up Kconfig options for PL310 errata workarounds
ARM: 7161/1: errata: no automatic store buffer drain
ARM: perf: initialise used_mask for fake PMU during validation
ARM: PMU: remove pmu_init declaration
ARM: PMU: re-export release_pmu symbol to modules
Linus Torvalds [Thu, 1 Dec 2011 16:28:53 +0000 (08:28 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
Btrfs: fix meta data raid-repair merge problem
Btrfs: skip allocation attempt from empty cluster
Btrfs: skip block groups without enough space for a cluster
Btrfs: start search for new cluster at the beginning
Btrfs: reset cluster's max_size when creating bitmap
Btrfs: initialize new bitmaps' list
Btrfs: fix oops when calling statfs on readonly device
Btrfs: Don't error on resizing FS to same size
Btrfs: fix deadlock on metadata reservation when evicting a inode
Fix URL of btrfs-progs git repository in docs
btrfs scrub: handle -ENOMEM from init_ipath()
Jan Schmidt [Thu, 1 Dec 2011 14:30:36 +0000 (09:30 -0500)]
Btrfs: fix meta data raid-repair merge problem
Commit
4a54c8c16 introduced raid-repair, killing the individual
readpage_io_failed_hook entries from inode.c and disk-io.c. Commit
4bb31e92 introduced new readahead code, adding a readpage_io_failed_hook to
disk-io.c.
The raid-repair commit had logic to disable raid-repair, if
readpage_io_failed_hook is set. Thus, the readahead commit effectively
disabled raid-repair for meta data.
This commit changes the logic to always attempt raid-repair when needed and
call the readpage_io_failed_hook in case raid-repair fails. This is much
more straight forward and should have been like that from the beginning.
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Reported-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Linus Torvalds [Thu, 1 Dec 2011 00:25:02 +0000 (16:25 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
IB: Fix RCU lockdep splats
IB/ipoib: Prevent hung task or softlockup processing multicast response
IB/qib: Fix over-scheduling of QSFP work
RDMA/cxgb4: Fix retry with MPAv1 logic for MPAv2
RDMA/cxgb4: Fix iw_cxgb4 count_rcqes() logic
IB/qib: Don't use schedule_work()
Linus Torvalds [Thu, 1 Dec 2011 00:24:43 +0000 (16:24 -0800)]
Merge branch 'dt-for-linus' of git://sources.calxeda.com/kernel/linux
* 'dt-for-linus' of git://sources.calxeda.com/kernel/linux:
of: Add Silicon Image vendor prefix
of/irq: of_irq_init: add check for parent equal to child node
Linus Torvalds [Thu, 1 Dec 2011 00:24:24 +0000 (16:24 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/broonie/regulator
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: twl: fix twl4030 support for smps regulators
regulator: fix use after free bug
regulator: aat2870: Fix the logic of checking if no id is matched in aat2870_get_regulator
Linus Torvalds [Thu, 1 Dec 2011 00:23:59 +0000 (16:23 -0800)]
Merge branch 'fixes' of git://git./linux/kernel/git/arm/arm-soc
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (45 commits)
ARM: ux500: update defconfig
ARM: u300: update defconfig
ARM: at91: enable additional boards in existing soc defconfig files
ARM: at91: refresh soc defconfig files for 3.2
ARM: at91: rename defconfig files appropriately
ARM: OMAP2+: Fix Compilation error when omap_l3_noc built as module
ARM: OMAP2+: Remove empty io.h
ARM: OMAP2: select ARM_AMBA if OMAP3_EMU is defined
ARM: OMAP: smartreflex: fix IRQ handling bug
ARM: OMAP: PM: only register TWL with voltage layer when device is present
ARM: OMAP: hwmod: Fix the addr space, irq, dma count APIs
arm: mx28: fix bit operation in clock setting
ARM: imx: export imx_ioremap
ARM: imx/mm-imx3: conditionally compile i.MX31 and i.MX35 code
ARM: mx5: Fix checkpatch warnings in cpu-imx5.c
MAINTAINERS: Add missing directory
ARM: imx: drop 'ARCH_MX31' and 'ARCH_MX35'
ARM: imx6q: move clock register map to machine_desc.map_io
ARM: pxa168/gplugd: add the correct SSP device
ARM: Update mach-types to fix mxs build breakage
...
Vincent Guittot [Tue, 29 Nov 2011 14:50:20 +0000 (15:50 +0100)]
ARM: 7182/1: ARM cpu topology: fix warning
kernel/sched.c:7354:2: warning: initialization from incompatible pointer type
Align cpu_coregroup_mask prototype interface with sched_domain_mask_f typedef
use int cpu instead of unsigned int cpu
Cc: <stable@vger.kernel.org>
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Jon Medhurst (Tixy) [Tue, 29 Nov 2011 07:16:02 +0000 (08:16 +0100)]
ARM: 7181/1: Restrict kprobes probing SWP instructions to ARMv5 and below
The SWP instruction is deprecated on ARMv6 and with ARMv7 it will be
UNDEFINED when CONFIG_SWP_EMULATE is selected. In this case, probing a
SWP instruction will cause an oops when the kprobes emulation code
executes an undefined instruction.
As the SWP instruction should be rare or non-existent in kernels for
ARMv6 and later, we can simply avoid these problems by not allowing
probing of these.
Reported-by: Leif Lindholm <leif.lindholm@arm.com>
Tested-by: Leif Lindholm <leif.lindholm@arm.com>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Jon Medhurst (Tixy) [Tue, 29 Nov 2011 07:14:35 +0000 (08:14 +0100)]
ARM: 7180/1: Change kprobes testcase with unpredictable STRD instruction
There is a kprobes testcase for the instruction "strd r2, [r3], r4".
This has unpredictable behaviour as it uses r3 for register writeback
addressing and also stores it to memory.
On a cortex A9, this testcase would fail because the instruction writes
the updated value of r3 to memory, whereas the kprobes emulation code
writes the original value.
Fix this by changing testcase to used r5 instead of r3.
Reported-by: Leif Lindholm <leif.lindholm@arm.com>
Tested-by: Leif Lindholm <leif.lindholm@arm.com>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Alexandre Oliva [Wed, 30 Nov 2011 18:43:00 +0000 (13:43 -0500)]
Btrfs: skip allocation attempt from empty cluster
If we don't have a cluster, don't bother trying to allocate from it,
jumping right away to the attempt to allocate a new cluster.
Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Alexandre Oliva [Wed, 30 Nov 2011 18:43:00 +0000 (13:43 -0500)]
Btrfs: skip block groups without enough space for a cluster
We test whether a block group has enough free space to hold the
requested block, but when we're doing clustered allocation, we can
save some cycles by testing whether it has enough room for the cluster
upfront, otherwise we end up attempting to set up a cluster and
failing. Only in the NO_EMPTY_SIZE loop do we attempt an unclustered
allocation, and by then we'll have zeroed the cluster size, so this
patch won't stop us from using the block group as a last resort.
Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Alexandre Oliva [Wed, 30 Nov 2011 18:43:00 +0000 (13:43 -0500)]
Btrfs: start search for new cluster at the beginning
Instead of starting at zero (offset is always zero), request a cluster
starting at search_start, that denotes the beginning of the current
block group.
Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Alexandre Oliva [Wed, 30 Nov 2011 18:43:00 +0000 (13:43 -0500)]
Btrfs: reset cluster's max_size when creating bitmap
The field that indicates the size of the largest contiguous chunk of
free space in the cluster is not initialized when setting up bitmaps,
it's only increased when we find a larger contiguous chunk. We end up
retaining a larger value than appropriate for highly-fragmented
clusters, which may cause pointless searches for large contiguous
groups, and even cause clusters that do not meet the density
requirements to be set up.
Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Alexandre Oliva [Mon, 28 Nov 2011 14:04:43 +0000 (12:04 -0200)]
Btrfs: initialize new bitmaps' list
We're failing to create clusters with bitmaps because
setup_cluster_no_bitmap checks that the list is empty before inserting
the bitmap entry in the list for setup_cluster_bitmap, but the list
field is only initialized when it is restored from the on-disk free
space cache, or when it is written out to disk.
Besides a potential race condition due to the multiple use of the list
field, filesystem performance severely degrades over time: as we use
up all non-bitmap free extents, the try-to-set-up-cluster dance is
done at every metadata block allocation. For every block group, we
fail to set up a cluster, and after failing on them all up to twice,
we fall back to the much slower unclustered allocation.
To make matters worse, before the unclustered allocation, we try to
create new block groups until we reach the 1% threshold, which
introduces additional bitmaps and thus block groups that we'll iterate
over at each metadata block request.
Li Zefan [Mon, 28 Nov 2011 08:43:00 +0000 (16:43 +0800)]
Btrfs: fix oops when calling statfs on readonly device
To reproduce this bug:
# dd if=/dev/zero of=img bs=1M count=256
# mkfs.btrfs img
# losetup -r /dev/loop1 img
# mount /dev/loop1 /mnt
OOPS!!
It triggered BUG_ON(!nr_devices) in btrfs_calc_avail_data_space().
To fix this, instead of checking write-only devices, we check all open
deivces:
# df -h /dev/loop1
Filesystem Size Used Avail Use% Mounted on
/dev/loop1 250M 28K 238M 1% /mnt
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Mike Fleetwood [Fri, 18 Nov 2011 18:55:01 +0000 (18:55 +0000)]
Btrfs: Don't error on resizing FS to same size
It seems overly harsh to fail a resize of a btrfs file system to the
same size when a shrink or grow would succeed. User app GParted trips
over this error. Allow it by bypassing the shrink or grow operation.
Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Miao Xie [Fri, 18 Nov 2011 09:43:00 +0000 (17:43 +0800)]
Btrfs: fix deadlock on metadata reservation when evicting a inode
When I ran the xfstests, I found the test tasks was blocked on meta-data
reservation.
By debugging, I found the reason of this bug:
start transaction
|
v
reserve meta-data space
|
v
flush delay allocation -> iput inode -> evict inode
^ |
| v
wait for delay allocation flush <- reserve meta-data space
And besides that, the flush on evicting inode will block the thread, which
is reclaiming the memory, and make oom happen easily.
Fix this bug by skipping the flush step when evicting inode.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Arnd Hannemann [Wed, 16 Nov 2011 16:35:37 +0000 (17:35 +0100)]
Fix URL of btrfs-progs git repository in docs
The location of the btrfs-progs repository has been changed.
This patch updates the documentation accordingly.
Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Dan Carpenter [Wed, 16 Nov 2011 08:28:01 +0000 (11:28 +0300)]
btrfs scrub: handle -ENOMEM from init_ipath()
init_ipath() can return an ERR_PTR(-ENOMEM).
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Roland Dreier [Wed, 30 Nov 2011 02:01:53 +0000 (18:01 -0800)]
Merge branches 'cxgb4', 'ipoib', 'misc' and 'qib' into for-next
Linus Torvalds [Tue, 29 Nov 2011 22:43:22 +0000 (14:43 -0800)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/linux-pm
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
PM: Update comments describing device power management callbacks
PM / Sleep: Update documentation related to system wakeup
PM / Runtime: Make documentation follow the new behavior of irq_safe
PM / Sleep: Correct inaccurate information in devices.txt
PM / Domains: Document how PM domains are used by the PM core
PM / Hibernate: Do not leak memory in error/test code paths
Eric Dumazet [Tue, 29 Nov 2011 21:31:23 +0000 (22:31 +0100)]
IB: Fix RCU lockdep splats
Commit
f2c31e32b37 ("net: fix NULL dereferences in check_peer_redir()")
forgot to take care of infiniband uses of dst neighbours.
Many thanks to Marc Aurele who provided a nice bug report and feedback.
Reported-by: Marc Aurele La France <tsi@ualberta.ca>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>
Cc: <stable@kernel.org>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Mike Marciniszyn [Mon, 21 Nov 2011 13:43:54 +0000 (08:43 -0500)]
IB/ipoib: Prevent hung task or softlockup processing multicast response
This following can occur with ipoib when processing a multicast reponse:
BUG: soft lockup - CPU#0 stuck for 67s! [ib_mad1:982]
Modules linked in: ...
CPU 0:
Modules linked in: ...
Pid: 982, comm: ib_mad1 Not tainted 2.6.32-131.0.15.el6.x86_64 #1 ProLiant DL160 G5
RIP: 0010:[<
ffffffff814ddb27>] [<
ffffffff814ddb27>] _spin_unlock_irqrestore+0x17/0x20
RSP: 0018:
ffff8802119ed860 EFLAGS:
00000246
0000000000000004 RBX:
ffff8802119ed860 RCX:
000000000000a299
RDX:
ffff88021086c700 RSI:
0000000000000246 RDI:
0000000000000246
RBP:
ffffffff8100bc8e R08:
ffff880210ac229c R09:
0000000000000000
R10:
ffff88021278aab8 R11:
0000000000000000 R12:
ffff8802119ed860
R13:
ffffffff8100be6e R14:
0000000000000001 R15:
0000000000000003
FS:
0000000000000000(0000) GS:
ffff880028200000(0000) knlGS:
0000000000000000
CS: 0010 DS: 0018 ES: 0018 CR0:
000000008005003b
CR2:
00000000006d4840 CR3:
0000000209aa5000 CR4:
00000000000406f0
DR0:
0000000000000000 DR1:
0000000000000000 DR2:
0000000000000000
DR3:
0000000000000000 DR6:
00000000ffff0ff0 DR7:
0000000000000400
Call Trace:
[<
ffffffffa032c247>] ? ipoib_mcast_send+0x157/0x480 [ib_ipoib]
[<
ffffffff8100bc8e>] ? apic_timer_interrupt+0xe/0x20
[<
ffffffff8100bc8e>] ? apic_timer_interrupt+0xe/0x20
[<
ffffffffa03283d4>] ? ipoib_path_lookup+0x124/0x2d0 [ib_ipoib]
[<
ffffffffa03286fc>] ? ipoib_start_xmit+0x17c/0x430 [ib_ipoib]
[<
ffffffff8141e758>] ? dev_hard_start_xmit+0x2c8/0x3f0
[<
ffffffff81439d0a>] ? sch_direct_xmit+0x15a/0x1c0
[<
ffffffff81423098>] ? dev_queue_xmit+0x388/0x4d0
[<
ffffffffa032d6b7>] ? ipoib_mcast_join_finish+0x2c7/0x510 [ib_ipoib]
[<
ffffffffa032dab8>] ? ipoib_mcast_sendonly_join_complete+0x1b8/0x1f0 [ib_ipoib]
[<
ffffffffa02a0946>] ? mcast_work_handler+0x1a6/0x710 [ib_sa]
[<
ffffffffa015f01e>] ? ib_send_mad+0xfe/0x3c0 [ib_mad]
[<
ffffffffa00f6c93>] ? ib_get_cached_lmc+0xa3/0xb0 [ib_core]
[<
ffffffffa02a0f9b>] ? join_handler+0xeb/0x200 [ib_sa]
[<
ffffffffa029e4fc>] ? ib_sa_mcmember_rec_callback+0x5c/0xa0 [ib_sa]
[<
ffffffffa029e79c>] ? recv_handler+0x3c/0x70 [ib_sa]
[<
ffffffffa01603a4>] ? ib_mad_completion_handler+0x844/0x9d0 [ib_mad]
[<
ffffffffa015fb60>] ? ib_mad_completion_handler+0x0/0x9d0 [ib_mad]
[<
ffffffff81088830>] ? worker_thread+0x170/0x2a0
[<
ffffffff8108e160>] ? autoremove_wake_function+0x0/0x40
[<
ffffffff810886c0>] ? worker_thread+0x0/0x2a0
[<
ffffffff8108ddf6>] ? kthread+0x96/0xa0
[<
ffffffff8100c1ca>] ? child_rip+0xa/0x20
Coinciding with stack trace is the following message:
ib0: ib_address_create failed
The code below in ipoib_mcast_join_finish() will note the above
failure in the address handle but otherwise continue:
ah = ipoib_create_ah(dev, priv->pd, &av);
if (!ah) {
ipoib_warn(priv, "ib_address_create failed\n");
} else {
The while loop at the bottom of ipoib_mcast_join_finish() will attempt
to send queued multicast packets in mcast->pkt_queue and eventually
end up in ipoib_mcast_send():
if (!mcast->ah) {
if (skb_queue_len(&mcast->pkt_queue) < IPOIB_MAX_MCAST_QUEUE)
skb_queue_tail(&mcast->pkt_queue, skb);
else {
++dev->stats.tx_dropped;
dev_kfree_skb_any(skb);
}
My read is that the code will requeue the packet and return to the
ipoib_mcast_join_finish() while loop and the stage is set for the
"hung" task diagnostic as the while loop never sees a non-NULL ah, and
will do nothing to resolve.
There are GFP_ATOMIC allocates in the provider routines, so this is
possible and should be dealt with.
The test that induced the failure is associated with a host SM on the
same server during a shutdown.
This patch causes ipoib_mcast_join_finish() to exit with an error
which will flush the queued mcast packets. Nothing is done to unwind
the QP attached state so that subsequent sends from above will retry
the join.
Reviewed-by: Ram Vepa <ram.vepa@qlogic.com>
Reviewed-by: Gary Leshner <gary.leshner@qlogic.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Linus Torvalds [Tue, 29 Nov 2011 19:13:22 +0000 (11:13 -0800)]
Merge branch 'slab/urgent' of git://git./linux/kernel/git/penberg/linux
* 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux:
slub: avoid potential NULL dereference or corruption
slub: use irqsafe_cpu_cmpxchg for put_cpu_partial
slub: move discard_slab out of node lock
slub: use correct parameter to add a page to partial list tail
Linus Torvalds [Tue, 29 Nov 2011 16:59:12 +0000 (08:59 -0800)]
Merge branch 'dev' of git://git./linux/kernel/git/tytso/ext4
* 'dev' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: fix racy use-after-free in ext4_end_io_dio()
Arnd Bergmann [Tue, 29 Nov 2011 14:50:17 +0000 (14:50 +0000)]
Merge branch 'defconfigs-for-arnd' of git://git.linaro.org/people/triad/linux-stericsson into fixes
Pawel Moll [Tue, 8 Nov 2011 11:35:20 +0000 (11:35 +0000)]
of: Add Silicon Image vendor prefix
"sil" is the most commonly used abbreviation for Silicon
Image products.
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Rob Herring [Mon, 28 Nov 2011 02:16:33 +0000 (20:16 -0600)]
of/irq: of_irq_init: add check for parent equal to child node
With the revert of "of/irq: of_irq_find_parent: check for parent equal to
child" (
dc9372808412edb), we need another way to handle parent node equal
to the child node. This can simply be handled in of_irq_init by checking
for this condition.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Tested-by: Pawel Moll <pawel.moll@arm.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Linus Walleij [Wed, 16 Nov 2011 19:30:35 +0000 (20:30 +0100)]
ARM: ux500: update defconfig
This updates the Ux500 defconfig with the new drivers for HWSEM
and AB5500 core that were merged in the 3.2 cycle.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Wed, 16 Nov 2011 19:44:13 +0000 (20:44 +0100)]
ARM: u300: update defconfig
This updates the U300 defconfig to support some new drivers like
FSMC, sets it to use the MMC clock gating scheme, and removes
some stale config options.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Torvalds [Tue, 29 Nov 2011 03:28:32 +0000 (19:28 -0800)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: convert drivers/hwmon/* to use module_platform_driver()
hwmon: Remove redundant spi driver bus initialization
Linus Torvalds [Tue, 29 Nov 2011 00:37:35 +0000 (16:37 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/aegl/linux
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
efivars: add missing parameter to efi_pstore_read()
Christoph Fritz [Mon, 28 Nov 2011 22:49:33 +0000 (23:49 +0100)]
efivars: add missing parameter to efi_pstore_read()
In the case where CONFIG_PSTORE=n, the function efi_pstore_read() doesn't
have the correct list of parameters. This patch provides a definition
of efi_pstore_read() with 'char **buf' added to fix this warning:
"drivers/firmware/efivars.c:609: warning: initialization from".
problem introduced in commit
f6f8285132907757ef84ef8dae0a1244b8cde6ac
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Linus Torvalds [Mon, 28 Nov 2011 21:55:59 +0000 (13:55 -0800)]
Merge branch 'for-3.2-fixes' of git://git./linux/kernel/git/tj/cgroup
* 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
cgroup_freezer: fix freezing groups with stopped tasks
Linus Torvalds [Mon, 28 Nov 2011 21:49:43 +0000 (13:49 -0800)]
Merge branch 'for-3.2-fixes' of git://git./linux/kernel/git/tj/percpu
* 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
percpu: explain why per_cpu_ptr_to_phys() is more complicated than necessary
percpu: fix chunk range calculation
percpu: rename pcpu_mem_alloc to pcpu_mem_zalloc
Rafael J. Wysocki [Wed, 23 Nov 2011 20:20:32 +0000 (21:20 +0100)]
PM: Update comments describing device power management callbacks
The comments describing device power management callbacks in
include/pm.h are outdated and somewhat confusing, so make them
reflect the reality more accurately.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Rafael J. Wysocki [Wed, 23 Nov 2011 20:20:15 +0000 (21:20 +0100)]
PM / Sleep: Update documentation related to system wakeup
The system wakeup section of Documentation/power/devices.txt is
outdated, so make it agree with the current code.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Rafael J. Wysocki [Wed, 23 Nov 2011 20:20:07 +0000 (21:20 +0100)]
PM / Runtime: Make documentation follow the new behavior of irq_safe
The runtime PM core code behavior related to the power.irq_safe
device flag has changed recently and the documentation should be
modified to reflect it.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Rafael J. Wysocki [Wed, 23 Nov 2011 20:19:57 +0000 (21:19 +0100)]
PM / Sleep: Correct inaccurate information in devices.txt
The documentation file Documentation/power/devices.txt contains some
information that isn't correct any more due to code modifications
made after that file had been created (or updated last time). Fix
this.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Rafael J. Wysocki [Wed, 23 Nov 2011 20:18:39 +0000 (21:18 +0100)]
PM / Domains: Document how PM domains are used by the PM core
The current power management documentation in Documentation/power/
either doesn't cover PM domains at all, or gives inaccurate
information about them, so update the relevant files in there to
follow the code.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Mike Marciniszyn [Wed, 9 Nov 2011 22:07:22 +0000 (17:07 -0500)]
IB/qib: Fix over-scheduling of QSFP work
Don't over-schedule QSFP work on driver initialization. It could end
up being run simultaneously on two different CPUs resulting in bad
EEPROM reads. In combination with setting the physical IB link state
prior to the IBC being brought out of reset, this can cause the link
state machine to start training early with wrong settings.
Signed-off-by: Mitko Haralanov <mitko@qlogic.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Kumar Sanghvi [Mon, 28 Nov 2011 16:39:15 +0000 (22:09 +0530)]
RDMA/cxgb4: Fix retry with MPAv1 logic for MPAv2
Fix logic so that we don't retry with MPAv1 once we have done that
already. Otherwise, we end up retrying with MPAv1 even when its not
needed on getting peer aborts - and this could lead to kernel panic.
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Jonathan Lallinger [Thu, 20 Oct 2011 18:25:14 +0000 (13:25 -0500)]
RDMA/cxgb4: Fix iw_cxgb4 count_rcqes() logic
Fix another place in the code where logic dealing with the t4_cqe was
using the wrong QID. This fixes the counting logic so that it tests
against the SQ QID instead of the RQ QID when counting RCQES.
Signed-off by: Jonathan Lallinger <jonathan@ogc.us>
Signed-off by: Steve Wise <swise@ogc.us>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Linus Torvalds [Mon, 28 Nov 2011 19:27:57 +0000 (11:27 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/aegl/linux
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
pstore: pass allocated memory region back to caller
Tero Kristo [Mon, 28 Nov 2011 14:53:19 +0000 (16:53 +0200)]
regulator: twl: fix twl4030 support for smps regulators
SMPS regulator voltage control differs from the one of the LDO ones.
Current TWL code was using LDO regulator ops for controlling the SMPS
regulators, which fails. This was fixed fixed by adding separate
regulator type which uses correct logic and calculations for the
voltage levels.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Linus Torvalds [Mon, 28 Nov 2011 17:05:23 +0000 (09:05 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
drm/exynos: fixed wrong err ptr usage and destroy call in exeception
drm/exynos: Add disable of manager
drm/exynos: include linux/module.h
drm/exynos: fix vblank bug.
drm/exynos: changed buffer structure.
drm/exynos: removed unnecessary variable.
drm/exynos: use gem create function generically
drm/exynos: checked for null pointer
drm/exynos: added crtc dpms for disable crtc
drm/exynos: removed meaningless parameter from fbdev update
drm/exynos: restored kernel_fb_list when reiniting fb_helper
drm/exynos: changed exynos_drm_display to exynos_drm_display_ops
drm/exynos: added manager object to connector
drm/exynos: fixed converting between display mode and timing
drm/exynos: fixed connector flag with hpd and interlace scan for hdmi
drm/exynos: added kms poll for handling hpd event
Linus Torvalds [Mon, 28 Nov 2011 16:59:11 +0000 (08:59 -0800)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
SUNRPC: Ensure we return EAGAIN in xs_nospace if congestion is cleared
Linus Torvalds [Mon, 28 Nov 2011 16:53:36 +0000 (08:53 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (28 commits)
ALSA: hda - Fix jack-detection control of VT1708
ALSA: hda - cut and paste typo in cs420x_models[]
ALSA: hda/realtek - Minor cleanup
ALSA: hda/realtek - Fix missing inits of item indices for auto-mic
ALSA: hda - Fix invalid pin and GPIO for Apple laptops with CS codecs
ALSA: hda - Check subdevice mask in snd_hda_check_board_codec_sid_config()
ALSA: hda - fail ELD reading early
ALSA: lx6464es - fix device communication via command bus
ALSA: lx6464es - command buffer API cleanup
ALSA: hda - repoll ELD content for multiple times
ALSA: hdspm - Fix PCI ID for PCIe RME MADI cards
ASoC: Ensure WM8731 register cache is synced when resuming from disabled
ALSA: cs5535 - Fix an endianness conversion
ASoC: cs4271: Fix wrong mask parameter in some snd_soc_update_bits calls
ASoC: wm_hubs: fix DB_RANGE size
ASoC: wm9090: fix DB_RANGE size
ASoC: wm8993: fix DB_RANGE size
ASoC: wm8962: fix DB_RANGE size
ASoC: sgtl5000: fix DB_RANGE size
ASoC: rt5631: fix DB_RANGE size
...
Linus Torvalds [Mon, 28 Nov 2011 16:43:52 +0000 (08:43 -0800)]
Merge branch 'timers-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
hrtimer: Fix extra wakeups from __remove_hrtimer()
timekeeping: add arch_offset hook to ktime_get functions
clocksource: Avoid selecting mult values that might overflow when adjusted
time: Improve documentation of timekeeeping_adjust()
Linus Torvalds [Mon, 28 Nov 2011 16:43:32 +0000 (08:43 -0800)]
Merge branch 'irq-urgent-for-linus' of git://git./linux/kernel/git/tip/tip
* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
genirq: Don't allow per cpu interrupts to be suspended
Edward Donovan [Mon, 28 Nov 2011 04:07:34 +0000 (23:07 -0500)]
genirq: fix regression in irqfixup, irqpoll
Commit
fa27271bc8d2("genirq: Fixup poll handling") introduced a
regression that broke irqfixup/irqpoll for some hardware configurations.
Amidst reorganizing 'try_one_irq', that patch removed a test that
checked for 'action->handler' returning IRQ_HANDLED, before acting on
the interrupt. Restoring this test back returns the functionality lost
since 2.6.39. In the current set of tests, after 'action' is set, it
must precede '!action->next' to take effect.
With this and my previous patch to irq/spurious.c,
c75d720fca8a, all
IRQ regressions that I have encountered are fixed.
Signed-off-by: Edward Donovan <edward.donovan@numble.net>
Reported-and-tested-by: Rogério Brito <rbrito@ime.usp.br>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org (2.6.39+)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Lothar Waßmann [Mon, 28 Nov 2011 14:38:37 +0000 (15:38 +0100)]
regulator: fix use after free bug
This is caused by dereferencing 'rdev' after device_unregister() in
the regulator_unregister() function. 'rdev' is freed by
device_unregister(), so it must not be dereferenced after this call.
[Edited commit message for legibility -- broonie]
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>