]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
Merge branch 'for-33' of git://repo.or.cz/linux-kbuild
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Dec 2009 15:23:42 +0000 (07:23 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Dec 2009 15:23:42 +0000 (07:23 -0800)
* 'for-33' of git://repo.or.cz/linux-kbuild: (29 commits)
  net: fix for utsrelease.h moving to generated
  gen_init_cpio: fixed fwrite warning
  kbuild: fix make clean after mismerge
  kbuild: generate modules.builtin
  genksyms: properly consider  EXPORT_UNUSED_SYMBOL{,_GPL}()
  score: add asm/asm-offsets.h wrapper
  unifdef: update to upstream revision 1.190
  kbuild: specify absolute paths for cscope
  kbuild: create include/generated in silentoldconfig
  scripts/package: deb-pkg: use fakeroot if available
  scripts/package: add KBUILD_PKG_ROOTCMD variable
  scripts/package: tar-pkg: use tar --owner=root
  Kbuild: clean up marker
  net: add net_tstamp.h to headers_install
  kbuild: move utsrelease.h to include/generated
  kbuild: move autoconf.h to include/generated
  drop explicit include of autoconf.h
  kbuild: move compile.h to include/generated
  kbuild: drop include/asm
  kbuild: do not check for include/asm-$ARCH
  ...

Fixed non-conflicting clean merge of modpost.c as per comments from
Stephen Rothwell (modpost.c had grown an include of linux/autoconf.h
that needed to be changed to generated/autoconf.h)

1  2 
MAINTAINERS
arch/powerpc/platforms/chrp/setup.c
include/linux/page-flags.h
kernel/kexec.c
kernel/trace/trace.c
scripts/Makefile.lib
scripts/mod/modpost.c

diff --combined MAINTAINERS
index 0699782f8c5bf869eb65059454ef4de1e909f04c,94381eddccfa707c3198476feb6a86fb00ac07c5..efd2ef2c266073d39e8611a1bd6e5dbd38646f41
@@@ -835,13 -835,13 +835,13 @@@ F:      arch/arm/mach-pxa/palmte2.
  F:    arch/arm/mach-pxa/include/mach/palmtc.h
  F:    arch/arm/mach-pxa/palmtc.c
  
 -ARM/PALM TREO 680 SUPPORT
 +ARM/PALM TREO SUPPORT
  M:    Tomas Cech <sleep_walker@suse.cz>
  L:    linux-arm-kernel@lists.infradead.org
  W:    http://hackndev.com
  S:    Maintained
 -F:    arch/arm/mach-pxa/include/mach/treo680.h
 -F:    arch/arm/mach-pxa/treo680.c
 +F:    arch/arm/mach-pxa/include/mach/palmtreo.h
 +F:    arch/arm/mach-pxa/palmtreo.c
  
  ARM/PALMZ72 SUPPORT
  M:    Sergey Lapin <slapin@ossfans.org>
@@@ -1482,8 -1482,8 +1482,8 @@@ F:      include/linux/coda*.
  
  COMMON INTERNET FILE SYSTEM (CIFS)
  M:    Steve French <sfrench@samba.org>
 -L:    linux-cifs-client@lists.samba.org
 -L:    samba-technical@lists.samba.org
 +L:    linux-cifs-client@lists.samba.org (moderated for non-subscribers)
 +L:    samba-technical@lists.samba.org (moderated for non-subscribers)
  W:    http://linux-cifs.samba.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git
  S:    Supported
@@@ -2377,15 -2377,6 +2377,15 @@@ W:    http://www.kernel.org/pub/linux/kern
  S:    Maintained
  F:    drivers/hwmon/hdaps.c
  
 +HWPOISON MEMORY FAILURE HANDLING
 +M:    Andi Kleen <andi@firstfloor.org>
 +L:    linux-mm@kvack.org
 +L:    linux-kernel@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6.git hwpoison
 +S:    Maintained
 +F:    mm/memory-failure.c
 +F:    mm/hwpoison-inject.c
 +
  HYPERVISOR VIRTUAL CONSOLE DRIVER
  L:    linuxppc-dev@ozlabs.org
  S:    Odd Fixes
@@@ -3090,11 -3081,8 +3090,11 @@@ S:    Maintaine
  F:    fs/autofs4/
  
  KERNEL BUILD
 +M:    Michal Marek <mmarek@suse.cz>
 +T:    git git://repo.or.cz/linux-kbuild.git for-next
 +T:    git git://repo.or.cz/linux-kbuild.git for-linus
  L:    linux-kbuild@vger.kernel.org
 -S:    Orphan
 +S:    Maintained
  F:    Documentation/kbuild/
  F:    Makefile
  F:    scripts/Makefile.*
@@@ -3136,6 -3124,7 +3136,6 @@@ L:      kvm@vger.kernel.or
  W:    http://kvm.qumranet.com
  S:    Supported
  F:    arch/x86/include/asm/svm.h
 -F:    arch/x86/kvm/kvm_svm.h
  F:    arch/x86/kvm/svm.c
  
  KERNEL VIRTUAL MACHINE (KVM) FOR POWERPC
@@@ -3271,7 -3260,6 +3271,7 @@@ LINUX FOR IBM pSERIES (RS/6000
  M:    Paul Mackerras <paulus@au.ibm.com>
  W:    http://www.ibm.com/linux/ltc/projects/ppc
  S:    Supported
 +F:    arch/powerpc/boot/rs6000.h
  
  LINUX FOR POWERPC (32-BIT AND 64-BIT)
  M:    Benjamin Herrenschmidt <benh@kernel.crashing.org>
@@@ -3280,24 -3268,18 +3280,24 @@@ W:   http://www.penguinppc.org
  L:    linuxppc-dev@ozlabs.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
  S:    Supported
 +F:    Documentation/powerpc/
 +F:    arch/powerpc/
  
  LINUX FOR POWER MACINTOSH
  M:    Benjamin Herrenschmidt <benh@kernel.crashing.org>
  W:    http://www.penguinppc.org/
  L:    linuxppc-dev@ozlabs.org
  S:    Maintained
 +F:    arch/powerpc/platforms/powermac/
 +F:    drivers/macintosh/
  
  LINUX FOR POWERPC EMBEDDED MPC5XXX
  M:    Grant Likely <grant.likely@secretlab.ca>
  L:    linuxppc-dev@ozlabs.org
  T:    git git://git.secretlab.ca/git/linux-2.6.git
  S:    Maintained
 +F:    arch/powerpc/platforms/512x/
 +F:    arch/powerpc/platforms/52xx/
  
  LINUX FOR POWERPC EMBEDDED PPC4XX
  M:    Josh Boyer <jwboyer@linux.vnet.ibm.com>
@@@ -3306,8 -3288,6 +3306,8 @@@ W:      http://www.penguinppc.org
  L:    linuxppc-dev@ozlabs.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git
  S:    Maintained
 +F:    arch/powerpc/platforms/40x/
 +F:    arch/powerpc/platforms/44x/
  
  LINUX FOR POWERPC EMBEDDED XILINX VIRTEX
  M:    Grant Likely <grant.likely@secretlab.ca>
@@@ -3315,8 -3295,6 +3315,8 @@@ W:      http://wiki.secretlab.ca/index.php/L
  L:    linuxppc-dev@ozlabs.org
  T:    git git://git.secretlab.ca/git/linux-2.6.git
  S:    Maintained
 +F:    arch/powerpc/*/*virtex*
 +F:    arch/powerpc/*/*/*virtex*
  
  LINUX FOR POWERPC EMBEDDED PPC8XX
  M:    Vitaly Bordug <vitb@kernel.crashing.org>
@@@ -3330,16 -3308,12 +3330,16 @@@ M:   Kumar Gala <galak@kernel.crashing.or
  W:    http://www.penguinppc.org/
  L:    linuxppc-dev@ozlabs.org
  S:    Maintained
 +F:    arch/powerpc/platforms/83xx/
  
  LINUX FOR POWERPC PA SEMI PWRFICIENT
  M:    Olof Johansson <olof@lixom.net>
  W:    http://www.pasemi.com/
  L:    linuxppc-dev@ozlabs.org
  S:    Supported
 +F:    arch/powerpc/platforms/pasemi/
 +F:    drivers/*/*pasemi*
 +F:    drivers/*/*/*pasemi*
  
  LINUX SECURITY MODULE (LSM) FRAMEWORK
  M:    Chris Wright <chrisw@sous-sol.org>
@@@ -5091,7 -5065,6 +5091,7 @@@ F:      drivers/char/specialix
  
  SPI SUBSYSTEM
  M:    David Brownell <dbrownell@users.sourceforge.net>
 +M:    Grant Likely <grant.likely@secretlab.ca>
  L:    spi-devel-general@lists.sourceforge.net
  S:    Maintained
  F:    Documentation/spi/
@@@ -5434,6 -5407,12 +5434,12 @@@ F:    drivers/uwb/
  F:    include/linux/uwb.h
  F:    include/linux/uwb/
  
+ UNIFDEF
+ M:    Tony Finch <dot@dotat.at>
+ W:    http://dotat.at/prog/unifdef
+ S:    Maintained
+ F:    scripts/unifdef.c
  UNIFORM CDROM DRIVER
  M:    Jens Axboe <axboe@kernel.dk>
  W:    http://www.kernel.dk
@@@ -5985,7 -5964,6 +5991,7 @@@ M:      Mark Brown <broonie@opensource.wolfs
  T:    git git://opensource.wolfsonmicro.com/linux-2.6-audioplus
  W:    http://opensource.wolfsonmicro.com/node/8
  S:    Supported
 +F:    Documentation/hwmon/wm83??
  F:    drivers/leds/leds-wm83*.c
  F:    drivers/mfd/wm8*.c
  F:    drivers/power/wm83*.c
@@@ -5995,14 -5973,14 +6001,14 @@@ F:   drivers/video/backlight/wm83*_bl.
  F:    drivers/watchdog/wm83*_wdt.c
  F:    include/linux/mfd/wm831x/
  F:    include/linux/mfd/wm8350/
 -F:    include/linux/mfd/wm8400/
 -F:    sound/soc/codecs/wm8350.c
 -F:    sound/soc/codecs/wm8400.c
 +F:    include/linux/mfd/wm8400*
 +F:    sound/soc/codecs/wm8350.*
 +F:    sound/soc/codecs/wm8400.*
  
  X.25 NETWORK LAYER
 -M:    Henner Eisen <eis@baty.hanse.de>
 +M:    Andrew Hendry <andrew.hendry@gmail.com>
  L:    linux-x25@vger.kernel.org
 -S:    Maintained
 +S:    Odd Fixes
  F:    Documentation/networking/x25*
  F:    include/net/x25*
  F:    net/x25/
index 52f3df3b4ca0a6a196e1712e6038a303661b7aed,0a6f5ab8aab36aeece1974cebd2b0e7a67b698cb..8f41685d8f42b5669ee2a7e2492b5755e6919986
@@@ -23,7 -23,7 +23,7 @@@
  #include <linux/reboot.h>
  #include <linux/init.h>
  #include <linux/pci.h>
- #include <linux/utsrelease.h>
+ #include <generated/utsrelease.h>
  #include <linux/adb.h>
  #include <linux/module.h>
  #include <linux/delay.h>
@@@ -364,6 -364,19 +364,6 @@@ void __init chrp_setup_arch(void
        if (ppc_md.progress) ppc_md.progress("Linux/PPC "UTS_RELEASE"\n", 0x0);
  }
  
 -void
 -chrp_event_scan(unsigned long unused)
 -{
 -      unsigned char log[1024];
 -      int ret = 0;
 -
 -      /* XXX: we should loop until the hardware says no more error logs -- Cort */
 -      rtas_call(rtas_token("event-scan"), 4, 1, &ret, 0xffffffff, 0,
 -                __pa(log), 1024);
 -      mod_timer(&__get_cpu_var(heartbeat_timer),
 -                jiffies + event_scan_interval);
 -}
 -
  static void chrp_8259_cascade(unsigned int irq, struct irq_desc *desc)
  {
        unsigned int cascade_irq = i8259_irq();
@@@ -555,6 -568,9 +555,6 @@@ void __init chrp_init_IRQ(void
  void __init
  chrp_init2(void)
  {
 -      struct device_node *device;
 -      const unsigned int *p = NULL;
 -
  #ifdef CONFIG_NVRAM
        chrp_nvram_init();
  #endif
        request_region(0x80,0x10,"dma page reg");
        request_region(0xc0,0x20,"dma2");
  
 -      /* Get the event scan rate for the rtas so we know how
 -       * often it expects a heartbeat. -- Cort
 -       */
 -      device = of_find_node_by_name(NULL, "rtas");
 -      if (device)
 -              p = of_get_property(device, "rtas-event-scan-rate", NULL);
 -      if (p && *p) {
 -              /*
 -               * Arrange to call chrp_event_scan at least *p times
 -               * per minute.  We use 59 rather than 60 here so that
 -               * the rate will be slightly higher than the minimum.
 -               * This all assumes we don't do hotplug CPU on any
 -               * machine that needs the event scans done.
 -               */
 -              unsigned long interval, offset;
 -              int cpu, ncpus;
 -              struct timer_list *timer;
 -
 -              interval = HZ * 59 / *p;
 -              offset = HZ;
 -              ncpus = num_online_cpus();
 -              event_scan_interval = ncpus * interval;
 -              for (cpu = 0; cpu < ncpus; ++cpu) {
 -                      timer = &per_cpu(heartbeat_timer, cpu);
 -                      setup_timer(timer, chrp_event_scan, 0);
 -                      timer->expires = jiffies + offset;
 -                      add_timer_on(timer, cpu);
 -                      offset += interval;
 -              }
 -              printk("RTAS Event Scan Rate: %u (%lu jiffies)\n",
 -                     *p, interval);
 -      }
 -      of_node_put(device);
 -
        if (ppc_md.progress)
                ppc_md.progress("  Have fun!    ", 0x7777);
  }
index feee2ba8d06a39e90e841289e8e83b9750ee871e,ef36725aa51527bdf61ce8542f9d85afcb33563e..5b59f35dcb8fdd3ef12c4bc4f2cd5f439e63053b
@@@ -8,7 -8,7 +8,7 @@@
  #include <linux/types.h>
  #ifndef __GENERATING_BOUNDS_H
  #include <linux/mm_types.h>
- #include <linux/bounds.h>
+ #include <generated/bounds.h>
  #endif /* !__GENERATING_BOUNDS_H */
  
  /*
@@@ -99,7 -99,7 +99,7 @@@ enum pageflags 
        PG_buddy,               /* Page is free, on buddy lists */
        PG_swapbacked,          /* Page is backed by RAM/swap */
        PG_unevictable,         /* Page is "unevictable"  */
 -#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
 +#ifdef CONFIG_MMU
        PG_mlocked,             /* Page is vma mlocked */
  #endif
  #ifdef CONFIG_ARCH_USES_PG_UNCACHED
@@@ -259,10 -259,12 +259,10 @@@ PAGEFLAG_FALSE(SwapCache
  PAGEFLAG(Unevictable, unevictable) __CLEARPAGEFLAG(Unevictable, unevictable)
        TESTCLEARFLAG(Unevictable, unevictable)
  
 -#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
 -#define MLOCK_PAGES 1
 +#ifdef CONFIG_MMU
  PAGEFLAG(Mlocked, mlocked) __CLEARPAGEFLAG(Mlocked, mlocked)
        TESTSCFLAG(Mlocked, mlocked) __TESTCLEARFLAG(Mlocked, mlocked)
  #else
 -#define MLOCK_PAGES 0
  PAGEFLAG_FALSE(Mlocked) SETPAGEFLAG_NOOP(Mlocked)
        TESTCLEARFLAG_FALSE(Mlocked) __TESTCLEARFLAG_FALSE(Mlocked)
  #endif
@@@ -275,15 -277,13 +275,15 @@@ PAGEFLAG_FALSE(Uncached
  
  #ifdef CONFIG_MEMORY_FAILURE
  PAGEFLAG(HWPoison, hwpoison)
 -TESTSETFLAG(HWPoison, hwpoison)
 +TESTSCFLAG(HWPoison, hwpoison)
  #define __PG_HWPOISON (1UL << PG_hwpoison)
  #else
  PAGEFLAG_FALSE(HWPoison)
  #define __PG_HWPOISON 0
  #endif
  
 +u64 stable_page_flags(struct page *page);
 +
  static inline int PageUptodate(struct page *page)
  {
        int ret = test_bit(PG_uptodate, &(page)->flags);
@@@ -393,7 -393,7 +393,7 @@@ static inline void __ClearPageTail(stru
  
  #endif /* !PAGEFLAGS_EXTENDED */
  
 -#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
 +#ifdef CONFIG_MMU
  #define __PG_MLOCKED          (1 << PG_mlocked)
  #else
  #define __PG_MLOCKED          0
diff --combined kernel/kexec.c
index 433e9fcc1fc5197433a3b5f4efa0c08a467119d4,83f54e2a6eedea011f0ecfc5c2da06d1dbef6226..a9a93d9ee7a78e70068bca678826873376afd8a7
@@@ -21,7 -21,7 +21,7 @@@
  #include <linux/hardirq.h>
  #include <linux/elf.h>
  #include <linux/elfcore.h>
- #include <linux/utsrelease.h>
+ #include <generated/utsrelease.h>
  #include <linux/utsname.h>
  #include <linux/numa.h>
  #include <linux/suspend.h>
@@@ -31,7 -31,6 +31,7 @@@
  #include <linux/cpu.h>
  #include <linux/console.h>
  #include <linux/vmalloc.h>
 +#include <linux/swap.h>
  
  #include <asm/page.h>
  #include <asm/uaccess.h>
@@@ -1083,64 -1082,6 +1083,64 @@@ void crash_kexec(struct pt_regs *regs
        }
  }
  
 +size_t crash_get_memory_size(void)
 +{
 +      size_t size;
 +      mutex_lock(&kexec_mutex);
 +      size = crashk_res.end - crashk_res.start + 1;
 +      mutex_unlock(&kexec_mutex);
 +      return size;
 +}
 +
 +static void free_reserved_phys_range(unsigned long begin, unsigned long end)
 +{
 +      unsigned long addr;
 +
 +      for (addr = begin; addr < end; addr += PAGE_SIZE) {
 +              ClearPageReserved(pfn_to_page(addr >> PAGE_SHIFT));
 +              init_page_count(pfn_to_page(addr >> PAGE_SHIFT));
 +              free_page((unsigned long)__va(addr));
 +              totalram_pages++;
 +      }
 +}
 +
 +int crash_shrink_memory(unsigned long new_size)
 +{
 +      int ret = 0;
 +      unsigned long start, end;
 +
 +      mutex_lock(&kexec_mutex);
 +
 +      if (kexec_crash_image) {
 +              ret = -ENOENT;
 +              goto unlock;
 +      }
 +      start = crashk_res.start;
 +      end = crashk_res.end;
 +
 +      if (new_size >= end - start + 1) {
 +              ret = -EINVAL;
 +              if (new_size == end - start + 1)
 +                      ret = 0;
 +              goto unlock;
 +      }
 +
 +      start = roundup(start, PAGE_SIZE);
 +      end = roundup(start + new_size, PAGE_SIZE);
 +
 +      free_reserved_phys_range(end, crashk_res.end);
 +
 +      if (start == end) {
 +              crashk_res.end = end;
 +              release_resource(&crashk_res);
 +      } else
 +              crashk_res.end = end - 1;
 +
 +unlock:
 +      mutex_unlock(&kexec_mutex);
 +      return ret;
 +}
 +
  static u32 *append_elf_note(u32 *buf, char *name, unsigned type, void *data,
                            size_t data_len)
  {
diff --combined kernel/trace/trace.c
index 06ba26747d7e223b44ee67935b9ea33ff25752f8,bfb1b64bfa9d408de313071eb9589c622550872f..8b9f20ab8eed9acc1b3d2529e377668951125723
@@@ -12,7 -12,7 +12,7 @@@
   *  Copyright (C) 2004 William Lee Irwin III
   */
  #include <linux/ring_buffer.h>
- #include <linux/utsrelease.h>
+ #include <generated/utsrelease.h>
  #include <linux/stacktrace.h>
  #include <linux/writeback.h>
  #include <linux/kallsyms.h>
@@@ -86,17 -86,17 +86,17 @@@ static int dummy_set_flag(u32 old_flags
   */
  static int tracing_disabled = 1;
  
 -DEFINE_PER_CPU(local_t, ftrace_cpu_disabled);
 +DEFINE_PER_CPU(int, ftrace_cpu_disabled);
  
  static inline void ftrace_disable_cpu(void)
  {
        preempt_disable();
 -      local_inc(&__get_cpu_var(ftrace_cpu_disabled));
 +      __this_cpu_inc(per_cpu_var(ftrace_cpu_disabled));
  }
  
  static inline void ftrace_enable_cpu(void)
  {
 -      local_dec(&__get_cpu_var(ftrace_cpu_disabled));
 +      __this_cpu_dec(per_cpu_var(ftrace_cpu_disabled));
        preempt_enable();
  }
  
@@@ -203,7 -203,7 +203,7 @@@ cycle_t ftrace_now(int cpu
   */
  static struct trace_array     max_tr;
  
 -static DEFINE_PER_CPU(struct trace_array_cpu, max_data);
 +static DEFINE_PER_CPU(struct trace_array_cpu, max_tr_data);
  
  /* tracer_enabled is used to toggle activation of a tracer */
  static int                    tracer_enabled = 1;
@@@ -313,6 -313,7 +313,6 @@@ static const char *trace_options[] = 
        "bin",
        "block",
        "stacktrace",
 -      "sched-tree",
        "trace_printk",
        "ftrace_preempt",
        "branch",
@@@ -492,15 -493,15 +492,15 @@@ static ssize_t trace_seq_to_buffer(stru
   * protected by per_cpu spinlocks. But the action of the swap
   * needs its own lock.
   *
 - * This is defined as a raw_spinlock_t in order to help
 + * This is defined as a arch_spinlock_t in order to help
   * with performance when lockdep debugging is enabled.
   *
   * It is also used in other places outside the update_max_tr
   * so it needs to be defined outside of the
   * CONFIG_TRACER_MAX_TRACE.
   */
 -static raw_spinlock_t ftrace_max_lock =
 -      (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED;
 +static arch_spinlock_t ftrace_max_lock =
 +      (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED;
  
  #ifdef CONFIG_TRACER_MAX_TRACE
  unsigned long __read_mostly   tracing_max_latency;
@@@ -554,13 -555,13 +554,13 @@@ update_max_tr(struct trace_array *tr, s
                return;
  
        WARN_ON_ONCE(!irqs_disabled());
 -      __raw_spin_lock(&ftrace_max_lock);
 +      arch_spin_lock(&ftrace_max_lock);
  
        tr->buffer = max_tr.buffer;
        max_tr.buffer = buf;
  
        __update_max_tr(tr, tsk, cpu);
 -      __raw_spin_unlock(&ftrace_max_lock);
 +      arch_spin_unlock(&ftrace_max_lock);
  }
  
  /**
@@@ -580,7 -581,7 +580,7 @@@ update_max_tr_single(struct trace_arra
                return;
  
        WARN_ON_ONCE(!irqs_disabled());
 -      __raw_spin_lock(&ftrace_max_lock);
 +      arch_spin_lock(&ftrace_max_lock);
  
        ftrace_disable_cpu();
  
        WARN_ON_ONCE(ret && ret != -EAGAIN && ret != -EBUSY);
  
        __update_max_tr(tr, tsk, cpu);
 -      __raw_spin_unlock(&ftrace_max_lock);
 +      arch_spin_unlock(&ftrace_max_lock);
  }
  #endif /* CONFIG_TRACER_MAX_TRACE */
  
@@@ -801,7 -802,7 +801,7 @@@ static unsigned map_pid_to_cmdline[PID_
  static unsigned map_cmdline_to_pid[SAVED_CMDLINES];
  static char saved_cmdlines[SAVED_CMDLINES][TASK_COMM_LEN];
  static int cmdline_idx;
 -static raw_spinlock_t trace_cmdline_lock = __RAW_SPIN_LOCK_UNLOCKED;
 +static arch_spinlock_t trace_cmdline_lock = __ARCH_SPIN_LOCK_UNLOCKED;
  
  /* temporary disable recording */
  static atomic_t trace_record_cmdline_disabled __read_mostly;
@@@ -914,7 -915,7 +914,7 @@@ static void trace_save_cmdline(struct t
         * nor do we want to disable interrupts,
         * so if we miss here, then better luck next time.
         */
 -      if (!__raw_spin_trylock(&trace_cmdline_lock))
 +      if (!arch_spin_trylock(&trace_cmdline_lock))
                return;
  
        idx = map_pid_to_cmdline[tsk->pid];
  
        memcpy(&saved_cmdlines[idx], tsk->comm, TASK_COMM_LEN);
  
 -      __raw_spin_unlock(&trace_cmdline_lock);
 +      arch_spin_unlock(&trace_cmdline_lock);
  }
  
  void trace_find_cmdline(int pid, char comm[])
        }
  
        preempt_disable();
 -      __raw_spin_lock(&trace_cmdline_lock);
 +      arch_spin_lock(&trace_cmdline_lock);
        map = map_pid_to_cmdline[pid];
        if (map != NO_CMDLINE_MAP)
                strcpy(comm, saved_cmdlines[map]);
        else
                strcpy(comm, "<...>");
  
 -      __raw_spin_unlock(&trace_cmdline_lock);
 +      arch_spin_unlock(&trace_cmdline_lock);
        preempt_enable();
  }
  
@@@ -1084,7 -1085,7 +1084,7 @@@ trace_function(struct trace_array *tr
        struct ftrace_entry *entry;
  
        /* If we are reading the ring buffer, don't trace */
 -      if (unlikely(local_read(&__get_cpu_var(ftrace_cpu_disabled))))
 +      if (unlikely(__this_cpu_read(per_cpu_var(ftrace_cpu_disabled))))
                return;
  
        event = trace_buffer_lock_reserve(buffer, TRACE_FN, sizeof(*entry),
@@@ -1150,22 -1151,6 +1150,22 @@@ void __trace_stack(struct trace_array *
        __ftrace_trace_stack(tr->buffer, flags, skip, pc);
  }
  
 +/**
 + * trace_dump_stack - record a stack back trace in the trace buffer
 + */
 +void trace_dump_stack(void)
 +{
 +      unsigned long flags;
 +
 +      if (tracing_disabled || tracing_selftest_running)
 +              return;
 +
 +      local_save_flags(flags);
 +
 +      /* skipping 3 traces, seems to get us at the caller of this function */
 +      __ftrace_trace_stack(global_trace.buffer, flags, 3, preempt_count());
 +}
 +
  void
  ftrace_trace_userstack(struct ring_buffer *buffer, unsigned long flags, int pc)
  {
@@@ -1266,8 -1251,8 +1266,8 @@@ ftrace_special(unsigned long arg1, unsi
   */
  int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)
  {
 -      static raw_spinlock_t trace_buf_lock =
 -              (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED;
 +      static arch_spinlock_t trace_buf_lock =
 +              (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED;
        static u32 trace_buf[TRACE_BUF_SIZE];
  
        struct ftrace_event_call *call = &event_bprint;
  
        /* Lockdep uses trace_printk for lock tracing */
        local_irq_save(flags);
 -      __raw_spin_lock(&trace_buf_lock);
 +      arch_spin_lock(&trace_buf_lock);
        len = vbin_printf(trace_buf, TRACE_BUF_SIZE, fmt, args);
  
        if (len > TRACE_BUF_SIZE || len < 0)
                ring_buffer_unlock_commit(buffer, event);
  
  out_unlock:
 -      __raw_spin_unlock(&trace_buf_lock);
 +      arch_spin_unlock(&trace_buf_lock);
        local_irq_restore(flags);
  
  out:
@@@ -1349,7 -1334,7 +1349,7 @@@ int trace_array_printk(struct trace_arr
  int trace_array_vprintk(struct trace_array *tr,
                        unsigned long ip, const char *fmt, va_list args)
  {
 -      static raw_spinlock_t trace_buf_lock = __RAW_SPIN_LOCK_UNLOCKED;
 +      static arch_spinlock_t trace_buf_lock = __ARCH_SPIN_LOCK_UNLOCKED;
        static char trace_buf[TRACE_BUF_SIZE];
  
        struct ftrace_event_call *call = &event_print;
  
        pause_graph_tracing();
        raw_local_irq_save(irq_flags);
 -      __raw_spin_lock(&trace_buf_lock);
 +      arch_spin_lock(&trace_buf_lock);
        len = vsnprintf(trace_buf, TRACE_BUF_SIZE, fmt, args);
  
        size = sizeof(*entry) + len + 1;
                ring_buffer_unlock_commit(buffer, event);
  
   out_unlock:
 -      __raw_spin_unlock(&trace_buf_lock);
 +      arch_spin_unlock(&trace_buf_lock);
        raw_local_irq_restore(irq_flags);
        unpause_graph_tracing();
   out:
@@@ -2294,7 -2279,7 +2294,7 @@@ tracing_cpumask_write(struct file *filp
        mutex_lock(&tracing_cpumask_update_lock);
  
        local_irq_disable();
 -      __raw_spin_lock(&ftrace_max_lock);
 +      arch_spin_lock(&ftrace_max_lock);
        for_each_tracing_cpu(cpu) {
                /*
                 * Increase/decrease the disabled counter if we are
                        atomic_dec(&global_trace.data[cpu]->disabled);
                }
        }
 -      __raw_spin_unlock(&ftrace_max_lock);
 +      arch_spin_unlock(&ftrace_max_lock);
        local_irq_enable();
  
        cpumask_copy(tracing_cpumask, tracing_cpumask_new);
@@@ -2331,49 -2316,67 +2331,49 @@@ static const struct file_operations tra
        .write          = tracing_cpumask_write,
  };
  
 -static ssize_t
 -tracing_trace_options_read(struct file *filp, char __user *ubuf,
 -                     size_t cnt, loff_t *ppos)
 +static int tracing_trace_options_show(struct seq_file *m, void *v)
  {
        struct tracer_opt *trace_opts;
        u32 tracer_flags;
 -      int len = 0;
 -      char *buf;
 -      int r = 0;
        int i;
  
 -
 -      /* calculate max size */
 -      for (i = 0; trace_options[i]; i++) {
 -              len += strlen(trace_options[i]);
 -              len += 3; /* "no" and newline */
 -      }
 -
        mutex_lock(&trace_types_lock);
        tracer_flags = current_trace->flags->val;
        trace_opts = current_trace->flags->opts;
  
 -      /*
 -       * Increase the size with names of options specific
 -       * of the current tracer.
 -       */
 -      for (i = 0; trace_opts[i].name; i++) {
 -              len += strlen(trace_opts[i].name);
 -              len += 3; /* "no" and newline */
 -      }
 -
 -      /* +1 for \0 */
 -      buf = kmalloc(len + 1, GFP_KERNEL);
 -      if (!buf) {
 -              mutex_unlock(&trace_types_lock);
 -              return -ENOMEM;
 -      }
 -
        for (i = 0; trace_options[i]; i++) {
                if (trace_flags & (1 << i))
 -                      r += sprintf(buf + r, "%s\n", trace_options[i]);
 +                      seq_printf(m, "%s\n", trace_options[i]);
                else
 -                      r += sprintf(buf + r, "no%s\n", trace_options[i]);
 +                      seq_printf(m, "no%s\n", trace_options[i]);
        }
  
        for (i = 0; trace_opts[i].name; i++) {
                if (tracer_flags & trace_opts[i].bit)
 -                      r += sprintf(buf + r, "%s\n",
 -                              trace_opts[i].name);
 +                      seq_printf(m, "%s\n", trace_opts[i].name);
                else
 -                      r += sprintf(buf + r, "no%s\n",
 -                              trace_opts[i].name);
 +                      seq_printf(m, "no%s\n", trace_opts[i].name);
        }
        mutex_unlock(&trace_types_lock);
  
 -      WARN_ON(r >= len + 1);
 +      return 0;
 +}
  
 -      r = simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
 +static int __set_tracer_option(struct tracer *trace,
 +                             struct tracer_flags *tracer_flags,
 +                             struct tracer_opt *opts, int neg)
 +{
 +      int ret;
  
 -      kfree(buf);
 -      return r;
 +      ret = trace->set_flag(tracer_flags->val, opts->bit, !neg);
 +      if (ret)
 +              return ret;
 +
 +      if (neg)
 +              tracer_flags->val &= ~opts->bit;
 +      else
 +              tracer_flags->val |= opts->bit;
 +      return 0;
  }
  
  /* Try to assign a tracer specific option */
@@@ -2381,17 -2384,33 +2381,17 @@@ static int set_tracer_option(struct tra
  {
        struct tracer_flags *tracer_flags = trace->flags;
        struct tracer_opt *opts = NULL;
 -      int ret = 0, i = 0;
 -      int len;
 +      int i;
  
        for (i = 0; tracer_flags->opts[i].name; i++) {
                opts = &tracer_flags->opts[i];
 -              len = strlen(opts->name);
  
 -              if (strncmp(cmp, opts->name, len) == 0) {
 -                      ret = trace->set_flag(tracer_flags->val,
 -                              opts->bit, !neg);
 -                      break;
 -              }
 +              if (strcmp(cmp, opts->name) == 0)
 +                      return __set_tracer_option(trace, trace->flags,
 +                                                 opts, neg);
        }
 -      /* Not found */
 -      if (!tracer_flags->opts[i].name)
 -              return -EINVAL;
 -
 -      /* Refused to handle */
 -      if (ret)
 -              return ret;
 -
 -      if (neg)
 -              tracer_flags->val &= ~opts->bit;
 -      else
 -              tracer_flags->val |= opts->bit;
  
 -      return 0;
 +      return -EINVAL;
  }
  
  static void set_tracer_flags(unsigned int mask, int enabled)
@@@ -2411,7 -2430,7 +2411,7 @@@ tracing_trace_options_write(struct fil
                        size_t cnt, loff_t *ppos)
  {
        char buf[64];
 -      char *cmp = buf;
 +      char *cmp;
        int neg = 0;
        int ret;
        int i;
                return -EFAULT;
  
        buf[cnt] = 0;
 +      cmp = strstrip(buf);
  
 -      if (strncmp(buf, "no", 2) == 0) {
 +      if (strncmp(cmp, "no", 2) == 0) {
                neg = 1;
                cmp += 2;
        }
  
        for (i = 0; trace_options[i]; i++) {
 -              int len = strlen(trace_options[i]);
 -
 -              if (strncmp(cmp, trace_options[i], len) == 0) {
 +              if (strcmp(cmp, trace_options[i]) == 0) {
                        set_tracer_flags(1 << i, !neg);
                        break;
                }
        return cnt;
  }
  
 +static int tracing_trace_options_open(struct inode *inode, struct file *file)
 +{
 +      if (tracing_disabled)
 +              return -ENODEV;
 +      return single_open(file, tracing_trace_options_show, NULL);
 +}
 +
  static const struct file_operations tracing_iter_fops = {
 -      .open           = tracing_open_generic,
 -      .read           = tracing_trace_options_read,
 +      .open           = tracing_trace_options_open,
 +      .read           = seq_read,
 +      .llseek         = seq_lseek,
 +      .release        = single_release,
        .write          = tracing_trace_options_write,
  };
  
@@@ -3122,7 -3133,7 +3122,7 @@@ static void tracing_spd_release_pipe(st
        __free_page(spd->pages[idx]);
  }
  
 -static struct pipe_buf_operations tracing_pipe_buf_ops = {
 +static const struct pipe_buf_operations tracing_pipe_buf_ops = {
        .can_merge              = 0,
        .map                    = generic_pipe_buf_map,
        .unmap                  = generic_pipe_buf_unmap,
@@@ -3381,18 -3392,21 +3381,18 @@@ tracing_mark_write(struct file *filp, c
        return cnt;
  }
  
 -static ssize_t tracing_clock_read(struct file *filp, char __user *ubuf,
 -                                size_t cnt, loff_t *ppos)
 +static int tracing_clock_show(struct seq_file *m, void *v)
  {
 -      char buf[64];
 -      int bufiter = 0;
        int i;
  
        for (i = 0; i < ARRAY_SIZE(trace_clocks); i++)
 -              bufiter += snprintf(buf + bufiter, sizeof(buf) - bufiter,
 +              seq_printf(m,
                        "%s%s%s%s", i ? " " : "",
                        i == trace_clock_id ? "[" : "", trace_clocks[i].name,
                        i == trace_clock_id ? "]" : "");
 -      bufiter += snprintf(buf + bufiter, sizeof(buf) - bufiter, "\n");
 +      seq_putc(m, '\n');
  
 -      return simple_read_from_buffer(ubuf, cnt, ppos, buf, bufiter);
 +      return 0;
  }
  
  static ssize_t tracing_clock_write(struct file *filp, const char __user *ubuf,
        return cnt;
  }
  
 +static int tracing_clock_open(struct inode *inode, struct file *file)
 +{
 +      if (tracing_disabled)
 +              return -ENODEV;
 +      return single_open(file, tracing_clock_show, NULL);
 +}
 +
  static const struct file_operations tracing_max_lat_fops = {
        .open           = tracing_open_generic,
        .read           = tracing_max_lat_read,
@@@ -3479,10 -3486,8 +3479,10 @@@ static const struct file_operations tra
  };
  
  static const struct file_operations trace_clock_fops = {
 -      .open           = tracing_open_generic,
 -      .read           = tracing_clock_read,
 +      .open           = tracing_clock_open,
 +      .read           = seq_read,
 +      .llseek         = seq_lseek,
 +      .release        = single_release,
        .write          = tracing_clock_write,
  };
  
@@@ -3612,7 -3617,7 +3612,7 @@@ static void buffer_pipe_buf_get(struct 
  }
  
  /* Pipe buffer operations for a buffer. */
 -static struct pipe_buf_operations buffer_pipe_buf_ops = {
 +static const struct pipe_buf_operations buffer_pipe_buf_ops = {
        .can_merge              = 0,
        .map                    = generic_pipe_buf_map,
        .unmap                  = generic_pipe_buf_unmap,
@@@ -3943,16 -3948,39 +3943,16 @@@ trace_options_write(struct file *filp, 
        if (ret < 0)
                return ret;
  
 -      ret = 0;
 -      switch (val) {
 -      case 0:
 -              /* do nothing if already cleared */
 -              if (!(topt->flags->val & topt->opt->bit))
 -                      break;
 -
 -              mutex_lock(&trace_types_lock);
 -              if (current_trace->set_flag)
 -                      ret = current_trace->set_flag(topt->flags->val,
 -                                                    topt->opt->bit, 0);
 -              mutex_unlock(&trace_types_lock);
 -              if (ret)
 -                      return ret;
 -              topt->flags->val &= ~topt->opt->bit;
 -              break;
 -      case 1:
 -              /* do nothing if already set */
 -              if (topt->flags->val & topt->opt->bit)
 -                      break;
 +      if (val != 0 && val != 1)
 +              return -EINVAL;
  
 +      if (!!(topt->flags->val & topt->opt->bit) != val) {
                mutex_lock(&trace_types_lock);
 -              if (current_trace->set_flag)
 -                      ret = current_trace->set_flag(topt->flags->val,
 -                                                    topt->opt->bit, 1);
 +              ret = __set_tracer_option(current_trace, topt->flags,
 +                                        topt->opt, val);
                mutex_unlock(&trace_types_lock);
                if (ret)
                        return ret;
 -              topt->flags->val |= topt->opt->bit;
 -              break;
 -
 -      default:
 -              return -EINVAL;
        }
  
        *ppos += cnt;
@@@ -4279,8 -4307,8 +4279,8 @@@ trace_printk_seq(struct trace_seq *s
  
  static void __ftrace_dump(bool disable_tracing)
  {
 -      static raw_spinlock_t ftrace_dump_lock =
 -              (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED;
 +      static arch_spinlock_t ftrace_dump_lock =
 +              (arch_spinlock_t)__ARCH_SPIN_LOCK_UNLOCKED;
        /* use static because iter can be a bit big for the stack */
        static struct trace_iterator iter;
        unsigned int old_userobj;
  
        /* only one dump */
        local_irq_save(flags);
 -      __raw_spin_lock(&ftrace_dump_lock);
 +      arch_spin_lock(&ftrace_dump_lock);
        if (dump_ran)
                goto out;
  
        }
  
   out:
 -      __raw_spin_unlock(&ftrace_dump_lock);
 +      arch_spin_unlock(&ftrace_dump_lock);
        local_irq_restore(flags);
  }
  
@@@ -4426,7 -4454,7 +4426,7 @@@ __init static int tracer_alloc_buffers(
        /* Allocate the first page for all buffers */
        for_each_tracing_cpu(i) {
                global_trace.data[i] = &per_cpu(global_trace_cpu, i);
 -              max_tr.data[i] = &per_cpu(max_data, i);
 +              max_tr.data[i] = &per_cpu(max_tr_data, i);
        }
  
        trace_init_cmdlines();
diff --combined scripts/Makefile.lib
index 224d85e72ef13a93458895cffdbdf32f22747705,d9f0cb837400985be39589eb8e0b572b7e5fbd54..cd815ac2a50b41da74f32d950b7e759e60f28605
@@@ -127,11 -127,6 +127,11 @@@ _c_flags += $(if $(patsubst n%,, 
                $(CFLAGS_GCOV))
  endif
  
 +ifdef CONFIG_SYMBOL_PREFIX
 +_cpp_flags += -DSYMBOL_PREFIX=$(patsubst "%",%,$(CONFIG_SYMBOL_PREFIX))
 +endif
 +
 +
  # If building the kernel in a separate objtree expand all occurrences
  # of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
  
@@@ -213,7 -208,7 +213,7 @@@ cmd_gzip = (cat $(filter-out FORCE,$^) 
  
  # Bzip2 and LZMA do not include size in file... so we have to fake that;
  # append the size as a 32-bit littleendian number as gzip does.
- size_append = /bin/echo -ne $(shell                                   \
+ size_append = printf $(shell                                          \
  dec_size=0;                                                           \
  for F in $1; do                                                               \
        fsize=$$(stat -c "%s" $$F);                                     \
diff --combined scripts/mod/modpost.c
index 6c4ffc767b91a16bfdc1e1aef9885bee66be3736,801a16a1754532cee8f647ef178772209973120d..20923613467cf376db195e17a9df754e934ab470
  #include <stdio.h>
  #include <ctype.h>
  #include "modpost.h"
- #include "../../include/linux/autoconf.h"
++#include "../../include/generated/autoconf.h"
  #include "../../include/linux/license.h"
  
 +/* Some toolchains use a `_' prefix for all user symbols. */
 +#ifdef CONFIG_SYMBOL_PREFIX
 +#define MODULE_SYMBOL_PREFIX CONFIG_SYMBOL_PREFIX
 +#else
 +#define MODULE_SYMBOL_PREFIX ""
 +#endif
 +
 +
  /* Are we using CONFIG_MODVERSIONS? */
  int modversions = 0;
  /* Warn about undefined symbols? (do so if we have vmlinux) */
@@@ -460,6 -451,8 +460,6 @@@ static int parse_elf(struct elf_info *i
                        info->export_unused_gpl_sec = i;
                else if (strcmp(secname, "__ksymtab_gpl_future") == 0)
                        info->export_gpl_future_sec = i;
 -              else if (strcmp(secname, "__markers_strings") == 0)
 -                      info->markers_strings_sec = i;
  
                if (sechdrs[i].sh_type != SHT_SYMTAB)
                        continue;
@@@ -522,7 -515,7 +522,7 @@@ static void handle_modversions(struct m
                break;
        case SHN_ABS:
                /* CRC'd symbol */
 -              if (memcmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) {
 +              if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) {
                        crc = (unsigned int) sym->st_value;
                        sym_update_crc(symname + strlen(CRC_PFX), mod, crc,
                                        export);
                break;
        default:
                /* All exported symbols */
 -              if (memcmp(symname, KSYMTAB_PFX, strlen(KSYMTAB_PFX)) == 0) {
 +              if (strncmp(symname, KSYMTAB_PFX, strlen(KSYMTAB_PFX)) == 0) {
                        sym_add_exported(symname + strlen(KSYMTAB_PFX), mod,
                                        export);
                }
@@@ -1516,6 -1509,62 +1516,6 @@@ static void check_sec_ref(struct modul
        }
  }
  
 -static void get_markers(struct elf_info *info, struct module *mod)
 -{
 -      const Elf_Shdr *sh = &info->sechdrs[info->markers_strings_sec];
 -      const char *strings = (const char *) info->hdr + sh->sh_offset;
 -      const Elf_Sym *sym, *first_sym, *last_sym;
 -      size_t n;
 -
 -      if (!info->markers_strings_sec)
 -              return;
 -
 -      /*
 -       * First count the strings.  We look for all the symbols defined
 -       * in the __markers_strings section named __mstrtab_*.  For
 -       * these local names, the compiler puts a random .NNN suffix on,
 -       * so the names don't correspond exactly.
 -       */
 -      first_sym = last_sym = NULL;
 -      n = 0;
 -      for (sym = info->symtab_start; sym < info->symtab_stop; sym++)
 -              if (ELF_ST_TYPE(sym->st_info) == STT_OBJECT &&
 -                  sym->st_shndx == info->markers_strings_sec &&
 -                  !strncmp(info->strtab + sym->st_name,
 -                           "__mstrtab_", sizeof "__mstrtab_" - 1)) {
 -                      if (first_sym == NULL)
 -                              first_sym = sym;
 -                      last_sym = sym;
 -                      ++n;
 -              }
 -
 -      if (n == 0)
 -              return;
 -
 -      /*
 -       * Now collect each name and format into a line for the output.
 -       * Lines look like:
 -       *      marker_name     vmlinux marker %s format %d
 -       * The format string after the second \t can use whitespace.
 -       */
 -      mod->markers = NOFAIL(malloc(sizeof mod->markers[0] * n));
 -      mod->nmarkers = n;
 -
 -      n = 0;
 -      for (sym = first_sym; sym <= last_sym; sym++)
 -              if (ELF_ST_TYPE(sym->st_info) == STT_OBJECT &&
 -                  sym->st_shndx == info->markers_strings_sec &&
 -                  !strncmp(info->strtab + sym->st_name,
 -                           "__mstrtab_", sizeof "__mstrtab_" - 1)) {
 -                      const char *name = strings + sym->st_value;
 -                      const char *fmt = strchr(name, '\0') + 1;
 -                      char *line = NULL;
 -                      asprintf(&line, "%s\t%s\t%s\n", name, mod->name, fmt);
 -                      NOFAIL(line);
 -                      mod->markers[n++] = line;
 -              }
 -}
 -
  static void read_symbols(char *modname)
  {
        const char *symname;
                get_src_version(modname, mod->srcversion,
                                sizeof(mod->srcversion)-1);
  
 -      get_markers(&info, mod);
 -
        parse_elf_finish(&info);
  
        /* Our trick to get versioning for module struct etc. - it's
@@@ -1925,6 -1976,96 +1925,6 @@@ static void write_dump(const char *fnam
        write_if_changed(&buf, fname);
  }
  
 -static void add_marker(struct module *mod, const char *name, const char *fmt)
 -{
 -      char *line = NULL;
 -      asprintf(&line, "%s\t%s\t%s\n", name, mod->name, fmt);
 -      NOFAIL(line);
 -
 -      mod->markers = NOFAIL(realloc(mod->markers, ((mod->nmarkers + 1) *
 -                                                   sizeof mod->markers[0])));
 -      mod->markers[mod->nmarkers++] = line;
 -}
 -
 -static void read_markers(const char *fname)
 -{
 -      unsigned long size, pos = 0;
 -      void *file = grab_file(fname, &size);
 -      char *line;
 -
 -      if (!file)              /* No old markers, silently ignore */
 -              return;
 -
 -      while ((line = get_next_line(&pos, file, size))) {
 -              char *marker, *modname, *fmt;
 -              struct module *mod;
 -
 -              marker = line;
 -              modname = strchr(marker, '\t');
 -              if (!modname)
 -                      goto fail;
 -              *modname++ = '\0';
 -              fmt = strchr(modname, '\t');
 -              if (!fmt)
 -                      goto fail;
 -              *fmt++ = '\0';
 -              if (*marker == '\0' || *modname == '\0')
 -                      goto fail;
 -
 -              mod = find_module(modname);
 -              if (!mod) {
 -                      mod = new_module(modname);
 -                      mod->skip = 1;
 -              }
 -              if (is_vmlinux(modname)) {
 -                      have_vmlinux = 1;
 -                      mod->skip = 0;
 -              }
 -
 -              if (!mod->skip)
 -                      add_marker(mod, marker, fmt);
 -      }
 -      release_file(file, size);
 -      return;
 -fail:
 -      fatal("parse error in markers list file\n");
 -}
 -
 -static int compare_strings(const void *a, const void *b)
 -{
 -      return strcmp(*(const char **) a, *(const char **) b);
 -}
 -
 -static void write_markers(const char *fname)
 -{
 -      struct buffer buf = { };
 -      struct module *mod;
 -      size_t i;
 -
 -      for (mod = modules; mod; mod = mod->next)
 -              if ((!external_module || !mod->skip) && mod->markers != NULL) {
 -                      /*
 -                       * Sort the strings so we can skip duplicates when
 -                       * we write them out.
 -                       */
 -                      qsort(mod->markers, mod->nmarkers,
 -                            sizeof mod->markers[0], &compare_strings);
 -                      for (i = 0; i < mod->nmarkers; ++i) {
 -                              char *line = mod->markers[i];
 -                              buf_write(&buf, line, strlen(line));
 -                              while (i + 1 < mod->nmarkers &&
 -                                     !strcmp(mod->markers[i],
 -                                             mod->markers[i + 1]))
 -                                      free(mod->markers[i++]);
 -                              free(mod->markers[i]);
 -                      }
 -                      free(mod->markers);
 -                      mod->markers = NULL;
 -              }
 -
 -      write_if_changed(&buf, fname);
 -}
 -
  struct ext_sym_list {
        struct ext_sym_list *next;
        const char *file;
@@@ -1936,6 -2077,8 +1936,6 @@@ int main(int argc, char **argv
        struct buffer buf = { };
        char *kernel_read = NULL, *module_read = NULL;
        char *dump_write = NULL;
 -      char *markers_read = NULL;
 -      char *markers_write = NULL;
        int opt;
        int err;
        struct ext_sym_list *extsym_iter;
                case 'w':
                        warn_unresolved = 1;
                        break;
 -                      case 'M':
 -                              markers_write = optarg;
 -                              break;
 -                      case 'K':
 -                              markers_read = optarg;
 -                              break;
                default:
                        exit(1);
                }
                     "'make CONFIG_DEBUG_SECTION_MISMATCH=y'\n",
                     sec_mismatch_count);
  
 -      if (markers_read)
 -              read_markers(markers_read);
 -
 -      if (markers_write)
 -              write_markers(markers_write);
 -
        return err;
  }