Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3622958ybh; Tue, 17 Mar 2020 03:37:33 -0700 (PDT) X-Google-Smtp-Source: ADFU+vs1U/PkggrlNcNniX2BJAHbMxvPocehA1REpAOqYYXt30CmB3Z0hVc7W1OLdp7/Fa7ZJxkx X-Received: by 2002:a9d:2028:: with SMTP id n37mr3245703ota.127.1584441452977; Tue, 17 Mar 2020 03:37:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584441452; cv=none; d=google.com; s=arc-20160816; b=RqRXFPtUhc+ALZx2S5EN2i1eyyYsFPV45hWc42ROQuCKkCfUVBE9pyKbbB5V9MPO7a TFIZzm5hkV5lMKGHO2TsphjB8Q2+2tJ/y4p+wHM+2AxPtYIUhQnwTVlDhMoOONFopTru CRWtIJPnVLyu9zdyKrtZBylJRl9WknrvPbmohVpAY8GF3nQZHpOZBm9CG2bXTXnIiIIk 67HsamqPar6pWG9314ZG5ow2NlSdEv4s4VWU4kSfBYuD69Yzyg7CsxM4T9axkMOuHy2S XbqB4fO8hAFkiDaqSldwJnzvvnFNXFQcCH9RkW2XGeMQcq6MjTjBkD+ZRqw+5deGJ79J NDMg== 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:from:references:cc:to:subject:dkim-signature; bh=A+PMivXF8uTOY5GbFU434SmPOEkpNOTireCO2xVWYl0=; b=xOyn9Z51H9STTtlz73nXAfW/SvkADqR/YEgunXdxgvFY2txVDnu4b4pGP1unJftiIF S3NEfUeH9d0x2PW272O7QX9/x3TM3K7wDyNwLn3V5/rKk/qSl3+6x75Bc0FwE2nR0v8U DPZ36jDs8oyME7idCoIkMx5neJSSlEKLM8w26IQVSWxhorXDIujRcW9YJVv71sXJzT87 w2vd56iYclrh2+d2p7lvILc7lHtQq+awNRZ27WWDn7/nKiM4HC9pR6S5YhfSBUB21oYs PFvGB0cRUbu/8iIrt6+Xr6MpKEaZROSbjK9IbiCfGk2x+TIv7gPDe5QuGGz9S1RO3IVO RDrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=mkaK6jid; 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 k81si1534842oif.105.2020.03.17.03.37.20; Tue, 17 Mar 2020 03:37:32 -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=mkaK6jid; 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 S1726329AbgCQKf3 (ORCPT + 99 others); Tue, 17 Mar 2020 06:35:29 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:55577 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725995AbgCQKf2 (ORCPT ); Tue, 17 Mar 2020 06:35:28 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 48hV1T3fyXz9tyNJ; Tue, 17 Mar 2020 11:35:25 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=mkaK6jid; 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 0CaV5ugBkrom; Tue, 17 Mar 2020 11:35:25 +0100 (CET) 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 48hV1T2YLTz9tyN5; Tue, 17 Mar 2020 11:35:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1584441325; bh=A+PMivXF8uTOY5GbFU434SmPOEkpNOTireCO2xVWYl0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=mkaK6jidkr43As4esiENyHFYX84ztCbm8h4X0bLyvndSpFGjyOqOyTihyQk5cxx16 Psg76xPSO6QvcZA/j78sx4oZPGGnnKZRu8EvzM17zvgCRBIhVTNs9DRZi37lVR4XH8 JeMdo4namM1z0N8G3A23mnKwcqC+CD5cu6qxPIe0= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6C6DB8B785; Tue, 17 Mar 2020 11:35:26 +0100 (CET) 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 FkbONcCnIi0G; Tue, 17 Mar 2020 11:35:26 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 8B67B8B787; Tue, 17 Mar 2020 11:35:24 +0100 (CET) Subject: Re: [PATCH 08/15] powerpc/watchpoint: Disable all available watchpoints when !dawr_force_enable To: Ravi Bangoria , mpe@ellerman.id.au, mikey@neuling.org Cc: apopple@linux.ibm.com, paulus@samba.org, npiggin@gmail.com, naveen.n.rao@linux.vnet.ibm.com, peterz@infradead.org, jolsa@kernel.org, oleg@redhat.com, fweisbec@gmail.com, mingo@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20200309085806.155823-1-ravi.bangoria@linux.ibm.com> <20200309085806.155823-9-ravi.bangoria@linux.ibm.com> From: Christophe Leroy Message-ID: <1381b9f9-4999-0e03-8344-af84a88fa074@c-s.fr> Date: Tue, 17 Mar 2020 11:35:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200309085806.155823-9-ravi.bangoria@linux.ibm.com> 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 09/03/2020 à 09:57, Ravi Bangoria a écrit : > Instead of disabling only first watchpoint, disable all available > watchpoints while clearing dawr_force_enable. > > Signed-off-by: Ravi Bangoria > --- > arch/powerpc/kernel/dawr.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/arch/powerpc/kernel/dawr.c b/arch/powerpc/kernel/dawr.c > index 311e51ee09f4..5c882f07ac7d 100644 > --- a/arch/powerpc/kernel/dawr.c > +++ b/arch/powerpc/kernel/dawr.c > @@ -50,9 +50,13 @@ int set_dawr(struct arch_hw_breakpoint *brk, int nr) > return 0; > } > > -static void set_dawr_cb(void *info) > +static void disable_dawrs(void *info) Can you explain a bit more what you do exactly ? Why do you change the name of the function and why the parameter becomes NULL ? And why it doens't take into account the parameter anymore ? > { > - set_dawr(info, 0); > + struct arch_hw_breakpoint null_brk = {0}; > + int i; > + > + for (i = 0; i < nr_wp_slots(); i++) > + set_dawr(&null_brk, i); > } > > static ssize_t dawr_write_file_bool(struct file *file, > @@ -74,7 +78,7 @@ static ssize_t dawr_write_file_bool(struct file *file, > > /* If we are clearing, make sure all CPUs have the DAWR cleared */ > if (!dawr_force_enable) > - smp_call_function(set_dawr_cb, &null_brk, 0); > + smp_call_function(disable_dawrs, NULL, 0); > > return rc; > } > Christophe