Skip to content

Commit 788dcee

Browse files
Sid Manningandrom3da
authored andcommitted
Hexagon: fix build errors
Fix type-o in ptrace.c. Add missing include: asm/hexagon_vm.h Remove superfluous cast. Replace 'p3_0' with 'preds'. Signed-off-by: Sid Manning <[email protected]> Add -mlong-calls to build flags. Signed-off-by: Brian Cain <[email protected]> Tested-by: Nick Desaulniers <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]>
1 parent 9ccce09 commit 788dcee

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

arch/hexagon/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ LDFLAGS_vmlinux += -G0
1010
# Do not use single-byte enums; these will overflow.
1111
KBUILD_CFLAGS += -fno-short-enums
1212

13+
# We must use long-calls:
14+
KBUILD_CFLAGS += -mlong-calls
15+
1316
# Modules must use either long-calls, or use pic/plt.
1417
# Use long-calls for now, it's easier. And faster.
1518
# KBUILD_CFLAGS_MODULE += -fPIC

arch/hexagon/include/asm/timex.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <asm-generic/timex.h>
1010
#include <asm/timer-regs.h>
11+
#include <asm/hexagon_vm.h>
1112

1213
/* Using TCX0 as our clock. CLOCK_TICK_RATE scheduled to be removed. */
1314
#define CLOCK_TICK_RATE TCX0_CLK_RATE
@@ -16,7 +17,7 @@
1617

1718
static inline int read_current_timer(unsigned long *timer_val)
1819
{
19-
*timer_val = (unsigned long) __vmgettime();
20+
*timer_val = __vmgettime();
2021
return 0;
2122
}
2223

arch/hexagon/kernel/ptrace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void user_disable_single_step(struct task_struct *child)
3535

3636
static int genregs_get(struct task_struct *target,
3737
const struct user_regset *regset,
38-
srtuct membuf to)
38+
struct membuf to)
3939
{
4040
struct pt_regs *regs = task_pt_regs(target);
4141

@@ -54,7 +54,7 @@ static int genregs_get(struct task_struct *target,
5454
membuf_store(&to, regs->m0);
5555
membuf_store(&to, regs->m1);
5656
membuf_store(&to, regs->usr);
57-
membuf_store(&to, regs->p3_0);
57+
membuf_store(&to, regs->preds);
5858
membuf_store(&to, regs->gp);
5959
membuf_store(&to, regs->ugp);
6060
membuf_store(&to, pt_elr(regs)); // pc

0 commit comments

Comments
 (0)