Skip to content

Commit e37af80

Browse files
author
Marc Zyngier
committed
powerpc: Move the use of irq_domain_add_nomap() behind a config option
Only a handful of old PPC systems are still using the old 'nomap' variant of the irqdomain library. Move the associated definitions behind a configuration option, which will allow us to make some more radical changes. Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 1da0273 commit e37af80

7 files changed

Lines changed: 17 additions & 2 deletions

File tree

arch/powerpc/platforms/cell/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ config PPC_IBM_CELL_BLADE
3535
config AXON_MSI
3636
bool
3737
depends on PPC_IBM_CELL_BLADE && PCI_MSI
38+
select IRQ_DOMAIN_NOMAP
3839
default y
3940

4041
menu "Cell Broadband Engine options"

arch/powerpc/platforms/powermac/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ config PPC_PMAC32_PSURGE
2424
bool "Support for powersurge upgrade cards" if EXPERT
2525
depends on SMP && PPC32 && PPC_PMAC
2626
select PPC_SMP_MUXED_IPI
27+
select IRQ_DOMAIN_NOMAP
2728
default y
2829
help
2930
The powersurge cpu boards can be used in the generation

arch/powerpc/platforms/ps3/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ config PPC_PS3
77
select USB_OHCI_BIG_ENDIAN_MMIO
88
select USB_EHCI_BIG_ENDIAN_MMIO
99
select HAVE_PCI
10+
select IRQ_DOMAIN_NOMAP
1011
help
1112
This option enables support for the Sony PS3 game console
1213
and other platforms using the PS3 hypervisor. Enabling this

arch/powerpc/sysdev/xive/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ config PPC_XIVE
33
bool
44
select PPC_SMP_MUXED_IPI
55
select HARDIRQS_SW_RESEND
6+
select IRQ_DOMAIN_NOMAP
67

78
config PPC_XIVE_NATIVE
89
bool

include/linux/irqdomain.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,13 +345,19 @@ static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_no
345345
{
346346
return __irq_domain_add(of_node_to_fwnode(of_node), size, size, 0, ops, host_data);
347347
}
348+
349+
#ifdef CONFIG_IRQ_DOMAIN_NOMAP
348350
static inline struct irq_domain *irq_domain_add_nomap(struct device_node *of_node,
349351
unsigned int max_irq,
350352
const struct irq_domain_ops *ops,
351353
void *host_data)
352354
{
353355
return __irq_domain_add(of_node_to_fwnode(of_node), 0, max_irq, max_irq, ops, host_data);
354356
}
357+
358+
extern unsigned int irq_create_direct_mapping(struct irq_domain *host);
359+
#endif
360+
355361
static inline struct irq_domain *irq_domain_add_tree(struct device_node *of_node,
356362
const struct irq_domain_ops *ops,
357363
void *host_data)
@@ -408,8 +414,6 @@ static inline unsigned int irq_linear_revmap(struct irq_domain *domain,
408414
return irq_find_mapping(domain, hwirq);
409415
}
410416

411-
extern unsigned int irq_create_direct_mapping(struct irq_domain *host);
412-
413417
extern const struct irq_domain_ops irq_domain_simple_ops;
414418

415419
/* stock xlate functions */

kernel/irq/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ config IRQ_DOMAIN_HIERARCHY
7070
bool
7171
select IRQ_DOMAIN
7272

73+
# Support for obsolete non-mapping irq domains
74+
config IRQ_DOMAIN_NOMAP
75+
bool
76+
select IRQ_DOMAIN
77+
7378
# Support for hierarchical fasteoi+edge and fasteoi+level handlers
7479
config IRQ_FASTEOI_HIERARCHY_HANDLERS
7580
bool

kernel/irq/irqdomain.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,7 @@ void irq_domain_associate_many(struct irq_domain *domain, unsigned int irq_base,
604604
}
605605
EXPORT_SYMBOL_GPL(irq_domain_associate_many);
606606

607+
#ifdef CONFIG_IRQ_DOMAIN_NOMAP
607608
/**
608609
* irq_create_direct_mapping() - Allocate an irq for direct mapping
609610
* @domain: domain to allocate the irq for or NULL for default domain
@@ -644,6 +645,7 @@ unsigned int irq_create_direct_mapping(struct irq_domain *domain)
644645
return virq;
645646
}
646647
EXPORT_SYMBOL_GPL(irq_create_direct_mapping);
648+
#endif
647649

648650
/**
649651
* irq_create_mapping_affinity() - Map a hardware interrupt into linux irq space

0 commit comments

Comments
 (0)