From: Greg Kroah-Hartman Date: Wed, 10 Oct 2012 00:25:10 +0000 (+0900) Subject: 3.5-stable patches X-Git-Tag: v3.0.46~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e86e41562993476cee1408f23b15c956756f16d2;p=thirdparty%2Fkernel%2Fstable-queue.git 3.5-stable patches added patches: alpha-add-missing-rcu-idle-apis-on-idle-loop.patch cris-add-missing-rcu-idle-apis-on-idle-loop.patch drm-i915-call-drm_handle_vblank-before-finish_page_flip.patch drm-i915-fix-gt_mode-default-value.patch drm-i915-flush-the-pending-flips-on-the-crtc-before-modification.patch frv-add-missing-rcu-idle-apis-on-idle-loop.patch h8300-add-missing-rcu-idle-apis-on-idle-loop.patch ia64-add-missing-rcu-idle-apis-on-idle-loop.patch m32r-add-missing-rcu-idle-apis-on-idle-loop.patch m68k-add-missing-rcu-idle-apis-on-idle-loop.patch mn10300-add-missing-rcu-idle-apis-on-idle-loop.patch parisc-add-missing-rcu-idle-apis-on-idle-loop.patch rcu-fix-day-one-dyntick-idle-stall-warning-bug.patch score-add-missing-rcu-idle-apis-on-idle-loop.patch xtensa-add-missing-rcu-idle-apis-on-idle-loop.patch --- diff --git a/queue-3.5/alpha-add-missing-rcu-idle-apis-on-idle-loop.patch b/queue-3.5/alpha-add-missing-rcu-idle-apis-on-idle-loop.patch new file mode 100644 index 00000000000..701b1e051a9 --- /dev/null +++ b/queue-3.5/alpha-add-missing-rcu-idle-apis-on-idle-loop.patch @@ -0,0 +1,62 @@ +From 4c94cada48f7c660eca582be6032427a5e367117 Mon Sep 17 00:00:00 2001 +From: Frederic Weisbecker +Date: Wed, 22 Aug 2012 17:27:34 +0200 +Subject: alpha: Add missing RCU idle APIs on idle loop + +From: Frederic Weisbecker + +commit 4c94cada48f7c660eca582be6032427a5e367117 upstream. + +In the old times, the whole idle task was considered +as an RCU quiescent state. But as RCU became more and +more successful overtime, some RCU read side critical +section have been added even in the code of some +architectures idle tasks, for tracing for example. + +So nowadays, rcu_idle_enter() and rcu_idle_exit() must +be called by the architecture to tell RCU about the part +in the idle loop that doesn't make use of rcu read side +critical sections, typically the part that puts the CPU +in low power mode. + +This is necessary for RCU to find the quiescent states in +idle in order to complete grace periods. + +Add this missing pair of calls in the Alpha's idle loop. + +Reported-by: Paul E. McKenney +Signed-off-by: Frederic Weisbecker +Tested-by: Michael Cree +Cc: Richard Henderson +Cc: Ivan Kokshaysky +Cc: Matt Turner +Cc: alpha +Cc: Paul E. McKenney +Reviewed-by: Josh Triplett +Signed-off-by: Greg Kroah-Hartman + +--- + arch/alpha/kernel/process.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/alpha/kernel/process.c ++++ b/arch/alpha/kernel/process.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -54,8 +55,10 @@ cpu_idle(void) + /* FIXME -- EV6 and LCA45 know how to power down + the CPU. */ + ++ rcu_idle_enter(); + while (!need_resched()) + cpu_relax(); ++ rcu_idle_exit(); + schedule(); + } + } diff --git a/queue-3.5/cris-add-missing-rcu-idle-apis-on-idle-loop.patch b/queue-3.5/cris-add-missing-rcu-idle-apis-on-idle-loop.patch new file mode 100644 index 00000000000..c480019c9ee --- /dev/null +++ b/queue-3.5/cris-add-missing-rcu-idle-apis-on-idle-loop.patch @@ -0,0 +1,65 @@ +From c633f9e788928e91ad11f44df29b47bbbe9550b0 Mon Sep 17 00:00:00 2001 +From: Frederic Weisbecker +Date: Wed, 22 Aug 2012 17:27:34 +0200 +Subject: cris: Add missing RCU idle APIs on idle loop + +From: Frederic Weisbecker + +commit c633f9e788928e91ad11f44df29b47bbbe9550b0 upstream. + +In the old times, the whole idle task was considered +as an RCU quiescent state. But as RCU became more and +more successful overtime, some RCU read side critical +section have been added even in the code of some +architectures idle tasks, for tracing for example. + +So nowadays, rcu_idle_enter() and rcu_idle_exit() must +be called by the architecture to tell RCU about the part +in the idle loop that doesn't make use of rcu read side +critical sections, typically the part that puts the CPU +in low power mode. + +This is necessary for RCU to find the quiescent states in +idle in order to complete grace periods. + +Add this missing pair of calls in the Cris's idle loop. + +Reported-by: Paul E. McKenney +Signed-off-by: Frederic Weisbecker +Cc: Mikael Starvik +Cc: Jesper Nilsson +Cc: Cris +Signed-off-by: Paul E. McKenney +Reviewed-by: Josh Triplett +Signed-off-by: Greg Kroah-Hartman + +--- + arch/cris/kernel/process.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/cris/kernel/process.c ++++ b/arch/cris/kernel/process.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + //#define DEBUG + +@@ -74,6 +75,7 @@ void cpu_idle (void) + { + /* endless idle loop with no priority at all */ + while (1) { ++ rcu_idle_enter(); + while (!need_resched()) { + void (*idle)(void); + /* +@@ -86,6 +88,7 @@ void cpu_idle (void) + idle = default_idle; + idle(); + } ++ rcu_idle_exit(); + schedule_preempt_disabled(); + } + } diff --git a/queue-3.5/drm-i915-call-drm_handle_vblank-before-finish_page_flip.patch b/queue-3.5/drm-i915-call-drm_handle_vblank-before-finish_page_flip.patch new file mode 100644 index 00000000000..de006d9a323 --- /dev/null +++ b/queue-3.5/drm-i915-call-drm_handle_vblank-before-finish_page_flip.patch @@ -0,0 +1,72 @@ +From 74d44445afb9f50126eba052adeb89827cee88f3 Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Tue, 2 Oct 2012 17:54:35 +0200 +Subject: drm/i915: call drm_handle_vblank before finish_page_flip + +From: Daniel Vetter + +commit 74d44445afb9f50126eba052adeb89827cee88f3 upstream. + +... since finish_page_flip needs the vblank timestamp generated +in drm_handle_vblank. Somehow all the gmch platforms get it right, +but all the pch platform irq handlers get is wrong. Hooray for copy& +pasting! + +Currently this gets papered over by a gross hack in finish_page_flip. +A second patch will remove that. + +Note that without this, the new timestamp sanity checks in flip_test +occasionally get tripped up, hence the cc: stable tag. + +Reviewed-by: mario.kleiner@tuebingen.mpg.de +Tested-by: Imre Deak +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_irq.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +--- a/drivers/gpu/drm/i915/i915_irq.c ++++ b/drivers/gpu/drm/i915/i915_irq.c +@@ -605,12 +605,12 @@ static irqreturn_t ivybridge_irq_handler + intel_opregion_gse_intr(dev); + + for (i = 0; i < 3; i++) { ++ if (de_iir & (DE_PIPEA_VBLANK_IVB << (5 * i))) ++ drm_handle_vblank(dev, i); + if (de_iir & (DE_PLANEA_FLIP_DONE_IVB << (5 * i))) { + intel_prepare_page_flip(dev, i); + intel_finish_page_flip_plane(dev, i); + } +- if (de_iir & (DE_PIPEA_VBLANK_IVB << (5 * i))) +- drm_handle_vblank(dev, i); + } + + /* check event from PCH */ +@@ -692,6 +692,12 @@ static irqreturn_t ironlake_irq_handler( + if (de_iir & DE_GSE) + intel_opregion_gse_intr(dev); + ++ if (de_iir & DE_PIPEA_VBLANK) ++ drm_handle_vblank(dev, 0); ++ ++ if (de_iir & DE_PIPEB_VBLANK) ++ drm_handle_vblank(dev, 1); ++ + if (de_iir & DE_PLANEA_FLIP_DONE) { + intel_prepare_page_flip(dev, 0); + intel_finish_page_flip_plane(dev, 0); +@@ -702,12 +708,6 @@ static irqreturn_t ironlake_irq_handler( + intel_finish_page_flip_plane(dev, 1); + } + +- if (de_iir & DE_PIPEA_VBLANK) +- drm_handle_vblank(dev, 0); +- +- if (de_iir & DE_PIPEB_VBLANK) +- drm_handle_vblank(dev, 1); +- + /* check event from PCH */ + if (de_iir & DE_PCH_EVENT) { + if (pch_iir & hotplug_mask) diff --git a/queue-3.5/drm-i915-fix-gt_mode-default-value.patch b/queue-3.5/drm-i915-fix-gt_mode-default-value.patch new file mode 100644 index 00000000000..b58392abaa0 --- /dev/null +++ b/queue-3.5/drm-i915-fix-gt_mode-default-value.patch @@ -0,0 +1,51 @@ +From f8f2ac9a76b0f80a6763ca316116a7bab8486997 Mon Sep 17 00:00:00 2001 +From: Ben Widawsky +Date: Wed, 3 Oct 2012 19:34:24 -0700 +Subject: drm/i915: Fix GT_MODE default value + +From: Ben Widawsky + +commit f8f2ac9a76b0f80a6763ca316116a7bab8486997 upstream. + +I can't even find how I figured this might be needed anymore. But sure +enough, the value I'm reading back on platforms doesn't match what the +docs recommends. + +It seemed to fix Chris' GT1 in limited testing as well. + +Tested-by: Chris Wilson +Signed-off-by: Ben Widawsky +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_reg.h | 3 +++ + drivers/gpu/drm/i915/intel_pm.c | 5 +++++ + 2 files changed, 8 insertions(+) + +--- a/drivers/gpu/drm/i915/i915_reg.h ++++ b/drivers/gpu/drm/i915/i915_reg.h +@@ -514,6 +514,9 @@ + # define VS_TIMER_DISPATCH (1 << 6) + # define MI_FLUSH_ENABLE (1 << 12) + ++#define GEN6_GT_MODE 0x20d0 ++#define GEN6_GT_MODE_HI (1 << 9) ++ + #define GFX_MODE 0x02520 + #define GFX_MODE_GEN7 0x0229c + #define RING_MODE_GEN7(ring) ((ring)->mmio_base+0x29c) +--- a/drivers/gpu/drm/i915/intel_pm.c ++++ b/drivers/gpu/drm/i915/intel_pm.c +@@ -3363,6 +3363,11 @@ static void gen6_init_clock_gating(struc + DISPPLANE_TRICKLE_FEED_DISABLE); + intel_flush_display_plane(dev_priv, pipe); + } ++ ++ /* The default value should be 0x200 according to docs, but the two ++ * platforms I checked have a 0 for this. (Maybe BIOS overrides?) */ ++ I915_WRITE(GEN6_GT_MODE, _MASKED_BIT_DISABLE(0xffff)); ++ I915_WRITE(GEN6_GT_MODE, _MASKED_BIT_ENABLE(GEN6_GT_MODE_HI)); + } + + static void gen7_setup_fixed_func_scheduler(struct drm_i915_private *dev_priv) diff --git a/queue-3.5/drm-i915-flush-the-pending-flips-on-the-crtc-before-modification.patch b/queue-3.5/drm-i915-flush-the-pending-flips-on-the-crtc-before-modification.patch new file mode 100644 index 00000000000..e1ff0988935 --- /dev/null +++ b/queue-3.5/drm-i915-flush-the-pending-flips-on-the-crtc-before-modification.patch @@ -0,0 +1,80 @@ +From 5bb61643f6a70d48de9cfe91ad0fee0d618b6816 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Thu, 27 Sep 2012 21:25:58 +0100 +Subject: drm/i915: Flush the pending flips on the CRTC before modification + +From: Chris Wilson + +commit 5bb61643f6a70d48de9cfe91ad0fee0d618b6816 upstream. + +This was meant to be the purpose of the +intel_crtc_wait_for_pending_flips() function which is called whilst +preparing the CRTC for a modeset or before disabling. However, as Ville +Syrjala pointed out, we set the pending flip notification on the old +framebuffer that is no longer attached to the CRTC by the time we come +to flush the pending operations. Instead, we can simply wait on the +pending unpin work to be finished on this CRTC, knowning that the +hardware has therefore finished modifying the registers, before proceeding +with our direct access. + +Fixes i-g-t/flip_test on non-pch platforms. pch platforms simply +schedule the flip immediately when the pipe is disabled, leading +to other funny issues. + +Signed-off-by: Chris Wilson +[danvet: Added i-g-t note and cc: stable] +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_display.c | 24 ++++++++++++++++++++++-- + 1 file changed, 22 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_display.c ++++ b/drivers/gpu/drm/i915/intel_display.c +@@ -2641,13 +2641,34 @@ static void ironlake_fdi_disable(struct + udelay(100); + } + ++static bool intel_crtc_has_pending_flip(struct drm_crtc *crtc) ++{ ++ struct drm_device *dev = crtc->dev; ++ struct drm_i915_private *dev_priv = dev->dev_private; ++ unsigned long flags; ++ bool pending; ++ ++ if (atomic_read(&dev_priv->mm.wedged)) ++ return false; ++ ++ spin_lock_irqsave(&dev->event_lock, flags); ++ pending = to_intel_crtc(crtc)->unpin_work != NULL; ++ spin_unlock_irqrestore(&dev->event_lock, flags); ++ ++ return pending; ++} ++ + static void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc) + { + struct drm_device *dev = crtc->dev; ++ struct drm_i915_private *dev_priv = dev->dev_private; + + if (crtc->fb == NULL) + return; + ++ wait_event(dev_priv->pending_flip_queue, ++ !intel_crtc_has_pending_flip(crtc)); ++ + mutex_lock(&dev->struct_mutex); + intel_finish_fb(crtc->fb); + mutex_unlock(&dev->struct_mutex); +@@ -5916,9 +5937,8 @@ static void do_intel_finish_page_flip(st + + atomic_clear_mask(1 << intel_crtc->plane, + &obj->pending_flip.counter); +- if (atomic_read(&obj->pending_flip) == 0) +- wake_up(&dev_priv->pending_flip_queue); + ++ wake_up(&dev_priv->pending_flip_queue); + schedule_work(&work->work); + + trace_i915_flip_complete(intel_crtc->plane, work->pending_flip_obj); diff --git a/queue-3.5/frv-add-missing-rcu-idle-apis-on-idle-loop.patch b/queue-3.5/frv-add-missing-rcu-idle-apis-on-idle-loop.patch new file mode 100644 index 00000000000..1dc724db0a9 --- /dev/null +++ b/queue-3.5/frv-add-missing-rcu-idle-apis-on-idle-loop.patch @@ -0,0 +1,62 @@ +From 41d8fe5bb3cf91ce2716ac8f43e4b40d802a99c8 Mon Sep 17 00:00:00 2001 +From: Frederic Weisbecker +Date: Wed, 22 Aug 2012 17:27:34 +0200 +Subject: frv: Add missing RCU idle APIs on idle loop + +From: Frederic Weisbecker + +commit 41d8fe5bb3cf91ce2716ac8f43e4b40d802a99c8 upstream. + +In the old times, the whole idle task was considered +as an RCU quiescent state. But as RCU became more and +more successful overtime, some RCU read side critical +section have been added even in the code of some +architectures idle tasks, for tracing for example. + +So nowadays, rcu_idle_enter() and rcu_idle_exit() must +be called by the architecture to tell RCU about the part +in the idle loop that doesn't make use of rcu read side +critical sections, typically the part that puts the CPU +in low power mode. + +This is necessary for RCU to find the quiescent states in +idle in order to complete grace periods. + +Add this missing pair of calls in the Frv's idle loop. + +Reported-by: Paul E. McKenney +Signed-off-by: Frederic Weisbecker +Cc: David Howells +Acked-by: David Howells +Reviewed-by: Josh Triplett +Signed-off-by: Greg Kroah-Hartman + +--- + arch/frv/kernel/process.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/frv/kernel/process.c ++++ b/arch/frv/kernel/process.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -69,12 +70,14 @@ void cpu_idle(void) + { + /* endless idle loop with no priority at all */ + while (1) { ++ rcu_idle_enter(); + while (!need_resched()) { + check_pgt_cache(); + + if (!frv_dma_inprogress && idle) + idle(); + } ++ rcu_idle_exit(); + + schedule_preempt_disabled(); + } diff --git a/queue-3.5/h8300-add-missing-rcu-idle-apis-on-idle-loop.patch b/queue-3.5/h8300-add-missing-rcu-idle-apis-on-idle-loop.patch new file mode 100644 index 00000000000..8bf70ce3a51 --- /dev/null +++ b/queue-3.5/h8300-add-missing-rcu-idle-apis-on-idle-loop.patch @@ -0,0 +1,58 @@ +From b2fe1430d4115c74d007c825cb9dc3317f28bb16 Mon Sep 17 00:00:00 2001 +From: Frederic Weisbecker +Date: Wed, 22 Aug 2012 17:27:34 +0200 +Subject: h8300: Add missing RCU idle APIs on idle loop + +From: Frederic Weisbecker + +commit b2fe1430d4115c74d007c825cb9dc3317f28bb16 upstream. + +In the old times, the whole idle task was considered +as an RCU quiescent state. But as RCU became more and +more successful overtime, some RCU read side critical +section have been added even in the code of some +architectures idle tasks, for tracing for example. + +So nowadays, rcu_idle_enter() and rcu_idle_exit() must +be called by the architecture to tell RCU about the part +in the idle loop that doesn't make use of rcu read side +critical sections, typically the part that puts the CPU +in low power mode. + +This is necessary for RCU to find the quiescent states in +idle in order to complete grace periods. + +Add this missing pair of calls in the h8300's idle loop. + +Reported-by: Paul E. McKenney +Signed-off-by: Frederic Weisbecker +Cc: Yoshinori Sato +Signed-off-by: Paul E. McKenney +Reviewed-by: Josh Triplett +Signed-off-by: Greg Kroah-Hartman + +--- + arch/h8300/kernel/process.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/h8300/kernel/process.c ++++ b/arch/h8300/kernel/process.c +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -78,8 +79,10 @@ void (*idle)(void) = default_idle; + void cpu_idle(void) + { + while (1) { ++ rcu_idle_enter(); + while (!need_resched()) + idle(); ++ rcu_idle_exit(); + schedule_preempt_disabled(); + } + } diff --git a/queue-3.5/ia64-add-missing-rcu-idle-apis-on-idle-loop.patch b/queue-3.5/ia64-add-missing-rcu-idle-apis-on-idle-loop.patch new file mode 100644 index 00000000000..afc4e5e1c8f --- /dev/null +++ b/queue-3.5/ia64-add-missing-rcu-idle-apis-on-idle-loop.patch @@ -0,0 +1,56 @@ +From 93482f4ef1093f5961a63359a34612183d6beea0 Mon Sep 17 00:00:00 2001 +From: "Paul E. McKenney" +Date: Fri, 24 Aug 2012 13:22:13 -0700 +Subject: ia64: Add missing RCU idle APIs on idle loop + +From: "Paul E. McKenney" + +commit 93482f4ef1093f5961a63359a34612183d6beea0 upstream. + +Traditionally, the entire idle task served as an RCU quiescent state. +But when RCU read side critical sections started appearing within the +idle loop, this traditional strategy became untenable. The fix was to +create new RCU APIs named rcu_idle_enter() and rcu_idle_exit(), which +must be called by each architecture's idle loop so that RCU can tell +when it is safe to ignore a given idle CPU. + +Unfortunately, this fix was never applied to ia64, a shortcoming remedied +by this commit. + +Reported by: Tony Luck +Signed-off-by: Paul E. McKenney +Signed-off-by: Paul E. McKenney +Tested by: Tony Luck +Reviewed-by: Josh Triplett +Signed-off-by: Greg Kroah-Hartman + +--- + arch/ia64/kernel/process.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/ia64/kernel/process.c ++++ b/arch/ia64/kernel/process.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -279,6 +280,7 @@ cpu_idle (void) + + /* endless idle loop with no priority at all */ + while (1) { ++ rcu_idle_enter(); + if (can_do_pal_halt) { + current_thread_info()->status &= ~TS_POLLING; + /* +@@ -309,6 +311,7 @@ cpu_idle (void) + normal_xtp(); + #endif + } ++ rcu_idle_exit(); + schedule_preempt_disabled(); + check_pgt_cache(); + if (cpu_is_offline(cpu)) diff --git a/queue-3.5/m32r-add-missing-rcu-idle-apis-on-idle-loop.patch b/queue-3.5/m32r-add-missing-rcu-idle-apis-on-idle-loop.patch new file mode 100644 index 00000000000..7eaaa9293d6 --- /dev/null +++ b/queue-3.5/m32r-add-missing-rcu-idle-apis-on-idle-loop.patch @@ -0,0 +1,63 @@ +From 48ae077cfce72591b8fc80e1dcc87806f86fed7f Mon Sep 17 00:00:00 2001 +From: Frederic Weisbecker +Date: Wed, 22 Aug 2012 17:27:34 +0200 +Subject: m32r: Add missing RCU idle APIs on idle loop + +From: Frederic Weisbecker + +commit 48ae077cfce72591b8fc80e1dcc87806f86fed7f upstream. + +In the old times, the whole idle task was considered +as an RCU quiescent state. But as RCU became more and +more successful overtime, some RCU read side critical +section have been added even in the code of some +architectures idle tasks, for tracing for example. + +So nowadays, rcu_idle_enter() and rcu_idle_exit() must +be called by the architecture to tell RCU about the part +in the idle loop that doesn't make use of rcu read side +critical sections, typically the part that puts the CPU +in low power mode. + +This is necessary for RCU to find the quiescent states in +idle in order to complete grace periods. + +Add this missing pair of calls in the m32r's idle loop. + +Reported-by: Paul E. McKenney +Signed-off-by: Frederic Weisbecker +Cc: Hirokazu Takata +Signed-off-by: Paul E. McKenney +Reviewed-by: Josh Triplett +Signed-off-by: Greg Kroah-Hartman + +--- + arch/m32r/kernel/process.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/m32r/kernel/process.c ++++ b/arch/m32r/kernel/process.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -82,6 +83,7 @@ void cpu_idle (void) + { + /* endless idle loop with no priority at all */ + while (1) { ++ rcu_idle_enter(); + while (!need_resched()) { + void (*idle)(void) = pm_idle; + +@@ -90,6 +92,7 @@ void cpu_idle (void) + + idle(); + } ++ rcu_idle_exit(); + schedule_preempt_disabled(); + } + } diff --git a/queue-3.5/m68k-add-missing-rcu-idle-apis-on-idle-loop.patch b/queue-3.5/m68k-add-missing-rcu-idle-apis-on-idle-loop.patch new file mode 100644 index 00000000000..c5033ce04ad --- /dev/null +++ b/queue-3.5/m68k-add-missing-rcu-idle-apis-on-idle-loop.patch @@ -0,0 +1,59 @@ +From 5b57ba37e82a15f345a6a2eb8c01a2b2d94c5eeb Mon Sep 17 00:00:00 2001 +From: Frederic Weisbecker +Date: Wed, 22 Aug 2012 17:27:34 +0200 +Subject: m68k: Add missing RCU idle APIs on idle loop + +From: Frederic Weisbecker + +commit 5b57ba37e82a15f345a6a2eb8c01a2b2d94c5eeb upstream. + +In the old times, the whole idle task was considered +as an RCU quiescent state. But as RCU became more and +more successful overtime, some RCU read side critical +section have been added even in the code of some +architectures idle tasks, for tracing for example. + +So nowadays, rcu_idle_enter() and rcu_idle_exit() must +be called by the architecture to tell RCU about the part +in the idle loop that doesn't make use of rcu read side +critical sections, typically the part that puts the CPU +in low power mode. + +This is necessary for RCU to find the quiescent states in +idle in order to complete grace periods. + +Add this missing pair of calls in the m68k's idle loop. + +Reported-by: Paul E. McKenney +Signed-off-by: Frederic Weisbecker +Acked-by: Geert Uytterhoeven +Cc: m68k +Signed-off-by: Paul E. McKenney +Reviewed-by: Josh Triplett +Signed-off-by: Greg Kroah-Hartman + +--- + arch/m68k/kernel/process.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/m68k/kernel/process.c ++++ b/arch/m68k/kernel/process.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -75,8 +76,10 @@ void cpu_idle(void) + { + /* endless idle loop with no priority at all */ + while (1) { ++ rcu_idle_enter(); + while (!need_resched()) + idle(); ++ rcu_idle_exit(); + schedule_preempt_disabled(); + } + } diff --git a/queue-3.5/mn10300-add-missing-rcu-idle-apis-on-idle-loop.patch b/queue-3.5/mn10300-add-missing-rcu-idle-apis-on-idle-loop.patch new file mode 100644 index 00000000000..891f9b17277 --- /dev/null +++ b/queue-3.5/mn10300-add-missing-rcu-idle-apis-on-idle-loop.patch @@ -0,0 +1,65 @@ +From 5b0753a90b7a98bc613c3767e9263a1a76d4f900 Mon Sep 17 00:00:00 2001 +From: Frederic Weisbecker +Date: Wed, 22 Aug 2012 17:27:34 +0200 +Subject: mn10300: Add missing RCU idle APIs on idle loop + +From: Frederic Weisbecker + +commit 5b0753a90b7a98bc613c3767e9263a1a76d4f900 upstream. + +In the old times, the whole idle task was considered +as an RCU quiescent state. But as RCU became more and +more successful overtime, some RCU read side critical +section have been added even in the code of some +architectures idle tasks, for tracing for example. + +So nowadays, rcu_idle_enter() and rcu_idle_exit() must +be called by the architecture to tell RCU about the part +in the idle loop that doesn't make use of rcu read side +critical sections, typically the part that puts the CPU +in low power mode. + +This is necessary for RCU to find the quiescent states in +idle in order to complete grace periods. + +Add this missing pair of calls in the mn10300's idle loop. + +Reported-by: Paul E. McKenney +Signed-off-by: Frederic Weisbecker +Cc: David Howells +Cc: Koichi Yasutake +Signed-off-by: Paul E. McKenney +Acked-by: David Howells +Reviewed-by: Josh Triplett +Signed-off-by: Greg Kroah-Hartman + +--- + arch/mn10300/kernel/process.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/mn10300/kernel/process.c ++++ b/arch/mn10300/kernel/process.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -107,6 +108,7 @@ void cpu_idle(void) + { + /* endless idle loop with no priority at all */ + for (;;) { ++ rcu_idle_enter(); + while (!need_resched()) { + void (*idle)(void); + +@@ -121,6 +123,7 @@ void cpu_idle(void) + } + idle(); + } ++ rcu_idle_exit(); + + schedule_preempt_disabled(); + } diff --git a/queue-3.5/parisc-add-missing-rcu-idle-apis-on-idle-loop.patch b/queue-3.5/parisc-add-missing-rcu-idle-apis-on-idle-loop.patch new file mode 100644 index 00000000000..3cb16e61507 --- /dev/null +++ b/queue-3.5/parisc-add-missing-rcu-idle-apis-on-idle-loop.patch @@ -0,0 +1,60 @@ +From fbe752188d5589e7fcbb8e79824e560f77dccc92 Mon Sep 17 00:00:00 2001 +From: Frederic Weisbecker +Date: Wed, 22 Aug 2012 17:27:34 +0200 +Subject: parisc: Add missing RCU idle APIs on idle loop + +From: Frederic Weisbecker + +commit fbe752188d5589e7fcbb8e79824e560f77dccc92 upstream. + +In the old times, the whole idle task was considered +as an RCU quiescent state. But as RCU became more and +more successful overtime, some RCU read side critical +section have been added even in the code of some +architectures idle tasks, for tracing for example. + +So nowadays, rcu_idle_enter() and rcu_idle_exit() must +be called by the architecture to tell RCU about the part +in the idle loop that doesn't make use of rcu read side +critical sections, typically the part that puts the CPU +in low power mode. + +This is necessary for RCU to find the quiescent states in +idle in order to complete grace periods. + +Add this missing pair of calls in the parisc's idle loop. + +Reported-by: Paul E. McKenney +Signed-off-by: Frederic Weisbecker +Cc: James E.J. Bottomley +Cc: Helge Deller +Cc: Parisc +Signed-off-by: Paul E. McKenney +Reviewed-by: Josh Triplett +Signed-off-by: Greg Kroah-Hartman + +--- + arch/parisc/kernel/process.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/parisc/kernel/process.c ++++ b/arch/parisc/kernel/process.c +@@ -48,6 +48,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -69,8 +70,10 @@ void cpu_idle(void) + + /* endless idle loop with no priority at all */ + while (1) { ++ rcu_idle_enter(); + while (!need_resched()) + barrier(); ++ rcu_idle_exit(); + schedule_preempt_disabled(); + check_pgt_cache(); + } diff --git a/queue-3.5/rcu-fix-day-one-dyntick-idle-stall-warning-bug.patch b/queue-3.5/rcu-fix-day-one-dyntick-idle-stall-warning-bug.patch new file mode 100644 index 00000000000..218dbe726a1 --- /dev/null +++ b/queue-3.5/rcu-fix-day-one-dyntick-idle-stall-warning-bug.patch @@ -0,0 +1,84 @@ +From a10d206ef1a83121ab7430cb196e0376a7145b22 Mon Sep 17 00:00:00 2001 +From: "Paul E. McKenney" +Date: Sat, 22 Sep 2012 13:55:30 -0700 +Subject: rcu: Fix day-one dyntick-idle stall-warning bug + +From: "Paul E. McKenney" + +commit a10d206ef1a83121ab7430cb196e0376a7145b22 upstream. + +Each grace period is supposed to have at least one callback waiting +for that grace period to complete. However, if CONFIG_NO_HZ=n, an +extra callback-free grace period is no big problem -- it will chew up +a tiny bit of CPU time, but it will complete normally. In contrast, +CONFIG_NO_HZ=y kernels have the potential for all the CPUs to go to +sleep indefinitely, in turn indefinitely delaying completion of the +callback-free grace period. Given that nothing is waiting on this grace +period, this is also not a problem. + +That is, unless RCU CPU stall warnings are also enabled, as they are +in recent kernels. In this case, if a CPU wakes up after at least one +minute of inactivity, an RCU CPU stall warning will result. The reason +that no one noticed until quite recently is that most systems have enough +OS noise that they will never remain absolutely idle for a full minute. +But there are some embedded systems with cut-down userspace configurations +that consistently get into this situation. + +All this begs the question of exactly how a callback-free grace period +gets started in the first place. This can happen due to the fact that +CPUs do not necessarily agree on which grace period is in progress. +If a CPU still believes that the grace period that just completed is +still ongoing, it will believe that it has callbacks that need to wait for +another grace period, never mind the fact that the grace period that they +were waiting for just completed. This CPU can therefore erroneously +decide to start a new grace period. Note that this can happen in +TREE_RCU and TREE_PREEMPT_RCU even on a single-CPU system: Deadlock +considerations mean that the CPU that detected the end of the grace +period is not necessarily officially informed of this fact for some time. + +Once this CPU notices that the earlier grace period completed, it will +invoke its callbacks. It then won't have any callbacks left. If no +other CPU has any callbacks, we now have a callback-free grace period. + +This commit therefore makes CPUs check more carefully before starting a +new grace period. This new check relies on an array of tail pointers +into each CPU's list of callbacks. If the CPU is up to date on which +grace periods have completed, it checks to see if any callbacks follow +the RCU_DONE_TAIL segment, otherwise it checks to see if any callbacks +follow the RCU_WAIT_TAIL segment. The reason that this works is that +the RCU_WAIT_TAIL segment will be promoted to the RCU_DONE_TAIL segment +as soon as the CPU is officially notified that the old grace period +has ended. + +This change is to cpu_needs_another_gp(), which is called in a number +of places. The only one that really matters is in rcu_start_gp(), where +the root rcu_node structure's ->lock is held, which prevents any +other CPU from starting or completing a grace period, so that the +comparison that determines whether the CPU is missing the completion +of a grace period is stable. + +Reported-by: Becky Bruce +Reported-by: Subodh Nijsure +Reported-by: Paul Walmsley +Signed-off-by: Paul E. McKenney +Signed-off-by: Paul E. McKenney +Tested-by: Paul Walmsley # OMAP3730, OMAP4430 +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/rcutree.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/kernel/rcutree.c ++++ b/kernel/rcutree.c +@@ -304,7 +304,9 @@ cpu_has_callbacks_ready_to_invoke(struct + static int + cpu_needs_another_gp(struct rcu_state *rsp, struct rcu_data *rdp) + { +- return *rdp->nxttail[RCU_DONE_TAIL] && !rcu_gp_in_progress(rsp); ++ return *rdp->nxttail[RCU_DONE_TAIL + ++ ACCESS_ONCE(rsp->completed) != rdp->completed] && ++ !rcu_gp_in_progress(rsp); + } + + /* diff --git a/queue-3.5/score-add-missing-rcu-idle-apis-on-idle-loop.patch b/queue-3.5/score-add-missing-rcu-idle-apis-on-idle-loop.patch new file mode 100644 index 00000000000..a3514b17629 --- /dev/null +++ b/queue-3.5/score-add-missing-rcu-idle-apis-on-idle-loop.patch @@ -0,0 +1,60 @@ +From 0ee23fda59740767324b4340247ca41a2f498ca6 Mon Sep 17 00:00:00 2001 +From: Frederic Weisbecker +Date: Wed, 22 Aug 2012 17:27:34 +0200 +Subject: score: Add missing RCU idle APIs on idle loop + +From: Frederic Weisbecker + +commit 0ee23fda59740767324b4340247ca41a2f498ca6 upstream. + +In the old times, the whole idle task was considered +as an RCU quiescent state. But as RCU became more and +more successful overtime, some RCU read side critical +section have been added even in the code of some +architectures idle tasks, for tracing for example. + +So nowadays, rcu_idle_enter() and rcu_idle_exit() must +be called by the architecture to tell RCU about the part +in the idle loop that doesn't make use of rcu read side +critical sections, typically the part that puts the CPU +in low power mode. + +This is necessary for RCU to find the quiescent states in +idle in order to complete grace periods. + +Add this missing pair of calls in scores's idle loop. + +Reported-by: Paul E. McKenney +Signed-off-by: Frederic Weisbecker +Cc: Chen Liqin +Cc: Lennox Wu +Signed-off-by: Paul E. McKenney +Reviewed-by: Josh Triplett +Signed-off-by: Greg Kroah-Hartman + +--- + arch/score/kernel/process.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/arch/score/kernel/process.c ++++ b/arch/score/kernel/process.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + + void (*pm_power_off)(void); + EXPORT_SYMBOL(pm_power_off); +@@ -50,9 +51,10 @@ void __noreturn cpu_idle(void) + { + /* endless idle loop with no priority at all */ + while (1) { ++ rcu_idle_enter(); + while (!need_resched()) + barrier(); +- ++ rcu_idle_exit(); + schedule_preempt_disabled(); + } + } diff --git a/queue-3.5/series b/queue-3.5/series index 4d88f940ad4..c745df10d5c 100644 --- a/queue-3.5/series +++ b/queue-3.5/series @@ -94,3 +94,18 @@ drm-destroy-the-planes-prior-to-destroying-the-associated-crtc.patch drm-radeon-only-adjust-default-clocks-on-ni-gpus.patch drm-radeon-add-msi-quirk-for-gateway-rs690.patch drm-radeon-force-msis-on-rs690-asics.patch +drm-i915-flush-the-pending-flips-on-the-crtc-before-modification.patch +drm-i915-call-drm_handle_vblank-before-finish_page_flip.patch +drm-i915-fix-gt_mode-default-value.patch +ia64-add-missing-rcu-idle-apis-on-idle-loop.patch +h8300-add-missing-rcu-idle-apis-on-idle-loop.patch +parisc-add-missing-rcu-idle-apis-on-idle-loop.patch +xtensa-add-missing-rcu-idle-apis-on-idle-loop.patch +frv-add-missing-rcu-idle-apis-on-idle-loop.patch +mn10300-add-missing-rcu-idle-apis-on-idle-loop.patch +m68k-add-missing-rcu-idle-apis-on-idle-loop.patch +alpha-add-missing-rcu-idle-apis-on-idle-loop.patch +cris-add-missing-rcu-idle-apis-on-idle-loop.patch +m32r-add-missing-rcu-idle-apis-on-idle-loop.patch +score-add-missing-rcu-idle-apis-on-idle-loop.patch +rcu-fix-day-one-dyntick-idle-stall-warning-bug.patch diff --git a/queue-3.5/xtensa-add-missing-rcu-idle-apis-on-idle-loop.patch b/queue-3.5/xtensa-add-missing-rcu-idle-apis-on-idle-loop.patch new file mode 100644 index 00000000000..28466cac830 --- /dev/null +++ b/queue-3.5/xtensa-add-missing-rcu-idle-apis-on-idle-loop.patch @@ -0,0 +1,58 @@ +From 11ad47a0edbd62bfc0547cfcdf227a911433f207 Mon Sep 17 00:00:00 2001 +From: Frederic Weisbecker +Date: Wed, 22 Aug 2012 17:27:34 +0200 +Subject: xtensa: Add missing RCU idle APIs on idle loop + +From: Frederic Weisbecker + +commit 11ad47a0edbd62bfc0547cfcdf227a911433f207 upstream. + +In the old times, the whole idle task was considered +as an RCU quiescent state. But as RCU became more and +more successful overtime, some RCU read side critical +section have been added even in the code of some +architectures idle tasks, for tracing for example. + +So nowadays, rcu_idle_enter() and rcu_idle_exit() must +be called by the architecture to tell RCU about the part +in the idle loop that doesn't make use of rcu read side +critical sections, typically the part that puts the CPU +in low power mode. + +This is necessary for RCU to find the quiescent states in +idle in order to complete grace periods. + +Add this missing pair of calls in the xtensa's idle loop. + +Reported-by: Paul E. McKenney +Signed-off-by: Frederic Weisbecker +Cc: Chris Zankel +Signed-off-by: Paul E. McKenney +Reviewed-by: Josh Triplett +Signed-off-by: Greg Kroah-Hartman + +--- + arch/xtensa/kernel/process.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/xtensa/kernel/process.c ++++ b/arch/xtensa/kernel/process.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -110,8 +111,10 @@ void cpu_idle(void) + + /* endless idle loop with no priority at all */ + while (1) { ++ rcu_idle_enter(); + while (!need_resched()) + platform_idle(); ++ rcu_idle_exit(); + schedule_preempt_disabled(); + } + }