Re: Linux 4.4.81

2017-08-11 Thread Greg KH
diff --git a/Makefile b/Makefile
index 55adde24..d049e53a6960 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 4
-SUBLEVEL = 80
+SUBLEVEL = 81
 EXTRAVERSION =
 NAME = Blurry Fish Butt
 
diff --git a/arch/arm/boot/dts/armada-388-gp.dts 
b/arch/arm/boot/dts/armada-388-gp.dts
index cd316021d6ce..6c1b45c1af66 100644
--- a/arch/arm/boot/dts/armada-388-gp.dts
+++ b/arch/arm/boot/dts/armada-388-gp.dts
@@ -89,7 +89,7 @@
pinctrl-names = "default";
pinctrl-0 = <_pins>;
interrupt-parent = <>;
-   interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
+   interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
@@ -101,7 +101,7 @@
compatible = "nxp,pca9555";
pinctrl-names = "default";
interrupt-parent = <>;
-   interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
+   interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index bfe2a2f5a644..22b73112b75f 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -54,6 +54,24 @@ static inline void *return_address(unsigned int level)
 
 #define ftrace_return_address(n) return_address(n)
 
+#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
+
+static inline bool arch_syscall_match_sym_name(const char *sym,
+  const char *name)
+{
+   if (!strcmp(sym, "sys_mmap2"))
+   sym = "sys_mmap_pgoff";
+   else if (!strcmp(sym, "sys_statfs64_wrapper"))
+   sym = "sys_statfs64";
+   else if (!strcmp(sym, "sys_fstatfs64_wrapper"))
+   sym = "sys_fstatfs64";
+   else if (!strcmp(sym, "sys_arm_fadvise64_64"))
+   sym = "sys_fadvise64_64";
+
+   /* Ignore case since sym may start with "SyS" instead of "sys" */
+   return !strcasecmp(sym, name);
+}
+
 #endif /* ifndef __ASSEMBLY__ */
 
 #endif /* _ASM_ARM_FTRACE */
diff --git a/arch/sparc/include/asm/trap_block.h 
b/arch/sparc/include/asm/trap_block.h
index ec9c04de3664..ff05992dae7a 100644
--- a/arch/sparc/include/asm/trap_block.h
+++ b/arch/sparc/include/asm/trap_block.h
@@ -54,6 +54,7 @@ extern struct trap_per_cpu trap_block[NR_CPUS];
 void init_cur_cpu_trap(struct thread_info *);
 void setup_tba(void);
 extern int ncpus_probed;
+extern u64 cpu_mondo_counter[NR_CPUS];
 
 unsigned long real_hard_smp_processor_id(void);
 
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index 95a9fa0d2195..4511caa3b7e9 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -617,22 +617,48 @@ retry:
}
 }
 
-/* Multi-cpu list version.  */
+#defineCPU_MONDO_COUNTER(cpuid)(cpu_mondo_counter[cpuid])
+#defineMONDO_USEC_WAIT_MIN 2
+#defineMONDO_USEC_WAIT_MAX 100
+#defineMONDO_RETRY_LIMIT   50
+
+/* Multi-cpu list version.
+ *
+ * Deliver xcalls to 'cnt' number of cpus in 'cpu_list'.
+ * Sometimes not all cpus receive the mondo, requiring us to re-send
+ * the mondo until all cpus have received, or cpus are truly stuck
+ * unable to receive mondo, and we timeout.
+ * Occasionally a target cpu strand is borrowed briefly by hypervisor to
+ * perform guest service, such as PCIe error handling. Consider the
+ * service time, 1 second overall wait is reasonable for 1 cpu.
+ * Here two in-between mondo check wait time are defined: 2 usec for
+ * single cpu quick turn around and up to 100usec for large cpu count.
+ * Deliver mondo to large number of cpus could take longer, we adjusts
+ * the retry count as long as target cpus are making forward progress.
+ */
 static void hypervisor_xcall_deliver(struct trap_per_cpu *tb, int cnt)
 {
-   int retries, this_cpu, prev_sent, i, saw_cpu_error;
+   int this_cpu, tot_cpus, prev_sent, i, rem;
+   int usec_wait, retries, tot_retries;
+   u16 first_cpu = 0x;
+   unsigned long xc_rcvd = 0;
unsigned long status;
+   int ecpuerror_id = 0;
+   int enocpu_id = 0;
u16 *cpu_list;
+   u16 cpu;
 
this_cpu = smp_processor_id();
-
cpu_list = __va(tb->cpu_list_pa);
-
-   saw_cpu_error = 0;
-   retries = 0;
+   usec_wait = cnt * MONDO_USEC_WAIT_MIN;
+   if (usec_wait > MONDO_USEC_WAIT_MAX)
+   usec_wait = 

Re: Linux 4.4.81

2017-08-11 Thread Greg KH
diff --git a/Makefile b/Makefile
index 55adde24..d049e53a6960 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 4
-SUBLEVEL = 80
+SUBLEVEL = 81
 EXTRAVERSION =
 NAME = Blurry Fish Butt
 
diff --git a/arch/arm/boot/dts/armada-388-gp.dts 
b/arch/arm/boot/dts/armada-388-gp.dts
index cd316021d6ce..6c1b45c1af66 100644
--- a/arch/arm/boot/dts/armada-388-gp.dts
+++ b/arch/arm/boot/dts/armada-388-gp.dts
@@ -89,7 +89,7 @@
pinctrl-names = "default";
pinctrl-0 = <_pins>;
interrupt-parent = <>;
-   interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
+   interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
@@ -101,7 +101,7 @@
compatible = "nxp,pca9555";
pinctrl-names = "default";
interrupt-parent = <>;
-   interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
+   interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
index bfe2a2f5a644..22b73112b75f 100644
--- a/arch/arm/include/asm/ftrace.h
+++ b/arch/arm/include/asm/ftrace.h
@@ -54,6 +54,24 @@ static inline void *return_address(unsigned int level)
 
 #define ftrace_return_address(n) return_address(n)
 
+#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
+
+static inline bool arch_syscall_match_sym_name(const char *sym,
+  const char *name)
+{
+   if (!strcmp(sym, "sys_mmap2"))
+   sym = "sys_mmap_pgoff";
+   else if (!strcmp(sym, "sys_statfs64_wrapper"))
+   sym = "sys_statfs64";
+   else if (!strcmp(sym, "sys_fstatfs64_wrapper"))
+   sym = "sys_fstatfs64";
+   else if (!strcmp(sym, "sys_arm_fadvise64_64"))
+   sym = "sys_fadvise64_64";
+
+   /* Ignore case since sym may start with "SyS" instead of "sys" */
+   return !strcasecmp(sym, name);
+}
+
 #endif /* ifndef __ASSEMBLY__ */
 
 #endif /* _ASM_ARM_FTRACE */
diff --git a/arch/sparc/include/asm/trap_block.h 
b/arch/sparc/include/asm/trap_block.h
index ec9c04de3664..ff05992dae7a 100644
--- a/arch/sparc/include/asm/trap_block.h
+++ b/arch/sparc/include/asm/trap_block.h
@@ -54,6 +54,7 @@ extern struct trap_per_cpu trap_block[NR_CPUS];
 void init_cur_cpu_trap(struct thread_info *);
 void setup_tba(void);
 extern int ncpus_probed;
+extern u64 cpu_mondo_counter[NR_CPUS];
 
 unsigned long real_hard_smp_processor_id(void);
 
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index 95a9fa0d2195..4511caa3b7e9 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -617,22 +617,48 @@ retry:
}
 }
 
-/* Multi-cpu list version.  */
+#defineCPU_MONDO_COUNTER(cpuid)(cpu_mondo_counter[cpuid])
+#defineMONDO_USEC_WAIT_MIN 2
+#defineMONDO_USEC_WAIT_MAX 100
+#defineMONDO_RETRY_LIMIT   50
+
+/* Multi-cpu list version.
+ *
+ * Deliver xcalls to 'cnt' number of cpus in 'cpu_list'.
+ * Sometimes not all cpus receive the mondo, requiring us to re-send
+ * the mondo until all cpus have received, or cpus are truly stuck
+ * unable to receive mondo, and we timeout.
+ * Occasionally a target cpu strand is borrowed briefly by hypervisor to
+ * perform guest service, such as PCIe error handling. Consider the
+ * service time, 1 second overall wait is reasonable for 1 cpu.
+ * Here two in-between mondo check wait time are defined: 2 usec for
+ * single cpu quick turn around and up to 100usec for large cpu count.
+ * Deliver mondo to large number of cpus could take longer, we adjusts
+ * the retry count as long as target cpus are making forward progress.
+ */
 static void hypervisor_xcall_deliver(struct trap_per_cpu *tb, int cnt)
 {
-   int retries, this_cpu, prev_sent, i, saw_cpu_error;
+   int this_cpu, tot_cpus, prev_sent, i, rem;
+   int usec_wait, retries, tot_retries;
+   u16 first_cpu = 0x;
+   unsigned long xc_rcvd = 0;
unsigned long status;
+   int ecpuerror_id = 0;
+   int enocpu_id = 0;
u16 *cpu_list;
+   u16 cpu;
 
this_cpu = smp_processor_id();
-
cpu_list = __va(tb->cpu_list_pa);
-
-   saw_cpu_error = 0;
-   retries = 0;
+   usec_wait = cnt * MONDO_USEC_WAIT_MIN;
+   if (usec_wait > MONDO_USEC_WAIT_MAX)
+   usec_wait =