Page MenuHomeFreeBSD

powerpc64: Avoid type promotion
ClosedPublic

Authored by breno.leitao_gmail.com on Jun 11 2018, 7:27 PM.
Tags
None
Referenced Files
F144398242: D15763.id43623.diff
Sun, Feb 8, 5:46 AM
F144374455: D15763.id43614.diff
Sun, Feb 8, 3:06 AM
F144332286: D15763.id43616.diff
Sat, Feb 7, 9:39 PM
F144300830: D15763.id43652.diff
Sat, Feb 7, 5:42 PM
Unknown Object (File)
Sat, Jan 31, 10:01 AM
Unknown Object (File)
Fri, Jan 23, 11:31 AM
Unknown Object (File)
Fri, Jan 9, 9:29 PM
Unknown Object (File)
Jan 8 2026, 8:32 AM
Subscribers

Details

Summary

There is a type promotion that transform count = -1 into a unsigned int causing
the default TCE SEG SIZE not being returned on a Boston POWER9 machine.
This machine does not have the 'ibm,supported-tce-sizes' entries, thus, count
is set to -1, and the function continue to execute instead of returning.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17199
Build 17049: arc lint + arc unit

Event Timeline

This can be simplified to just "if (count < (int)sizeof(cell_t))"

Adjusting to follow jhibbits' suggestion.

sys/powerpc/powernv/opal_pci.c
224

Looks good, except the semicolon at the end ;)

This revision is now accepted and ready to land.Jun 12 2018, 6:45 PM
This revision was automatically updated to reflect the committed changes.