Page MenuHomeFreeBSD

powerpc: better handling of shutdown flags
ClosedPublic

Authored by mhorne on Oct 23 2023, 8:32 PM.
Tags
None
Referenced Files
F166148900: D42339.id129697.diff
Tue, Aug 11, 11:38 PM
F166145021: D42339.diff
Tue, Aug 11, 11:30 PM
Unknown Object (File)
Thu, Aug 6, 3:04 AM
Unknown Object (File)
Wed, Aug 5, 6:16 AM
Unknown Object (File)
Wed, Aug 5, 6:16 AM
Unknown Object (File)
Wed, Aug 5, 2:51 AM
Unknown Object (File)
Tue, Aug 4, 3:54 AM
Unknown Object (File)
Wed, Jul 29, 11:35 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.