| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
From Yifei ZHAN on tech@
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally we set hz(9) at compile-time in sys/conf/param.c to the value
of HZ. HZ is one of the fundamental compilation options(4). However,
sometimes we need to reset hz(9) at runtime.
Whenever we reset hz(9) we need to recompute tick and tick_nsec.
Otherwise a variety of "time stuff" in the kernel will not work
correctly. For example, most timeouts will expire "too slow" or "too
fast". There are a bunch of other places we use tick and tick_nsec
that will exhibit similar problems.
Test-compiled by deraadt@.
|
|
|
|
|
|
|
|
|
|
|
| |
platforms than just loongson. Rename it to mfokrtc(4) for consistency with
other RTC drivers. Make it match on st,m41t83, since that was the chip for
which the driver was written for. More compatible strings can be added for
each chip of the series verified to behave the same.
Discussed with kettenis@
Compile tested on loongson by kn@
Tested on loongson by and ok visa@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Tested on Yeeloong.
Looks good to miod@
|
|
|
|
| |
Looks good to miod@
|
|
|
|
|
|
|
|
| |
miod explained it was initially a long as it was thought drivers may
need to allocate storage but in practice they don't need more than
32 bits for an attribute.
suggested and reviewed by miod@
|
|
|
|
|
|
|
|
| |
Suggested by John Carmack. miod agrees a rename would make sense and
explained it was initially thought drivers may need to allocate storage
but in practice they don't need more than 32 bits for an attribute.
ok mpi@
|
|
|
|
|
|
| |
for example, with locking assertions.
OK mpi@, anton@
|
| |
|
|
|
|
|
|
| |
adding more filter properties without cluttering the struct.
OK mpi@, anton@
|
|
|
|
|
| |
Test & ok visa@. Sadly his Lemote doesn't come back from sleep, with or
without this change.
|
|
|
|
|
|
| |
make the structs const so that the data are put in .rodata.
OK mpi@, deraadt@, anton@, bluhm@
|
|
|
|
|
|
|
|
|
| |
it assumes that it always followed an interrupt string, but we don't
print that on fdt. having the bus responsible for the whitespace
means the fdt glue can print a colon to separate the bus info from
checkrev output, while every other glue keeps the comma.
ok deraadt@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
or reordering accesses to the variable. Assume that the assembler
preserves the correct sequence of instructions, which allows the
removal of the explicit noreorder/reorder toggles from the C code.
With ci_ipl being volatile, drop mips_sync() calls that follow
the accesses of the variable. The sync is redundant as a compiler
barrier. In addition, the MIPS64 CPU designs should not need the
sync for pipeline or write buffer control. According to miod@,
the use of the instruction is a carryover from code targeting
early MIPS designs that lack tight integration with the cache
and write buffer.
Discussed with and testing help from miod@.
Tested on CN5020, CN6120, CN7130, CN7360, Loongson 2F and 3A1000,
R4400, R8000, R10000 and R16000.
|
|
|
|
| |
Testing help from fcambus@
|
|
|
|
|
|
| |
in bonito(4). Use the hook for setting up the PIC.
Discussed with miod@ long ago
|
| |
|
|
|
|
|
|
|
| |
Using a name with the 'db_' prefix makes it invisible from the dynamic
profiler.
ok deraadt@, kettenis@, visa@
|
|
|
|
|
| |
unwinds that. Upon hibernate fail, this was a collection of double-frees..
ok claudio mlarkin
|
|
|
|
|
| |
A similar workaround was added in r1.8 of cn30xxuart.c because
of the same root cause.
|
| |
|
|
|
|
|
|
| |
for secondary CPUs.
Discussed with miod@
|
|
|
|
|
|
| |
depth when attaching.
OK visa@, deraadt@
|
|
|
|
| |
OK visa@, kettenis@, deraadt@
|
|
|
|
|
|
| |
Use the same values hardcoded in sys/dev/acpi/acpi.c where possible.
OK visa@
|
|
|
|
|
|
| |
and put the pieces together by platform glue.
Feedback from miod@
|
|
|
|
|
|
| |
Tested on a Lemote Yeeloong 8101B.
OK visa@, looks good to deraadt@
|
|
|
|
|
|
| |
outside bonito(4).
ok miod@
|
|
|
|
| |
Build testing assistance from deraadt@
|
|
|
|
|
|
|
| |
ported from sparc64. For now, it works without hardware acceleration,
but otherwise it is usable enough as a console and with X.
Diff from Miod's hoard
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
For coherency with other archs and in order to use it in MI code.
ok visa@, tobiasu@
|
|
|
|
|
|
|
|
|
| |
These files aren't USB-specific and were used by the previous
Bluetooth implementation, and will be used by the upcoming
HID-over-i2C implementation
ok deraadt
previous version ok kettenis and mpi
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
ok miod@
|
| |
|
| |
|
|
|
|
|
|
| |
their match functions with (g)aa_name not set.
ok miod@
|
|
|
|
|
| |
boot.
ok mlarkin
|
| |
|
| |
|
|
|
|
| |
now wsdisplay_suspend() will run on suspend
|
|
|
|
|
|
| |
Makes a loongson kernel buildable without -Wno-format.
ok miod@ jsg@
|
|
|
|
| |
ok mpi@, uebayasi@, dlg@
|
|
|
|
|
|
|
|
|
| |
This fixes both the Lemote reboot issue and the USB issue on the
Gdium's that miod@ spotted.
Suggested by kettenis@, thanks!
Okay miod@
|