On Wed, Jun 26, 2013 at 12:48 PM, Finn Thain <[email protected]> wrote:
>>         if (iop_scc_present) {
>>                 printk("IOP: detected SCC IOP at %p\n", 
>> iop_base[IOP_NUM_SCC]);
>>         }
>>         if (iop_ism_present) {
>>                 printk("IOP: detected ISM IOP at %p\n", 
>> iop_base[IOP_NUM_ISM]);
>>                 iop_start(iop_base[IOP_NUM_ISM]);
>>                 iop_alive(iop_base[IOP_NUM_ISM]); /* clears the alive flag */
>>         }
>
> 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.

I don't think not calling kfree() is an issue here. The code can't be
unloaded anyway.

>>
>>         /* Make the whole pool available and empty the queues */
>>
>>         for (i = 0 ; i < NUM_IOP_MSGS ; i++) {
>>                 iop_msg_pool[i].status = IOP_MSGSTATUS_UNUSED;
>>         }
>>
>>         for (i = 0 ; i < NUM_IOP_CHAN ; i++) {
>>                 iop_send_queue[IOP_NUM_SCC][i] = NULL;
>>                 iop_send_queue[IOP_NUM_ISM][i] = NULL;
>>                 iop_listeners[IOP_NUM_SCC][i].devname = NULL;
>>                 iop_listeners[IOP_NUM_SCC][i].handler = NULL;
>>                 iop_listeners[IOP_NUM_ISM][i].devname = NULL;
>>                 iop_listeners[IOP_NUM_ISM][i].handler = NULL;
>>         }
>> }
>>
>> However, despite the comment at the top, all of the above is done
>> unconditionally?
>
> Seems so. And it is pointless AFAICS with grep.
>
>> Do all Macs use the IOP functionality?
>
> No. iop_scc_present and iop_ism_present are accurate.

Thanks! So we can just do nothing and return if both of them are unset.

Are iop_scc_present and iop_sim_present mutually exclusive?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to