From patchwork Wed Jan 15 07:36:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 13939993 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CCD222F3A6; Wed, 15 Jan 2025 07:37:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736926627; cv=none; b=OVseD+TwmLDoBWRKhSiPa9bi1ye6m8N+nFXXen1P+Cck92KrEfnTOfV++++TcPiYP1FTQv1UrSRnCLpeT+mK+PIY8O3njx4BV43/P2p1kahPr4qkT1A2BgyXmOtnznWfuK9NQLZLjc8ZX06m4MGxiFKYa+QCgYiioWP/irGsXKU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736926627; c=relaxed/simple; bh=D9h+tiP6JEtTHxSESOuMYqrrbcn5T1XnU7EvIPm8XQc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UxVUz3yML1pUSxfwCWFlCGk7w9GchZDMRI30aaKEXHNT2KHfqQy3VGjxPhMnbtjOy3wSY4sqfdFr1wJc6WX6wUxW+9oEggvUbR106CzDCMqrW1ZjcfEp/h9k+aJ5eLok4fBWPBV4yrWwWGDd0R9FL9Tmn5lIN1aJONdpr6wUZr0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=N82z6qv3; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=N82z6qv3; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="N82z6qv3"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="N82z6qv3" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (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) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 98F692120C; Wed, 15 Jan 2025 07:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1736926617; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sTH09SYz9NCYnEC36lz1B8Y+6XSMOmWFsvL3TMrAlMg=; b=N82z6qv3dVAl4m10RlESBOF1LvESR2yUHjAxpo7DxMkHKrGs6LVVloBZ5eBKmGUQcX6g4h nfX5kv+V35La6KfJBItPVoSii8fQU/LLfsnTclP1/PO9NK/AND9l2IeCRcrqa+3ET655qJ t/2Ixk+0Nk+ZilAEace2f6k6ZnTHY1E= Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=N82z6qv3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1736926617; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sTH09SYz9NCYnEC36lz1B8Y+6XSMOmWFsvL3TMrAlMg=; b=N82z6qv3dVAl4m10RlESBOF1LvESR2yUHjAxpo7DxMkHKrGs6LVVloBZ5eBKmGUQcX6g4h nfX5kv+V35La6KfJBItPVoSii8fQU/LLfsnTclP1/PO9NK/AND9l2IeCRcrqa+3ET655qJ t/2Ixk+0Nk+ZilAEace2f6k6ZnTHY1E= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (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) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 4728313A8A; Wed, 15 Jan 2025 07:36:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id +NcbD5llh2crawAAD6G6ig (envelope-from ); Wed, 15 Jan 2025 07:36:57 +0000 From: Nikolay Borisov To: linux-edac@vger.kernel.org Cc: x86@kernel.org, linux-kernel@vger.kernel.org, bp@alien8.de, Nikolay Borisov Subject: [RESEND PATCH 1/3] x86/mce/inject: Remova call to mce_notify_irq() Date: Wed, 15 Jan 2025 09:36:38 +0200 Message-ID: <20250115073640.77099-2-nik.borisov@suse.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250115073640.77099-1-nik.borisov@suse.com> References: <20250114163722.34850-1-nik.borisov@suse.com> <20250115073640.77099-1-nik.borisov@suse.com> Precedence: bulk X-Mailing-List: linux-edac@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 98F692120C X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; MIME_TRACE(0.00)[0:+]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; TO_DN_SOME(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:25478, ipnet:::/0, country:RU]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.com:+]; RCPT_COUNT_FIVE(0.00)[5]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO The call is actually a noop because when the MCE is raised the early notifier is the only call site that correctly calls mce_notify_irq() because it also sets mce_need_notify. So let's just remove this call, which allows to unexport mce_notify_irq. Signed-off-by: Nikolay Borisov --- arch/x86/kernel/cpu/mce/core.c | 1 - arch/x86/kernel/cpu/mce/inject.c | 1 - 2 files changed, 2 deletions(-) -- 2.43.0 diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c index 0dc00c9894c7..23e5e7f7c554 100644 --- a/arch/x86/kernel/cpu/mce/core.c +++ b/arch/x86/kernel/cpu/mce/core.c @@ -1793,7 +1793,6 @@ bool mce_notify_irq(void) } return false; } -EXPORT_SYMBOL_GPL(mce_notify_irq); static void __mcheck_cpu_mce_banks_init(void) { diff --git a/arch/x86/kernel/cpu/mce/inject.c b/arch/x86/kernel/cpu/mce/inject.c index 313fe682db33..06e3cf7229ce 100644 --- a/arch/x86/kernel/cpu/mce/inject.c +++ b/arch/x86/kernel/cpu/mce/inject.c @@ -229,7 +229,6 @@ static int raise_local(void) } else if (m->status) { pr_info("Starting machine check poll CPU %d\n", cpu); raise_poll(m); - mce_notify_irq(); pr_info("Machine check poll done on CPU %d\n", cpu); } else m->finished = 0; From patchwork Wed Jan 15 07:36:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 13939994 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61EA622D4FE; Wed, 15 Jan 2025 07:37:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736926628; cv=none; b=Ci6VuDBKJxJ8p6CZ59NULTBh6tMSA6t3PXIeOG8jKVYImHu3zqmlYy9N0rRaWpR1COjY4QUWbADbXFxJ0cOeKFFXitWVevJBA+eivwvvhZDZhIPw7WdAg56+LPHO9a4ZqCe7Q1yYU7VUbrrGZsa4v2/VAdp2TTeYX6EsUCw+mCQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736926628; c=relaxed/simple; bh=bubQLImu65flm70/on3dCd1WlrM2MFBB+nax2hDQYEY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=czY8hmClYcBG1qAljthIqhbdlFz6AUXqMwVnBKwmpDZPYuIW8vM+Zyqkem6ggL8xafzUqlXoxLC66FgV5vVEh9U2xriiKMRRC2hzF85TQqrsBraUoli7/ilUFJ+WdXhWFCq+IyVSeFwnfMt48KIL7/mjXN9l3HMxW/++XpxD21U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=JKOj6eqP; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=VUF1kOTK; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="JKOj6eqP"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="VUF1kOTK" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (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) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E5A4F1F45B; Wed, 15 Jan 2025 07:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1736926618; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AmtiGEU5nfa2ZQGUM1wqI1t2aka/xCLqXqV6hlPOiB0=; b=JKOj6eqPV2eDiAvpRTf/hXyrTRNpvNRik/kHRrwNyrUany9AD/g9H4I4qpDHoB3yxArYnq bk4ySEqdhblwaPDvdCyxyrbuQmmFrHtpRBhunHRBMgx0EnO/rUvs90OM8wOQMgSN9RYlw1 s+PAiaSv9gXd0MHZcqVxUy0N2vxbOqc= Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=VUF1kOTK DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1736926617; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AmtiGEU5nfa2ZQGUM1wqI1t2aka/xCLqXqV6hlPOiB0=; b=VUF1kOTKylB70/RENyiKvGCKgWvECiElxT5kaNn5GD+bUUj+8NcPIS2qtKSftEryMZi+Zj i1v66EZLnpp/c962+c/psCFbCZkdLNYbkJkGUDKD8liBgg1G7snVL9CXX5NGxzwr0BP4Ep xURJ7N+iUGqtK55pgQm9nynUatu26Vo= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (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) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9D5E4139CB; Wed, 15 Jan 2025 07:36:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id mIIWJJllh2crawAAD6G6ig (envelope-from ); Wed, 15 Jan 2025 07:36:57 +0000 From: Nikolay Borisov To: linux-edac@vger.kernel.org Cc: x86@kernel.org, linux-kernel@vger.kernel.org, bp@alien8.de, Nikolay Borisov Subject: [RESEND PATCH 2/3] x86/mce: Make mce_notify_irq() static Date: Wed, 15 Jan 2025 09:36:39 +0200 Message-ID: <20250115073640.77099-3-nik.borisov@suse.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250115073640.77099-1-nik.borisov@suse.com> References: <20250114163722.34850-1-nik.borisov@suse.com> <20250115073640.77099-1-nik.borisov@suse.com> Precedence: bulk X-Mailing-List: linux-edac@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: E5A4F1F45B X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; MIME_TRACE(0.00)[0:+]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; TO_DN_SOME(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:25478, ipnet:::/0, country:RU]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.com:+]; RCPT_COUNT_FIVE(0.00)[5]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: It's no longer used outside of core.c so let's make it static. No functional changes. Signed-off-by: Nikolay Borisov --- arch/x86/include/asm/mce.h | 2 -- arch/x86/kernel/cpu/mce/core.c | 43 +++++++++++++++++----------------- 2 files changed, 22 insertions(+), 23 deletions(-) -- 2.43.0 diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index eb2db07ef39c..6c77c03139f7 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h @@ -296,8 +296,6 @@ enum mcp_flags { void machine_check_poll(enum mcp_flags flags, mce_banks_t *b); -bool mce_notify_irq(void); - DECLARE_PER_CPU(struct mce, injectm); /* Disable CMCI/polling for MCA bank claimed by firmware */ diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c index 23e5e7f7c554..89625ff79c3b 100644 --- a/arch/x86/kernel/cpu/mce/core.c +++ b/arch/x86/kernel/cpu/mce/core.c @@ -584,6 +584,28 @@ bool mce_is_correctable(struct mce *m) } EXPORT_SYMBOL_GPL(mce_is_correctable); +/* + * Notify the user(s) about new machine check events. + * Can be called from interrupt context, but not from machine check/NMI + * context. + */ +static int mce_notify_irq(void) +{ + /* Not more than two messages every minute */ + static DEFINE_RATELIMIT_STATE(ratelimit, 60*HZ, 2); + + if (test_and_clear_bit(0, &mce_need_notify)) { + mce_work_trigger(); + + if (__ratelimit(&ratelimit)) + pr_info(HW_ERR "Machine check events logged\n"); + + return 1; + } + + return 0; +} + static int mce_early_notifier(struct notifier_block *nb, unsigned long val, void *data) { @@ -1773,27 +1795,6 @@ static void mce_timer_delete_all(void) del_timer_sync(&per_cpu(mce_timer, cpu)); } -/* - * Notify the user(s) about new machine check events. - * Can be called from interrupt context, but not from machine check/NMI - * context. - */ -bool mce_notify_irq(void) -{ - /* Not more than two messages every minute */ - static DEFINE_RATELIMIT_STATE(ratelimit, 60*HZ, 2); - - if (test_and_clear_bit(0, &mce_need_notify)) { - mce_work_trigger(); - - if (__ratelimit(&ratelimit)) - pr_info(HW_ERR "Machine check events logged\n"); - - return true; - } - return false; -} - static void __mcheck_cpu_mce_banks_init(void) { struct mce_bank *mce_banks = this_cpu_ptr(mce_banks_array); From patchwork Wed Jan 15 07:36:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 13939992 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61F1122F166; Wed, 15 Jan 2025 07:37:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736926627; cv=none; b=BHDYsFRXkbjUGMMXvaLcYSr8MUTwPDwLzRlFekHWFebwXr2hhGOgagFijIJGJVuStfpgju7XUjNTQrH4kGmjdzLhtGpDVeuseGTAy3/V71Rb7oAvFWwbKiU6rmBlkxba0loi+JX6Zz0Sfh/+XHQHUX61c7pQ63Aw40vDoTx/e9w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736926627; c=relaxed/simple; bh=Ta7/wk8PG440NjsU9HbIWpLwKT0+QfOFmgb13BivgPw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H091Jl/Yk5v74ucelZtkZIDJ9YV/o7kDDiueynnDOAZZsWUV9K81OuW+Ehvsfuimt6cIfIOwDy3Gx8DpAfg1cuJT4dNi9pakRfBRA5lUbdRUmdWCgV57cmlcF2aOfYV6T6m39IRvAhGMgaBkVSKlU/c1pyl+6OhLBtkmte2ZWcY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=sLSZk/Ph; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=sLSZk/Ph; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="sLSZk/Ph"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="sLSZk/Ph" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (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) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 46EBE1F460; Wed, 15 Jan 2025 07:36:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1736926618; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xdZROEtM/+x4f3o7nUlSSNxFgZRPyRGQwqI+al79wGw=; b=sLSZk/Ph+bW1hN11VhI5yC75K4kttDvyFj40xvqjfuhzkMZAGo1IubuVx3wvgTsCmljZLV QTeKOPct/jRC2VJZkbU1uWIPGL8WGqL2n1tG4aEVd5sJWmUZL1SU6He5RUC9vhr3b06Int 2oi8ah4UyH3pKv/lZDgUgjC5v9ac3wU= Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b="sLSZk/Ph" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1736926618; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xdZROEtM/+x4f3o7nUlSSNxFgZRPyRGQwqI+al79wGw=; b=sLSZk/Ph+bW1hN11VhI5yC75K4kttDvyFj40xvqjfuhzkMZAGo1IubuVx3wvgTsCmljZLV QTeKOPct/jRC2VJZkbU1uWIPGL8WGqL2n1tG4aEVd5sJWmUZL1SU6He5RUC9vhr3b06Int 2oi8ah4UyH3pKv/lZDgUgjC5v9ac3wU= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (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) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id F311813A8A; Wed, 15 Jan 2025 07:36:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 2LgmOZllh2crawAAD6G6ig (envelope-from ); Wed, 15 Jan 2025 07:36:57 +0000 From: Nikolay Borisov To: linux-edac@vger.kernel.org Cc: x86@kernel.org, linux-kernel@vger.kernel.org, bp@alien8.de, Nikolay Borisov Subject: [RESEND PATCH 3/3] x86/mce: Make mce_notify_irq() depend on CONFIG_X86_MCELOG_LEGACY Date: Wed, 15 Jan 2025 09:36:40 +0200 Message-ID: <20250115073640.77099-4-nik.borisov@suse.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250115073640.77099-1-nik.borisov@suse.com> References: <20250114163722.34850-1-nik.borisov@suse.com> <20250115073640.77099-1-nik.borisov@suse.com> Precedence: bulk X-Mailing-List: linux-edac@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 46EBE1F460 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; MIME_TRACE(0.00)[0:+]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; TO_DN_SOME(0.00)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:25478, ipnet:::/0, country:RU]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.com:+]; RCPT_COUNT_FIVE(0.00)[5]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO mce_notify_irq() really depends on the legacy mcelog being enabled as otherwise mce_work_trigger() will never schedule the trigger work as mce_helper can't be set unless CONFIG_X86_MCELOG_LEGACY is defined. Signed-off-by: Nikolay Borisov --- arch/x86/kernel/cpu/mce/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.43.0 diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c index 89625ff79c3b..b21aa1494da0 100644 --- a/arch/x86/kernel/cpu/mce/core.c +++ b/arch/x86/kernel/cpu/mce/core.c @@ -591,6 +591,7 @@ EXPORT_SYMBOL_GPL(mce_is_correctable); */ static int mce_notify_irq(void) { +#ifdef CONFIG_X86_MCELOG_LEGACY /* Not more than two messages every minute */ static DEFINE_RATELIMIT_STATE(ratelimit, 60*HZ, 2); @@ -602,7 +603,7 @@ static int mce_notify_irq(void) return 1; } - +#endif return 0; }