Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp615801pxb; Tue, 14 Sep 2021 05:13:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDwOwkeOJHcGNiK5d7AJ065TkVBzK6oz8GocunbxJDPpr9qMye1dBsd9FE9xVkkqc1GmhD X-Received: by 2002:a02:630f:: with SMTP id j15mr14301631jac.62.1631621583903; Tue, 14 Sep 2021 05:13:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631621583; cv=none; d=google.com; s=arc-20160816; b=YSp55pqa5NlH54IIilVKJRbrf0o6o2Zk2/mBhCinkK6fy47wuasUZ7q4Veutdw/1+i 0vcpgVSvptG14By3XFJNfygS3qrsFNpoRrqDizbDH0Alo5p5c36J3K4Nv5Ql70pkrFiY JqbOcUFSG7rHt2U2ut5nQ5B0ZWElJ7i54ueoE7q6AWr7NVrO3C67BbMuFHxpwB2ZGp9A jK+VjuARkm9O04yb/DvvwCw5eItvmw9KBWixHUNNgR3VcVKA3C55Ce4ww/NjOR4qObNb dxO9ddOHtHG0eI0a8C7CeNBKvWS9MMMdbC9e955Q5Fkxf0nRneuntmtdI5PVG0LMwUIe 4TYA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=S9JLF4BIVDFqqlnIkJ6CGHhV+qmvI9cdRCa03yJq2oY=; b=Y0PeZvXbYpcehYF6uBLFCH7O+6MvuaEaQtr4H5A/aa13oP0CYACUJkLDMFx2FEnbco IPOsm3BC4IOyAGBDPbgkEbjyNB54F76EsKudXC054bzP3r/Mv39gzQ2x9DBaHXT21y9g a5J6NTSguJx/dPEwPxIOh5w9KtXl04BE0e+BBGEA9K5cAoaAhBcmWphvfy+44bfuTcR2 S6Y2h3oZwKFeGviJ8eKXOsZWOWCXX9sjZevLJDh01CH96Zmn6tbJo5y78dRBI+H7f4ZY xBKhQUT/82Cf0KNbopff6D8JOfse+DCzKa93yTVSYHcoKF/b8OHhgBm3Xk7M10sqy9MZ fFOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eUi18+jG; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d3si11832959jak.6.2021.09.14.05.12.52; Tue, 14 Sep 2021 05:13:03 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eUi18+jG; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232489AbhINMMK (ORCPT + 99 others); Tue, 14 Sep 2021 08:12:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:41518 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232506AbhINMMJ (ORCPT ); Tue, 14 Sep 2021 08:12:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DF0126112E; Tue, 14 Sep 2021 12:10:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631621452; bh=ctJUbexNag4Ww69LjFDSR84qdpCMaKBOhiN3IwJaXws=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eUi18+jGcKYL2ZIvzB4Tdp9umFvvNxr8SxEbgK2vtVURDyopcc4j8SVgQHYRl+oSd jD1HDDdHCS0X2qFkxVSwjhCpW6s8Hp96/ONOJXprkzVEv8iiCPPpPOYqaeQC++qK+F gMuM2eHySUa6p6L2J2o9DQ8lStY2DIvZxyAiwjDg113m5y+NwLSEqaJgx8B5T++7Lg UVHXMyz3FmlndLNHzJ7jUxNrZyF0581QLC+4yGgW9GL8aZV0rNJVKBxnvp5vmlGZgc uCZQvfC/GHAQYEp5nHmE0lrfk4JBdK+S+UglEzmm10Apwya4T9Lm64gd4aM4NsUaOa Su6kXY2gKmo+A== From: Ard Biesheuvel To: linux-kernel@vger.kernel.org Cc: Ard Biesheuvel , Keith Packard , Russell King , Catalin Marinas , Will Deacon , Michael Ellerman , Benjamin Herrenschmidt , Christophe Leroy , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Peter Zijlstra , Kees Cook , Andy Lutomirski , Linus Torvalds , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org Subject: [RFC PATCH 1/8] arm64: add CPU field to struct thread_info Date: Tue, 14 Sep 2021 14:10:29 +0200 Message-Id: <20210914121036.3975026-2-ardb@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210914121036.3975026-1-ardb@kernel.org> References: <20210914121036.3975026-1-ardb@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The CPU field will be moved back into thread_info even when THREAD_INFO_IN_TASK is enabled, so add it back to arm64's definition of struct thread_info. Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/thread_info.h | 1 + arch/arm64/kernel/asm-offsets.c | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h index 6623c99f0984..c02bc8c183c3 100644 --- a/arch/arm64/include/asm/thread_info.h +++ b/arch/arm64/include/asm/thread_info.h @@ -42,6 +42,7 @@ struct thread_info { void *scs_base; void *scs_sp; #endif + u32 cpu; }; #define thread_saved_pc(tsk) \ diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c index 551427ae8cc5..cee9f3e9f906 100644 --- a/arch/arm64/kernel/asm-offsets.c +++ b/arch/arm64/kernel/asm-offsets.c @@ -29,6 +29,7 @@ int main(void) DEFINE(TSK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); DEFINE(TSK_CPU, offsetof(struct task_struct, cpu)); BLANK(); + DEFINE(TSK_TI_CPU, offsetof(struct task_struct, thread_info.cpu)); DEFINE(TSK_TI_FLAGS, offsetof(struct task_struct, thread_info.flags)); DEFINE(TSK_TI_PREEMPT, offsetof(struct task_struct, thread_info.preempt_count)); #ifdef CONFIG_ARM64_SW_TTBR0_PAN -- 2.30.2