Skip to content

Commit

Permalink
Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm
Browse files Browse the repository at this point in the history
Pull ARM fixes from Russell King:
 "A few ARM fixes:

   - fix a crash while performing TLB maintanence on early ARM SMP cores

   - blacklist Scorpion CPUs for hardware breakpoints

   - ARMs asm/types.h has been included as part of the UAPI due to the
     way the makefiles work, move it to uapi/asm/types.h to make it
     official

   - fix up ftrace syscall name matching"

* 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: 8613/1: Fix the uaccess crash on PB11MPCore
  MAINTAINERS: update rmk's entries
  ARM: put types.h in uapi
  ARM: 8634/1: hw_breakpoint: blacklist Scorpion CPUs
  ARM: 8632/1: ftrace: fix syscall name matching
  • Loading branch information
Linus Torvalds committed Jan 18, 2017
2 parents ca92e6c + 90f92c6 commit fa19a76
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 5 deletions.
10 changes: 8 additions & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,7 @@ M: Russell King <linux@armlinux.org.uk>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
W: http://www.armlinux.org.uk/
S: Maintained
T: git git://git.armlinux.org.uk/~rmk/linux-arm.git
F: arch/arm/

ARM SUB-ARCHITECTURES
Expand Down Expand Up @@ -1153,6 +1154,7 @@ ARM/CLKDEV SUPPORT
M: Russell King <linux@armlinux.org.uk>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
T: git git://git.armlinux.org.uk/~rmk/linux-arm.git clkdev
F: arch/arm/include/asm/clkdev.h
F: drivers/clk/clkdev.c

Expand Down Expand Up @@ -7697,8 +7699,10 @@ F: drivers/net/dsa/mv88e6xxx/
F: Documentation/devicetree/bindings/net/dsa/marvell.txt

MARVELL ARMADA DRM SUPPORT
M: Russell King <rmk+kernel@armlinux.org.uk>
M: Russell King <linux@armlinux.org.uk>
S: Maintained
T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-armada-devel
T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-armada-fixes
F: drivers/gpu/drm/armada/
F: include/uapi/drm/armada_drm.h
F: Documentation/devicetree/bindings/display/armada/
Expand Down Expand Up @@ -8903,8 +8907,10 @@ S: Supported
F: drivers/nfc/nxp-nci

NXP TDA998X DRM DRIVER
M: Russell King <rmk+kernel@armlinux.org.uk>
M: Russell King <linux@armlinux.org.uk>
S: Supported
T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-devel
T: git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-fixes
F: drivers/gpu/drm/i2c/tda998x_drv.c
F: include/drm/i2c/tda998x.h

Expand Down
3 changes: 3 additions & 0 deletions arch/arm/include/asm/cputype.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@
#define ARM_CPU_XSCALE_ARCH_V2 0x4000
#define ARM_CPU_XSCALE_ARCH_V3 0x6000

/* Qualcomm implemented cores */
#define ARM_CPU_PART_SCORPION 0x510002d0

extern unsigned int processor_id;

#ifdef CONFIG_CPU_CP15
Expand Down
18 changes: 18 additions & 0 deletions arch/arm/include/asm/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _ASM_TYPES_H
#define _ASM_TYPES_H
#ifndef _UAPI_ASM_TYPES_H
#define _UAPI_ASM_TYPES_H

#include <asm-generic/int-ll64.h>

Expand Down Expand Up @@ -37,4 +37,4 @@
#define __UINTPTR_TYPE__ unsigned long
#endif

#endif /* _ASM_TYPES_H */
#endif /* _UAPI_ASM_TYPES_H */
16 changes: 16 additions & 0 deletions arch/arm/kernel/hw_breakpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,22 @@ static int __init arch_hw_breakpoint_init(void)
return 0;
}

/*
* Scorpion CPUs (at least those in APQ8060) seem to set DBGPRSR.SPD
* whenever a WFI is issued, even if the core is not powered down, in
* violation of the architecture. When DBGPRSR.SPD is set, accesses to
* breakpoint and watchpoint registers are treated as undefined, so
* this results in boot time and runtime failures when these are
* accessed and we unexpectedly take a trap.
*
* It's not clear if/how this can be worked around, so we blacklist
* Scorpion CPUs to avoid these issues.
*/
if (read_cpuid_part() == ARM_CPU_PART_SCORPION) {
pr_info("Scorpion CPU detected. Hardware breakpoints and watchpoints disabled\n");
return 0;
}

has_ossr = core_has_os_save_restore();

/* Determine how many BRPs/WRPs are available. */
Expand Down
7 changes: 7 additions & 0 deletions arch/arm/kernel/smp_tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
#include <linux/preempt.h>
#include <linux/smp.h>
#include <linux/uaccess.h>

#include <asm/smp_plat.h>
#include <asm/tlbflush.h>
Expand Down Expand Up @@ -40,8 +41,11 @@ static inline void ipi_flush_tlb_mm(void *arg)
static inline void ipi_flush_tlb_page(void *arg)
{
struct tlb_args *ta = (struct tlb_args *)arg;
unsigned int __ua_flags = uaccess_save_and_enable();

local_flush_tlb_page(ta->ta_vma, ta->ta_start);

uaccess_restore(__ua_flags);
}

static inline void ipi_flush_tlb_kernel_page(void *arg)
Expand All @@ -54,8 +58,11 @@ static inline void ipi_flush_tlb_kernel_page(void *arg)
static inline void ipi_flush_tlb_range(void *arg)
{
struct tlb_args *ta = (struct tlb_args *)arg;
unsigned int __ua_flags = uaccess_save_and_enable();

local_flush_tlb_range(ta->ta_vma, ta->ta_start, ta->ta_end);

uaccess_restore(__ua_flags);
}

static inline void ipi_flush_tlb_kernel_range(void *arg)
Expand Down

0 comments on commit fa19a76

Please sign in to comment.