]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.38 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 18 Apr 2011 20:37:59 +0000 (13:37 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 18 Apr 2011 20:37:59 +0000 (13:37 -0700)
queue-2.6.38/futex-set-flags_has_timeout-during-futex_wait-restart-setup.patch [new file with mode: 0644]
queue-2.6.38/kstrto-converting-strings-to-integers-done-hopefully-right.patch [new file with mode: 0644]
queue-2.6.38/maintainers-update-stable-branch-info.patch [new file with mode: 0644]
queue-2.6.38/mm-thp-use-conventional-format-for-boolean-attributes.patch [new file with mode: 0644]
queue-2.6.38/oom-kill-remove-boost_dying_task_prio.patch [new file with mode: 0644]
queue-2.6.38/ramfs-fix-memleak-on-no-mmu-arch.patch [new file with mode: 0644]
queue-2.6.38/series
queue-2.6.38/ubifs-fix-oops-when-r-o-file-system-is-fsync-ed.patch [new file with mode: 0644]
queue-2.6.38/x86-amd-disable-garttlbwlkerr-when-bios-forgets-it.patch [new file with mode: 0644]
queue-2.6.38/x86-amd-set-arat-feature-on-amd-processors.patch [new file with mode: 0644]

diff --git a/queue-2.6.38/futex-set-flags_has_timeout-during-futex_wait-restart-setup.patch b/queue-2.6.38/futex-set-flags_has_timeout-during-futex_wait-restart-setup.patch
new file mode 100644 (file)
index 0000000..3d4c6fa
--- /dev/null
@@ -0,0 +1,43 @@
+From 0cd9c6494ee5c19aef085152bc37f3a4e774a9e1 Mon Sep 17 00:00:00 2001
+From: Darren Hart <dvhart@linux.intel.com>
+Date: Thu, 14 Apr 2011 15:41:57 -0700
+Subject: futex: Set FLAGS_HAS_TIMEOUT during futex_wait restart setup
+
+From: Darren Hart <dvhart@linux.intel.com>
+
+commit 0cd9c6494ee5c19aef085152bc37f3a4e774a9e1 upstream.
+
+The FLAGS_HAS_TIMEOUT flag was not getting set, causing the restart_block to
+restart futex_wait() without a timeout after a signal.
+
+Commit b41277dc7a18ee332d in 2.6.38 introduced the regression by accidentally
+removing the the FLAGS_HAS_TIMEOUT assignment from futex_wait() during the setup
+of the restart block. Restore the originaly behavior.
+
+Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=32922
+
+Reported-by: Tim Smith <tsmith201104@yahoo.com>
+Reported-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
+Signed-off-by: Darren Hart <dvhart@linux.intel.com>
+Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: John Kacur <jkacur@redhat.com>
+Link: http://lkml.kernel.org/r/%3Cdaac0eb3af607f72b9a4d3126b2ba8fb5ed3b883.1302820917.git.dvhart%40linux.intel.com%3E
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/futex.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/futex.c
++++ b/kernel/futex.c
+@@ -1886,7 +1886,7 @@ retry:
+       restart->futex.val = val;
+       restart->futex.time = abs_time->tv64;
+       restart->futex.bitset = bitset;
+-      restart->futex.flags = flags;
++      restart->futex.flags = flags | FLAGS_HAS_TIMEOUT;
+       ret = -ERESTART_RESTARTBLOCK;
diff --git a/queue-2.6.38/kstrto-converting-strings-to-integers-done-hopefully-right.patch b/queue-2.6.38/kstrto-converting-strings-to-integers-done-hopefully-right.patch
new file mode 100644 (file)
index 0000000..64d60a6
--- /dev/null
@@ -0,0 +1,1317 @@
+From 33ee3b2e2eb9b4b6c64dcf9ed66e2ac3124e748c Mon Sep 17 00:00:00 2001
+From: Alexey Dobriyan <adobriyan@gmail.com>
+Date: Tue, 22 Mar 2011 16:34:40 -0700
+Subject: kstrto*: converting strings to integers done (hopefully) right
+
+From: Alexey Dobriyan <adobriyan@gmail.com>
+
+commit 33ee3b2e2eb9b4b6c64dcf9ed66e2ac3124e748c upstream.
+
+1. simple_strto*() do not contain overflow checks and crufty,
+   libc way to indicate failure.
+2. strict_strto*() also do not have overflow checks but the name and
+   comments pretend they do.
+3. Both families have only "long long" and "long" variants,
+   but users want strtou8()
+4. Both "simple" and "strict" prefixes are wrong:
+   Simple doesn't exactly say what's so simple, strict should not exist
+   because conversion should be strict by default.
+
+The solution is to use "k" prefix and add convertors for more types.
+Enter
+       kstrtoull()
+       kstrtoll()
+       kstrtoul()
+       kstrtol()
+       kstrtouint()
+       kstrtoint()
+
+       kstrtou64()
+       kstrtos64()
+       kstrtou32()
+       kstrtos32()
+       kstrtou16()
+       kstrtos16()
+       kstrtou8()
+       kstrtos8()
+
+Include runtime testsuite (somewhat incomplete) as well.
+
+strict_strto*() become deprecated, stubbed to kstrto*() and
+eventually will be removed altogether.
+
+Use kstrto*() in code today!
+
+Note: on some archs _kstrtoul() and _kstrtol() are left in tree, even if
+      they'll be unused at runtime. This is temporarily solution,
+      because I don't want to hardcode list of archs where these
+      functions aren't needed. Current solution with sizeof() and
+      __alignof__ at least always works.
+
+Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/video/via/viafbdev.h |    3 
+ include/linux/kernel.h       |   70 +++-
+ lib/Kconfig.debug            |    3 
+ lib/Makefile                 |    2 
+ lib/kstrtox.c                |  227 +++++++++++++
+ lib/test-kstrtox.c           |  739 +++++++++++++++++++++++++++++++++++++++++++
+ lib/vsprintf.c               |  141 --------
+ scripts/checkpatch.pl        |    4 
+ 8 files changed, 1039 insertions(+), 150 deletions(-)
+
+--- a/drivers/video/via/viafbdev.h
++++ b/drivers/video/via/viafbdev.h
+@@ -94,9 +94,6 @@ extern int viafb_LCD_ON;
+ extern int viafb_DVI_ON;
+ extern int viafb_hotplug;
+-extern int strict_strtoul(const char *cp, unsigned int base,
+-      unsigned long *res);
+-
+ u8 viafb_gpio_i2c_read_lvds(struct lvds_setting_information
+       *plvds_setting_info, struct lvds_chip_information
+       *plvds_chip_info, u8 index);
+--- a/include/linux/kernel.h
++++ b/include/linux/kernel.h
+@@ -187,14 +187,76 @@ NORET_TYPE void do_exit(long error_code)
+       ATTRIB_NORET;
+ NORET_TYPE void complete_and_exit(struct completion *, long)
+       ATTRIB_NORET;
++
++/* Internal, do not use. */
++int __must_check _kstrtoul(const char *s, unsigned int base, unsigned long *res);
++int __must_check _kstrtol(const char *s, unsigned int base, long *res);
++
++int __must_check kstrtoull(const char *s, unsigned int base, unsigned long long *res);
++int __must_check kstrtoll(const char *s, unsigned int base, long long *res);
++static inline int __must_check kstrtoul(const char *s, unsigned int base, unsigned long *res)
++{
++      /*
++       * We want to shortcut function call, but
++       * __builtin_types_compatible_p(unsigned long, unsigned long long) = 0.
++       */
++      if (sizeof(unsigned long) == sizeof(unsigned long long) &&
++          __alignof__(unsigned long) == __alignof__(unsigned long long))
++              return kstrtoull(s, base, (unsigned long long *)res);
++      else
++              return _kstrtoul(s, base, res);
++}
++
++static inline int __must_check kstrtol(const char *s, unsigned int base, long *res)
++{
++      /*
++       * We want to shortcut function call, but
++       * __builtin_types_compatible_p(long, long long) = 0.
++       */
++      if (sizeof(long) == sizeof(long long) &&
++          __alignof__(long) == __alignof__(long long))
++              return kstrtoll(s, base, (long long *)res);
++      else
++              return _kstrtol(s, base, res);
++}
++
++int __must_check kstrtouint(const char *s, unsigned int base, unsigned int *res);
++int __must_check kstrtoint(const char *s, unsigned int base, int *res);
++
++static inline int __must_check kstrtou64(const char *s, unsigned int base, u64 *res)
++{
++      return kstrtoull(s, base, res);
++}
++
++static inline int __must_check kstrtos64(const char *s, unsigned int base, s64 *res)
++{
++      return kstrtoll(s, base, res);
++}
++
++static inline int __must_check kstrtou32(const char *s, unsigned int base, u32 *res)
++{
++      return kstrtouint(s, base, res);
++}
++
++static inline int __must_check kstrtos32(const char *s, unsigned int base, s32 *res)
++{
++      return kstrtoint(s, base, res);
++}
++
++int __must_check kstrtou16(const char *s, unsigned int base, u16 *res);
++int __must_check kstrtos16(const char *s, unsigned int base, s16 *res);
++int __must_check kstrtou8(const char *s, unsigned int base, u8 *res);
++int __must_check kstrtos8(const char *s, unsigned int base, s8 *res);
++
+ extern unsigned long simple_strtoul(const char *,char **,unsigned int);
+ extern long simple_strtol(const char *,char **,unsigned int);
+ extern unsigned long long simple_strtoull(const char *,char **,unsigned int);
+ extern long long simple_strtoll(const char *,char **,unsigned int);
+-extern int __must_check strict_strtoul(const char *, unsigned int, unsigned long *);
+-extern int __must_check strict_strtol(const char *, unsigned int, long *);
+-extern int __must_check strict_strtoull(const char *, unsigned int, unsigned long long *);
+-extern int __must_check strict_strtoll(const char *, unsigned int, long long *);
++#define strict_strtoul        kstrtoul
++#define strict_strtol kstrtol
++#define strict_strtoull       kstrtoull
++#define strict_strtoll        kstrtoll
++
+ extern int sprintf(char * buf, const char * fmt, ...)
+       __attribute__ ((format (printf, 2, 3)));
+ extern int vsprintf(char *buf, const char *, va_list)
+--- a/lib/Kconfig.debug
++++ b/lib/Kconfig.debug
+@@ -1236,3 +1236,6 @@ source "samples/Kconfig"
+ source "lib/Kconfig.kgdb"
+ source "lib/Kconfig.kmemcheck"
++
++config TEST_KSTRTOX
++      tristate "Test kstrto*() family of functions at runtime"
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -22,6 +22,8 @@ lib-y        += kobject.o kref.o klist.o
+ obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
+        bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \
+        string_helpers.o gcd.o lcm.o list_sort.o uuid.o flex_array.o
++obj-y += kstrtox.o
++obj-$(CONFIG_TEST_KSTRTOX) += test-kstrtox.o
+ ifeq ($(CONFIG_DEBUG_KOBJECT),y)
+ CFLAGS_kobject.o += -DDEBUG
+--- /dev/null
++++ b/lib/kstrtox.c
+@@ -0,0 +1,227 @@
++/*
++ * Convert integer string representation to an integer.
++ * If an integer doesn't fit into specified type, -E is returned.
++ *
++ * Integer starts with optional sign.
++ * kstrtou*() functions do not accept sign "-".
++ *
++ * Radix 0 means autodetection: leading "0x" implies radix 16,
++ * leading "0" implies radix 8, otherwise radix is 10.
++ * Autodetection hints work after optional sign, but not before.
++ *
++ * If -E is returned, result is not touched.
++ */
++#include <linux/ctype.h>
++#include <linux/errno.h>
++#include <linux/kernel.h>
++#include <linux/math64.h>
++#include <linux/module.h>
++#include <linux/types.h>
++
++static inline char _tolower(const char c)
++{
++      return c | 0x20;
++}
++
++static int _kstrtoull(const char *s, unsigned int base, unsigned long long *res)
++{
++      unsigned long long acc;
++      int ok;
++
++      if (base == 0) {
++              if (s[0] == '0') {
++                      if (_tolower(s[1]) == 'x' && isxdigit(s[2]))
++                              base = 16;
++                      else
++                              base = 8;
++              } else
++                      base = 10;
++      }
++      if (base == 16 && s[0] == '0' && _tolower(s[1]) == 'x')
++              s += 2;
++
++      acc = 0;
++      ok = 0;
++      while (*s) {
++              unsigned int val;
++
++              if ('0' <= *s && *s <= '9')
++                      val = *s - '0';
++              else if ('a' <= _tolower(*s) && _tolower(*s) <= 'f')
++                      val = _tolower(*s) - 'a' + 10;
++              else if (*s == '\n') {
++                      if (*(s + 1) == '\0')
++                              break;
++                      else
++                              return -EINVAL;
++              } else
++                      return -EINVAL;
++
++              if (val >= base)
++                      return -EINVAL;
++              if (acc > div_u64(ULLONG_MAX - val, base))
++                      return -ERANGE;
++              acc = acc * base + val;
++              ok = 1;
++
++              s++;
++      }
++      if (!ok)
++              return -EINVAL;
++      *res = acc;
++      return 0;
++}
++
++int kstrtoull(const char *s, unsigned int base, unsigned long long *res)
++{
++      if (s[0] == '+')
++              s++;
++      return _kstrtoull(s, base, res);
++}
++EXPORT_SYMBOL(kstrtoull);
++
++int kstrtoll(const char *s, unsigned int base, long long *res)
++{
++      unsigned long long tmp;
++      int rv;
++
++      if (s[0] == '-') {
++              rv = _kstrtoull(s + 1, base, &tmp);
++              if (rv < 0)
++                      return rv;
++              if ((long long)(-tmp) >= 0)
++                      return -ERANGE;
++              *res = -tmp;
++      } else {
++              rv = kstrtoull(s, base, &tmp);
++              if (rv < 0)
++                      return rv;
++              if ((long long)tmp < 0)
++                      return -ERANGE;
++              *res = tmp;
++      }
++      return 0;
++}
++EXPORT_SYMBOL(kstrtoll);
++
++/* Internal, do not use. */
++int _kstrtoul(const char *s, unsigned int base, unsigned long *res)
++{
++      unsigned long long tmp;
++      int rv;
++
++      rv = kstrtoull(s, base, &tmp);
++      if (rv < 0)
++              return rv;
++      if (tmp != (unsigned long long)(unsigned long)tmp)
++              return -ERANGE;
++      *res = tmp;
++      return 0;
++}
++EXPORT_SYMBOL(_kstrtoul);
++
++/* Internal, do not use. */
++int _kstrtol(const char *s, unsigned int base, long *res)
++{
++      long long tmp;
++      int rv;
++
++      rv = kstrtoll(s, base, &tmp);
++      if (rv < 0)
++              return rv;
++      if (tmp != (long long)(long)tmp)
++              return -ERANGE;
++      *res = tmp;
++      return 0;
++}
++EXPORT_SYMBOL(_kstrtol);
++
++int kstrtouint(const char *s, unsigned int base, unsigned int *res)
++{
++      unsigned long long tmp;
++      int rv;
++
++      rv = kstrtoull(s, base, &tmp);
++      if (rv < 0)
++              return rv;
++      if (tmp != (unsigned long long)(unsigned int)tmp)
++              return -ERANGE;
++      *res = tmp;
++      return 0;
++}
++EXPORT_SYMBOL(kstrtouint);
++
++int kstrtoint(const char *s, unsigned int base, int *res)
++{
++      long long tmp;
++      int rv;
++
++      rv = kstrtoll(s, base, &tmp);
++      if (rv < 0)
++              return rv;
++      if (tmp != (long long)(int)tmp)
++              return -ERANGE;
++      *res = tmp;
++      return 0;
++}
++EXPORT_SYMBOL(kstrtoint);
++
++int kstrtou16(const char *s, unsigned int base, u16 *res)
++{
++      unsigned long long tmp;
++      int rv;
++
++      rv = kstrtoull(s, base, &tmp);
++      if (rv < 0)
++              return rv;
++      if (tmp != (unsigned long long)(u16)tmp)
++              return -ERANGE;
++      *res = tmp;
++      return 0;
++}
++EXPORT_SYMBOL(kstrtou16);
++
++int kstrtos16(const char *s, unsigned int base, s16 *res)
++{
++      long long tmp;
++      int rv;
++
++      rv = kstrtoll(s, base, &tmp);
++      if (rv < 0)
++              return rv;
++      if (tmp != (long long)(s16)tmp)
++              return -ERANGE;
++      *res = tmp;
++      return 0;
++}
++EXPORT_SYMBOL(kstrtos16);
++
++int kstrtou8(const char *s, unsigned int base, u8 *res)
++{
++      unsigned long long tmp;
++      int rv;
++
++      rv = kstrtoull(s, base, &tmp);
++      if (rv < 0)
++              return rv;
++      if (tmp != (unsigned long long)(u8)tmp)
++              return -ERANGE;
++      *res = tmp;
++      return 0;
++}
++EXPORT_SYMBOL(kstrtou8);
++
++int kstrtos8(const char *s, unsigned int base, s8 *res)
++{
++      long long tmp;
++      int rv;
++
++      rv = kstrtoll(s, base, &tmp);
++      if (rv < 0)
++              return rv;
++      if (tmp != (long long)(s8)tmp)
++              return -ERANGE;
++      *res = tmp;
++      return 0;
++}
++EXPORT_SYMBOL(kstrtos8);
+--- /dev/null
++++ b/lib/test-kstrtox.c
+@@ -0,0 +1,739 @@
++#include <linux/init.h>
++#include <linux/kernel.h>
++#include <linux/module.h>
++
++#define for_each_test(i, test)        \
++      for (i = 0; i < sizeof(test) / sizeof(test[0]); i++)
++
++struct test_fail {
++      const char *str;
++      unsigned int base;
++};
++
++#define DEFINE_TEST_FAIL(test)        \
++      const struct test_fail test[] __initdata
++
++#define DECLARE_TEST_OK(type, test_type)      \
++      test_type {                             \
++              const char *str;                \
++              unsigned int base;              \
++              type expected_res;              \
++      }
++
++#define DEFINE_TEST_OK(type, test)    \
++      const type test[] __initdata
++
++#define TEST_FAIL(fn, type, fmt, test)                                        \
++{                                                                     \
++      unsigned int i;                                                 \
++                                                                      \
++      for_each_test(i, test) {                                        \
++              const struct test_fail *t = &test[i];                   \
++              type tmp;                                               \
++              int rv;                                                 \
++                                                                      \
++              tmp = 0;                                                \
++              rv = fn(t->str, t->base, &tmp);                         \
++              if (rv >= 0) {                                          \
++                      WARN(1, "str '%s', base %u, expected -E, got %d/" fmt "\n",     \
++                              t->str, t->base, rv, tmp);              \
++                      continue;                                       \
++              }                                                       \
++      }                                                               \
++}
++
++#define TEST_OK(fn, type, fmt, test)                                  \
++{                                                                     \
++      unsigned int i;                                                 \
++                                                                      \
++      for_each_test(i, test) {                                        \
++              const typeof(test[0]) *t = &test[i];                    \
++              type res;                                               \
++              int rv;                                                 \
++                                                                      \
++              rv = fn(t->str, t->base, &res);                         \
++              if (rv != 0) {                                          \
++                      WARN(1, "str '%s', base %u, expected 0/" fmt ", got %d\n",      \
++                              t->str, t->base, t->expected_res, rv);  \
++                      continue;                                       \
++              }                                                       \
++              if (res != t->expected_res) {                           \
++                      WARN(1, "str '%s', base %u, expected " fmt ", got " fmt "\n",   \
++                              t->str, t->base, t->expected_res, res); \
++                      continue;                                       \
++              }                                                       \
++      }                                                               \
++}
++
++static void __init test_kstrtoull_ok(void)
++{
++      DECLARE_TEST_OK(unsigned long long, struct test_ull);
++      static DEFINE_TEST_OK(struct test_ull, test_ull_ok) = {
++              {"0",   10,     0ULL},
++              {"1",   10,     1ULL},
++              {"127", 10,     127ULL},
++              {"128", 10,     128ULL},
++              {"129", 10,     129ULL},
++              {"255", 10,     255ULL},
++              {"256", 10,     256ULL},
++              {"257", 10,     257ULL},
++              {"32767",       10,     32767ULL},
++              {"32768",       10,     32768ULL},
++              {"32769",       10,     32769ULL},
++              {"65535",       10,     65535ULL},
++              {"65536",       10,     65536ULL},
++              {"65537",       10,     65537ULL},
++              {"2147483647",  10,     2147483647ULL},
++              {"2147483648",  10,     2147483648ULL},
++              {"2147483649",  10,     2147483649ULL},
++              {"4294967295",  10,     4294967295ULL},
++              {"4294967296",  10,     4294967296ULL},
++              {"4294967297",  10,     4294967297ULL},
++              {"9223372036854775807", 10,     9223372036854775807ULL},
++              {"9223372036854775808", 10,     9223372036854775808ULL},
++              {"9223372036854775809", 10,     9223372036854775809ULL},
++              {"18446744073709551614",        10,     18446744073709551614ULL},
++              {"18446744073709551615",        10,     18446744073709551615ULL},
++
++              {"00",          8,      00ULL},
++              {"01",          8,      01ULL},
++              {"0177",        8,      0177ULL},
++              {"0200",        8,      0200ULL},
++              {"0201",        8,      0201ULL},
++              {"0377",        8,      0377ULL},
++              {"0400",        8,      0400ULL},
++              {"0401",        8,      0401ULL},
++              {"077777",      8,      077777ULL},
++              {"0100000",     8,      0100000ULL},
++              {"0100001",     8,      0100001ULL},
++              {"0177777",     8,      0177777ULL},
++              {"0200000",     8,      0200000ULL},
++              {"0200001",     8,      0200001ULL},
++              {"017777777777",        8,      017777777777ULL},
++              {"020000000000",        8,      020000000000ULL},
++              {"020000000001",        8,      020000000001ULL},
++              {"037777777777",        8,      037777777777ULL},
++              {"040000000000",        8,      040000000000ULL},
++              {"040000000001",        8,      040000000001ULL},
++              {"0777777777777777777777",      8,      0777777777777777777777ULL},
++              {"01000000000000000000000",     8,      01000000000000000000000ULL},
++              {"01000000000000000000001",     8,      01000000000000000000001ULL},
++              {"01777777777777777777776",     8,      01777777777777777777776ULL},
++              {"01777777777777777777777",     8,      01777777777777777777777ULL},
++
++              {"0x0",         16,     0x0ULL},
++              {"0x1",         16,     0x1ULL},
++              {"0x7f",        16,     0x7fULL},
++              {"0x80",        16,     0x80ULL},
++              {"0x81",        16,     0x81ULL},
++              {"0xff",        16,     0xffULL},
++              {"0x100",       16,     0x100ULL},
++              {"0x101",       16,     0x101ULL},
++              {"0x7fff",      16,     0x7fffULL},
++              {"0x8000",      16,     0x8000ULL},
++              {"0x8001",      16,     0x8001ULL},
++              {"0xffff",      16,     0xffffULL},
++              {"0x10000",     16,     0x10000ULL},
++              {"0x10001",     16,     0x10001ULL},
++              {"0x7fffffff",  16,     0x7fffffffULL},
++              {"0x80000000",  16,     0x80000000ULL},
++              {"0x80000001",  16,     0x80000001ULL},
++              {"0xffffffff",  16,     0xffffffffULL},
++              {"0x100000000", 16,     0x100000000ULL},
++              {"0x100000001", 16,     0x100000001ULL},
++              {"0x7fffffffffffffff",  16,     0x7fffffffffffffffULL},
++              {"0x8000000000000000",  16,     0x8000000000000000ULL},
++              {"0x8000000000000001",  16,     0x8000000000000001ULL},
++              {"0xfffffffffffffffe",  16,     0xfffffffffffffffeULL},
++              {"0xffffffffffffffff",  16,     0xffffffffffffffffULL},
++
++              {"0\n", 0,      0ULL},
++      };
++      TEST_OK(kstrtoull, unsigned long long, "%llu", test_ull_ok);
++}
++
++static void __init test_kstrtoull_fail(void)
++{
++      static DEFINE_TEST_FAIL(test_ull_fail) = {
++              {"",    0},
++              {"",    8},
++              {"",    10},
++              {"",    16},
++              {"\n",  0},
++              {"\n",  8},
++              {"\n",  10},
++              {"\n",  16},
++              {"\n0", 0},
++              {"\n0", 8},
++              {"\n0", 10},
++              {"\n0", 16},
++              {"+",   0},
++              {"+",   8},
++              {"+",   10},
++              {"+",   16},
++              {"-",   0},
++              {"-",   8},
++              {"-",   10},
++              {"-",   16},
++              {"0x",  0},
++              {"0x",  16},
++              {"0X",  0},
++              {"0X",  16},
++              {"0 ",  0},
++              {"1+",  0},
++              {"1-",  0},
++              {" 2",  0},
++              /* base autodetection */
++              {"0x0z",        0},
++              {"0z",          0},
++              {"a",           0},
++              /* digit >= base */
++              {"2",   2},
++              {"8",   8},
++              {"a",   10},
++              {"A",   10},
++              {"g",   16},
++              {"G",   16},
++              /* overflow */
++              {"10000000000000000000000000000000000000000000000000000000000000000",   2},
++              {"2000000000000000000000",      8},
++              {"18446744073709551616",        10},
++              {"10000000000000000",   16},
++              /* negative */
++              {"-0", 0},
++              {"-0", 8},
++              {"-0", 10},
++              {"-0", 16},
++              {"-1", 0},
++              {"-1", 8},
++              {"-1", 10},
++              {"-1", 16},
++              /* sign is first character if any */
++              {"-+1", 0},
++              {"-+1", 8},
++              {"-+1", 10},
++              {"-+1", 16},
++              /* nothing after \n */
++              {"0\n0", 0},
++              {"0\n0", 8},
++              {"0\n0", 10},
++              {"0\n0", 16},
++              {"0\n+", 0},
++              {"0\n+", 8},
++              {"0\n+", 10},
++              {"0\n+", 16},
++              {"0\n-", 0},
++              {"0\n-", 8},
++              {"0\n-", 10},
++              {"0\n-", 16},
++              {"0\n ", 0},
++              {"0\n ", 8},
++              {"0\n ", 10},
++              {"0\n ", 16},
++      };
++      TEST_FAIL(kstrtoull, unsigned long long, "%llu", test_ull_fail);
++}
++
++static void __init test_kstrtoll_ok(void)
++{
++      DECLARE_TEST_OK(long long, struct test_ll);
++      static DEFINE_TEST_OK(struct test_ll, test_ll_ok) = {
++              {"0",   10,     0LL},
++              {"1",   10,     1LL},
++              {"127", 10,     127LL},
++              {"128", 10,     128LL},
++              {"129", 10,     129LL},
++              {"255", 10,     255LL},
++              {"256", 10,     256LL},
++              {"257", 10,     257LL},
++              {"32767",       10,     32767LL},
++              {"32768",       10,     32768LL},
++              {"32769",       10,     32769LL},
++              {"65535",       10,     65535LL},
++              {"65536",       10,     65536LL},
++              {"65537",       10,     65537LL},
++              {"2147483647",  10,     2147483647LL},
++              {"2147483648",  10,     2147483648LL},
++              {"2147483649",  10,     2147483649LL},
++              {"4294967295",  10,     4294967295LL},
++              {"4294967296",  10,     4294967296LL},
++              {"4294967297",  10,     4294967297LL},
++              {"9223372036854775807", 10,     9223372036854775807LL},
++
++              {"-1",  10,     -1LL},
++              {"-2",  10,     -2LL},
++              {"-9223372036854775808",        10,     LLONG_MIN},
++      };
++      TEST_OK(kstrtoll, long long, "%lld", test_ll_ok);
++}
++
++static void __init test_kstrtoll_fail(void)
++{
++      static DEFINE_TEST_FAIL(test_ll_fail) = {
++              {"9223372036854775808", 10},
++              {"9223372036854775809", 10},
++              {"18446744073709551614",        10},
++              {"18446744073709551615",        10},
++              {"-9223372036854775809",        10},
++              {"-18446744073709551614",       10},
++              {"-18446744073709551615",       10},
++              /* negative zero isn't an integer in Linux */
++              {"-0",  0},
++              {"-0",  8},
++              {"-0",  10},
++              {"-0",  16},
++              /* sign is first character if any */
++              {"-+1", 0},
++              {"-+1", 8},
++              {"-+1", 10},
++              {"-+1", 16},
++      };
++      TEST_FAIL(kstrtoll, long long, "%lld", test_ll_fail);
++}
++
++static void __init test_kstrtou64_ok(void)
++{
++      DECLARE_TEST_OK(u64, struct test_u64);
++      static DEFINE_TEST_OK(struct test_u64, test_u64_ok) = {
++              {"0",   10,     0},
++              {"1",   10,     1},
++              {"126", 10,     126},
++              {"127", 10,     127},
++              {"128", 10,     128},
++              {"129", 10,     129},
++              {"254", 10,     254},
++              {"255", 10,     255},
++              {"256", 10,     256},
++              {"257", 10,     257},
++              {"32766",       10,     32766},
++              {"32767",       10,     32767},
++              {"32768",       10,     32768},
++              {"32769",       10,     32769},
++              {"65534",       10,     65534},
++              {"65535",       10,     65535},
++              {"65536",       10,     65536},
++              {"65537",       10,     65537},
++              {"2147483646",  10,     2147483646},
++              {"2147483647",  10,     2147483647},
++              {"2147483648",  10,     2147483648},
++              {"2147483649",  10,     2147483649},
++              {"4294967294",  10,     4294967294},
++              {"4294967295",  10,     4294967295},
++              {"4294967296",  10,     4294967296},
++              {"4294967297",  10,     4294967297},
++              {"9223372036854775806", 10,     9223372036854775806ULL},
++              {"9223372036854775807", 10,     9223372036854775807ULL},
++              {"9223372036854775808", 10,     9223372036854775808ULL},
++              {"9223372036854775809", 10,     9223372036854775809ULL},
++              {"18446744073709551614",        10,     18446744073709551614ULL},
++              {"18446744073709551615",        10,     18446744073709551615ULL},
++      };
++      TEST_OK(kstrtou64, u64, "%llu", test_u64_ok);
++}
++
++static void __init test_kstrtou64_fail(void)
++{
++      static DEFINE_TEST_FAIL(test_u64_fail) = {
++              {"-2",  10},
++              {"-1",  10},
++              {"18446744073709551616",        10},
++              {"18446744073709551617",        10},
++      };
++      TEST_FAIL(kstrtou64, u64, "%llu", test_u64_fail);
++}
++
++static void __init test_kstrtos64_ok(void)
++{
++      DECLARE_TEST_OK(s64, struct test_s64);
++      static DEFINE_TEST_OK(struct test_s64, test_s64_ok) = {
++              {"-128",        10,     -128},
++              {"-127",        10,     -127},
++              {"-1",  10,     -1},
++              {"0",   10,     0},
++              {"1",   10,     1},
++              {"126", 10,     126},
++              {"127", 10,     127},
++              {"128", 10,     128},
++              {"129", 10,     129},
++              {"254", 10,     254},
++              {"255", 10,     255},
++              {"256", 10,     256},
++              {"257", 10,     257},
++              {"32766",       10,     32766},
++              {"32767",       10,     32767},
++              {"32768",       10,     32768},
++              {"32769",       10,     32769},
++              {"65534",       10,     65534},
++              {"65535",       10,     65535},
++              {"65536",       10,     65536},
++              {"65537",       10,     65537},
++              {"2147483646",  10,     2147483646},
++              {"2147483647",  10,     2147483647},
++              {"2147483648",  10,     2147483648},
++              {"2147483649",  10,     2147483649},
++              {"4294967294",  10,     4294967294},
++              {"4294967295",  10,     4294967295},
++              {"4294967296",  10,     4294967296},
++              {"4294967297",  10,     4294967297},
++              {"9223372036854775806", 10,     9223372036854775806LL},
++              {"9223372036854775807", 10,     9223372036854775807LL},
++      };
++      TEST_OK(kstrtos64, s64, "%lld", test_s64_ok);
++}
++
++static void __init test_kstrtos64_fail(void)
++{
++      static DEFINE_TEST_FAIL(test_s64_fail) = {
++              {"9223372036854775808", 10},
++              {"9223372036854775809", 10},
++              {"18446744073709551614",        10},
++              {"18446744073709551615",        10},
++              {"18446744073709551616",        10},
++              {"18446744073709551617",        10},
++      };
++      TEST_FAIL(kstrtos64, s64, "%lld", test_s64_fail);
++}
++
++static void __init test_kstrtou32_ok(void)
++{
++      DECLARE_TEST_OK(u32, struct test_u32);
++      static DEFINE_TEST_OK(struct test_u32, test_u32_ok) = {
++              {"0",   10,     0},
++              {"1",   10,     1},
++              {"126", 10,     126},
++              {"127", 10,     127},
++              {"128", 10,     128},
++              {"129", 10,     129},
++              {"254", 10,     254},
++              {"255", 10,     255},
++              {"256", 10,     256},
++              {"257", 10,     257},
++              {"32766",       10,     32766},
++              {"32767",       10,     32767},
++              {"32768",       10,     32768},
++              {"32769",       10,     32769},
++              {"65534",       10,     65534},
++              {"65535",       10,     65535},
++              {"65536",       10,     65536},
++              {"65537",       10,     65537},
++              {"2147483646",  10,     2147483646},
++              {"2147483647",  10,     2147483647},
++              {"2147483648",  10,     2147483648},
++              {"2147483649",  10,     2147483649},
++              {"4294967294",  10,     4294967294},
++              {"4294967295",  10,     4294967295},
++      };
++      TEST_OK(kstrtou32, u32, "%u", test_u32_ok);
++}
++
++static void __init test_kstrtou32_fail(void)
++{
++      static DEFINE_TEST_FAIL(test_u32_fail) = {
++              {"-2",  10},
++              {"-1",  10},
++              {"4294967296",  10},
++              {"4294967297",  10},
++              {"9223372036854775806", 10},
++              {"9223372036854775807", 10},
++              {"9223372036854775808", 10},
++              {"9223372036854775809", 10},
++              {"18446744073709551614",        10},
++              {"18446744073709551615",        10},
++              {"18446744073709551616",        10},
++              {"18446744073709551617",        10},
++      };
++      TEST_FAIL(kstrtou32, u32, "%u", test_u32_fail);
++}
++
++static void __init test_kstrtos32_ok(void)
++{
++      DECLARE_TEST_OK(s32, struct test_s32);
++      static DEFINE_TEST_OK(struct test_s32, test_s32_ok) = {
++              {"-128",        10,     -128},
++              {"-127",        10,     -127},
++              {"-1",  10,     -1},
++              {"0",   10,     0},
++              {"1",   10,     1},
++              {"126", 10,     126},
++              {"127", 10,     127},
++              {"128", 10,     128},
++              {"129", 10,     129},
++              {"254", 10,     254},
++              {"255", 10,     255},
++              {"256", 10,     256},
++              {"257", 10,     257},
++              {"32766",       10,     32766},
++              {"32767",       10,     32767},
++              {"32768",       10,     32768},
++              {"32769",       10,     32769},
++              {"65534",       10,     65534},
++              {"65535",       10,     65535},
++              {"65536",       10,     65536},
++              {"65537",       10,     65537},
++              {"2147483646",  10,     2147483646},
++              {"2147483647",  10,     2147483647},
++      };
++      TEST_OK(kstrtos32, s32, "%d", test_s32_ok);
++}
++
++static void __init test_kstrtos32_fail(void)
++{
++      static DEFINE_TEST_FAIL(test_s32_fail) = {
++              {"2147483648",  10},
++              {"2147483649",  10},
++              {"4294967294",  10},
++              {"4294967295",  10},
++              {"4294967296",  10},
++              {"4294967297",  10},
++              {"9223372036854775806", 10},
++              {"9223372036854775807", 10},
++              {"9223372036854775808", 10},
++              {"9223372036854775809", 10},
++              {"18446744073709551614",        10},
++              {"18446744073709551615",        10},
++              {"18446744073709551616",        10},
++              {"18446744073709551617",        10},
++      };
++      TEST_FAIL(kstrtos32, s32, "%d", test_s32_fail);
++}
++
++static void __init test_kstrtou16_ok(void)
++{
++      DECLARE_TEST_OK(u16, struct test_u16);
++      static DEFINE_TEST_OK(struct test_u16, test_u16_ok) = {
++              {"0",   10,     0},
++              {"1",   10,     1},
++              {"126", 10,     126},
++              {"127", 10,     127},
++              {"128", 10,     128},
++              {"129", 10,     129},
++              {"254", 10,     254},
++              {"255", 10,     255},
++              {"256", 10,     256},
++              {"257", 10,     257},
++              {"32766",       10,     32766},
++              {"32767",       10,     32767},
++              {"32768",       10,     32768},
++              {"32769",       10,     32769},
++              {"65534",       10,     65534},
++              {"65535",       10,     65535},
++      };
++      TEST_OK(kstrtou16, u16, "%hu", test_u16_ok);
++}
++
++static void __init test_kstrtou16_fail(void)
++{
++      static DEFINE_TEST_FAIL(test_u16_fail) = {
++              {"-2",  10},
++              {"-1",  10},
++              {"65536",       10},
++              {"65537",       10},
++              {"2147483646",  10},
++              {"2147483647",  10},
++              {"2147483648",  10},
++              {"2147483649",  10},
++              {"4294967294",  10},
++              {"4294967295",  10},
++              {"4294967296",  10},
++              {"4294967297",  10},
++              {"9223372036854775806", 10},
++              {"9223372036854775807", 10},
++              {"9223372036854775808", 10},
++              {"9223372036854775809", 10},
++              {"18446744073709551614",        10},
++              {"18446744073709551615",        10},
++              {"18446744073709551616",        10},
++              {"18446744073709551617",        10},
++      };
++      TEST_FAIL(kstrtou16, u16, "%hu", test_u16_fail);
++}
++
++static void __init test_kstrtos16_ok(void)
++{
++      DECLARE_TEST_OK(s16, struct test_s16);
++      static DEFINE_TEST_OK(struct test_s16, test_s16_ok) = {
++              {"-130",        10,     -130},
++              {"-129",        10,     -129},
++              {"-128",        10,     -128},
++              {"-127",        10,     -127},
++              {"-1",  10,     -1},
++              {"0",   10,     0},
++              {"1",   10,     1},
++              {"126", 10,     126},
++              {"127", 10,     127},
++              {"128", 10,     128},
++              {"129", 10,     129},
++              {"254", 10,     254},
++              {"255", 10,     255},
++              {"256", 10,     256},
++              {"257", 10,     257},
++              {"32766",       10,     32766},
++              {"32767",       10,     32767},
++      };
++      TEST_OK(kstrtos16, s16, "%hd", test_s16_ok);
++}
++
++static void __init test_kstrtos16_fail(void)
++{
++      static DEFINE_TEST_FAIL(test_s16_fail) = {
++              {"32768",       10},
++              {"32769",       10},
++              {"65534",       10},
++              {"65535",       10},
++              {"65536",       10},
++              {"65537",       10},
++              {"2147483646",  10},
++              {"2147483647",  10},
++              {"2147483648",  10},
++              {"2147483649",  10},
++              {"4294967294",  10},
++              {"4294967295",  10},
++              {"4294967296",  10},
++              {"4294967297",  10},
++              {"9223372036854775806", 10},
++              {"9223372036854775807", 10},
++              {"9223372036854775808", 10},
++              {"9223372036854775809", 10},
++              {"18446744073709551614",        10},
++              {"18446744073709551615",        10},
++              {"18446744073709551616",        10},
++              {"18446744073709551617",        10},
++      };
++      TEST_FAIL(kstrtos16, s16, "%hd", test_s16_fail);
++}
++
++static void __init test_kstrtou8_ok(void)
++{
++      DECLARE_TEST_OK(u8, struct test_u8);
++      static DEFINE_TEST_OK(struct test_u8, test_u8_ok) = {
++              {"0",   10,     0},
++              {"1",   10,     1},
++              {"126", 10,     126},
++              {"127", 10,     127},
++              {"128", 10,     128},
++              {"129", 10,     129},
++              {"254", 10,     254},
++              {"255", 10,     255},
++      };
++      TEST_OK(kstrtou8, u8, "%hhu", test_u8_ok);
++}
++
++static void __init test_kstrtou8_fail(void)
++{
++      static DEFINE_TEST_FAIL(test_u8_fail) = {
++              {"-2",  10},
++              {"-1",  10},
++              {"256", 10},
++              {"257", 10},
++              {"32766",       10},
++              {"32767",       10},
++              {"32768",       10},
++              {"32769",       10},
++              {"65534",       10},
++              {"65535",       10},
++              {"65536",       10},
++              {"65537",       10},
++              {"2147483646",  10},
++              {"2147483647",  10},
++              {"2147483648",  10},
++              {"2147483649",  10},
++              {"4294967294",  10},
++              {"4294967295",  10},
++              {"4294967296",  10},
++              {"4294967297",  10},
++              {"9223372036854775806", 10},
++              {"9223372036854775807", 10},
++              {"9223372036854775808", 10},
++              {"9223372036854775809", 10},
++              {"18446744073709551614",        10},
++              {"18446744073709551615",        10},
++              {"18446744073709551616",        10},
++              {"18446744073709551617",        10},
++      };
++      TEST_FAIL(kstrtou8, u8, "%hhu", test_u8_fail);
++}
++
++static void __init test_kstrtos8_ok(void)
++{
++      DECLARE_TEST_OK(s8, struct test_s8);
++      static DEFINE_TEST_OK(struct test_s8, test_s8_ok) = {
++              {"-128",        10,     -128},
++              {"-127",        10,     -127},
++              {"-1",  10,     -1},
++              {"0",   10,     0},
++              {"1",   10,     1},
++              {"126", 10,     126},
++              {"127", 10,     127},
++      };
++      TEST_OK(kstrtos8, s8, "%hhd", test_s8_ok);
++}
++
++static void __init test_kstrtos8_fail(void)
++{
++      static DEFINE_TEST_FAIL(test_s8_fail) = {
++              {"-130",        10},
++              {"-129",        10},
++              {"128", 10},
++              {"129", 10},
++              {"254", 10},
++              {"255", 10},
++              {"256", 10},
++              {"257", 10},
++              {"32766",       10},
++              {"32767",       10},
++              {"32768",       10},
++              {"32769",       10},
++              {"65534",       10},
++              {"65535",       10},
++              {"65536",       10},
++              {"65537",       10},
++              {"2147483646",  10},
++              {"2147483647",  10},
++              {"2147483648",  10},
++              {"2147483649",  10},
++              {"4294967294",  10},
++              {"4294967295",  10},
++              {"4294967296",  10},
++              {"4294967297",  10},
++              {"9223372036854775806", 10},
++              {"9223372036854775807", 10},
++              {"9223372036854775808", 10},
++              {"9223372036854775809", 10},
++              {"18446744073709551614",        10},
++              {"18446744073709551615",        10},
++              {"18446744073709551616",        10},
++              {"18446744073709551617",        10},
++      };
++      TEST_FAIL(kstrtos8, s8, "%hhd", test_s8_fail);
++}
++
++static int __init test_kstrtox_init(void)
++{
++      test_kstrtoull_ok();
++      test_kstrtoull_fail();
++      test_kstrtoll_ok();
++      test_kstrtoll_fail();
++
++      test_kstrtou64_ok();
++      test_kstrtou64_fail();
++      test_kstrtos64_ok();
++      test_kstrtos64_fail();
++
++      test_kstrtou32_ok();
++      test_kstrtou32_fail();
++      test_kstrtos32_ok();
++      test_kstrtos32_fail();
++
++      test_kstrtou16_ok();
++      test_kstrtou16_fail();
++      test_kstrtos16_ok();
++      test_kstrtos16_fail();
++
++      test_kstrtou8_ok();
++      test_kstrtou8_fail();
++      test_kstrtos8_ok();
++      test_kstrtos8_fail();
++      return -EINVAL;
++}
++module_init(test_kstrtox_init);
++MODULE_LICENSE("Dual BSD/GPL");
+--- a/lib/vsprintf.c
++++ b/lib/vsprintf.c
+@@ -120,147 +120,6 @@ long long simple_strtoll(const char *cp,
+ }
+ EXPORT_SYMBOL(simple_strtoll);
+-/**
+- * strict_strtoul - convert a string to an unsigned long strictly
+- * @cp: The string to be converted
+- * @base: The number base to use
+- * @res: The converted result value
+- *
+- * strict_strtoul converts a string to an unsigned long only if the
+- * string is really an unsigned long string, any string containing
+- * any invalid char at the tail will be rejected and -EINVAL is returned,
+- * only a newline char at the tail is acceptible because people generally
+- * change a module parameter in the following way:
+- *
+- *    echo 1024 > /sys/module/e1000/parameters/copybreak
+- *
+- * echo will append a newline to the tail.
+- *
+- * It returns 0 if conversion is successful and *res is set to the converted
+- * value, otherwise it returns -EINVAL and *res is set to 0.
+- *
+- * simple_strtoul just ignores the successive invalid characters and
+- * return the converted value of prefix part of the string.
+- */
+-int strict_strtoul(const char *cp, unsigned int base, unsigned long *res)
+-{
+-      char *tail;
+-      unsigned long val;
+-
+-      *res = 0;
+-      if (!*cp)
+-              return -EINVAL;
+-
+-      val = simple_strtoul(cp, &tail, base);
+-      if (tail == cp)
+-              return -EINVAL;
+-
+-      if ((tail[0] == '\0') || (tail[0] == '\n' && tail[1] == '\0')) {
+-              *res = val;
+-              return 0;
+-      }
+-
+-      return -EINVAL;
+-}
+-EXPORT_SYMBOL(strict_strtoul);
+-
+-/**
+- * strict_strtol - convert a string to a long strictly
+- * @cp: The string to be converted
+- * @base: The number base to use
+- * @res: The converted result value
+- *
+- * strict_strtol is similiar to strict_strtoul, but it allows the first
+- * character of a string is '-'.
+- *
+- * It returns 0 if conversion is successful and *res is set to the converted
+- * value, otherwise it returns -EINVAL and *res is set to 0.
+- */
+-int strict_strtol(const char *cp, unsigned int base, long *res)
+-{
+-      int ret;
+-      if (*cp == '-') {
+-              ret = strict_strtoul(cp + 1, base, (unsigned long *)res);
+-              if (!ret)
+-                      *res = -(*res);
+-      } else {
+-              ret = strict_strtoul(cp, base, (unsigned long *)res);
+-      }
+-
+-      return ret;
+-}
+-EXPORT_SYMBOL(strict_strtol);
+-
+-/**
+- * strict_strtoull - convert a string to an unsigned long long strictly
+- * @cp: The string to be converted
+- * @base: The number base to use
+- * @res: The converted result value
+- *
+- * strict_strtoull converts a string to an unsigned long long only if the
+- * string is really an unsigned long long string, any string containing
+- * any invalid char at the tail will be rejected and -EINVAL is returned,
+- * only a newline char at the tail is acceptible because people generally
+- * change a module parameter in the following way:
+- *
+- *    echo 1024 > /sys/module/e1000/parameters/copybreak
+- *
+- * echo will append a newline to the tail of the string.
+- *
+- * It returns 0 if conversion is successful and *res is set to the converted
+- * value, otherwise it returns -EINVAL and *res is set to 0.
+- *
+- * simple_strtoull just ignores the successive invalid characters and
+- * return the converted value of prefix part of the string.
+- */
+-int strict_strtoull(const char *cp, unsigned int base, unsigned long long *res)
+-{
+-      char *tail;
+-      unsigned long long val;
+-
+-      *res = 0;
+-      if (!*cp)
+-              return -EINVAL;
+-
+-      val = simple_strtoull(cp, &tail, base);
+-      if (tail == cp)
+-              return -EINVAL;
+-      if ((tail[0] == '\0') || (tail[0] == '\n' && tail[1] == '\0')) {
+-              *res = val;
+-              return 0;
+-      }
+-
+-      return -EINVAL;
+-}
+-EXPORT_SYMBOL(strict_strtoull);
+-
+-/**
+- * strict_strtoll - convert a string to a long long strictly
+- * @cp: The string to be converted
+- * @base: The number base to use
+- * @res: The converted result value
+- *
+- * strict_strtoll is similiar to strict_strtoull, but it allows the first
+- * character of a string is '-'.
+- *
+- * It returns 0 if conversion is successful and *res is set to the converted
+- * value, otherwise it returns -EINVAL and *res is set to 0.
+- */
+-int strict_strtoll(const char *cp, unsigned int base, long long *res)
+-{
+-      int ret;
+-      if (*cp == '-') {
+-              ret = strict_strtoull(cp + 1, base, (unsigned long long *)res);
+-              if (!ret)
+-                      *res = -(*res);
+-      } else {
+-              ret = strict_strtoull(cp, base, (unsigned long long *)res);
+-      }
+-
+-      return ret;
+-}
+-EXPORT_SYMBOL(strict_strtoll);
+-
+ static noinline_for_stack
+ int skip_atoi(const char **s)
+ {
+--- a/scripts/checkpatch.pl
++++ b/scripts/checkpatch.pl
+@@ -2809,9 +2809,9 @@ sub process {
+                       WARN("consider using a completion\n" . $herecurr);
+               }
+-# recommend strict_strto* over simple_strto*
++# recommend kstrto* over simple_strto*
+               if ($line =~ /\bsimple_(strto.*?)\s*\(/) {
+-                      WARN("consider using strict_$1 in preference to simple_$1\n" . $herecurr);
++                      WARN("consider using kstrto* in preference to simple_$1\n" . $herecurr);
+               }
+ # check for __initcall(), use device_initcall() explicitly please
+               if ($line =~ /^.\s*__initcall\s*\(/) {
diff --git a/queue-2.6.38/maintainers-update-stable-branch-info.patch b/queue-2.6.38/maintainers-update-stable-branch-info.patch
new file mode 100644 (file)
index 0000000..b3cc03c
--- /dev/null
@@ -0,0 +1,32 @@
+From d00ebeac5f24f290636f7a895dafc124b2930a08 Mon Sep 17 00:00:00 2001
+From: Randy Dunlap <randy.dunlap@oracle.com>
+Date: Thu, 14 Apr 2011 15:22:07 -0700
+Subject: MAINTAINERS: update STABLE BRANCH info
+
+From: Randy Dunlap <randy.dunlap@oracle.com>
+
+commit d00ebeac5f24f290636f7a895dafc124b2930a08 upstream.
+
+Drop Chris Wright from STABLE maintainers.  He hasn't done STABLE release
+work for quite some time.
+
+Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
+Acked-by: Chris Wright <chrisw@sous-sol.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ MAINTAINERS |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -5944,7 +5944,6 @@ F:       arch/alpha/kernel/srm_env.c
+ STABLE BRANCH
+ M:    Greg Kroah-Hartman <greg@kroah.com>
+-M:    Chris Wright <chrisw@sous-sol.org>
+ L:    stable@kernel.org
+ S:    Maintained
diff --git a/queue-2.6.38/mm-thp-use-conventional-format-for-boolean-attributes.patch b/queue-2.6.38/mm-thp-use-conventional-format-for-boolean-attributes.patch
new file mode 100644 (file)
index 0000000..86b1cf4
--- /dev/null
@@ -0,0 +1,73 @@
+From e27e6151b154ff6e5e8162efa291bc60196d29ea Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Thu, 14 Apr 2011 15:22:21 -0700
+Subject: mm/thp: use conventional format for boolean attributes
+
+From: Ben Hutchings <ben@decadent.org.uk>
+
+commit e27e6151b154ff6e5e8162efa291bc60196d29ea upstream.
+
+The conventional format for boolean attributes in sysfs is numeric ("0" or
+"1" followed by new-line).  Any boolean attribute can then be read and
+written using a generic function.  Using the strings "yes [no]", "[yes]
+no" (read), "yes" and "no" (write) will frustrate this.
+
+[akpm@linux-foundation.org: use kstrtoul()]
+[akpm@linux-foundation.org: test_bit() doesn't return 1/0, per Neil]
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Andrea Arcangeli <aarcange@redhat.com>
+Cc: Mel Gorman <mel@csn.ul.ie>
+Cc: Johannes Weiner <jweiner@redhat.com>
+Cc: Rik van Riel <riel@redhat.com>
+Cc: Hugh Dickins <hughd@google.com>
+Tested-by: David Rientjes <rientjes@google.com>
+Cc: NeilBrown <neilb@suse.de>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ mm/huge_memory.c |   24 ++++++++++++++----------
+ 1 file changed, 14 insertions(+), 10 deletions(-)
+
+--- a/mm/huge_memory.c
++++ b/mm/huge_memory.c
+@@ -244,24 +244,28 @@ static ssize_t single_flag_show(struct k
+                               struct kobj_attribute *attr, char *buf,
+                               enum transparent_hugepage_flag flag)
+ {
+-      if (test_bit(flag, &transparent_hugepage_flags))
+-              return sprintf(buf, "[yes] no\n");
+-      else
+-              return sprintf(buf, "yes [no]\n");
++      return sprintf(buf, "%d\n",
++                     !!test_bit(flag, &transparent_hugepage_flags));
+ }
++
+ static ssize_t single_flag_store(struct kobject *kobj,
+                                struct kobj_attribute *attr,
+                                const char *buf, size_t count,
+                                enum transparent_hugepage_flag flag)
+ {
+-      if (!memcmp("yes", buf,
+-                  min(sizeof("yes")-1, count))) {
++      unsigned long value;
++      int ret;
++
++      ret = kstrtoul(buf, 10, &value);
++      if (ret < 0)
++              return ret;
++      if (value > 1)
++              return -EINVAL;
++
++      if (value)
+               set_bit(flag, &transparent_hugepage_flags);
+-      } else if (!memcmp("no", buf,
+-                         min(sizeof("no")-1, count))) {
++      else
+               clear_bit(flag, &transparent_hugepage_flags);
+-      } else
+-              return -EINVAL;
+       return count;
+ }
diff --git a/queue-2.6.38/oom-kill-remove-boost_dying_task_prio.patch b/queue-2.6.38/oom-kill-remove-boost_dying_task_prio.patch
new file mode 100644 (file)
index 0000000..433b0f9
--- /dev/null
@@ -0,0 +1,97 @@
+From 341aea2bc48bf652777fb015cc2b3dfa9a451817 Mon Sep 17 00:00:00 2001
+From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
+Date: Thu, 14 Apr 2011 15:22:13 -0700
+Subject: oom-kill: remove boost_dying_task_prio()
+
+From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
+
+commit 341aea2bc48bf652777fb015cc2b3dfa9a451817 upstream.
+
+This is an almost-revert of commit 93b43fa ("oom: give the dying task a
+higher priority").
+
+That commit dramatically improved oom killer logic when a fork-bomb
+occurs.  But I've found that it has nasty corner case.  Now cpu cgroup has
+strange default RT runtime.  It's 0!  That said, if a process under cpu
+cgroup promote RT scheduling class, the process never run at all.
+
+If an admin inserts a !RT process into a cpu cgroup by setting
+rtruntime=0, usually it runs perfectly because a !RT task isn't affected
+by the rtruntime knob.  But if it promotes an RT task via an explicit
+setscheduler() syscall or an OOM, the task can't run at all.  In short,
+the oom killer doesn't work at all if admins are using cpu cgroup and don't
+touch the rtruntime knob.
+
+Eventually, kernel may hang up when oom kill occur.  I and the original
+author Luis agreed to disable this logic.
+
+Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
+Acked-by: Luis Claudio R. Goncalves <lclaudio@uudg.org>
+Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
+Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
+Acked-by: David Rientjes <rientjes@google.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ mm/oom_kill.c |   27 ---------------------------
+ 1 file changed, 27 deletions(-)
+
+--- a/mm/oom_kill.c
++++ b/mm/oom_kill.c
+@@ -84,24 +84,6 @@ static bool has_intersects_mems_allowed(
+ #endif /* CONFIG_NUMA */
+ /*
+- * If this is a system OOM (not a memcg OOM) and the task selected to be
+- * killed is not already running at high (RT) priorities, speed up the
+- * recovery by boosting the dying task to the lowest FIFO priority.
+- * That helps with the recovery and avoids interfering with RT tasks.
+- */
+-static void boost_dying_task_prio(struct task_struct *p,
+-                                struct mem_cgroup *mem)
+-{
+-      struct sched_param param = { .sched_priority = 1 };
+-
+-      if (mem)
+-              return;
+-
+-      if (!rt_task(p))
+-              sched_setscheduler_nocheck(p, SCHED_FIFO, &param);
+-}
+-
+-/*
+  * The process p may have detached its own ->mm while exiting or through
+  * use_mm(), but one or more of its subthreads may still have a valid
+  * pointer.  Return p, or any of its subthreads with a valid ->mm, with
+@@ -452,13 +434,6 @@ static int oom_kill_task(struct task_str
+       set_tsk_thread_flag(p, TIF_MEMDIE);
+       force_sig(SIGKILL, p);
+-      /*
+-       * We give our sacrificial lamb high priority and access to
+-       * all the memory it needs. That way it should be able to
+-       * exit() and clear out its resources quickly...
+-       */
+-      boost_dying_task_prio(p, mem);
+-
+       return 0;
+ }
+ #undef K
+@@ -482,7 +457,6 @@ static int oom_kill_process(struct task_
+        */
+       if (p->flags & PF_EXITING) {
+               set_tsk_thread_flag(p, TIF_MEMDIE);
+-              boost_dying_task_prio(p, mem);
+               return 0;
+       }
+@@ -701,7 +675,6 @@ void out_of_memory(struct zonelist *zone
+        */
+       if (fatal_signal_pending(current)) {
+               set_thread_flag(TIF_MEMDIE);
+-              boost_dying_task_prio(current, NULL);
+               return;
+       }
diff --git a/queue-2.6.38/ramfs-fix-memleak-on-no-mmu-arch.patch b/queue-2.6.38/ramfs-fix-memleak-on-no-mmu-arch.patch
new file mode 100644 (file)
index 0000000..8432758
--- /dev/null
@@ -0,0 +1,88 @@
+From b836aec53e2bce71de1d5415313380688c851477 Mon Sep 17 00:00:00 2001
+From: Bob Liu <lliubbo@gmail.com>
+Date: Thu, 14 Apr 2011 15:22:20 -0700
+Subject: ramfs: fix memleak on no-mmu arch
+
+From: Bob Liu <lliubbo@gmail.com>
+
+commit b836aec53e2bce71de1d5415313380688c851477 upstream.
+
+On no-mmu arch, there is a memleak during shmem test.  The cause of this
+memleak is ramfs_nommu_expand_for_mapping() added page refcount to 2
+which makes iput() can't free that pages.
+
+The simple test file is like this:
+
+  int main(void)
+  {
+       int i;
+       key_t k = ftok("/etc", 42);
+
+       for ( i=0; i<100; ++i) {
+               int id = shmget(k, 10000, 0644|IPC_CREAT);
+               if (id == -1) {
+                       printf("shmget error\n");
+               }
+               if(shmctl(id, IPC_RMID, NULL ) == -1) {
+                       printf("shm  rm error\n");
+                       return -1;
+               }
+       }
+       printf("run ok...\n");
+       return 0;
+  }
+
+And the result:
+
+  root:/> free
+               total         used         free       shared      buffers
+  Mem:         60320        17912        42408            0            0
+  -/+ buffers:              17912        42408
+  root:/> shmem
+  run ok...
+  root:/> free
+               total         used         free       shared      buffers
+  Mem:         60320        19096        41224            0            0
+  -/+ buffers:              19096        41224
+  root:/> shmem
+  run ok...
+  root:/> free
+               total         used         free       shared      buffers
+  Mem:         60320        20296        40024            0            0
+  -/+ buffers:              20296        40024
+  ...
+
+After this patch the test result is:(no memleak anymore)
+
+  root:/> free
+               total         used         free       shared      buffers
+  Mem:         60320        16668        43652            0            0
+  -/+ buffers:              16668        43652
+  root:/> shmem
+  run ok...
+  root:/> free
+               total         used         free       shared      buffers
+  Mem:         60320        16668        43652            0            0
+  -/+ buffers:              16668        43652
+
+Signed-off-by: Bob Liu <lliubbo@gmail.com>
+Acked-by: Hugh Dickins <hughd@google.com>
+Signed-off-by: David Howells <dhowells@redhat.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/ramfs/file-nommu.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/fs/ramfs/file-nommu.c
++++ b/fs/ramfs/file-nommu.c
+@@ -112,6 +112,7 @@ int ramfs_nommu_expand_for_mapping(struc
+               SetPageDirty(page);
+               unlock_page(page);
++              put_page(page);
+       }
+       return 0;
index 8206172788d5e69ee54e657ab23815c94c012df7..1c2b607bec537378c69fed7e23d834fd30433f2f 100644 (file)
@@ -31,3 +31,12 @@ sparc-fix-.size-directive-for-do_int_load.patch
 sparc32-fix-might-be-used-uninitialized-warning-in-do_sparc_fault.patch
 sparc32-pass-task_struct-to-schedule_tail-in-ret_from_fork.patch
 sparc64-fix-build-errors-with-gcc-4.6.0.patch
+futex-set-flags_has_timeout-during-futex_wait-restart-setup.patch
+kstrto-converting-strings-to-integers-done-hopefully-right.patch
+mm-thp-use-conventional-format-for-boolean-attributes.patch
+ramfs-fix-memleak-on-no-mmu-arch.patch
+oom-kill-remove-boost_dying_task_prio.patch
+maintainers-update-stable-branch-info.patch
+ubifs-fix-oops-when-r-o-file-system-is-fsync-ed.patch
+x86-amd-set-arat-feature-on-amd-processors.patch
+x86-amd-disable-garttlbwlkerr-when-bios-forgets-it.patch
diff --git a/queue-2.6.38/ubifs-fix-oops-when-r-o-file-system-is-fsync-ed.patch b/queue-2.6.38/ubifs-fix-oops-when-r-o-file-system-is-fsync-ed.patch
new file mode 100644 (file)
index 0000000..ffbe99b
--- /dev/null
@@ -0,0 +1,49 @@
+From 78530bf7f2559b317c04991b52217c1608d5a58d Mon Sep 17 00:00:00 2001
+From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
+Date: Wed, 13 Apr 2011 10:31:52 +0300
+Subject: UBIFS: fix oops when R/O file-system is fsync'ed
+
+From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
+
+commit 78530bf7f2559b317c04991b52217c1608d5a58d upstream.
+
+This patch fixes severe UBIFS bug: UBIFS oopses when we 'fsync()' an
+file on R/O-mounter file-system. We (the UBIFS authors) incorrectly
+thought that VFS would not propagate 'fsync()' down to the file-system
+if it is read-only, but this is not the case.
+
+It is easy to exploit this bug using the following simple perl script:
+
+use strict;
+use File::Sync qw(fsync sync);
+
+die "File path is not specified" if not defined $ARGV[0];
+my $path = $ARGV[0];
+
+open FILE, "<", "$path" or die "Cannot open $path: $!";
+fsync(\*FILE) or die "cannot fsync $path: $!";
+close FILE or die "Cannot close $path: $!";
+
+Thanks to Reuben Dowle <Reuben.Dowle@navico.com> for reporting about this
+issue.
+
+Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
+Reported-by: Reuben Dowle <Reuben.Dowle@navico.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/ubifs/file.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/fs/ubifs/file.c
++++ b/fs/ubifs/file.c
+@@ -1309,6 +1309,9 @@ int ubifs_fsync(struct file *file, int d
+       dbg_gen("syncing inode %lu", inode->i_ino);
++      if (inode->i_sb->s_flags & MS_RDONLY)
++              return 0;
++
+       /*
+        * VFS has already synchronized dirty pages for this inode. Synchronize
+        * the inode unless this is a 'datasync()' call.
diff --git a/queue-2.6.38/x86-amd-disable-garttlbwlkerr-when-bios-forgets-it.patch b/queue-2.6.38/x86-amd-disable-garttlbwlkerr-when-bios-forgets-it.patch
new file mode 100644 (file)
index 0000000..c41d233
--- /dev/null
@@ -0,0 +1,79 @@
+From 5bbc097d890409d8eff4e3f1d26f11a9d6b7c07e Mon Sep 17 00:00:00 2001
+From: Joerg Roedel <joerg.roedel@amd.com>
+Date: Fri, 15 Apr 2011 14:47:40 +0200
+Subject: x86, amd: Disable GartTlbWlkErr when BIOS forgets it
+
+From: Joerg Roedel <joerg.roedel@amd.com>
+
+commit 5bbc097d890409d8eff4e3f1d26f11a9d6b7c07e upstream.
+
+This patch disables GartTlbWlk errors on AMD Fam10h CPUs if
+the BIOS forgets to do is (or is just too old). Letting
+these errors enabled can cause a sync-flood on the CPU
+causing a reboot.
+
+The AMD BKDG recommends disabling GART TLB Wlk Error completely.
+
+This patch is the fix for
+
+       https://bugzilla.kernel.org/show_bug.cgi?id=33012
+
+on my machine.
+
+Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
+Link: http://lkml.kernel.org/r/20110415131152.GJ18463@8bytes.org
+Tested-by: Alexandre Demers <alexandre.f.demers@gmail.com>
+Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/include/asm/msr-index.h |    4 ++++
+ arch/x86/kernel/cpu/amd.c        |   19 +++++++++++++++++++
+ 2 files changed, 23 insertions(+)
+
+--- a/arch/x86/include/asm/msr-index.h
++++ b/arch/x86/include/asm/msr-index.h
+@@ -92,11 +92,15 @@
+ #define MSR_IA32_MC0_ADDR             0x00000402
+ #define MSR_IA32_MC0_MISC             0x00000403
++#define MSR_AMD64_MC0_MASK            0xc0010044
++
+ #define MSR_IA32_MCx_CTL(x)           (MSR_IA32_MC0_CTL + 4*(x))
+ #define MSR_IA32_MCx_STATUS(x)                (MSR_IA32_MC0_STATUS + 4*(x))
+ #define MSR_IA32_MCx_ADDR(x)          (MSR_IA32_MC0_ADDR + 4*(x))
+ #define MSR_IA32_MCx_MISC(x)          (MSR_IA32_MC0_MISC + 4*(x))
++#define MSR_AMD64_MCx_MASK(x)         (MSR_AMD64_MC0_MASK + (x))
++
+ /* These are consecutive and not in the normal 4er MCE bank block */
+ #define MSR_IA32_MC0_CTL2             0x00000280
+ #define MSR_IA32_MCx_CTL2(x)          (MSR_IA32_MC0_CTL2 + (x))
+--- a/arch/x86/kernel/cpu/amd.c
++++ b/arch/x86/kernel/cpu/amd.c
+@@ -598,6 +598,25 @@ static void __cpuinit init_amd(struct cp
+       /* As a rule processors have APIC timer running in deep C states */
+       if (c->x86 >= 0xf && !cpu_has_amd_erratum(amd_erratum_400))
+               set_cpu_cap(c, X86_FEATURE_ARAT);
++
++      /*
++       * Disable GART TLB Walk Errors on Fam10h. We do this here
++       * because this is always needed when GART is enabled, even in a
++       * kernel which has no MCE support built in.
++       */
++      if (c->x86 == 0x10) {
++              /*
++               * BIOS should disable GartTlbWlk Errors themself. If
++               * it doesn't do it here as suggested by the BKDG.
++               *
++               * Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=33012
++               */
++              u64 mask;
++
++              rdmsrl(MSR_AMD64_MCx_MASK(4), mask);
++              mask |= (1 << 10);
++              wrmsrl(MSR_AMD64_MCx_MASK(4), mask);
++      }
+ }
+ #ifdef CONFIG_X86_32
diff --git a/queue-2.6.38/x86-amd-set-arat-feature-on-amd-processors.patch b/queue-2.6.38/x86-amd-set-arat-feature-on-amd-processors.patch
new file mode 100644 (file)
index 0000000..9f89ef0
--- /dev/null
@@ -0,0 +1,46 @@
+From b87cf80af3ba4b4c008b4face3c68d604e1715c6 Mon Sep 17 00:00:00 2001
+From: Boris Ostrovsky <boris.ostrovsky@amd.com>
+Date: Tue, 15 Mar 2011 12:13:44 -0400
+Subject: x86, AMD: Set ARAT feature on AMD processors
+
+From: Boris Ostrovsky <boris.ostrovsky@amd.com>
+
+commit b87cf80af3ba4b4c008b4face3c68d604e1715c6 upstream.
+
+Support for Always Running APIC timer (ARAT) was introduced in
+commit db954b5898dd3ef3ef93f4144158ea8f97deb058. This feature
+allows us to avoid switching timers from LAPIC to something else
+(e.g. HPET) and go into timer broadcasts when entering deep
+C-states.
+
+AMD processors don't provide a CPUID bit for that feature but
+they also keep APIC timers running in deep C-states (except for
+cases when the processor is affected by erratum 400). Therefore
+we should set ARAT feature bit on AMD CPUs.
+
+Tested-by: Borislav Petkov <borislav.petkov@amd.com>
+Acked-by: Andreas Herrmann <andreas.herrmann3@amd.com>
+Acked-by: Mark Langsdorf <mark.langsdorf@amd.com>
+Acked-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Boris Ostrovsky <boris.ostrovsky@amd.com>
+LKML-Reference: <1300205624-4813-1-git-send-email-ostr@amd64.org>
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/kernel/cpu/amd.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/arch/x86/kernel/cpu/amd.c
++++ b/arch/x86/kernel/cpu/amd.c
+@@ -594,6 +594,10 @@ static void __cpuinit init_amd(struct cp
+               }
+       }
+ #endif
++
++      /* As a rule processors have APIC timer running in deep C states */
++      if (c->x86 >= 0xf && !cpu_has_amd_erratum(amd_erratum_400))
++              set_cpu_cap(c, X86_FEATURE_ARAT);
+ }
+ #ifdef CONFIG_X86_32