Page MenuHomeFreeBSD

mca: Allow for passing ECC error record to memory controller driver.
Needs ReviewPublic

Authored by stevek on May 3 2024, 1:22 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 11, 10:46 PM
Unknown Object (File)
Sat, Nov 30, 2:00 PM
Unknown Object (File)
Nov 20 2024, 7:49 AM
Unknown Object (File)
Oct 23 2024, 3:50 AM
Unknown Object (File)
Sep 26 2024, 5:29 AM
Unknown Object (File)
Sep 18 2024, 10:20 AM
Unknown Object (File)
Sep 8 2024, 4:42 AM
Unknown Object (File)
Sep 8 2024, 2:17 AM
Subscribers

Details

Reviewers
markj
mav
Summary

Added (de)registration functions for memory controller driver to be
notified when ECC errors occur. This allows for decoding of the
specific error by the driver.

Sponsored by: Juniper Networks, Inc.
Obtained from: Semihalf

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 57611
Build 54499: arc lint + arc unit

Event Timeline

stevek requested review of this revision.May 3 2024, 1:22 AM
sys/x86/x86/mca.c
448

mca_func check asks to be under the lock.

656

For "do some more work" we have too many conditions above when entering this function.

Updated based on review comments

I have no objections, if it is useful.

This revision is now accepted and ready to land.May 7 2024, 5:24 PM

Using atomics for fetching/modifying the decode function pointer

This revision now requires review to proceed.May 7 2024, 6:23 PM

I wonder if there is any real architecture where pointer load/store is non-atomic. For things that are going to be executed between once and never it feels like you are over-engineering it. :)

In D45072#1028956, @mav wrote:

I wonder if there is any real architecture where pointer load/store is non-atomic. For things that are going to be executed between once and never it feels like you are over-engineering it. :)

We had discussions about this in D39661, which I had not originally noticed that when I submitted this one it went to a new review.
I'm okay with removing the atomics, since it's usually going to be a one-and-done registration.

I don't see a reason to use atomics for the operations which happen under mca_lock. It is ok to assume that unqualified aligned pointer loads and stores are atomic; at least, we make this assumption pervasively in the kernel. It is nonetheless reasonable to use atomic_load_ptr() for the unlocked load in mca_log().

sys/x86/x86/mca.c
436

This should be atomic_store_ptr(), not atomic_set_ptr(). But see my other comment.