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, Feb 10, 1:30 PM
Unknown Object (File)
Sun, Feb 9, 10:32 AM
Unknown Object (File)
Sat, Feb 8, 7:07 PM
Unknown Object (File)
Sun, Jan 26, 6:06 PM
Unknown Object (File)
Fri, Jan 24, 5:50 PM
Unknown Object (File)
Fri, Jan 24, 5:44 PM
Unknown Object (File)
Dec 14 2024, 7:50 AM
Unknown Object (File)
Dec 3 2024, 7:49 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.