summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-02-15 08:26:22 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-15 08:26:22 -0800
commitc629fc297d46ac0f98c8f50c7545591027172c65 (patch)
tree6aea354d6521e1a5fed58b729416abcdc37babf5
parent6d798e20a76d756fb653fc8d5e9e11bf53e21766 (diff)
downloadlongterm-queue-2.6.33-c629fc297d46ac0f98c8f50c7545591027172c65.tar.gz
.33
-rw-r--r--queue-2.6.33/cfq-iosched-don-t-wait-if-queue-already-has-requests.patch49
-rw-r--r--queue-2.6.33/firewire-core-fix-unstable-i-o-with-canon-camcorder.patch79
-rw-r--r--queue-2.6.33/powerpc-fix-hcall-tracepoint-recursion.patch84
-rw-r--r--queue-2.6.33/powerpc-fix-some-6xx-7xxx-cpu-setup-functions.patch139
-rw-r--r--queue-2.6.33/series4
5 files changed, 355 insertions, 0 deletions
diff --git a/queue-2.6.33/cfq-iosched-don-t-wait-if-queue-already-has-requests.patch b/queue-2.6.33/cfq-iosched-don-t-wait-if-queue-already-has-requests.patch
new file mode 100644
index 0000000..0544f08
--- /dev/null
+++ b/queue-2.6.33/cfq-iosched-don-t-wait-if-queue-already-has-requests.patch
@@ -0,0 +1,49 @@
+From 02a8f01b5a9f396d0327977af4c232d0f94c45fd Mon Sep 17 00:00:00 2001
+From: Justin TerAvest <teravest@google.com>
+Date: Wed, 9 Feb 2011 14:20:03 +0100
+Subject: cfq-iosched: Don't wait if queue already has requests.
+
+From: Justin TerAvest <teravest@google.com>
+
+commit 02a8f01b5a9f396d0327977af4c232d0f94c45fd upstream.
+
+Commit 7667aa0630407bc07dc38dcc79d29cc0a65553c1 added logic to wait for
+the last queue of the group to become busy (have at least one request),
+so that the group does not lose out for not being continuously
+backlogged. The commit did not check for the condition that the last
+queue already has some requests. As a result, if the queue already has
+requests, wait_busy is set. Later on, cfq_select_queue() checks the
+flag, and decides that since the queue has a request now and wait_busy
+is set, the queue is expired. This results in early expiration of the
+queue.
+
+This patch fixes the problem by adding a check to see if queue already
+has requests. If it does, wait_busy is not set. As a result, time slices
+do not expire early.
+
+The queues with more than one request are usually buffered writers.
+Testing shows improvement in isolation between buffered writers.
+
+Signed-off-by: Justin TerAvest <teravest@google.com>
+Reviewed-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
+Acked-by: Vivek Goyal <vgoyal@redhat.com>
+Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ block/cfq-iosched.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/block/cfq-iosched.c
++++ b/block/cfq-iosched.c
+@@ -3262,6 +3262,10 @@ static bool cfq_should_wait_busy(struct
+ {
+ struct cfq_io_context *cic = cfqd->active_cic;
+
++ /* If the queue already has requests, don't wait */
++ if (!RB_EMPTY_ROOT(&cfqq->sort_list))
++ return false;
++
+ /* If there are other queues in the group, don't wait */
+ if (cfqq->cfqg->nr_cfqq > 1)
+ return false;
diff --git a/queue-2.6.33/firewire-core-fix-unstable-i-o-with-canon-camcorder.patch b/queue-2.6.33/firewire-core-fix-unstable-i-o-with-canon-camcorder.patch
new file mode 100644
index 0000000..962684c
--- /dev/null
+++ b/queue-2.6.33/firewire-core-fix-unstable-i-o-with-canon-camcorder.patch
@@ -0,0 +1,79 @@
+From 6044565af458e7fa6e748bff437ecc49dea88d79 Mon Sep 17 00:00:00 2001
+From: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Date: Sat, 15 Jan 2011 18:19:48 +0100
+Subject: firewire: core: fix unstable I/O with Canon camcorder
+
+From: Stefan Richter <stefanr@s5r6.in-berlin.de>
+
+commit 6044565af458e7fa6e748bff437ecc49dea88d79 upstream.
+
+Regression since commit 10389536742c, "firewire: core: check for 1394a
+compliant IRM, fix inaccessibility of Sony camcorder":
+
+The camcorder Canon MV5i generates lots of bus resets when asynchronous
+requests are sent to it (e.g. Config ROM read requests or FCP Command
+write requests) if the camcorder is not root node. This causes drop-
+outs in videos or makes the camcorder entirely inaccessible.
+https://bugzilla.redhat.com/show_bug.cgi?id=633260
+
+Fix this by allowing any Canon device, even if it is a pre-1394a IRM
+like MV5i are, to remain root node (if it is at least Cycle Master
+capable). With the FireWire controller cards that I tested, MV5i always
+becomes root node when plugged in and left to its own devices.
+
+Reported-by: Ralf Lange
+Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/firewire/core-card.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+--- a/drivers/firewire/core-card.c
++++ b/drivers/firewire/core-card.c
+@@ -75,6 +75,8 @@ static size_t config_rom_length = 1 + 4
+ #define BIB_CMC ((1) << 30)
+ #define BIB_IMC ((1) << 31)
+
++#define CANON_OUI 0x000085
++
+ static void generate_config_rom(struct fw_card *card, __be32 *config_rom)
+ {
+ struct fw_descriptor *desc;
+@@ -240,6 +242,7 @@ static void fw_card_bm_work(struct work_
+ bool root_device_is_running;
+ bool root_device_is_cmc;
+ bool irm_is_1394_1995_only;
++ bool keep_this_irm;
+
+ spin_lock_irqsave(&card->lock, flags);
+
+@@ -261,6 +264,10 @@ static void fw_card_bm_work(struct work_
+ irm_is_1394_1995_only = irm_device && irm_device->config_rom &&
+ (irm_device->config_rom[2] & 0x000000f0) == 0;
+
++ /* Canon MV5i works unreliably if it is not root node. */
++ keep_this_irm = irm_device && irm_device->config_rom &&
++ irm_device->config_rom[3] >> 8 == CANON_OUI;
++
+ root_id = root_node->node_id;
+ irm_id = card->irm_node->node_id;
+ local_id = card->local_node->node_id;
+@@ -288,7 +295,7 @@ static void fw_card_bm_work(struct work_
+ goto pick_me;
+ }
+
+- if (irm_is_1394_1995_only) {
++ if (irm_is_1394_1995_only && !keep_this_irm) {
+ new_root_id = local_id;
+ fw_notify("%s, making local node (%02x) root.\n",
+ "IRM is not 1394a compliant", new_root_id);
+@@ -322,7 +329,7 @@ static void fw_card_bm_work(struct work_
+
+ spin_lock_irqsave(&card->lock, flags);
+
+- if (rcode != RCODE_COMPLETE) {
++ if (rcode != RCODE_COMPLETE && !keep_this_irm) {
+ /*
+ * The lock request failed, maybe the IRM
+ * isn't really IRM capable after all. Let's
diff --git a/queue-2.6.33/powerpc-fix-hcall-tracepoint-recursion.patch b/queue-2.6.33/powerpc-fix-hcall-tracepoint-recursion.patch
new file mode 100644
index 0000000..1650fee
--- /dev/null
+++ b/queue-2.6.33/powerpc-fix-hcall-tracepoint-recursion.patch
@@ -0,0 +1,84 @@
+From 57cdfdf829a850a317425ed93c6a576c9ee6329c Mon Sep 17 00:00:00 2001
+From: Anton Blanchard <anton@samba.org>
+Date: Thu, 21 Oct 2010 00:52:12 +0000
+Subject: powerpc: Fix hcall tracepoint recursion
+
+From: Anton Blanchard <anton@samba.org>
+
+commit 57cdfdf829a850a317425ed93c6a576c9ee6329c upstream.
+
+Spinlocks on shared processor partitions use H_YIELD to notify the
+hypervisor we are waiting on another virtual CPU. Unfortunately this means
+the hcall tracepoints can recurse.
+
+The patch below adds a percpu depth and checks it on both the entry and
+exit hcall tracepoints.
+
+Signed-off-by: Anton Blanchard <anton@samba.org>
+Acked-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/platforms/pseries/lpar.c | 37 ++++++++++++++++++++++++++++++++++
+ 1 file changed, 37 insertions(+)
+
+--- a/arch/powerpc/platforms/pseries/lpar.c
++++ b/arch/powerpc/platforms/pseries/lpar.c
+@@ -673,6 +673,13 @@ EXPORT_SYMBOL(arch_free_page);
+ /* NB: reg/unreg are called while guarded with the tracepoints_mutex */
+ extern long hcall_tracepoint_refcount;
+
++/*
++ * Since the tracing code might execute hcalls we need to guard against
++ * recursion. One example of this are spinlocks calling H_YIELD on
++ * shared processor partitions.
++ */
++static DEFINE_PER_CPU(unsigned int, hcall_trace_depth);
++
+ void hcall_tracepoint_regfunc(void)
+ {
+ hcall_tracepoint_refcount++;
+@@ -685,12 +692,42 @@ void hcall_tracepoint_unregfunc(void)
+
+ void __trace_hcall_entry(unsigned long opcode, unsigned long *args)
+ {
++ unsigned long flags;
++ unsigned int *depth;
++
++ local_irq_save(flags);
++
++ depth = &__get_cpu_var(hcall_trace_depth);
++
++ if (*depth)
++ goto out;
++
++ (*depth)++;
+ trace_hcall_entry(opcode, args);
++ (*depth)--;
++
++out:
++ local_irq_restore(flags);
+ }
+
+ void __trace_hcall_exit(long opcode, unsigned long retval,
+ unsigned long *retbuf)
+ {
++ unsigned long flags;
++ unsigned int *depth;
++
++ local_irq_save(flags);
++
++ depth = &__get_cpu_var(hcall_trace_depth);
++
++ if (*depth)
++ goto out;
++
++ (*depth)++;
+ trace_hcall_exit(opcode, retval, retbuf);
++ (*depth)--;
++
++out:
++ local_irq_restore(flags);
+ }
+ #endif
diff --git a/queue-2.6.33/powerpc-fix-some-6xx-7xxx-cpu-setup-functions.patch b/queue-2.6.33/powerpc-fix-some-6xx-7xxx-cpu-setup-functions.patch
new file mode 100644
index 0000000..755250d
--- /dev/null
+++ b/queue-2.6.33/powerpc-fix-some-6xx-7xxx-cpu-setup-functions.patch
@@ -0,0 +1,139 @@
+From 1f1936ff3febf38d582177ea319eaa278f32c91f Mon Sep 17 00:00:00 2001
+From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Date: Thu, 20 Jan 2011 20:35:23 +0000
+Subject: powerpc: Fix some 6xx/7xxx CPU setup functions
+
+From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+
+commit 1f1936ff3febf38d582177ea319eaa278f32c91f upstream.
+
+Some of those functions try to adjust the CPU features, for example
+to remove NAP support on some revisions. However, they seem to use
+r5 as an index into the CPU table entry, which might have been right
+a long time ago but no longer is. r4 is the right register to use.
+
+This probably caused some off behaviours on some PowerMac variants
+using 750cx or 7455 processor revisions.
+
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/kernel/cpu_setup_6xx.S | 40 ++++++++++++++++++------------------
+ 1 file changed, 20 insertions(+), 20 deletions(-)
+
+--- a/arch/powerpc/kernel/cpu_setup_6xx.S
++++ b/arch/powerpc/kernel/cpu_setup_6xx.S
+@@ -18,7 +18,7 @@
+ #include <asm/mmu.h>
+
+ _GLOBAL(__setup_cpu_603)
+- mflr r4
++ mflr r5
+ BEGIN_MMU_FTR_SECTION
+ li r10,0
+ mtspr SPRN_SPRG_603_LRU,r10 /* init SW LRU tracking */
+@@ -27,60 +27,60 @@ BEGIN_FTR_SECTION
+ bl __init_fpu_registers
+ END_FTR_SECTION_IFCLR(CPU_FTR_FPU_UNAVAILABLE)
+ bl setup_common_caches
+- mtlr r4
++ mtlr r5
+ blr
+ _GLOBAL(__setup_cpu_604)
+- mflr r4
++ mflr r5
+ bl setup_common_caches
+ bl setup_604_hid0
+- mtlr r4
++ mtlr r5
+ blr
+ _GLOBAL(__setup_cpu_750)
+- mflr r4
++ mflr r5
+ bl __init_fpu_registers
+ bl setup_common_caches
+ bl setup_750_7400_hid0
+- mtlr r4
++ mtlr r5
+ blr
+ _GLOBAL(__setup_cpu_750cx)
+- mflr r4
++ mflr r5
+ bl __init_fpu_registers
+ bl setup_common_caches
+ bl setup_750_7400_hid0
+ bl setup_750cx
+- mtlr r4
++ mtlr r5
+ blr
+ _GLOBAL(__setup_cpu_750fx)
+- mflr r4
++ mflr r5
+ bl __init_fpu_registers
+ bl setup_common_caches
+ bl setup_750_7400_hid0
+ bl setup_750fx
+- mtlr r4
++ mtlr r5
+ blr
+ _GLOBAL(__setup_cpu_7400)
+- mflr r4
++ mflr r5
+ bl __init_fpu_registers
+ bl setup_7400_workarounds
+ bl setup_common_caches
+ bl setup_750_7400_hid0
+- mtlr r4
++ mtlr r5
+ blr
+ _GLOBAL(__setup_cpu_7410)
+- mflr r4
++ mflr r5
+ bl __init_fpu_registers
+ bl setup_7410_workarounds
+ bl setup_common_caches
+ bl setup_750_7400_hid0
+ li r3,0
+ mtspr SPRN_L2CR2,r3
+- mtlr r4
++ mtlr r5
+ blr
+ _GLOBAL(__setup_cpu_745x)
+- mflr r4
++ mflr r5
+ bl setup_common_caches
+ bl setup_745x_specifics
+- mtlr r4
++ mtlr r5
+ blr
+
+ /* Enable caches for 603's, 604, 750 & 7400 */
+@@ -194,10 +194,10 @@ setup_750cx:
+ cror 4*cr0+eq,4*cr0+eq,4*cr1+eq
+ cror 4*cr0+eq,4*cr0+eq,4*cr2+eq
+ bnelr
+- lwz r6,CPU_SPEC_FEATURES(r5)
++ lwz r6,CPU_SPEC_FEATURES(r4)
+ li r7,CPU_FTR_CAN_NAP
+ andc r6,r6,r7
+- stw r6,CPU_SPEC_FEATURES(r5)
++ stw r6,CPU_SPEC_FEATURES(r4)
+ blr
+
+ /* 750fx specific
+@@ -225,12 +225,12 @@ BEGIN_FTR_SECTION
+ andis. r11,r11,L3CR_L3E@h
+ beq 1f
+ END_FTR_SECTION_IFSET(CPU_FTR_L3CR)
+- lwz r6,CPU_SPEC_FEATURES(r5)
++ lwz r6,CPU_SPEC_FEATURES(r4)
+ andi. r0,r6,CPU_FTR_L3_DISABLE_NAP
+ beq 1f
+ li r7,CPU_FTR_CAN_NAP
+ andc r6,r6,r7
+- stw r6,CPU_SPEC_FEATURES(r5)
++ stw r6,CPU_SPEC_FEATURES(r4)
+ 1:
+ mfspr r11,SPRN_HID0
+
diff --git a/queue-2.6.33/series b/queue-2.6.33/series
index d2e22a2..603793d 100644
--- a/queue-2.6.33/series
+++ b/queue-2.6.33/series
@@ -307,3 +307,7 @@ fix-jiffy-calculations-in-calibrate_delay_direct-to-handle-overflow.patch
usb-serial-pl2303-hybrid-reader-uniform-hcr331.patch
drivers-update-to-pl2303-usb-serial-to-support-motorola-cables.patch
klist-fix-object-alignment-on-64-bit.patch
+cfq-iosched-don-t-wait-if-queue-already-has-requests.patch
+powerpc-fix-hcall-tracepoint-recursion.patch
+powerpc-fix-some-6xx-7xxx-cpu-setup-functions.patch
+firewire-core-fix-unstable-i-o-with-canon-camcorder.patch