--- /dev/null
+From a5dc4f898c2a0f66e2cefada6c687db82ba2fcbc Mon Sep 17 00:00:00 2001
+From: Alexey Starikovskiy <astarikovskiy@suse.de>
+Date: Thu, 9 Dec 2010 17:07:54 -0500
+Subject: ACPI: EC: Add another dmi match entry for MSI hardware
+
+From: Alexey Starikovskiy <astarikovskiy@suse.de>
+
+commit a5dc4f898c2a0f66e2cefada6c687db82ba2fcbc upstream.
+
+http://bugzilla.kernel.org/show_bug.cgi?id=15418
+
+Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/acpi/ec.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/acpi/ec.c
++++ b/drivers/acpi/ec.c
+@@ -929,6 +929,9 @@ static struct dmi_system_id __initdata e
+ ec_flag_msi, "MSI hardware", {
+ DMI_MATCH(DMI_CHASSIS_VENDOR, "MICRO-Star")}, NULL},
+ {
++ ec_flag_msi, "MSI hardware", {
++ DMI_MATCH(DMI_CHASSIS_VENDOR, "MICRO-STAR")}, NULL},
++ {
+ ec_validate_ecdt, "ASUS hardware", {
+ DMI_MATCH(DMI_BIOS_VENDOR, "ASUS") }, NULL},
+ {},
--- /dev/null
+From 8df3fc981dc12d9fdcaef4100a2193b605024d7a Mon Sep 17 00:00:00 2001
+From: Bob Moore <robert.moore@intel.com>
+Date: Sat, 23 Oct 2010 01:36:40 -0400
+Subject: ACPICA: Fix Scope() op in module level code
+
+From: Bob Moore <robert.moore@intel.com>
+
+commit 8df3fc981dc12d9fdcaef4100a2193b605024d7a upstream.
+
+Some Panasonic Toughbooks create nodes in module level code.
+Module level code is the executable AML code outside of control method,
+for example, below AML code creates a node \_SB.PCI0.GFX0.DD02.CUBL
+
+ If (\_OSI ("Windows 2006"))
+ {
+ Scope (\_SB.PCI0.GFX0.DD02)
+ {
+ Name (CUBL, Ones)
+ ...
+ }
+ }
+
+Scope() op does not actually create a new object, it refers to an
+existing object(\_SB.PCI0.GFX0.DD02 in above example). However, for
+Scope(), we want to indeed open a new scope, so the child nodes(CUBL in
+above example) can be created correctly under it.
+
+https://bugzilla.kernel.org/show_bug.cgi?id=19462
+
+Signed-off-by: Bob Moore <robert.moore@intel.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/dswexec.c | 19 +++++++++++++++++--
+ 1 file changed, 17 insertions(+), 2 deletions(-)
+
+--- a/drivers/acpi/acpica/dswexec.c
++++ b/drivers/acpi/acpica/dswexec.c
+@@ -300,10 +300,25 @@ acpi_ds_exec_begin_op(struct acpi_walk_s
+ * we must enter this object into the namespace. The created
+ * object is temporary and will be deleted upon completion of
+ * the execution of this method.
++ *
++ * Note 10/2010: Except for the Scope() op. This opcode does
++ * not actually create a new object, it refers to an existing
++ * object. However, for Scope(), we want to indeed open a
++ * new scope.
+ */
+- status = acpi_ds_load2_begin_op(walk_state, NULL);
++ if (op->common.aml_opcode != AML_SCOPE_OP) {
++ status =
++ acpi_ds_load2_begin_op(walk_state, NULL);
++ } else {
++ status =
++ acpi_ds_scope_stack_push(op->named.node,
++ op->named.node->
++ type, walk_state);
++ if (ACPI_FAILURE(status)) {
++ return_ACPI_STATUS(status);
++ }
++ }
+ }
+-
+ break;
+
+ case AML_CLASS_EXECUTE:
--- /dev/null
+From a2ae4cc9a16e211c8a128ba10d22a85431f093ab Mon Sep 17 00:00:00 2001
+From: Eric Paris <eparis@redhat.com>
+Date: Tue, 23 Nov 2010 18:18:37 -0500
+Subject: inotify: stop kernel memory leak on file creation failure
+
+From: Eric Paris <eparis@redhat.com>
+
+commit a2ae4cc9a16e211c8a128ba10d22a85431f093ab upstream.
+
+If inotify_init is unable to allocate a new file for the new inotify
+group we leak the new group. This patch drops the reference on the
+group on file allocation failure.
+
+Reported-by: Vegard Nossum <vegard.nossum@gmail.com>
+Signed-off-by: Eric Paris <eparis@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/notify/inotify/inotify_user.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/fs/notify/inotify/inotify_user.c
++++ b/fs/notify/inotify/inotify_user.c
+@@ -751,6 +751,7 @@ SYSCALL_DEFINE1(inotify_init1, int, flag
+ if (ret >= 0)
+ return ret;
+
++ fsnotify_put_group(group);
+ atomic_dec(&user->inotify_devs);
+ out_free_uid:
+ free_uid(user);
--- /dev/null
+From fe749aab1d21cbb4d87527a7df8799583c233496 Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+Date: Thu, 4 Nov 2010 23:25:56 +0100
+Subject: MIPS: jz4740: qi_lb60: Fix gpio for the 6th row of the keyboard matrix
+
+From: Lars-Peter Clausen <lars@metafoo.de>
+
+commit fe749aab1d21cbb4d87527a7df8799583c233496 upstream.
+
+This patch fixes the gpio number for the 6th row of the keyboard matrix.
+
+(And fixes a typo in my name...)
+
+Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
+Cc: linux-mips@linux-mips.org
+Signed-off-by: https://patchwork.linux-mips.org/patch/1754/
+Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/mips/jz4740/board-qi_lb60.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/mips/jz4740/board-qi_lb60.c
++++ b/arch/mips/jz4740/board-qi_lb60.c
+@@ -5,7 +5,7 @@
+ *
+ * Copyright (c) 2009 Qi Hardware inc.,
+ * Author: Xiangfu Liu <xiangfu@qi-hardware.com>
+- * Copyright 2010, Lars-Petrer Clausen <lars@metafoo.de>
++ * Copyright 2010, Lars-Peter Clausen <lars@metafoo.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 or later
+@@ -235,7 +235,7 @@ static const unsigned int qi_lb60_keypad
+ QI_LB60_GPIO_KEYIN(3),
+ QI_LB60_GPIO_KEYIN(4),
+ QI_LB60_GPIO_KEYIN(5),
+- QI_LB60_GPIO_KEYIN(7),
++ QI_LB60_GPIO_KEYIN(6),
+ QI_LB60_GPIO_KEYIN8,
+ };
+
--- /dev/null
+From ab838338a2a9e0cb8346eb0cab9977be13e8dce5 Mon Sep 17 00:00:00 2001
+From: Andy Lutomirski <luto@mit.edu>
+Date: Tue, 16 Nov 2010 18:40:52 -0500
+Subject: nouveau: Acknowledge HPD irq in handler, not bottom half
+
+From: Andy Lutomirski <luto@mit.edu>
+
+commit ab838338a2a9e0cb8346eb0cab9977be13e8dce5 upstream.
+
+The old code generated an interrupt storm bad enough to completely
+take down my system.
+
+Signed-off-by: Andy Lutomirski <luto@mit.edu>
+Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/gpu/drm/nouveau/nouveau_drv.h | 6 +++++
+ drivers/gpu/drm/nouveau/nouveau_irq.c | 1
+ drivers/gpu/drm/nouveau/nv50_display.c | 35 ++++++++++++++++++++++++---------
+ 3 files changed, 33 insertions(+), 9 deletions(-)
+
+--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
++++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
+@@ -531,6 +531,12 @@ struct drm_nouveau_private {
+ struct work_struct irq_work;
+ struct work_struct hpd_work;
+
++ struct {
++ spinlock_t lock;
++ uint32_t hpd0_bits;
++ uint32_t hpd1_bits;
++ } hpd_state;
++
+ struct list_head vbl_waiting;
+
+ struct {
+--- a/drivers/gpu/drm/nouveau/nouveau_irq.c
++++ b/drivers/gpu/drm/nouveau/nouveau_irq.c
+@@ -52,6 +52,7 @@ nouveau_irq_preinstall(struct drm_device
+ if (dev_priv->card_type >= NV_50) {
+ INIT_WORK(&dev_priv->irq_work, nv50_display_irq_handler_bh);
+ INIT_WORK(&dev_priv->hpd_work, nv50_display_irq_hotplug_bh);
++ spin_lock_init(&dev_priv->hpd_state.lock);
+ INIT_LIST_HEAD(&dev_priv->vbl_waiting);
+ }
+ }
+--- a/drivers/gpu/drm/nouveau/nv50_display.c
++++ b/drivers/gpu/drm/nouveau/nv50_display.c
+@@ -1012,11 +1012,18 @@ nv50_display_irq_hotplug_bh(struct work_
+ struct drm_connector *connector;
+ const uint32_t gpio_reg[4] = { 0xe104, 0xe108, 0xe280, 0xe284 };
+ uint32_t unplug_mask, plug_mask, change_mask;
+- uint32_t hpd0, hpd1 = 0;
++ uint32_t hpd0, hpd1;
+
+- hpd0 = nv_rd32(dev, 0xe054) & nv_rd32(dev, 0xe050);
++ spin_lock_irq(&dev_priv->hpd_state.lock);
++ hpd0 = dev_priv->hpd_state.hpd0_bits;
++ dev_priv->hpd_state.hpd0_bits = 0;
++ hpd1 = dev_priv->hpd_state.hpd1_bits;
++ dev_priv->hpd_state.hpd1_bits = 0;
++ spin_unlock_irq(&dev_priv->hpd_state.lock);
++
++ hpd0 &= nv_rd32(dev, 0xe050);
+ if (dev_priv->chipset >= 0x90)
+- hpd1 = nv_rd32(dev, 0xe074) & nv_rd32(dev, 0xe070);
++ hpd1 &= nv_rd32(dev, 0xe070);
+
+ plug_mask = (hpd0 & 0x0000ffff) | (hpd1 << 16);
+ unplug_mask = (hpd0 >> 16) | (hpd1 & 0xffff0000);
+@@ -1058,10 +1065,6 @@ nv50_display_irq_hotplug_bh(struct work_
+ helper->dpms(connector->encoder, DRM_MODE_DPMS_OFF);
+ }
+
+- nv_wr32(dev, 0xe054, nv_rd32(dev, 0xe054));
+- if (dev_priv->chipset >= 0x90)
+- nv_wr32(dev, 0xe074, nv_rd32(dev, 0xe074));
+-
+ drm_helper_hpd_irq_event(dev);
+ }
+
+@@ -1072,8 +1075,22 @@ nv50_display_irq_handler(struct drm_devi
+ uint32_t delayed = 0;
+
+ if (nv_rd32(dev, NV50_PMC_INTR_0) & NV50_PMC_INTR_0_HOTPLUG) {
+- if (!work_pending(&dev_priv->hpd_work))
+- queue_work(dev_priv->wq, &dev_priv->hpd_work);
++ uint32_t hpd0_bits, hpd1_bits = 0;
++
++ hpd0_bits = nv_rd32(dev, 0xe054);
++ nv_wr32(dev, 0xe054, hpd0_bits);
++
++ if (dev_priv->chipset >= 0x90) {
++ hpd1_bits = nv_rd32(dev, 0xe074);
++ nv_wr32(dev, 0xe074, hpd1_bits);
++ }
++
++ spin_lock(&dev_priv->hpd_state.lock);
++ dev_priv->hpd_state.hpd0_bits |= hpd0_bits;
++ dev_priv->hpd_state.hpd1_bits |= hpd1_bits;
++ spin_unlock(&dev_priv->hpd_state.lock);
++
++ queue_work(dev_priv->wq, &dev_priv->hpd_work);
+ }
+
+ while (nv_rd32(dev, NV50_PMC_INTR_0) & NV50_PMC_INTR_0_DISPLAY) {
--- /dev/null
+From f08f5a0add20834d3f3d876dfe08005a5df656db Mon Sep 17 00:00:00 2001
+From: Rafael J. Wysocki <rjw@sisk.pl>
+Date: Thu, 16 Dec 2010 17:11:58 +0100
+Subject: PM / Runtime: Fix pm_runtime_suspended()
+
+From: Rafael J. Wysocki <rjw@sisk.pl>
+
+commit f08f5a0add20834d3f3d876dfe08005a5df656db upstream.
+
+There are some situations (e.g. in __pm_generic_call()), where
+pm_runtime_suspended() is used to decide whether or not to execute
+a device's (system) ->suspend() callback. The callback is not
+executed if pm_runtime_suspended() returns true, but it does so
+for devices that don't even support runtime PM, because the
+power.disable_depth device field is ignored by it. This leads to
+problems (i.e. devices are not suspened when they should), so rework
+pm_runtime_suspended() so that it returns false if the device's
+power.disable_depth field is different from zero.
+
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/power/runtime_pm.txt | 4 ++--
+ include/linux/pm_runtime.h | 3 ++-
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+--- a/Documentation/power/runtime_pm.txt
++++ b/Documentation/power/runtime_pm.txt
+@@ -336,8 +336,8 @@ drivers/base/power/runtime.c and include
+ zero)
+
+ bool pm_runtime_suspended(struct device *dev);
+- - return true if the device's runtime PM status is 'suspended', or false
+- otherwise
++ - return true if the device's runtime PM status is 'suspended' and its
++ 'power.disable_depth' field is equal to zero, or false otherwise
+
+ void pm_runtime_allow(struct device *dev);
+ - set the power.runtime_auto flag for the device and decrease its usage
+--- a/include/linux/pm_runtime.h
++++ b/include/linux/pm_runtime.h
+@@ -67,7 +67,8 @@ static inline void device_set_run_wake(s
+
+ static inline bool pm_runtime_suspended(struct device *dev)
+ {
+- return dev->power.runtime_status == RPM_SUSPENDED;
++ return dev->power.runtime_status == RPM_SUSPENDED
++ && !dev->power.disable_depth;
+ }
+
+ #else /* !CONFIG_PM_RUNTIME */
--- /dev/null
+From 49f4138346b3cec2706adff02658fe27ceb1e46f Mon Sep 17 00:00:00 2001
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+Date: Fri, 26 Nov 2010 13:42:47 +0100
+Subject: printk: Fix wake_up_klogd() vs cpu hotplug
+
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+
+commit 49f4138346b3cec2706adff02658fe27ceb1e46f upstream.
+
+wake_up_klogd() may get called from preemptible context but uses
+__raw_get_cpu_var() to write to a per cpu variable. If it gets preempted
+between getting the address and writing to it, the cpu in question could be
+offline if the process gets scheduled back and hence writes to the per cpu data
+of an offline cpu.
+
+This buggy behaviour was introduced with fa33507a "printk: robustify
+printk, fix #2" which was supposed to fix a "using smp_processor_id() in
+preemptible" warning.
+
+Let's use this_cpu_write() instead which disables preemption and makes sure
+that the outlined scenario cannot happen.
+
+Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
+Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
+LKML-Reference: <20101126124247.GC7023@osiris.boeblingen.de.ibm.com>
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/printk.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/printk.c
++++ b/kernel/printk.c
+@@ -1070,7 +1070,7 @@ int printk_needs_cpu(int cpu)
+ void wake_up_klogd(void)
+ {
+ if (waitqueue_active(&log_wait))
+- __raw_get_cpu_var(printk_pending) = 1;
++ this_cpu_write(printk_pending, 1);
+ }
+
+ /**
--- /dev/null
+From 0f004f5a696a9434b7214d0d3cbd0525ee77d428 Mon Sep 17 00:00:00 2001
+From: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Date: Tue, 30 Nov 2010 19:48:45 +0100
+Subject: sched: Cure more NO_HZ load average woes
+
+From: Peter Zijlstra <a.p.zijlstra@chello.nl>
+
+commit 0f004f5a696a9434b7214d0d3cbd0525ee77d428 upstream.
+
+There's a long-running regression that proved difficult to fix and
+which is hitting certain people and is rather annoying in its effects.
+
+Damien reported that after 74f5187ac8 (sched: Cure load average vs
+NO_HZ woes) his load average is unnaturally high, he also noted that
+even with that patch reverted the load avgerage numbers are not
+correct.
+
+The problem is that the previous patch only solved half the NO_HZ
+problem, it addressed the part of going into NO_HZ mode, not of
+comming out of NO_HZ mode. This patch implements that missing half.
+
+When comming out of NO_HZ mode there are two important things to take
+care of:
+
+ - Folding the pending idle delta into the global active count.
+ - Correctly aging the averages for the idle-duration.
+
+So with this patch the NO_HZ interaction should be complete and
+behaviour between CONFIG_NO_HZ=[yn] should be equivalent.
+
+Furthermore, this patch slightly changes the load average computation
+by adding a rounding term to the fixed point multiplication.
+
+Reported-by: Damien Wyart <damien.wyart@free.fr>
+Reported-by: Tim McGrath <tmhikaru@gmail.com>
+Tested-by: Damien Wyart <damien.wyart@free.fr>
+Tested-by: Orion Poplawski <orion@cora.nwra.com>
+Tested-by: Kyle McMartin <kyle@mcmartin.ca>
+Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Cc: Chase Douglas <chase.douglas@canonical.com>
+LKML-Reference: <1291129145.32004.874.camel@laptop>
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/sched.h | 2
+ kernel/sched.c | 150 ++++++++++++++++++++++++++++++++++++++++++++++----
+ kernel/timer.c | 2
+ 3 files changed, 141 insertions(+), 13 deletions(-)
+
+--- a/include/linux/sched.h
++++ b/include/linux/sched.h
+@@ -143,7 +143,7 @@ extern unsigned long nr_iowait_cpu(int c
+ extern unsigned long this_cpu_load(void);
+
+
+-extern void calc_global_load(void);
++extern void calc_global_load(unsigned long ticks);
+
+ extern unsigned long get_parent_ip(unsigned long addr);
+
+--- a/kernel/sched.c
++++ b/kernel/sched.c
+@@ -2967,6 +2967,15 @@ static long calc_load_fold_active(struct
+ return delta;
+ }
+
++static unsigned long
++calc_load(unsigned long load, unsigned long exp, unsigned long active)
++{
++ load *= exp;
++ load += active * (FIXED_1 - exp);
++ load += 1UL << (FSHIFT - 1);
++ return load >> FSHIFT;
++}
++
+ #ifdef CONFIG_NO_HZ
+ /*
+ * For NO_HZ we delay the active fold to the next LOAD_FREQ update.
+@@ -2996,6 +3005,128 @@ static long calc_load_fold_idle(void)
+
+ return delta;
+ }
++
++/**
++ * fixed_power_int - compute: x^n, in O(log n) time
++ *
++ * @x: base of the power
++ * @frac_bits: fractional bits of @x
++ * @n: power to raise @x to.
++ *
++ * By exploiting the relation between the definition of the natural power
++ * function: x^n := x*x*...*x (x multiplied by itself for n times), and
++ * the binary encoding of numbers used by computers: n := \Sum n_i * 2^i,
++ * (where: n_i \elem {0, 1}, the binary vector representing n),
++ * we find: x^n := x^(\Sum n_i * 2^i) := \Prod x^(n_i * 2^i), which is
++ * of course trivially computable in O(log_2 n), the length of our binary
++ * vector.
++ */
++static unsigned long
++fixed_power_int(unsigned long x, unsigned int frac_bits, unsigned int n)
++{
++ unsigned long result = 1UL << frac_bits;
++
++ if (n) for (;;) {
++ if (n & 1) {
++ result *= x;
++ result += 1UL << (frac_bits - 1);
++ result >>= frac_bits;
++ }
++ n >>= 1;
++ if (!n)
++ break;
++ x *= x;
++ x += 1UL << (frac_bits - 1);
++ x >>= frac_bits;
++ }
++
++ return result;
++}
++
++/*
++ * a1 = a0 * e + a * (1 - e)
++ *
++ * a2 = a1 * e + a * (1 - e)
++ * = (a0 * e + a * (1 - e)) * e + a * (1 - e)
++ * = a0 * e^2 + a * (1 - e) * (1 + e)
++ *
++ * a3 = a2 * e + a * (1 - e)
++ * = (a0 * e^2 + a * (1 - e) * (1 + e)) * e + a * (1 - e)
++ * = a0 * e^3 + a * (1 - e) * (1 + e + e^2)
++ *
++ * ...
++ *
++ * an = a0 * e^n + a * (1 - e) * (1 + e + ... + e^n-1) [1]
++ * = a0 * e^n + a * (1 - e) * (1 - e^n)/(1 - e)
++ * = a0 * e^n + a * (1 - e^n)
++ *
++ * [1] application of the geometric series:
++ *
++ * n 1 - x^(n+1)
++ * S_n := \Sum x^i = -------------
++ * i=0 1 - x
++ */
++static unsigned long
++calc_load_n(unsigned long load, unsigned long exp,
++ unsigned long active, unsigned int n)
++{
++
++ return calc_load(load, fixed_power_int(exp, FSHIFT, n), active);
++}
++
++/*
++ * NO_HZ can leave us missing all per-cpu ticks calling
++ * calc_load_account_active(), but since an idle CPU folds its delta into
++ * calc_load_tasks_idle per calc_load_account_idle(), all we need to do is fold
++ * in the pending idle delta if our idle period crossed a load cycle boundary.
++ *
++ * Once we've updated the global active value, we need to apply the exponential
++ * weights adjusted to the number of cycles missed.
++ */
++static void calc_global_nohz(unsigned long ticks)
++{
++ long delta, active, n;
++
++ if (time_before(jiffies, calc_load_update))
++ return;
++
++ /*
++ * If we crossed a calc_load_update boundary, make sure to fold
++ * any pending idle changes, the respective CPUs might have
++ * missed the tick driven calc_load_account_active() update
++ * due to NO_HZ.
++ */
++ delta = calc_load_fold_idle();
++ if (delta)
++ atomic_long_add(delta, &calc_load_tasks);
++
++ /*
++ * If we were idle for multiple load cycles, apply them.
++ */
++ if (ticks >= LOAD_FREQ) {
++ n = ticks / LOAD_FREQ;
++
++ active = atomic_long_read(&calc_load_tasks);
++ active = active > 0 ? active * FIXED_1 : 0;
++
++ avenrun[0] = calc_load_n(avenrun[0], EXP_1, active, n);
++ avenrun[1] = calc_load_n(avenrun[1], EXP_5, active, n);
++ avenrun[2] = calc_load_n(avenrun[2], EXP_15, active, n);
++
++ calc_load_update += n * LOAD_FREQ;
++ }
++
++ /*
++ * Its possible the remainder of the above division also crosses
++ * a LOAD_FREQ period, the regular check in calc_global_load()
++ * which comes after this will take care of that.
++ *
++ * Consider us being 11 ticks before a cycle completion, and us
++ * sleeping for 4*LOAD_FREQ + 22 ticks, then the above code will
++ * age us 4 cycles, and the test in calc_global_load() will
++ * pick up the final one.
++ */
++}
+ #else
+ static void calc_load_account_idle(struct rq *this_rq)
+ {
+@@ -3005,6 +3136,10 @@ static inline long calc_load_fold_idle(v
+ {
+ return 0;
+ }
++
++static void calc_global_nohz(unsigned long ticks)
++{
++}
+ #endif
+
+ /**
+@@ -3022,24 +3157,17 @@ void get_avenrun(unsigned long *loads, u
+ loads[2] = (avenrun[2] + offset) << shift;
+ }
+
+-static unsigned long
+-calc_load(unsigned long load, unsigned long exp, unsigned long active)
+-{
+- load *= exp;
+- load += active * (FIXED_1 - exp);
+- return load >> FSHIFT;
+-}
+-
+ /*
+ * calc_load - update the avenrun load estimates 10 ticks after the
+ * CPUs have updated calc_load_tasks.
+ */
+-void calc_global_load(void)
++void calc_global_load(unsigned long ticks)
+ {
+- unsigned long upd = calc_load_update + 10;
+ long active;
+
+- if (time_before(jiffies, upd))
++ calc_global_nohz(ticks);
++
++ if (time_before(jiffies, calc_load_update + 10))
+ return;
+
+ active = atomic_long_read(&calc_load_tasks);
+--- a/kernel/timer.c
++++ b/kernel/timer.c
+@@ -1322,7 +1322,7 @@ void do_timer(unsigned long ticks)
+ {
+ jiffies_64 += ticks;
+ update_wall_time();
+- calc_global_load();
++ calc_global_load(ticks);
+ }
+
+ #ifdef __ARCH_WANT_SYS_ALARM
net-fix-skb_defer_rx_timestamp.patch
net-packet-fix-information-leak-to-userland.patch
pppoe.c-fix-kernel-panic-caused-by-__pppoe_xmit.patch
+acpica-fix-scope-op-in-module-level-code.patch
+nouveau-acknowledge-hpd-irq-in-handler-not-bottom-half.patch
+printk-fix-wake_up_klogd-vs-cpu-hotplug.patch
+xen-provide-a-variant-of-__ring_size-that-is-an-integer-constant-expression.patch
+sched-cure-more-no_hz-load-average-woes.patch
+acpi-ec-add-another-dmi-match-entry-for-msi-hardware.patch
+mips-jz4740-qi_lb60-fix-gpio-for-the-6th-row-of-the-keyboard-matrix.patch
+pm-runtime-fix-pm_runtime_suspended.patch
+inotify-stop-kernel-memory-leak-on-file-creation-failure.patch
--- /dev/null
+From 667c78afaec0ac500908e191e8f236e9578d7b1f Mon Sep 17 00:00:00 2001
+From: Jeremy Fitzhardinge <jeremy@goop.org>
+Date: Wed, 8 Dec 2010 12:39:12 -0800
+Subject: xen: Provide a variant of __RING_SIZE() that is an integer constant expression
+
+From: Jeremy Fitzhardinge <jeremy@goop.org>
+
+commit 667c78afaec0ac500908e191e8f236e9578d7b1f upstream.
+
+Without this, gcc 4.5 won't compile xen-netfront and xen-blkfront, where
+this is being used to specify array sizes.
+
+Signed-off-by: Jan Beulich <jbeulich@novell.com>
+Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
+Cc: Jens Axboe <axboe@kernel.dk>
+Cc: David Miller <davem@davemloft.net>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/block/xen-blkfront.c | 2 +-
+ drivers/net/xen-netfront.c | 4 ++--
+ include/xen/interface/io/ring.h | 11 +++++++++--
+ 3 files changed, 12 insertions(+), 5 deletions(-)
+
+--- a/drivers/block/xen-blkfront.c
++++ b/drivers/block/xen-blkfront.c
+@@ -71,7 +71,7 @@ struct blk_shadow {
+
+ static const struct block_device_operations xlvbd_block_fops;
+
+-#define BLK_RING_SIZE __RING_SIZE((struct blkif_sring *)0, PAGE_SIZE)
++#define BLK_RING_SIZE __CONST_RING_SIZE(blkif, PAGE_SIZE)
+
+ /*
+ * We have one of these per vbd, whether ide, scsi or 'other'. They
+--- a/drivers/net/xen-netfront.c
++++ b/drivers/net/xen-netfront.c
+@@ -66,8 +66,8 @@ struct netfront_cb {
+
+ #define GRANT_INVALID_REF 0
+
+-#define NET_TX_RING_SIZE __RING_SIZE((struct xen_netif_tx_sring *)0, PAGE_SIZE)
+-#define NET_RX_RING_SIZE __RING_SIZE((struct xen_netif_rx_sring *)0, PAGE_SIZE)
++#define NET_TX_RING_SIZE __CONST_RING_SIZE(xen_netif_tx, PAGE_SIZE)
++#define NET_RX_RING_SIZE __CONST_RING_SIZE(xen_netif_rx, PAGE_SIZE)
+ #define TX_MAX_TARGET min_t(int, NET_RX_RING_SIZE, 256)
+
+ struct netfront_info {
+--- a/include/xen/interface/io/ring.h
++++ b/include/xen/interface/io/ring.h
+@@ -24,8 +24,15 @@ typedef unsigned int RING_IDX;
+ * A ring contains as many entries as will fit, rounded down to the nearest
+ * power of two (so we can mask with (size-1) to loop around).
+ */
+-#define __RING_SIZE(_s, _sz) \
+- (__RD32(((_sz) - (long)&(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0])))
++#define __CONST_RING_SIZE(_s, _sz) \
++ (__RD32(((_sz) - offsetof(struct _s##_sring, ring)) / \
++ sizeof(((struct _s##_sring *)0)->ring[0])))
++
++/*
++ * The same for passing in an actual pointer instead of a name tag.
++ */
++#define __RING_SIZE(_s, _sz) \
++ (__RD32(((_sz) - (long)&(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0])))
+
+ /*
+ * Macros to make the correct C datatypes for a new kind of ring.