From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB4CDC433F5 for ; Fri, 4 Feb 2022 09:31:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357554AbiBDJbx (ORCPT ); Fri, 4 Feb 2022 04:31:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358880AbiBDJbK (ORCPT ); Fri, 4 Feb 2022 04:31:10 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7804C0613BC; Fri, 4 Feb 2022 01:29:31 -0800 (PST) Date: Fri, 4 Feb 2022 10:29:28 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1643966970; 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: in-reply-to:in-reply-to:references:references; bh=/eecWjACA0rGMqqEQiDgokZRkG3UepJI5ulPZyG6uO0=; b=Kq3E210trmVV3cpVxMoJ0wqgmkAoAXew8RuSZaqcds1os6QjXpnmgz46wHdKI0PVoeoWZV S0i2vVf5tU2o0cky+cRkS34UDv2oxDo/kALrSY0PIvSbz0SfT2q1i0OuOKP2X/GtSi7YNC raKGH932Jo7zHOOEZuNzw1BjC07lIKJf2tWut7tH745ktB3dAvF65AyZjPH9WkQxw8nvZj oC40ZFV22BsIVWWo4yhtDaq1eiuKbpaCExsHNWl9OqyUKV3qGDVwwqdhaFBA1fO+ToGLCy hl+yYD+Rauk/817C+r5UA0EX6NwVqjr1kxa1b/a3wlH/ASxRRKLe5AlPfrm8FQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1643966970; 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: in-reply-to:in-reply-to:references:references; bh=/eecWjACA0rGMqqEQiDgokZRkG3UepJI5ulPZyG6uO0=; b=veSy3hJgJZREMiqCtupWodV6mbWqNkewKhr9cAPLZVdJcH2E4cDVZfPvx95cF/mzB5uDPC ezydNgc5y/tjroCw== From: Sebastian Andrzej Siewior To: Valentin Schneider Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rt-users@vger.kernel.org, Catalin Marinas , Will Deacon , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Steven Rostedt , Daniel Bristot de Oliveira , "Paul E. McKenney" , Frederic Weisbecker , Josh Triplett , Mathieu Desnoyers , Davidlohr Bueso , Lai Jiangshan , Joel Fernandes , Anshuman Khandual , Vincenzo Frascino , Steven Price , Ard Biesheuvel , Boqun Feng , Mike Galbraith Subject: Re: [PATCH v4] arm64: mm: Make arch_faults_on_old_pte() check for migratability Message-ID: References: <20220127192437.1192957-1-valentin.schneider@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220127192437.1192957-1-valentin.schneider@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-01-27 19:24:37 [+0000], Valentin Schneider wrote: > arch_faults_on_old_pte() relies on the calling context being > non-preemptible. CONFIG_PREEMPT_RT turns the PTE lock into a sleepable > spinlock, which doesn't disable preemption once acquired, triggering the > warning in arch_faults_on_old_pte(). > > It does however disable migration, ensuring the task remains on the same > CPU during the entirety of the critical section, making the read of > cpu_has_hw_af() safe and stable. > > Make arch_faults_on_old_pte() check cant_migrate() instead of preemptible(). > > Suggested-by: Sebastian Andrzej Siewior > Signed-off-by: Valentin Schneider > Link: https://lore.kernel.org/r/20210811201354.1976839-5-valentin.schneider@arm.com Let me pick that up so I can drop the other two. I hope the ARM64 folks follow my lead ;) Acked-by: Sebastian Andrzej Siewior Sebastian