Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp442476ybb; Wed, 1 Apr 2020 03:09:27 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtXs00mA3FVRBE5rwibo8ZaJ45Z2UO8Q9zjKzjFgDXR3LLCcfYOstK3Tj6qI2ZSbQ0D7JWR X-Received: by 2002:a9d:2056:: with SMTP id n80mr17029813ota.281.1585735767367; Wed, 01 Apr 2020 03:09:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585735767; cv=none; d=google.com; s=arc-20160816; b=BS8ZTwjhTwW0aQobQsmVzbOJBJYgw781x65j3x6llJSY/6lLX1/yA5uk48bx/tmQ79 thpotiX7ZrTPrPRMivgfNBvcPIdqS0MPoZzCkxjRBM01eNQMZHEZY13rBVuk4mN3CKUj lPe5X5AJsBMkLMjXtUukuKd/mRJuhNOXJFU67SAKnPtvFQ53pyAv5O4EklluvwveXSK/ yjshz8zxhPXIp2Pe/syYa5WidEJFO2WCMO54UTUOdLZl0G7GY8KufJqWe2qzYnL/3jQO AdRXfTv9Dv91LLR5g/eev4AMNqILEHaHN8f74RCSUi5i7jO2PLi7ko3e3iVxBihNkhQ6 5VcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature; bh=6pc7+pYfpNQcYZj6UlZPCCZfpJVZ/FFmwNbELR6TFl8=; b=tIGULHAqACZKSOUlkFp3OjFbw3KH1jZ0DzP3ktfVQsTf6N4ND0DoFl4RBRqavaA0k7 Rl+iIscq5GaCZN3nPkz+yDQzoj/qMvIcATUWnXVPvmMCTy5Zn5f3Rh3kZbCbdJpqpb3l GWjeKuibRLXt9GENOF9I/2SXEccf1Q2/m2OPAnp2xMvPKQ9aHaIi5swtRQ+CuVKTG3vI RJi/A5QGMVlDEpQrdUYJg+kXCzO/fgGayz/a+jDXnN032NluuyNWgHNUG06FI+5zL2XN 3CEiFCgTDapWhQISDet6ynFH3a9XX0QdS5pwBUdqwzwKBnLOGAmKEMVKzUghStdKmDX7 hL2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=Hsm3Mx1J; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w32si643561otb.122.2020.04.01.03.09.14; Wed, 01 Apr 2020 03:09:27 -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=@c-s.fr header.s=mail header.b=Hsm3Mx1J; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731749AbgDAJoV (ORCPT + 99 others); Wed, 1 Apr 2020 05:44:21 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:15972 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726974AbgDAJoV (ORCPT ); Wed, 1 Apr 2020 05:44:21 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 48sh9Z2FlFz9tyys; Wed, 1 Apr 2020 11:44:18 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=Hsm3Mx1J; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id L2wJIj6zhCh2; Wed, 1 Apr 2020 11:44:18 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 48sh9Z0qhHz9tyyr; Wed, 1 Apr 2020 11:44:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1585734258; bh=6pc7+pYfpNQcYZj6UlZPCCZfpJVZ/FFmwNbELR6TFl8=; h=Subject:From:To:Cc:References:Date:In-Reply-To:From; b=Hsm3Mx1JJgoRVeB7V+TM6ntmlqI8p/n4QobEbYwgB/MVDtMlS+rCFB0N8luWPSV2G 7xM3iMcSIWp0r4WZJGSeopsiKNQKbbtX3aSLJ6hoeNam+fRr+xpKbBOk0Yg9Kic+V7 nwtmGBKVsWctK/6XKz+b0vCZIjVnI2z6FjuH28m0= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 3FCE18B778; Wed, 1 Apr 2020 11:44:19 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id cXu779wBa5yK; Wed, 1 Apr 2020 11:44:19 +0200 (CEST) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 4E9198B7BC; Wed, 1 Apr 2020 11:44:16 +0200 (CEST) Subject: Re: [PATCH v2 06/16] powerpc/watchpoint: Provide DAWR number to __set_breakpoint From: Christophe Leroy To: Ravi Bangoria Cc: apopple@linux.ibm.com, mikey@neuling.org, peterz@infradead.org, oleg@redhat.com, npiggin@gmail.com, linux-kernel@vger.kernel.org, paulus@samba.org, jolsa@kernel.org, fweisbec@gmail.com, naveen.n.rao@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org, mingo@kernel.org References: <20200401061309.92442-1-ravi.bangoria@linux.ibm.com> <20200401061309.92442-7-ravi.bangoria@linux.ibm.com> <89f43001-0fa4-1394-4158-878fca4962e3@c-s.fr> Message-ID: Date: Wed, 1 Apr 2020 11:44:11 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 01/04/2020 à 11:11, Christophe Leroy a écrit : > > > Le 01/04/2020 à 10:57, Ravi Bangoria a écrit : >> >> >> On 4/1/20 12:33 PM, Christophe Leroy wrote: >>> >>> >>> Le 01/04/2020 à 08:12, Ravi Bangoria a écrit : >>>> Introduce new parameter 'nr' to __set_breakpoint() which indicates >>>> which DAWR should be programed. Also convert current_brk variable >>>> to an array. >>>> >>>> Signed-off-by: Ravi Bangoria >>>> --- >>>>   arch/powerpc/include/asm/debug.h         |  2 +- >>>>   arch/powerpc/include/asm/hw_breakpoint.h |  2 +- >>>>   arch/powerpc/kernel/hw_breakpoint.c      |  8 ++++---- >>>>   arch/powerpc/kernel/process.c            | 14 +++++++------- >>>>   arch/powerpc/kernel/signal.c             |  2 +- >>>>   arch/powerpc/xmon/xmon.c                 |  2 +- >>>>   6 files changed, 15 insertions(+), 15 deletions(-) >>>> >>>> diff --git a/arch/powerpc/include/asm/debug.h >>>> b/arch/powerpc/include/asm/debug.h >>>> index 7756026b95ca..6228935a8b64 100644 >>>> --- a/arch/powerpc/include/asm/debug.h >>>> +++ b/arch/powerpc/include/asm/debug.h >>>> @@ -45,7 +45,7 @@ static inline int debugger_break_match(struct >>>> pt_regs *regs) { return 0; } >>>>   static inline int debugger_fault_handler(struct pt_regs *regs) { >>>> return 0; } >>>>   #endif >>>> -void __set_breakpoint(struct arch_hw_breakpoint *brk); >>>> +void __set_breakpoint(struct arch_hw_breakpoint *brk, int nr); >>> >>> Same, I think it would make more sense to have nr as first argument. >> >> Sorry, didn't get your point. How will that help? >> > > Well, it is a tiny detail but for me it is more natural to first tel > which element you modify before telling how you modify it. > And the second advantage is that when you have a function get_something() paired with you set_something(), you can then have it as first argument in both functions. void set_something(int nr, type something) type get_something(int nr) But again, that's detail, so up to you. Christophe