Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4748132ybl; Mon, 26 Aug 2019 15:27:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwG+IzPOAZSDPwFOYgMic8xeVKu9d3km/UWPSfE9x04mpwF7ra7Mgcre+3WuqOUs0kOb9O0 X-Received: by 2002:a63:c03:: with SMTP id b3mr18924052pgl.23.1566858465370; Mon, 26 Aug 2019 15:27:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566858465; cv=none; d=google.com; s=arc-20160816; b=xRIArP8q9DF4qGK8tL+xgQvqFi/+av52IhbdQ40Kctc6NjJBi0CRyyve/GZbnwxhGm 1FGMa0A68W+ynq/EGo4CNUmBYdfXSrqr5rRdP/LF1uYYIDb5emabnGBN07gK+WA6+tAD 9VbF2gniwTp7XbkrygOePEfCA6QMwKLqDtuCQfStc06oRcaF/q9ak/IP6ehQ1Stb+W0p t51+zhFE3wgLtH88mowm7uyqfKLBqpybsM2yQWrhd6AcVbz7OGaoREGJRQUJpkGQ7R/m wGAXlE3pA5uDyExm7Q2PSsQcs28VWQ/hzrwDz+9uadsyOrh6fbmsqZ1riItL4rOOtLjM MjsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NdrKt952AuvDe+QMynjr4iuarcTkuNP/kAs8J0u4A+s=; b=0NkFlDxlCVzSaCMHZ1TfMVO2+JjMg/tXUxi7xlKdzpuckfhK6tmlXzm1++AiUh9mUP 3ziFaGuRAe8UX1Iaa3gRSwbcY0CoeGuURak42g4BMNBRgcwI5s8ZgZ3bgX7IyzdfMlt1 P+eE0/6ezihaV1VuH4XKH4penJHEgRUmy+3EPtTPYkYbF/FPRfZcr/BrWuH7vEA76arV OPTMjlxFr08Ognz3Elo6p4pIIX9HcnywehqIJqYutIi5HjD64MZI6x0Hbf0SOLe+SVsS d2Kd11sT1lm6SQCJnYDlcqMg53OfwKD9LXY/1KR9uZgT1wfH9B+yl+2sEDE5zFZH4adV Lldg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=a0zMmyWB; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s3si10641379plq.152.2019.08.26.15.27.29; Mon, 26 Aug 2019 15:27:45 -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=@gmail.com header.s=20161025 header.b=a0zMmyWB; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726829AbfHZWZX (ORCPT + 99 others); Mon, 26 Aug 2019 18:25:23 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44629 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726539AbfHZWZX (ORCPT ); Mon, 26 Aug 2019 18:25:23 -0400 Received: by mail-pf1-f193.google.com with SMTP id c81so12690421pfc.11; Mon, 26 Aug 2019 15:25:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=NdrKt952AuvDe+QMynjr4iuarcTkuNP/kAs8J0u4A+s=; b=a0zMmyWBK90UYJtyoqynyxpcCWQ63iFelFOAu2wf9q+P7tEGrAMDTLQ7ns9kTHCAvV zOtTYGjAxNvaMG4PH070aBsaBC17H9ftkGmoEi1jbpZFGywLt3QZL7gqqDvhtYn2QJAj HSQU1nyy/xAx7EGwqSnb5+oUhOiY0vilM355IeRksUhMIXlBU+ac4G4LkEY6hh/lQJqH TCnArxvquzzcbANPftPtDewlrkSUrPpD/afdr91bwf897Kd0DnHeETaJ3blnDHKXuHRK pv4PbuZrnheVZVo5X1lDBWaTzlVchp+wBfR+mBKzN+vI9AKQDusQD89Py284sXkk9381 0sVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=NdrKt952AuvDe+QMynjr4iuarcTkuNP/kAs8J0u4A+s=; b=KSHgrX/UBpJ7cZ/sFyq+9sMpkO0OYdJBG82YELef6tgxK971HNFxg9RdsBBZEIZtmK G0msadhnwSVWFZPpuZCYpV25ff3JyzIsFCdPn4Wl1AqGB1NIUIvUu9vEQK7obSX5+qHG DqCIQdreu6j1XjbGEI8c5FGXqjXpQgzHl7W4vCbjM8bhBYneb4jP/ps99boZvkNU6/0z dqJuC6mZx8oSQM+1Jh71K3oVueJVhSBC9SHSMMSg19PH4ClTUAPj40zGNsH1S9yLG3xX lDI9JqbU6M3UA2uYesn36PoTdeDW6kNOtVvsRGC0pLZe9Tgg37PNTYKYgGu8VG/+XmoI FXYw== X-Gm-Message-State: APjAAAWKWq5Xa2veqx3GYwhyT2qQm8vWgj1yNQdOMYLGnRYtB4ppO5/S PCwJf0aLxX74xQJY5XBpqn4= X-Received: by 2002:a65:6108:: with SMTP id z8mr8200381pgu.289.1566858322037; Mon, 26 Aug 2019 15:25:22 -0700 (PDT) Received: from mail.google.com ([149.28.153.17]) by smtp.gmail.com with ESMTPSA id t6sm449041pjy.18.2019.08.26.15.25.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2019 15:25:21 -0700 (PDT) Date: Tue, 27 Aug 2019 06:25:12 +0800 From: Changbin Du To: Peter Zijlstra Cc: Changbin Du , Steven Rostedt , Ingo Molnar , Jonathan Corbet , Jessica Yu , Thomas Gleixner , x86@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: Re: [PATCH 03/11] asm-generic: add generic dwarf definition Message-ID: <20190826222510.6m2k3puwflnr52b7@mail.google.com> References: <20190825132330.5015-1-changbin.du@gmail.com> <20190825132330.5015-4-changbin.du@gmail.com> <20190826074215.GL2369@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190826074215.GL2369@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Peter, On Mon, Aug 26, 2019 at 09:42:15AM +0200, Peter Zijlstra wrote: > On Sun, Aug 25, 2019 at 09:23:22PM +0800, Changbin Du wrote: > > Add generic DWARF constant definitions. We will use it later. > > > > Signed-off-by: Changbin Du > > --- > > include/asm-generic/dwarf.h | 199 ++++++++++++++++++++++++++++++++++++ > > 1 file changed, 199 insertions(+) > > create mode 100644 include/asm-generic/dwarf.h > > > > diff --git a/include/asm-generic/dwarf.h b/include/asm-generic/dwarf.h > > new file mode 100644 > > index 000000000000..c705633c2a8f > > --- /dev/null > > +++ b/include/asm-generic/dwarf.h > > @@ -0,0 +1,199 @@ > > +/* SPDX-License-Identifier: GPL-2.0 > > + * > > + * Architecture independent definitions of DWARF. > > + * > > + * Copyright (C) 2019 Changbin Du > > You're claiming copyright on dwarf definitions? ;-) > > I'm thinking only Oracle was daft enough to think stuff like that was > copyrightable. > ok, let me remove copyright line. I think SPDX claim is okay, right? > Also; I think it would be very good to not use/depend on DWARF for this. > It only includes the DWARF expersion opcodes, not all of dwarf stuffs. > You really don't need all of DWARF; I'm thikning you only need a few > types; for location we already have regs_get_kernel_argument() which > has all the logic to find the n-th argument. > regs_get_kernel_argument() can handle most cases, but if the size of one paramater exceeds 64bit (it is rare in kernel), we must recalculate the locations. So I think dwarf location descriptor is the most accurate one. -- Cheers, Changbin Du