[bazel] Use --incompatible_default_to_explicit_init_py (#204275)
After #203998, the `per-test-coverage-by-lit-cfg.py` test is failing in
Bazel. It seems to be due to automatic `__init__.py` generation.
With some extra logs:
```
# .---command stdout------------
# | -- Testing: 5 tests, 1 workers --
# | FAIL: per-test-coverage-by-lit-cfg :: name-collision/__init__.py (1 of 5)
# | ******************** TEST 'per-test-coverage-by-lit-cfg :: name-collision/__init__.py' FAILED ********************
...
# | # .---command stderr------------
# | # | error: no check strings found with prefix 'CHECK:'
# | # `-----------------------------
```
I am not sure exactly the best way to deal with this, but
`--incompatible_default_to_explicit_init_py` disables this behavior and
[2 lines not shown]
[LoongArch] Add DAG combine for widening shift-left
Add DAG combines to recognize vector widening left-shift idioms and
lower them to VSLLWIL instructions.
The following pattern is matched for both signed and unsigned variants:
```
SEXT/ZEXT(Low-Half-Lanes(vec)) << Imm
```
This covers the following instructions:
```
LSX: VSLLWIL.H.B, VSLLWIL.W.H, VSLLWIL.D.W
VSLLWIL.HU.BU, VSLLWIL.WU.HU, VSLLWIL.DU.WU
LASX: XVSLLWIL.H.B, XVSLLWIL.W.H, XVSLLWIL.D.W
XVSLLWIL.HU.BU, XVSLLWIL.WU.HU, XVSLLWIL.DU.WU
```
acpi: Constify acpi_stype_to_sstate() and some users
Reviewed by: obiwac
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57413
acpi: Move supported states arrays into the softc
This is done in preparation of having some machine-dependent code access
these arrays through the softc.
Before this change, these arrays were static. We chose to make them
part of the softc, instead of just exporting them ('acpi_quirks' remains
a known offender; some better way forward is to declare the whole ACPI
softc as static).
Some sysctl handlers now need to be passed the softc to access the
arrays, and some already needed to be passed a pointer to a field in the
softc. As sysctl handlers are provided with a single pointer (arg1) and
a single integer (arg2), and now that the softc has to be passed into
the pointer argument (arg1), point indirectly to the wanted softc's
field by passing its offset in the integer argument (arg2).
To preserve the statically sized array in the signature of
power_pm_register(), and consequently avoid constructing such a dummy
[11 lines not shown]
acpi: Fix panic when reading 'hw.acpi.suspend_state' knob on S1/S2
The 'hw.acpi.suspend_state' sysctl knob was re-introduced with a bug.
Its handler, acpi_suspend_state_sysctl(), expects the ACPI softc in
'arg1', but the knob was registered with NULL there. This causes
a panic (NULL dereference) when reading the knob if the suspend state
has been set to S1 or S2 or equivalently the suspend sleep type to
STANDBY.
Fix it by passing the ACPI softc as 'arg1' when registering the knob.
Reviewed by: obiwac
Fixes: 9e1e29bd5ec6 ("acpi: Add back `hw.acpi.suspend_state` sysctl")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57412
[clang][driver] Fix flang frontend resolution for symlinked clang driver (#204253)
When clang is built as a symlink to the llvm multicall binary, the
driver resolves the executable path to 'llvm', making D.Name 'llvm'
instead of 'clang'.
This broke the detection of 'clang --driver-mode=flang' in Flang.cpp,
causing the driver to try to run 'llvm -fc1' instead of looking up
'flang', after change in #200438 was landed.
Fix this by checking D.getPrependArg() in addition to D.Name to identify
if we are acting as clang. Also use D.IsFlangMode() for simpler and more
robust detection of the driver mode.
[LoongArch] Add DAG combine for horizontal widening add/sub (#201488)
Add a DAG combine to recognize horizontal widening add/subtract patterns
and lower them to the corresponding LSX/LASX instructions.
The following pattern is matched for both signed and unsigned variants:
```
ADD/SUB(SEXT/ZEXT(BUILD_VECTOR(extract_elt(vj, 1), extract_elt(vj, 3), ...)),
SEXT/ZEXT(BUILD_VECTOR(extract_elt(vk, 0), extract_elt(vk, 2), ...)))
```
This covers the following instructions:
```
LSX: VHADDW.H.B, VHADDW.W.H, VHADDW.D.W
VHADDW.HU.BU, VHADDW.WU.HU, VHADDW.DU.WU
VHSUBW.H.B, VHSUBW.W.H, VHSUBW.D.W
VHSUBW.HU.BU, VHSUBW.WU.HU, VHSUBW.DU.WU
[9 lines not shown]
nrelease: Add root_rw_mount="NO" to rc.conf to fix ISO boot
The ISO root filesystem is obviously readonly and cannot be remounted to
'rw'. Without setting 'root_rw_mount=NO', the ISO boot would abort
after failing to remount the root filesystem.
This is a follow-up fix to my previous commit
31b00396377857ebb62259aa944f9351fa62ea44.
Reported-by: Sergey Zigachev (servik)
nrelease: Simplify the adjustments to loader.conf for IMG boot
Use 'sed' similar to fstab adjustments instead of grep+echo to adjust
'boot/loader.conf' to the IMG boot.
rc.conf: Add and document the missing root_rw_mount=YES
The 'root_rw_mount' variable was missing, and it caused the rc.d/root
script to always ignore the 'mount -u -o rw /' command. Nevertheless,
the '/' root filesystem was still remounted to be 'rw' because the later
'mount -a' command, according to /etc/fstab.
With this 'root_rw_mount=YES' placed, the '/' entry should now be
optional in /etc/fstab because the '/' root filesystem can be correctly
remounted to be 'rw'.
Obtained-from: FreeBSD (commit 6e1b226)
Reported-by: robstinge (IRC)
nrelease: Adjust fstab and reuse it for IMG boot
The root '/' filesystem is mounted by the kernel, so it can be omitted
from 'etc/fstab'. This also makes the 'fstab' file be used by the IMG
boot, so just reuse it.
nrelease: Adjust fstab to remove '-C' option for /tmp tmpfs mount
For the /tmp mount, no need to copy the origin contents; also, there
shouldn't be any contents at this early boot stage.
fix edit mistake done when wrangling PLISTs to handle py3-packages that
were removed during the 7.9->-current cycle (specifically, go back to
py3-backports-zstd that accientally got changed to py2-backports-zstd)