Re: tick-common.c hack for s390 needed

From: Heiko Carstens
Date: Sat Mar 22 2008 - 16:32:39 EST


On Fri, Mar 21, 2008 at 03:45:52PM +0100, Thomas Gleixner wrote:
> On Fri, 21 Mar 2008, Heiko Carstens wrote:
> >
> > The patch below removes at least three of the includes for a beginning.
> > Still compiles on s390 and x86_64.
> >
> > Subject: [PATCH] time: remove include/irq.h.
> >
> > From: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
> >
> > Generic code is not supposed to include linux/irq.h.
> >
> > Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
>
> Applied, thanks,

And here comes the second part...

Subject: [PATCH] time: remove include/irq.h from tick-common.c

From: Heiko Carstens <heiko.carstens@xxxxxxxxxx>

Generic code is not supposed to include irq.h. Replace this include
by linux/hardirq.h instead and add/replace an include of linux/irq.h
in asm header files where necessary.
This change should only matter for architectures that make use of
GENERIC_CLOCKEVENTS.
Architectures in question are mips, x86, arm, sh, powerpc, uml and sparc64.

I did some cross compile tests for mips, x86_64, arm, powerpc and sparc64.
This patch fixes also build breakages caused by the include replacement in
tick-common.h.

I didn't test uml and sh.

Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
---
include/asm-arm/hardirq.h | 2 +-
include/asm-powerpc/hardirq.h | 2 +-
include/asm-sparc64/hardirq.h | 1 +
include/asm-sparc64/irq.h | 1 -
kernel/time/tick-common.c | 2 +-
5 files changed, 4 insertions(+), 4 deletions(-)

Index: linux-2.6/include/asm-arm/hardirq.h
===================================================================
--- linux-2.6.orig/include/asm-arm/hardirq.h
+++ linux-2.6/include/asm-arm/hardirq.h
@@ -3,7 +3,7 @@

#include <linux/cache.h>
#include <linux/threads.h>
-#include <asm/irq.h>
+#include <linux/irq.h>

typedef struct {
unsigned int __softirq_pending;
Index: linux-2.6/include/asm-powerpc/hardirq.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/hardirq.h
+++ linux-2.6/include/asm-powerpc/hardirq.h
@@ -2,7 +2,7 @@
#define _ASM_POWERPC_HARDIRQ_H
#ifdef __KERNEL__

-#include <asm/irq.h>
+#include <linux/irq.h>
#include <asm/bug.h>

/* The __last_jiffy_stamp field is needed to ensure that no decrementer
Index: linux-2.6/include/asm-sparc64/hardirq.h
===================================================================
--- linux-2.6.orig/include/asm-sparc64/hardirq.h
+++ linux-2.6/include/asm-sparc64/hardirq.h
@@ -6,6 +6,7 @@
#ifndef __SPARC64_HARDIRQ_H
#define __SPARC64_HARDIRQ_H

+#include <linux/irq.h>
#include <asm/cpudata.h>

#define __ARCH_IRQ_STAT
Index: linux-2.6/kernel/time/tick-common.c
===================================================================
--- linux-2.6.orig/kernel/time/tick-common.c
+++ linux-2.6/kernel/time/tick-common.c
@@ -14,7 +14,7 @@
#include <linux/cpu.h>
#include <linux/err.h>
#include <linux/hrtimer.h>
-#include <linux/irq.h>
+#include <linux/hardirq.h>
#include <linux/percpu.h>
#include <linux/profile.h>
#include <linux/sched.h>
Index: linux-2.6/include/asm-sparc64/irq.h
===================================================================
--- linux-2.6.orig/include/asm-sparc64/irq.h
+++ linux-2.6/include/asm-sparc64/irq.h
@@ -10,7 +10,6 @@
#include <linux/linkage.h>
#include <linux/kernel.h>
#include <linux/errno.h>
-#include <linux/interrupt.h>
#include <asm/pil.h>
#include <asm/ptrace.h>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/