Page MenuHomeFreeBSD

powerpc: better handling of shutdown flags
ClosedPublic

Authored by mhorne on Oct 23 2023, 8:32 PM.
Tags
None
Referenced Files
F137971700: D42339.id129697.diff
Thu, Nov 27, 7:21 PM
Unknown Object (File)
Thu, Nov 27, 11:09 AM
Unknown Object (File)
Wed, Nov 19, 10:59 AM
Unknown Object (File)
Wed, Nov 5, 4:21 AM
Unknown Object (File)
Sat, Nov 1, 1:35 AM
Unknown Object (File)
Fri, Oct 31, 2:17 AM
Unknown Object (File)
Wed, Oct 29, 8:56 PM
Unknown Object (File)
Oct 27 2025, 1:02 AM
Subscribers

Details

Summary

RB_HALT does not mean poweroff, RB_POWEROFF does.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/powerpc/powermac/cuda.c
751–757

This one doesn't match the others. The others handle poweroff, reset, and halt. You want something more like (there's a better way, of course):

if ((howto & RB_POWEROFF) != 0)
  cmd[1] = CMD_POWEROFF;
else if ((howto & RB_HALT) == 0)
  cmd[1] = CMD_RESET;

if (cmd[1] != 0) {
   cuda_poll....
   cuda_send....
}

while (1)
   cuda_poll...

For cuda, format the checks the same way.

This revision is now accepted and ready to land.Nov 3 2023, 8:05 PM
This revision was automatically updated to reflect the committed changes.