Page MenuHomeFreeBSD

Add support for an array of hwresets
ClosedPublic

Authored by andrew on Nov 11 2022, 9:28 AM.
Tags
None
Referenced Files
F146314199: D37357.id112918.diff
Sun, Mar 1, 4:09 PM
F146265529: D37357.id112920.diff
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
Unknown Object (File)
Sun, Feb 22, 9:59 PM
Unknown Object (File)
Sun, Feb 15, 8:24 PM
Unknown Object (File)
Thu, Feb 12, 1:35 PM
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 48294
Build 45180: arc lint + arc unit

Event Timeline

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

Wouldn't ENOMEM would be better ?

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

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
120

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.