Re: [patch] generic-hardirqs.patch, 2.6.9-rc1-bk14

Ingo Molnar
2004-09-08T12:44:32Z

* Christoph Hellwig <hch@infradead.org> wrote:

> > @@ -99,4 +99,6 @@ do { \
> > extern void synchronize_irq(unsigned int irq);
> > #endif /* CONFIG_SMP */
> >
> > +extern int setup_irq(unsigned int irq, struct irqaction * new);
>
> This doesn't apply anymore because most of <asm/hardirq.h> moved to
> linux/hardirq.h in -mm and a the patch is on it's way to Linus.

(yeah. not a big issue - can happen in any order. this patch is against
BK-curr.)

> > +extern asmlinkage int generic_handle_IRQ_event(unsigned int irq, struct pt_regs *regs, struct irqaction *action);
> > +extern void generic_synchronize_irq(unsigned int irq);
> > +extern int generic_setup_irq(unsigned int irq, struct irqaction * new);
> > +extern void generic_free_irq(unsigned int irq, void *dev_id);
> > +extern void generic_disable_irq_nosync(unsigned int irq);
> > +extern void generic_disable_irq(unsigned int irq);
> > +extern void generic_enable_irq(unsigned int irq);
> > +extern void generic_note_interrupt(int irq, irq_desc_t *desc, int action_ret);
>
> Please don't introduce the generic_ names just to have every arch (in
> your previous patches, that is) provide a wrapper with normal names
> again.

some of the architectures dont want to (and cannot) use the generic
functions for one reason or another. So the proper approach i believe is
to provide these generic functions the architectures can plug in. I can
do an asm-generic/hardirq.h that adds all the definitions, for
architectures that dont need any special IRQ logic.

> > obj-y = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
> > - exit.o itimer.o time.o softirq.o resource.o \
> > + exit.o itimer.o time.o softirq.o hardirq.o resource.o \
>
> And make hardirq.o dependent on some symbols the architectures set.
> Else arches that don't use it carry tons of useless baggage around
> (and in fact I'm pretty sure it wouldn't even compie for many)

it compiles fine on x86, x64, ppc and ppc64. Why do you think it wont
compile on others?

wrt. unused generic functions - why dont we drop them link-time?

Ingo