History log of /openbsd/sys/arch/loongson/dev/apm.c (Results 1 – 25 of 44)
Revision Date Author Comments
# 8e8b3a2c 29-May-2024 jsg <jsg@openbsd.org>

indent with tabs not spaces; from jon@elytron.openbsd.amsterdam


# b2653891 02-Jul-2023 cheloha <cheloha@openbsd.org>

all platforms, kernel: remove __HAVE_CLOCKINTR symbol

Every platform made the clockintr switch at least six months ago.
The __HAVE_CLOCKINTR symbol is now redundant. Remove it.

Prompted by claudio

all platforms, kernel: remove __HAVE_CLOCKINTR symbol

Every platform made the clockintr switch at least six months ago.
The __HAVE_CLOCKINTR symbol is now redundant. Remove it.

Prompted by claudio@.

Link: https://marc.info/?l=openbsd-tech&m=168826181015032&w=2

"makes sense" mlarkin@

show more ...


# c78098b6 10-Feb-2023 visa <visa@openbsd.org>

Adjust knote(9) API

Make knote(9) lock the knote list internally, and add knote_locked(9)
for the typical situation where the list is already locked.

Remove the KNOTE(9) macro to simplify the API.

Adjust knote(9) API

Make knote(9) lock the knote list internally, and add knote_locked(9)
for the typical situation where the list is already locked.

Remove the KNOTE(9) macro to simplify the API.

Manual page OK jmc@
OK mpi@ mvs@

show more ...


# f124c57c 19-Nov-2022 cheloha <cheloha@openbsd.org>

mips64, loongson, octeon: switch to clockintr

- Remove mips64-specific clock interrupt scheduling bits from cpu_info.
- Add missing tick_nsec initialization to cpu_initclocks().
- Disable the glxclk

mips64, loongson, octeon: switch to clockintr

- Remove mips64-specific clock interrupt scheduling bits from cpu_info.
- Add missing tick_nsec initialization to cpu_initclocks().
- Disable the glxclk interrupt clock on loongson. visa@/miod@ say it
can be removed later if it isn't useful for anything else.
- Wire up cp0_intrclock.

Notes:

- The loongson apm_suspend() changes are untested, but deraadt@ claims
APM suspend/resume on loongson doesn't work anyway.
- loongson and octeon now have a randomized statclock(), stathz = hz.

With input from miod@, visa@. Tested by miod@, visa@.

Link: https://marc.info/?l=openbsd-tech&m=166776379603497&w=2

ok visa@ mlarkin@

show more ...


# 471aeecf 06-Apr-2022 naddy <naddy@openbsd.org>

constify struct cfattach


# 9b0cf67b 25-Dec-2020 visa <visa@openbsd.org>

Refactor klist insertion and removal

Rename klist_{insert,remove}() to klist_{insert,remove}_locked().
These functions assume that the caller has locked the klist. The current
state of locking remai

Refactor klist insertion and removal

Rename klist_{insert,remove}() to klist_{insert,remove}_locked().
These functions assume that the caller has locked the klist. The current
state of locking remains intact because the kernel lock is still used
with all klists.

Add new functions klist_insert() and klist_remove() that lock the klist
internally. This allows some code simplification.

OK mpi@

show more ...


# 3209772d 24-Jun-2020 cheloha <cheloha@openbsd.org>

kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)

time_second(9) and time_uptime(9) are widely used in the kernel to
quickly get the system UTC or system uptime as a time_

kernel: use gettime(9)/getuptime(9) in lieu of time_second(9)/time_uptime(9)

time_second(9) and time_uptime(9) are widely used in the kernel to
quickly get the system UTC or system uptime as a time_t. However,
time_t is 64-bit everywhere, so it is not generally safe to use them
on 32-bit platforms: you have a split-read problem if your hardware
cannot perform atomic 64-bit reads.

This patch replaces time_second(9) with gettime(9), a safer successor
interface, throughout the kernel. Similarly, time_uptime(9) is replaced
with getuptime(9).

There is a performance cost on 32-bit platforms in exchange for
eliminating the split-read problem: instead of two register reads you
now have a lockless read loop to pull the values from the timehands.
This is really not *too* bad in the grand scheme of things, but
compared to what we were doing before it is several times slower.

There is no performance cost on 64-bit (__LP64__) platforms.

With input from visa@, dlg@, and tedu@.

Several bugs squashed by visa@.

ok kettenis@

show more ...


# c8f27247 29-May-2020 deraadt <deraadt@openbsd.org>

dev/rndvar.h no longer has statistical interfaces (removed during various
conversion steps). it only contains kernel prototypes for 4 interfaces,
all of which legitimately belong in sys/systm.h, whi

dev/rndvar.h no longer has statistical interfaces (removed during various
conversion steps). it only contains kernel prototypes for 4 interfaces,
all of which legitimately belong in sys/systm.h, which are already included
by all enqueue_randomness() users.

show more ...


# 9c969c9a 07-Apr-2020 visa <visa@openbsd.org>

Abstract the head of knote lists. This allows extending the lists,
for example, with locking assertions.

OK mpi@, anton@


# b8213689 20-Feb-2020 visa <visa@openbsd.org>

Replace field f_isfd with field f_flags in struct filterops to allow
adding more filter properties without cluttering the struct.

OK mpi@, anton@


# fc9b224b 16-Feb-2020 jca <jca@openbsd.org>

Send a resume event to apmd(8), like done by apm(4) and acpi(4)

Test & ok visa@. Sadly his Lemote doesn't come back from sleep, with or
without this change.


# 94321eb4 31-Dec-2019 visa <visa@openbsd.org>

Use C99 designated initializers with struct filterops. In addition,
make the structs const so that the data are put in .rodata.

OK mpi@, deraadt@, anton@, bluhm@


# 9fb726f7 27-Mar-2017 deraadt <deraadt@openbsd.org>

hibernate_free() should not be called from MD code, acpi_sleep_state()
unwinds that. Upon hibernate fail, this was a collection of double-frees..
ok claudio mlarkin


# 552f6074 08-Oct-2016 guenther <guenther@openbsd.org>

Various printf claim to report the PID, so actually report that and not the TID

Build testing assistance from deraadt@


# 299e2953 03-Sep-2016 naddy <naddy@openbsd.org>

Write the system time back to the RTC every 30 minutes.
This fixes the problem that long-running machines which were not
shut down properly would reboot with a badly offset system time.

hints and ok

Write the system time back to the RTC every 30 minutes.
This fixes the problem that long-running machines which were not
shut down properly would reboot with a badly offset system time.

hints and ok kettenis@

show more ...


# ebf20b71 28-Sep-2015 deraadt <deraadt@openbsd.org>

In low-level suspend routines, set cold=2. In tsleep(), use this to
spit out a ddb trace to console. This should allow us to find suspend
or resume routines which break the rules. It depends on th

In low-level suspend routines, set cold=2. In tsleep(), use this to
spit out a ddb trace to console. This should allow us to find suspend
or resume routines which break the rules. It depends on the console
output function being non-sleeping.... but that's another codepath which
should try to be safe when cold is set.
ok kettenis

show more ...


# 87dd1dd0 07-Feb-2015 deraadt <deraadt@openbsd.org>

New framework that allows hibernate to pass in entropy from it's fresh
boot.
ok mlarkin


# e21288dc 19-Dec-2014 deraadt <deraadt@openbsd.org>

oops, forgot rndvar.h


# fbaf4dec 18-Dec-2014 deraadt <deraadt@openbsd.org>

use suspend_randomness() and resume_randomness()


# b045954e 31-Oct-2014 jsg <jsg@openbsd.org>

#if NSWDISPLAY > 0 -> #if NWSDISPLAY > 0
now wsdisplay_suspend() will run on suspend


# 96f419e1 20-Sep-2014 kettenis <kettenis@openbsd.org>

Use config_suspend_all(9).

ok mpi@, uebayasi@, dlg@


# c16e7cd6 19-Jul-2014 pirofti <pirofti@openbsd.org>

Bring back pci_dopm, but disable it before powerdown.

This fixes both the Lemote reboot issue and the USB issue on the
Gdium's that miod@ spotted.

Suggested by kettenis@, thanks!

Okay miod@


# 6658f7ae 19-Jul-2014 pirofti <pirofti@openbsd.org>

Backout pci_dopm usage as it also breaks reboot on Lemote's.

Noticed by matthieu@.


# 84bc442e 16-Jul-2014 miod <miod@openbsd.org>

Do not set pci_dopm to 1 on the Gdium; if we do, rebooting puts the USB HCI in
a state PMON doesn't expect, and can't recover from.


# 53fe70ff 16-Jun-2014 pirofti <pirofti@openbsd.org>

Enable PCI power management on Lemote.

Remaining battery test results on Lemote after 30m in suspend:

pci_dopm = 0: 82%, 68min
pci_dopm = 1: 86%, 81min


Suggested by deraadt@
Okay miod@, deraadt@


12