Skip to content

Commit bdfd6b7

Browse files
committed
Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze
* 'next' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Fix ftrace microblaze: Wire up new syscalls microblaze: Fix level/edge irq sensibility
2 parents 6ad8523 + 9e1491d commit bdfd6b7

File tree

6 files changed

+24
-7
lines changed

6 files changed

+24
-7
lines changed

arch/microblaze/include/asm/unistd.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,12 @@
386386
#define __NR_fanotify_init 368
387387
#define __NR_fanotify_mark 369
388388
#define __NR_prlimit64 370
389+
#define __NR_name_to_handle_at 371
390+
#define __NR_open_by_handle_at 372
391+
#define __NR_clock_adjtime 373
392+
#define __NR_syncfs 374
389393

390-
#define __NR_syscalls 371
394+
#define __NR_syscalls 375
391395

392396
#ifdef __KERNEL__
393397
#ifndef __ASSEMBLY__

arch/microblaze/kernel/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ CFLAGS_REMOVE_early_printk.o = -pg
1010
CFLAGS_REMOVE_selfmod.o = -pg
1111
CFLAGS_REMOVE_heartbeat.o = -pg
1212
CFLAGS_REMOVE_ftrace.o = -pg
13+
CFLAGS_REMOVE_process.o = -pg
1314
endif
1415

1516
extra-y := head.o vmlinux.lds

arch/microblaze/kernel/ftrace.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
5151
: "r" (parent), "r" (return_hooker)
5252
);
5353

54+
flush_dcache_range((u32)parent, (u32)parent + 4);
55+
flush_icache_range((u32)parent, (u32)parent + 4);
56+
5457
if (unlikely(faulted)) {
5558
ftrace_graph_stop();
5659
WARN_ON(1);
@@ -95,6 +98,9 @@ static int ftrace_modify_code(unsigned long addr, unsigned int value)
9598
if (unlikely(faulted))
9699
return -EFAULT;
97100

101+
flush_dcache_range(addr, addr + 4);
102+
flush_icache_range(addr, addr + 4);
103+
98104
return 0;
99105
}
100106

@@ -195,8 +201,6 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
195201
ret += ftrace_modify_code((unsigned long)&ftrace_caller,
196202
MICROBLAZE_NOP);
197203

198-
/* All changes are done - lets do caches consistent */
199-
flush_icache();
200204
return ret;
201205
}
202206

@@ -210,7 +214,6 @@ int ftrace_enable_ftrace_graph_caller(void)
210214

211215
old_jump = *(unsigned int *)ip; /* save jump over instruction */
212216
ret = ftrace_modify_code(ip, MICROBLAZE_NOP);
213-
flush_icache();
214217

215218
pr_debug("%s: Replace instruction: 0x%x\n", __func__, old_jump);
216219
return ret;
@@ -222,7 +225,6 @@ int ftrace_disable_ftrace_graph_caller(void)
222225
unsigned long ip = (unsigned long)(&ftrace_call_graph);
223226

224227
ret = ftrace_modify_code(ip, old_jump);
225-
flush_icache();
226228

227229
pr_debug("%s\n", __func__);
228230
return ret;

arch/microblaze/kernel/intc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ void __init init_IRQ(void)
158158
for (i = 0; i < nr_irq; ++i) {
159159
if (intr_type & (0x00000001 << i)) {
160160
irq_set_chip_and_handler_name(i, &intc_dev,
161-
handle_edge_irq, intc_dev.name);
161+
handle_edge_irq, "edge");
162162
irq_clear_status_flags(i, IRQ_LEVEL);
163163
} else {
164164
irq_set_chip_and_handler_name(i, &intc_dev,
165-
handle_level_irq, intc_dev.name);
165+
handle_level_irq, "level");
166166
irq_set_status_flags(i, IRQ_LEVEL);
167167
}
168168
}

arch/microblaze/kernel/syscall_table.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,3 +375,7 @@ ENTRY(sys_call_table)
375375
.long sys_fanotify_init
376376
.long sys_fanotify_mark
377377
.long sys_prlimit64 /* 370 */
378+
.long sys_name_to_handle_at
379+
.long sys_open_by_handle_at
380+
.long sys_clock_adjtime
381+
.long sys_syncfs

arch/microblaze/lib/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
# Makefile
33
#
44

5+
ifdef CONFIG_FUNCTION_TRACER
6+
CFLAGS_REMOVE_ashldi3.o = -pg
7+
CFLAGS_REMOVE_ashrdi3.o = -pg
8+
CFLAGS_REMOVE_lshrdi3.o = -pg
9+
endif
10+
511
lib-y := memset.o
612

713
ifeq ($(CONFIG_OPT_LIB_ASM),y)

0 commit comments

Comments
 (0)