Skip to content

Commit

Permalink
Remove unused __power_11 macro and address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Shipton <[email protected]>
  • Loading branch information
pshipton committed Dec 3, 2024
1 parent 10184b2 commit a8b2be4
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions runtime/port/unix/j9sysinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,17 +257,12 @@ static intptr_t getAIXPPCDescription(struct J9PortLibrary *portLibrary, J9Proces
#define __power_10() (_system_configuration.implementation == POWER_10)
#endif /* !defined(__power_10) */

#if !defined(__power_11)
#define POWER_11 0x80000 /* Power 11 class CPU */
#define __power_11() (_system_configuration.implementation == POWER_11)
#endif /* !defined(__power_11) */

/*
* Please update the macro below to stay in sync with the latest POWER processor known to OpenJ9,
* ensuring CPU recognition is more robust than in the past. As the macro currently stands, any
* later processors are recognized as at least POWER11.
*/
#define POWER11_OR_ABOVE (0xFFFFFFFF << 19)
#define POWER11_OR_ABOVE (0xFFFFFF00 << 11)
#define __power_latestKnownAndUp() J9_ARE_ANY_BITS_SET(_system_configuration.implementation, POWER11_OR_ABOVE)

#if defined(J9OS_I5_V6R1) /* vmx_version id only available since TL4 */
Expand Down Expand Up @@ -591,7 +586,7 @@ mapPPCProcessor(const char *processorName)
} else if (0 == strncasecmp(processorName, "power9", 6)) {
rc = PROCESSOR_PPC_P9;
} else if (0 == strncasecmp(processorName, "power10", 7)) {
rc = PROCESSOR_PPC_P10;
rc = PROCESSOR_PPC_P10;
} else if (0 == strncasecmp(processorName, "power11", 7)) {
rc = PROCESSOR_PPC_P11;
}
Expand Down Expand Up @@ -647,7 +642,7 @@ getAIXPPCDescription(struct J9PortLibrary *portLibrary, J9ProcessorDesc *desc)
desc->processor = PROCESSOR_PPC_P9;
} else if (__power_10()) {
desc->processor = PROCESSOR_PPC_P10;
} else if (__power_latestKnownAndUp()) {
} else if (__power_latestKnownAndUp()) {
desc->processor = PROCESSOR_PPC_P11;
} else {
desc->processor = PROCESSOR_PPC_UNKNOWN;
Expand Down

0 comments on commit a8b2be4

Please sign in to comment.