Page MenuHomeFreeBSD

Implement on_each_cpu()
ClosedPublic

Authored by markj on Apr 30 2017, 6:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 4, 8:38 AM
Unknown Object (File)
Mon, Jul 1, 5:52 PM
Unknown Object (File)
May 22 2024, 4:05 AM
Unknown Object (File)
May 21 2024, 7:10 PM
Unknown Object (File)
May 21 2024, 7:09 PM
Unknown Object (File)
May 21 2024, 1:02 PM
Unknown Object (File)
Feb 2 2024, 12:45 PM
Unknown Object (File)
Jan 12 2024, 10:02 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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #27869)

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 ↗(On Diff #27869)

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
34 ↗(On Diff #27869)

Please use a function macro here. wbinvd_on_all_cpus()

sys/compat/linuxkpi/common/include/linux/smp.h
33 ↗(On Diff #27869)

I think CTASSERT() is preferred??

sys/compat/linuxkpi/common/include/linux/smp.h
33 ↗(On Diff #27869)

_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.