Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Feb 2015 01:42:32 +0000 (17:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Feb 2015 01:42:32 +0000 (17:42 -0800)
Pull s390 updates from Martin Schwidefsky:

 - The remaining patches for the z13 machine support: kernel build
   option for z13, the cache synonym avoidance, SMT support,
   compare-and-delay for spinloops and the CES5S crypto adapater.

 - The ftrace support for function tracing with the gcc hotpatch option.
   This touches common code Makefiles, Steven is ok with the changes.

 - The hypfs file system gets an extension to access diagnose 0x0c data
   in user space for performance analysis for Linux running under z/VM.

 - The iucv hvc console gets wildcard spport for the user id filtering.

 - The cacheinfo code is converted to use the generic infrastructure.

 - Cleanup and bug fixes.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (42 commits)
  s390/process: free vx save area when releasing tasks
  s390/hypfs: Eliminate hypfs interval
  s390/hypfs: Add diagnose 0c support
  s390/cacheinfo: don't use smp_processor_id() in preemptible context
  s390/zcrypt: fixed domain scanning problem (again)
  s390/smp: increase maximum value of NR_CPUS to 512
  s390/jump label: use different nop instruction
  s390/jump label: add sanity checks
  s390/mm: correct missing space when reporting user process faults
  s390/dasd: cleanup profiling
  s390/dasd: add locking for global_profile access
  s390/ftrace: hotpatch support for function tracing
  ftrace: let notrace function attribute disable hotpatching if necessary
  ftrace: allow architectures to specify ftrace compile options
  s390: reintroduce diag 44 calls for cpu_relax()
  s390/zcrypt: Add support for new crypto express (CEX5S) adapter.
  s390/zcrypt: Number of supported ap domains is not retrievable.
  s390/spinlock: add compare-and-delay to lock wait loops
  s390/tape: remove redundant if statement
  s390/hvc_iucv: add simple wildcard matches to the iucv allow filter
  ...

1  2 
Makefile
arch/s390/include/asm/pgtable.h
arch/s390/include/asm/sigp.h
arch/s390/mm/fault.c
arch/s390/mm/pgtable.c
include/linux/compiler.h
kernel/Makefile
kernel/locking/Makefile
kernel/trace/Makefile
lib/Makefile
scripts/recordmcount.pl

diff --combined Makefile
index b15036b1890cae7031b56c4718edbd5baddfacbb,11c6fe8f708fee45d9c2ffde5aefa10b58a1bc08..5fa2e3035509cf533cd4d7d3ad92fbe8fe5b0897
+++ b/Makefile
@@@ -1,5 -1,5 +1,5 @@@
  VERSION = 3
 -PATCHLEVEL = 18
 +PATCHLEVEL = 19
  SUBLEVEL = 0
  EXTRAVERSION =
  NAME = Diseased Newt
@@@ -391,7 -391,6 +391,7 @@@ USERINCLUDE    := 
  # Needed to be compatible with the O= option
  LINUXINCLUDE    := \
                -I$(srctree)/arch/$(hdr-arch)/include \
 +              -Iarch/$(hdr-arch)/include/generated/uapi \
                -Iarch/$(hdr-arch)/include/generated \
                $(if $(KBUILD_SRC), -I$(srctree)/include) \
                -Iinclude \
@@@ -482,10 -481,9 +482,10 @@@ asm-generic
  # of make so .config is not included in this case either (for *config).
  
  version_h := include/generated/uapi/linux/version.h
 +old_version_h := include/linux/version.h
  
  no-dot-config-targets := clean mrproper distclean \
 -                       cscope gtags TAGS tags help %docs check% coccicheck \
 +                       cscope gtags TAGS tags help% %docs check% coccicheck \
                         $(version_h) headers_% archheaders archscripts \
                         kernelversion %src-pkg
  
@@@ -726,10 -724,14 +726,14 @@@ KBUILD_CFLAGS   += $(call cc-option, -fe
  endif
  
  ifdef CONFIG_FUNCTION_TRACER
+ ifndef CC_FLAGS_FTRACE
+ CC_FLAGS_FTRACE := -pg
+ endif
+ export CC_FLAGS_FTRACE
  ifdef CONFIG_HAVE_FENTRY
  CC_USING_FENTRY       := $(call cc-option, -mfentry -DCC_USING_FENTRY)
  endif
- KBUILD_CFLAGS += -pg $(CC_USING_FENTRY)
+ KBUILD_CFLAGS += $(CC_FLAGS_FTRACE) $(CC_USING_FENTRY)
  KBUILD_AFLAGS += $(CC_USING_FENTRY)
  ifdef CONFIG_DYNAMIC_FTRACE
        ifdef CONFIG_HAVE_C_RECORDMCOUNT
@@@ -1007,7 -1009,6 +1011,7 @@@ ende
  
  $(version_h): $(srctree)/Makefile FORCE
        $(call filechk,version.h)
 +      $(Q)rm -f $(old_version_h)
  
  include/generated/utsrelease.h: include/config/kernel.release FORCE
        $(call filechk,utsrelease.h)
@@@ -1039,6 -1040,8 +1043,6 @@@ firmware_install: FORC
  #Default location for installed headers
  export INSTALL_HDR_PATH = $(objtree)/usr
  
 -hdr-inst := -rR -f $(srctree)/scripts/Makefile.headersinst obj
 -
  # If we do an all arch process set dst to asm-$(hdr-arch)
  hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm)
  
@@@ -1176,7 -1179,7 +1180,7 @@@ MRPROPER_FILES += .config .config.old .
                  Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
                  signing_key.priv signing_key.x509 x509.genkey         \
                  extra_certificates signing_key.x509.keyid             \
 -                signing_key.x509.signer include/linux/version.h
 +                signing_key.x509.signer
  
  # clean - Delete most, but leave enough to build external modules
  #
@@@ -1236,7 -1239,7 +1240,7 @@@ rpm: include/config/kernel.release FORC
  # ---------------------------------------------------------------------------
  
  boards := $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*_defconfig)
 -boards := $(notdir $(boards))
 +boards := $(sort $(notdir $(boards)))
  board-dirs := $(dir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*/*_defconfig))
  board-dirs := $(sort $(notdir $(board-dirs:/=)))
  
@@@ -1327,7 -1330,7 +1331,7 @@@ help-board-dirs := $(addprefix help-,$(
  
  help-boards: $(help-board-dirs)
  
 -boards-per-dir = $(notdir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/$*/*_defconfig))
 +boards-per-dir = $(sort $(notdir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/$*/*_defconfig)))
  
  $(help-board-dirs): help-%:
        @echo  'Architecture specific targets ($(SRCARCH) $*):'
@@@ -1582,6 -1585,11 +1586,6 @@@ ifneq ($(cmd_files),
    include $(cmd_files)
  endif
  
 -# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir
 -# Usage:
 -# $(Q)$(MAKE) $(clean)=dir
 -clean := -f $(srctree)/scripts/Makefile.clean obj
 -
  endif # skip-makefile
  
  PHONY += FORCE
index ffb1d8ce97aeac9e1f98d5a1d9bf1549c7d2418b,b8641b41e19c3740ccbc5bddd0db04703d8dccf1..0441ec24ae87cddb7f8bad10b5c68273ba4e6f42
@@@ -249,10 -249,10 +249,10 @@@ static inline int is_module_addr(void *
                                 _PAGE_YOUNG)
  
  /*
 - * handle_pte_fault uses pte_present, pte_none and pte_file to find out the
 - * pte type WITHOUT holding the page table lock. The _PAGE_PRESENT bit
 - * is used to distinguish present from not-present ptes. It is changed only
 - * with the page table lock held.
 + * handle_pte_fault uses pte_present and pte_none to find out the pte type
 + * WITHOUT holding the page table lock. The _PAGE_PRESENT bit is used to
 + * distinguish present from not-present ptes. It is changed only with the page
 + * table lock held.
   *
   * The following table gives the different possible bit combinations for
   * the pte hardware and software bits in the last 12 bits of a pte:
   *
   * pte_present is true for the bit pattern .xx...xxxxx1, (pte & 0x001) == 0x001
   * pte_none    is true for the bit pattern .10...xxxx00, (pte & 0x603) == 0x400
 - * pte_file    is true for the bit pattern .11...xxxxx0, (pte & 0x601) == 0x600
   * pte_swap    is true for the bit pattern .10...xxxx10, (pte & 0x603) == 0x402
   */
  
@@@ -670,6 -671,13 +670,6 @@@ static inline int pte_swap(pte_t pte
                == (_PAGE_INVALID | _PAGE_TYPE);
  }
  
 -static inline int pte_file(pte_t pte)
 -{
 -      /* Bit pattern: (pte & 0x601) == 0x600 */
 -      return (pte_val(pte) & (_PAGE_INVALID | _PAGE_PROTECT | _PAGE_PRESENT))
 -              == (_PAGE_INVALID | _PAGE_PROTECT);
 -}
 -
  static inline int pte_special(pte_t pte)
  {
        return (pte_val(pte) & _PAGE_SPECIAL);
@@@ -1748,6 -1756,19 +1748,6 @@@ static inline pte_t mk_swap_pte(unsigne
  #define __pte_to_swp_entry(pte)       ((swp_entry_t) { pte_val(pte) })
  #define __swp_entry_to_pte(x) ((pte_t) { (x).val })
  
 -#ifndef CONFIG_64BIT
 -# define PTE_FILE_MAX_BITS    26
 -#else /* CONFIG_64BIT */
 -# define PTE_FILE_MAX_BITS    59
 -#endif /* CONFIG_64BIT */
 -
 -#define pte_to_pgoff(__pte) \
 -      ((((__pte).pte >> 12) << 7) + (((__pte).pte >> 1) & 0x7f))
 -
 -#define pgoff_to_pte(__off) \
 -      ((pte_t) { ((((__off) & 0x7f) << 1) + (((__off) >> 7) << 12)) \
 -                 | _PAGE_INVALID | _PAGE_PROTECT })
 -
  #endif /* !__ASSEMBLY__ */
  
  #define kern_addr_valid(addr)   (1)
@@@ -1758,6 -1779,10 +1758,10 @@@ extern int s390_enable_sie(void)
  extern int s390_enable_skey(void);
  extern void s390_reset_cmma(struct mm_struct *mm);
  
+ /* s390 has a private copy of get unmapped area to deal with cache synonyms */
+ #define HAVE_ARCH_UNMAPPED_AREA
+ #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
  /*
   * No page table caches to initialise
   */
index fad4ae23ece05a6e7d922d75033c4fb347c6357d,c49d9c0483a83f0c0178e512ba8d6c1cbb889fd4..ec60cf7fa0a247ec7f13d70480c3312386823096
  #define SIGP_RESTART                6
  #define SIGP_STOP_AND_STORE_STATUS    9
  #define SIGP_INITIAL_CPU_RESET             11
 +#define SIGP_CPU_RESET                     12
  #define SIGP_SET_PREFIX                    13
  #define SIGP_STORE_STATUS_AT_ADDRESS 14
  #define SIGP_SET_ARCHITECTURE      18
  #define SIGP_COND_EMERGENCY_SIGNAL   19
  #define SIGP_SENSE_RUNNING         21
+ #define SIGP_SET_MULTI_THREADING     22
  #define SIGP_STORE_ADDITIONAL_STATUS 23
  
  /* SIGP condition codes */
diff --combined arch/s390/mm/fault.c
index 9065d5aa3932dd7f6637069e493f2ad4a3ad72f3,0d02e48cf04a9199fd4cc63021665c761c420a36..3ff86533f7db925b575309d63b08727551ac0d40
@@@ -171,7 -171,7 +171,7 @@@ static void dump_pagetable(unsigned lon
                table = table + ((address >> 20) & 0x7ff);
                if (bad_address(table))
                        goto bad;
-               pr_cont(KERN_CONT "S:%016lx ", *table);
+               pr_cont("S:%016lx ", *table);
                if (*table & (_SEGMENT_ENTRY_INVALID | _SEGMENT_ENTRY_LARGE))
                        goto out;
                table = (unsigned long *)(*table & _SEGMENT_ENTRY_ORIGIN);
@@@ -261,7 -261,7 +261,7 @@@ static inline void report_user_fault(st
                return;
        if (!printk_ratelimit())
                return;
-       printk(KERN_ALERT "User process fault: interruption code %04x ilc:%d",
+       printk(KERN_ALERT "User process fault: interruption code %04x ilc:%d ",
               regs->int_code & 0xffff, regs->int_code >> 17);
        print_vma_addr(KERN_CONT "in ", regs->psw.addr & PSW_ADDR_INSN);
        printk(KERN_CONT "\n");
@@@ -374,12 -374,6 +374,12 @@@ static noinline void do_fault_error(str
                                do_no_context(regs);
                        else
                                pagefault_out_of_memory();
 +              } else if (fault & VM_FAULT_SIGSEGV) {
 +                      /* Kernel mode? Handle exceptions or die */
 +                      if (!user_mode(regs))
 +                              do_no_context(regs);
 +                      else
 +                              do_sigsegv(regs, SEGV_MAPERR);
                } else if (fault & VM_FAULT_SIGBUS) {
                        /* Kernel mode? Handle exceptions or die */
                        if (!user_mode(regs))
diff --combined arch/s390/mm/pgtable.c
index 3cf8cc03fff60d7a59e7b23f4e92d477061a5f42,47cbca079740ae259a43c7969e976bbb02303abb..b2c1542f2ba2ce979befff85f4fc1f9fffeb70ad
@@@ -527,7 -527,7 +527,7 @@@ int __gmap_link(struct gmap *gmap, unsi
                table += (gaddr >> 53) & 0x7ff;
                if ((*table & _REGION_ENTRY_INVALID) &&
                    gmap_alloc_table(gmap, table, _REGION2_ENTRY_EMPTY,
-                                    gaddr & 0xffe0000000000000))
+                                    gaddr & 0xffe0000000000000UL))
                        return -ENOMEM;
                table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
        }
                table += (gaddr >> 42) & 0x7ff;
                if ((*table & _REGION_ENTRY_INVALID) &&
                    gmap_alloc_table(gmap, table, _REGION3_ENTRY_EMPTY,
-                                    gaddr & 0xfffffc0000000000))
+                                    gaddr & 0xfffffc0000000000UL))
                        return -ENOMEM;
                table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
        }
                table += (gaddr >> 31) & 0x7ff;
                if ((*table & _REGION_ENTRY_INVALID) &&
                    gmap_alloc_table(gmap, table, _SEGMENT_ENTRY_EMPTY,
-                                    gaddr & 0xffffffff80000000))
+                                    gaddr & 0xffffffff80000000UL))
                        return -ENOMEM;
                table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
        }
@@@ -845,7 -845,7 +845,7 @@@ int set_guest_storage_key(struct mm_str
  
        down_read(&mm->mmap_sem);
  retry:
 -      ptep = get_locked_pte(current->mm, addr, &ptl);
 +      ptep = get_locked_pte(mm, addr, &ptl);
        if (unlikely(!ptep)) {
                up_read(&mm->mmap_sem);
                return -EFAULT;
  }
  EXPORT_SYMBOL(set_guest_storage_key);
  
 +unsigned long get_guest_storage_key(struct mm_struct *mm, unsigned long addr)
 +{
 +      spinlock_t *ptl;
 +      pgste_t pgste;
 +      pte_t *ptep;
 +      uint64_t physaddr;
 +      unsigned long key = 0;
 +
 +      down_read(&mm->mmap_sem);
 +      ptep = get_locked_pte(mm, addr, &ptl);
 +      if (unlikely(!ptep)) {
 +              up_read(&mm->mmap_sem);
 +              return -EFAULT;
 +      }
 +      pgste = pgste_get_lock(ptep);
 +
 +      if (pte_val(*ptep) & _PAGE_INVALID) {
 +              key |= (pgste_val(pgste) & PGSTE_ACC_BITS) >> 56;
 +              key |= (pgste_val(pgste) & PGSTE_FP_BIT) >> 56;
 +              key |= (pgste_val(pgste) & PGSTE_GR_BIT) >> 48;
 +              key |= (pgste_val(pgste) & PGSTE_GC_BIT) >> 48;
 +      } else {
 +              physaddr = pte_val(*ptep) & PAGE_MASK;
 +              key = page_get_storage_key(physaddr);
 +
 +              /* Reflect guest's logical view, not physical */
 +              if (pgste_val(pgste) & PGSTE_GR_BIT)
 +                      key |= _PAGE_REFERENCED;
 +              if (pgste_val(pgste) & PGSTE_GC_BIT)
 +                      key |= _PAGE_CHANGED;
 +      }
 +
 +      pgste_set_unlock(ptep, pgste);
 +      pte_unmap_unlock(ptep, ptl);
 +      up_read(&mm->mmap_sem);
 +      return key;
 +}
 +EXPORT_SYMBOL(get_guest_storage_key);
 +
  #else /* CONFIG_PGSTE */
  
  static inline int page_table_with_pgste(struct page *page)
diff --combined include/linux/compiler.h
index 176bf816875edcb76fe9dd39470c5e1c139a4551,1ef679f4b88e68afa49d46f0e2051594421976cf..17f624cdf53c5609066389bd3da3375fcdfe2827
@@@ -54,7 -54,11 +54,11 @@@ extern void __chk_io_ptr(const volatil
  #include <linux/compiler-gcc.h>
  #endif
  
+ #ifdef CC_USING_HOTPATCH
+ #define notrace __attribute__((hotpatch(0,0)))
+ #else
  #define notrace __attribute__((no_instrument_function))
+ #endif
  
  /* Intel compiler defines __GNUC__. So we will overwrite implementations
   * coming from above header files here
@@@ -186,80 -190,6 +190,80 @@@ void ftrace_likely_update(struct ftrace
  # define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __LINE__)
  #endif
  
 +#include <uapi/linux/types.h>
 +
 +static __always_inline void data_access_exceeds_word_size(void)
 +#ifdef __compiletime_warning
 +__compiletime_warning("data access exceeds word size and won't be atomic")
 +#endif
 +;
 +
 +static __always_inline void data_access_exceeds_word_size(void)
 +{
 +}
 +
 +static __always_inline void __read_once_size(volatile void *p, void *res, int size)
 +{
 +      switch (size) {
 +      case 1: *(__u8 *)res = *(volatile __u8 *)p; break;
 +      case 2: *(__u16 *)res = *(volatile __u16 *)p; break;
 +      case 4: *(__u32 *)res = *(volatile __u32 *)p; break;
 +#ifdef CONFIG_64BIT
 +      case 8: *(__u64 *)res = *(volatile __u64 *)p; break;
 +#endif
 +      default:
 +              barrier();
 +              __builtin_memcpy((void *)res, (const void *)p, size);
 +              data_access_exceeds_word_size();
 +              barrier();
 +      }
 +}
 +
 +static __always_inline void __write_once_size(volatile void *p, void *res, int size)
 +{
 +      switch (size) {
 +      case 1: *(volatile __u8 *)p = *(__u8 *)res; break;
 +      case 2: *(volatile __u16 *)p = *(__u16 *)res; break;
 +      case 4: *(volatile __u32 *)p = *(__u32 *)res; break;
 +#ifdef CONFIG_64BIT
 +      case 8: *(volatile __u64 *)p = *(__u64 *)res; break;
 +#endif
 +      default:
 +              barrier();
 +              __builtin_memcpy((void *)p, (const void *)res, size);
 +              data_access_exceeds_word_size();
 +              barrier();
 +      }
 +}
 +
 +/*
 + * Prevent the compiler from merging or refetching reads or writes. The
 + * compiler is also forbidden from reordering successive instances of
 + * READ_ONCE, WRITE_ONCE and ACCESS_ONCE (see below), but only when the
 + * compiler is aware of some particular ordering.  One way to make the
 + * compiler aware of ordering is to put the two invocations of READ_ONCE,
 + * WRITE_ONCE or ACCESS_ONCE() in different C statements.
 + *
 + * In contrast to ACCESS_ONCE these two macros will also work on aggregate
 + * data types like structs or unions. If the size of the accessed data
 + * type exceeds the word size of the machine (e.g., 32 bits or 64 bits)
 + * READ_ONCE() and WRITE_ONCE()  will fall back to memcpy and print a
 + * compile-time warning.
 + *
 + * Their two major use cases are: (1) Mediating communication between
 + * process-level code and irq/NMI handlers, all running on the same CPU,
 + * and (2) Ensuring that the compiler does not  fold, spindle, or otherwise
 + * mutilate accesses that either do not require ordering or that interact
 + * with an explicit memory barrier or atomic instruction that provides the
 + * required ordering.
 + */
 +
 +#define READ_ONCE(x) \
 +      ({ typeof(x) __val; __read_once_size(&x, &__val, sizeof(__val)); __val; })
 +
 +#define WRITE_ONCE(x, val) \
 +      ({ typeof(x) __val; __val = val; __write_once_size(&x, &__val, sizeof(__val)); __val; })
 +
  #endif /* __KERNEL__ */
  
  #endif /* __ASSEMBLY__ */
  
  /* Is this type a native word size -- useful for atomic operations */
  #ifndef __native_word
 -# define __native_word(t) (sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
 +# define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long))
  #endif
  
  /* Compile time object size, -1 for unknown */
diff --combined kernel/Makefile
index 616994f0a76f873c6d5e1c3827d9c07630c7b9ae,13af308f2460325c392997d2aa08cdc499310354..07737e50fe6e6ec2c35d8a40794a535e7d4a71b0
@@@ -13,8 -13,8 +13,8 @@@ obj-y     = fork.o exec_domain.o panic.
  
  ifdef CONFIG_FUNCTION_TRACER
  # Do not trace debug files and internal ftrace files
- CFLAGS_REMOVE_cgroup-debug.o = -pg
- CFLAGS_REMOVE_irq_work.o = -pg
+ CFLAGS_REMOVE_cgroup-debug.o = $(CC_FLAGS_FTRACE)
+ CFLAGS_REMOVE_irq_work.o = $(CC_FLAGS_FTRACE)
  endif
  
  # cond_syscall is currently not LTO compatible
@@@ -26,7 -26,6 +26,7 @@@ obj-y += power
  obj-y += printk/
  obj-y += irq/
  obj-y += rcu/
 +obj-y += livepatch/
  
  obj-$(CONFIG_CHECKPOINT_RESTORE) += kcmp.o
  obj-$(CONFIG_FREEZER) += freezer.o
diff --combined kernel/locking/Makefile
index 4ca8eb1519755ac17e314259fa595d18f76db058,4caca3f7af533bed0ebf0f674f0dbb9651162f44..de7a416cca2a79e537ff9fdb489aef09b4c01662
@@@ -1,11 -1,11 +1,11 @@@
  
 -obj-y += mutex.o semaphore.o rwsem.o mcs_spinlock.o
 +obj-y += mutex.o semaphore.o rwsem.o
  
  ifdef CONFIG_FUNCTION_TRACER
- CFLAGS_REMOVE_lockdep.o = -pg
- CFLAGS_REMOVE_lockdep_proc.o = -pg
- CFLAGS_REMOVE_mutex-debug.o = -pg
- CFLAGS_REMOVE_rtmutex-debug.o = -pg
+ CFLAGS_REMOVE_lockdep.o = $(CC_FLAGS_FTRACE)
+ CFLAGS_REMOVE_lockdep_proc.o = $(CC_FLAGS_FTRACE)
+ CFLAGS_REMOVE_mutex-debug.o = $(CC_FLAGS_FTRACE)
+ CFLAGS_REMOVE_rtmutex-debug.o = $(CC_FLAGS_FTRACE)
  endif
  
  obj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o
@@@ -14,7 -14,6 +14,7 @@@ ifeq ($(CONFIG_PROC_FS),y
  obj-$(CONFIG_LOCKDEP) += lockdep_proc.o
  endif
  obj-$(CONFIG_SMP) += spinlock.o
 +obj-$(CONFIG_LOCK_SPIN_ON_OWNER) += osq_lock.o
  obj-$(CONFIG_SMP) += lglock.o
  obj-$(CONFIG_PROVE_LOCKING) += spinlock.o
  obj-$(CONFIG_RT_MUTEXES) += rtmutex.o
diff --combined kernel/trace/Makefile
index 979ccde26720410592439cf7fe99e28bb3eb0e70,9a7e0e60a1a89e51463c83e6ab32462548af9794..98f26588255ec7ed18a37b71be71ec2d6405afad
@@@ -3,11 -3,11 +3,11 @@@
  
  ifdef CONFIG_FUNCTION_TRACER
  ORIG_CFLAGS := $(KBUILD_CFLAGS)
- KBUILD_CFLAGS = $(subst -pg,,$(ORIG_CFLAGS))
+ KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS))
  
  ifdef CONFIG_FTRACE_SELFTEST
  # selftest needs instrumentation
- CFLAGS_trace_selftest_dynamic.o = -pg
+ CFLAGS_trace_selftest_dynamic.o = $(CC_FLAGS_FTRACE)
  obj-y += trace_selftest_dynamic.o
  endif
  endif
@@@ -55,7 -55,7 +55,7 @@@ obj-$(CONFIG_EVENT_TRACING) += trace_ev
  obj-$(CONFIG_EVENT_TRACING) += trace_events_trigger.o
  obj-$(CONFIG_KPROBE_EVENT) += trace_kprobe.o
  obj-$(CONFIG_TRACEPOINTS) += power-traces.o
 -ifeq ($(CONFIG_PM_RUNTIME),y)
 +ifeq ($(CONFIG_PM),y)
  obj-$(CONFIG_TRACEPOINTS) += rpm-traces.o
  endif
  ifeq ($(CONFIG_TRACING),y)
diff --combined lib/Makefile
index 7db78934ec07c25cae7d62db863d227da41cd546,f3f73e50519a87e7f837e4d5e909273bd0561503..25c061f77df7997b3a914525a597026eb1a7670c
@@@ -4,7 -4,7 +4,7 @@@
  
  ifdef CONFIG_FUNCTION_TRACER
  ORIG_CFLAGS := $(KBUILD_CFLAGS)
- KBUILD_CFLAGS = $(subst -pg,,$(ORIG_CFLAGS))
+ KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS))
  endif
  
  lib-y := ctype.o string.o vsprintf.o cmdline.o \
@@@ -24,7 -24,7 +24,7 @@@ obj-y += lockref.
  
  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 \
 -       gcd.o lcm.o list_sort.o uuid.o flex_array.o iovec.o clz_ctz.o \
 +       gcd.o lcm.o list_sort.o uuid.o flex_array.o clz_ctz.o \
         bsearch.o find_last_bit.o find_next_bit.o llist.o memweight.o kfifo.o \
         percpu-refcount.o percpu_ida.o rhashtable.o reciprocal_div.o
  obj-y += string_helpers.o
@@@ -35,7 -35,6 +35,7 @@@ obj-$(CONFIG_TEST_LKM) += test_module.
  obj-$(CONFIG_TEST_USER_COPY) += test_user_copy.o
  obj-$(CONFIG_TEST_BPF) += test_bpf.o
  obj-$(CONFIG_TEST_FIRMWARE) += test_firmware.o
 +obj-$(CONFIG_TEST_RHASHTABLE) += test_rhashtable.o
  
  ifeq ($(CONFIG_DEBUG_KOBJECT),y)
  CFLAGS_kobject.o += -DDEBUG
diff --combined scripts/recordmcount.pl
index 537c38ca2e1c7008b2f0f98d4e172c714162eb79,be39be0abefca87defe8b562fa8f64860268a5f3..826470d7f00077278875a68c577bccbc7a82d5ea
@@@ -242,8 -242,13 +242,13 @@@ if ($arch eq "x86_64") 
      $cc .= " -m32";
  
  } elsif ($arch eq "s390" && $bits == 64) {
-     $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_390_(PC|PLT)32DBL\\s+_mcount\\+0x2\$";
-     $mcount_adjust = -14;
+     if ($cc =~ /-DCC_USING_HOTPATCH/) {
+       $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*c0 04 00 00 00 00\\s*brcl\\s*0,[0-9a-f]+ <([^\+]*)>\$";
+       $mcount_adjust = 0;
+     } else {
+       $mcount_regex = "^\\s*([0-9a-fA-F]+):\\s*R_390_(PC|PLT)32DBL\\s+_mcount\\+0x2\$";
+       $mcount_adjust = -14;
+     }
      $alignment = 8;
      $type = ".quad";
      $ld .= " -m elf64_s390";
      # force flags for this arch
      $ld .= " -m shlelf_linux";
      $objcopy .= " -O elf32-sh-linux";
 -    $cc .= " -m32";
  
  } elsif ($arch eq "powerpc") {
      $local_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\.?\\S+)";