[lkml]   [2012]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 01/27] smpboot: Provide a generic method to boot secondary processors
    On 06/01/2012 10:21 PM, Sam Ravnborg wrote:

    >> +/* Implement the following functions in your architecture, as appropriate. */
    >> +
    >> +/**
    >> + * __cpu_pre_starting()
    >> + *
    >> + * Implement whatever you need to do before the CPU_STARTING notifiers are
    >> + * invoked. Note that the CPU_STARTING callbacks run *on* the cpu that is
    >> + * coming up. So that cpu better be prepared! IOW, implement all the early
    >> + * boot/init code for the cpu here. And do NOT enable interrupts.
    >> + */
    >> +#ifndef __cpu_pre_starting
    >> +void __weak __cpu_pre_starting(void *arg) {}
    >> +#endif
    > __What __is __the __purpose __of __all __these __underscaores __used
    > __as __function __prefix? __It __does __not __help __readability.


    We had used "__" as the function prefix to emphasize that these functions are
    implemented/overriden in the depths of architecture-specific code.

    But now that you mention it, I see that we don't really have something like an
    arch-independent variant without the "__" prefix. So adding the "__" prefix
    might not be really necessary, since there is nothing to distinguish name-wise.

    However, I do want to emphasize that this isn't generic code. So how about
    an "arch_" prefix instead? Something like:
    arch_cpu_pre_starting(), arch_cpu_pre_online() and arch_cpu_post_online()?

    > Does the nicely worded comment follow kerneldoc style?
    > I think not as the parameter is not described.

    I'll fix that. (The parameter is simply unused for now, btw).

    Thanks for your review!

    Srivatsa S. Bhat

     \ /
      Last update: 2012-06-02 00:41    [W:0.029 / U:1.624 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site