[lkml]   [2012]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: x86/mce: machine check warning during poweroff
    On Mon, Jan 16, 2012 at 19:11, Greg KH <> wrote:

    >> It has to do with the fact that this is a "static" device that is being
    >> reused.  Normally it would be cleaned up properly in the release
    >> function, but as there isn't one, some fields are being left in a bad
    >> state.
    > Kay, I looked at this this morning, and it comes down to the line:
    > DEFINE_PER_CPU(struct device, mce_device);
    > Where we are creating static struct device variables.  I'm guessing this
    > is just done for "convenience" as we really don't care about where in
    > memory these structures are, we just want to make sure we have enough of
    > them around (this is the way all the other mce per-cpu structures are
    > handled.)

    It's a pretty common pattern across the CPU handling code. I don't
    know the details, but I doubt many of them are needed or really useful
    in the context which they are used. So, it's either convenience or
    just 'hoping stuff could be made without managing memory'. :)

    Having the 'machinecheck' devices pre-allocated per CPU might not make
    too much sense, because the driver core operations will still need to
    allocate stuff dynamically at register() time anyway. Attaching
    devices to interfaces and drivers of a subsystem will require the same
    thing, even the simplest kobject allocates the name dynamically.

    I guess, the driver core part ofmachinecheckcould just be fully
    dynamic, instead of statically pre-allocated.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2012-01-16 19:45    [W:0.023 / U:3.920 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site