drbd: Implemented the set_new_bits parameter for drbd_bm_resize()
[linux-2.6/next.git] / arch / arm / mach-s5pv210 / include / mach / entry-macro.S
blob3aa41ac59f079f5551724fe0d6ef0386b08fff8b
1 /* linux/arch/arm/mach-s5pv210/include/mach/entry-macro.S
2  *
3  * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4  *              http://www.samsung.com/
5  *
6  * Low-level IRQ helper macros for the Samsung S5PV210
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software Foundation.
13 #include <asm/hardware/vic.h>
14 #include <mach/map.h>
15 #include <plat/irqs.h>
17         .macro  disable_fiq
18         .endm
20         .macro  get_irqnr_preamble, base, tmp
21         ldr     \base, =VA_VIC0
22         .endm
24         .macro  arch_ret_to_user, tmp1, tmp2
25         .endm
27         .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
29         @ check the vic0
30         mov     \irqnr, # S5P_IRQ_OFFSET + 31
31         ldr     \irqstat, [ \base, # VIC_IRQ_STATUS ]
32         teq     \irqstat, #0
34         @ otherwise try vic1
35         addeq   \tmp, \base, #(VA_VIC1 - VA_VIC0)
36         addeq   \irqnr, \irqnr, #32
37         ldreq   \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
38         teqeq   \irqstat, #0
40         @ otherwise try vic2
41         addeq   \tmp, \base, #(VA_VIC2 - VA_VIC0)
42         addeq   \irqnr, \irqnr, #32
43         ldreq   \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
44         teqeq   \irqstat, #0
46         @ otherwise try vic3
47         addeq   \tmp, \base, #(VA_VIC3 - VA_VIC0)
48         addeq   \irqnr, \irqnr, #32
49         ldreq   \irqstat, [ \tmp, # VIC_IRQ_STATUS ]
50         teqeq   \irqstat, #0
52         clzne   \irqstat, \irqstat
53         subne   \irqnr, \irqnr, \irqstat
54         .endm