From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750937AbdAXTJO (ORCPT ); Tue, 24 Jan 2017 14:09:14 -0500 Received: from mail.kernel.org ([198.145.29.136]:50840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750751AbdAXTJN (ORCPT ); Tue, 24 Jan 2017 14:09:13 -0500 Date: Tue, 24 Jan 2017 16:09:08 -0300 From: Arnaldo Carvalho de Melo To: Will Deacon Cc: He Kuang , peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, mhiramat@kernel.org, wangnan0@huawei.com, bintian.wang@huawei.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] perf tools: Introduce regs_query_register_offset() for arm64 Message-ID: <20170124190908.GG10340@kernel.org> References: <20170124103015.1936-1-hekuang@huawei.com> <20170124103015.1936-3-hekuang@huawei.com> <20170124182515.GA26744@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170124182515.GA26744@arm.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Jan 24, 2017 at 06:25:18PM +0000, Will Deacon escreveu: > On Tue, Jan 24, 2017 at 10:30:15AM +0000, He Kuang wrote: > > Since HAVE_KPROBES can be enabled in arm64, this patch introduces > > regs_query_register_offset() to convert register name to offset for > > arm64, so the BPF prologue feature is ready to use. > > > > This patch also changes the 'dwarfnum' to 'offset' in register table, > > so the related functions are consistent with x86. > > > > Signed-off-by: He Kuang > It would've been nice to have been cc'd on this. In future, please at least > cc linux-arm-kernel for patches directly changing arm/arm64 code. > > + GPR_OFFSET_NAME(30), > > + {.name = "lr", .offset = offsetof(struct user_pt_regs, regs[30])}, > > + REG_OFFSET_NAME(sp), > Don't sp and lr need the leading '%'? > > + REG_OFFSET_NAME(pc), > > + REG_OFFSET_NAME(pstate), > The AArch64 DWARF spec says that DWARF register 32 is "RESERVED" and > register 33 is the ELR, so these pc/pstate entries are wrong. > However, with those changes, I think this patch can simply be ignored and > mainline is doing the right thing. Ok, thanks for checking, dropping this patch then. - Arnaldo