diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-12 18:32:42 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-09-30 23:31:19 -0400 |
commit | 58254e1002a82eb383c5977ad9fd5a451b91fe29 (patch) | |
tree | e03b441b252ec3630ceedbe266311c0a24812fd9 /arch/powerpc/kernel/misc_32.S | |
parent | f322220d6159455da2b5a8a596d802c8695fed30 (diff) |
powerpc: split ret_from_fork
... and get rid of in-kernel syscalls in kernel_thread()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/powerpc/kernel/misc_32.S')
-rw-r--r-- | arch/powerpc/kernel/misc_32.S | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 407e293aad2f..19e096bd0e73 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -663,39 +663,6 @@ _GLOBAL(abs) | |||
663 | sub r3,r3,r4 | 663 | sub r3,r3,r4 |
664 | blr | 664 | blr |
665 | 665 | ||
666 | /* | ||
667 | * Create a kernel thread | ||
668 | * kernel_thread(fn, arg, flags) | ||
669 | */ | ||
670 | _GLOBAL(kernel_thread) | ||
671 | stwu r1,-16(r1) | ||
672 | stw r30,8(r1) | ||
673 | stw r31,12(r1) | ||
674 | mr r30,r3 /* function */ | ||
675 | mr r31,r4 /* argument */ | ||
676 | ori r3,r5,CLONE_VM /* flags */ | ||
677 | oris r3,r3,CLONE_UNTRACED>>16 | ||
678 | li r4,0 /* new sp (unused) */ | ||
679 | li r0,__NR_clone | ||
680 | sc | ||
681 | bns+ 1f /* did system call indicate error? */ | ||
682 | neg r3,r3 /* if so, make return code negative */ | ||
683 | 1: cmpwi 0,r3,0 /* parent or child? */ | ||
684 | bne 2f /* return if parent */ | ||
685 | li r0,0 /* make top-level stack frame */ | ||
686 | stwu r0,-16(r1) | ||
687 | mtlr r30 /* fn addr in lr */ | ||
688 | mr r3,r31 /* load arg and call fn */ | ||
689 | PPC440EP_ERR42 | ||
690 | blrl | ||
691 | li r0,__NR_exit /* exit if function returns */ | ||
692 | li r3,0 | ||
693 | sc | ||
694 | 2: lwz r30,8(r1) | ||
695 | lwz r31,12(r1) | ||
696 | addi r1,r1,16 | ||
697 | blr | ||
698 | |||
699 | #ifdef CONFIG_SMP | 666 | #ifdef CONFIG_SMP |
700 | _GLOBAL(start_secondary_resume) | 667 | _GLOBAL(start_secondary_resume) |
701 | /* Reset stack */ | 668 | /* Reset stack */ |