Page MenuHomeFreeBSD

Implement on_each_cpu()
ClosedPublic

Authored by markj on Apr 30 2017, 6:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 5, 9:22 PM
Unknown Object (File)
Fri, Nov 28, 7:03 PM
Unknown Object (File)
Fri, Nov 28, 11:12 AM
Unknown Object (File)
Fri, Nov 28, 4:46 AM
Unknown Object (File)
Thu, Nov 27, 7:57 PM
Unknown Object (File)
Thu, Nov 27, 12:31 PM
Unknown Object (File)
Fri, Nov 21, 4:27 AM
Unknown Object (File)
Nov 11 2025, 8:31 AM
Subscribers

Details

Summary

This is for DRM. We only implement the blocking form (wait == 1),
since that's all our smp_rendezvous implements. But that's what almost
all callers in Linux use anyway.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8997
Build 9394: arc lint + arc unit

Event Timeline

markj retitled this revision from Implement on_each_cpu(). to Implement on_each_cpu().Apr 30 2017, 6:52 PM
markj edited the summary of this revision. (Show Details)
markj added a reviewer: hselasky.
sys/compat/linuxkpi/common/src/linux_compat.c
1640

A stylistic question - this follows Linux APIs in calls from this function; is that preferable to having the Linux API only at the interface, and using FreeBSD routines internally (i.e. here calling smp_rendezvous instead?)

For this case it makes little difference of course, but I'm curious about the two approaches in general.

sys/compat/linuxkpi/common/src/linux_compat.c
1640

Oops - I had actually meant to use the internal interface there. I do think it's preferable to avoid using the external interfaces, but in some cases (e.g., spin_lock()) that's not very practical right now.

sys/compat/linuxkpi/common/include/asm/smp.h
35

Please use a function macro here. wbinvd_on_all_cpus()

sys/compat/linuxkpi/common/include/linux/smp.h
34

I think CTASSERT() is preferred??

sys/compat/linuxkpi/common/include/linux/smp.h
34

_Static_assert is C11, and when a C11 or better compiler is required for all architectures I'd say we should prefer it. Until then I supposed CTASSERT is preferred.

(FWIW CTASSERT was first introduced in rS89040)

This revision is now accepted and ready to land.Apr 30 2017, 8:48 PM
This revision was automatically updated to reflect the committed changes.