11 Aug, 2017

1 commit


18 Feb, 2017

1 commit

  • When passing "test_suspend=mem" to the kernel:

    PM: can't test 'mem' suspend state

    and the suspend test is not run.

    Commit 406e79385f3223d8 ("PM / sleep: System sleep state selection
    interface rework") changed pm_labels[] from a contiguous NULL-terminated
    array to a sparse array (with the first element unpopulated), breaking
    the assumptions of the iterator in setup_test_suspend().

    Iterate from PM_SUSPEND_MIN to PM_SUSPEND_MAX - 1 to fix this.

    Fixes: 406e79385f3223d8 (PM / sleep: System sleep state selection interface rework)
    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Rafael J. Wysocki

    Geert Uytterhoeven
     

02 Nov, 2016

1 commit


09 Sep, 2014

2 commits


03 Sep, 2014

1 commit

  • After commit d431cbc53cb7 (PM / sleep: Simplify sleep states sysfs
    interface code) the pm_states[] array is not populated initially,
    which causes setup_test_suspend() to always fail and the suspend
    testing during boot doesn't work any more.

    Fix the problem by using pm_labels[] instead of pm_states[] in
    setup_test_suspend() and storing a pointer to the label of the
    sleep state to test rather than the number representing it,
    because the connection between the state numbers and labels is
    only established by suspend_set_ops().

    Fixes: d431cbc53cb7 (PM / sleep: Simplify sleep states sysfs interface code)
    Reported-by: Srinivas Pandruvada
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

21 Jul, 2014

1 commit


26 May, 2014

2 commits

  • Use the observation that, for platform-dependent sleep states
    (PM_SUSPEND_STANDBY, PM_SUSPEND_MEM), a given state is either
    always supported or always unsupported and store that information
    in pm_states[] instead of calling valid_state() every time we
    need to check it.

    Also do not use valid_state() for PM_SUSPEND_FREEZE, which is always
    valid, and move the pm_test_level validity check for PM_SUSPEND_FREEZE
    directly into enter_state().

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • To allow sleep states corresponding to the "mem", "standby" and
    "freeze" lables to be different from the pm_states[] indexes of
    those strings, introduce struct pm_sleep_state, consisting of
    a string label and a state number, and turn pm_states[] into an
    array of objects of that type.

    This modification should not lead to any functional changes.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

07 Feb, 2013

1 commit

  • All in-kernel users of class_find_device() don't really need mutable
    data for match callback.

    In two places (kernel/power/suspend_test.c, drivers/scsi/osd/osd_uld.c)
    this patch changes match callbacks to use const search data.

    The const is propagated to rtc_class_open() and power_supply_get_by_name()
    parameters.

    Note that there's a dev reference leak in suspend_test.c that's not
    touched in this patch.

    Signed-off-by: Michał Mirosław
    Acked-by: Grant Likely
    Signed-off-by: Greg Kroah-Hartman

    Michał Mirosław
     

22 Oct, 2009

1 commit

  • Increase TEST_SUSPEND_SECONDS to 10 so the warning in
    suspend_test_finish() doesn't annoy the users of slower systems so much.

    Also, make the warning print the suspend-resume cycle time, so that we
    know why the warning actually triggered.

    Patch prepared during the hacking session at the Kernel Summit in Tokyo.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

13 Jun, 2009

1 commit

  • Move the suspend to RAM and standby code from kernel/power/main.c
    to two separate files, kernel/power/suspend.c containing the basic
    functions and kernel/power/suspend_test.c containing the automatic
    suspend test facility based on the RTC clock alarm.

    There are no changes in functionality related to these modifications.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek

    Rafael J. Wysocki