genirq: revert dynarray
Revert the dynarray changes. They need more thought and polishing. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
committed by
Ingo Molnar
parent
ee32c97322
commit
d6c88a507e
@@ -210,19 +210,6 @@
|
||||
* All archs are supposed to use RO_DATA() */
|
||||
#define RODATA RO_DATA(4096)
|
||||
|
||||
#define DYN_ARRAY_INIT(align) \
|
||||
. = ALIGN((align)); \
|
||||
.dyn_array.init : AT(ADDR(.dyn_array.init) - LOAD_OFFSET) { \
|
||||
VMLINUX_SYMBOL(__dyn_array_start) = .; \
|
||||
*(.dyn_array.init) \
|
||||
VMLINUX_SYMBOL(__dyn_array_end) = .; \
|
||||
} \
|
||||
. = ALIGN((align)); \
|
||||
.per_cpu_dyn_array.init : AT(ADDR(.per_cpu_dyn_array.init) - LOAD_OFFSET) { \
|
||||
VMLINUX_SYMBOL(__per_cpu_dyn_array_start) = .; \
|
||||
*(.per_cpu_dyn_array.init) \
|
||||
VMLINUX_SYMBOL(__per_cpu_dyn_array_end) = .; \
|
||||
}
|
||||
#define SECURITY_INIT \
|
||||
.security_initcall.init : AT(ADDR(.security_initcall.init) - LOAD_OFFSET) { \
|
||||
VMLINUX_SYMBOL(__security_initcall_start) = .; \
|
||||
|
||||
@@ -247,49 +247,6 @@ struct obs_kernel_param {
|
||||
/* Relies on boot_command_line being set */
|
||||
void __init parse_early_param(void);
|
||||
|
||||
struct dyn_array {
|
||||
void **name;
|
||||
unsigned long size;
|
||||
unsigned int *nr;
|
||||
unsigned long align;
|
||||
void (*init_work)(void *);
|
||||
};
|
||||
extern struct dyn_array *__dyn_array_start[], *__dyn_array_end[];
|
||||
extern struct dyn_array *__per_cpu_dyn_array_start[], *__per_cpu_dyn_array_end[];
|
||||
|
||||
#define DEFINE_DYN_ARRAY_ADDR(nameX, addrX, sizeX, nrX, alignX, init_workX) \
|
||||
static struct dyn_array __dyn_array_##nameX __initdata = \
|
||||
{ .name = (void **)&(nameX),\
|
||||
.size = sizeX,\
|
||||
.nr = &(nrX),\
|
||||
.align = alignX,\
|
||||
.init_work = init_workX,\
|
||||
}; \
|
||||
static struct dyn_array *__dyn_array_ptr_##nameX __used \
|
||||
__attribute__((__section__(".dyn_array.init"))) = \
|
||||
&__dyn_array_##nameX
|
||||
|
||||
#define DEFINE_DYN_ARRAY(nameX, sizeX, nrX, alignX, init_workX) \
|
||||
DEFINE_DYN_ARRAY_ADDR(nameX, nameX, sizeX, nrX, alignX, init_workX)
|
||||
|
||||
#define DEFINE_PER_CPU_DYN_ARRAY_ADDR(nameX, addrX, sizeX, nrX, alignX, init_workX) \
|
||||
static struct dyn_array __per_cpu_dyn_array_##nameX __initdata = \
|
||||
{ .name = (void **)&(addrX),\
|
||||
.size = sizeX,\
|
||||
.nr = &(nrX),\
|
||||
.align = alignX,\
|
||||
.init_work = init_workX,\
|
||||
}; \
|
||||
static struct dyn_array *__per_cpu_dyn_array_ptr_##nameX __used \
|
||||
__attribute__((__section__(".per_cpu_dyn_array.init"))) = \
|
||||
&__per_cpu_dyn_array_##nameX
|
||||
|
||||
#define DEFINE_PER_CPU_DYN_ARRAY(nameX, sizeX, nrX, alignX, init_workX) \
|
||||
DEFINE_PER_CPU_DYN_ARRAY_ADDR(nameX, nameX, nrX, alignX, init_workX)
|
||||
|
||||
extern void pre_alloc_dyn_array(void);
|
||||
extern unsigned long per_cpu_dyn_array_size(unsigned long *align);
|
||||
extern void per_cpu_alloc_dyn_array(int cpu, char *ptr);
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
/**
|
||||
|
||||
@@ -139,8 +139,6 @@ struct irq_chip {
|
||||
const char *typename;
|
||||
};
|
||||
|
||||
struct timer_rand_state;
|
||||
struct irq_2_iommu;
|
||||
/**
|
||||
* struct irq_desc - interrupt descriptor
|
||||
*
|
||||
@@ -167,9 +165,6 @@ struct irq_2_iommu;
|
||||
*/
|
||||
struct irq_desc {
|
||||
unsigned int irq;
|
||||
#ifdef CONFIG_HAVE_DYN_ARRAY
|
||||
unsigned int *kstat_irqs;
|
||||
#endif
|
||||
irq_flow_handler_t handle_irq;
|
||||
struct irq_chip *chip;
|
||||
struct msi_desc *msi_desc;
|
||||
@@ -198,23 +193,13 @@ struct irq_desc {
|
||||
} ____cacheline_internodealigned_in_smp;
|
||||
|
||||
|
||||
#ifndef CONFIG_HAVE_DYN_ARRAY
|
||||
/* could be removed if we get rid of all irq_desc reference */
|
||||
extern struct irq_desc irq_desc[NR_IRQS];
|
||||
#else
|
||||
extern struct irq_desc *irq_desc;
|
||||
#endif
|
||||
|
||||
static inline struct irq_desc *irq_to_desc(unsigned int irq)
|
||||
{
|
||||
return (irq < nr_irqs) ? irq_desc + irq : NULL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HAVE_DYN_ARRAY
|
||||
#define kstat_irqs_this_cpu(DESC) \
|
||||
((DESC)->kstat_irqs[smp_processor_id()])
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Migration helpers for obsolete names, they will go away:
|
||||
*/
|
||||
|
||||
@@ -28,9 +28,7 @@ struct cpu_usage_stat {
|
||||
|
||||
struct kernel_stat {
|
||||
struct cpu_usage_stat cpustat;
|
||||
#ifndef CONFIG_HAVE_DYN_ARRAY
|
||||
unsigned int irqs[NR_IRQS];
|
||||
#endif
|
||||
};
|
||||
|
||||
DECLARE_PER_CPU(struct kernel_stat, kstat);
|
||||
@@ -41,20 +39,18 @@ DECLARE_PER_CPU(struct kernel_stat, kstat);
|
||||
|
||||
extern unsigned long long nr_context_switches(void);
|
||||
|
||||
#ifndef CONFIG_HAVE_DYN_ARRAY
|
||||
#define kstat_irqs_this_cpu(irq) \
|
||||
(kstat_this_cpu.irqs[irq])
|
||||
#endif
|
||||
struct irq_desc;
|
||||
|
||||
static inline void kstat_incr_irqs_this_cpu(unsigned int irq,
|
||||
struct irq_desc *desc)
|
||||
{
|
||||
kstat_this_cpu.irqs[irq]++;
|
||||
}
|
||||
|
||||
#ifndef CONFIG_HAVE_DYN_ARRAY
|
||||
static inline unsigned int kstat_irqs_cpu(unsigned int irq, int cpu)
|
||||
{
|
||||
return kstat_cpu(cpu).irqs[irq];
|
||||
}
|
||||
#else
|
||||
extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Number of interrupts per specific IRQ source, since bootup
|
||||
|
||||
Reference in New Issue
Block a user