Commit Graph

302000 Commits

Author SHA1 Message Date
riastradh 07b9e924e1 t_bitops: Show the bad results on failure. 2023-07-13 20:39:24 +00:00
rillig 78e3dd62e3 lint: in C23 mode, recognize the keyword 'thread_local' 2023-07-13 20:30:21 +00:00
mrg 98b184405d complete the previous - there were two calls to find_first_bit() to fix. 2023-07-13 20:22:29 +00:00
rillig fe2ba0d5e5 lint: _Thread_local is a storage class, not a type qualifier 2023-07-13 19:59:08 +00:00
riastradh de4f7393da arm/xscale: Use sys/bitops.h fls32 - 1 instead of 31 - __builtin_clz.
Sidesteps namespace collision with `#define bits ...' in net/zlib.c.
2023-07-13 19:42:24 +00:00
mrg a463ce6cdb explicitly include no longer implicitly included sys/mutex.h. 2023-07-13 18:43:34 +00:00
riastradh b8786be85f ia64: Need sys/types.h for u_int, vaddr_t; sys/mutex.h for kmutex_t. 2023-07-13 18:27:46 +00:00
riastradh 63db4ce4f3 marvell: Reconcile arm vs powerpc marvell_intr_establish.
If there's a better way to do this without #ifdef __powerpc__, please
have at it!
2023-07-13 16:51:33 +00:00
riastradh 93889e4a72 xen: Record event when local view of timecounter is behind global. 2023-07-13 13:34:15 +00:00
riastradh 589aa4ee58 kern: Print more detailed monotonic-clock-went-backwards messages.
Let's try harder to track this down.

XXX Should add dtrace probes.
2023-07-13 13:33:55 +00:00
riastradh a37b57a44d Break cycle by using `struct kmutex *' instead of `kmutex_t *'.
sys/sched.h included sys/mutex.h
which includes sys/intr.h
which includes machine/intr.h
which on cats includes arm/footbridge/footbridge_intr.h
which includes arm/cpu.h
which includes sys/cpu_data.h
which includes sys/sched.h

But there was never any real need for sys/mutex.h in sys/sched.h,
because it only uses pointers to the opaque struct kmutex.  Cycle
broken by using `struct kmutex *' instead of pulling in sys/mutex.h
for the definition of kmutex_t.

Side effect: This revealed that sys/cpu_data.h needed sys/intr.h
(which was pulled in accidentally by sys/mutex.h via sys/sched.h) for
SOFTINT_COUNT.  Also revealed some other machine/cpu.h header files
were missing includes of sys/mutex.h for kmutex_t.
2023-07-13 12:06:20 +00:00
msaitoh ef9eb41389 coretemp(4): Change limits of Tjmax.
- Change the lower limit from 70 to 60. At least, some BIOSes can change
   the value down to 62.
 - Change the upper limit from 110 to 120. At least, some BIOSes can change
   the value up to 115.
 - Print error message when rdmsr(TEMPERATURE_TARGET) failed.
 - When Tjmax exceeded the limit, print warning message and use the value
   as it is.
2023-07-13 09:12:23 +00:00
rillig f755d03356 lint: indent copyright lines consistently 2023-07-13 08:40:38 +00:00
rillig 41c561cb2f lint: clean up reading lint comments 2023-07-13 08:18:17 +00:00
mrg c9577f4881 re-fix hppa builds.
this file uses __cpu_simple_lock(), not just the underlying type,
so it does need machine/lock.h.
2023-07-13 07:46:43 +00:00
rillig 56ab8e4dc5 lint: reduce code size for handling lint comments 2023-07-13 07:19:24 +00:00
rillig 5a11074ff1 lint: clean up code related to lint comments
Remove type information from variable names, as the word 'flag' did not
indicate that the variables were negated.

Remove contradicting comments. Suppressing a warning for 'this line',
'this and the following line' and 'this statement or declaration' cannot
all be accurate at the same time.
2023-07-13 06:41:27 +00:00
rillig e2e148694e lint: reduce runtime relocations 2023-07-12 20:13:28 +00:00
rillig 4c5b7ccca2 lint: clean up handling of __real__ and __imag__
These two operatos are not binary, therefore they don't need a right
operand.  The questionable operands were a copy-and-paste mistake, as
the code was taken from the ++ and -- operands (tree.c 1.46 from
2008-04-25).  The ++ and -- operands aren't binary either, but since
lint represents address calculations in their premultiplied form, the
expression ptr++ contains a hidden right operand specifying the number
of bytes by which to increment the pointer.

Creating an integer-constant-expression node with type 'long double'
didn't make sense either.  Luckily, these expressions are only built but
not analyzed any further.
2023-07-12 19:34:01 +00:00
rillig bc10e9be9d lint: reject _Noreturn if it occurs in invalid places
C11 introduced _Noreturn as a function-specifier, not as a type
attribute.  The latter may occur in more places.
2023-07-12 18:26:04 +00:00
rillig 5e96f60f79 tests/lint: add test for _Noreturn from C11 2023-07-12 18:13:39 +00:00
gutteridge d824e196a4 CHANGES.prev: correct date entries for a few items 2023-07-12 16:07:52 +00:00
rillig 154c80952b lint: don't treat 'inline' as a storage class
The additional conflict in the grammar is in the same place as the other
conflicts, as T_SCLASS and T_FUNCTION_SPECIFIER are now separate tokens.

No functional change.
2023-07-12 16:07:35 +00:00
rillig 33d124e74f lint: indent grammar using tabs instead of spaces
Manually indenting the grammar rules using two spaces was too
cumbersome.
2023-07-12 13:00:09 +00:00
riastradh 8b1de3a2b9 ddb: Cast pointer to uintptr_t, then to db_expr_t.
Avoids warnings about conversion between pointer and integer of
different size on some architectures.
2023-07-12 12:50:46 +00:00
riastradh a884545629 machine/mutex.h: Sprinkle sys/types.h, omit machine/lock.h.
Turns out machine/lock.h is not needed for __cpu_simple_lock_t, which
always comes from sys/types.h.  And, really, sys/types.h (or at least
sys/stdint.h) is needed for uintN_t and uintptr_t.
2023-07-12 12:50:12 +00:00
rillig 3a1131e8fe lint: condense keyword table
This prepares for modelling 'inline' not as a storage class, but more
correctly as a function specifier.
2023-07-12 10:08:11 +00:00
mrg 84b8145c41 don't force gnu++98 here.
fixes build issues seen with GCC 10.5, as well as hopefully ones reported
by Andrew Cagney on current-users.
2023-07-12 07:35:15 +00:00
mrg d86bea6109 fix hppa and vax builds.
machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h.  avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.
2023-07-12 06:45:24 +00:00
mlelstv bcb8f4b0a3 Make inclusion of sys/intr.h explicit for spl*. 2023-07-12 05:16:42 +00:00
christos 20b12e119e Move the rnd_add_uint32 outside the lock and get rid of dk_done1() suggested
by riastradh@
2023-07-11 23:26:41 +00:00
rillig 3ab2584819 lint: rename grammar rules to align with C23 2023-07-11 21:13:36 +00:00
rillig 032c24b4d9 lint: update wording in diagnostic for C99 2023-07-11 20:54:23 +00:00
mrg 1b78493458 bump gcc 10 version. 2023-07-11 18:13:27 +00:00
riastradh 200177ce3f mac68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8). 2023-07-11 17:55:04 +00:00
riastradh c17be1e6bf hp300/intr.h: Put most of this under #ifdef _KERNEL.
Only ipl_cookie_t really needs to be exposed now, for crash(8).
2023-07-11 17:54:54 +00:00
rillig a5cf1c53b9 lint: in debug mode, don't generate empty message texts
Most of these messages have an /* unused */ comment in err.c, but some
don't.
2023-07-11 17:33:45 +00:00
martin e36df1e8e8 Replace kmutex_t * (which may be undefined here) with struct kmutex *,
suggested by Taylor.
2023-07-11 17:03:16 +00:00
martin a2f264d2db Belatedly add an entry for the openssl version switch - it may cause
subtle test failures after update builds (files with same installed
name created from different sources depending on openssl version).
2023-07-11 15:05:17 +00:00
martin 1da4bdf9dd Explicitly include <sys/mutex.h> for kmutex_t. 2023-07-11 14:57:21 +00:00
martin 50bc70f26c fix editor mishap in previous 2023-07-11 13:10:08 +00:00
martin dedfac2c7a Make ipl_cookie_t visible for _KMEMUSER userland applications. 2023-07-11 13:06:23 +00:00
riastradh 77eca60f10 x68k/intr.h: Put functions under _KERNEL so crash(8) can use this. 2023-07-11 11:50:39 +00:00
riastradh d6643ee5fc vax/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8). 2023-07-11 11:48:45 +00:00
riastradh ff1a985cf9 sun68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8). 2023-07-11 11:46:38 +00:00
riastradh 951cbbd667 sys/ksem.h: Hack around fstat(8) abuse of _KERNEL. 2023-07-11 11:37:29 +00:00
riastradh b5762f2f91 next68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8). 2023-07-11 11:13:32 +00:00
riastradh 593fe2f576 news68k/intr.h: Fix includes. Put some definitions under _KERNEL. 2023-07-11 11:09:13 +00:00
riastradh e64c5901b7 mvme68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8). 2023-07-11 11:07:54 +00:00
riastradh 6938cca6de luna68k/intr.h: Expose ipl_cookie_t to _KMEMUSER for crash(8). 2023-07-11 11:06:04 +00:00