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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8F54AC4332F for ; Thu, 3 Nov 2022 16:58:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 99594851D0; Thu, 3 Nov 2022 17:57:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="SX0anXWf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DE362851B6; Thu, 3 Nov 2022 17:57:29 +0100 (CET) Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BAB12851BA for ; Thu, 3 Nov 2022 17:57:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x730.google.com with SMTP id k2so1530234qkk.7 for ; Thu, 03 Nov 2022 09:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=FyYCOSHvdl5Hq0qgs8THivEnZ3SUtKZG3tr0e+pNn/Q=; b=SX0anXWfMkBzccHWUts5t/LQZpGqtkKsWI2xAVLL9b2CAxuvnLlk7dJ3OHQ45CE3wA IxTSAP85gEVjh+gxsg2RPHilVTsX2wHZjlQxwcwINSd1ZSFAbbZNLFzrF+gQ5vGewMRv V0KAjdZXVLfqMt9r92ScatDPdvG0rzcdsjOT4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FyYCOSHvdl5Hq0qgs8THivEnZ3SUtKZG3tr0e+pNn/Q=; b=yZ24jfYpfP4znG+rklQMieAhI8N/X44rhFu2GRvVrLnXcPKRqXZgSL1zZZEq/pFXeO TCmxX/xnul2KBbz5o7/l3mXK8RPmGIekpcP/WGnN+RuobFvU7YPLMgdsol9caOITatbU HDdRGvURFKzZCbt4OVWewhicg4WO8owLOypg61HF2Tmk1M8r/CNwrILhWSC9FtKdhC4W 0FMfStiyH2M5vXLx43Jaw0MxMZzTT5ailCHYyyhpO+S7unAu46ds6kO1BQN2o9bylgH6 pcUcnvLEhkcyLoJCAO/5Q00pzDOI445Peovu4StEY23V95xaxSN1YpkZzPqjomKqad/f 1VwA== X-Gm-Message-State: ACrzQf0vIS5GojU1/aT/oMmR5/kC/Cl2v1hIJwfAu/czFzngwbyHDya2 G7zUUKjwiiQ6n4+b5G/9tEIDwAPiZPmeQg== X-Google-Smtp-Source: AMsMyM672fAj5wsFB6FXj7SxXHSvALXoW5gK5bQFKYnOTgLgiqGXYhDflBnXMRROT4eRytsjqQuCNg== X-Received: by 2002:a05:620a:1377:b0:6fa:2e50:43e0 with SMTP id d23-20020a05620a137700b006fa2e5043e0mr17305877qkl.394.1667494643166; Thu, 03 Nov 2022 09:57:23 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-994c-dfba-30d0-8ee5.res6.spectrum.com. [2603:6081:7b00:6400:994c:dfba:30d0:8ee5]) by smtp.gmail.com with ESMTPSA id y1-20020a05620a44c100b006ec62032d3dsm981976qkp.30.2022.11.03.09.57.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 09:57:22 -0700 (PDT) Date: Thu, 3 Nov 2022 12:57:21 -0400 From: Tom Rini To: Andre Przywara Cc: Sean Anderson , u-boot@lists.denx.de Subject: Re: [PATCH 3/3] arm: smh: Allow semihosting trap calls to be inlined Message-ID: <20221103165721.GD2116612@bill-the-cat> References: <20221005163849.3205046-1-andre.przywara@arm.com> <20221005163849.3205046-4-andre.przywara@arm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NiDZvZUadYKQfYjZ" Content-Disposition: inline In-Reply-To: <20221005163849.3205046-4-andre.przywara@arm.com> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --NiDZvZUadYKQfYjZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 05, 2022 at 05:38:49PM +0100, Andre Przywara wrote: > Currently our semihosting trap function is somewhat fragile: we rely > on the current compiler behaviour to assign the second inline assembly > argument to the next free register (r1/x1), which happens to be the > "addr" argument to the smh_trap() function (per the calling convention). > I guess this is also the reason for the noinline attribute. >=20 > Make it explicit what we want: the "addr" argument needs to go into r1, > so we add another register variable. This allows to drop the "noinline" > attribute, so now the compiler beautifully inlines just the trap > instruction directly into the calling function. >=20 > Signed-off-by: Andre Przywara Applied to u-boot/master, thanks! --=20 Tom --NiDZvZUadYKQfYjZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmNj8vAACgkQFHw5/5Y0 tyy3CAv7B/otM/Ahyh7RG3udYnYBsDQjowi3PdfNdNaPZ4DypECdVFPKvtM6gyHz T69Jk1oGSWl7FloGNhonTU+pJpn0Kgk4R4FTNQc3ImbLxT86LmgbX45RlYFsafCw iLbml9aM7jx5nGEp3zcMncpnWmLEyRhvyK9d4XiYwi0BEKhDcekfM7qKEjcqRd7j kd/Vsf5igPzMJDT8QZ4NpkjQ0Qh0I+nA1GNi5zE+sJCPZj2vDMSCxPGGzgvhiJCO fC099JNBGVkLQEtKyg1bQdvGAWXPw2OtBzzDVgTux2xpmhlX93scvejv4jf8Kpdk 7PAO5tZYH66RDqSRff9t+cCZbakqchQOTfvoY2V5mMdPv73utLZCZ9Q6kMrG3qdM ohuH+JvXwC2B0PW+/vJLpnziogDrdFjjIL0t4KrltYDxovhIQcy7H+Bl/gzE14YG XFisH41yjFa1HMpwMS6H7Vv0ffIrgg6Fut0aMFyUg14B2EfkFN+gdoAoQwbof7CX M5+/29X2 =Au82 -----END PGP SIGNATURE----- --NiDZvZUadYKQfYjZ--