From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D36E1714D0; Thu, 15 Aug 2024 13:32:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723728733; cv=none; b=MvUIpCD078ODg7q0EZDHUUeX3hfZvPwzA3DiC+pxPPzhXuW9fjbfDNDGHmHFf5ELZqZD8vGJiQLMkBw5g4f6UuJ4e5Vm8F0YuaLwmfWVfueM+ooOIs1wgwjTz9mwwnF7MUbi1yiSWgtdHpWvFlQ4omd8jPqgkEmbQVsiv4sWKdk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723728733; c=relaxed/simple; bh=7DirDnIUkox3H4q6lWHJmTfSuFjYH5+Lj5nQVnstqp8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nlpRN6WSk+Zmwcld9jrp1aoluPEa9I46FkZEQgqtzJbODIksaEiCTYbB0qfuK2i3s1de4Rme5iZt/z31lR1qvTwNzyXgLaRO5cpuJrIr5MGvECy/rP6UMmVMotIU1aNQBqjcR5jy0t4BANxjEYYMUJb0DAE212UxfTrDtAtn7P0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mwHOKYsG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mwHOKYsG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DEE44C32786; Thu, 15 Aug 2024 13:32:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1723728733; bh=7DirDnIUkox3H4q6lWHJmTfSuFjYH5+Lj5nQVnstqp8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mwHOKYsGKOqNzDvshStGaFpAD/SQ79hd4lsJ7KJ6mU80hfAfYdIw9YAuUyMy3RZzk 0y6WCCeaqk1y7JFsDcCPLiXPnU2xCQM6zem+SGocnGfpOPlD4VLDyqZLrH7NiuH18N BbQsa1/4Zzkp1/0PKrVQ55JWyKFeStXicEA87y58= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Michael Ellerman Subject: [PATCH 4.19 093/196] selftests/sigaltstack: Fix ppc64 GCC build Date: Thu, 15 Aug 2024 15:23:30 +0200 Message-ID: <20240815131855.640439996@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240815131852.063866671@linuxfoundation.org> References: <20240815131852.063866671@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael Ellerman commit 17c743b9da9e0d073ff19fd5313f521744514939 upstream. Building the sigaltstack test with GCC on 64-bit powerpc errors with: gcc -Wall sas.c -o /home/michael/linux/.build/kselftest/sigaltstack/sas In file included from sas.c:23: current_stack_pointer.h:22:2: error: #error "implement current_stack_pointer equivalent" 22 | #error "implement current_stack_pointer equivalent" | ^~~~~ sas.c: In function ‘my_usr1’: sas.c:50:13: error: ‘sp’ undeclared (first use in this function); did you mean ‘p’? 50 | if (sp < (unsigned long)sstack || | ^~ This happens because GCC doesn't define __ppc__ for 64-bit builds, only 32-bit builds. Instead use __powerpc__ to detect powerpc builds, which is defined by clang and GCC for 64-bit and 32-bit builds. Fixes: 05107edc9101 ("selftests: sigaltstack: fix -Wuninitialized") Cc: stable@vger.kernel.org # v6.3+ Signed-off-by: Michael Ellerman Link: https://msgid.link/20240520062647.688667-1-mpe@ellerman.id.au Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/sigaltstack/current_stack_pointer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/testing/selftests/sigaltstack/current_stack_pointer.h +++ b/tools/testing/selftests/sigaltstack/current_stack_pointer.h @@ -8,7 +8,7 @@ register unsigned long sp asm("sp"); register unsigned long sp asm("esp"); #elif __loongarch64 register unsigned long sp asm("$sp"); -#elif __ppc__ +#elif __powerpc__ register unsigned long sp asm("r1"); #elif __s390x__ register unsigned long sp asm("%15");