20 Sep, 2016

1 commit

  • Install the callbacks via the state machine.

    This is just a temporary vehicle to keep the interface working for now,
    It'll be replaced by the sysfs interface which allows to step through the
    hotplug state machine step by step.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Peter Zijlstra
    Cc: Akinobu Mita
    Cc: rt@linutronix.de
    Link: http://lkml.kernel.org/r/20160906170457.32393-15-bigeasy@linutronix.de
    Signed-off-by: Thomas Gleixner

    Sebastian Andrzej Siewior
     

31 Jul, 2012

1 commit

  • Rewrite existing cpu-notifier-error-inject module to use debugfs based new
    framework.

    This change removes cpu_up_prepare_error and cpu_down_prepare_error module
    parameters which were used to specify error code to be injected. We could
    keep these module parameters for backward compatibility by module_param_cb
    but it seems overkill for this module.

    This provides the ability to inject artifical errors to CPU notifier chain
    callbacks. It is controlled through debugfs interface under
    /sys/kernel/debug/notifier-error-inject/cpu

    If the notifier call chain should be failed with some events notified,
    write the error code to "actions//error".

    Example1: inject CPU offline error (-1 == -EPERM)

    # cd /sys/kernel/debug/notifier-error-inject/cpu
    # echo -1 > actions/CPU_DOWN_PREPARE/error
    # echo 0 > /sys/devices/system/cpu/cpu1/online
    bash: echo: write error: Operation not permitted

    Example2: inject CPU online error (-2 == -ENOENT)

    # cd /sys/kernel/debug/notifier-error-inject/cpu
    # echo -2 > actions/CPU_UP_PREPARE/error
    # echo 1 > /sys/devices/system/cpu/cpu1/online
    bash: echo: write error: No such file or directory

    Signed-off-by: Akinobu Mita
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: Greg KH
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     

28 May, 2010

1 commit

  • I used this module to test the series of modification to the cpu notifiers
    code.

    Example1: inject CPU offline error (-1 == -EPERM)

    # modprobe cpu-notifier-error-inject cpu_down_prepare_error=-1
    # echo 0 > /sys/devices/system/cpu/cpu1/online
    bash: echo: write error: Operation not permitted

    Example2: inject CPU online error (-2 == -ENOENT)

    # modprobe cpu-notifier-error-inject cpu_up_prepare_error=-2
    # echo 1 > /sys/devices/system/cpu/cpu1/online
    bash: echo: write error: No such file or directory

    [akpm@linux-foundation.org: fix Kconfig help text]
    Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita