From patchwork Mon Nov 14 14:02:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pratyush Anand X-Patchwork-Id: 9427585 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 106F760484 for ; Mon, 14 Nov 2016 14:05:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1C442875B for ; Mon, 14 Nov 2016 14:05:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E611A28762; Mon, 14 Nov 2016 14:05:43 +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 E937D2860F for ; Mon, 14 Nov 2016 14:05:42 +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 1c6Hrb-0001VV-Ey; Mon, 14 Nov 2016 14:03:59 +0000 Received: from mail-qk0-f171.google.com ([209.85.220.171]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c6Hr8-0001H4-Vk for linux-arm-kernel@lists.infradead.org; Mon, 14 Nov 2016 14:03:32 +0000 Received: by mail-qk0-f171.google.com with SMTP id x190so96150474qkb.0 for ; Mon, 14 Nov 2016 06:03:09 -0800 (PST) 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=dRPve8E6CIjshiTzz2zdt5WdYNQ8IKUhQYOU6oiCFStbTgRi/okMbvtf1AMdKsHRmn nxODFI+CjFFfntIGELw2IOeMmxPxfyvTly23qCToRs+tP9a3OAkz4GSxVPQiIfFRdAD8 jex+8qu0DppMWs/9Bb4MwxEXvtNIEnRl9wUM5H+dDpJS4J31hogB/dJ+Z0FFjRb7qtYD qc+HOznCe/sR7FLFAvvt7xQ23W580JzpF1yQdB3SmWmaOAE2uIpviPDrH3xe3//nFLZE JettRVy8gzCTSnsow+CkCN2WA23iArSeHPqlQfvrEbDs4ByM+PkglmYR1ORuLaytVNkk Uujg== X-Gm-Message-State: ABUngvdRvP8hnG7gi8Sfv9mLdvsNTEPlZz4q0eyZ4H4Zt9ohVFLnz7qzYTx+vSUAOeeYnEzx X-Received: by 10.55.65.75 with SMTP id o72mr9456754qka.19.1479132188051; Mon, 14 Nov 2016 06:03:08 -0800 (PST) Received: from localhost ([122.180.204.166]) by smtp.gmail.com with ESMTPSA id d127sm4073830qkf.34.2016.11.14.06.03.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Nov 2016 06:03:07 -0800 (PST) From: Pratyush Anand To: will.deacon@arm.com Subject: [PATCH V3 1/5] hw_breakpoint: Allow watchpoint of length 3, 5, 6 and 7 Date: Mon, 14 Nov 2016 19:32:42 +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-20161114_060331_244853_D715BAE0 X-CRM114-Status: GOOD ( 12.12 ) 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, };