From: Greg Kroah-Hartman Date: Tue, 3 Jul 2012 16:45:43 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.0.37~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=01b38e39aeb061952f51e052c80873c4e5599d7c;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: arm-7438-1-fill-possible-pmd-empty-section-gaps.patch arm-samsung-fix-for-s3c2412-ebi-memory-mapping.patch arm-samsung-should-check-for-is_err-clk-instead-of-null.patch media-smsusb-add-autodetection-support-for-usb-id-2040-f5a0.patch powerpc-kvm-sldi-should-be-sld.patch powerpc-xmon-use-cpumask-iterator-to-avoid-warning.patch --- diff --git a/queue-3.4/arm-7438-1-fill-possible-pmd-empty-section-gaps.patch b/queue-3.4/arm-7438-1-fill-possible-pmd-empty-section-gaps.patch new file mode 100644 index 00000000000..7c58d54df01 --- /dev/null +++ b/queue-3.4/arm-7438-1-fill-possible-pmd-empty-section-gaps.patch @@ -0,0 +1,123 @@ +From 19b52abe3c5d759661500a1dc810924369b2ad46 Mon Sep 17 00:00:00 2001 +From: Nicolas Pitre +Date: Wed, 27 Jun 2012 17:28:57 +0100 +Subject: ARM: 7438/1: fill possible PMD empty section gaps + +From: Nicolas Pitre + +commit 19b52abe3c5d759661500a1dc810924369b2ad46 upstream. + +On ARM with the 2-level page table format, a PMD entry is represented by +two consecutive section entries covering 2MB of virtual space. + +However, static mappings always were allowed to use separate 1MB section +entries. This means in practice that a static mapping may create half +populated PMDs via create_mapping(). + +Since commit 0536bdf33f (ARM: move iotable mappings within the vmalloc +region) those static mappings are located in the vmalloc area. We must +ensure no such half populated PMDs are accessible once vmalloc() or +ioremap() start looking at the vmalloc area for nearby free virtual +address ranges, or various things leading to a kernel crash will happen. + +Signed-off-by: Nicolas Pitre +Reported-by: Santosh Shilimkar +Tested-by: "R, Sricharan" +Reviewed-by: Catalin Marinas +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/mm/mmu.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 74 insertions(+) + +--- a/arch/arm/mm/mmu.c ++++ b/arch/arm/mm/mmu.c +@@ -783,6 +783,79 @@ void __init iotable_init(struct map_desc + } + } + ++#ifndef CONFIG_ARM_LPAE ++ ++/* ++ * The Linux PMD is made of two consecutive section entries covering 2MB ++ * (see definition in include/asm/pgtable-2level.h). However a call to ++ * create_mapping() may optimize static mappings by using individual ++ * 1MB section mappings. This leaves the actual PMD potentially half ++ * initialized if the top or bottom section entry isn't used, leaving it ++ * open to problems if a subsequent ioremap() or vmalloc() tries to use ++ * the virtual space left free by that unused section entry. ++ * ++ * Let's avoid the issue by inserting dummy vm entries covering the unused ++ * PMD halves once the static mappings are in place. ++ */ ++ ++static void __init pmd_empty_section_gap(unsigned long addr) ++{ ++ struct vm_struct *vm; ++ ++ vm = early_alloc_aligned(sizeof(*vm), __alignof__(*vm)); ++ vm->addr = (void *)addr; ++ vm->size = SECTION_SIZE; ++ vm->flags = VM_IOREMAP | VM_ARM_STATIC_MAPPING; ++ vm->caller = pmd_empty_section_gap; ++ vm_area_add_early(vm); ++} ++ ++static void __init fill_pmd_gaps(void) ++{ ++ struct vm_struct *vm; ++ unsigned long addr, next = 0; ++ pmd_t *pmd; ++ ++ /* we're still single threaded hence no lock needed here */ ++ for (vm = vmlist; vm; vm = vm->next) { ++ if (!(vm->flags & VM_ARM_STATIC_MAPPING)) ++ continue; ++ addr = (unsigned long)vm->addr; ++ if (addr < next) ++ continue; ++ ++ /* ++ * Check if this vm starts on an odd section boundary. ++ * If so and the first section entry for this PMD is free ++ * then we block the corresponding virtual address. ++ */ ++ if ((addr & ~PMD_MASK) == SECTION_SIZE) { ++ pmd = pmd_off_k(addr); ++ if (pmd_none(*pmd)) ++ pmd_empty_section_gap(addr & PMD_MASK); ++ } ++ ++ /* ++ * Then check if this vm ends on an odd section boundary. ++ * If so and the second section entry for this PMD is empty ++ * then we block the corresponding virtual address. ++ */ ++ addr += vm->size; ++ if ((addr & ~PMD_MASK) == SECTION_SIZE) { ++ pmd = pmd_off_k(addr) + 1; ++ if (pmd_none(*pmd)) ++ pmd_empty_section_gap(addr); ++ } ++ ++ /* no need to look at any vm entry until we hit the next PMD */ ++ next = (addr + PMD_SIZE - 1) & PMD_MASK; ++ } ++} ++ ++#else ++#define fill_pmd_gaps() do { } while (0) ++#endif ++ + static void * __initdata vmalloc_min = + (void *)(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET); + +@@ -1064,6 +1137,7 @@ static void __init devicemaps_init(struc + */ + if (mdesc->map_io) + mdesc->map_io(); ++ fill_pmd_gaps(); + + /* + * Finally flush the caches and tlb to ensure that we're in a diff --git a/queue-3.4/arm-orion-fix-virtual-physical-mixup-with-watchdog.patch b/queue-3.4/arm-orion-fix-virtual-physical-mixup-with-watchdog.patch deleted file mode 100644 index a9797666e5d..00000000000 --- a/queue-3.4/arm-orion-fix-virtual-physical-mixup-with-watchdog.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 0fa1f0609a0c1fe8b2be3c0089a2cb48f7fda521 Mon Sep 17 00:00:00 2001 -From: Andrew Lunn -Date: Fri, 22 Jun 2012 08:54:02 +0200 -Subject: ARM: Orion: Fix Virtual/Physical mixup with watchdog - -From: Andrew Lunn - -commit 0fa1f0609a0c1fe8b2be3c0089a2cb48f7fda521 upstream. - -The orion watchdog is expecting to be passed the physcial address of -the hardware, and will ioremap() it to give a virtual address it will -use as the base address for the hardware. However, when creating the -platform resource record, a virtual address was being used. - -Add the necassary #define's so we can pass the physical address as -expected. - -Tested on Kirkwood and Orion5x. - -Signed-off-by: Andrew Lunn -Signed-off-by: Olof Johansson -Signed-off-by: Greg Kroah-Hartman - ---- - arch/arm/mach-kirkwood/include/mach/bridge-regs.h | 1 + - arch/arm/mach-kirkwood/include/mach/kirkwood.h | 1 + - arch/arm/mach-orion5x/include/mach/bridge-regs.h | 2 +- - arch/arm/mach-orion5x/include/mach/orion5x.h | 1 + - arch/arm/plat-orion/common.c | 2 +- - 5 files changed, 5 insertions(+), 2 deletions(-) - ---- a/arch/arm/mach-kirkwood/include/mach/bridge-regs.h -+++ b/arch/arm/mach-kirkwood/include/mach/bridge-regs.h -@@ -38,6 +38,7 @@ - #define IRQ_MASK_HIGH_OFF 0x0014 - - #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300) -+#define TIMER_PHYS_BASE (BRIDGE_PHYS_BASE | 0x0300) - - #define L2_CONFIG_REG (BRIDGE_VIRT_BASE | 0x0128) - #define L2_WRITETHROUGH 0x00000010 ---- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h -+++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h -@@ -80,6 +80,7 @@ - #define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100) - - #define BRIDGE_VIRT_BASE (KIRKWOOD_REGS_VIRT_BASE | 0x20000) -+#define BRIDGE_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x20000) - - #define CRYPTO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x30000) - ---- a/arch/arm/mach-orion5x/include/mach/bridge-regs.h -+++ b/arch/arm/mach-orion5x/include/mach/bridge-regs.h -@@ -35,5 +35,5 @@ - #define MAIN_IRQ_MASK (ORION5X_BRIDGE_VIRT_BASE | 0x204) - - #define TIMER_VIRT_BASE (ORION5X_BRIDGE_VIRT_BASE | 0x300) -- -+#define TIMER_PHYS_BASE (ORION5X_BRIDGE_PHYS_BASE | 0x300) - #endif ---- a/arch/arm/mach-orion5x/include/mach/orion5x.h -+++ b/arch/arm/mach-orion5x/include/mach/orion5x.h -@@ -82,6 +82,7 @@ - #define UART1_VIRT_BASE (ORION5X_DEV_BUS_VIRT_BASE | 0x2100) - - #define ORION5X_BRIDGE_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x20000) -+#define ORION5X_BRIDGE_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x20000) - - #define ORION5X_PCI_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x30000) - ---- a/arch/arm/plat-orion/common.c -+++ b/arch/arm/plat-orion/common.c -@@ -570,7 +570,7 @@ void __init orion_spi_1_init(unsigned lo - static struct orion_wdt_platform_data orion_wdt_data; - - static struct resource orion_wdt_resource = -- DEFINE_RES_MEM(TIMER_VIRT_BASE, 0x28); -+ DEFINE_RES_MEM(TIMER_PHYS_BASE, 0x28); - - static struct platform_device orion_wdt_device = { - .name = "orion_wdt", diff --git a/queue-3.4/arm-samsung-fix-for-s3c2412-ebi-memory-mapping.patch b/queue-3.4/arm-samsung-fix-for-s3c2412-ebi-memory-mapping.patch new file mode 100644 index 00000000000..66564f584b8 --- /dev/null +++ b/queue-3.4/arm-samsung-fix-for-s3c2412-ebi-memory-mapping.patch @@ -0,0 +1,34 @@ +From 3dca938656c7b0ff6b0717a5dde0f5f45e592be5 Mon Sep 17 00:00:00 2001 +From: Jose Miguel Goncalves +Date: Sat, 12 May 2012 06:11:49 +0900 +Subject: ARM: SAMSUNG: Fix for S3C2412 EBI memory mapping + +From: Jose Miguel Goncalves + +commit 3dca938656c7b0ff6b0717a5dde0f5f45e592be5 upstream. + +While upgrading the kernel on a S3C2412 based board I've noted +that it was impossible to boot the board with a 2.6.32 or upper +kernel. I've tracked down the problem to the EBI virtual memory +mapping that is in conflict with the IO mapping definition in +arch/arm/mach-s3c24xx/s3c2412.c. + +Signed-off-by: Jose Miguel Goncalves +Signed-off-by: Kukjin Kim +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/plat-samsung/include/plat/map-s3c.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/plat-samsung/include/plat/map-s3c.h ++++ b/arch/arm/plat-samsung/include/plat/map-s3c.h +@@ -22,7 +22,7 @@ + #define S3C24XX_VA_WATCHDOG S3C_VA_WATCHDOG + + #define S3C2412_VA_SSMC S3C_ADDR_CPU(0x00000000) +-#define S3C2412_VA_EBI S3C_ADDR_CPU(0x00010000) ++#define S3C2412_VA_EBI S3C_ADDR_CPU(0x00100000) + + #define S3C2410_PA_UART (0x50000000) + #define S3C24XX_PA_UART S3C2410_PA_UART diff --git a/queue-3.4/arm-samsung-should-check-for-is_err-clk-instead-of-null.patch b/queue-3.4/arm-samsung-should-check-for-is_err-clk-instead-of-null.patch new file mode 100644 index 00000000000..5d5d81f7bcd --- /dev/null +++ b/queue-3.4/arm-samsung-should-check-for-is_err-clk-instead-of-null.patch @@ -0,0 +1,30 @@ +From a5d8f4765f0e92ef027492a8cb979c5b8d45f2c3 Mon Sep 17 00:00:00 2001 +From: Jonghwan Choi +Date: Wed, 20 Jun 2012 17:05:37 +0900 +Subject: ARM: SAMSUNG: Should check for IS_ERR(clk) instead of NULL + +From: Jonghwan Choi + +commit a5d8f4765f0e92ef027492a8cb979c5b8d45f2c3 upstream. + +On the error condition clk_get() returns ERR_PTR(). + +Signed-off-by: Jonghwan Choi +Signed-off-by: Kukjin Kim +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/plat-samsung/include/plat/watchdog-reset.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/plat-samsung/include/plat/watchdog-reset.h ++++ b/arch/arm/plat-samsung/include/plat/watchdog-reset.h +@@ -25,7 +25,7 @@ static inline void arch_wdt_reset(void) + + __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ + +- if (s3c2410_wdtclk) ++ if (!IS_ERR(s3c2410_wdtclk)) + clk_enable(s3c2410_wdtclk); + + /* put initial values into count and data */ diff --git a/queue-3.4/media-smsusb-add-autodetection-support-for-usb-id-2040-f5a0.patch b/queue-3.4/media-smsusb-add-autodetection-support-for-usb-id-2040-f5a0.patch new file mode 100644 index 00000000000..282251d33c9 --- /dev/null +++ b/queue-3.4/media-smsusb-add-autodetection-support-for-usb-id-2040-f5a0.patch @@ -0,0 +1,28 @@ +From 3e1141e2ce5667301a74ca2ef396d9bd5e995f7f Mon Sep 17 00:00:00 2001 +From: Michael Krufky +Date: Fri, 25 May 2012 09:29:12 -0300 +Subject: media: smsusb: add autodetection support for USB ID 2040:f5a0 + +From: Michael Krufky + +commit 3e1141e2ce5667301a74ca2ef396d9bd5e995f7f upstream. + +Signed-off-by: Michael Krufky +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/dvb/siano/smsusb.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/media/dvb/siano/smsusb.c ++++ b/drivers/media/dvb/siano/smsusb.c +@@ -544,6 +544,8 @@ static const struct usb_device_id smsusb + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, + { USB_DEVICE(0x2040, 0xc0a0), + .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, ++ { USB_DEVICE(0x2040, 0xf5a0), ++ .driver_info = SMS1XXX_BOARD_HAUPPAUGE_WINDHAM }, + { } /* Terminating entry */ + }; + diff --git a/queue-3.4/powerpc-kvm-sldi-should-be-sld.patch b/queue-3.4/powerpc-kvm-sldi-should-be-sld.patch new file mode 100644 index 00000000000..f19ab7a21f7 --- /dev/null +++ b/queue-3.4/powerpc-kvm-sldi-should-be-sld.patch @@ -0,0 +1,38 @@ +From 2f584a146a2965b82fce89b8d2f95dc5cfe468d0 Mon Sep 17 00:00:00 2001 +From: Michael Neuling +Date: Mon, 25 Jun 2012 13:33:11 +0000 +Subject: powerpc/kvm: sldi should be sld + +From: Michael Neuling + +commit 2f584a146a2965b82fce89b8d2f95dc5cfe468d0 upstream. + +Since we are taking a registers, this should never have been an sldi. +Talking to paulus offline, this is the correct fix. + +Was introduced by: + commit 19ccb76a1938ab364a412253daec64613acbf3df + Author: Paul Mackerras + Date: Sat Jul 23 17:42:46 2011 +1000 + +Talking to paulus, this shouldn't be a literal. + +Signed-off-by: Michael Neuling +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S ++++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S +@@ -776,7 +776,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_201) + lwz r3,VCORE_NAPPING_THREADS(r5) + lwz r4,VCPU_PTID(r9) + li r0,1 +- sldi r0,r0,r4 ++ sld r0,r0,r4 + andc. r3,r3,r0 /* no sense IPI'ing ourselves */ + beq 43f + mulli r4,r4,PACA_SIZE /* get paca for thread 0 */ diff --git a/queue-3.4/powerpc-xmon-use-cpumask-iterator-to-avoid-warning.patch b/queue-3.4/powerpc-xmon-use-cpumask-iterator-to-avoid-warning.patch new file mode 100644 index 00000000000..286400f7b47 --- /dev/null +++ b/queue-3.4/powerpc-xmon-use-cpumask-iterator-to-avoid-warning.patch @@ -0,0 +1,54 @@ +From bc1d7702910c7c7e88eb60b58429dbfe293683ce Mon Sep 17 00:00:00 2001 +From: Anton Blanchard +Date: Thu, 28 Jun 2012 19:28:57 +0000 +Subject: powerpc/xmon: Use cpumask iterator to avoid warning + +From: Anton Blanchard + +commit bc1d7702910c7c7e88eb60b58429dbfe293683ce upstream. + +We have a bug report where the kernel hits a warning in the cpumask +code: + +WARNING: at include/linux/cpumask.h:107 + +Which is: + WARN_ON_ONCE(cpu >= nr_cpumask_bits); + +The backtrace is: + cpu_cmd + cmds + xmon_core + xmon + die + +xmon is iterating through 0 to NR_CPUS. I'm not sure why we are still +open coding this but iterating above nr_cpu_ids is definitely a bug. + +This patch iterates through all possible cpus, in case we issue a +system reset and CPUs in an offline state call in. + +Perhaps the old code was trying to handle CPUs that were in the +partition but were never started (eg kexec into a kernel with an +nr_cpus= boot option). They are going to die way before we get into +xmon since we haven't set any kernel state up for them. + +Signed-off-by: Anton Blanchard +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/xmon/xmon.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/powerpc/xmon/xmon.c ++++ b/arch/powerpc/xmon/xmon.c +@@ -971,7 +971,7 @@ static int cpu_cmd(void) + /* print cpus waiting or in xmon */ + printf("cpus stopped:"); + count = 0; +- for (cpu = 0; cpu < NR_CPUS; ++cpu) { ++ for_each_possible_cpu(cpu) { + if (cpumask_test_cpu(cpu, &cpus_in_xmon)) { + if (count == 0) + printf(" %x", cpu); diff --git a/queue-3.4/series b/queue-3.4/series index f0f19af1ac5..168b3f93818 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -1,5 +1,4 @@ tools-hv-verify-origin-of-netlink-connector-message.patch -arm-orion-fix-virtual-physical-mixup-with-watchdog.patch arm-tegra-make-tegra_cpu_reset_handler_enable-__init.patch alsa-hda-add-realtek-alc280-codec-support.patch alsa-hda-fix-memory-leaks-at-module-unload.patch @@ -8,3 +7,9 @@ powerpc-ftrace-do-not-trace-restore_interrupts.patch powerpc-fix-uninitialised-error-in-numa.c.patch powerpc-pseries-fix-software-invalidate-tce.patch powerpc-check_and_cede_processor-never-cedes.patch +arm-samsung-fix-for-s3c2412-ebi-memory-mapping.patch +arm-samsung-should-check-for-is_err-clk-instead-of-null.patch +arm-7438-1-fill-possible-pmd-empty-section-gaps.patch +powerpc-kvm-sldi-should-be-sld.patch +powerpc-xmon-use-cpumask-iterator-to-avoid-warning.patch +media-smsusb-add-autodetection-support-for-usb-id-2040-f5a0.patch