From patchwork Mon Jun 27 14:02:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 1648946 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=q/Y0jKFW; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LWqF75CLmz9sGY for ; Tue, 28 Jun 2022 00:03:07 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4LWqF746kxz3cdh for ; Tue, 28 Jun 2022 00:03:07 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=q/Y0jKFW; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4LWqDx6GBWz3bc9 for ; Tue, 28 Jun 2022 00:02:57 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ellerman.id.au header.i=@ellerman.id.au header.a=rsa-sha256 header.s=201909 header.b=q/Y0jKFW; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4LWqDx3Zvrz4xXg; Tue, 28 Jun 2022 00:02:57 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1656338577; bh=N1fXz7rEc49qkNImQCezrnviRtvtwN5YsTHTY/Iowbc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=q/Y0jKFW/oGkp7i8eHtZWb65+l8UXqbuzTpFNEH7tqsreBoalxG2iPsa+MBhbFjER nTLeJawE516gsmXtQdjmkeoj8rPSDYltTBnW4bMP/G1ghFRPr6ZfBQn5dEeI6BcNbI y5tZI1kk1Sp+prZBwWomMY0UzgUjj/tDbew1b9j1volX+xZioUIhSBWqCeHbLXrN1b nIFiQVqrknfkj1IbhrWNElOv5Id9JfWVpje14JRdhG1XxoJWt2TrCxXxWM2gIy8L7x lqmeBLPcpckCE9Bnpsna6rsgJ82inn7h9fjmGjw++CDB3SyLMZ3anrA20kpo0qRIN7 ESKRQa58BRc+g== From: Michael Ellerman To: Subject: [PATCH 05/13] selftests/powerpc: Don't save TOC by default in asm helpers Date: Tue, 28 Jun 2022 00:02:31 +1000 Message-Id: <20220627140239.2464900-5-mpe@ellerman.id.au> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220627140239.2464900-1-mpe@ellerman.id.au> References: <20220627140239.2464900-1-mpe@ellerman.id.au> MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Thare are some asm helpers for creating/popping stack frames in basic_asm.h. They always save/restore r2 (TOC pointer), but none of the selftests change r2, so it's unnecessary to save it by default. Signed-off-by: Michael Ellerman --- tools/testing/selftests/powerpc/include/basic_asm.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/testing/selftests/powerpc/include/basic_asm.h b/tools/testing/selftests/powerpc/include/basic_asm.h index faec7b11c041..be380aa779f8 100644 --- a/tools/testing/selftests/powerpc/include/basic_asm.h +++ b/tools/testing/selftests/powerpc/include/basic_asm.h @@ -58,11 +58,9 @@ #define PUSH_BASIC_STACK(_extra) \ mflr r0; \ std r0, STACK_FRAME_LR_POS(%r1); \ - stdu %r1, -(((_extra + 15) & ~15) + STACK_FRAME_MIN_SIZE)(%r1); \ - std %r2, STACK_FRAME_TOC_POS(%r1); + stdu %r1, -(((_extra + 15) & ~15) + STACK_FRAME_MIN_SIZE)(%r1); #define POP_BASIC_STACK(_extra) \ - ld %r2, STACK_FRAME_TOC_POS(%r1); \ addi %r1, %r1, (((_extra + 15) & ~15) + STACK_FRAME_MIN_SIZE); \ ld r0, STACK_FRAME_LR_POS(%r1); \ mtlr r0;