26 Oct, 2020

1 commit


08 Sep, 2020

1 commit

  • The debug messages about what syscore suspend/resume hooks are called
    are only present if you have initcall debugging enabled. Let's move
    these messages to pm_pr_dbg() so that the syscore PM messages are
    included along with all the other PM debugging info that can be seen
    during suspend/resume debugging.

    Cc: "Rafael J. Wysocki"
    Signed-off-by: Stephen Boyd
    Link: https://lore.kernel.org/r/20200806214633.204472-1-swboyd@chromium.org
    Signed-off-by: Greg Kroah-Hartman

    Stephen Boyd
     

21 May, 2019

1 commit


04 May, 2019

1 commit

  • Add API log_wakeup_reason() and expose it to userspace via sysfs path
    /sys/kernel/wakeup_reasons/last_resume_reason

    Bug: 120445600
    Signed-off-by: Ruchi Kandoi
    [AmitP: Folded following android-4.9 commit changes into this patch
    1135122a192a ("ANDROID: POWER: fix compile warnings in log_wakeup_reason")
    b4e6247778b0 ("ANDROID: Power: Changes the permission to read only for sysfs file /sys/kernel/wakeup_reasons/last_resume_reason")
    e13dbc7c69cd ("ANDROID: power: wakeup_reason: rename irq_count to irqcount")]
    Signed-off-by: Amit Pundir
    [astrachan: Folded the following changes into this patch:
    39d7c7fe91c0 ("ANDROID: power: wakeup_reason: Add guard condition for maximum wakeup reasons")
    0730434bdf49 ("ANDROID: power: wakeup_reason: Avoids bogus error messages for the suspend aborts.")
    4e42dceae54e ("ANDROID: power: wakeup_reason: Adds functionality to log the last suspend abort reason.")
    f21313b70ac7 ("ANDROID: power: wakeup_reason: Report suspend times from last_suspend_time")
    f97ec34442ac ("ANDROID: power: wakeup_reason: fix suspend time reporting")
    cd92df73e504 ("ANDROID: power: wakeup: Add last wake up source logging for suspend abort reason.")
    546b6ae3c087 ("ANDROID: power: wakeup: Add the guard condition for len in pm_get_active_wakeup_sources")
    1453d9ffcdbe ("ANDROID: power: wakeup_reason: make logging work in an interrupt context.")]
    Change-Id: I81addaf420f1338255c5d0638b0d244a99d777d1
    Signed-off-by: Alistair Strachan

    Ruchi Kandoi
     

09 Apr, 2019

1 commit

  • %pF and %pf are functionally equivalent to %pS and %ps conversion
    specifiers. The former are deprecated, therefore switch the current users
    to use the preferred variant.

    The changes have been produced by the following command:

    git grep -l '%p[fF]' | grep -v '^\(tools\|Documentation\)/' | \
    while read i; do perl -i -pe 's/%pf/%ps/g; s/%pF/%pS/g;' $i; done

    And verifying the result.

    Link: http://lkml.kernel.org/r/20190325193229.23390-1-sakari.ailus@linux.intel.com
    Cc: Andy Shevchenko
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: sparclinux@vger.kernel.org
    Cc: linux-um@lists.infradead.org
    Cc: xen-devel@lists.xenproject.org
    Cc: linux-acpi@vger.kernel.org
    Cc: linux-pm@vger.kernel.org
    Cc: drbd-dev@lists.linbit.com
    Cc: linux-block@vger.kernel.org
    Cc: linux-mmc@vger.kernel.org
    Cc: linux-nvdimm@lists.01.org
    Cc: linux-pci@vger.kernel.org
    Cc: linux-scsi@vger.kernel.org
    Cc: linux-btrfs@vger.kernel.org
    Cc: linux-f2fs-devel@lists.sourceforge.net
    Cc: linux-mm@kvack.org
    Cc: ceph-devel@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Signed-off-by: Sakari Ailus
    Acked-by: David Sterba (for btrfs)
    Acked-by: Mike Rapoport (for mm/memblock.c)
    Acked-by: Bjorn Helgaas (for drivers/pci)
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Petr Mladek

    Sakari Ailus
     

08 Dec, 2017

2 commits

  • Now that the SPDX tag is in all driver core files, that identifies the
    license in a specific and legally-defined manner. So the extra GPL text
    wording can be removed as it is no longer needed at all.

    This is done on a quest to remove the 700+ different ways that files in
    the kernel describe the GPL license text. And there's unneeded stuff
    like the address (sometimes incorrect) for the FSF which is never
    needed.

    No copyright headers or other non-license-description text was removed.

    Cc: Johannes Berg
    Cc: "Luis R. Rodriguez"
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • It's good to have SPDX identifiers in all files to make it easier to
    audit the kernel tree for correct licenses.

    Update the driver core files files with the correct SPDX license
    identifier based on the license text in the file itself. The SPDX
    identifier is a legally binding shorthand, which can be used instead of
    the full boiler plate text.

    This work is based on a script and data from Thomas Gleixner, Philippe
    Ombredanne, and Kate Stewart.

    Cc: Johannes Berg
    Cc: "Luis R. Rodriguez"
    Cc: William Breathitt Gray
    Cc: Thomas Gleixner
    Cc: Kate Stewart
    Cc: Philippe Ombredanne
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

01 Sep, 2014

1 commit

  • Currently we suspend wakeup interrupts by lazy disabling them and
    check later whether the interrupt has fired, but that's not sufficient
    for suspend to idle as there is no way to check that once we
    transitioned into the CPU idle state.

    So we change the mechanism in the following way:

    1) Leave the wakeup interrupts enabled across suspend

    2) Add a check to irq_may_run() which is called at the beginning of
    each flow handler whether the interrupt is an armed wakeup source.

    This check is basically free as it just extends the existing check
    for IRQD_IRQ_INPROGRESS. So no new conditional in the hot path.

    If the IRQD_WAKEUP_ARMED flag is set, then the interrupt is
    disabled, marked as pending/suspended and the pm core is notified
    about the wakeup event.

    Signed-off-by: Thomas Gleixner
    [ rjw: syscore.c and put irq_pm_check_wakeup() into pm.c ]
    Signed-off-by: Rafael J. Wysocki

    Thomas Gleixner
     

07 Jun, 2014

1 commit

  • Adds trace events that give finer resolution into suspend/resume. These
    events are graphed in the timelines generated by the analyze_suspend.py
    script. They represent large areas of time consumed that are typical to
    suspend and resume.

    The event is triggered by calling the function "trace_suspend_resume"
    with three arguments: a string (the name of the event to be displayed
    in the timeline), an integer (case specific number, such as the power
    state or cpu number), and a boolean (where true is used to denote the start
    of the timeline event, and false to denote the end).

    The suspend_resume trace event reproduces the data that the machine_suspend
    trace event did, so the latter has been removed.

    Signed-off-by: Todd Brandt
    Acked-by: Steven Rostedt
    Signed-off-by: Rafael J. Wysocki

    Todd E Brandt
     

11 Jul, 2011

1 commit

  • Patch 2e711c04dbbf7a7732a3f7073b1fc285d12b369d
    (PM: Remove sysdev suspend, resume and shutdown operations)
    deleted sysdev_suspend(), which was being relied on to call
    check_wakeup_irqs() in suspend. If check_wakeup_irqs() is not
    called, wake interrupts that are pending when suspend is
    entered may be lost. It also breaks IRQCHIP_MASK_ON_SUSPEND,
    which is handled in check_wakeup_irqs().

    This patch adds a call to check_wakeup_irqs() in syscore_suspend(),
    similar to what was deleted in sysdev_suspend().

    Signed-off-by: Colin Cross
    Signed-off-by: Rafael J. Wysocki

    Colin Cross
     

20 Apr, 2011

1 commit

  • Device suspend/resume infrastructure is used not only by the suspend
    and hibernate code in kernel/power, but also by APM, Xen and the
    kexec jump feature. However, commit 40dc166cb5dddbd36aa4ad11c03915ea
    (PM / Core: Introduce struct syscore_ops for core subsystems PM)
    failed to add syscore_suspend() and syscore_resume() calls to that
    code, which generally leads to breakage when the features in question
    are used.

    To fix this problem, add the missing syscore_suspend() and
    syscore_resume() calls to arch/x86/kernel/apm_32.c, kernel/kexec.c
    and drivers/xen/manage.c.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman
    Acked-by: Ian Campbell

    Rafael J. Wysocki
     

15 Mar, 2011

1 commit

  • Some subsystems need to carry out suspend/resume and shutdown
    operations with one CPU on-line and interrupts disabled. The only
    way to register such operations is to define a sysdev class and
    a sysdev specifically for this purpose which is cumbersome and
    inefficient. Moreover, the arguments taken by sysdev suspend,
    resume and shutdown callbacks are practically never necessary.

    For this reason, introduce a simpler interface allowing subsystems
    to register operations to be executed very late during system suspend
    and shutdown and very early during resume in the form of
    strcut syscore_ops objects.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman

    Rafael J. Wysocki