sdmmc: dmamap_load bounce buffer on demand
When using a bounce buffer, cmd->c_dmamap->dm_segs[0]->ds_len did not agree with cmd->c_datalen because the bounce buffer is loaded once at initialization, so cmd->c_dmamap->dm_segs[0]->ds_len never gets updated before executing a sdmmc command.
This is problematic when the dmamap is passed on to an API like fdt_dma that treats the dmamap as the source of truth.
This problem probably hasn't surfaced yet because it needs three preconditions:
- using bounce buffers is already an edge case for when we can't allocate block size aligned dma memory
- the driver needs CAPS_DMA, but not CAPS_MULTI_SEG_DMA
- the driver needs to use cmd->c_dmamap->dm_segs[0]->ds_len and not cmd->c_datalen
The fix is to bus_dmamap_load the bounce buffer just when we need it. This allows us to load it with the correct size.
evbarm/ti_edma: enable on am18xx SoCs
The linux dt-bindings allow two different ways to specify power/clock domains for the edma3. This commit adds support for the way used on the am18xx (powerdomains).
igc: Fix KASSERT failure when `ifconfig igc%d down`
When we invoke callout_halt(9) for rxr->rx_refill, both in
igc_stop_locked() and igc_free_receive_buffers(), we don't hold
rxr->rxr_lock.
Also, `drvctl -d igc%d` does not trigger KASSERT failure now.
Make is possible to de-select depended options (which are processed in
a separate pass). Example:
<files.foo>
defflag SOME_OPTION: SOME_OTHER_OPTION
<MYFOO>
options SOME_OPTION
no options SOME_OTHER_OPTION
Prior to this change, a warning that SOME_OTHER_OPTION was not selected
would be issued and SOME_OTHER_OPTION would remain selected in the output.
After this change, no warning is issued and SOME_OTHER_OPTION is not
selected in the output as expected.
This does not have broad utility, but can quite useful in certain situations.
s/mipsNN_cp0_cause_read/mips_cp0_cause_read/ in INGENIC_INTR_DEBUG guarded code.
It is disabled though, thus moving #ifdef 0 higher to make option build.
(otherwise buffer is unused and compiler complains)
Not sure why the code was disabled, potentially it was too verbose.
Replace MFC0 macro with CP0 accessor functions in debug code.
Include ingenic_var.h in ingenic/mainbus.c when INGENIC_DEBUG is enabled and
move "opt_ingenic.h" higher so this option is visible for the include.
MFC0 macro was removed in ingenic_regs.h v1.25, but debug code was not adopted.
Fixes INGENIC_DEBUG enabled build for the evbmips CI20 kernel config.
Rename the "basic 4BSD" disklabel routines readdisklabel_4bsd()
and writedisklabel_4bsd(), but add weak aliases to the standard
names. This easily allows machine-specific code to look for an
odd-ball machine-firmware-specific format that might be required
only for booting but otherwise use garden-variety BSD disklabels.
nvmm(4): Fix race in clearing vcpu->comm->stop bit.
Don't touch vcpu after nvmm_vcpu_put when we no longer hold the lock,
and certainly not after nvmm_machine_put when the vcpu could even be
freed.
PR kern/60544: nvmm_vcpu_run: use after mutex release
nvmm(4) vmx: Don't read VMCS_EXIT_REASON if vmlaunch/vmresume failed.
It is not valid in that case; we might end up operating on the
_previous_ successful vmlaunch/vmresume's now-stale exit reason.
kern/60545: nvmm_x86_vmx: stale exit reason on launch/resume failure
proc_regio: Clarify control flow and sprinkle comments.
Use `if (error) goto out' instead of `if (error == 0) error = ...' to
make the error case non-linear and indented, and the success case a
straight line of logic.
No functional change intended.
PR port-amd64/60556: panic in process_read_fpregs_xmm
ptrace/procfs: Take lwp lock around process_read/write_(fp)regs(32).
And verify that the lwp is in LSSTOP state before trying to read.
Otherwise, we might catch an lwp while it's still running on the CPU,
with all FPU state active, making the result unstable and tripping
assertions on some architectures.
PR port-amd64/60556: panic in process_read_fpregs_xmm
grep(1): Nix xfail on new test for PR 60552 screw case.
I was planning to do this in the same commit that fixes it, to keep
the history of bugs and fixes tidy, but gutteridge@ beat me to
committing the fix.
PR bin/60552: /usr/bin/grep failure under AMD64