Page MenuHomeFreeBSD

Add support for an array of hwresets
ClosedPublic

Authored by andrew on Nov 11 2022, 9:28 AM.
Tags
None
Referenced Files
F138027038: D37357.diff
Fri, Nov 28, 7:30 AM
F138012150: D37357.id114354.diff
Fri, Nov 28, 3:35 AM
Unknown Object (File)
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
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.