Received: by 2002:ab2:2997:0:b0:1ec:cbc4:63fb with SMTP id n23csp470005lqb; Thu, 29 Feb 2024 06:23:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUGobrLSfUYp+Iunl1tDK/jL3f7C7p/Nj9LjNWGqH5FsQLfevda5Ns0nxOYLReq1SqdkOVDv12KTnR8bOIUCbUDHDnsqFCj5B/ZBo/5FQ== X-Google-Smtp-Source: AGHT+IFc5Idb5oQOoWuIK+M33kaUEEZUL4MPM8EUPswpE4G3OM77NgxRQgVkNSd5mj7DwraRBUgc X-Received: by 2002:ac8:5c92:0:b0:42e:1911:93fc with SMTP id r18-20020ac85c92000000b0042e191193fcmr2577761qta.55.1709216633786; Thu, 29 Feb 2024 06:23:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709216633; cv=pass; d=google.com; s=arc-20160816; b=tI3sUN4AsPIDkmBilUF9/stjvYMNhyTC2C5xjJF8festzfkJ00wLqFKytlKA7hkP8p ilG0ejQkwjOLsYMkBG3hVhY42lSuDxVN8FLqSQouSzOUoGwtZfm/Qfj/OVZ6nn0h1RAc scZioI4JzUog5TYKfLiHQccmMZkeyaESG6qxuOH2bMz0Wa381mfSreiOsmDMneldj0F5 JCS6UhNewIMVdZGQLx10nKYvdEcQZF4DcTv9oGCJNJ7UYFeEPMtIBUalviul+Ef8+TMA SdhPVf6xzKaYs+tSzkh3Ihldfe1C9XWTfkMCk6hlV6VzBU4c9Rn/sT8TR6BLAcrAId9A HemQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:date:subject:cc :to:from:dkim-signature:dkim-signature:message-id; bh=YmE0uxXodHKBHzS272mmIFqP1XyyLlUoXMVZdCkWWBE=; fh=PG4pDnEpPgvD7rD3Usg/3IzySUyERYtwQcr+tbVLEzM=; b=tkG0AmlL0Vzifqb+jjg0Z1KhFcA8EWe4zzGNd/vqrFshJcDDP3DlzLNQNwfCeWZ+fd zhvudPSE6INlgdgzgHCYkkBUwBBUAH6An4lHkYVVXU4EkcqHma5/x9T8TAR1vW/hjB8r 5hjgHi5xyVR4a0wxHkZUZPMBbivEVhU+CawjtYSKCeXxIip21RvieSc4BUFK0T07VKMJ TH4r3z4mJg1lGQptTmxPUcUfvWfEpz1qv+gPU8Q40T5C1tYwI0R2G8hUL1PGxQ272B7z Z6T1OI+dpSYE2AUlnt9W4hJZRzuXSoBs6v8jmqGcZBCE5/xwtNa85Dhle8P5WwaWt+1Q qBeA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CdQgvwcL; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-86829-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86829-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g18-20020a05620a40d200b00787e07c2e13si1581685qko.264.2024.02.29.06.23.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 06:23:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86829-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=CdQgvwcL; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-86829-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86829-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 848631C21BCC for ; Thu, 29 Feb 2024 14:23:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 893121350F9; Thu, 29 Feb 2024 14:23:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="CdQgvwcL"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="AhQycSGj" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 408117D091 for ; Thu, 29 Feb 2024 14:23:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709216622; cv=none; b=PhUQKtJtcNHNSLI1Ph1kQ+evTEoXE0InDyupgZuCg8B+QhkWCFoazr+sl0aSQvz0xXEONV+lNoaEFRoxhiP14SL9dDUzYD+BB10EcssRtT8jjsRsnjLuaxizY8DtRwU+qAg3iAF6SQ9t/lwCceuAgU1EOAlEWcxPFAcrLYP6M4Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709216622; c=relaxed/simple; bh=9YxB+yDw77PtyqZXKGijQ4xOSfluWqcXRfMJfBlF3oU=; h=Message-ID:From:To:Cc:Subject:Date; b=ig4Pc6elt1lHqE4DNo3TB52KuZcDHxhm8OVKCIHhPxFugoFnto8c4Mzql5i+k9/OxCDGwTmI1aLyXqOgp6fw1PuHf5AToESbYxBbT6d+ikcWlu83MWW29eRV45iqjUfM9/EgfMe6S/JMXPQSCFVqoA6ab/BhUQvvM8uQrmA4ezY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=CdQgvwcL; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=AhQycSGj; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Message-ID: <20240229141407.283316443@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709216615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=YmE0uxXodHKBHzS272mmIFqP1XyyLlUoXMVZdCkWWBE=; b=CdQgvwcLvUOf7I7P/QJAFmhRhrN/GrnJiF6bo7TmW1AeQydDSRGeJh5ymd/3TwWNYOH0vC AklpITWn7D9I0Az/wqObRFWhh5MKWs8ryta4d177nZvJXGTcYhQSumWWGlWLyshffK8FVT Ki0VWGiC2EKS5KLD72SrFmOqkU4t1d5X8R/jDCc2RQogS9l0HfwppCJMMdqvlYNL42mZfD uyzlTakTyj2f7K/ZQEycf5tTjjJEstLe+vCCHfF3k+TpAxi0FlSn+KODH6lmzAlh9/A8wr MvznxtN0ww8EdtR+onlJmaSUmoPyd0xf3ZMu7Pbld4xR4Tt854Q/Ir7e5SD0Ww== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709216615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=YmE0uxXodHKBHzS272mmIFqP1XyyLlUoXMVZdCkWWBE=; b=AhQycSGjdyuPlwZFb6D7y/qhoQ4zGWkCLoR9a+yRfnza0GO4GRl9G/cqekLWEqKw3Hs4m+ FKLT92Ai5G1+84DA== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Steven Rostedt , "Paul E. McKenney" Subject: [patch 0/6] x86/idle: Cure RCU violations and cleanups Date: Thu, 29 Feb 2024 15:23:35 +0100 (CET) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Boris reported that a RCU related warning triggers in the tracer code on AMD machines which are affected by Erratum 400. On those CPUs the local APIC timer stops in the C1E halt state. This is handled by a special idle function which invokes tick_broadcast_enter()/exit() around HALT. These functions can end up in lockdep or tracing which use RCU protected data, but the core code already set RCU to idle which means that the RCU protection is not longer given. This series fixes this by handling the tick broadcast conditionally in the core idle function. While working on it I noticed a few bogosities in the related code and cleaned that up on top. The series is also available from git: git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/core Thanks, tglx --- arch/x86/Kconfig | 1 arch/x86/include/asm/processor.h | 2 arch/x86/kernel/cpu/common.c | 4 - arch/x86/kernel/process.c | 89 +++++++++++---------------------------- include/linux/cpu.h | 2 include/linux/tick.h | 3 + kernel/sched/idle.c | 21 +++++++++ kernel/time/Kconfig | 5 ++ 8 files changed, 62 insertions(+), 65 deletions(-)