Skip to content

fix: Detection of HW caps and Num Cpus for FreeBSD(R) and OpenBSD(R)#1269

Open
Martinfx wants to merge 1 commit intoARM-software:mainfrom
Martinfx:max-freeebsd-fix-ncpu
Open

fix: Detection of HW caps and Num Cpus for FreeBSD(R) and OpenBSD(R)#1269
Martinfx wants to merge 1 commit intoARM-software:mainfrom
Martinfx:max-freeebsd-fix-ncpu

Conversation

@Martinfx
Copy link
Contributor

No description provided.

@gunes-arm
Copy link
Contributor

Hi @Martinfx , Can you sign-off your commit please. We forgot it in the last PR unfortunately.

@gunes-arm
Copy link
Contributor

@Martinfx I also suggest the following commit and pull request title:

fix: Detection of HW caps and Num Cpus for FreeBSD(R) and OpenBSD(R)

Signed-off-by: Martin Filla <freebsd@sysctl.cz>
@Martinfx Martinfx force-pushed the max-freeebsd-fix-ncpu branch from d90184d to 97df729 Compare March 16, 2026 13:02
@Martinfx Martinfx changed the title fix: detect hw.ncpu for FreeBSD fix: Detection of HW caps and Num Cpus for FreeBSD(R) and OpenBSD(R) Mar 16, 2026
@Martinfx
Copy link
Contributor Author

Martinfx commented Mar 16, 2026

Hi @Martinfx , Can you sign-off your commit please. We forgot it in the last PR unfortunately.

ok. no problem.

@gunes-arm
Copy link
Contributor

@Martinfx clang-format hook in the pre-commit failed. You'll need to run that pre-commit hook.

int ncpus = get_hw_capability("hw.ncpu");
CpuIsaInfo isainfo;
std::vector<CpuModel> cpus_model(ncpus);
isainfo.neon = get_hw_capability("hw.optional.neon");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work in FreeBSD? I know it doesn't work for OpenBSD.

#1223 (comment)
says you can use elf_aux_info to detect the HWCAPS.

Copy link
Contributor Author

@Martinfx Martinfx Mar 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will work for better implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants