Merge branch 'topic/ppc-kvm' into next
authorMichael Ellerman <mpe@ellerman.id.au>
Sun, 3 Jun 2018 10:23:54 +0000 (20:23 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 3 Jun 2018 10:23:54 +0000 (20:23 +1000)
Merge in some commits we're sharing with the kvm-ppc tree.

1  2 
arch/powerpc/include/asm/asm-prototypes.h
arch/powerpc/mm/hash_utils_64.c

@@@ -36,7 -36,8 +36,7 @@@ void kexec_copy_flush(struct kimage *im
  /* pseries hcall tracing */
  extern struct static_key hcall_tracepoint_key;
  void __trace_hcall_entry(unsigned long opcode, unsigned long *args);
 -void __trace_hcall_exit(long opcode, unsigned long retval,
 -                      unsigned long *retbuf);
 +void __trace_hcall_exit(long opcode, long retval, unsigned long *retbuf);
  /* OPAL tracing */
  #ifdef HAVE_JUMP_LABEL
  extern struct static_key opal_tracepoint_key;
@@@ -80,12 -81,18 +80,12 @@@ void machine_check_exception(struct pt_
  void emulation_assist_interrupt(struct pt_regs *regs);
  
  /* signals, syscalls and interrupts */
 -#ifdef CONFIG_PPC64
 -int sys_swapcontext(struct ucontext __user *old_ctx,
 -                  struct ucontext __user *new_ctx,
 -                  long ctx_size, long r6, long r7, long r8, struct pt_regs *regs);
 -#else
  long sys_swapcontext(struct ucontext __user *old_ctx,
                    struct ucontext __user *new_ctx,
 -                  int ctx_size, int r6, int r7, int r8, struct pt_regs *regs);
 -int sys_debug_setcontext(struct ucontext __user *ctx,
 -                       int ndbg, struct sig_dbg_op __user *dbg,
 -                       int r6, int r7, int r8,
 -                       struct pt_regs *regs);
 +                  long ctx_size);
 +#ifdef CONFIG_PPC32
 +long sys_debug_setcontext(struct ucontext __user *ctx,
 +                        int ndbg, struct sig_dbg_op __user *dbg);
  int
  ppc_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, struct timeval __user *tvp);
  unsigned long __init early_init(unsigned long dt_ptr);
@@@ -134,4 -141,7 +134,7 @@@ unsigned long prepare_ftrace_return(uns
  void pnv_power9_force_smt4_catch(void);
  void pnv_power9_force_smt4_release(void);
  
+ void tm_enable(void);
+ void tm_disable(void);
+ void tm_abort(uint8_t cause);
  #endif /* _ASM_POWERPC_ASM_PROTOTYPES_H */
@@@ -64,6 -64,7 +64,7 @@@
  #include <asm/trace.h>
  #include <asm/ps3.h>
  #include <asm/pte-walk.h>
+ #include <asm/asm-prototypes.h>
  
  #ifdef DEBUG
  #define DBG(fmt...) udbg_printf(fmt)
@@@ -572,10 -573,8 +573,10 @@@ static void __init htab_scan_page_sizes
        }
  
  #ifdef CONFIG_HUGETLB_PAGE
 -      /* Reserve 16G huge page memory sections for huge pages */
 -      of_scan_flat_dt(htab_dt_scan_hugepage_blocks, NULL);
 +      if (!hugetlb_disabled) {
 +              /* Reserve 16G huge page memory sections for huge pages */
 +              of_scan_flat_dt(htab_dt_scan_hugepage_blocks, NULL);
 +      }
  #endif /* CONFIG_HUGETLB_PAGE */
  }
  
@@@ -1012,14 -1011,13 +1013,14 @@@ void __init hash__early_init_mmu(void
         */
        __pte_frag_nr = H_PTE_FRAG_NR;
        __pte_frag_size_shift = H_PTE_FRAG_SIZE_SHIFT;
 +      __pmd_frag_nr = H_PMD_FRAG_NR;
 +      __pmd_frag_size_shift = H_PMD_FRAG_SIZE_SHIFT;
  
        __pte_index_size = H_PTE_INDEX_SIZE;
        __pmd_index_size = H_PMD_INDEX_SIZE;
        __pud_index_size = H_PUD_INDEX_SIZE;
        __pgd_index_size = H_PGD_INDEX_SIZE;
        __pud_cache_index = H_PUD_CACHE_INDEX;
 -      __pmd_cache_index = H_PMD_CACHE_INDEX;
        __pte_table_size = H_PTE_TABLE_SIZE;
        __pmd_table_size = H_PMD_TABLE_SIZE;
        __pud_table_size = H_PUD_TABLE_SIZE;