--- /dev/null
+From e787ec1376e862fcea1bfd523feb7c5fb43ecdb9 Mon Sep 17 00:00:00 2001
+From: Tim Bird <tim.bird@am.sony.com>
+Date: Wed, 2 May 2012 22:55:39 +0100
+Subject: ARM: 7410/1: Add extra clobber registers for assembly in kernel_execve
+
+From: Tim Bird <tim.bird@am.sony.com>
+
+commit e787ec1376e862fcea1bfd523feb7c5fb43ecdb9 upstream.
+
+The inline assembly in kernel_execve() uses r8 and r9. Since this
+code sequence does not return, it usually doesn't matter if the
+register clobber list is accurate. However, I saw a case where a
+particular version of gcc used r8 as an intermediate for the value
+eventually passed to r9. Because r8 is used in the inline
+assembly, and not mentioned in the clobber list, r9 was set
+to an incorrect value.
+
+This resulted in a kernel panic on execution of the first user-space
+program in the system. r9 is used in ret_to_user as the thread_info
+pointer, and if it's wrong, bad things happen.
+
+Signed-off-by: Tim Bird <tim.bird@am.sony.com>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/kernel/sys_arm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/kernel/sys_arm.c
++++ b/arch/arm/kernel/sys_arm.c
+@@ -115,7 +115,7 @@ int kernel_execve(const char *filename,
+ "Ir" (THREAD_START_SP - sizeof(regs)),
+ "r" (®s),
+ "Ir" (sizeof(regs))
+- : "r0", "r1", "r2", "r3", "ip", "lr", "memory");
++ : "r0", "r1", "r2", "r3", "r8", "r9", "ip", "lr", "memory");
+
+ out:
+ return ret;
--- /dev/null
+From 6a68b6f574c8ad2c1d90f0db8fd95b8abe8a0a73 Mon Sep 17 00:00:00 2001
+From: Will Deacon <will.deacon@arm.com>
+Date: Fri, 4 May 2012 17:52:02 +0100
+Subject: ARM: 7411/1: audit: fix treatment of saved ip register during syscall tracing
+
+From: Will Deacon <will.deacon@arm.com>
+
+commit 6a68b6f574c8ad2c1d90f0db8fd95b8abe8a0a73 upstream.
+
+The ARM audit code incorrectly uses the saved application ip register
+value to infer syscall entry or exit. Additionally, the saved value will
+be clobbered if the current task is not being traced, which can lead to
+libc corruption if ip is live (apparently glibc uses it for the TLS
+pointer).
+
+This patch fixes the syscall tracing code so that the why parameter is
+used to infer the syscall direction and the saved ip is only updated if
+we know that we will be signalling a ptrace trap.
+
+Reported-and-Tested-by: Jon Masters <jcm@jonmasters.org>
+
+Cc: Eric Paris <eparis@redhat.com>
+Signed-off-by: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/kernel/ptrace.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+--- a/arch/arm/kernel/ptrace.c
++++ b/arch/arm/kernel/ptrace.c
+@@ -915,14 +915,7 @@ asmlinkage int syscall_trace(int why, st
+ {
+ unsigned long ip;
+
+- /*
+- * Save IP. IP is used to denote syscall entry/exit:
+- * IP = 0 -> entry, = 1 -> exit
+- */
+- ip = regs->ARM_ip;
+- regs->ARM_ip = why;
+-
+- if (!ip)
++ if (why)
+ audit_syscall_exit(regs);
+ else
+ audit_syscall_entry(AUDIT_ARCH_NR, scno, regs->ARM_r0,
+@@ -935,6 +928,13 @@ asmlinkage int syscall_trace(int why, st
+
+ current_thread_info()->syscall = scno;
+
++ /*
++ * IP is used to denote syscall entry/exit:
++ * IP = 0 -> entry, =1 -> exit
++ */
++ ip = regs->ARM_ip;
++ regs->ARM_ip = why;
++
+ /* the 0x80 provides a way for the tracing parent to distinguish
+ between a syscall stop and SIGTRAP delivery */
+ ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
--- /dev/null
+From 2f978366984a418f38fcf44137be1fbc5a89cfd9 Mon Sep 17 00:00:00 2001
+From: Will Deacon <will.deacon@arm.com>
+Date: Fri, 4 May 2012 17:53:52 +0100
+Subject: ARM: 7412/1: audit: use only AUDIT_ARCH_ARM regardless of endianness
+
+From: Will Deacon <will.deacon@arm.com>
+
+commit 2f978366984a418f38fcf44137be1fbc5a89cfd9 upstream.
+
+The machine endianness has no direct correspondence to the syscall ABI,
+so use only AUDIT_ARCH_ARM when identifying the ABI to the audit tools
+in userspace.
+
+Signed-off-by: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/kernel/ptrace.c | 8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+--- a/arch/arm/kernel/ptrace.c
++++ b/arch/arm/kernel/ptrace.c
+@@ -905,12 +905,6 @@ long arch_ptrace(struct task_struct *chi
+ return ret;
+ }
+
+-#ifdef __ARMEB__
+-#define AUDIT_ARCH_NR AUDIT_ARCH_ARMEB
+-#else
+-#define AUDIT_ARCH_NR AUDIT_ARCH_ARM
+-#endif
+-
+ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno)
+ {
+ unsigned long ip;
+@@ -918,7 +912,7 @@ asmlinkage int syscall_trace(int why, st
+ if (why)
+ audit_syscall_exit(regs);
+ else
+- audit_syscall_entry(AUDIT_ARCH_NR, scno, regs->ARM_r0,
++ audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0,
+ regs->ARM_r1, regs->ARM_r2, regs->ARM_r3);
+
+ if (!test_thread_flag(TIF_SYSCALL_TRACE))
--- /dev/null
+From fde165b2a29673aabf18ceff14dea1f1cfb0daad Mon Sep 17 00:00:00 2001
+From: Colin Cross <ccross@android.com>
+Date: Sat, 5 May 2012 20:58:13 +0100
+Subject: ARM: 7414/1: SMP: prevent use of the console when using idmap_pgd
+
+From: Colin Cross <ccross@android.com>
+
+commit fde165b2a29673aabf18ceff14dea1f1cfb0daad upstream.
+
+Commit 4e8ee7de227e3ab9a72040b448ad728c5428a042 (ARM: SMP: use
+idmap_pgd for mapping MMU enable during secondary booting)
+switched secondary boot to use idmap_pgd, which is initialized
+during early_initcall, instead of a page table initialized during
+__cpu_up. This causes idmap_pgd to contain the static mappings
+but be missing all dynamic mappings.
+
+If a console is registered that creates a dynamic mapping, the
+printk in secondary_start_kernel will trigger a data abort on
+the missing mapping before the exception handlers have been
+initialized, leading to a hang. Initial boot is not affected
+because no consoles have been registered, and resume is usually
+not affected because the offending console is suspended.
+Onlining a cpu with hotplug triggers the problem.
+
+A workaround is to the printk in secondary_start_kernel until
+after the page tables have been switched back to init_mm.
+
+Signed-off-by: Colin Cross <ccross@android.com>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/kernel/smp.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/kernel/smp.c
++++ b/arch/arm/kernel/smp.c
+@@ -255,8 +255,6 @@ asmlinkage void __cpuinit secondary_star
+ struct mm_struct *mm = &init_mm;
+ unsigned int cpu = smp_processor_id();
+
+- printk("CPU%u: Booted secondary processor\n", cpu);
+-
+ /*
+ * All kernel threads share the same mm context; grab a
+ * reference and switch to it.
+@@ -268,6 +266,8 @@ asmlinkage void __cpuinit secondary_star
+ enter_lazy_tlb(mm, current);
+ local_flush_tlb_all();
+
++ printk("CPU%u: Booted secondary processor\n", cpu);
++
+ cpu_init();
+ preempt_disable();
+ trace_hardirqs_off();
--- /dev/null
+From f5c2347ee20a8d6964d6a6b1ad04f200f8d4dfa7 Mon Sep 17 00:00:00 2001
+From: "H. Peter Anvin" <hpa@linux.intel.com>
+Date: Thu, 26 Apr 2012 11:45:16 -0700
+Subject: asm-generic: Use __BITS_PER_LONG in statfs.h
+
+From: "H. Peter Anvin" <hpa@linux.intel.com>
+
+commit f5c2347ee20a8d6964d6a6b1ad04f200f8d4dfa7 upstream.
+
+<asm-generic/statfs.h> is exported to userspace, so using
+BITS_PER_LONG is invalid. We need to use __BITS_PER_LONG instead.
+
+This is kernel bugzilla 43165.
+
+Reported-by: H.J. Lu <hjl.tools@gmail.com>
+Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
+Link: http://lkml.kernel.org/r/1335465916-16965-1-git-send-email-hpa@linux.intel.com
+Acked-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/asm-generic/statfs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/asm-generic/statfs.h
++++ b/include/asm-generic/statfs.h
+@@ -15,7 +15,7 @@ typedef __kernel_fsid_t fsid_t;
+ * with a 10' pole.
+ */
+ #ifndef __statfs_word
+-#if BITS_PER_LONG == 64
++#if __BITS_PER_LONG == 64
+ #define __statfs_word long
+ #else
+ #define __statfs_word __u32
--- /dev/null
+From c34ce320d9fe328e3272def20b152f39ccfa045e Mon Sep 17 00:00:00 2001
+From: Richard Zhao <richard.zhao@freescale.com>
+Date: Tue, 24 Apr 2012 15:24:43 +0800
+Subject: ASoC: core: check of_property_count_strings failure
+
+From: Richard Zhao <richard.zhao@freescale.com>
+
+commit c34ce320d9fe328e3272def20b152f39ccfa045e upstream.
+
+Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/soc-core.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/sound/soc/soc-core.c
++++ b/sound/soc/soc-core.c
+@@ -3420,10 +3420,10 @@ int snd_soc_of_parse_audio_routing(struc
+ int i, ret;
+
+ num_routes = of_property_count_strings(np, propname);
+- if (num_routes & 1) {
++ if (num_routes < 0 || num_routes & 1) {
+ dev_err(card->dev,
+- "Property '%s's length is not even\n",
+- propname);
++ "Property '%s' does not exist or its length is not even\n",
++ propname);
+ return -EINVAL;
+ }
+ num_routes /= 2;
--- /dev/null
+From e875c1e3e758447ba81ca450d89434b3b0496d37 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Eric=20B=C3=A9nard?= <eric@eukrea.com>
+Date: Sun, 29 Apr 2012 17:37:57 +0200
+Subject: ASoC: tlv312aic23: unbreak resume
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Eric Bénard <eric@eukrea.com>
+
+commit e875c1e3e758447ba81ca450d89434b3b0496d37 upstream.
+
+* commit f9dfbf9 "ASoC: tlv320aic23: convert to soc-cache" leads to
+a bug preventing resumeof the codec as regmap expects a 9 bits data
+register but 0xFFFF is passed in tlv320aic23_set_bias_level and this
+values gets cached preventing any write to the TLV320AIC23_PWR
+register as the final value produced by regmap is (register << 9) | value
+
+* this patch solves the problem by only working on the 9 bits the
+register contains.
+
+Signed-off-by: Eric Bénard <eric@eukrea.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/codecs/tlv320aic23.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/sound/soc/codecs/tlv320aic23.c
++++ b/sound/soc/codecs/tlv320aic23.c
+@@ -472,7 +472,7 @@ static int tlv320aic23_set_dai_sysclk(st
+ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec,
+ enum snd_soc_bias_level level)
+ {
+- u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0xff7f;
++ u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0x17f;
+
+ switch (level) {
+ case SND_SOC_BIAS_ON:
+@@ -491,7 +491,7 @@ static int tlv320aic23_set_bias_level(st
+ case SND_SOC_BIAS_OFF:
+ /* everything off, dac mute, inactive */
+ snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0);
+- snd_soc_write(codec, TLV320AIC23_PWR, 0xffff);
++ snd_soc_write(codec, TLV320AIC23_PWR, 0x1ff);
+ break;
+ }
+ codec->dapm.bias_level = level;
--- /dev/null
+From 768b107e4b3be0acf6f58e914afe4f337c00932b Mon Sep 17 00:00:00 2001
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+Date: Fri, 4 May 2012 11:29:56 +0200
+Subject: drm/i915: disable sdvo hotplug on i945g/gm
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+
+commit 768b107e4b3be0acf6f58e914afe4f337c00932b upstream.
+
+Chris Wilson dug out a hw erratum saying that there's noise on the
+interrupt line on i945G chips. We also have a bug report from a i945GM
+chip with an sdvo hotplug interrupt storm (and no apparent cause).
+
+Play it safe and disable sdvo hotplug on all i945 variants.
+
+Note that this is a regression that has been introduced in 3.1,
+when we've enabled sdvo hotplug support with
+
+commit cc68c81aed7d892deaf12d720d5455208e94cd0a
+Author: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
+Date: Wed Sep 21 17:13:30 2011 +0100
+
+ drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI
+
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=38442
+Reported-and-tested-by: Dominik Köppl <dominik@devwork.org>
+Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_sdvo.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/gpu/drm/i915/intel_sdvo.c
++++ b/drivers/gpu/drm/i915/intel_sdvo.c
+@@ -1221,8 +1221,14 @@ static bool intel_sdvo_get_capabilities(
+
+ static int intel_sdvo_supports_hotplug(struct intel_sdvo *intel_sdvo)
+ {
++ struct drm_device *dev = intel_sdvo->base.base.dev;
+ u8 response[2];
+
++ /* HW Erratum: SDVO Hotplug is broken on all i945G chips, there's noise
++ * on the line. */
++ if (IS_I945G(dev) || IS_I945GM(dev))
++ return false;
++
+ return intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_HOT_PLUG_SUPPORT,
+ &response, 2) && response[0];
+ }
--- /dev/null
+From 2e7a44814d802c8ba479164b8924070cd908d6b5 Mon Sep 17 00:00:00 2001
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+Date: Sun, 6 May 2012 16:50:24 +0200
+Subject: drm/i915: Do no set Stencil Cache eviction LRA w/a on gen7+
+
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+
+commit 2e7a44814d802c8ba479164b8924070cd908d6b5 upstream.
+
+I've flagged this while reviewing the first version and Ken Graunke
+fixed it up in v2, but unfortunately Dave Airlie picked up the wrong
+version.
+
+Cc: Dave Airlie <airlied@redhat.com>
+Cc: Kenneth Graunke <kenneth@whitecape.org>
+Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_ringbuffer.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
++++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
+@@ -414,10 +414,8 @@ static int init_render_ring(struct intel
+ return ret;
+ }
+
+- if (INTEL_INFO(dev)->gen >= 6) {
+- I915_WRITE(INSTPM,
+- INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING);
+
++ if (IS_GEN6(dev)) {
+ /* From the Sandybridge PRM, volume 1 part 3, page 24:
+ * "If this bit is set, STCunit will have LRA as replacement
+ * policy. [...] This bit must be reset. LRA replacement
+@@ -427,6 +425,11 @@ static int init_render_ring(struct intel
+ CM0_STC_EVICT_DISABLE_LRA_SNB << CM0_MASK_SHIFT);
+ }
+
++ if (INTEL_INFO(dev)->gen >= 6) {
++ I915_WRITE(INSTPM,
++ INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING);
++ }
++
+ return ret;
+ }
+
--- /dev/null
+From 2f624278626677bfaf73fef97f86b37981621f5c Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Fri, 4 May 2012 14:46:02 -0700
+Subject: Fix __read_seqcount_begin() to use ACCESS_ONCE for sequence value read
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit 2f624278626677bfaf73fef97f86b37981621f5c upstream.
+
+We really need to use a ACCESS_ONCE() on the sequence value read in
+__read_seqcount_begin(), because otherwise the compiler might end up
+reloading the value in between the test and the return of it. As a
+result, it might end up returning an odd value (which means that a write
+is in progress).
+
+If the reader is then fast enough that that odd value is still the
+current one when the read_seqcount_retry() is done, we might end up with
+a "successful" read sequence, even despite the concurrent write being
+active.
+
+In practice this probably never really happens - there just isn't
+anything else going on around the read of the sequence count, and the
+common case is that we end up having a read barrier immediately
+afterwards.
+
+So the code sequence in which gcc might decide to reaload from memory is
+small, and there's no reason to believe it would ever actually do the
+reload. But if the compiler ever were to decide to do so, it would be
+incredibly annoying to debug. Let's just make sure.
+
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/seqlock.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/linux/seqlock.h
++++ b/include/linux/seqlock.h
+@@ -141,7 +141,7 @@ static inline unsigned __read_seqcount_b
+ unsigned ret;
+
+ repeat:
+- ret = s->sequence;
++ ret = ACCESS_ONCE(s->sequence);
+ if (unlikely(ret & 1)) {
+ cpu_relax();
+ goto repeat;
--- /dev/null
+From d8f2799b105a24bb0bbd3380a0d56e6348484058 Mon Sep 17 00:00:00 2001
+From: Stefan Metzmacher <metze@samba.org>
+Date: Fri, 4 May 2012 00:19:28 +0200
+Subject: fs/cifs: fix parsing of dfs referrals
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Stefan Metzmacher <metze@samba.org>
+
+commit d8f2799b105a24bb0bbd3380a0d56e6348484058 upstream.
+
+The problem was that the first referral was parsed more than once
+and so the caller tried the same referrals multiple times.
+
+The problem was introduced partly by commit
+066ce6899484d9026acd6ba3a8dbbedb33d7ae1b,
+where 'ref += le16_to_cpu(ref->Size);' got lost,
+but that was also wrong...
+
+Signed-off-by: Stefan Metzmacher <metze@samba.org>
+Tested-by: Björn Jacke <bj@sernet.de>
+Reviewed-by: Jeff Layton <jlayton@redhat.com>
+Signed-off-by: Steve French <sfrench@us.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/cifs/cifssmb.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/fs/cifs/cifssmb.c
++++ b/fs/cifs/cifssmb.c
+@@ -4831,8 +4831,12 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS
+ max_len = data_end - temp;
+ node->node_name = cifs_strndup_from_utf16(temp, max_len,
+ is_unicode, nls_codepage);
+- if (!node->node_name)
++ if (!node->node_name) {
+ rc = -ENOMEM;
++ goto parse_DFS_referrals_exit;
++ }
++
++ ref++;
+ }
+
+ parse_DFS_referrals_exit:
--- /dev/null
+From d5e28005a1d2e67833852f4c9ea8ec206ea3ff85 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <tj@kernel.org>
+Date: Fri, 27 Apr 2012 10:54:35 -0700
+Subject: percpu, x86: don't use PMD_SIZE as embedded atom_size on 32bit
+
+From: Tejun Heo <tj@kernel.org>
+
+commit d5e28005a1d2e67833852f4c9ea8ec206ea3ff85 upstream.
+
+With the embed percpu first chunk allocator, x86 uses either PAGE_SIZE
+or PMD_SIZE for atom_size. PMD_SIZE is used when CPU supports PSE so
+that percpu areas are aligned to PMD mappings and possibly allow using
+PMD mappings in vmalloc areas in the future. Using larger atom_size
+doesn't waste actual memory; however, it does require larger vmalloc
+space allocation later on for !first chunks.
+
+With reasonably sized vmalloc area, PMD_SIZE shouldn't be a problem
+but x86_32 at this point is anything but reasonable in terms of
+address space and using larger atom_size reportedly leads to frequent
+percpu allocation failures on certain setups.
+
+As there is no reason to not use PMD_SIZE on x86_64 as vmalloc space
+is aplenty and most x86_64 configurations support PSE, fix the issue
+by always using PMD_SIZE on x86_64 and PAGE_SIZE on x86_32.
+
+v2: drop cpu_has_pse test and make x86_64 always use PMD_SIZE and
+ x86_32 PAGE_SIZE as suggested by hpa.
+
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Reported-by: Yanmin Zhang <yanmin.zhang@intel.com>
+Reported-by: ShuoX Liu <shuox.liu@intel.com>
+Acked-by: H. Peter Anvin <hpa@zytor.com>
+LKML-Reference: <4F97BA98.6010001@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/setup_percpu.c | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+--- a/arch/x86/kernel/setup_percpu.c
++++ b/arch/x86/kernel/setup_percpu.c
+@@ -185,10 +185,22 @@ void __init setup_per_cpu_areas(void)
+ #endif
+ rc = -EINVAL;
+ if (pcpu_chosen_fc != PCPU_FC_PAGE) {
+- const size_t atom_size = cpu_has_pse ? PMD_SIZE : PAGE_SIZE;
+ const size_t dyn_size = PERCPU_MODULE_RESERVE +
+ PERCPU_DYNAMIC_RESERVE - PERCPU_FIRST_CHUNK_RESERVE;
++ size_t atom_size;
+
++ /*
++ * On 64bit, use PMD_SIZE for atom_size so that embedded
++ * percpu areas are aligned to PMD. This, in the future,
++ * can also allow using PMD mappings in vmalloc area. Use
++ * PAGE_SIZE on 32bit as vmalloc space is highly contended
++ * and large vmalloc area allocs can easily fail.
++ */
++#ifdef CONFIG_X86_64
++ atom_size = PMD_SIZE;
++#else
++ atom_size = PAGE_SIZE;
++#endif
+ rc = pcpu_embed_first_chunk(PERCPU_FIRST_CHUNK_RESERVE,
+ dyn_size, atom_size,
+ pcpu_cpu_distance,
e1000-fix-vlan-processing-regression.patch
xen-pte-fix-crashes-when-trying-to-see-non-existent-pgd-pmd-pud-ptes.patch
xen-pci-don-t-use-pci-bios-service-for-configuration-space-accesses.patch
+drm-i915-disable-sdvo-hotplug-on-i945g-gm.patch
+drm-i915-do-no-set-stencil-cache-eviction-lra-w-a-on-gen7.patch
+asoc-core-check-of_property_count_strings-failure.patch
+asoc-tlv312aic23-unbreak-resume.patch
+fs-cifs-fix-parsing-of-dfs-referrals.patch
+x86-relocs-remove-an-unused-variable.patch
+percpu-x86-don-t-use-pmd_size-as-embedded-atom_size-on-32bit.patch
+asm-generic-use-__bits_per_long-in-statfs.h.patch
+fix-__read_seqcount_begin-to-use-access_once-for-sequence-value-read.patch
+arm-7410-1-add-extra-clobber-registers-for-assembly-in-kernel_execve.patch
+arm-7411-1-audit-fix-treatment-of-saved-ip-register-during-syscall-tracing.patch
+arm-7412-1-audit-use-only-audit_arch_arm-regardless-of-endianness.patch
+arm-7414-1-smp-prevent-use-of-the-console-when-using-idmap_pgd.patch
--- /dev/null
+From 7c77cda0fe742ed07622827ce80963bbeebd1e3f Mon Sep 17 00:00:00 2001
+From: Kusanagi Kouichi <slash@ac.auone-net.jp>
+Date: Sun, 1 Apr 2012 17:29:32 +0900
+Subject: x86, relocs: Remove an unused variable
+
+From: Kusanagi Kouichi <slash@ac.auone-net.jp>
+
+commit 7c77cda0fe742ed07622827ce80963bbeebd1e3f upstream.
+
+sh_symtab is set but not used.
+
+[ hpa: putting this in urgent because of the sheer harmlessness of the patch:
+ it quiets a build warning but does not change any generated code. ]
+
+Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
+Link: http://lkml.kernel.org/r/20120401082932.D5E066FC03D@msa105.auone-net.jp
+Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/boot/compressed/relocs.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/arch/x86/boot/compressed/relocs.c
++++ b/arch/x86/boot/compressed/relocs.c
+@@ -402,13 +402,11 @@ static void print_absolute_symbols(void)
+ for (i = 0; i < ehdr.e_shnum; i++) {
+ struct section *sec = &secs[i];
+ char *sym_strtab;
+- Elf32_Sym *sh_symtab;
+ int j;
+
+ if (sec->shdr.sh_type != SHT_SYMTAB) {
+ continue;
+ }
+- sh_symtab = sec->symtab;
+ sym_strtab = sec->link->strtab;
+ for (j = 0; j < sec->shdr.sh_size/sizeof(Elf32_Sym); j++) {
+ Elf32_Sym *sym;