Files
linux-stable-mirror/include/linux
Yinghai Lu 3ddfda1186 generic: add dyn_array support
Allow crazy big arrays via bootmem at init stage.
Architectures use CONFIG_HAVE_DYN_ARRAY to enable it.

usage:

| static struct irq_desc irq_desc_init __initdata = {
|        .status = IRQ_DISABLED,
|        .chip = &no_irq_chip,
|        .handle_irq = handle_bad_irq,
|        .depth = 1,
|        .lock = __SPIN_LOCK_UNLOCKED(irq_desc->lock),
| #ifdef CONFIG_SMP
|        .affinity = CPU_MASK_ALL
| #endif
| };
|
| static void __init init_work(void *data)
| {
|        struct dyn_array *da = data;
|        struct  irq_desc *desc;
|        int i;
|
|        desc = *da->name;
|
|        for (i = 0; i < *da->nr; i++)
|                memcpy(&desc[i], &irq_desc_init, sizeof(struct irq_desc));
| }
|
| struct irq_desc *irq_desc;
| DEFINE_DYN_ARRAY(irq_desc, sizeof(struct irq_desc), nr_irqs, PAGE_SIZE, init_work);

after pre_alloc_dyn_array() after setup_arch(), the array is ready to be
used.

Via this facility we can replace irq_desc[NR_IRQS] array with dyn_array
irq_desc[nr_irqs].

v2: remove _nopanic in pre_alloc_dyn_array()

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-10-16 16:52:02 +02:00
..
2008-10-13 21:51:51 +01:00
2008-09-12 16:30:20 -07:00
2008-10-09 08:56:22 +02:00
2008-10-10 13:37:12 +01:00
2008-10-12 12:05:55 +02:00
2008-10-08 19:44:18 -04:00
2008-09-22 07:29:31 +01:00
2008-10-14 23:51:02 +02:00
2008-10-09 11:59:55 -07:00
2008-09-22 21:28:11 -07:00
2008-10-07 15:34:37 -07:00
2008-10-16 16:52:02 +02:00
2008-10-16 16:51:32 +02:00
2008-10-12 11:44:37 -07:00
2008-10-13 09:47:43 +11:00
2008-10-09 08:56:06 +02:00
2008-10-14 23:50:47 +02:00
2008-10-01 07:03:24 -07:00
2008-10-08 16:38:41 -07:00
2008-09-16 19:35:05 -07:00
2008-10-02 15:53:13 -07:00
2008-09-22 19:51:15 -07:00
2008-10-12 12:37:32 +02:00
2008-10-07 14:22:33 -07:00
2008-09-09 17:41:42 +02:00
2008-10-07 14:43:06 -07:00
2008-10-13 09:51:40 -07:00
2008-09-05 14:39:38 -07:00