From patchwork Thu Oct 20 05:48:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pratyush Anand X-Patchwork-Id: 9385951 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1E0A560487 for ; Thu, 20 Oct 2016 05:50:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 119C72995F for ; Thu, 20 Oct 2016 05:50:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0542929A64; Thu, 20 Oct 2016 05:50:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 96B7C2995F for ; Thu, 20 Oct 2016 05:50:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bx6E0-0006D7-DB; Thu, 20 Oct 2016 05:49:08 +0000 Received: from mail-qk0-f172.google.com ([209.85.220.172]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bx6Dg-00060m-VE for linux-arm-kernel@lists.infradead.org; Thu, 20 Oct 2016 05:48:49 +0000 Received: by mail-qk0-f172.google.com with SMTP id f128so69793188qkb.1 for ; Wed, 19 Oct 2016 22:48:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=rcjfbw+hlrhVEEJplKofqRBBbqQhEC+0jFYqi6Kit30=; b=cjuDSipdJ/z0MqXW2oFwfvHSp6sl4hLDjNlbbHQZ/rbDFYOflXH0ic1t7Ale8MP4Oe NeiP/tNxdM5I2eZjOZrcXA4YdPFQrSKvEno31c/F27gK23gLSDPkoq9cOcgMhvHj2ZKS bEq7Lxk/GFjRicCnWW1WLkIkB98+QCltRZ6ZoFbeI7VGIMTOP4P4Ne7w+peayRCBlpAC +Jp1EB21c7UJ8jrP1jEClmeJ7PxO0qgDbwA0ag6Uh0bn/z/DEprqSImvMySpeqZz+8f2 cCSDirzn8U6r+PzPyMtXFeHsW68HFu7TJyfo4yu+3Tn0KSBGEHTXymduP8hOQb1pp6ad B52g== X-Gm-Message-State: ABUngvd6X2IhZ6wtGSs4d4UEELvK1aSNDBjN6zywTkYt8zo41QIZBRfeKbKPhxMupRdE9tEK X-Received: by 10.55.100.134 with SMTP id y128mr10966604qkb.23.1476942507633; Wed, 19 Oct 2016 22:48:27 -0700 (PDT) Received: from localhost ([209.132.188.81]) by smtp.gmail.com with ESMTPSA id a94sm22790185qkh.11.2016.10.19.22.48.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Oct 2016 22:48:27 -0700 (PDT) From: Pratyush Anand To: will.deacon@arm.com Subject: [PATCH V2 1/5] hw_breakpoint: Allow watchpoint of length 3, 5, 6 and 7 Date: Thu, 20 Oct 2016 11:18:13 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161019_224849_124917_4A24FCD4 X-CRM114-Status: GOOD ( 13.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pratyush Anand , labath@google.com, onestero@redhat.com, linux-kernel@vger.kernel.org, jan.kratochvil@redhat.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP We only support breakpoint/watchpoint of length 1, 2, 4 and 8. If we can support other length as well, then user may watch more data with less number of watchpoints (provided hardware supports it). For example: if we have to watch only 4th, 5th and 6th byte from a 64 bit aligned address, we will have to use two slots to implement it currently. One slot will watch a half word at offset 4 and other a byte at offset 6. If we can have a watchpoint of length 3 then we can watch it with single slot as well. ARM64 hardware does support such functionality, therefore adding these new definitions in generic layer. Signed-off-by: Pratyush Anand --- include/uapi/linux/hw_breakpoint.h | 4 ++++ tools/include/uapi/linux/hw_breakpoint.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/include/uapi/linux/hw_breakpoint.h b/include/uapi/linux/hw_breakpoint.h index b04000a2296a..2b65efd19a46 100644 --- a/include/uapi/linux/hw_breakpoint.h +++ b/include/uapi/linux/hw_breakpoint.h @@ -4,7 +4,11 @@ enum { HW_BREAKPOINT_LEN_1 = 1, HW_BREAKPOINT_LEN_2 = 2, + HW_BREAKPOINT_LEN_3 = 3, HW_BREAKPOINT_LEN_4 = 4, + HW_BREAKPOINT_LEN_5 = 5, + HW_BREAKPOINT_LEN_6 = 6, + HW_BREAKPOINT_LEN_7 = 7, HW_BREAKPOINT_LEN_8 = 8, }; diff --git a/tools/include/uapi/linux/hw_breakpoint.h b/tools/include/uapi/linux/hw_breakpoint.h index b04000a2296a..2b65efd19a46 100644 --- a/tools/include/uapi/linux/hw_breakpoint.h +++ b/tools/include/uapi/linux/hw_breakpoint.h @@ -4,7 +4,11 @@ enum { HW_BREAKPOINT_LEN_1 = 1, HW_BREAKPOINT_LEN_2 = 2, + HW_BREAKPOINT_LEN_3 = 3, HW_BREAKPOINT_LEN_4 = 4, + HW_BREAKPOINT_LEN_5 = 5, + HW_BREAKPOINT_LEN_6 = 6, + HW_BREAKPOINT_LEN_7 = 7, HW_BREAKPOINT_LEN_8 = 8, };