aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-03-31 12:03:42 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-03-31 12:03:42 +0100
commit68b564efee06fa8a5118004d8d78b2c0a20b5096 (patch)
tree668a1983115f773b2c6de942d01611de80a3a208
parent5a5d245c8c59a28503353f57d7b2201b507bf99e (diff)
downloadxen-68b564efee06fa8a5118004d8d78b2c0a20b5096.tar.gz
xen-68b564efee06fa8a5118004d8d78b2c0a20b5096.tar.bz2
xen-68b564efee06fa8a5118004d8d78b2c0a20b5096.zip
Various softirq cleanups:
1. Make __softirq_pending a long, since PPC borrows the file hardirq.h from us and they only do atomic ops on longs. 2. do_softirq() explicitly takes a void param list. 3. Remove idle_timestamp field from irq_cpustat. It's unused and lets us simplify the idle loop a little bit. Part 1 based on a patch from Hollis Blanchard at IBM. Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r--xen/arch/x86/domain.c11
-rw-r--r--xen/common/softirq.c5
-rw-r--r--xen/include/asm-x86/hardirq.h3
3 files changed, 8 insertions, 11 deletions
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 8cb91ead4d..ab5b697953 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -79,15 +79,12 @@ void idle_loop(void)
for ( ; ; )
{
- irq_stat[cpu].idle_timestamp = jiffies;
+ page_scrub_schedule_work();
- while ( !softirq_pending(cpu) )
- {
- page_scrub_schedule_work();
- default_idle();
- }
+ default_idle();
- do_softirq();
+ if ( softirq_pending(cpu) )
+ do_softirq();
}
}
diff --git a/xen/common/softirq.c b/xen/common/softirq.c
index 5a7cd2dabc..f8a2c3780c 100644
--- a/xen/common/softirq.c
+++ b/xen/common/softirq.c
@@ -21,9 +21,10 @@ irq_cpustat_t irq_stat[NR_CPUS];
static softirq_handler softirq_handlers[NR_SOFTIRQS];
-asmlinkage void do_softirq()
+asmlinkage void do_softirq(void)
{
- unsigned int i, pending, cpu = smp_processor_id();
+ unsigned int i, cpu = smp_processor_id();
+ unsigned long pending;
pending = softirq_pending(cpu);
ASSERT(pending != 0);
diff --git a/xen/include/asm-x86/hardirq.h b/xen/include/asm-x86/hardirq.h
index 59e90e2b47..c426fdea07 100644
--- a/xen/include/asm-x86/hardirq.h
+++ b/xen/include/asm-x86/hardirq.h
@@ -5,10 +5,9 @@
#include <xen/cache.h>
typedef struct {
- unsigned int __softirq_pending;
+ unsigned long __softirq_pending;
unsigned int __local_irq_count;
unsigned int __nmi_count;
- unsigned long idle_timestamp;
} __cacheline_aligned irq_cpustat_t;
#include <xen/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */