kthread.S 920 B

1234567891011121314151617181920212223242526272829303132
  1. /* MN10300 Kernel thread trampoline function
  2. *
  3. * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
  4. * Written by Mark Salter (msalter@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public Licence
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the Licence, or (at your option) any later version.
  10. */
  11. .text
  12. ###############################################################################
  13. #
  14. # kernel_thread_helper - trampoline for kernel_thread()
  15. #
  16. # On entry:
  17. # A2 = address of function to call
  18. # D2 = function argument
  19. #
  20. ###############################################################################
  21. .globl kernel_thread_helper
  22. .type kernel_thread_helper,@function
  23. kernel_thread_helper:
  24. mov do_exit,d1
  25. mov d1,(sp)
  26. mov d1,mdr
  27. mov d2,d0
  28. jmp (a2)
  29. .size kernel_thread_helper,.-kernel_thread_helper