Skip to content

Commit 0d97f20

Browse files
committed
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux
Pull ARM development updates from Russell King: - Use string choices helpers - Add support for HAVE_FUNCTION_GRAPH_FREGS * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux: ARM: 9457/1: ftrace: Implement HAVE_FUNCTION_GRAPH_FREGS ARM: 9456/1: mm: fault: use string choices helper ARM: 9454/1: kernel: bios32: use string choices helper ARM: 9451/1: mm: l2x0: use string choices helper
2 parents a8cdf51 + 9aa791c commit 0d97f20

File tree

5 files changed

+23
-11
lines changed

5 files changed

+23
-11
lines changed

arch/arm/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ config ARM
108108
select HAVE_GUP_FAST if ARM_LPAE
109109
select HAVE_FUNCTION_ERROR_INJECTION
110110
select HAVE_FUNCTION_GRAPH_TRACER
111+
select HAVE_FUNCTION_GRAPH_FREGS
111112
select HAVE_FUNCTION_TRACER if !XIP_KERNEL
112113
select HAVE_GCC_PLUGINS
113114
select HAVE_HW_BREAKPOINT if PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)

arch/arm/kernel/bios32.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/kernel.h>
1111
#include <linux/pci.h>
1212
#include <linux/slab.h>
13+
#include <linux/string_choices.h>
1314
#include <linux/init.h>
1415
#include <linux/io.h>
1516

@@ -337,8 +338,8 @@ void pcibios_fixup_bus(struct pci_bus *bus)
337338
/*
338339
* Report what we did for this bus
339340
*/
340-
pr_info("PCI: bus%d: Fast back to back transfers %sabled\n",
341-
bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis");
341+
pr_info("PCI: bus%d: Fast back to back transfers %s\n",
342+
bus->number, str_enabled_disabled(features & PCI_COMMAND_FAST_BACK));
342343
}
343344
EXPORT_SYMBOL(pcibios_fixup_bus);
344345

arch/arm/kernel/entry-ftrace.S

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,21 @@ ENDPROC(ftrace_graph_regs_caller)
257257

258258
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
259259
ENTRY(return_to_handler)
260-
stmdb sp!, {r0-r3}
261-
add r0, sp, #16 @ sp at exit of instrumented routine
260+
mov ip, sp @ sp at exit of instrumented routine
261+
sub sp, #PT_REGS_SIZE
262+
str r0, [sp, #S_R0]
263+
str r1, [sp, #S_R1]
264+
str r2, [sp, #S_R2]
265+
str r3, [sp, #S_R3]
266+
str ip, [sp, #S_FP]
267+
mov r0, sp
262268
bl ftrace_return_to_handler
263-
mov lr, r0 @ r0 has real ret addr
264-
ldmia sp!, {r0-r3}
269+
mov lr, r0 @ r0 has real ret addr
270+
ldr r3, [sp, #S_R3]
271+
ldr r2, [sp, #S_R2]
272+
ldr r1, [sp, #S_R1]
273+
ldr r0, [sp, #S_R0]
274+
add sp, sp, #PT_REGS_SIZE @ restore stack pointer
265275
ret lr
266276
ENDPROC(return_to_handler)
267277
#endif

arch/arm/mm/cache-l2x0.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <linux/io.h>
1414
#include <linux/of.h>
1515
#include <linux/of_address.h>
16+
#include <linux/string_choices.h>
1617

1718
#include <asm/cacheflush.h>
1819
#include <asm/cp15.h>
@@ -667,9 +668,9 @@ static void __init l2c310_enable(void __iomem *base, unsigned num_lock)
667668
u32 power_ctrl;
668669

669670
power_ctrl = readl_relaxed(base + L310_POWER_CTRL);
670-
pr_info("L2C-310 dynamic clock gating %sabled, standby mode %sabled\n",
671-
power_ctrl & L310_DYNAMIC_CLK_GATING_EN ? "en" : "dis",
672-
power_ctrl & L310_STNDBY_MODE_EN ? "en" : "dis");
671+
pr_info("L2C-310 dynamic clock gating %s, standby mode %s\n",
672+
str_enabled_disabled(power_ctrl & L310_DYNAMIC_CLK_GATING_EN),
673+
str_enabled_disabled(power_ctrl & L310_STNDBY_MODE_EN));
673674
}
674675

675676
if (aux & L310_AUX_CTRL_FULL_LINE_ZERO)

arch/arm/mm/fault.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ static void die_kernel_fault(const char *msg, struct mm_struct *mm,
135135
bust_spinlocks(1);
136136
pr_alert("8<--- cut here ---\n");
137137
pr_alert("Unable to handle kernel %s at virtual address %08lx when %s\n",
138-
msg, addr, fsr & FSR_LNX_PF ? "execute" :
139-
fsr & FSR_WRITE ? "write" : "read");
138+
msg, addr, fsr & FSR_LNX_PF ? "execute" : str_write_read(fsr & FSR_WRITE));
140139

141140
show_pte(KERN_ALERT, mm, addr);
142141
die("Oops", regs, fsr);

0 commit comments

Comments
 (0)