Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp89156imm; Tue, 7 Aug 2018 14:31:07 -0700 (PDT) X-Google-Smtp-Source: AA+uWPx5I+61n7Zp1pxQDIeFXdADC2M3+aswLhAQLc8CXYMI41HKqbnfcFuCYPTmypolyoRg+8f+ X-Received: by 2002:a63:4d5:: with SMTP id 204-v6mr89110pge.129.1533677467082; Tue, 07 Aug 2018 14:31:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533677467; cv=none; d=google.com; s=arc-20160816; b=vWHgQtKlp20yUSNLPM+tTU4AkfmbXLUA/Jojz5WHE/7CXnFTV5rf97oW0xmT3yteQq TpxGGnktbh2ZRIW1ZFGO5P/g93gqy/L1oX+K8kF+NZsRsxvqzzWu4P1e0tYTg69v8ehU BOmTwYFIJj4nJE+sqAa7qPHgE5g1oYFhPrHW+roLfDLIltUHDu++dMfoJSFZi/d2TtwM nWe35532Yp0xj4uErKtmjkKmrlBpaUDNnJWMqrtk6p4SdrbT/Ot1ShcqwxEZqK1ddAHX Rym4i6f1yFYbyhfM7nTOo2ihtFvf3jCy1jY2ggzImsu8EPfTtKFBUKYy+QF08wHX4zX7 OrZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=oymKLON2R3fZZMXMf0R/WGj+kimwbWUeo/xpBRqBJh4=; b=Wo6kB/faAtvxBYh2uZMz8FFBvpT2m3da8IlTxs4pe0C1ce8JInP+NwcqoIqs7fSnFl r4qNIlsj63wtlTs05tMsf7fwn8nuwUjV370ZhR5RfamSGVaIJWjcAzniugho/tRg12mR N1od1fY6AKq+ax4dhwJrpfvMaaD/o7bX0y95TsgYAM/K0Xd/va4iJTwEmhpQtMi1Jj+S N1VJuNCUYhJv1bd+YjJl1IPFEcqPTzZ822Mm+EYi7VBgP9j1Mjn7cheHV6FZJ/EUhcOl ppi1XH+JPK0/SoVCxocISm6/kjG+cGQ6PAACs+W+KAO6NLtvVPtZ9BZkambkDCciOAfp ynrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=SnK8J2Ap; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z21-v6si2020331pgn.365.2018.08.07.14.30.51; Tue, 07 Aug 2018 14:31:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=SnK8J2Ap; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726931AbeHGXpr (ORCPT + 99 others); Tue, 7 Aug 2018 19:45:47 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:38223 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726537AbeHGXpr (ORCPT ); Tue, 7 Aug 2018 19:45:47 -0400 Received: by mail-pf1-f195.google.com with SMTP id x17-v6so51751pfh.5 for ; Tue, 07 Aug 2018 14:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oymKLON2R3fZZMXMf0R/WGj+kimwbWUeo/xpBRqBJh4=; b=SnK8J2ApnUJCy0uBMcx/AMdpR/t7HfiR9d6nqDLIl0QzpLm4l8livwWmkg19hwv9t7 m4v0/yAMQ57I07W3eHSgNckW/D+kYWBYZQ7TX+GL2ojPaCPDo5Ay6MHG/pY2LMKNT8Tr 2ILWQ2/BwBJGqbq5ND4jIAjPen9iH++nDEtM5AzIuIFirlEn71xfD3oI4T2GpU6c5sjr HBIX52A6j2XnHAZnQqIth+ksuoZY5U7nSjxDbgNcNpc33nMsrstq382MSONlQ0INLr4V HzNacpf2n3XKLVHk7cdalODIFjgIJ6Ei9G6R8d4HcLezcSjlPDvOHIMxGIFOaexO9jJh UkTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oymKLON2R3fZZMXMf0R/WGj+kimwbWUeo/xpBRqBJh4=; b=UzlwPUq8dMExcdZbFNs936IF+d/AfxMtO58zhbHOa7HPSO372Emyi1GcLQZa4PFugn 9ozPDTE+0zMsgEsxaX3peenp9o8m5h0pkOgZYFJCk7h4fH6IHHsdJIu1F+4zERCpWsX4 Q7u7xUCgd/Ijatu1EViHkEtKOuv8AitZiJlTRIZM+KedKc98wJwtGUhmxS+x65vcUFrU OlEKvJaMpeBraG9x/rqZbSbdrbhR7cjou6r+7n1xZXyTdyk8fL3iroepxAHthZqJqgZT irkScNVecb3uMilcYFzZaqpRlfzUAcNKFjCCXoeyU3kE9yOyI9iCvQ4YfjbgnzAUfuEe qsRQ== X-Gm-Message-State: AOUpUlF4NgSCRq1WaK1D+W6ZQX3mN3/LrbyGJSpc5X9RPcXraHwYkjMf HXHDNVkv3fWriSahOrh7d3qJtkrg1s2yDJ06VHmNuA== X-Received: by 2002:a63:9619:: with SMTP id c25-v6mr88285pge.75.1533677365118; Tue, 07 Aug 2018 14:29:25 -0700 (PDT) MIME-Version: 1.0 References: <20180801182258.17834-1-ndesaulniers@google.com> <78c667f9-5c8b-3835-83eb-4b59e27e4f7e@bell.net> <54b2139b-53d2-01c5-f240-93a692cdbc59@bell.net> <536ef1b1-cfa2-f66d-4261-fb8405964632@bell.net> <80743c1c-2a8c-7bce-2068-24c63790eba7@bell.net> <81a7e33a-0403-b6d4-fcba-c2168a608ba6@bell.net> <1d577675-c337-d433-f235-1e46e5d56d4c@gmx.de> <74f19f24-fc6a-748d-3778-26ee0bfb2d40@gmx.de> In-Reply-To: <74f19f24-fc6a-748d-3778-26ee0bfb2d40@gmx.de> From: Nick Desaulniers Date: Tue, 7 Aug 2018 14:29:13 -0700 Message-ID: Subject: Re: [PATCH] parisc: prefer _THIS_IP_ and _RET_IP_ statement expressions To: deller@gmx.de Cc: dave.anglin@bell.net, jejb@parisc-linux.org, Nathan Chancellor , Thomas Gleixner , Pravin Shedge , Kate Stewart , Greg KH , linux-parisc@vger.kernel.org, LKML , Alistair Strachan Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 7, 2018 at 1:30 PM Helge Deller wrote: > > On 07.08.2018 20:11, Nick Desaulniers wrote: > > On Fri, Aug 3, 2018 at 3:34 PM Helge Deller wrote: > >> So, your patch is basically OK and doesn't break anything. > >> But I agree with Dave and Andrew, that THIS_IP is ugly. > > > > I don't disagree, and other maintainers have remarked on _THIS_IP_ > > being ugly, but renaming it en masse is a tree wide change, which I'm > > trying to avoid at the moment. > > Understandable. > > > It sounds like we have a working patch? Are there 64b parisc machines > > to test on, or can this get merged? > > Go ahead and merge it. Thank you, but I was under the impression this would go up through the parisc tree? https://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux.git/ right? Or is there a different tree/maintainer I should ask? > In addition, somehow I'd prefer if there would be a way to add to include/linux/kernel.h: > +#if !defined(_THIS_IP_) > #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) > +#endif > > That way it would somehow be possible to replace that label calulation by the > preferable inline assembly of current_text_address()... I'm asserting that there is no need within the entire kernel at the moment to have inline assembly to get the instruction pointer. If there are no call sites of the inline assembly version, there is no need to define per arch inline assembly versions when C (with GNU extensions) will suffice. And if in the future there are, either those call sites can have a local implementation (as in the second diff I sent in this thread), or some other change to _THIS_IP_ (as you propose) can be made. But until then... YAGNI: "You Ain't Gonna Need It" Once this patch and the other 3 outstanding ones are merged, we'll be sending patches to delete all arch specific assembly implementations as they will be dead code (no callers, kernel-wide). -- Thanks, ~Nick Desaulniers