Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D86BFC05027 for ; Fri, 17 Feb 2023 20:25:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229837AbjBQUZI (ORCPT ); Fri, 17 Feb 2023 15:25:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjBQUZA (ORCPT ); Fri, 17 Feb 2023 15:25:00 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68663604C0 for ; Fri, 17 Feb 2023 12:23:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676665416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wrWT4jn5+t1KTthhCnIcACsrevlB9KLW8lZHoH25D7E=; b=culeujinE6SBzi+pwRtpFOR95gaksz42Sdo8kwmiQ1PUuqO10ec7knE4X4Q8V3rWHb09tw 9Dw4pyQQsVFNbnsTm4qlYmqmiRc722dhAOJyIiatl8X8UMZwdnplY4JdKWBlFCOO/6evIw nZmkAG0JGVtzmONuc/ffj9KjMTYFU+Y= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-134-pmZtnAr6MMexPvheSjz2rg-1; Fri, 17 Feb 2023 15:23:28 -0500 X-MC-Unique: pmZtnAr6MMexPvheSjz2rg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 245503C0F68E; Fri, 17 Feb 2023 20:23:28 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4925CC15BA0; Fri, 17 Feb 2023 20:23:25 +0000 (UTC) From: Thomas Huth To: linux-kernel@vger.kernel.org, Arnd Bergmann Cc: linux-arch@vger.kernel.org, Chas Williams <3chas3@gmail.com>, Palmer Dabbelt , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, Andrew Waterman , Albert Ou Subject: [PATCH 3/4] Move bp_type_idx to include/linux/hw_breakpoint.h Date: Fri, 17 Feb 2023 21:23:00 +0100 Message-Id: <20230217202301.436895-4-thuth@redhat.com> In-Reply-To: <20230217202301.436895-1-thuth@redhat.com> References: <20230217202301.436895-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Palmer Dabbelt This has a "#ifdef CONFIG_*" that used to be exposed to userspace. The names in here are so generic that I don't think it's a good idea to expose them to userspace (or even the rest of the kernel). There are multiple in-kernel users, so it's been moved to a kernel header file. Signed-off-by: Palmer Dabbelt Reviewed-by: Andrew Waterman Reviewed-by: Albert Ou Message-Id: <1447119071-19392-10-git-send-email-palmer@dabbelt.com> [thuth: Remove it also from tools/include/uapi/linux/hw_breakpoint.h] Signed-off-by: Thomas Huth --- include/linux/hw_breakpoint.h | 10 ++++++++++ include/uapi/linux/hw_breakpoint.h | 10 ---------- tools/include/uapi/linux/hw_breakpoint.h | 10 ---------- 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h index f319bd26b030..7fbb45911273 100644 --- a/include/linux/hw_breakpoint.h +++ b/include/linux/hw_breakpoint.h @@ -7,6 +7,16 @@ #ifdef CONFIG_HAVE_HW_BREAKPOINT +enum bp_type_idx { + TYPE_INST = 0, +#if defined(CONFIG_HAVE_MIXED_BREAKPOINTS_REGS) + TYPE_DATA = 0, +#else + TYPE_DATA = 1, +#endif + TYPE_MAX +}; + extern int __init init_hw_breakpoint(void); static inline void hw_breakpoint_init(struct perf_event_attr *attr) diff --git a/include/uapi/linux/hw_breakpoint.h b/include/uapi/linux/hw_breakpoint.h index 965e4d8606d8..1575d3ca6f0d 100644 --- a/include/uapi/linux/hw_breakpoint.h +++ b/include/uapi/linux/hw_breakpoint.h @@ -22,14 +22,4 @@ enum { HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X, }; -enum bp_type_idx { - TYPE_INST = 0, -#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS - TYPE_DATA = 0, -#else - TYPE_DATA = 1, -#endif - TYPE_MAX -}; - #endif /* _UAPI_LINUX_HW_BREAKPOINT_H */ diff --git a/tools/include/uapi/linux/hw_breakpoint.h b/tools/include/uapi/linux/hw_breakpoint.h index 965e4d8606d8..1575d3ca6f0d 100644 --- a/tools/include/uapi/linux/hw_breakpoint.h +++ b/tools/include/uapi/linux/hw_breakpoint.h @@ -22,14 +22,4 @@ enum { HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X, }; -enum bp_type_idx { - TYPE_INST = 0, -#ifdef CONFIG_HAVE_MIXED_BREAKPOINTS_REGS - TYPE_DATA = 0, -#else - TYPE_DATA = 1, -#endif - TYPE_MAX -}; - #endif /* _UAPI_LINUX_HW_BREAKPOINT_H */ -- 2.31.1