Page MenuHomeFreeBSD

powerpc: better handling of shutdown flags
ClosedPublic

Authored by mhorne on Oct 23 2023, 8:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 20, 4:57 AM
Unknown Object (File)
Tue, May 7, 9:00 AM
Unknown Object (File)
Sat, Apr 27, 10:07 AM
Unknown Object (File)
Apr 17 2024, 2:07 AM
Unknown Object (File)
Mar 9 2024, 6:30 PM
Unknown Object (File)
Feb 27 2024, 2:55 AM
Unknown Object (File)
Feb 17 2024, 10:02 AM
Unknown Object (File)
Dec 31 2023, 2:40 PM
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.