Thread (5 messages) flat view 5 messages, 2 authors, 2005-09-16

Re: PATCH powerpc: Merge asm-ppc*/hardirq.h

From: Christoph Hellwig <hch@lst.de>
Date: 2005-09-14 11:05:06

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help