HomeFreeBSD

arm64: Don't include td_inhibitors when checking td_ast in do_ast

Description

arm64: Don't include td_inhibitors when checking td_ast in do_ast

The td_ast member is an int so only 4 bytes, yet we were using an 8 byte
load and thus also got td_inhibitors in the upper bits. The code prior
to the commit that introduced td_ast did also do a bogus 8 byte load of
td_flags but masked the flags so arguably was correct, if dodgy. Now
that we're using the right width for the load we can also fold the
immediate offset back into the load; because td_ast is at an odd
multiple of 4 bytes from the start of struct thread the normal scaled
load couldn't be used with such an immediate offset when doing an 8 byte
load due to its limited immediate range, but we can use a scaled load
once more now that the offset is a multiple of the load width.

Reviewed by: andrew, kib
Fixes: c6d31b8306eb ("AST: rework")
Differential Revision: https://reviews.freebsd.org/D37751

Details

Provenance
jrtc27Authored on Dec 22 2022, 10:23 AM
Reviewer
rGc6d31b8306eb: AST: rework
Differential Revision
D37751: arm64: Don't include td_inhibitors when checking td_ast in do_ast
Parents
rGe2f3742ab8b1: gpioevents: fix some white-space errors
Branches
Unknown
Tags
Unknown