From patchwork Thu Aug 22 07:13:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 13772823 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15FC3C3DA4A for ; Thu, 22 Aug 2024 07:14:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 684E66B02B0; Thu, 22 Aug 2024 03:14:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 60DCE6B02AF; Thu, 22 Aug 2024 03:14:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 438696B02B0; Thu, 22 Aug 2024 03:14:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 1C5DA6B02AE for ; Thu, 22 Aug 2024 03:14:06 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id CACAE1412F9 for ; Thu, 22 Aug 2024 07:14:05 +0000 (UTC) X-FDA: 82479017250.03.811005B Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by imf24.hostedemail.com (Postfix) with ESMTP id A675018001D for ; Thu, 22 Aug 2024 07:14:03 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=csgroup.eu; spf=pass (imf24.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724310784; a=rsa-sha256; cv=none; b=wHPFpmhTyIix+Vj9BKZKqloBtfsAxC7dOkVnmrAqwIgWb6hUOeUeCEOC4jGoc2aDnfyfdb 5AydpBiBe+4VDnSX3Qe8q9EfFBiyS7L52lg7G2BQ8YVwkJo+XqjKZOYyvTEAH7IpmWyRLB zFtH5rhCeI8JagO7qME1lALaomGLTwY= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=csgroup.eu; spf=pass (imf24.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724310784; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MwCQPr+DkzFiDHzjMK222UDVKoya0EMyZrgWc4ytvxg=; b=6wRJlwfU3HjrO7xU/fuJ8lB3uH4lfjo1jWxD6dlmeOfa1C0rTcEIzR2GgXUpH3DvdbpKDQ 7UXqZVFeP4YwLny3ZZDCaihqtpa6O/YxDQa8fdNIz3ETMAiYpquLTAASdbIl/e51b7lVDr Zj3eaQ7fv6i8b2VWuRpWLdZQfbHyRbU= Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4WqDvJ1ts2z9sSZ; Thu, 22 Aug 2024 09:13:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J19dfRjWyl6q; Thu, 22 Aug 2024 09:13:32 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4WqDvJ14jHz9sSH; Thu, 22 Aug 2024 09:13:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 13A3D8B77D; Thu, 22 Aug 2024 09:13:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id mXHlUX_aoLcN; Thu, 22 Aug 2024 09:13:31 +0200 (CEST) Received: from PO20335.idsi0.si.c-s.fr (PO16920.IDSI0.si.c-s.fr [192.168.232.181]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 02F3A8B77E; Thu, 22 Aug 2024 09:13:30 +0200 (CEST) From: Christophe Leroy To: Michael Ellerman , Nicholas Piggin , Christophe Leroy , Naveen N Rao , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , "Theodore Ts'o" , "Jason A. Donenfeld" , Arnd Bergmann , Andrew Morton , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Vincenzo Frascino , Shuah Khan Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v2 09/17] powerpc/vdso32: Add crtsavres Date: Thu, 22 Aug 2024 09:13:17 +0200 Message-ID: <3730201dbc5add4d3a87c0ce80dd1dddf938d13a.1724309198.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.44.0 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1724310794; l=2796; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=utdv6V/SvZxVA50hOk7t/lkGWDvSE1q/kJYchx6i5SU=; b=SZIg9brB+vtPlEI/uhJ6lsYxQKnhHvbMUlfNQ42Zutu1csaGNwZMYx5RZ2ib0CRRFeQMaLt+k d2yQvcpbkvsCMYHUVfLugVTmTgBTZPnr1GTiaE51BS2+woZrEdRxKII X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= X-Rspamd-Queue-Id: A675018001D X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: oun8557dmwqgu6zm6knmgppimeasnm18 X-HE-Tag: 1724310843-762208 X-HE-Meta: U2FsdGVkX19EdKAtHhE/mIyGanOGl0O3gG7T/3CTDPfGB9h0Ik+g4RN3Vgz7plPfvvSRBalyHn0Bow6JwlvoeDgalu4NtHQH1WCvhtTBnhbJvpOPO592FikcJhZsZo4ZabqnZyGZGiSmZ0TVecpr+QcTIwjipukXm9pLH5L7czoNgkFu8XP9X134tOF+pFDFDvyyEj8hkAVAEV8IPWFllGtFSZfE9kOnVzQRmEebhgYrC7sNYOcfGUrKc/LwSQ79VeGi17swL9y/XZ7eD4c0bCWNvxNaGvvTARxRucm9EhxG3ej8nBXz4Dkl5vDzkIT3eWJLZuAkNbUA6+Ivk/wda/XidKHDP/We/KTanvMQhvMDGnzitAdnWHcTwOmujBsqfBDIUoJQ3/zhVErsaa3hsrdBt4rj5H6c31+j3ZFazSpv5BzgyLhN4N1UjU38obug3qKvlv1oF3bJprErJDTNhQWpmGIwTJ4RBHlzzt510qazx4qdW8zt2kP3snNKWVeCugR5SR0j/NU8tHAppTWaTXAJTFRTodsZFQ8/EEe5bgtTqW2PoBHi6FUYGgJfDbmlQtJRkaq68slEX0Q8JIrtR1T8vcSNH5P2ek+eDzoh6fr7NqIHGq27Ukpb1UD54wkEq7m9FeUEDu7hcHpyMaMy02rx/2DE8S5eTbBUG0lvCY9u78qAzqlEPXlQvgy6Esm849j/drqmqUp6UhgVKqun4MJ4MT5iYueVVyvWDAHQUjHJTHLxE73KkdBjqG3Vi2IKWAzd1vMwRFvwnQFBuOLZ6XUNGzJKS1/SNGW8uGroo1QO10gpxAa6l5gIA5Kj213G5tF04v/d7pskCevZcBmnfVNx4K8Jkzz7ZFSV+tdpKjteopv6CiLUqqQcW0Kc2rU7d2p4PBYsrPHfwMK9XXmE0pYnS6QqeVGz3mWFNUEAwALcke9mFqPzvq3mjAB8Qq3V2epP2lMg1DDasUz6syD WaqDmfEi JMCmj2S6RKqVq/uZOX43cVheYmeSUuiOr9HS2Jbu6eXg3kKbAVf64b/2sgalJNXgnCOiYJssxAcHEJ8J8XjyxthMlpcfrqzO0GksX4EZILNF8hSXnMS04Bk0bE00IFCeCqSOx X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Commit 08c18b63d965 ("powerpc/vdso32: Add missing _restgpr_31_x to fix build failure") added _restgpr_31_x to the vdso for gettimeofday, but the work on getrandom shows that we will need more of those functions. Remove _restgpr_31_x and link in crtsavres.o so that we get all save/restore functions when optimising the kernel for size. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/vdso/Makefile | 5 ++++- arch/powerpc/kernel/vdso/gettimeofday.S | 13 ------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/kernel/vdso/Makefile b/arch/powerpc/kernel/vdso/Makefile index 1425b6edc66b..c07a425b8f78 100644 --- a/arch/powerpc/kernel/vdso/Makefile +++ b/arch/powerpc/kernel/vdso/Makefile @@ -43,6 +43,7 @@ else endif targets := $(obj-vdso32) vdso32.so.dbg vgettimeofday-32.o +targets += crtsavres-32.o obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) targets += $(obj-vdso64) vdso64.so.dbg vgettimeofday-64.o obj-vdso64 := $(addprefix $(obj)/, $(obj-vdso64)) @@ -68,7 +69,7 @@ targets += vdso64.lds CPPFLAGS_vdso64.lds += -P -C # link rule for the .so file, .lds has to be first -$(obj)/vdso32.so.dbg: $(obj)/vdso32.lds $(obj-vdso32) $(obj)/vgettimeofday-32.o FORCE +$(obj)/vdso32.so.dbg: $(obj)/vdso32.lds $(obj-vdso32) $(obj)/vgettimeofday-32.o $(obj)/crtsavres-32.o FORCE $(call if_changed,vdso32ld_and_check) $(obj)/vdso64.so.dbg: $(obj)/vdso64.lds $(obj-vdso64) $(obj)/vgettimeofday-64.o FORCE $(call if_changed,vdso64ld_and_check) @@ -76,6 +77,8 @@ $(obj)/vdso64.so.dbg: $(obj)/vdso64.lds $(obj-vdso64) $(obj)/vgettimeofday-64.o # assembly rules for the .S files $(obj-vdso32): %-32.o: %.S FORCE $(call if_changed_dep,vdso32as) +$(obj)/crtsavres-32.o: %-32.o: $(srctree)/arch/powerpc/lib/crtsavres.S FORCE + $(call if_changed_dep,vdso32as) $(obj)/vgettimeofday-32.o: %-32.o: %.c FORCE $(call if_changed_dep,vdso32cc) $(obj-vdso64): %-64.o: %.S FORCE diff --git a/arch/powerpc/kernel/vdso/gettimeofday.S b/arch/powerpc/kernel/vdso/gettimeofday.S index 48fc6658053a..67254ac9c8bb 100644 --- a/arch/powerpc/kernel/vdso/gettimeofday.S +++ b/arch/powerpc/kernel/vdso/gettimeofday.S @@ -118,16 +118,3 @@ V_FUNCTION_END(__kernel_clock_getres) V_FUNCTION_BEGIN(__kernel_time) cvdso_call __c_kernel_time call_time=1 V_FUNCTION_END(__kernel_time) - -/* Routines for restoring integer registers, called by the compiler. */ -/* Called with r11 pointing to the stack header word of the caller of the */ -/* function, just beyond the end of the integer restore area. */ -#ifndef __powerpc64__ -_GLOBAL(_restgpr_31_x) -_GLOBAL(_rest32gpr_31_x) - lwz r0,4(r11) - lwz r31,-4(r11) - mtlr r0 - mr r1,r11 - blr -#endif