gic驱动

gic驱动

下面看 ./drivers/irqchip/irq-gic-v3.c

IRQCHIP_DECLARE(gic_v3, "arm,gic-v3", gic_of_init);

#define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn)


1185 #define OF_DECLARE_2(table, name, compat, fn) \
1186         _OF_DECLARE(table, name, compat, fn, of_init_fn_2)


_OF_DECLARE(irqchip, name, compat, fn, of_init_fn_2)

1170 #define _OF_DECLARE(table, name, compat, fn, fn_type)           \
1171     static const struct of_device_id __of_table_##name      \
1172         __attribute__((unused))                 \
1173          = { .compatible = compat,              \
1174              .data = (fn == (fn_type)NULL) ? fn : fn }


static const struct of_device_id __of_table_gic_v3 __attribute__((unused))
	= 	{
			.compatible = "arm,gic-v3",
			.data = gic_of_init,
		}

在4.0开发板内核中

933 #define _OF_DECLARE(table, name, compat, fn, fn_type)           \
 934     static const struct of_device_id __of_table_##name      \
 935         __used __section(__##table##_of_table)          \
 936          = { .compatible = compat,              \
 937              .data = (fn == (fn_type)NULL) ? fn : fn  }

会被放到 __irqchip_of_table这个section
确认990是否也是如此

drivers/irqchip/irqchip.c:29:   of_irq_init(__irqchip_of_table); 唯一一处会调用到__irqchip_of_table 不过是数组

你可能感兴趣的:(irq,linux)