Page MenuHomeFreeBSD

Add support for an array of hwresets
ClosedPublic

Authored by andrew on Nov 11 2022, 9:28 AM.
Tags
None
Referenced Files
F146513642: D37357.id112920.diff
Tue, Mar 3, 7:07 AM
F146451456: D37357.id.diff
Mon, Mar 2, 7:27 PM
Unknown Object (File)
Mon, Mar 2, 9:29 AM
Unknown Object (File)
Sun, Mar 1, 4:09 PM
Unknown Object (File)
Sun, Mar 1, 5:57 AM
Unknown Object (File)
Sat, Feb 28, 7:13 AM
Unknown Object (File)
Thu, Feb 26, 8:39 AM
Unknown Object (File)
Mon, Feb 23, 3:07 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 Passed
Unit
No Test Coverage
Build Status
Buildable 48296
Build 45182: arc lint + arc unit

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
128

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.