From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: tick-common.c hack for s390 needed
Date: Tue, 18 Mar 2008 10:31:19 +0100 [thread overview]
Message-ID: <20080318093119.GA8669@osiris.boeblingen.de.ibm.com> (raw)
Hi Thomas, Ingo,
I'm converting s390 from s390's NO_IDLE_HZ to GENERIC_CLOCKEVENTS and
therefore to the generic NO_HZ implementation.
One of the problems that need a patch for this is kernel/time/tick-common.c
which relies on the irq stuff present in include/linux/irq.h.
In particular s390 doesn't have something like irq_set_affinity which
causes this build error:
CC kernel/time/tick-common.o
kernel/time/tick-common.c: In function 'tick_periodic':
kernel/time/tick-common.c:70: error: implicit declaration of function 'get_irq_regs'
kernel/time/tick-common.c:70: error: invalid type argument of '->' (have 'int')
kernel/time/tick-common.c: In function 'tick_setup_device':
kernel/time/tick-common.c:171: error: implicit declaration of function 'irq_set_affinity'
kernel/time/tick-common.c: In function 'tick_check_new_device':
kernel/time/tick-common.c:216: error: implicit declaration of function 'irq_can_set_affinity'
Actually there's a huge #ifndef CONFIG_S390 in linux/irq.h ;)
To make the code work the patch below is necessary. It's ok since all
clock event devices on s390 are per cpu. However I think this patch is
ugly at best. Any ideas how to fix this in a better and more generic way?
---
kernel/time/tick-common.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
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
@@ -19,6 +19,7 @@
#include <linux/profile.h>
#include <linux/sched.h>
#include <linux/tick.h>
+#include <asm/irq_regs.h>
#include "tick-internal.h"
@@ -167,9 +168,10 @@ static void tick_setup_device(struct tic
* When the device is not per cpu, pin the interrupt to the
* current cpu:
*/
+#ifndef CONFIG_S390
if (!cpus_equal(newdev->cpumask, cpumask))
irq_set_affinity(newdev->irq, cpumask);
-
+#endif
/*
* When global broadcasting is active, check if the current
* device is registered as a placeholder for broadcast mode.
@@ -213,9 +215,10 @@ static int tick_check_new_device(struct
* If the cpu affinity of the device interrupt can not
* be set, ignore it.
*/
+#ifndef CONFIG_S390
if (!irq_can_set_affinity(newdev->irq))
goto out_bc;
-
+#endif
/*
* If we have a cpu local device already, do not replace it
* by a non cpu local device
next reply other threads:[~2008-03-18 9:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-18 9:31 Heiko Carstens [this message]
2008-03-19 4:12 ` Arnd Bergmann
2008-03-19 5:45 ` Christoph Hellwig
2008-03-21 10:15 ` Ingo Molnar
2008-03-21 13:25 ` Heiko Carstens
2008-03-21 14:45 ` Thomas Gleixner
2008-03-22 20:32 ` Heiko Carstens
2008-03-23 22:34 ` Russell King
2008-03-24 10:14 ` Heiko Carstens
2008-03-25 19:09 ` Thomas Gleixner
2008-03-25 19:30 ` Russell King
2008-04-01 11:02 ` Heiko Carstens
2008-04-01 11:24 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080318093119.GA8669@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=schwidefsky@de.ibm.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®