Page MenuHomeFreeBSD

Add support for an array of hwresets
ClosedPublic

Authored by andrew on Nov 11 2022, 9:28 AM.
Tags
None
Referenced Files
F137894186: D37357.id112918.diff
Wed, Nov 26, 11:31 PM
Unknown Object (File)
Tue, Nov 25, 8:10 AM
Unknown Object (File)
Sun, Nov 23, 1:37 AM
Unknown Object (File)
Wed, Nov 19, 2:49 AM
Unknown Object (File)
Sun, Nov 16, 11:36 AM
Unknown Object (File)
Tue, Nov 11, 2:38 AM
Unknown Object (File)
Oct 28 2025, 5:06 AM
Unknown Object (File)
Oct 28 2025, 5:05 AM
Subscribers

Details

Summary

In some drivers we need to assert and deassert a group of hardware
resets in any order. To support this add a new hwreset_array that
manages all hwresets defined for a device.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/dev/extres/hwreset/hwreset_array.c
121

Wouldn't ENOMEM would be better ?

sys/dev/extres/hwreset/hwreset_array.c
121

It should be removed. I thought mallocarray could return NULL on overflow, but it calls panic.

manu added inline comments.
sys/dev/extres/hwreset/hwreset_array.c
121

Ok, good for me then.

This revision is now accepted and ready to land.Nov 11 2022, 9:51 AM

Remove unneeded NULL check

This revision now requires review to proceed.Nov 11 2022, 9:51 AM
This revision is now accepted and ready to land.Nov 11 2022, 10:00 AM
bz added a subscriber: bz.
bz added inline comments.
sys/dev/extres/hwreset/hwreset_array.c
129

You don't need the { } and you could just for (; i >= 0; i--) probably?

mmel added a subscriber: mmel.

LGTM

This revision was automatically updated to reflect the committed changes.