Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6470988pxb; Wed, 17 Feb 2021 05:35:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWaLWRjBshirnxMSaosAALsoShzsS4QI9CeDJPILG1AzxpH7TuVj495yPfHj0+LFmgdGqW X-Received: by 2002:a17:906:b055:: with SMTP id bj21mr25942288ejb.355.1613568901064; Wed, 17 Feb 2021 05:35:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613568901; cv=none; d=google.com; s=arc-20160816; b=wSwsueXkvwAp3Fg+Wpzucc1NG5u6+DS69R8acZVyQN2TIfQy5f4m0N/cmoKXaHQmhs wF6F0XSinKuReC8kmw6mjlpXsZbrPt2G7PQqEarp81rKTzX0sZuka3LGceRdmc3ZJq+1 q6giUZ6433gwDPDk7T2D7wi5+UuHMnWiZeUkh5pLBv7f9ENjA+fhODDmtQPTrsXnwgiE S9Ps6yPQwA+TY9Tf6sUiP8n66QLKdTxeXlJvcAXCoMVwcM5NMBh0n/jm1mTjHVv3Q+QR JUDxMT1ZECJmJfcYLB6hAMZPK3zLsD+8D1VJ7eVr02mxKYrELuBDa5EvSlYFKkGGupu6 JV3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=gE9WVdKS8Np5uJgazh8C/sfdqwqMVwU+lqHROJmW72M=; b=E6hegyci1eZyIycyDBlgBP1IE/XKijfh20RFZsKyoDdDMge4jPTIbXLn8gA+tBlhS5 pirjHnV5DO6pyiz5w5wWNm1KLTjHkXJpg1KjBSXc3Bnq1QAXXeLMeOtE6mp9jKK8H2o5 /WF7GvQEJpN4tSDeOQZVsVJrHS8qFVnRRVZnt5R4TQODncLXkmo3Gw/PNaYz/eB+tGhY xxoGbSQuIOMBcKvaEX5o7twBiKGmrj8Qz0oIt20adr86adQkadVwVFCkcTFrzcaGEker 1FO5juDOsLCSF/D1sElTlA++pjTeM9BO2KdR3Dvlfg1Vozw5HnyIFG6gjj4//6lQGAlM sOkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cZnjjlUv; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d11si1343955edz.34.2021.02.17.05.34.37; Wed, 17 Feb 2021 05:35:01 -0800 (PST) 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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cZnjjlUv; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232791AbhBQNTS (ORCPT + 99 others); Wed, 17 Feb 2021 08:19:18 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:45132 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231703AbhBQNSO (ORCPT ); Wed, 17 Feb 2021 08:18:14 -0500 Date: Wed, 17 Feb 2021 13:17:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1613567851; h=from:from:sender:sender:reply-to: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=gE9WVdKS8Np5uJgazh8C/sfdqwqMVwU+lqHROJmW72M=; b=cZnjjlUvZtzC32k5MY+hpK+vn6TyfQ0TIWGkfvjQFRkuD0JWfmYuhHfz2f3AK4at4pMlZS HdU56vyJ8VHYNZjDaR6mWqEnuPgv43HMMR1GRxJdf8+WvQuhStmF6Z2uxFvHjaXiwrekMq aJh1NUFp2UhLHivsFrquN3VLPDvQv/31KUXjF5DQMEz6W9jyVDuVfyKVqpJeCSsLueTckI imF/jwLXAKv1sUtiWU3Rb55JHpjEQ9d8dmr4SNeutalC5/2mkK27qkvvHTud6g4hrBosME 43lskEo+ygLwTVNy+6ox6vkGoumdwo7D896/qxqCWDjgOT97rj/dvPgGYLkNrg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1613567851; h=from:from:sender:sender:reply-to: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=gE9WVdKS8Np5uJgazh8C/sfdqwqMVwU+lqHROJmW72M=; b=fNrmRX2UqbW/C1l8tQuiawVr3F10T/vdbjL+MjlFskAvxCwwKOFary9v/ELBeTiZlBNLe2 SxmpUmzb7OHOM9Dw== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched,x86: Allow !PREEMPT_DYNAMIC Cc: Mike Galbraith , "Peter Zijlstra (Intel)" , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: MIME-Version: 1.0 Message-ID: <161356785045.20312.7404465373129724665.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: c5e6fc08feb2b88dc5dac2f3c817e1c2a4cafda4 Gitweb: https://git.kernel.org/tip/c5e6fc08feb2b88dc5dac2f3c817e1c2a4cafda4 Author: Peter Zijlstra AuthorDate: Tue, 09 Feb 2021 22:02:33 +01:00 Committer: Ingo Molnar CommitterDate: Wed, 17 Feb 2021 14:12:43 +01:00 sched,x86: Allow !PREEMPT_DYNAMIC Allow building x86 with PREEMPT_DYNAMIC=n, this is needed for PREEMPT_RT as it makes no sense to not have full preemption on PREEMPT_RT. Fixes: 8c98e8cf723c ("preempt/dynamic: Provide preempt_schedule[_notrace]() static calls") Reported-by: Mike Galbraith Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Mike Galbraith Link: https://lkml.kernel.org/r/YCK1+JyFNxQnWeXK@hirez.programming.kicks-ass.net --- arch/x86/include/asm/preempt.h | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h index 0aa96f8..f8cb8af 100644 --- a/arch/x86/include/asm/preempt.h +++ b/arch/x86/include/asm/preempt.h @@ -110,6 +110,13 @@ extern asmlinkage void preempt_schedule_thunk(void); #define __preempt_schedule_func preempt_schedule_thunk +extern asmlinkage void preempt_schedule_notrace(void); +extern asmlinkage void preempt_schedule_notrace_thunk(void); + +#define __preempt_schedule_notrace_func preempt_schedule_notrace_thunk + +#ifdef CONFIG_PREEMPT_DYNAMIC + DECLARE_STATIC_CALL(preempt_schedule, __preempt_schedule_func); #define __preempt_schedule() \ @@ -118,11 +125,6 @@ do { \ asm volatile ("call " STATIC_CALL_TRAMP_STR(preempt_schedule) : ASM_CALL_CONSTRAINT); \ } while (0) -extern asmlinkage void preempt_schedule_notrace(void); -extern asmlinkage void preempt_schedule_notrace_thunk(void); - -#define __preempt_schedule_notrace_func preempt_schedule_notrace_thunk - DECLARE_STATIC_CALL(preempt_schedule_notrace, __preempt_schedule_notrace_func); #define __preempt_schedule_notrace() \ @@ -131,6 +133,16 @@ do { \ asm volatile ("call " STATIC_CALL_TRAMP_STR(preempt_schedule_notrace) : ASM_CALL_CONSTRAINT); \ } while (0) -#endif +#else /* PREEMPT_DYNAMIC */ + +#define __preempt_schedule() \ + asm volatile ("call preempt_schedule_thunk" : ASM_CALL_CONSTRAINT); + +#define __preempt_schedule_notrace() \ + asm volatile ("call preempt_schedule_notrace_thunk" : ASM_CALL_CONSTRAINT); + +#endif /* PREEMPT_DYNAMIC */ + +#endif /* PREEMPTION */ #endif /* __ASM_PREEMPT_H */