Re: iop_msg_pool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Finn,

On Wed, Jun 26, 2013 at 12:48 PM, Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx> wrote:
As iop_msg_pool consumes 4928 bytes, it should be allocated dynamically,
especially for multi-platform kernels not running on Mac.

I agree. Though I don't care much for multi-platform kernels: bloat in
portable code is easily excused when most users of that code run it on
recent hardware. We don't have that excuse.

Maybe use kcalloc() to allocate iop_msg_pool, iop_send_queue and
iop_listeners and remove all of the following initialisation. I don't see
a convenient way to call kfree() though.

At this time, slab hasn't been initialized yet, so kzalloc() is out of
the question.
As iop_init() is called even before paging_init(), the bootmem allocator is also
not available yet.

I'm wondering if the call to iop_init() can be moved to mac_platform_init(),
where we can allocate memory?
The only callers into iop are adb-iop, which definitely runs later, and
mac_init_IRQ(), which calls iop_register_interrupts().
The latter may be an issue: can we receive iop interrupts immediately after
iop_register_interrupts()? If yes, this may call into an uninitialized
iop module.
Perhaps the call to iop_register_interrupts() can be done from iop_init()
instead?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux