Page MenuHomeFreeBSD

Add support for an array of hwresets
ClosedPublic

Authored by andrew on Nov 11 2022, 9:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 12 2024, 2:32 PM
Unknown Object (File)
Oct 8 2024, 5:40 PM
Unknown Object (File)
Oct 5 2024, 2:58 PM
Unknown Object (File)
Oct 2 2024, 4:04 PM
Unknown Object (File)
Oct 2 2024, 10:07 AM
Unknown Object (File)
Oct 1 2024, 12:33 AM
Unknown Object (File)
Oct 1 2024, 12:21 AM
Unknown Object (File)
Sep 30 2024, 12:13 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 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.