Page MenuHomeFreeBSD

Add support for an array of hwresets
ClosedPublic

Authored by andrew on Nov 11 2022, 9:28 AM.
Tags
None
Referenced Files
F85618208: D37357.diff
Sat, Jun 8, 9:49 AM
Unknown Object (File)
Mon, Jun 3, 8:28 AM
Unknown Object (File)
Mon, Jun 3, 12:15 AM
Unknown Object (File)
Thu, May 30, 11:49 PM
Unknown Object (File)
Tue, May 28, 10:00 AM
Unknown Object (File)
Fri, May 17, 5:20 AM
Unknown Object (File)
May 5 2024, 1:29 PM
Unknown Object (File)
Apr 22 2024, 10:17 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 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.