Re: [PATCH] m68k/mac: Allocate IOP message pool and queues dynamically

2013-07-01 Thread Brad Boyer
On Mon, Jul 01, 2013 at 05:48:22PM +1000, Finn Thain wrote: > > On Sun, 30 Jun 2013, Brad Boyer wrote: > > > On Sun, Jun 30, 2013 at 12:02:22PM +0200, Geert Uytterhoeven wrote: > > > > > > if (iop_scc_present) { > > > printk("IOP: detected SCC IOP at %p\n", iop_base[IOP_NUM_SCC]); >

Re: [PATCH] m68k/mac: Allocate IOP message pool and queues dynamically

2013-07-01 Thread Brad Boyer
On Mon, Jul 01, 2013 at 05:46:48PM +1000, Finn Thain wrote: > > On Sun, 30 Jun 2013, Geert Uytterhoeven wrote: > > > - > > -/* > > - * Register the interrupt handler for the IOPs. > > - * TODO: might be wrong for non-OSS machines. Anyone? > > - */ > > - > > -void __init iop_register_interrupts(vo

Re: [PATCH] m68k/mac: Allocate IOP message pool and queues dynamically

2013-07-01 Thread Finn Thain
On Sun, 30 Jun 2013, Brad Boyer wrote: > On Sun, Jun 30, 2013 at 12:02:22PM +0200, Geert Uytterhoeven wrote: > > > > if (iop_scc_present) { > > printk("IOP: detected SCC IOP at %p\n", iop_base[IOP_NUM_SCC]); > > + alloc_msg_queue(IOP_NUM_SCC); > > Technically, this is

Re: [PATCH] m68k/mac: Allocate IOP message pool and queues dynamically

2013-07-01 Thread Finn Thain
On Sun, 30 Jun 2013, Geert Uytterhoeven wrote: > +static void __init alloc_msg_queue(int iop_num) > +{ > + iop_send_queue[iop_num] = > + kzalloc(NUM_IOP_CHAN * sizeof(**iop_send_queue), GFP_KERNEL); > + iop_listeners[iop_num] = > + kzalloc(NUM_IOP_CHAN * sizeof(**i

Re: [PATCH] m68k/mac: Allocate IOP message pool and queues dynamically

2013-07-01 Thread Brad Boyer
On Sun, Jun 30, 2013 at 12:02:22PM +0200, Geert Uytterhoeven wrote: > Currently the IOP message pool and queues are allocated statically, > wasting ca. 5 KiB when running a Mac or multi-platform kernel on a machine > not having a Mac IOP. Convert them to conditional dynamic memory > allocations to

[PATCH] m68k/mac: Allocate IOP message pool and queues dynamically

2013-06-30 Thread Geert Uytterhoeven
Currently the IOP message pool and queues are allocated statically, wasting ca. 5 KiB when running a Mac or multi-platform kernel on a machine not having a Mac IOP. Convert them to conditional dynamic memory allocations to fix this. As kzalloc() returns zeroed memory, there's no need to initialize