Thread (15 messages) 15 messages, 3 authors, 2012-04-10

Re: [PATCH] virtio-mmio: Devices parameter parsing

From: Rusty Russell <hidden>
Date: 2011-11-22 01:00:05
Also in: lkml

Possibly related (same subject, not in this thread)

On Mon, 21 Nov 2011 17:56:50 +0000, Pawel Moll [off-list ref] wrote:
On Mon, 2011-11-21 at 14:44 +0000, Pawel Moll wrote:
quoted
I'll post v3 tonight or tomorrow.
Ok, it won't be v3 then...

I tried again, using your suggestions - see below (just the crucial bit,
however I have the kernel-parameters.txt bits ready as well). Parsing
works like charm, however when it gets to device_register() and
platform_device_register_resndata() I hit the same problem as
previously. Both are using slab allocator...

device_register()->device_add()->device_private_init()->kzalloc()

and

platform_device_register_resndata()->platform_device_register_full()->
platform_device_alloc()->kzalloc().

Essentially it seems that the parameter callbacks are just executed
waaay to early to do more than just set few integers here and there...

Any ideas?
Rewrite the kernel and every arch so allocators work as soon as we hit
start_kernel() and we can get rid of hundreds of ugly workarounds?

Perhaps not today.  So, we will need a linked list of devices and
resources.  Yeah, that means allocating, which means YA
slab_is_available()/alloc_bootmem() hack.

Think of yourself as a pioneer...

Thanks :)
Rusty.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help