Skip to content

Commit d3dd73f

Browse files
committed
Merge tag 'microblaze-4.0-rc4' of git://git.monstr.eu/linux-2.6-microblaze
Pull arch/microblaze fixes from Michal Simek: "Fix syscall error recovery. Two patches - one is just preparation patch for the second which is fixing the problem with syscalls" * tag 'microblaze-4.0-rc4' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Fix syscall error recovery for invalid syscall IDs microblaze: Coding style cleanup
2 parents 5627511 + c2219ed commit d3dd73f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

arch/microblaze/kernel/entry.S

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,9 @@ C_ENTRY(_user_exception):
348348
* The LP register should point to the location where the called function
349349
* should return. [note that MAKE_SYS_CALL uses label 1] */
350350
/* See if the system call number is valid */
351+
blti r12, 5f
351352
addi r11, r12, -__NR_syscalls;
352-
bgei r11,5f;
353+
bgei r11, 5f;
353354
/* Figure out which function to use for this system call. */
354355
/* Note Microblaze barrel shift is optional, so don't rely on it */
355356
add r12, r12, r12; /* convert num -> ptr */
@@ -375,7 +376,7 @@ C_ENTRY(_user_exception):
375376

376377
/* The syscall number is invalid, return an error. */
377378
5:
378-
rtsd r15, 8; /* looks like a normal subroutine return */
379+
braid ret_from_trap
379380
addi r3, r0, -ENOSYS;
380381

381382
/* Entry point used to return from a syscall/trap */
@@ -411,7 +412,7 @@ C_ENTRY(ret_from_trap):
411412
bri 1b
412413

413414
/* Maybe handle a signal */
414-
5:
415+
5:
415416
andi r11, r19, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME;
416417
beqi r11, 4f; /* Signals to handle, handle them */
417418

0 commit comments

Comments
 (0)