Re: [PATCH 01/10] irq: move some interrupt arch_* functions into struct irq_chip.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul Mundt
Date: Tuesday, March 23, 2010 - 12:10 am

On Sun, Mar 21, 2010 at 08:32:33PM -0700, Yinghai Lu wrote:

This API seems to be going from bad to worse. Initially we had
arch_init_chip_data(), which had precisely nothing to do with chip_data
and only concerned itself with irq_desc, and now you're renaming it to
something sensible but also trying to bolt on some ad-hoc chip_data
relation at the same time thereby nullifying any benefit obtained from
renaming the function in the first place.

Renaming to xxx_irq_desc() while preserving the existing prototypes would
make sense, even if it's ultimately just unecessary churn.

I'm afraid I am unable to grasp the meaning of this sentence, or what
precisely this has to do with not being able to utilize platform ops to
get this sorted out on x86.

You're effectively trying to have the hardirq code pass around a function
pointer for you that ultimately only serves to bail out on certain code
paths if you're running under xen, which is a concern for how the
platform chooses to initialize the irq desc, none of this has any value
or relevance to the hardirq code outside of that. The fact that the
hardirq code doesn't do anything with this information other than pass it
around for your platform should already be a clear indicator that this is
the wrong way to go.

From a cursory look at the x86 code, this looks like precisely the sort
of thing that arch/x86/include/asm/x86_init.h is well suited for, and
indeed you already have a x86_init_irqs to expand on as needed.

The function pointer thing itself is also a bit unorthodox to say the
least. You're introducing and passing around an opaque type just so you
can get to a 'return 0' in the xen case as far as I can tell, so you
could also just make arch_init_chip_data() a weak symbol and clobber it
in the xen case, no?
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/10] x86/irq, Yinghai Lu, (Sun Mar 21, 6:36 pm)
[PATCH 02/10] x86: fix out of order of gsi - full, Yinghai Lu, (Sun Mar 21, 6:36 pm)
[PATCH 10/10] x86: remove arch_probe_nr_irqs, Yinghai Lu, (Sun Mar 21, 6:36 pm)
Re: [PATCH 02/10] x86: fix out of order of gsi - full, Thomas Gleixner, (Mon Mar 22, 4:14 am)
Re: [PATCH 05/10] x86: use vector_desc instead of vector_irq, Thomas Gleixner, (Mon Mar 22, 6:58 am)
Re: [PATCH 05/10] x86: use vector_desc instead of vector_irq, Eric W. Biederman, (Mon Mar 22, 7:04 am)
Re: [PATCH 05/10] x86: use vector_desc instead of vector_irq, Thomas Gleixner, (Mon Mar 22, 7:16 am)
Re: [PATCH 02/10] x86: fix out of order of gsi - full, Yinghai Lu, (Mon Mar 22, 12:45 pm)
Re: [PATCH 01/10] irq: move some interrupt arch_* function ..., Paul Mundt, (Tue Mar 23, 12:10 am)
Re: [PATCH 02/10] x86: fix out of order of gsi - full, Eric W. Biederman, (Mon Mar 29, 6:40 am)
Re: [PATCH 02/10] x86: fix out of order of gsi - full, H. Peter Anvin, (Mon Mar 29, 10:57 am)
[PATCH 0/14] Start coping gsis < 16 that are not isa irqs., Eric W. Biederman, (Mon Mar 29, 4:19 pm)
[PATCH 01/14] x86 acpi/irq: Introduce apci_isa_irq_to_gsi, Eric W. Biederman, (Mon Mar 29, 4:20 pm)
[PATCH 02/14] x86 acpi/irq: Teach acpi_get_override_irq to ..., Eric W. Biederman, (Mon Mar 29, 4:20 pm)
[PATCH 04/14] x86 acpi/irq: Fix acpi_sci_ioapic_setup so i ..., Eric W. Biederman, (Mon Mar 29, 4:20 pm)
[PATCH 05/14] x86 acpi/irq: Generalize mp_config_acpi_lega ..., Eric W. Biederman, (Mon Mar 29, 4:20 pm)
[PATCH 06/14] x86 ioapic: Only export mp_find_ioapic and m ..., Eric W. Biederman, (Mon Mar 29, 4:20 pm)
[PATCH 07/14] x86 ioapic: Fix the types of gsi values, Eric W. Biederman, (Mon Mar 29, 4:20 pm)
[PATCH 08/14] x86 ioapic: Teach mp_register_ioapic to comp ..., Eric W. Biederman, (Mon Mar 29, 4:20 pm)
[PATCH 09/14] x86 ioapic: In mpparse use mp_register_ioapic, Eric W. Biederman, (Mon Mar 29, 4:20 pm)
[PATCH 10/14] x86 ioapic: Move nr_ioapic_registers calcula ..., Eric W. Biederman, (Mon Mar 29, 4:20 pm)
[PATCH 11/14] x86 ioapic: Optimize pin_2_irq, Eric W. Biederman, (Mon Mar 29, 4:20 pm)
[PATCH 12/14] x86 ioapic: Simplify probe_nr_irqs_gsi., Eric W. Biederman, (Mon Mar 29, 4:20 pm)
[PATCH 13/14] x86 acpi/irq: Handle isa irqs that are not i ..., Eric W. Biederman, (Mon Mar 29, 4:20 pm)
[PATCH 14/14] x86 irq: Kill io_apic_renumber_irq, Eric W. Biederman, (Mon Mar 29, 4:20 pm)
Re: [PATCH 12/14] x86 ioapic: Simplify probe_nr_irqs_gsi., Eric W. Biederman, (Mon Mar 29, 9:43 pm)
Re: [PATCH 12/14] x86 ioapic: Simplify probe_nr_irqs_gsi., Eric W. Biederman, (Mon Mar 29, 10:41 pm)
[PATCH 01/15] x86 acpi/irq: Introduce apci_isa_irq_to_gsi, Eric W. Biederman, (Tue Mar 30, 1:07 am)
[PATCH 02/15] x86 acpi/irq: Teach acpi_get_override_irq to ..., Eric W. Biederman, (Tue Mar 30, 1:07 am)
[PATCH 04/15] x86 acpi/irq: Fix acpi_sci_ioapic_setup so i ..., Eric W. Biederman, (Tue Mar 30, 1:07 am)
[PATCH 05/15] x86 acpi/irq: Generalize mp_config_acpi_lega ..., Eric W. Biederman, (Tue Mar 30, 1:07 am)
[PATCH 06/15] x86 ioapic: Only export mp_find_ioapic and m ..., Eric W. Biederman, (Tue Mar 30, 1:07 am)
[PATCH 07/15] x86 ioapic: Fix io_apic_redir_entries to ret ..., Eric W. Biederman, (Tue Mar 30, 1:07 am)
[PATCH 08/15] x86 ioapic: Fix the types of gsi values, Eric W. Biederman, (Tue Mar 30, 1:07 am)
[PATCH 09/15] x86 ioapic: Teach mp_register_ioapic to comp ..., Eric W. Biederman, (Tue Mar 30, 1:07 am)
[PATCH 10/15] x86 ioapic: In mpparse use mp_register_ioapic, Eric W. Biederman, (Tue Mar 30, 1:07 am)
[PATCH 11/15] x86 ioapic: Move nr_ioapic_registers calcula ..., Eric W. Biederman, (Tue Mar 30, 1:07 am)
[PATCH 12/15] x86 ioapic: Optimize pin_2_irq, Eric W. Biederman, (Tue Mar 30, 1:07 am)
[PATCH 13/15] x86 ioapic: Simplify probe_nr_irqs_gsi., Eric W. Biederman, (Tue Mar 30, 1:07 am)
[PATCH 14/15] x86 acpi/irq: Handle isa irqs that are not i ..., Eric W. Biederman, (Tue Mar 30, 1:07 am)
[PATCH 15/15] x86 irq: Kill io_apic_renumber_irq, Eric W. Biederman, (Tue Mar 30, 1:07 am)
[tip:x86/irq] x86, acpi/irq: Introduce apci_isa_irq_to_gsi, tip-bot for Eric W. ..., (Tue May 4, 7:06 pm)
[tip:x86/irq] x86, acpi/irq: Teach acpi_get_override_irq t ..., tip-bot for Eric W. ..., (Tue May 4, 7:07 pm)
[tip:x86/irq] x86, acpi/irq: pci device dev->irq is an isa ..., tip-bot for Eric W. ..., (Tue May 4, 7:07 pm)
[tip:x86/irq] x86, acpi/irq: Fix acpi_sci_ioapic_setup so ..., tip-bot for Eric W. ..., (Tue May 4, 7:07 pm)
[tip:x86/irq] x86, acpi/irq: Generalize mp_config_acpi_leg ..., tip-bot for Eric W. ..., (Tue May 4, 7:07 pm)
[tip:x86/irq] x86, ioapic: Only export mp_find_ioapic and ..., tip-bot for Eric W. ..., (Tue May 4, 7:08 pm)
[tip:x86/irq] x86, ioapic: Fix io_apic_redir_entries to re ..., tip-bot for Eric W. ..., (Tue May 4, 7:08 pm)
[tip:x86/irq] x86, ioapic: Fix the types of gsi values, tip-bot for Eric W. ..., (Tue May 4, 7:08 pm)
[tip:x86/irq] x86, ioapic: Teach mp_register_ioapic to com ..., tip-bot for Eric W. ..., (Tue May 4, 7:09 pm)
[tip:x86/irq] x86, ioapic: In mpparse use mp_register_ioapic, tip-bot for Eric W. ..., (Tue May 4, 7:09 pm)
[tip:x86/irq] x86, ioapic: Move nr_ioapic_registers calcul ..., tip-bot for Eric W. ..., (Tue May 4, 7:09 pm)
[tip:x86/irq] x86, ioapic: Optimize pin_2_irq, tip-bot for Eric W. ..., (Tue May 4, 7:09 pm)
[tip:x86/irq] x86, ioapic: Simplify probe_nr_irqs_gsi., tip-bot for Eric W. ..., (Tue May 4, 7:10 pm)
[tip:x86/irq] x86, acpi/irq: Handle isa irqs that are not ..., tip-bot for Eric W. ..., (Tue May 4, 7:10 pm)
[tip:x86/irq] x86, irq: Kill io_apic_renumber_irq, tip-bot for Eric W. ..., (Tue May 4, 7:10 pm)
[PATCH] x86 acpi/irq: Fix harmless typo., Eric W. Biederman, (Wed May 5, 1:53 am)
Re: [PATCH] x86 acpi/irq: Fix harmless typo., Ingo Molnar, (Wed May 5, 1:58 am)
Re: [tip:x86/irq] x86, acpi/irq: Handle isa irqs that are ..., Eric W. Biederman, (Wed May 5, 2:32 am)
[PATCH] x86 acpi/irq: Define gsi_end when X86_IO_APIC is ..., Eric W. Biederman, (Wed May 5, 1:22 pm)
[tip:x86/irq] x86, acpi/irq: Define gsi_end when X86_IO_AP ..., tip-bot for Eric W. ..., (Thu May 6, 3:07 am)