mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	paulus@samba.org, ralf@linux-mips.org, davem@davemloft.net,
	lethal@linux-sh.org, jdike@addtoit.com
Subject: Re: tick-common.c hack for s390 needed
Date: Mon, 24 Mar 2008 11:14:31 +0100	[thread overview]
Message-ID: <20080324101431.GA9521@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20080323223455.GA746@flint.arm.linux.org.uk>

On Sun, Mar 23, 2008 at 10:34:55PM +0000, Russell King wrote:
> On Sat, Mar 22, 2008 at 09:32:23PM +0100, Heiko Carstens wrote:
> > 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 generally dislike adding optional linux/* includes in asm/* includes -
> I'm nervous about this causing include loops.
> 
> However, there's a separate point to be discussed here.
> 
> That is, what interfaces are expected of every architecture in the kernel.
> If generic code wants to be able to set the affinity of interrupts, then
> that needs to become part of the interfaces listed in linux/interrupt.h
> rather than linux/irq.h.

Every architecture besides one... as usual :/

> diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
> index f8ab4ce..355e3b0 100644
> --- a/include/linux/interrupt.h
> +++ b/include/linux/interrupt.h
> @@ -102,6 +102,25 @@ extern void disable_irq_nosync(unsigned int irq);
>  extern void disable_irq(unsigned int irq);
>  extern void enable_irq(unsigned int irq);
> 
> +#ifdef CONFIG_SMP
> +
> +extern int irq_set_affinity(unsigned int irq, cpumask_t cpumask);
> +extern int irq_can_set_affinity(unsigned int irq);
> +
> +#else /* CONFIG_SMP */
> +
> +static inline int irq_set_affinity(unsigned int irq, cpumask_t cpumask)
> +{
> +	return -EINVAL;
> +}
> +
> +static inline int irq_can_set_affinity(unsigned int irq)
> +{
> +	return 0;
> +}
> +
> +#endif /* CONFIG_SMP */
> +

Could you add something like

#ifdef CONFIG_GENERIC_HARDIRQS

/* added stuff from above */

#else /* CONFIG_GENERIC_HARDIRQS */

static inline int irq_set_affinity(unsigned int irq, cpumask_t cpumask)
{
	WARN_ON(1);
	return -EINVAL;
}

static inline int irq_can_set_affinity(unsigned int irq)
{
	return 0;
}
#endif /* CONFIG_GENERIC_HARDIRQS */

Then it should do the right thing on s390 as well.

  reply	other threads:[~2008-03-24 10:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-18  9:31 Heiko Carstens
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 [this message]
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=20080324101431.GA9521@osiris.boeblingen.de.ibm.com \
    --to=heiko.carstens@de.ibm.com \
    --cc=davem@davemloft.net \
    --cc=hch@infradead.org \
    --cc=jdike@addtoit.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=ralf@linux-mips.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    --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®