diff options
Diffstat (limited to 'arch/sparc64/kernel/entry.S')
-rw-r--r-- | arch/sparc64/kernel/entry.S | 61 |
1 files changed, 2 insertions, 59 deletions
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index 49eca4b1cf25..fb43c76bdc26 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
@@ -1353,63 +1353,6 @@ breakpoint_trap: | |||
1353 | ba,pt %xcc, rtrap | 1353 | ba,pt %xcc, rtrap |
1354 | nop | 1354 | nop |
1355 | 1355 | ||
1356 | #if defined(CONFIG_SUNOS_EMUL) || defined(CONFIG_SOLARIS_EMUL) || \ | ||
1357 | defined(CONFIG_SOLARIS_EMUL_MODULE) | ||
1358 | /* SunOS uses syscall zero as the 'indirect syscall' it looks | ||
1359 | * like indir_syscall(scall_num, arg0, arg1, arg2...); etc. | ||
1360 | * This is complete brain damage. | ||
1361 | */ | ||
1362 | .globl sunos_indir | ||
1363 | sunos_indir: | ||
1364 | srl %o0, 0, %o0 | ||
1365 | mov %o7, %l4 | ||
1366 | cmp %o0, NR_SYSCALLS | ||
1367 | blu,a,pt %icc, 1f | ||
1368 | sll %o0, 0x2, %o0 | ||
1369 | sethi %hi(sunos_nosys), %l6 | ||
1370 | b,pt %xcc, 2f | ||
1371 | or %l6, %lo(sunos_nosys), %l6 | ||
1372 | 1: sethi %hi(sunos_sys_table), %l7 | ||
1373 | or %l7, %lo(sunos_sys_table), %l7 | ||
1374 | lduw [%l7 + %o0], %l6 | ||
1375 | 2: mov %o1, %o0 | ||
1376 | mov %o2, %o1 | ||
1377 | mov %o3, %o2 | ||
1378 | mov %o4, %o3 | ||
1379 | mov %o5, %o4 | ||
1380 | call %l6 | ||
1381 | mov %l4, %o7 | ||
1382 | |||
1383 | .globl sunos_getpid | ||
1384 | sunos_getpid: | ||
1385 | call sys_getppid | ||
1386 | nop | ||
1387 | call sys_getpid | ||
1388 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I1] | ||
1389 | b,pt %xcc, ret_sys_call | ||
1390 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | ||
1391 | |||
1392 | /* SunOS getuid() returns uid in %o0 and euid in %o1 */ | ||
1393 | .globl sunos_getuid | ||
1394 | sunos_getuid: | ||
1395 | call sys32_geteuid16 | ||
1396 | nop | ||
1397 | call sys32_getuid16 | ||
1398 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I1] | ||
1399 | b,pt %xcc, ret_sys_call | ||
1400 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | ||
1401 | |||
1402 | /* SunOS getgid() returns gid in %o0 and egid in %o1 */ | ||
1403 | .globl sunos_getgid | ||
1404 | sunos_getgid: | ||
1405 | call sys32_getegid16 | ||
1406 | nop | ||
1407 | call sys32_getgid16 | ||
1408 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I1] | ||
1409 | b,pt %xcc, ret_sys_call | ||
1410 | stx %o0, [%sp + PTREGS_OFF + PT_V9_I0] | ||
1411 | #endif | ||
1412 | |||
1413 | /* SunOS's execv() call only specifies the argv argument, the | 1356 | /* SunOS's execv() call only specifies the argv argument, the |
1414 | * environment settings are the same as the calling processes. | 1357 | * environment settings are the same as the calling processes. |
1415 | */ | 1358 | */ |
@@ -1591,7 +1534,7 @@ linux_syscall_trace: | |||
1591 | mov %i4, %o4 | 1534 | mov %i4, %o4 |
1592 | 1535 | ||
1593 | 1536 | ||
1594 | /* Linux 32-bit and SunOS system calls enter here... */ | 1537 | /* Linux 32-bit system calls enter here... */ |
1595 | .align 32 | 1538 | .align 32 |
1596 | .globl linux_sparc_syscall32 | 1539 | .globl linux_sparc_syscall32 |
1597 | linux_sparc_syscall32: | 1540 | linux_sparc_syscall32: |
@@ -1614,7 +1557,7 @@ linux_sparc_syscall32: | |||
1614 | srl %i3, 0, %o3 ! IEU0 | 1557 | srl %i3, 0, %o3 ! IEU0 |
1615 | ba,a,pt %xcc, 3f | 1558 | ba,a,pt %xcc, 3f |
1616 | 1559 | ||
1617 | /* Linux native and SunOS system calls enter here... */ | 1560 | /* Linux native system calls enter here... */ |
1618 | .align 32 | 1561 | .align 32 |
1619 | .globl linux_sparc_syscall, ret_sys_call | 1562 | .globl linux_sparc_syscall, ret_sys_call |
1620 | linux_sparc_syscall: | 1563 | linux_sparc_syscall: |