]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'core/locking' into tracing/ftrace
authorIngo Molnar <mingo@elte.hu>
Fri, 13 Mar 2009 00:33:21 +0000 (01:33 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 13 Mar 2009 00:33:21 +0000 (01:33 +0100)
1  2 
MAINTAINERS
Makefile
arch/sparc/kernel/irq_64.c
arch/x86/mm/pageattr.c
include/linux/sched.h
init/Kconfig
kernel/lockdep.c
kernel/softirq.c

diff --combined MAINTAINERS
index 3c3ce2b20322da794152c3c0e356e3dc88181b5e,61aeb5aae244b68d7b8726369423c3b2f7820e48..c0a662d1c284467a64ec6ccd2c501316afd852e1
@@@ -1469,8 -1469,6 +1469,6 @@@ L:      linux-acpi@vger.kernel.or
  S:    Supported
  
  DOCUMENTATION (/Documentation directory)
- P:    Michael Kerrisk
- M:    mtk.manpages@gmail.com
  P:    Randy Dunlap
  M:    rdunlap@xenotime.net
  L:    linux-doc@vger.kernel.org
@@@ -2623,12 -2621,6 +2621,12 @@@ M:    jason.wessel@windriver.co
  L:    kgdb-bugreport@lists.sourceforge.net
  S:    Maintained
  
 +KMEMTRACE
 +P:    Eduard - Gabriel Munteanu
 +M:    eduard.munteanu@linux360.ro
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +
  KPROBES
  P:    Ananth N Mavinakayanahalli
  M:    ananth@in.ibm.com
@@@ -2885,7 -2877,7 +2883,7 @@@ P:      Michael Kerris
  M:    mtk.manpages@gmail.com
  W:    http://www.kernel.org/doc/man-pages
  L:    linux-man@vger.kernel.org
- S:    Supported
+ S:    Maintained
  
  MARVELL LIBERTAS WIRELESS DRIVER
  P:    Dan Williams
diff --combined Makefile
index c40d83aedebef6cddffa500c6c97271340a79a21,5a5b82eaaec2bc4077d1d5a2559b4ac6d19440cf..69b8091bfed17ddd10288b7df6c88a55b416c48b
+++ b/Makefile
@@@ -533,9 -533,8 +533,9 @@@ KBUILD_CFLAGS += $(call cc-option,-Wfra
  endif
  
  # Force gcc to behave correct even for buggy distributions
 -# Arch Makefiles may override this setting
 +ifndef CONFIG_CC_STACKPROTECTOR
  KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
 +endif
  
  ifdef CONFIG_FRAME_POINTER
  KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
@@@ -905,12 -904,18 +905,18 @@@ localver = $(subst $(space),, $(string
  # and if the SCM is know a tag from the SCM is appended.
  # The appended tag is determined by the SCM used.
  #
- # Currently, only git is supported.
- # Other SCMs can edit scripts/setlocalversion and add the appropriate
- # checks as needed.
+ # .scmversion is used when generating rpm packages so we do not loose
+ # the version information from the SCM when we do the build of the kernel
+ # from the copied source
  ifdef CONFIG_LOCALVERSION_AUTO
-       _localver-auto = $(shell $(CONFIG_SHELL) \
-                         $(srctree)/scripts/setlocalversion $(srctree))
+ ifeq ($(wildcard .scmversion),)
+         _localver-auto = $(shell $(CONFIG_SHELL) \
+                          $(srctree)/scripts/setlocalversion $(srctree))
+ else
+         _localver-auto = $(shell cat .scmversion 2> /dev/null)
+ endif
        localver-auto  = $(LOCALVERSION)$(_localver-auto)
  endif
  
@@@ -1538,7 -1543,7 +1544,7 @@@ quiet_cmd_depmod = DEPMOD  $(KERNELRELE
        cmd_depmod = \
        if [ -r System.map -a -x $(DEPMOD) ]; then                              \
                $(DEPMOD) -ae -F System.map                                     \
-               $(if $(strip $(INSTALL_MOD_PATH)), -b $(INSTALL_MOD_PATH) -r)   \
+               $(if $(strip $(INSTALL_MOD_PATH)), -b $(INSTALL_MOD_PATH) )     \
                $(KERNELRELEASE);                                               \
        fi
  
index 3d2c6baae96bf05b251d188ce1739150af3065fd,1c378d8e90c588ce722a9d6abfb935f5cb6e62d9..233bd87a963744f62641c5e50e1ce2bdf49b2b14
@@@ -252,10 -252,9 +252,10 @@@ struct irq_handler_data 
  #ifdef CONFIG_SMP
  static int irq_choose_cpu(unsigned int virt_irq)
  {
 -      cpumask_t mask = irq_desc[virt_irq].affinity;
 +      cpumask_t mask;
        int cpuid;
  
 +      cpumask_copy(&mask, irq_desc[virt_irq].affinity);
        if (cpus_equal(mask, CPU_MASK_ALL)) {
                static int irq_rover;
                static DEFINE_SPINLOCK(irq_rover_lock);
@@@ -324,17 -323,25 +324,25 @@@ static void sun4u_set_affinity(unsigne
        sun4u_irq_enable(virt_irq);
  }
  
+ /* Don't do anything.  The desc->status check for IRQ_DISABLED in
+  * handler_irq() will skip the handler call and that will leave the
+  * interrupt in the sent state.  The next ->enable() call will hit the
+  * ICLR register to reset the state machine.
+  *
+  * This scheme is necessary, instead of clearing the Valid bit in the
+  * IMAP register, to handle the case of IMAP registers being shared by
+  * multiple INOs (and thus ICLR registers).  Since we use a different
+  * virtual IRQ for each shared IMAP instance, the generic code thinks
+  * there is only one user so it prematurely calls ->disable() on
+  * free_irq().
+  *
+  * We have to provide an explicit ->disable() method instead of using
+  * NULL to get the default.  The reason is that if the generic code
+  * sees that, it also hooks up a default ->shutdown method which
+  * invokes ->mask() which we do not want.  See irq_chip_set_defaults().
+  */
  static void sun4u_irq_disable(unsigned int virt_irq)
  {
-       struct irq_handler_data *data = get_irq_chip_data(virt_irq);
-       if (likely(data)) {
-               unsigned long imap = data->imap;
-               unsigned long tmp = upa_readq(imap);
-               tmp &= ~IMAP_VALID;
-               upa_writeq(tmp, imap);
-       }
  }
  
  static void sun4u_irq_eoi(unsigned int virt_irq)
@@@ -747,7 -754,8 +755,8 @@@ void handler_irq(int irq, struct pt_reg
  
                desc = irq_desc + virt_irq;
  
-               desc->handle_irq(virt_irq, desc);
+               if (!(desc->status & IRQ_DISABLED))
+                       desc->handle_irq(virt_irq, desc);
  
                bucket_pa = next_pa;
        }
@@@ -797,7 -805,7 +806,7 @@@ void fixup_irqs(void
                    !(irq_desc[irq].status & IRQ_PER_CPU)) {
                        if (irq_desc[irq].chip->set_affinity)
                                irq_desc[irq].chip->set_affinity(irq,
 -                                      &irq_desc[irq].affinity);
 +                                      irq_desc[irq].affinity);
                }
                spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
        }
diff --combined arch/x86/mm/pageattr.c
index 8253bc97587e4950e2c2ea3170da767245ac825f,7233bd7e357bbccf2e6f091322606b083ca6f9d1..9c4294986af779ed62ab088af0dae0f0048eb0c9
@@@ -482,13 -482,6 +482,13 @@@ static int split_large_page(pte_t *kpte
        pbase = (pte_t *)page_address(base);
        paravirt_alloc_pte(&init_mm, page_to_pfn(base));
        ref_prot = pte_pgprot(pte_clrhuge(*kpte));
 +      /*
 +       * If we ever want to utilize the PAT bit, we need to
 +       * update this function to make sure it's converted from
 +       * bit 12 to bit 7 when we cross from the 2MB level to
 +       * the 4K level:
 +       */
 +      WARN_ON_ONCE(pgprot_val(ref_prot) & _PAGE_PAT_LARGE);
  
  #ifdef CONFIG_X86_64
        if (level == PG_LEVEL_1G) {
         * primary protection behavior:
         */
        __set_pmd_pte(kpte, address, mk_pte(base, __pgprot(_KERNPG_TABLE)));
+       /*
+        * Intel Atom errata AAH41 workaround.
+        *
+        * The real fix should be in hw or in a microcode update, but
+        * we also probabilistically try to reduce the window of having
+        * a large TLB mixed with 4K TLBs while instruction fetches are
+        * going on.
+        */
+       __flush_tlb_all();
        base = NULL;
  
  out_unlock:
diff --combined include/linux/sched.h
index 5b9424eaa58f6dbb2542ff069a5d8c86b7165176,53685c6fc098738abf21ab5c7ea1cdc12338532b..89cd308cc7a5bdf92e510b1fc9a785d79bd3ec9c
@@@ -137,8 -137,6 +137,8 @@@ extern unsigned long nr_uninterruptible
  extern unsigned long nr_active(void);
  extern unsigned long nr_iowait(void);
  
 +extern unsigned long get_parent_ip(unsigned long addr);
 +
  struct seq_file;
  struct cfs_rq;
  struct task_group;
@@@ -1182,9 -1180,10 +1182,9 @@@ struct task_struct 
        pid_t pid;
        pid_t tgid;
  
 -#ifdef CONFIG_CC_STACKPROTECTOR
        /* Canary value for the -fstack-protector gcc feature */
        unsigned long stack_canary;
 -#endif
 +
        /* 
         * pointers to (original) parent process, youngest child, younger sibling,
         * older sibling, respectively.  (p->father can be replaced with 
  #endif
  };
  
+ /* Future-safe accessor for struct task_struct's cpus_allowed. */
+ #define tsk_cpumask(tsk) (&(tsk)->cpus_allowed)
  /*
   * Priority of a process goes from 0..MAX_PRIO-1, valid RT
   * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH
@@@ -1674,16 -1676,6 +1677,16 @@@ static inline int set_cpus_allowed(stru
        return set_cpus_allowed_ptr(p, &new_mask);
  }
  
 +/*
 + * Architectures can set this to 1 if they have specified
 + * CONFIG_HAVE_UNSTABLE_SCHED_CLOCK in their arch Kconfig,
 + * but then during bootup it turns out that sched_clock()
 + * is reliable after all:
 + */
 +#ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
 +extern int sched_clock_stable;
 +#endif
 +
  extern unsigned long long sched_clock(void);
  
  extern void sched_clock_init(void);
@@@ -2101,19 -2093,6 +2104,19 @@@ static inline int object_is_on_stack(vo
  
  extern void thread_info_cache_init(void);
  
 +#ifdef CONFIG_DEBUG_STACK_USAGE
 +static inline unsigned long stack_not_used(struct task_struct *p)
 +{
 +      unsigned long *n = end_of_stack(p);
 +
 +      do {    /* Skip over canary */
 +              n++;
 +      } while (!*n);
 +
 +      return (unsigned long)n - (unsigned long)end_of_stack(p);
 +}
 +#endif
 +
  /* set thread flags in other task's structures
   * - see asm/thread_info.h for TIF_xxxx flags available
   */
diff --combined init/Kconfig
index 28deb709131a37ed2053b783aa487107af751582,6a5c5fed66c96e36fcaf03a9f3c8403be132a193..69d5190918e566467ec9dcfc43c07e71f4d113b6
@@@ -101,66 -101,6 +101,66 @@@ config LOCALVERSION_AUT
  
          which is done within the script "scripts/setlocalversion".)
  
 +config HAVE_KERNEL_GZIP
 +      bool
 +
 +config HAVE_KERNEL_BZIP2
 +      bool
 +
 +config HAVE_KERNEL_LZMA
 +      bool
 +
 +choice
 +      prompt "Kernel compression mode"
 +      default KERNEL_GZIP
 +      depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA
 +      help
 +        The linux kernel is a kind of self-extracting executable.
 +        Several compression algorithms are available, which differ
 +        in efficiency, compression and decompression speed.
 +        Compression speed is only relevant when building a kernel.
 +        Decompression speed is relevant at each boot.
 +
 +        If you have any problems with bzip2 or lzma compressed
 +        kernels, mail me (Alain Knaff) <alain@knaff.lu>. (An older
 +        version of this functionality (bzip2 only), for 2.4, was
 +        supplied by Christian Ludwig)
 +
 +        High compression options are mostly useful for users, who
 +        are low on disk space (embedded systems), but for whom ram
 +        size matters less.
 +
 +        If in doubt, select 'gzip'
 +
 +config KERNEL_GZIP
 +      bool "Gzip"
 +      depends on HAVE_KERNEL_GZIP
 +      help
 +        The old and tried gzip compression. Its compression ratio is
 +        the poorest among the 3 choices; however its speed (both
 +        compression and decompression) is the fastest.
 +
 +config KERNEL_BZIP2
 +      bool "Bzip2"
 +      depends on HAVE_KERNEL_BZIP2
 +      help
 +        Its compression ratio and speed is intermediate.
 +        Decompression speed is slowest among the three.  The kernel
 +        size is about 10% smaller with bzip2, in comparison to gzip.
 +        Bzip2 uses a large amount of memory. For modern kernels you
 +        will need at least 8MB RAM or more for booting.
 +
 +config KERNEL_LZMA
 +      bool "LZMA"
 +      depends on HAVE_KERNEL_LZMA
 +      help
 +        The most recent compression algorithm.
 +        Its ratio is best, decompression speed is between the other
 +        two. Compression is slowest.  The kernel size is about 33%
 +        smaller with LZMA in comparison to gzip.
 +
 +endchoice
 +
  config SWAP
        bool "Support for paging of anonymous memory (swap)"
        depends on MMU && BLOCK
@@@ -735,6 -675,9 +735,9 @@@ config CC_OPTIMIZE_FOR_SIZ
  config SYSCTL
        bool
  
+ config ANON_INODES
+       bool
  menuconfig EMBEDDED
        bool "Configure standard kernel features (for small systems)"
        help
@@@ -840,18 -783,6 +843,6 @@@ config PCSPKR_PLATFOR
            This option allows to disable the internal PC-Speaker
            support, saving some memory.
  
- config COMPAT_BRK
-       bool "Disable heap randomization"
-       default y
-       help
-         Randomizing heap placement makes heap exploits harder, but it
-         also breaks ancient binaries (including anything libc5 based).
-         This option changes the bootup default to heap randomization
-         disabled, and can be overriden runtime by setting
-         /proc/sys/kernel/randomize_va_space to 2.
-         On non-ancient distros (post-2000 ones) N is usually a safe choice.
  config BASE_FULL
        default y
        bool "Enable full-sized data structures for core" if EMBEDDED
@@@ -869,9 -800,6 +860,6 @@@ config FUTE
          support for "fast userspace mutexes".  The resulting kernel may not
          run glibc-based applications correctly.
  
- config ANON_INODES
-       bool
  config EPOLL
        bool "Enable eventpoll support" if EMBEDDED
        default y
@@@ -957,6 -885,18 +945,18 @@@ config SLUB_DEBU
          SLUB sysfs support. /sys/slab will not exist and there will be
          no support for cache validation etc.
  
+ config COMPAT_BRK
+       bool "Disable heap randomization"
+       default y
+       help
+         Randomizing heap placement makes heap exploits harder, but it
+         also breaks ancient binaries (including anything libc5 based).
+         This option changes the bootup default to heap randomization
+         disabled, and can be overriden runtime by setting
+         /proc/sys/kernel/randomize_va_space to 2.
+         On non-ancient distros (post-2000 ones) N is usually a safe choice.
  choice
        prompt "Choose SLAB allocator"
        default SLUB
@@@ -1005,7 -945,7 +1005,7 @@@ config TRACEPOINT
  
  config MARKERS
        bool "Activate markers"
 -      depends on TRACEPOINTS
 +      select TRACEPOINTS
        help
          Place an empty function call at each marker site. Can be
          dynamically changed for a probe function.
diff --combined kernel/lockdep.c
index cb70c1db85d04537f9fd0a3748ead6b2c726ba24,9a1e2bcc4b8d2062ad72d491f19ef49e7e18434d..71b567f5281340c7d2ea77b6097a86e41b583f1d
@@@ -42,7 -42,6 +42,7 @@@
  #include <linux/hash.h>
  #include <linux/ftrace.h>
  #include <linux/stringify.h>
 +#include <trace/lockdep.h>
  
  #include <asm/sections.h>
  
@@@ -434,13 -433,6 +434,6 @@@ atomic_t nr_find_usage_forwards_checks
  atomic_t nr_find_usage_forwards_recursions;
  atomic_t nr_find_usage_backwards_checks;
  atomic_t nr_find_usage_backwards_recursions;
- # define debug_atomic_inc(ptr)                atomic_inc(ptr)
- # define debug_atomic_dec(ptr)                atomic_dec(ptr)
- # define debug_atomic_read(ptr)               atomic_read(ptr)
- #else
- # define debug_atomic_inc(ptr)                do { } while (0)
- # define debug_atomic_dec(ptr)                do { } while (0)
- # define debug_atomic_read(ptr)               0
  #endif
  
  /*
@@@ -2914,8 -2906,6 +2907,8 @@@ void lock_set_class(struct lockdep_map 
  }
  EXPORT_SYMBOL_GPL(lock_set_class);
  
 +DEFINE_TRACE(lock_acquire);
 +
  /*
   * We are not always called with irqs disabled - do that here,
   * and also avoid lockdep recursion:
@@@ -2926,8 -2916,6 +2919,8 @@@ void lock_acquire(struct lockdep_map *l
  {
        unsigned long flags;
  
 +      trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
 +
        if (unlikely(current->lockdep_recursion))
                return;
  
  }
  EXPORT_SYMBOL_GPL(lock_acquire);
  
 +DEFINE_TRACE(lock_release);
 +
  void lock_release(struct lockdep_map *lock, int nested,
                          unsigned long ip)
  {
        unsigned long flags;
  
 +      trace_lock_release(lock, nested, ip);
 +
        if (unlikely(current->lockdep_recursion))
                return;
  
@@@ -3099,14 -3083,10 +3092,14 @@@ found_it
        lock->ip = ip;
  }
  
 +DEFINE_TRACE(lock_contended);
 +
  void lock_contended(struct lockdep_map *lock, unsigned long ip)
  {
        unsigned long flags;
  
 +      trace_lock_contended(lock, ip);
 +
        if (unlikely(!lock_stat))
                return;
  
  }
  EXPORT_SYMBOL_GPL(lock_contended);
  
 +DEFINE_TRACE(lock_acquired);
 +
  void lock_acquired(struct lockdep_map *lock, unsigned long ip)
  {
        unsigned long flags;
  
 +      trace_lock_acquired(lock, ip);
 +
        if (unlikely(!lock_stat))
                return;
  
diff --combined kernel/softirq.c
index bbf6d6496f05f426183ce8ed4872345450166a84,08a030f85416c3e73d6131f5605d997403fa509c..7571bcb71be44f637a2d5a633cbe27dbd4eded01
@@@ -21,7 -21,6 +21,7 @@@
  #include <linux/freezer.h>
  #include <linux/kthread.h>
  #include <linux/rcupdate.h>
 +#include <linux/ftrace.h>
  #include <linux/smp.h>
  #include <linux/tick.h>
  
@@@ -80,23 -79,13 +80,23 @@@ static void __local_bh_disable(unsigne
        WARN_ON_ONCE(in_irq());
  
        raw_local_irq_save(flags);
 -      add_preempt_count(SOFTIRQ_OFFSET);
 +      /*
 +       * The preempt tracer hooks into add_preempt_count and will break
 +       * lockdep because it calls back into lockdep after SOFTIRQ_OFFSET
 +       * is set and before current->softirq_enabled is cleared.
 +       * We must manually increment preempt_count here and manually
 +       * call the trace_preempt_off later.
 +       */
 +      preempt_count() += SOFTIRQ_OFFSET;
        /*
         * Were softirqs turned off above:
         */
        if (softirq_count() == SOFTIRQ_OFFSET)
                trace_softirqs_off(ip);
        raw_local_irq_restore(flags);
 +
 +      if (preempt_count() == SOFTIRQ_OFFSET)
 +              trace_preempt_off(CALLER_ADDR0, get_parent_ip(CALLER_ADDR1));
  }
  #else /* !CONFIG_TRACE_IRQFLAGS */
  static inline void __local_bh_disable(unsigned long ip)
@@@ -191,7 -180,7 +191,7 @@@ asmlinkage void __do_softirq(void
        account_system_vtime(current);
  
        __local_bh_disable((unsigned long)__builtin_return_address(0));
-       trace_softirq_enter();
+       lockdep_softirq_enter();
  
        cpu = smp_processor_id();
  restart:
        if (pending)
                wakeup_softirqd();
  
-       trace_softirq_exit();
+       lockdep_softirq_exit();
  
        account_system_vtime(current);
        _local_bh_enable();
@@@ -807,11 -796,6 +807,11 @@@ int __init __weak early_irq_init(void
        return 0;
  }
  
 +int __init __weak arch_probe_nr_irqs(void)
 +{
 +      return 0;
 +}
 +
  int __init __weak arch_early_irq_init(void)
  {
        return 0;