From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BA8B158868 for ; Tue, 7 Jan 2025 09:41:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736242892; cv=none; b=I1zs2C03n4CwnQVELMzV5fmhiLZFvgawUvyY0fMPBZW4dtidvuLjal3mEvVqrsjg/ll2KLzxK4NDc8QuDaUBb2UpsYEVzE4KOS+3CAkrVIK/nNyJFwkAd/GHTKFfT6Ni3QDTcFgwFJMK0B8DJQ5BuSt9mj0fbMtnH2ue5UixjMg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736242892; c=relaxed/simple; bh=o8qaXomHoK2KOuHQOB4EhhQl+JD9qU2RahyDJ/SHeTU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=L9tJVCMR+kxbp/TLOGre6yGsSC+pJl6BJLQSwKkZZJSx/ZSYUhCOqEEyPSX0ZetefJ/+2IF0pljPXVUcIyc2YwPUBuqn6cble4aPonnUgqTP/lawd8AuncxdQgGfOcOceqTccBi+TndnjqUGS4z9/CPOvHY4oo2fsGCOvqQjZaU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=bTRONR91; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="bTRONR91" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-aaeec07b705so1750768766b.2 for ; Tue, 07 Jan 2025 01:41:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736242887; x=1736847687; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=3sy/qewi5QTr4eGa8bqumB+Ls2VPcx0iOCdO37ReQs8=; b=bTRONR91DpFbvTaY6MKRJcGbnlpotuV6deLSXabz3qNeaMboJ4ANd3+jbHJG/Mt5jw nTv8AbR4d3q6uT2L/T+uij+D0BtBjycg+iFtmZUcMOmv9n/1yqkoV+XvXlr9pBzH440g rFDLHyxAHmhtDZy+nPJua1ACy20uEhGztnHDt60+cU+CIvwJEYdwZPU25Zik4ZmErtPA BQcM+VfJPorY67ZyG4n4wAZTbZpsoJ/qVu3UbK7/rwb2m2SMzeK9+r//Wq2l//sA8x6W ROGvH2kMt52jGzHHF32tLDFIGQcsQ1VgFy6eBnQlIfY4biidv32CHE0UhqSnu2bgFWfb D+WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736242887; x=1736847687; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3sy/qewi5QTr4eGa8bqumB+Ls2VPcx0iOCdO37ReQs8=; b=LbC7VVAPa3c316S5RoIj1NAlJ6BxaAekoZlA4ofqAxsjZxY5zGE4cDHpLRm8EhF0Gd cPTaU+rrVpQ9u9K+bRfSXAiurZhKc7Pl5fcvv95qmKfi/chakyj+T8I38i/jC/2qRiuW gLquSYeqTYx/5GFO2zkwg2LIiF1X39KSvQOC+0R9n6VE8PJdwjDxR3Qc2tsxgs8yH4vV xrL+V/4jlXxZf+oKE2/qrylr1yxYGAtWISk4JJS1VVQxr2O6V/LrBl993h0jwyckI3LH TJUzRO+rDqmQ7yN00mjkZHcCP+oZEG58atMF517vEnVUjNHZLDcDaEQFsw+UQ+mG4zwA cJMg== X-Forwarded-Encrypted: i=1; AJvYcCX8imuGUB75I707XcO/iCB9Ylz4bAD0N/T9CTjoWZLljOQKjnR75Gp8bVAYhjagNJw6WPtWObVXgeT+BLI=@vger.kernel.org X-Gm-Message-State: AOJu0Yyab0+NIt2T0nbqqloevPzROhjn4z3EsvCdTorLoS+67QLPzh8Z 4q/auo0J8sBfXaiD+Jfl+RMW2FPNB9I9juP3SniHieIrnP92vkTm679zwVm6fco= X-Gm-Gg: ASbGncutDMlfUPhQj5dVAZTQn8QV1LB0zJv1vl+cny8vHiuXK1O3Hxo0WroAU/0Kixn uQvu7vm3Hmr4y7Otxcu2UMi6peaS+fHyKVuQC3Q4h1J1dzLfuZJ+RD5or9bKxAWyK1WJH4vIwsS zGxO5w2VCKvqIZ0cTTURrfn6IF97ysW0N21uiTRMKoTylYSJfaNEusPnN2O0VKzY6bgVZr16jVP gpRQpmgeO5IllM2UtYImEt63h791PATtCnu63lKO1l9/z9ERJXcI3O+FdSbQag/wQI= X-Google-Smtp-Source: AGHT+IHFAMDNG0ODw2AINJ6wybX6ZQoPMSvIxzZsPDK4VOdkYw3p0VNup/SMUF/w5GkNHETSOyyRrg== X-Received: by 2002:a17:907:94c2:b0:aa6:19c9:ad08 with SMTP id a640c23a62f3a-aac334f31e9mr5172979766b.48.1736242887317; Tue, 07 Jan 2025 01:41:27 -0800 (PST) Received: from [192.168.1.140] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0f012229sm2356901166b.133.2025.01.07.01.41.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2025 01:41:26 -0800 (PST) From: Linus Walleij Date: Tue, 07 Jan 2025 10:41:17 +0100 Subject: [PATCH RFC v3 01/30] ARM: Prepare includes for generic entry 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-Transfer-Encoding: 7bit Message-Id: <20250107-arm-generic-entry-v3-1-4e5f3c15db2d@linaro.org> References: <20250107-arm-generic-entry-v3-0-4e5f3c15db2d@linaro.org> In-Reply-To: <20250107-arm-generic-entry-v3-0-4e5f3c15db2d@linaro.org> To: Dmitry Vyukov , Oleg Nesterov , Russell King , Kees Cook , Andy Lutomirski , Will Drewry , Frederic Weisbecker , "Paul E. McKenney" , Jinjie Ruan , Arnd Bergmann , Ard Biesheuvel , Al Viro Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij X-Mailer: b4 0.14.2 The generic entry code needs a static inline function for regs_irq_disabled() so add this, in further requires the signature of on_thread_stack() to be __always_inline so add this as well. Signed-off-by: Linus Walleij --- arch/arm/include/asm/ptrace.h | 5 +++++ arch/arm/include/asm/stacktrace.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index 6eb311fb2da06fa393f8be7caec8d997637a88b2..a01c66f0ad907882af2a383e53de8aca68c551e5 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h @@ -52,6 +52,11 @@ struct svc_pt_regs { #define fast_interrupts_enabled(regs) \ (!((regs)->ARM_cpsr & PSR_F_BIT)) +static inline int regs_irqs_disabled(struct pt_regs *regs) +{ + return !interrupts_enabled(regs); +} + /* Are the current registers suitable for user mode? * (used to maintain security in signal handlers) */ diff --git a/arch/arm/include/asm/stacktrace.h b/arch/arm/include/asm/stacktrace.h index f80a85b091d6c4ff365e15ae7100af1c3aed597f..815b5f256af164daa053f3bfd6cb2f54042a8d2b 100644 --- a/arch/arm/include/asm/stacktrace.h +++ b/arch/arm/include/asm/stacktrace.h @@ -26,7 +26,7 @@ struct stackframe { #endif }; -static inline bool on_thread_stack(void) +static __always_inline bool on_thread_stack(void) { unsigned long delta = current_stack_pointer ^ (unsigned long)current->stack; -- 2.47.1