* [PATCH] m68k: switch to using asm-generic/hardirq.h
@ 2010-09-07 5:00 Greg Ungerer
2010-09-19 16:32 ` Geert Uytterhoeven
0 siblings, 1 reply; 3+ messages in thread
From: Greg Ungerer @ 2010-09-07 5:00 UTC (permalink / raw)
To: linux-m68k; +Cc: gerg
Hi All,
Is there any reason that the m68k arch cannot use the generic
hardirq.h support?
It looks to be the same, unless I am missing something.
If it can then it is simple to merge the non-mmu and mmu
versions of hardirq.h.
Regards
Greg
m68k: switch to using asm-generic/hardirq.h
M68k arch can use generic hardirq.h. This also means that we can
simply switch to a single hardirq.h for both m68k and m68knommu.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/m68k/include/asm/hardirq.h | 11 +++++++----
arch/m68k/include/asm/hardirq_mm.h | 16 ----------------
arch/m68k/include/asm/hardirq_no.h | 19 -------------------
arch/m68k/include/asm/irq.h | 10 +++++-----
4 files changed, 12 insertions(+), 44 deletions(-)
delete mode 100644 arch/m68k/include/asm/hardirq_mm.h
delete mode 100644 arch/m68k/include/asm/hardirq_no.h
diff --git a/arch/m68k/include/asm/hardirq.h b/arch/m68k/include/asm/hardirq.h
index 56d0d5d..d0e9d06 100644
--- a/arch/m68k/include/asm/hardirq.h
+++ b/arch/m68k/include/asm/hardirq.h
@@ -1,5 +1,8 @@
-#ifdef __uClinux__
-#include "hardirq_no.h"
-#else
-#include "hardirq_mm.h"
+#ifndef __M68K_HARDIRQ_H
+#define __M68K_HARDIRQ_H
+
+#include <asm-generic/hardirq.h>
+
+#define HARDIRQ_BITS 8
+
#endif
diff --git a/arch/m68k/include/asm/hardirq_mm.h b/arch/m68k/include/asm/hardirq_mm.h
deleted file mode 100644
index 394ee94..0000000
--- a/arch/m68k/include/asm/hardirq_mm.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef __M68K_HARDIRQ_H
-#define __M68K_HARDIRQ_H
-
-#include <linux/threads.h>
-#include <linux/cache.h>
-
-/* entry.S is sensitive to the offsets of these fields */
-typedef struct {
- unsigned int __softirq_pending;
-} ____cacheline_aligned irq_cpustat_t;
-
-#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
-
-#define HARDIRQ_BITS 8
-
-#endif
diff --git a/arch/m68k/include/asm/hardirq_no.h b/arch/m68k/include/asm/hardirq_no.h
deleted file mode 100644
index b44b14b..0000000
--- a/arch/m68k/include/asm/hardirq_no.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef __M68K_HARDIRQ_H
-#define __M68K_HARDIRQ_H
-
-#include <asm/irq.h>
-
-#define HARDIRQ_BITS 8
-
-/*
- * The hardirq mask has to be large enough to have
- * space for potentially all IRQ sources in the system
- * nesting on a single CPU:
- */
-#if (1 << HARDIRQ_BITS) < NR_IRQS
-# error HARDIRQ_BITS is too low!
-#endif
-
-#include <asm-generic/hardirq.h>
-
-#endif /* __M68K_HARDIRQ_H */
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 907eff1..d2b04f1 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -25,12 +25,7 @@
#define NR_IRQS 0
#endif
-#ifdef CONFIG_MMU
-
-#include <linux/linkage.h>
#include <linux/hardirq.h>
-#include <linux/irqreturn.h>
-#include <linux/spinlock_types.h>
/*
* The hardirq mask has to be large enough to have
@@ -41,6 +36,11 @@
# error HARDIRQ_BITS is too low!
#endif
+#ifdef CONFIG_MMU
+#include <linux/linkage.h>
+#include <linux/irqreturn.h>
+#include <linux/spinlock_types.h>
+
/*
* Interrupt source definitions
* General interrupt sources are the level 1-7.
--
1.6.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] m68k: switch to using asm-generic/hardirq.h
2010-09-07 5:00 [PATCH] m68k: switch to using asm-generic/hardirq.h Greg Ungerer
@ 2010-09-19 16:32 ` Geert Uytterhoeven
2010-09-20 5:58 ` Greg Ungerer
0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2010-09-19 16:32 UTC (permalink / raw)
To: Greg Ungerer; +Cc: linux-m68k, gerg
On Tue, Sep 7, 2010 at 07:00, Greg Ungerer <gerg@snapgear.com> wrote:
>
> Hi All,
>
> Is there any reason that the m68k arch cannot use the generic
> hardirq.h support?
>
> It looks to be the same, unless I am missing something.
Unfortunately it's not that simple: the m68k core doesn't use the
generic hardirq
code yet. Fixing header files it not enough.
> If it can then it is simple to merge the non-mmu and mmu
> versions of hardirq.h.
yeah, one more reason to migrate to generic hardirqs...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] m68k: switch to using asm-generic/hardirq.h
2010-09-19 16:32 ` Geert Uytterhoeven
@ 2010-09-20 5:58 ` Greg Ungerer
0 siblings, 0 replies; 3+ messages in thread
From: Greg Ungerer @ 2010-09-20 5:58 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-m68k, gerg
Hi Geert,
On 20/09/10 02:32, Geert Uytterhoeven wrote:
> On Tue, Sep 7, 2010 at 07:00, Greg Ungerer<gerg@snapgear.com> wrote:
>>
>> Hi All,
>>
>> Is there any reason that the m68k arch cannot use the generic
>> hardirq.h support?
>>
>> It looks to be the same, unless I am missing something.
>
> Unfortunately it's not that simple: the m68k core doesn't use the
> generic hardirq
> code yet. Fixing header files it not enough.
Oh, yeah, I get that.
I did this based on visual inspection of the two files,
arch/m68k/include/asm/hardirq_mm.h and
include/asm-generic/hardirq.h.
They are almost the same (the irq_cpustat_t definition is identical).
Outside of a superfluous definition of ack_bad_irq the only difference
is the include of linux/irq.h. Is this enough to cause problems?
>> If it can then it is simple to merge the non-mmu and mmu
>> versions of hardirq.h.
>
> yeah, one more reason to migrate to generic hardirqs...
Indeed :-)
Regards
Greg
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg@snapgear.com
SnapGear Group, McAfee PHONE: +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-20 5:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-07 5:00 [PATCH] m68k: switch to using asm-generic/hardirq.h Greg Ungerer
2010-09-19 16:32 ` Geert Uytterhoeven
2010-09-20 5:58 ` Greg Ungerer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.