Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp738235pxv; Thu, 22 Jul 2021 10:54:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjgmLMp7x7F1V2cDsT5sArC/S+aosvj0uZzSzOYGT5YanGsZFBPaA0djyJlYtpCI+/rajt X-Received: by 2002:a05:6602:58b:: with SMTP id v11mr693796iox.70.1626976456570; Thu, 22 Jul 2021 10:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626976456; cv=none; d=google.com; s=arc-20160816; b=zA66JO9EchZZiVRq4urhc6RP1PQGoEMGa5llw7AFfmG9jI24fzTN+xpfUU6b8UGvUt Nnha1oy+Ie31lzXaAa1yeVONo05zP+xTwEtHUT4V6ZI+L3M8Xy9Vb+dIvS2YI4/bouTN xqkd+r1ujE9nKKz/g0LfDcyr+fh4Epz1dWumlUib6Aoki7R7yJMjUNxp8z772/pPz7Q2 1tEiRgy31/uf93NOMg9056h1zulr4ymwwSivdXoPuvX1YE0gWvCyUIfTZruqWCucF6ew 0onIFMbNYdm1BPoVc6OB+5WGYjlZEa0D1lLsqK7ulGNO0RsXOZRKH+Ur3agmXCBG9Ty2 Xixg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=qCvfqMsbtjWW4CfCODiVvLzeq3ucBX0ctblBjTlmpzs=; b=cMvmrE10B/UuAQ5o349rb8dqE1qOL0GCAqZAYEyVqXa1qGS5n6Wo3Guc8bbOnFstXs SpsDLQXhK1yyRc8tSdNgvuQBmmZClyu9y+GImeVD0C1eTfZpkMkwGANbAw3CHSDc3bR7 zTD+tCe5M46k6nbsmIpFeMKs1LOonPjyXZJUOX6vbHcHmfWExqGKG4JmcaFg1LZERY+v kv9F/9Se0LZTzqgT14gAfjQJvvNRlBnsy3AHCctZZHzxWVCLqXCCHSwygudNr+1f0eCF sR85/vVXAqshQcL6nCN18GFGKEMilC9Cux8zNiup2L23ojR5jldG6+UhKYPlk0ILIRN8 YzSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m19si14312101jat.15.2021.07.22.10.54.03; Thu, 22 Jul 2021 10:54:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230035AbhGVRM2 (ORCPT + 99 others); Thu, 22 Jul 2021 13:12:28 -0400 Received: from foss.arm.com ([217.140.110.172]:57946 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229955AbhGVRM1 (ORCPT ); Thu, 22 Jul 2021 13:12:27 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 687D5106F; Thu, 22 Jul 2021 10:53:02 -0700 (PDT) Received: from e113632-lin.cambridge.arm.com (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 46A613F73D; Thu, 22 Jul 2021 10:53:00 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rt-users@vger.kernel.org, x86@kernel.org Cc: Catalin Marinas , Will Deacon , Thomas Gleixner , Steven Rostedt , Daniel Bristot de Oliveira , "Peter Zijlstra (Intel)" , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Mark Brown , Dave Martin , Ard Biesheuvel Subject: [PATCH 0/3] sched, x86, arm64: PREEMPT_RT, FPU and preemption Date: Thu, 22 Jul 2021 18:51:54 +0100 Message-Id: <20210722175157.1367122-1-valentin.schneider@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi folks, This stems from some more v5.13-rt1 breakage on arm64. This time per-CPU access safety isn't sufficient, we really need to keep preemption disabled. In a happy accident I stumbled on cba08c5dc6dc ("x86/fpu: Make kernel FPU protection RT friendly") so I packaged what was done there into some common helpers and plastered them over the problematic areas. Cheers, Valentin Valentin Schneider (3): sched/preempt: Introduce preempt_{enable, disable}_bh() x86/fpu: Make FPU protection reuse common helper arm64/fpsimd: Fix FPSIMD context handling vs PREEMPT_RT arch/arm64/kernel/fpsimd.c | 6 ++++-- arch/x86/include/asm/fpu/api.h | 19 ++----------------- include/linux/bottom_half.h | 26 ++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 19 deletions(-) -- 2.25.1