Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp771956imm; Fri, 3 Aug 2018 11:13:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpctErJciopvgi+KVfaopjYphVWZM1gmSRZT9yE9E9EAcaBZhcXF1eJdM0IHcIMlGd49pc6c X-Received: by 2002:a63:fb57:: with SMTP id w23-v6mr4826976pgj.441.1533320003369; Fri, 03 Aug 2018 11:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533320003; cv=none; d=google.com; s=arc-20160816; b=jMAERP8ml/tN7GMfpjQC6I+tI0+7VZVNyj3LT1EDbcgzazXwY5HTwD8MG/fhvRNMRr EG+NluEifF0P8rQF8xKV/w2SOF9U4IiK9YMSwIDE1IwpXqNSqNaHEHhfu08ey+f5YjAe auER+0XeS/VCCyhGt5ihYdGoT9Q7UkbOPAeMzhusa+ZMhipew/sT2ry1q7hKe5m+ue63 b8V1WZnm7JcPhsCm0gSdN+oxT4gtcHrIpFGWuAR2ksH3yyK80PGCV0Y7AmTanaIF0UIF F1XnTj6aFpFOhOV0fki3kacpLQORdRJv2f18AWnT9vKMLXyX5ung1DSJn1DkeMP5mOfV BqlA== 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=6m5Qbo5W22J5DKCFCd71EHj506kxxwkxa3cOmV7lW6g=; b=DYPB14df6BLWCiuX8xI2k8OQ+Us1oU62ZQcBpfQjwf/we7x04lHhAHhVfbD3JQajJE EIa7klwGCWlw4ahs3hGeB0UNK9L7eXSxwOjQOEyC1IIQIEZmOZ6i0yOwwRgZTionnRew F+X93xXOUn8KsLPx9eE+Q5PIroFcHrtHDBV5dYQ8G4+YY4IDCtT6qkAB/7LwNN6P6Iit RTInwykJul7mJdldp11v18o9CLJdXyIdezw942ML4WYz/ULdSS+iM6Yoa9pPoyiV7DNh q+eyhGnajBPKAy8kSYXMi9t0TfyrJtCQkbvtHbfxIh3XrTVtnBB4d9XbXeszTG69od5i 4M9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fSy5OCHG; 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 m124-v6si5772170pgm.120.2018.08.03.11.13.08; Fri, 03 Aug 2018 11:13:23 -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=fSy5OCHG; 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 S1729859AbeHCUJE (ORCPT + 99 others); Fri, 3 Aug 2018 16:09:04 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:37721 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727819AbeHCUJE (ORCPT ); Fri, 3 Aug 2018 16:09:04 -0400 Received: by mail-pl0-f66.google.com with SMTP id d5-v6so2901416pll.4 for ; Fri, 03 Aug 2018 11:11:40 -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=6m5Qbo5W22J5DKCFCd71EHj506kxxwkxa3cOmV7lW6g=; b=fSy5OCHGQaSBIm9Oa4MnYzBEmVLzvP5qSKh4eA7038xW7zgNnu168pu4MT22JpSyXJ 6xmxErITKED6c4Zt+aMSxOkmIPa0RN7ARuSIMRR7slS8hkWzSzG7+28nPs0Z/4lnYPsV 4yhlQirBWKk/po1f/Y37oJ1XqpQwIqjGKLxwh3sBcJ8tJIuz9DLpc7YyzKJlsS31dUEF YEjP2YMByFdZc9w05nPyE/9Onb7WMN0N99+ME87BDGA0YGV8n4B7960sVz27Hc6VvtIc x4UxbePXu2wHYGq5zCGlLOsJK88k2gS41svPp40zo4VnFmBBq+AgpefS/Oj51qzLdSPH ytJA== 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=6m5Qbo5W22J5DKCFCd71EHj506kxxwkxa3cOmV7lW6g=; b=YYWNkGgIbfYe5wa82kHaPoerz6iPFl76tz6PdTDBWph4ujgANUVA8BJdYLJoHY/voh Pg4mumkbn/kNc4qxDdn0oK6DLKHzB62QMcbXvg1DKR1De2eJ82K3JVWjXeb2GZDcJIBl 2XkgTfXJ1V4dPYDSDizPe3T4rrjUMKsl0wr72ZgwNJt5x0jga1J3axUyVDhurnDGaOt2 GYJIKhkeppW4t2CFNGqGFaILKzJe79vsa7JjtekSKCibPhWM4HYT8WW/cqb/IL40TbOe rCgbE4hQm+fzz3/wnPFMA7Hmxupt/PXndc+dTpuXSTuBAcPbX5RwikR6AOCsvODs7fqr RA9A== X-Gm-Message-State: AOUpUlGJQK+eYtgA/AgizqEbAL7PlXfQ+peEBuryrlXrK8N9RBjZ49FN JdH8Vf5/jU8bTXXuXfEC9l+TteUOtpX909gStxt3Vw== X-Received: by 2002:a17:902:9a01:: with SMTP id v1-v6mr4639012plp.20.1533319899972; Fri, 03 Aug 2018 11:11:39 -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> In-Reply-To: <80743c1c-2a8c-7bce-2068-24c63790eba7@bell.net> From: Nick Desaulniers Date: Fri, 3 Aug 2018 11:11:28 -0700 Message-ID: Subject: Re: [PATCH] parisc: prefer _THIS_IP_ and _RET_IP_ statement expressions To: dave.anglin@bell.net Cc: deller@gmx.de, jejb@parisc-linux.org, Nathan Chancellor , Thomas Gleixner , Pravin Shedge , Kate Stewart , Greg KH , linux-parisc@vger.kernel.org, LKML 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 Fri, Aug 3, 2018 at 10:57 AM John David Anglin wrote: > > On 2018-08-02 4:31 PM, Nick Desaulniers wrote: > > If I understand your point correctly, is it that you're saying that > > _THIS_IP_ should be implemented in terms of inline assembly (as in > > what current_text_addr() is currently)? If that's what you mean and > > I'm understanding correctly, my point is that we should be preferring > > the generic C implementation as that's what's being used in most > > places currently, so if it was broken you'd likely already know about > > it. Unless unwinding is truly broken by the additional label, I don't > > think we need an inline assembly implementation of current_text_addr() > > for parisc (or any arch for that matter). If we do, then it can be > > localized to the parisc unwinding code, that way it can be > > consolidated everywhere else for every other arch. > The label breaks the unwind data, not the unwind code. So, localizing > the use of > current_text_addr() to the parisc unwind code doesn't help. But the kernel uses the generic _THIS_IP_ *everywhere*, not parisc's custom current_text_addr(). So if this did actually break unwinding, you should have noticed by now. There's only one call site that uses the custom current_text_addr(), which is what my patch is addressing. Localizing the custom implementation would literally produce the same binary as is produced today, but allow us to start removing all the other custom implementations of current_text_addr() from arch/*/include/asm/processor.h, which is why I proposed that as an alternative to this patch. > Personally, I prefer the implementation of current_text_addr() because: > > 1) The generated code is smaller, and One instruction vs two, for a single call site that I bet is cold and not inlined in multiple places. > 2) it doesn't introduce any unnecessary labels into the text. > > As noted, these labels can cause issues with unwinding. Can you confirm that applying this patch actually breaks unwinding? -- Thanks, ~Nick Desaulniers