* [PATCH] dyn_array: remove one panic
@ 2008-09-06 17:26 Yinghai Lu
2008-09-06 17:29 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Yinghai Lu @ 2008-09-06 17:26 UTC (permalink / raw)
To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Andrew Morton
Cc: linux-kernel, Yinghai Lu
Andrew said, we don't need duplicated panic.
because __alloc_bootmem already have that.
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
diff --git a/init/dyn_array.c b/init/dyn_array.c
index cf1e04c..778d9d5 100644
--- a/init/dyn_array.c
+++ b/init/dyn_array.c
@@ -33,11 +33,9 @@ void __init pre_alloc_dyn_array(void)
/* allocate them all together */
max_align = max_t(unsigned long, max_align, PAGE_SIZE);
- ptr = __alloc_bootmem_nopanic(total_size, max_align, 0);
- if (!ptr)
- panic("Can not alloc dyn_alloc\n");
-
+ ptr = __alloc_bootmem(total_size, max_align, 0);
phys = virt_to_phys(ptr);
+
for (daa = __dyn_array_start ; daa < __dyn_array_end; daa++) {
struct dyn_array *da = *daa;
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] dyn_array: remove one panic
2008-09-06 17:26 [PATCH] dyn_array: remove one panic Yinghai Lu
@ 2008-09-06 17:29 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-09-06 17:29 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Thomas Gleixner, H. Peter Anvin, Andrew Morton, linux-kernel
* Yinghai Lu <yhlu.kernel@gmail.com> wrote:
> Andrew said, we don't need duplicated panic.
> because __alloc_bootmem already have that.
>
> Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
applied to tip/irq/sparseirq, thanks.
Maybe some design documentation would be nice too, to point out that
most of the pain we do here is because we dont have bootmem available as
early as we need an already instantiated dyn-array based IRQ array.
So we try this mix of an abstraction of preallocated and post-allocated
array, with pre-bootmem and post-bootmem behavior.
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-06 17:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-06 17:26 [PATCH] dyn_array: remove one panic Yinghai Lu
2008-09-06 17:29 ` Ingo Molnar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.