2 * linux/arch/m68k/lib/semaphore.S
4 * Copyright (C) 1996 Linus Torvalds
6 * m68k version by Andreas Schwab
8 * MAR/1999 -- modified to support ColdFire (gerg@snapgear.com)
11 #include <linux/linkage.h>
12 #include <linux/config.h>
13 #include <asm/semaphore.h>
16 * "down_failed" is called with the eventual return address
17 * in %a0, and the address of the semaphore in %a1. We need
18 * to increment the number of waiters on the semaphore,
19 * call "__down()", and then eventually return to try again.
22 #ifdef CONFIG_COLDFIRE
24 moveml %a0/%d0/%d1,(%sp)
26 moveml %a0/%d0/%d1,-(%sp)
35 ENTRY(__down_failed_interruptible)
39 jbsr __down_interruptible
45 #ifdef CONFIG_COLDFIRE
47 moveml %a0/%d0/%d1,(%sp)
49 moveml %a0/%d0/%d1,-(%sp)
58 ENTRY(__down_failed_trylock)