summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-09-15 12:59:34 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-09-15 12:59:34 +0200
commita80f4c588cd64c0716077b7fbbad7bff87e95e4f (patch)
treee8060d4746942b4d7d74659f7d20b95f4c960d32
parentd654472b0e702f91a264bcf83a51d482a454d3a4 (diff)
downloadlongterm-queue-2.6.33-a80f4c588cd64c0716077b7fbbad7bff87e95e4f.tar.gz
.33 patches
-rw-r--r--queue-2.6.33/arm-davinci-da850-evm-read-mac-address-from-spi-flash.patch94
-rw-r--r--queue-2.6.33/md-fix-handling-for-devices-from-2tb-to-4tb-in-0.90.patch68
-rw-r--r--queue-2.6.33/series4
-rw-r--r--queue-2.6.33/xen-smp-warn-user-why-they-keel-over-nosmp-or-noapic-and-what-to-use-instead.patch52
-rw-r--r--queue-2.6.33/xen-x86_32-do-not-enable-iterrupts-when-returning-from.patch58
5 files changed, 276 insertions, 0 deletions
diff --git a/queue-2.6.33/arm-davinci-da850-evm-read-mac-address-from-spi-flash.patch b/queue-2.6.33/arm-davinci-da850-evm-read-mac-address-from-spi-flash.patch
new file mode 100644
index 0000000..e7b58c3
--- /dev/null
+++ b/queue-2.6.33/arm-davinci-da850-evm-read-mac-address-from-spi-flash.patch
@@ -0,0 +1,94 @@
+From 810198bc9c109489dfadc57131c5183ce6ad2d7d Mon Sep 17 00:00:00 2001
+From: "Rajashekhara, Sudhakar" <sudhakar.raj@ti.com>
+Date: Tue, 12 Jul 2011 15:58:53 +0530
+Subject: ARM: davinci: da850 EVM: read mac address from SPI flash
+
+From: "Rajashekhara, Sudhakar" <sudhakar.raj@ti.com>
+
+commit 810198bc9c109489dfadc57131c5183ce6ad2d7d upstream.
+
+DA850/OMAP-L138 EMAC driver uses random mac address instead of
+a fixed one because the mac address is not stuffed into EMAC
+platform data.
+
+This patch provides a function which reads the mac address
+stored in SPI flash (registered as MTD device) and populates the
+EMAC platform data. The function which reads the mac address is
+registered as a callback which gets called upon addition of MTD
+device.
+
+NOTE: In case the MAC address stored in SPI flash is erased, follow
+the instructions at [1] to restore it.
+
+[1] http://processors.wiki.ti.com/index.php/GSG:_OMAP-L138_DVEVM_Additional_Procedures#Restoring_MAC_address_on_SPI_Flash
+
+Modifications in v2:
+Guarded registering the mtd_notifier only when MTD is enabled.
+Earlier this was handled using mtd_has_partitions() call, but
+this has been removed in Linux v3.0.
+
+Modifications in v3:
+a. Guarded da850_evm_m25p80_notify_add() function and
+ da850evm_spi_notifier structure with CONFIG_MTD macros.
+b. Renamed da850_evm_register_mtd_user() function to
+ da850_evm_setup_mac_addr() and removed the struct mtd_notifier
+ argument to this function.
+c. Passed the da850evm_spi_notifier structure to register_mtd_user()
+ function.
+
+Modifications in v4:
+Moved the da850_evm_setup_mac_addr() function within the first
+CONFIG_MTD ifdef construct.
+
+Signed-off-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com>
+Signed-off-by: Sekhar Nori <nsekhar@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/arm/mach-davinci/board-da850-evm.c | 28 ++++++++++++++++++++++++++++
+ 1 file changed, 28 insertions(+)
+
+--- a/arch/arm/mach-davinci/board-da850-evm.c
++++ b/arch/arm/mach-davinci/board-da850-evm.c
+@@ -44,6 +44,32 @@
+
+ #define DA850_MII_MDIO_CLKEN_PIN GPIO_TO_PIN(2, 6)
+
++#ifdef CONFIG_MTD
++static void da850_evm_m25p80_notify_add(struct mtd_info *mtd)
++{
++ char *mac_addr = davinci_soc_info.emac_pdata->mac_addr;
++ size_t retlen;
++
++ if (!strcmp(mtd->name, "MAC-Address")) {
++ mtd->read(mtd, 0, ETH_ALEN, &retlen, mac_addr);
++ if (retlen == ETH_ALEN)
++ pr_info("Read MAC addr from SPI Flash: %pM\n",
++ mac_addr);
++ }
++}
++
++static struct mtd_notifier da850evm_spi_notifier = {
++ .add = da850_evm_m25p80_notify_add,
++};
++
++static void da850_evm_setup_mac_addr(void)
++{
++ register_mtd_user(&da850evm_spi_notifier);
++}
++#else
++static void da850_evm_setup_mac_addr(void) { }
++#endif
++
+ static struct mtd_partition da850_evm_norflash_partition[] = {
+ {
+ .name = "NOR filesystem",
+@@ -696,6 +722,8 @@ static __init void da850_evm_init(void)
+ if (ret)
+ pr_warning("da850_evm_init: cpuidle registration failed: %d\n",
+ ret);
++
++ da850_evm_setup_mac_addr();
+ }
+
+ #ifdef CONFIG_SERIAL_8250_CONSOLE
diff --git a/queue-2.6.33/md-fix-handling-for-devices-from-2tb-to-4tb-in-0.90.patch b/queue-2.6.33/md-fix-handling-for-devices-from-2tb-to-4tb-in-0.90.patch
new file mode 100644
index 0000000..e06eb3c
--- /dev/null
+++ b/queue-2.6.33/md-fix-handling-for-devices-from-2tb-to-4tb-in-0.90.patch
@@ -0,0 +1,68 @@
+From 27a7b260f71439c40546b43588448faac01adb93 Mon Sep 17 00:00:00 2001
+From: NeilBrown <neilb@suse.de>
+Date: Sat, 10 Sep 2011 17:21:28 +1000
+Subject: md: Fix handling for devices from 2TB to 4TB in 0.90
+ metadata.
+
+From: NeilBrown <neilb@suse.de>
+
+commit 27a7b260f71439c40546b43588448faac01adb93 upstream.
+
+0.90 metadata uses an unsigned 32bit number to count the number of
+kilobytes used from each device.
+This should allow up to 4TB per device.
+However we multiply this by 2 (to get sectors) before casting to a
+larger type, so sizes above 2TB get truncated.
+
+Also we allow rdev->sectors to be larger than 4TB, so it is possible
+for the array to be resized larger than the metadata can handle.
+So make sure rdev->sectors never exceeds 4TB when 0.90 metadata is in
+used.
+
+Also the sanity check at the end of super_90_load should include level
+1 as it used ->size too. (RAID0 and Linear don't use ->size at all).
+
+Reported-by: Pim Zandbergen <P.Zandbergen@macroscoop.nl>
+Signed-off-by: NeilBrown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/md/md.c | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+--- a/drivers/md/md.c
++++ b/drivers/md/md.c
+@@ -980,8 +980,11 @@ static int super_90_load(mdk_rdev_t *rde
+ ret = 0;
+ }
+ rdev->sectors = rdev->sb_start;
++ /* Limit to 4TB as metadata cannot record more than that */
++ if (rdev->sectors >= (2ULL << 32))
++ rdev->sectors = (2ULL << 32) - 2;
+
+- if (rdev->sectors < sb->size * 2 && sb->level > 1)
++ if (rdev->sectors < ((sector_t)sb->size) * 2 && sb->level >= 1)
+ /* "this cannot possibly happen" ... */
+ ret = -EINVAL;
+
+@@ -1016,7 +1019,7 @@ static int super_90_validate(mddev_t *md
+ mddev->clevel[0] = 0;
+ mddev->layout = sb->layout;
+ mddev->raid_disks = sb->raid_disks;
+- mddev->dev_sectors = sb->size * 2;
++ mddev->dev_sectors = ((sector_t)sb->size) * 2;
+ mddev->events = ev1;
+ mddev->bitmap_info.offset = 0;
+ mddev->bitmap_info.default_offset = MD_SB_BYTES >> 9;
+@@ -1255,6 +1258,11 @@ super_90_rdev_size_change(mdk_rdev_t *rd
+ rdev->sb_start = calc_dev_sboffset(rdev->bdev);
+ if (!num_sectors || num_sectors > rdev->sb_start)
+ num_sectors = rdev->sb_start;
++ /* Limit to 4TB as metadata cannot record more than that.
++ * 4TB == 2^32 KB, or 2*2^32 sectors.
++ */
++ if (num_sectors >= (2ULL << 32))
++ num_sectors = (2ULL << 32) - 2;
+ md_super_write(rdev->mddev, rdev, rdev->sb_start, rdev->sb_size,
+ rdev->sb_page);
+ md_super_wait(rdev->mddev);
diff --git a/queue-2.6.33/series b/queue-2.6.33/series
index ee17f8e..5e79e75 100644
--- a/queue-2.6.33/series
+++ b/queue-2.6.33/series
@@ -11,3 +11,7 @@ gro-fix-merging-a-paged-skb-after-non-paged-skbs.patch
xen-blkfront-fix-data-size-for-xenbus_gather-in-blkfront_connect.patch
md-linear-avoid-corrupting-structure-while-waiting-for.patch
powerpc-pci-check-devices-status-property-when-scanning-of.patch
+xen-x86_32-do-not-enable-iterrupts-when-returning-from.patch
+xen-smp-warn-user-why-they-keel-over-nosmp-or-noapic-and-what-to-use-instead.patch
+arm-davinci-da850-evm-read-mac-address-from-spi-flash.patch
+md-fix-handling-for-devices-from-2tb-to-4tb-in-0.90.patch
diff --git a/queue-2.6.33/xen-smp-warn-user-why-they-keel-over-nosmp-or-noapic-and-what-to-use-instead.patch b/queue-2.6.33/xen-smp-warn-user-why-they-keel-over-nosmp-or-noapic-and-what-to-use-instead.patch
new file mode 100644
index 0000000..d4164ab
--- /dev/null
+++ b/queue-2.6.33/xen-smp-warn-user-why-they-keel-over-nosmp-or-noapic-and-what-to-use-instead.patch
@@ -0,0 +1,52 @@
+From ed467e69f16e6b480e2face7bc5963834d025f91 Mon Sep 17 00:00:00 2001
+From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Date: Thu, 1 Sep 2011 09:48:27 -0400
+Subject: xen/smp: Warn user why they keel over - nosmp or noapic and what to use instead.
+
+From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+
+commit ed467e69f16e6b480e2face7bc5963834d025f91 upstream.
+
+We have hit a couple of customer bugs where they would like to
+use those parameters to run an UP kernel - but both of those
+options turn of important sources of interrupt information so
+we end up not being able to boot. The correct way is to
+pass in 'dom0_max_vcpus=1' on the Xen hypervisor line and
+the kernel will patch itself to be a UP kernel.
+
+Fixes bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637308
+
+Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
+Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/xen/smp.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/arch/x86/xen/smp.c
++++ b/arch/x86/xen/smp.c
+@@ -30,6 +30,7 @@
+ #include <xen/page.h>
+ #include <xen/events.h>
+
++#include <xen/hvc-console.h>
+ #include "xen-ops.h"
+ #include "mmu.h"
+
+@@ -180,6 +181,15 @@ static void __init xen_smp_prepare_cpus(
+ {
+ unsigned cpu;
+
++ if (skip_ioapic_setup) {
++ char *m = (max_cpus == 0) ?
++ "The nosmp parameter is incompatible with Xen; " \
++ "use Xen dom0_max_vcpus=1 parameter" :
++ "The noapic parameter is incompatible with Xen";
++
++ xen_raw_printk(m);
++ panic(m);
++ }
+ xen_init_lock_cpu(0);
+
+ smp_store_cpu_info(0);
diff --git a/queue-2.6.33/xen-x86_32-do-not-enable-iterrupts-when-returning-from.patch b/queue-2.6.33/xen-x86_32-do-not-enable-iterrupts-when-returning-from.patch
new file mode 100644
index 0000000..fae7d41
--- /dev/null
+++ b/queue-2.6.33/xen-x86_32-do-not-enable-iterrupts-when-returning-from.patch
@@ -0,0 +1,58 @@
+From d198d499148a0c64a41b3aba9e7dd43772832b91 Mon Sep 17 00:00:00 2001
+From: Igor Mammedov <imammedo@redhat.com>
+Date: Thu, 1 Sep 2011 13:46:55 +0200
+Subject: xen: x86_32: do not enable iterrupts when returning from
+ exception in interrupt context
+
+From: Igor Mammedov <imammedo@redhat.com>
+
+commit d198d499148a0c64a41b3aba9e7dd43772832b91 upstream.
+
+If vmalloc page_fault happens inside of interrupt handler with interrupts
+disabled then on exit path from exception handler when there is no pending
+interrupts, the following code (arch/x86/xen/xen-asm_32.S:112):
+
+ cmpw $0x0001, XEN_vcpu_info_pending(%eax)
+ sete XEN_vcpu_info_mask(%eax)
+
+will enable interrupts even if they has been previously disabled according to
+eflags from the bounce frame (arch/x86/xen/xen-asm_32.S:99)
+
+ testb $X86_EFLAGS_IF>>8, 8+1+ESP_OFFSET(%esp)
+ setz XEN_vcpu_info_mask(%eax)
+
+Solution is in setting XEN_vcpu_info_mask only when it should be set
+according to
+ cmpw $0x0001, XEN_vcpu_info_pending(%eax)
+but not clearing it if there isn't any pending events.
+
+Reproducer for bug is attached to RHBZ 707552
+
+Signed-off-by: Igor Mammedov <imammedo@redhat.com>
+Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
+Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/xen/xen-asm_32.S | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/arch/x86/xen/xen-asm_32.S
++++ b/arch/x86/xen/xen-asm_32.S
+@@ -113,11 +113,13 @@ xen_iret_start_crit:
+
+ /*
+ * If there's something pending, mask events again so we can
+- * jump back into xen_hypervisor_callback
++ * jump back into xen_hypervisor_callback. Otherwise do not
++ * touch XEN_vcpu_info_mask.
+ */
+- sete XEN_vcpu_info_mask(%eax)
++ jne 1f
++ movb $1, XEN_vcpu_info_mask(%eax)
+
+- popl %eax
++1: popl %eax
+
+ /*
+ * From this point on the registers are restored and the stack