From patchwork Mon Sep 2 19:17:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 13787670 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 BD017CD3420 for ; Mon, 2 Sep 2024 19:17:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 52A798D010A; Mon, 2 Sep 2024 15:17:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4B4928D00EF; Mon, 2 Sep 2024 15:17:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 32E748D010A; Mon, 2 Sep 2024 15:17:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 100188D00EF for ; Mon, 2 Sep 2024 15:17:45 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id A96F7120751 for ; Mon, 2 Sep 2024 19:17:44 +0000 (UTC) X-FDA: 82520757648.29.6D70516 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by imf18.hostedemail.com (Postfix) with ESMTP id 8139C1C0012 for ; Mon, 2 Sep 2024 19:17:42 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; spf=pass (imf18.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=pass (policy=quarantine) header.from=csgroup.eu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725304568; 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=TVE/Q3Fb/tuvNPUXJPFjrXQzwHDOwKh0tXsjGbL3/clbVYr73qICkw0y2FYZkYlmL7LjiM dH2onqbScnvHh/15MgfSVwNBEEyLiZ3v+0J3GpBY1VKa7dpwWo6W9WwM/VMaVJAZK7Mzo4 8Y+7Xo9NL5LeFGNhfTx6Tqa9iMIofbo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725304568; a=rsa-sha256; cv=none; b=tdyXt13F1nVW3wxzbnGd8Ly7Yj/h8JvDjBs/L/dt9R5Yxsql/hUS2V2cSVogHEYJbNv5JZ w7ojlbaDJ9n9TNKXBOUoBrV9qtpNLEBBUbFIczlGerW72HzBEOF19gmnf85Cqz9GSqDlRF Rw40yzIOWPV4tAy+rRkyArFvENgtDmA= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; spf=pass (imf18.hostedemail.com: domain of christophe.leroy@csgroup.eu designates 93.17.235.10 as permitted sender) smtp.mailfrom=christophe.leroy@csgroup.eu; dmarc=pass (policy=quarantine) header.from=csgroup.eu Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4WyJRc3m9Mz9sSL; Mon, 2 Sep 2024 21:17: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 WV1hwhARAFwi; Mon, 2 Sep 2024 21:17: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 4WyJRc2wThz9sS7; Mon, 2 Sep 2024 21:17:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 552768B773; Mon, 2 Sep 2024 21:17: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 HA515LPe95Te; Mon, 2 Sep 2024 21:17:32 +0200 (CEST) Received: from PO20335.idsi0.si.c-s.fr (unknown [192.168.234.167]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 5CC028B76E; Mon, 2 Sep 2024 21:17:31 +0200 (CEST) From: Christophe Leroy To: Andrew Morton , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Shuah Khan , "Jason A . Donenfeld" Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kselftest@vger.kernel.org, llvm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org, Adhemerval Zanella , Xi Ruoyao Subject: [PATCH v5 2/5] powerpc/vdso32: Add crtsavres Date: Mon, 2 Sep 2024 21:17:19 +0200 Message-ID: <5cf0574fed3e75028407f9e1f0b559af211b78a2.1725304404.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=1725304638; l=2796; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=utdv6V/SvZxVA50hOk7t/lkGWDvSE1q/kJYchx6i5SU=; b=QPu40YkIuiZNZY/gfuwhYtnydWYHKI2VDQ4sgoCCxnQL1ccyYRw1PUdGYSIy7wbcfGWFhYXM7 KDTsbkWYgWvDO1OTuJgivp2/+unzZytK5NfkyueftmWFRLwypcamIKn X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 8139C1C0012 X-Stat-Signature: ga4qpratgwohwm51wer9o6je3d13gueg X-HE-Tag: 1725304662-424260 X-HE-Meta: U2FsdGVkX1/muwDxm8MKaCCCKhBwY6Jyvx9B72Ou64E0L+touwM5GK9Kcmso8JoSvQbO66uI41EM7ATmAvqOR614aCJfnohlX9rGb7rNCvY81pXvunW7TCwdGgBehARKBAm22RZ6Fsqg7JYjWR+rEyvIj0fV8jvHixPYKMmSA70EIAQi7eGV/vLfFFCpFstQn//pLbW29NQEbJ3fQ5zJDQ42HgjDMtzKcqisUsei5nSDJ9St9sPhThhbm3YI+GaCYDiRxYZh4KrQdYa7kcAFH6iYRyx/YnU4Zug8dGgAiiOY/T7w2c49iUr7nm8BI7uxWnlRtb/SB2OmLbHSHXwqy2V64A/jSoYSWky63kQVAojZJzIA7QddET59gNCbjFYAkk5uVwaQVekZPtL6syw6VFlXqKMgnRBAW0GY3ER5ZkjTcvVycRM/1XlCSRMTgPGbn//wfyBZFZWXyEyYlUmQJ6ile4KngyucbA+MolYxUACcPcy3Axdlu4NGtG1HKPpCPqydKmDJ8V27SisIX/WEAmNa9H1Eqy1qPa4lREX/JQHCK/nqvLDv18IKNqS2z4DfESRuE5iVWv0rUQZV6qBcrH6kz3tXN6mtr2C9SCzSr4X8llq1WBC8CmprMHjtf1drHBcydlUS0vl40+8DrnGlfhxdWqkaFa3aRZiRQEtJxCEs+tXZNO0ZU96O4p32SIH/UxdG5eGFKEjuNRYp5yOXhfABJF9VI98AJ0D9noml3DZ+aSX+tnmNx7ZpE3/9yh6X8OH0CDnuTfI+Bu5Cv93nBnbtO+mOQKS6xqHnCCqKZoyrm4taZzBVgGRbwDebdpY/cYMwDbuBd8Y/dWNKTj+eSygYM5Sual16DgyCNkpCcV7kPMCfDZPKk/iPyGK+SiffJ9K1NrCtqyPt8+qvdodCYbT0KFCIptzYRDGFAI8lQk98ZyU2DsxLL4uW7hPISYJi3/q/ZmlyR+RxzKghYwy mSVmI4Et qQob6t0ACcXYLB0weSop5n9vhYJz1IPlgFrZQ6UqVOwTw1GhWPBOgrq/JL0iGvHBUbjho4TIVpOluXYeugTJxhX+NaN75oB74yEN2+f1SWYCzoHcm0TUUvza8KkJDNRNe50lagteBsULLjeHokZdnuh+eQh3p2CPMs9dm6YP+6W2DXZn9gsacHKRFCNkA73ql8ES37p8EsLbwFhoZ9GyxbZqIh8hzlG5IC2ktzWiMtRjoA4w= 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