From nobody Wed Sep 18 14:44:51 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X81dc1yQcz5WX6m; Wed, 18 Sep 2024 14:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X81dc1MjMz4Fq3; Wed, 18 Sep 2024 14:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726670692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OfXaCyTv2tQLx3by6H8DLb6IzgWHnrgjBaLvdKtq59E=; b=reURRRG4ZC97EBUGGCpt/OPtc5BzUT5MztAZ5OVFnFvD7ZmDbdY6I5a5VFQe1S6M+G7khs 5mTShEWjsBt4l7NvxM7Ja+aG1xjNJgqcwpzCHKS6oIw9a9z2TFoVzQ7pXmzAaKvCKfk4Pl DjfYrdt2KBDb0CVODVqmhgZtU4elAFP5Dc6WeC4ic/H4VHQBJj4jG4pD578ZuPKj+eATvK 680/Un1xctp/ysT6EiQAxEQSOBZw7KFPKxTr3cza0XMjO31ORQiQgtsFAvwsOJjkYoOj37 CzbOSphITfxbjBtjH+MeMEMZcpRwI2bGXsiQwxEFlfZk7PcvuSV4BhElfqKzFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726670692; a=rsa-sha256; cv=none; b=bdZEh78J5HMcEKan56tsZuOGCs5A1Mx6+Kvh1xpTmcmCb4nZ4ON6ux1GUp/e6xIEVEKzNT 79OQur3BTpjKgn50TQWu2d0i26Lb2jTanFpSAiAso+HaP+h1ojpmmQQB0+u9V46MGC9CCK MCw5PB2c0D8tBQlJmFcQR5m2n2rr6ueEgiu1nhqvF8+6SirLc1FkLckwKKIzTXoI3gg+TI EWGYe8WL/lsgvDqnusmZWclMnVEM1mnLIa0ocMfEm71nJQ94pCSZFaYUE6VL2djOyjOPgu gLamk/ak/zGMCiSuTouUrYVm6q2G58Sqm2+c4IdOVLlir/D9vEn82ZJOl9xCIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726670692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OfXaCyTv2tQLx3by6H8DLb6IzgWHnrgjBaLvdKtq59E=; b=rv5VcSUxKeN8VYcTaE1SYp6LpxJr0bA9ZKOtrqAxjJpvsiK/3n59RbYn7aWF5DL/uQhZw4 R6UxxqNLUpDe3tDiD8yUfeQ19xj6L2q+YMhd1fKKGjkCMJ/gKlRCXan37c8ZY8mGcYKXYx pTy7sGTMfOFffUL4elvhIaMaMHKDlmOXl2k0kBu9KPFnThRl2OyPSkckyFrywZK0/A3J34 I/3om4VInF99xsjL/S34g5UXZtkTpiC8VdgGC8J10Im6WrphSEuu9VmuEA8te8m5H4GCtE cPCZ3t5VSAJfs68iXI+/9L+QoTOrHKaAIm/NmCXfT3QDIME5cCpMLP58MmzXdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X81dc0rQFzQYr; Wed, 18 Sep 2024 14:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48IEipCr020115; Wed, 18 Sep 2024 14:44:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48IEiphJ020112; Wed, 18 Sep 2024 14:44:51 GMT (envelope-from git) Date: Wed, 18 Sep 2024 14:44:51 GMT Message-Id: <202409181444.48IEiphJ020112@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Stephen J. Kiernan" Subject: git: 77d7da1dc85a - main - Revert "mca: Allow for passing ECC error record to memory controller driver" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: stevek X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77d7da1dc85a8037ac385824bafcd06abcdcbcfa Auto-Submitted: auto-generated The branch main has been updated by stevek: URL: https://cgit.FreeBSD.org/src/commit/?id=77d7da1dc85a8037ac385824bafcd06abcdcbcfa commit 77d7da1dc85a8037ac385824bafcd06abcdcbcfa Author: Stephen J. Kiernan AuthorDate: 2024-09-18 14:44:37 +0000 Commit: Stephen J. Kiernan CommitDate: 2024-09-18 14:44:37 +0000 Revert "mca: Allow for passing ECC error record to memory controller driver" This reverts commit 996a832d2e01fceb5a3bbfd33df585bd778e6288. --- sys/x86/include/mca.h | 5 ----- sys/x86/x86/mca.c | 48 ------------------------------------------------ 2 files changed, 53 deletions(-) diff --git a/sys/x86/include/mca.h b/sys/x86/include/mca.h index d8b8da86523d..183480625f6d 100644 --- a/sys/x86/include/mca.h +++ b/sys/x86/include/mca.h @@ -46,11 +46,6 @@ struct mca_record { #ifdef _KERNEL -typedef void (*mca_decode_func)(void *, const struct mca_record *); - -int mca_register_decode_func(mca_decode_func func, void *aux); -int mca_deregister_decode_func(mca_decode_func func); - void cmc_intr(void); void mca_init(void); void mca_intr(void); diff --git a/sys/x86/x86/mca.c b/sys/x86/x86/mca.c index 89ab59639882..b293fcedbd84 100644 --- a/sys/x86/x86/mca.c +++ b/sys/x86/x86/mca.c @@ -99,8 +99,6 @@ static MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture"); static volatile int mca_count; /* Number of records stored. */ static int mca_banks; /* Number of per-CPU register banks. */ static int mca_maxcount = -1; /* Limit on records stored. (-1 = unlimited) */ -static mca_decode_func mca_func; -static void *mca_decode_arg; static SYSCTL_NODE(_hw, OID_AUTO, mca, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Machine Check Architecture"); @@ -423,50 +421,6 @@ mca_mute(const struct mca_record *rec) return (0); } -/* - * Pass mca_record to a memory controller driver so that it can decode - * the address and possibly do some more work. - */ -static void -mca_decode_record(const struct mca_record *rec) -{ - - if (mca_func != NULL) - mca_func(mca_decode_arg, rec); -} - -int -mca_register_decode_func(mca_decode_func func, void *aux) -{ - int error; - - if (func == NULL) - return (EINVAL); - - error = 0; - mtx_lock_spin(&mca_lock); - if (mca_func != NULL) - error = EEXIST; - - if (error == 0) { - mca_func = func; - mca_decode_arg = aux; - } - - mtx_unlock_spin(&mca_lock); - return (error); -} - -int -mca_deregister_decode_func(mca_decode_func func) -{ - if (func == NULL || func != mca_func) - return (EINVAL); - - mca_func = NULL; - return (0); -} - /* Dump details about a single machine check. */ static void mca_log(const struct mca_record *rec) @@ -659,8 +613,6 @@ mca_log(const struct mca_record *rec) } if (rec->mr_status & MC_STATUS_MISCV) printf("MCA: Misc 0x%llx\n", (long long)rec->mr_misc); - - mca_decode_record(rec); } static bool