All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jon Loeliger <jdl@freescale.com>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>,
	linuxppc64-dev <linuxppc64-dev@ozlabs.org>
Subject: Re: PATCH powerpc: Merge asm-ppc*/hardirq.h
Date: Wed, 14 Sep 2005 13:05:06 +0200	[thread overview]
Message-ID: <20050914110506.GA7049@lst.de> (raw)
In-Reply-To: <1126643920.11056.53.camel@cashmere.sps.mot.com>

On Tue, Sep 13, 2005 at 03:38:40PM -0500, Jon Loeliger wrote:
> +#ifndef _ASM_POWERPC_HARDIRQ_H
> +#define _ASM_POWERPC_HARDIRQ_H
> +#ifdef __KERNEL__

the __KERNEL__ ifdefs is not needed.  <asm/hardirq.h> is only included
from <linux/hardirq.h> which doesn't have anything user-visible.

> +
> +#include <linux/config.h>

not needed.

> +#include <linux/cache.h>
> +
> +#ifdef __powerpc64__
> +#include <linux/preempt.h>
> +#else
> +#include <linux/smp_lock.h>
> +#include <asm/irq.h>
> +#endif

We shouldn't need either of these include blocks at all.

> +
> +/* The __last_jiffy_stamp field is needed to ensure that no decrementer
> + * interrupt is lost on SMP machines. Since on most CPUs it is in the same
> + * cache line as local_irq_count, it is cheap to access and is also used on UP
> + * for uniformity.
> + */
> +typedef struct {
> +	unsigned int __softirq_pending;	/* set_bit is used on this */
> +	unsigned int __last_jiffy_stamp;
> +} ____cacheline_aligned irq_cpustat_t;

I'd suggest just using a DECLARE_PER_CPU variable for last_jiffy_stamp.
In facct I plan to get rid of irq_cpustat_t completely at some point.

  reply	other threads:[~2005-09-14 11:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13 20:38 PATCH powerpc: Merge asm-ppc*/hardirq.h Jon Loeliger
2005-09-14 11:05 ` Christoph Hellwig [this message]
2005-09-14 13:41   ` Jon Loeliger
2005-09-14 13:43     ` Christoph Hellwig
2005-09-16 15:45     ` PATCH powerpc: Revised merge asm-ppc*/hardirq.h Jon Loeliger

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=20050914110506.GA7049@lst.de \
    --to=hch@lst.de \
    --cc=jdl@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=linuxppc64-dev@ozlabs.org \
    /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 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.