Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1552184pxu; Sat, 12 Dec 2020 17:26:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYXBwiXXFX8pgz1FyFGkAmIRVhAefzicn9b447ZLpHVZHflgb078GDAWCVQoVb0iNKHY9m X-Received: by 2002:a17:906:178b:: with SMTP id t11mr16348428eje.152.1607822797223; Sat, 12 Dec 2020 17:26:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607822797; cv=none; d=google.com; s=arc-20160816; b=tAkWzi9EarzbO9i4bthpAkQlJke/nA7WSExDhwEW/rjDNfKLtyzyPx8mUAA0ih1w5V 6WHeo1LBZezVs2rxJnS6T5vyp1pr2DjKI7G8iwOrzvLVgoVYwJROxm9kspOH6JtBJ7gF eac57lvO9A4d8p755+Zy5pt45VjzsiXpHXehpV2nhI1Cx8Fm1+Hwgt0plvHi95XIQaPs 6x8+/yjLPbYMoTGoeFtv0Mdmq/fyeXzjA5hwUJYFf2N/hzxln0wAwf/7B+zMkc2WpILo 7oSnOUrOhYoYJ/+4taqApkgLuZxAzKxWxXAURfvc5vugQ0+4ot1XAzCENMWJUVtYsL6I M0Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date; bh=tMdYCWiD5S9LRdnx+/1+eEkD7iqVQGyjbZ+stItzKEg=; b=IaPnx4nI5BN25Itp7hV8hNiRfQoTrSfEKlNli3bcZC5TE++qrd8G2DVcAV64Z+Gpuo DD1s0DF7mCDgqTvy1+1Umc2orrKP69PH0MntfvLQMLe2SOOtR0sbTMMHa/+l0fjV15MR jo9cYilNUKK6xdeECVYd6pXp/LTyVdMSfNnEQR0nwB6V4POVYYpUAmBtHzZtsjTkutBX df8wqBoHsDXJ35p5T8147VpxjaOVdPfhLZq+Gzl9/2QLlpJk4jN8EiI9wanvM0WA6Gok jcJb0/8RJrF8USrGFu40IbJqiTRUjd7pv4Tc+JYMtUq4901ox36P2Pu5g+P7ULn5XP5H mN0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a6si7202630ejy.167.2020.12.12.17.26.14; Sat, 12 Dec 2020 17:26:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388079AbgLKTz4 (ORCPT + 99 others); Fri, 11 Dec 2020 14:55:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727038AbgLKTz2 (ORCPT ); Fri, 11 Dec 2020 14:55:28 -0500 X-Greylist: delayed 23673 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 11 Dec 2020 11:54:48 PST Received: from orcam.me.uk (unknown [IPv6:2001:4190:8020::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3C031C0613CF; Fri, 11 Dec 2020 11:54:48 -0800 (PST) Received: from bugs.linux-mips.org (eddie.linux-mips.org [IPv6:2a01:4f8:201:92aa::3]) by orcam.me.uk (Postfix) with ESMTPS id 9BF112BE0F3; Fri, 11 Dec 2020 19:54:45 +0000 (GMT) Date: Fri, 11 Dec 2020 19:54:07 +0000 (GMT) From: "Maciej W. Rozycki" To: Anders Roxell cc: tsbogend@alpha.franken.de, natechancellor@gmail.com, ndesaulniers@google.com, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH v2] mips: lib: uncached: fix non-standard usage of variable 'sp' In-Reply-To: <20201211102437.3929348-1-anders.roxell@linaro.org> Message-ID: References: <20201211102437.3929348-1-anders.roxell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 11 Dec 2020, Anders Roxell wrote: > diff --git a/arch/mips/lib/uncached.c b/arch/mips/lib/uncached.c > index 09d5deea747f..f80a67c092b6 100644 > --- a/arch/mips/lib/uncached.c > +++ b/arch/mips/lib/uncached.c > @@ -37,10 +37,12 @@ > */ > unsigned long run_uncached(void *func) > { > - register long sp __asm__("$sp"); > register long ret __asm__("$2"); > long lfunc = (long)func, ufunc; > long usp; > + long sp; > + > + __asm__("move %0, $sp" : "=r" (sp)); I thought it might be better to make `sp' global instead, so that it's the compiler that chooses how to schedule accesses. Have you tried that? Maciej