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, Oct 21, 4:29 AM
Unknown Object (File)
Mon, Oct 21, 4:29 AM
Unknown Object (File)
Mon, Oct 21, 4:29 AM
Unknown Object (File)
Mon, Oct 21, 4:28 AM
Unknown Object (File)
Sun, Oct 20, 4:58 PM
Unknown Object (File)
Sun, Oct 20, 4:57 PM
Unknown Object (File)
Sun, Oct 20, 4:56 PM
Unknown Object (File)
Sun, Oct 20, 4:56 PM
Subscribers

Details

Summary

RB_HALT does not mean poweroff, RB_POWEROFF does.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 54140
Build 51030: arc lint + arc unit

Event Timeline

sys/powerpc/powermac/cuda.c
751

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.