From mboxrd@z Thu Jan 1 00:00:00 1970 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 349EF44A72C for ; Fri, 22 May 2026 14:37:31 +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=1779460653; cv=none; b=sHMagcPhEM/z1OHxSj7mASZXByhRxWF669jxVhXY3XOe2U7mVp3Ob08odfr6NfCI1TzLmBGWiIclyN1iwt+CSTj5k1z+FkWJBU2S/AI0OuNGTiTDS62DBHP45HYVsMRVAJ1RQC8sTD+MCwW0QoqzV2Zc95VCPFXPuI2dbMJOfdE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779460653; c=relaxed/simple; bh=Cs+vwvHYsYYv2afKXUCyysXA0KkxB1D88Vw0RtxeMhI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TdfhNzm3fSi4nAdpxk5BOa0yeeLTO1nwCzZdHyt5b8rjPSjxvTSK5YzOJZK4BJI40JKiq+PZhQTzp5gDDBvJFae9zVTalEmMnKVhg0rDmSiylXOEV7MYmSGszfTj38fDb1mUzwvlJNxNlkWbISZChzuzaJW2XwKQQIDS4qcXqG4= 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=KK2C2Kb+; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=45YY8aPf; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KK2C2Kb+"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="45YY8aPf" Date: Fri, 22 May 2026 16:37:29 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1779460650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Cs+vwvHYsYYv2afKXUCyysXA0KkxB1D88Vw0RtxeMhI=; b=KK2C2Kb+CmVoh6dbuJE8a1pGEAVavGJRmvbgSszo647Bzq+WMujVRPgjtEMggI5SmHR21r UJHm/XWqGd0Oy7TYsg3pXcdRC0vpengsW+S8IoxxbOwgAXILGXbMHoFnPw1+dkMbFm78PI KonObmtTfEf+A1UqJegSB4kuW0EsDcQ/k5hbqypJNFdvBFBG4qFv/Xioy2L3N5mBgjZeOU RqVbPmRmeGr2dk1CvN2g6r6daby0WFKb+081+w+VtcD3lh6vPdc1MLaluhifbiJmhqxO/u GWnNFZZfBFCXxEXfC/bGiJFU52Uz2GcNjpI709ACMspaG+XLXw/Ok890N2vXjQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1779460650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Cs+vwvHYsYYv2afKXUCyysXA0KkxB1D88Vw0RtxeMhI=; b=45YY8aPf99c6rQwnGArBeEtpryQbQV4VJMuAoQ9aHvlkQHPsbnNU/GTSpmxpms39SuAhGs HtLoynXhmt3ULeCA== From: Sebastian Andrzej Siewior To: Michael Byczkowski Cc: Rodolfo Giometti , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 3/3] pps: convert pps_kc_hardpps_lock to raw_spinlock for PREEMPT_RT Message-ID: <20260522143729.5nICtzAv@linutronix.de> References: <719A31CE-CA58-45C3-A013-1BFE81F724C5@by-online.de> <9A49DA13-F000-48C8-9856-12E6EACE0B0E@by-online.de> <4271939B-F5ED-4746-8C94-CD96F85285B3@by-online.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <4271939B-F5ED-4746-8C94-CD96F85285B3@by-online.de> On 2026-04-25 19:21:14 [+0200], Michael Byczkowski wrote: > Convert pps_kc_hardpps_lock from spinlock_t to raw_spinlock_t. This > lock is held in pps_kc_event() which calls hardpps(). hardpps() takes > tk_core.lock which is already a raw_spinlock =E2=80=94 nesting a sleeping= lock > (PREEMPT_RT spinlock_t) over a raw_spinlock is invalid. >=20 > The locked section only checks a pointer comparison and calls > hardpps(), both of which are non-sleeping. >=20 > On non-RT kernels, raw_spinlock_t compiles to identical code as > spinlock_t =E2=80=94 no behavioral change. This looks okay. You need to swap patch #2 and #3 - this needs to come first. The bracket placement is terrible in pps_kc_bind(). Maybe if you swap to guard() it becomes readable as a side effect. > Signed-off-by: Michael Byczkowski > Acked-by: Rodolfo Giometti > Tested-by: Michael Byczkowski > Tested-by: Calvin Owens Sebastian