diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-07-11 17:01:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-11 19:04:41 -0400 |
commit | 325c117000c1851139981a63d331ea33f2997cd3 (patch) | |
tree | 766d8a33b59f6f66ae42a9b4ffa7a914609d170c /arch | |
parent | 2a643893e50fde71d7ba84b5592ec61b467b9ab6 (diff) |
mn10300: move setup_jiffies_interrupt() to cevt-mn10300.c
Move the static inline function setup_jiffies_interrupt() from
<asm/timex.h> to arch/mn10300/kernel/cevt-mn10300.c, which is its only
callsite.
This allows to remove the inclusion of <asm/hardirq.h> and <linux/irq.h>
from <asm/timex.h> and <unit/timex.h>, fixing include hell like:
include/linux/jiffies.h:260:31: warning: "CLOCK_TICK_RATE" is not defined [-Wundef]
include/linux/jiffies.h:260:31: warning: "CLOCK_TICK_RATE" is not defined [-Wundef]
include/linux/jiffies.h:46:42: error: division by zero in #if
...
make[4]: *** [arch/mn10300/kernel/asm-offsets.s] Error 1
and (after a quick hack for the above by defining CLOCK_TICK_RATE in
<linux/jiffies.h>):
In file included from include/linux/notifier.h:15:0,
from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:718,
from include/linux/gfp.h:4,
from include/linux/irq.h:20,
from arch/mn10300/unit-asb2303/include/unit/timex.h:15,
from arch/mn10300/include/asm/timex.h:15,
from include/linux/timex.h:174,
from include/linux/jiffies.h:8,
from include/linux/ktime.h:25,
from include/linux/timer.h:5,
from include/linux/workqueue.h:8,
include/linux/srcu.h:55:22: error: field 'work' has incomplete type
As a consequence, we do need a few more inclusions of <asm/irq.h>, namely
in arch/mn10300/unit-asb2303/smc91111.c and
arch/mn10300/unit-asb2305/unit-init.c.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mn10300/include/asm/timex.h | 11 | ||||
-rw-r--r-- | arch/mn10300/kernel/cevt-mn10300.c | 10 | ||||
-rw-r--r-- | arch/mn10300/unit-asb2303/include/unit/timex.h | 4 | ||||
-rw-r--r-- | arch/mn10300/unit-asb2303/smc91111.c | 1 | ||||
-rw-r--r-- | arch/mn10300/unit-asb2305/include/unit/timex.h | 4 | ||||
-rw-r--r-- | arch/mn10300/unit-asb2305/unit-init.c | 1 | ||||
-rw-r--r-- | arch/mn10300/unit-asb2364/include/unit/timex.h | 4 |
7 files changed, 12 insertions, 23 deletions
diff --git a/arch/mn10300/include/asm/timex.h b/arch/mn10300/include/asm/timex.h index bd4e90dfe6c2..f8e66425cbf8 100644 --- a/arch/mn10300/include/asm/timex.h +++ b/arch/mn10300/include/asm/timex.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #ifndef _ASM_TIMEX_H | 11 | #ifndef _ASM_TIMEX_H |
12 | #define _ASM_TIMEX_H | 12 | #define _ASM_TIMEX_H |
13 | 13 | ||
14 | #include <asm/hardirq.h> | ||
15 | #include <unit/timex.h> | 14 | #include <unit/timex.h> |
16 | 15 | ||
17 | #define TICK_SIZE (tick_nsec / 1000) | 16 | #define TICK_SIZE (tick_nsec / 1000) |
@@ -30,16 +29,6 @@ static inline cycles_t get_cycles(void) | |||
30 | extern int init_clockevents(void); | 29 | extern int init_clockevents(void); |
31 | extern int init_clocksource(void); | 30 | extern int init_clocksource(void); |
32 | 31 | ||
33 | static inline void setup_jiffies_interrupt(int irq, | ||
34 | struct irqaction *action) | ||
35 | { | ||
36 | u16 tmp; | ||
37 | setup_irq(irq, action); | ||
38 | set_intr_level(irq, NUM2GxICR_LEVEL(CONFIG_TIMER_IRQ_LEVEL)); | ||
39 | GxICR(irq) |= GxICR_ENABLE | GxICR_DETECT | GxICR_REQUEST; | ||
40 | tmp = GxICR(irq); | ||
41 | } | ||
42 | |||
43 | #endif /* __KERNEL__ */ | 32 | #endif /* __KERNEL__ */ |
44 | 33 | ||
45 | #endif /* _ASM_TIMEX_H */ | 34 | #endif /* _ASM_TIMEX_H */ |
diff --git a/arch/mn10300/kernel/cevt-mn10300.c b/arch/mn10300/kernel/cevt-mn10300.c index 69cae0260786..ccce35e3e179 100644 --- a/arch/mn10300/kernel/cevt-mn10300.c +++ b/arch/mn10300/kernel/cevt-mn10300.c | |||
@@ -70,6 +70,16 @@ static void event_handler(struct clock_event_device *dev) | |||
70 | { | 70 | { |
71 | } | 71 | } |
72 | 72 | ||
73 | static inline void setup_jiffies_interrupt(int irq, | ||
74 | struct irqaction *action) | ||
75 | { | ||
76 | u16 tmp; | ||
77 | setup_irq(irq, action); | ||
78 | set_intr_level(irq, NUM2GxICR_LEVEL(CONFIG_TIMER_IRQ_LEVEL)); | ||
79 | GxICR(irq) |= GxICR_ENABLE | GxICR_DETECT | GxICR_REQUEST; | ||
80 | tmp = GxICR(irq); | ||
81 | } | ||
82 | |||
73 | int __init init_clockevents(void) | 83 | int __init init_clockevents(void) |
74 | { | 84 | { |
75 | struct clock_event_device *cd; | 85 | struct clock_event_device *cd; |
diff --git a/arch/mn10300/unit-asb2303/include/unit/timex.h b/arch/mn10300/unit-asb2303/include/unit/timex.h index cc18fe7d8b90..c37f9832cf17 100644 --- a/arch/mn10300/unit-asb2303/include/unit/timex.h +++ b/arch/mn10300/unit-asb2303/include/unit/timex.h | |||
@@ -11,10 +11,6 @@ | |||
11 | #ifndef _ASM_UNIT_TIMEX_H | 11 | #ifndef _ASM_UNIT_TIMEX_H |
12 | #define _ASM_UNIT_TIMEX_H | 12 | #define _ASM_UNIT_TIMEX_H |
13 | 13 | ||
14 | #ifndef __ASSEMBLY__ | ||
15 | #include <linux/irq.h> | ||
16 | #endif /* __ASSEMBLY__ */ | ||
17 | |||
18 | #include <asm/timer-regs.h> | 14 | #include <asm/timer-regs.h> |
19 | #include <unit/clock.h> | 15 | #include <unit/clock.h> |
20 | #include <asm/param.h> | 16 | #include <asm/param.h> |
diff --git a/arch/mn10300/unit-asb2303/smc91111.c b/arch/mn10300/unit-asb2303/smc91111.c index 43c246439413..53677694b165 100644 --- a/arch/mn10300/unit-asb2303/smc91111.c +++ b/arch/mn10300/unit-asb2303/smc91111.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | 16 | ||
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <asm/irq.h> | ||
18 | #include <asm/timex.h> | 19 | #include <asm/timex.h> |
19 | #include <asm/processor.h> | 20 | #include <asm/processor.h> |
20 | #include <asm/intctl-regs.h> | 21 | #include <asm/intctl-regs.h> |
diff --git a/arch/mn10300/unit-asb2305/include/unit/timex.h b/arch/mn10300/unit-asb2305/include/unit/timex.h index 758af30d1a16..4cefc224f448 100644 --- a/arch/mn10300/unit-asb2305/include/unit/timex.h +++ b/arch/mn10300/unit-asb2305/include/unit/timex.h | |||
@@ -11,10 +11,6 @@ | |||
11 | #ifndef _ASM_UNIT_TIMEX_H | 11 | #ifndef _ASM_UNIT_TIMEX_H |
12 | #define _ASM_UNIT_TIMEX_H | 12 | #define _ASM_UNIT_TIMEX_H |
13 | 13 | ||
14 | #ifndef __ASSEMBLY__ | ||
15 | #include <linux/irq.h> | ||
16 | #endif /* __ASSEMBLY__ */ | ||
17 | |||
18 | #include <asm/timer-regs.h> | 14 | #include <asm/timer-regs.h> |
19 | #include <unit/clock.h> | 15 | #include <unit/clock.h> |
20 | #include <asm/param.h> | 16 | #include <asm/param.h> |
diff --git a/arch/mn10300/unit-asb2305/unit-init.c b/arch/mn10300/unit-asb2305/unit-init.c index e1becd6b7571..bc4adfaf815c 100644 --- a/arch/mn10300/unit-asb2305/unit-init.c +++ b/arch/mn10300/unit-asb2305/unit-init.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/pci.h> | 14 | #include <linux/pci.h> |
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | #include <asm/irq.h> | ||
16 | #include <asm/setup.h> | 17 | #include <asm/setup.h> |
17 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |
18 | #include <asm/intctl-regs.h> | 19 | #include <asm/intctl-regs.h> |
diff --git a/arch/mn10300/unit-asb2364/include/unit/timex.h b/arch/mn10300/unit-asb2364/include/unit/timex.h index ddb7ed010706..42f32db75087 100644 --- a/arch/mn10300/unit-asb2364/include/unit/timex.h +++ b/arch/mn10300/unit-asb2364/include/unit/timex.h | |||
@@ -11,10 +11,6 @@ | |||
11 | #ifndef _ASM_UNIT_TIMEX_H | 11 | #ifndef _ASM_UNIT_TIMEX_H |
12 | #define _ASM_UNIT_TIMEX_H | 12 | #define _ASM_UNIT_TIMEX_H |
13 | 13 | ||
14 | #ifndef __ASSEMBLY__ | ||
15 | #include <linux/irq.h> | ||
16 | #endif /* __ASSEMBLY__ */ | ||
17 | |||
18 | #include <asm/timer-regs.h> | 14 | #include <asm/timer-regs.h> |
19 | #include <unit/clock.h> | 15 | #include <unit/clock.h> |
20 | #include <asm/param.h> | 16 | #include <asm/param.h> |