]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Sat, 21 Jan 2012 15:27:23 +0000 (10:27 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 21 Jan 2012 15:27:23 +0000 (10:27 -0500)
added patches:
acpica-put-back-the-call-to-acpi_os_validate_address.patch
acpi-processor-fix-acpi_get_cpuid-for-up-processor.patch
i2c-omap-correct-sysc-register-offset-for-omap4.patch
sym53c8xx-fix-null-pointer-dereference-in-slave_destroy.patch
target-set-additional-sense-length-field-in-sense-data.patch
target-set-response-format-in-inquiry-response.patch
x86-uv2-fix-bau-destination-timeout-initialization.patch

queue-3.0/acpi-processor-fix-acpi_get_cpuid-for-up-processor.patch [new file with mode: 0644]
queue-3.0/acpica-put-back-the-call-to-acpi_os_validate_address.patch [new file with mode: 0644]
queue-3.0/i2c-omap-correct-sysc-register-offset-for-omap4.patch [new file with mode: 0644]
queue-3.0/series
queue-3.0/sym53c8xx-fix-null-pointer-dereference-in-slave_destroy.patch [new file with mode: 0644]
queue-3.0/target-set-additional-sense-length-field-in-sense-data.patch [new file with mode: 0644]
queue-3.0/target-set-response-format-in-inquiry-response.patch [new file with mode: 0644]
queue-3.0/x86-uv2-fix-bau-destination-timeout-initialization.patch [new file with mode: 0644]

diff --git a/queue-3.0/acpi-processor-fix-acpi_get_cpuid-for-up-processor.patch b/queue-3.0/acpi-processor-fix-acpi_get_cpuid-for-up-processor.patch
new file mode 100644 (file)
index 0000000..d800d83
--- /dev/null
@@ -0,0 +1,73 @@
+From d640113fe80e45ebd4a5b420b220d3f6bf37f682 Mon Sep 17 00:00:00 2001
+From: Lin Ming <ming.m.lin@intel.com>
+Date: Tue, 13 Dec 2011 09:36:03 +0800
+Subject: ACPI: processor: fix acpi_get_cpuid for UP processor
+
+From: Lin Ming <ming.m.lin@intel.com>
+
+commit d640113fe80e45ebd4a5b420b220d3f6bf37f682 upstream.
+
+For UP processor, it is likely that no _MAT method or MADT table defined.
+So currently acpi_get_cpuid(...) always return -1 for UP processor.
+This is wrong. It should return valid value for CPU0.
+
+In the other hand, BIOS may define multiple CPU handles even for UP
+processor, for example
+
+        Scope (_PR)
+        {
+            Processor (CPU0, 0x00, 0x00000410, 0x06) {}
+            Processor (CPU1, 0x01, 0x00000410, 0x06) {}
+            Processor (CPU2, 0x02, 0x00000410, 0x06) {}
+            Processor (CPU3, 0x03, 0x00000410, 0x06) {}
+        }
+
+We should only return valid value for CPU0's acpi handle.
+And return invalid value for others.
+
+http://marc.info/?t=132329819900003&r=1&w=2
+
+Reported-and-tested-by: wallak@free.fr
+Signed-off-by: Lin Ming <ming.m.lin@intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/acpi/processor_core.c |   26 ++++++++++++++++++++++++--
+ 1 file changed, 24 insertions(+), 2 deletions(-)
+
+--- a/drivers/acpi/processor_core.c
++++ b/drivers/acpi/processor_core.c
+@@ -172,8 +172,30 @@ int acpi_get_cpuid(acpi_handle handle, i
+       apic_id = map_mat_entry(handle, type, acpi_id);
+       if (apic_id == -1)
+               apic_id = map_madt_entry(type, acpi_id);
+-      if (apic_id == -1)
+-              return apic_id;
++      if (apic_id == -1) {
++              /*
++               * On UP processor, there is no _MAT or MADT table.
++               * So above apic_id is always set to -1.
++               *
++               * BIOS may define multiple CPU handles even for UP processor.
++               * For example,
++               *
++               * Scope (_PR)
++                 * {
++               *     Processor (CPU0, 0x00, 0x00000410, 0x06) {}
++               *     Processor (CPU1, 0x01, 0x00000410, 0x06) {}
++               *     Processor (CPU2, 0x02, 0x00000410, 0x06) {}
++               *     Processor (CPU3, 0x03, 0x00000410, 0x06) {}
++               * }
++               *
++               * Ignores apic_id and always return 0 for CPU0's handle.
++               * Return -1 for other CPU's handle.
++               */
++              if (acpi_id == 0)
++                      return acpi_id;
++              else
++                      return apic_id;
++      }
+ #ifdef CONFIG_SMP
+       for_each_possible_cpu(i) {
diff --git a/queue-3.0/acpica-put-back-the-call-to-acpi_os_validate_address.patch b/queue-3.0/acpica-put-back-the-call-to-acpi_os_validate_address.patch
new file mode 100644 (file)
index 0000000..5c26585
--- /dev/null
@@ -0,0 +1,56 @@
+From da4d8b287abe783d30e968155614531a0937d090 Mon Sep 17 00:00:00 2001
+From: Lin Ming <ming.m.lin@intel.com>
+Date: Tue, 29 Nov 2011 22:13:35 +0800
+Subject: ACPICA: Put back the call to acpi_os_validate_address
+
+From: Lin Ming <ming.m.lin@intel.com>
+
+commit da4d8b287abe783d30e968155614531a0937d090 upstream.
+
+The call to acpi_os_validate_address in acpi_ds_get_region_arguments was
+removed by mistake in commit 9ad19ac(ACPICA: Split large dsopcode and
+dsload.c files).
+
+Put it back.
+
+Reported-and-bisected-by: Luca Tettamanti <kronos.it@gmail.com>
+Signed-off-by: Lin Ming <ming.m.lin@intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/acpi/acpica/dsargs.c |   24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+--- a/drivers/acpi/acpica/dsargs.c
++++ b/drivers/acpi/acpica/dsargs.c
+@@ -387,5 +387,29 @@ acpi_status acpi_ds_get_region_arguments
+       status = acpi_ds_execute_arguments(node, node->parent,
+                                          extra_desc->extra.aml_length,
+                                          extra_desc->extra.aml_start);
++      if (ACPI_FAILURE(status)) {
++              return_ACPI_STATUS(status);
++      }
++
++      /* Validate the region address/length via the host OS */
++
++      status = acpi_os_validate_address(obj_desc->region.space_id,
++                                        obj_desc->region.address,
++                                        (acpi_size) obj_desc->region.length,
++                                        acpi_ut_get_node_name(node));
++
++      if (ACPI_FAILURE(status)) {
++              /*
++               * Invalid address/length. We will emit an error message and mark
++               * the region as invalid, so that it will cause an additional error if
++               * it is ever used. Then return AE_OK.
++               */
++              ACPI_EXCEPTION((AE_INFO, status,
++                              "During address validation of OpRegion [%4.4s]",
++                              node->name.ascii));
++              obj_desc->common.flags |= AOPOBJ_INVALID;
++              status = AE_OK;
++      }
++
+       return_ACPI_STATUS(status);
+ }
diff --git a/queue-3.0/i2c-omap-correct-sysc-register-offset-for-omap4.patch b/queue-3.0/i2c-omap-correct-sysc-register-offset-for-omap4.patch
new file mode 100644 (file)
index 0000000..af6055f
--- /dev/null
@@ -0,0 +1,32 @@
+From 2727b1753934e154931d6b3bdf20c9b2398457a2 Mon Sep 17 00:00:00 2001
+From: Alexander Aring <a.aring@phytec.de>
+Date: Thu, 8 Dec 2011 15:43:53 +0100
+Subject: I2C: OMAP: correct SYSC register offset for OMAP4
+
+From: Alexander Aring <a.aring@phytec.de>
+
+commit 2727b1753934e154931d6b3bdf20c9b2398457a2 upstream.
+
+Correct OMAP_I2C_SYSC_REG offset in omap4 register map.
+Offset 0x20 is reserved and OMAP_I2C_SYSC_REG has 0x10 as offset.
+
+Signed-off-by: Alexander Aring <a.aring@phytec.de>
+[khilman@ti.com: minor changelog edits]
+Signed-off-by: Kevin Hilman <khilman@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/i2c/busses/i2c-omap.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/i2c/busses/i2c-omap.c
++++ b/drivers/i2c/busses/i2c-omap.c
+@@ -235,7 +235,7 @@ const static u8 omap4_reg_map[] = {
+       [OMAP_I2C_BUF_REG] = 0x94,
+       [OMAP_I2C_CNT_REG] = 0x98,
+       [OMAP_I2C_DATA_REG] = 0x9c,
+-      [OMAP_I2C_SYSC_REG] = 0x20,
++      [OMAP_I2C_SYSC_REG] = 0x10,
+       [OMAP_I2C_CON_REG] = 0xa4,
+       [OMAP_I2C_OA_REG] = 0xa8,
+       [OMAP_I2C_SA_REG] = 0xac,
index 5fd088adcd72c1c5c3e53a1777599b388878815b..0f326a5a777e43fceac79e83c4a0c61c2964ac11 100644 (file)
@@ -69,3 +69,10 @@ intel_idle-fix-api-misuse.patch
 acpi-store-srat-table-revision.patch
 acpi-x86-use-srat-table-rev-to-use-8bit-or-32bit-pxm-fields-x86-x86-64.patch
 acpi-ia64-use-srat-table-rev-to-use-8bit-or-16-32bit-pxm-fields-ia64.patch
+acpica-put-back-the-call-to-acpi_os_validate_address.patch
+acpi-processor-fix-acpi_get_cpuid-for-up-processor.patch
+sym53c8xx-fix-null-pointer-dereference-in-slave_destroy.patch
+target-set-response-format-in-inquiry-response.patch
+target-set-additional-sense-length-field-in-sense-data.patch
+i2c-omap-correct-sysc-register-offset-for-omap4.patch
+x86-uv2-fix-bau-destination-timeout-initialization.patch
diff --git a/queue-3.0/sym53c8xx-fix-null-pointer-dereference-in-slave_destroy.patch b/queue-3.0/sym53c8xx-fix-null-pointer-dereference-in-slave_destroy.patch
new file mode 100644 (file)
index 0000000..abe0201
--- /dev/null
@@ -0,0 +1,34 @@
+From cced5041ed5a2d1352186510944b0ddfbdbe4c0b Mon Sep 17 00:00:00 2001
+From: Stratos Psomadakis <psomas@gentoo.org>
+Date: Sun, 4 Dec 2011 02:23:54 +0200
+Subject: [SCSI] sym53c8xx: Fix NULL pointer dereference in slave_destroy
+
+From: Stratos Psomadakis <psomas@gentoo.org>
+
+commit cced5041ed5a2d1352186510944b0ddfbdbe4c0b upstream.
+
+sym53c8xx_slave_destroy unconditionally assumes that sym53c8xx_slave_alloc has
+succesesfully allocated a sym_lcb. This can lead to a NULL pointer dereference
+(exposed by commit 4e6c82b).
+
+Signed-off-by: Stratos Psomadakis <psomas@gentoo.org>
+Signed-off-by: James Bottomley <JBottomley@Parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/scsi/sym53c8xx_2/sym_glue.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
++++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
+@@ -839,6 +839,10 @@ static void sym53c8xx_slave_destroy(stru
+       struct sym_lcb *lp = sym_lp(tp, sdev->lun);
+       unsigned long flags;
++      /* if slave_alloc returned before allocating a sym_lcb, return */
++      if (!lp)
++              return;
++
+       spin_lock_irqsave(np->s.host->host_lock, flags);
+       if (lp->busy_itlq || lp->busy_itl) {
diff --git a/queue-3.0/target-set-additional-sense-length-field-in-sense-data.patch b/queue-3.0/target-set-additional-sense-length-field-in-sense-data.patch
new file mode 100644 (file)
index 0000000..a804a79
--- /dev/null
@@ -0,0 +1,165 @@
+From 895f3022523361e9b383cf48f51feb1f7d5e7e53 Mon Sep 17 00:00:00 2001
+From: Roland Dreier <roland@purestorage.com>
+Date: Tue, 13 Dec 2011 14:55:33 -0800
+Subject: target: Set additional sense length field in sense data
+
+From: Roland Dreier <roland@purestorage.com>
+
+commit 895f3022523361e9b383cf48f51feb1f7d5e7e53 upstream.
+
+The target code was not setting the additional sense length field in the
+sense data it returned, which meant that at least the Linux stack
+ignored the ASC/ASCQ fields.  For example, without this patch, on a
+tcm_loop device:
+
+    # sg_raw -v /dev/sda 2 0 0 0 0 0
+
+gives
+
+        cdb to send: 02 00 00 00 00 00
+    SCSI Status: Check Condition
+
+    Sense Information:
+     Fixed format, current;  Sense key: Illegal Request
+      Raw sense data (in hex):
+            70 00 05 00 00 00 00 00
+
+while after the patch we correctly get the following (which matches what
+a regular disk returns):
+
+        cdb to send: 02 00 00 00 00 00
+    SCSI Status: Check Condition
+
+    Sense Information:
+     Fixed format, current;  Sense key: Illegal Request
+     Additional sense: Invalid command operation code
+     Raw sense data (in hex):
+            70 00 05 00 00 00 00 0a  00 00 00 00 20 00 00 00
+            00 00
+
+Signed-off-by: Roland Dreier <roland@purestorage.com>
+Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/target/target_core_transport.c |   14 ++++++++++++++
+ include/target/target_core_base.h      |    1 +
+ 2 files changed, 15 insertions(+)
+
+--- a/drivers/target/target_core_transport.c
++++ b/drivers/target/target_core_transport.c
+@@ -5668,6 +5668,8 @@ int transport_send_check_condition_and_s
+       case TCM_SECTOR_COUNT_TOO_MANY:
+               /* CURRENT ERROR */
+               buffer[offset] = 0x70;
++              buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
++              buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
+               /* ILLEGAL REQUEST */
+               buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST;
+               /* INVALID COMMAND OPERATION CODE */
+@@ -5676,6 +5678,7 @@ int transport_send_check_condition_and_s
+       case TCM_UNKNOWN_MODE_PAGE:
+               /* CURRENT ERROR */
+               buffer[offset] = 0x70;
++              buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
+               /* ILLEGAL REQUEST */
+               buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST;
+               /* INVALID FIELD IN CDB */
+@@ -5684,6 +5687,7 @@ int transport_send_check_condition_and_s
+       case TCM_CHECK_CONDITION_ABORT_CMD:
+               /* CURRENT ERROR */
+               buffer[offset] = 0x70;
++              buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
+               /* ABORTED COMMAND */
+               buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND;
+               /* BUS DEVICE RESET FUNCTION OCCURRED */
+@@ -5693,6 +5697,7 @@ int transport_send_check_condition_and_s
+       case TCM_INCORRECT_AMOUNT_OF_DATA:
+               /* CURRENT ERROR */
+               buffer[offset] = 0x70;
++              buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
+               /* ABORTED COMMAND */
+               buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND;
+               /* WRITE ERROR */
+@@ -5703,6 +5708,7 @@ int transport_send_check_condition_and_s
+       case TCM_INVALID_CDB_FIELD:
+               /* CURRENT ERROR */
+               buffer[offset] = 0x70;
++              buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
+               /* ABORTED COMMAND */
+               buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND;
+               /* INVALID FIELD IN CDB */
+@@ -5711,6 +5717,7 @@ int transport_send_check_condition_and_s
+       case TCM_INVALID_PARAMETER_LIST:
+               /* CURRENT ERROR */
+               buffer[offset] = 0x70;
++              buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
+               /* ABORTED COMMAND */
+               buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND;
+               /* INVALID FIELD IN PARAMETER LIST */
+@@ -5719,6 +5726,7 @@ int transport_send_check_condition_and_s
+       case TCM_UNEXPECTED_UNSOLICITED_DATA:
+               /* CURRENT ERROR */
+               buffer[offset] = 0x70;
++              buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
+               /* ABORTED COMMAND */
+               buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND;
+               /* WRITE ERROR */
+@@ -5729,6 +5737,7 @@ int transport_send_check_condition_and_s
+       case TCM_SERVICE_CRC_ERROR:
+               /* CURRENT ERROR */
+               buffer[offset] = 0x70;
++              buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
+               /* ABORTED COMMAND */
+               buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND;
+               /* PROTOCOL SERVICE CRC ERROR */
+@@ -5739,6 +5748,7 @@ int transport_send_check_condition_and_s
+       case TCM_SNACK_REJECTED:
+               /* CURRENT ERROR */
+               buffer[offset] = 0x70;
++              buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
+               /* ABORTED COMMAND */
+               buffer[offset+SPC_SENSE_KEY_OFFSET] = ABORTED_COMMAND;
+               /* READ ERROR */
+@@ -5749,6 +5759,7 @@ int transport_send_check_condition_and_s
+       case TCM_WRITE_PROTECTED:
+               /* CURRENT ERROR */
+               buffer[offset] = 0x70;
++              buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
+               /* DATA PROTECT */
+               buffer[offset+SPC_SENSE_KEY_OFFSET] = DATA_PROTECT;
+               /* WRITE PROTECTED */
+@@ -5757,6 +5768,7 @@ int transport_send_check_condition_and_s
+       case TCM_CHECK_CONDITION_UNIT_ATTENTION:
+               /* CURRENT ERROR */
+               buffer[offset] = 0x70;
++              buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
+               /* UNIT ATTENTION */
+               buffer[offset+SPC_SENSE_KEY_OFFSET] = UNIT_ATTENTION;
+               core_scsi3_ua_for_check_condition(cmd, &asc, &ascq);
+@@ -5766,6 +5778,7 @@ int transport_send_check_condition_and_s
+       case TCM_CHECK_CONDITION_NOT_READY:
+               /* CURRENT ERROR */
+               buffer[offset] = 0x70;
++              buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
+               /* Not Ready */
+               buffer[offset+SPC_SENSE_KEY_OFFSET] = NOT_READY;
+               transport_get_sense_codes(cmd, &asc, &ascq);
+@@ -5776,6 +5789,7 @@ int transport_send_check_condition_and_s
+       default:
+               /* CURRENT ERROR */
+               buffer[offset] = 0x70;
++              buffer[offset+SPC_ADD_SENSE_LEN_OFFSET] = 10;
+               /* ILLEGAL REQUEST */
+               buffer[offset+SPC_SENSE_KEY_OFFSET] = ILLEGAL_REQUEST;
+               /* LOGICAL UNIT COMMUNICATION FAILURE */
+--- a/include/target/target_core_base.h
++++ b/include/target/target_core_base.h
+@@ -36,6 +36,7 @@
+ #define TRANSPORT_SENSE_BUFFER                        SCSI_SENSE_BUFFERSIZE
+ /* Used by transport_send_check_condition_and_sense() */
+ #define SPC_SENSE_KEY_OFFSET                  2
++#define SPC_ADD_SENSE_LEN_OFFSET              7
+ #define SPC_ASC_KEY_OFFSET                    12
+ #define SPC_ASCQ_KEY_OFFSET                   13
+ #define TRANSPORT_IQN_LEN                     224
diff --git a/queue-3.0/target-set-response-format-in-inquiry-response.patch b/queue-3.0/target-set-response-format-in-inquiry-response.patch
new file mode 100644 (file)
index 0000000..e47e7fd
--- /dev/null
@@ -0,0 +1,42 @@
+From ce136176fea522fc8f4c16dcae7e8ed1d890ca39 Mon Sep 17 00:00:00 2001
+From: Roland Dreier <roland@purestorage.com>
+Date: Tue, 6 Dec 2011 10:02:09 -0800
+Subject: target: Set response format in INQUIRY response
+
+From: Roland Dreier <roland@purestorage.com>
+
+commit ce136176fea522fc8f4c16dcae7e8ed1d890ca39 upstream.
+
+Current SCSI specs say that the "response format" field in the standard
+INQUIRY response should be set to 2, and all the real SCSI devices I
+have do put 2 here.  So let's do that too.
+
+Signed-off-by: Roland Dreier <roland@purestorage.com>
+Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/target/target_core_cdb.c |   12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/drivers/target/target_core_cdb.c
++++ b/drivers/target/target_core_cdb.c
+@@ -84,6 +84,18 @@ target_emulate_inquiry_std(struct se_cmd
+       buf[2] = dev->transport->get_device_rev(dev);
+       /*
++       * NORMACA and HISUP = 0, RESPONSE DATA FORMAT = 2
++       *
++       * SPC4 says:
++       *   A RESPONSE DATA FORMAT field set to 2h indicates that the
++       *   standard INQUIRY data is in the format defined in this
++       *   standard. Response data format values less than 2h are
++       *   obsolete. Response data format values greater than 2h are
++       *   reserved.
++       */
++      buf[3] = 2;
++
++      /*
+        * Enable SCCS and TPGS fields for Emulated ALUA
+        */
+       if (T10_ALUA(dev->se_sub_dev)->alua_type == SPC3_ALUA_EMULATED)
diff --git a/queue-3.0/x86-uv2-fix-bau-destination-timeout-initialization.patch b/queue-3.0/x86-uv2-fix-bau-destination-timeout-initialization.patch
new file mode 100644 (file)
index 0000000..1475dac
--- /dev/null
@@ -0,0 +1,64 @@
+From d059f9fa84a30e04279c6ff615e9e2cf3b260191 Mon Sep 17 00:00:00 2001
+From: Cliff Wickman <cpw@sgi.com>
+Date: Mon, 16 Jan 2012 15:18:48 -0600
+Subject: x86/UV2: Fix BAU destination timeout initialization
+
+From: Cliff Wickman <cpw@sgi.com>
+
+commit d059f9fa84a30e04279c6ff615e9e2cf3b260191 upstream.
+
+Move the call to enable_timeouts() forward so that
+BAU_MISC_CONTROL is initialized before using it in
+calculate_destination_timeout().
+
+Fix the calculation of a BAU destination timeout
+for UV2 (in calculate_destination_timeout()).
+
+Signed-off-by: Cliff Wickman <cpw@sgi.com>
+Link: http://lkml.kernel.org/r/20120116211848.GB5767@sgi.com
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/platform/uv/tlb_uv.c |   13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+--- a/arch/x86/platform/uv/tlb_uv.c
++++ b/arch/x86/platform/uv/tlb_uv.c
+@@ -1575,14 +1575,14 @@ static int calculate_destination_timeout
+               ts_ns = base * mult1 * mult2;
+               ret = ts_ns / 1000;
+       } else {
+-              /* 4 bits  0/1 for 10/80us, 3 bits of multiplier */
+-              mmr_image = uv_read_local_mmr(UVH_AGING_PRESCALE_SEL);
++              /* 4 bits  0/1 for 10/80us base, 3 bits of multiplier */
++              mmr_image = uv_read_local_mmr(UVH_LB_BAU_MISC_CONTROL);
+               mmr_image = (mmr_image & UV_SA_MASK) >> UV_SA_SHFT;
+               if (mmr_image & (1L << UV2_ACK_UNITS_SHFT))
+-                      mult1 = 80;
++                      base = 80;
+               else
+-                      mult1 = 10;
+-              base = mmr_image & UV2_ACK_MASK;
++                      base = 10;
++              mult1 = mmr_image & UV2_ACK_MASK;
+               ret = mult1 * base;
+       }
+       return ret;
+@@ -1820,6 +1820,8 @@ static int __init uv_bau_init(void)
+                       uv_base_pnode = uv_blade_to_pnode(uvhub);
+       }
++      enable_timeouts();
++
+       if (init_per_cpu(nuvhubs, uv_base_pnode)) {
+               nobau = 1;
+               return 0;
+@@ -1830,7 +1832,6 @@ static int __init uv_bau_init(void)
+               if (uv_blade_nr_possible_cpus(uvhub))
+                       init_uvhub(uvhub, vector, uv_base_pnode);
+-      enable_timeouts();
+       alloc_intr_gate(vector, uv_bau_message_intr1);
+       for_each_possible_blade(uvhub) {