Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp173688imm; Tue, 31 Jul 2018 16:11:05 -0700 (PDT) X-Google-Smtp-Source: AAOMgpchoEjgx/9nPsDBl0UdhT3wwMHmTX86oCz3iymp3zOU6eyJTkt6RXE0mCwEjW0uGavp/43g X-Received: by 2002:a63:ce43:: with SMTP id r3-v6mr22023631pgi.439.1533078665257; Tue, 31 Jul 2018 16:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533078665; cv=none; d=google.com; s=arc-20160816; b=IMPWmG27yebxSFSUmZfggbnY/AQxNNjEa0iqgRNMWNzbNM8fxd1zhw2XWdnCWOdj/L W2Sd0+0BrKEXZ5SCiWzVlzkk+AleH+nVko00PcYOfymlsRFZaFyJGk158QeY08T+ASoj tTb0MF8SQ7zW2b3RbHlm0Euq9iGpzVbul9O24Q9LeOasDZjmSBJo91JlpINu1sLJYE2f +EXGwLmbK9qWgWOOorIMq8fs9Gy6Cvq4jTvuqQ6tTaXCDUq6iN48QiOLuZQfUWnf+m/x 6b1lr/0X9vSA1nkk7me358ftlRz5noG+OXb4/dqmlOXb00Sa0LlZhFrrzZ2CFhA1v463 Un4A== 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=6VzOzblINlAwOt9Z3Tc0L0XEgO1pcUZqBpt6BgFfo/A=; b=EIAjvT3gmgQMTMs4uIxdrzDmTBn9mTGwOYCIAyRLToqeZ+u558Mg+d0f3/2IxHLIrM uBgtkxCVGVjMURRUin1PaKCZzRRGXhfC98I9C0UC6YXgECl68r905VhKlFQ61Ov9b9xh 5Ikh4umSEFhQLzlDgMJyW6UolotznBXpH5LiIvK4TcPlwqX/kfERtUZrv1lasOiUIk4V t3ooEKmFek15qp3b1IgiOFj4ONG5DnuR8Z3sN1l7rtqhh0J6svr//yA3Qn5x5rRXFiWx CQhL7MNN69uE4MWYt/mueODhQXU9uv9pnrLfZaN7xRAqaWhtR+6eTr9b0Akn4iwEA6DV BiZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="YTgZR/68"; 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 m13-v6si13440391pls.70.2018.07.31.16.10.50; Tue, 31 Jul 2018 16:11:05 -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="YTgZR/68"; 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 S1732824AbeHAAv4 (ORCPT + 99 others); Tue, 31 Jul 2018 20:51:56 -0400 Received: from mail-pf1-f171.google.com ([209.85.210.171]:46212 "EHLO mail-pf1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732720AbeHAAvz (ORCPT ); Tue, 31 Jul 2018 20:51:55 -0400 Received: by mail-pf1-f171.google.com with SMTP id u24-v6so6811885pfn.13 for ; Tue, 31 Jul 2018 16:09:18 -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=6VzOzblINlAwOt9Z3Tc0L0XEgO1pcUZqBpt6BgFfo/A=; b=YTgZR/68I0zouGJYpSC/shI4ShROXVy7T/S6KvZC1lF3R9LLzhfL5WFy5VZ7JApHZH uZyQnbZPTOqbxKgYsCp8LXiBP2evfS4CgaiL84twL6rD7zATWQ91D6tQAoVriy9yThZp 5PrX0mnOZfSGNzmE64YZ8D85AF1DrQYHU+fcMwy63ggd2neiRqZ90jWsEvgNyJIwm1z6 mV7fgy7NgOgHbz/1czOktjcQdRx4cBXs7SxpmgPzyg1AJcLhZMAaC+LNB5YYe2AuPdd0 hWWvOUYHaKiY/FVAdVnj6H77DQJgY1t0gGDDc1CNYhqoxFwPd3oiKJfAH36/7zRpif95 LONg== 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=6VzOzblINlAwOt9Z3Tc0L0XEgO1pcUZqBpt6BgFfo/A=; b=gKcL1IwRIIfcjKxA7kClW7Y0rv2QYPGr8k+TLYzE6zBRcEgxqf6kzwp2D0Z7UzaSKw 3Hiidzzz5e1HoPfo7Nl/9jYGldtNWWB9MPDrw19LeIEBGG7RRTvPQmbARjfgsEDX3pDh ZtdXpJ35p0uq/EFotzdo1rohxNC4Xv4++j6pzS8d6prTydg2afcYgk5oJQHSulv0U1uF K0sSIVclxF7U2BT+rU40Q6nSnDf9brko6JqMUgBbyeS+7nw6meUyE26Bb/bWb09PQGvf VpqmfkIDwTgA3DSH0FDVxMT0nEQ2Qf+9xuExnzhS2y8/5Wlv976mE/eAzIraFmuTfTCd 4QlA== X-Gm-Message-State: AOUpUlHIAP791tpMjKPjSUwnFL3kSPpBSzfPTWSTf7bwgLF1ITy9uvUu 8rehNRLJ8pAA1cm2ghpP0MD0X1FU8dHVay1Dr5WaQw== X-Received: by 2002:a62:8d7:: with SMTP id 84-v6mr24214435pfi.172.1533078557859; Tue, 31 Jul 2018 16:09:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Nick Desaulniers Date: Tue, 31 Jul 2018 16:09:06 -0700 Message-ID: Subject: Re: Getting the instruction pointer on a per arch basis To: schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, ysato@users.sourceforge.jp, dalias@libc.org, tony.luck@intel.com, fenghua.yu@intel.com, msalter@redhat.com, jacquiot.aurelien@gmail.com, "David S. Miller" , Thomas Gleixner , mingo@redhat.com Cc: Pirama Arumuga Nainar , Greg Hackmann , Mark Salyzyn , LKML , linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-ia64@vger.kernel.org, linux-c6x-dev@linux-c6x.org, sparclinux@vger.kernel.org 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 + More maintainers and lists for visibility On Tue, Jul 31, 2018 at 3:32 PM Nick Desaulniers wrote: > > I'm currently looking into cleaning up the code duplication between > current_text_addr() and _THIS_IP_, virtually every implementation of > current_text_addr() and _THIS_IP_ itself are basically: > > #define _THIS_IP_ ({ __label__ _l; _l: &&_l; }) > > For a few arch's, they have inline assembly instead (for > current_text_addr()). Examples: > * s390 > * sh > * ia64 > * x86 (um and 32b) > * c6x > * sparc > > I have a patch that cuts down on the duplication, but I don't > understand why the few arch specific implementations are necessary. I > could reduce the duplication further if it's ok to just use the > statement expression. > > Does anyone know why this is the case? > -- > Thanks, > ~Nick Desaulniers