Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp174180ybl; Tue, 28 Jan 2020 21:18:39 -0800 (PST) X-Google-Smtp-Source: APXvYqy0X00PVb64uaWMSil1uUeTyqavvuGIWHzltI2tvTji8C3tZbVwSZBdAyTwlnMCHb1wqEKC X-Received: by 2002:a9d:6c01:: with SMTP id f1mr18455002otq.133.1580275119421; Tue, 28 Jan 2020 21:18:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580275119; cv=none; d=google.com; s=arc-20160816; b=oGARFugkWF5JwDDgTzcu/GJvURc/ScM3LZu+YJqwj2hUwErRZc+6nBbW6mdb+f7mAa YsHkK/8cCw26D/0XEVZ3W+zJ+tXeSXidP5sQEVNLA6UpTjwzRGRw4Bd+Xmp8WP2jKY0/ bzhTK2hLsoCNtr7wLgnjTdl3k44DOpEW0yiw3vGR7Fo4IxHAdcJaJZofqV4VHBE4Sbc2 Xc3vESg0OyZrYx1geQThSMF8e8q1z58/q2QHbueXIcXdJfq5QZxRfG4tf5RV6SBcUvhL XihUPMwWndX8HhbInv+onxMskqkMsT9nWvu9x0OlrZR4iPUYA3KYAMHbSPEb6sVm1Lp3 F1LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:subject:cc:from:to :in-reply-to; bh=fYJ7WXmQhlfsAEfryt1B+sdnvq+GviMzWLC6rasAsaE=; b=u63cKvKiMLNXLepzcYmAQIZpPhTaj0vL3GjMxRuy9ppfk4T1AbnrdlYsuKa0AMHVow YJY1eWFKjygQa2ROpPPsoOL2WDkAK65iMu6dRPM6p/jPIfee5Tll32Yp9OGwfUmlvp3c I+XaXE8qggJK0lFI3NpUelSEeYpoxApvovkBgIPJt4fIlk63sqcWOwIQn/KRtE4OROAQ z331nefTQUWvlSoQszmJDHKqMcyx0bj7ScOMQoADT/doU5Uxnp7rS03ykaipFIdIuZ3s QRgKyxa0klhc5AOrl5qlP+rvykyk6D6h6Cw+2x4ouhLMtZmAf0+HfYmtyQBUG8g64prt fGow== ARC-Authentication-Results: i=1; mx.google.com; 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 d2si576776oth.267.2020.01.28.21.18.27; Tue, 28 Jan 2020 21:18:39 -0800 (PST) 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; 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 S1726244AbgA2FR3 (ORCPT + 99 others); Wed, 29 Jan 2020 00:17:29 -0500 Received: from ozlabs.org ([203.11.71.1]:33401 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725966AbgA2FR2 (ORCPT ); Wed, 29 Jan 2020 00:17:28 -0500 Received: by ozlabs.org (Postfix, from userid 1034) id 486sDj4pFyz9sRs; Wed, 29 Jan 2020 16:17:25 +1100 (AEDT) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 39413ae009674c6ba745850515b551bbb9d6374b In-Reply-To: <05105deeaf63bc02151aea2cdeaf525534e0e9d4.1574790198.git.christophe.leroy@c-s.fr> To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , ravi.bangoria@linux.ibm.com From: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] powerpc/hw_breakpoints: Rewrite 8xx breakpoints to allow any address range size. Message-Id: <486sDj4pFyz9sRs@ozlabs.org> Date: Wed, 29 Jan 2020 16:17:25 +1100 (AEDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-11-26 at 17:43:29 UTC, Christophe Leroy wrote: > Unlike standard powerpc, Powerpc 8xx doesn't have SPRN_DABR, but > it has a breakpoint support based on a set of comparators which > allow more flexibility. > > Commit 4ad8622dc548 ("powerpc/8xx: Implement hw_breakpoint") > implemented breakpoints by emulating the DABR behaviour. It did > this by setting one comparator the match 4 bytes at breakpoint address > and the other comparator to match 4 bytes at breakpoint address + 4. > > Rewrite 8xx hw_breakpoint to make breakpoints match all addresses > defined by the breakpoint address and length by making full use of > comparators. > > Now, comparator E is set to match any address greater than breakpoint > address minus one. Comparator F is set to match any address lower than > breakpoint address plus breakpoint length. Addresses are aligned > to 32 bits. > > When the breakpoint range starts at address 0, the breakpoint is set > to match comparator F only. When the breakpoint range end at address > 0xffffffff, the breakpoint is set to match comparator E only. > Otherwise the breakpoint is set to match comparator E and F. > > At the same time, use registers bit names instead of hardcoded values. > > Signed-off-by: Christophe Leroy > Cc: Ravi Bangoria Series applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/39413ae009674c6ba745850515b551bbb9d6374b cheers