From patchwork Fri Feb 17 20:22:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 58767 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp52983wrn; Fri, 17 Feb 2023 12:27:03 -0800 (PST) X-Google-Smtp-Source: AK7set/ZVgu5hMMFUZSSEGu4a8yfFxbVTv6H1PHT8g8M+wNlxpZIo0ZZiqhZ9wLpG9arEiGZgOh1 X-Received: by 2002:a17:903:1385:b0:19a:ec65:c9cc with SMTP id jx5-20020a170903138500b0019aec65c9ccmr5608218plb.16.1676665623126; Fri, 17 Feb 2023 12:27:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676665623; cv=none; d=google.com; s=arc-20160816; b=oNaHnZ3JUsXh6yR/t8vjYnWfiCsSaXDI4A5Bn3eFYh2WiYvLi3VUY+v078HEDvj9wi yB8ggeNCChU8XAr5qgZf+FosUvs9II7ze0dxsZvTNgyFuwKveGNmxx7WNfqFb8AVQ/qa haxUm5GVOwGzoi4odzhkxIvazzwZKjWXWeASGGbbEZWss4O/nXqUm1Fz13AQgjUlxj2j A8+4Zh+Msxq0QcZ8iyjJs74ludcLLtMG7NtZ9LGMETsiBTJ4T36V0dZ2cwQgm5e3/iru 4urGdAcfRhTfEstgvMMmjdFP4p+dSTjIay/by+a3eNQpkLNn1m7I/MTZYv+bMF71hXHr NLaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jNwMQS2nb5Snx2PKXCZ6inX1tp7FOHWAWLevabGCm8U=; b=OwKfGRXY0sNpzkhoWaq2EXj07KnWJcg/fZR0P5+nz/zh4ItXGztz293PYzbN460V1S KOm6ZSSsJvz954prRUXlmd2wH5WTN5veaKOklhZ0tYX3o/fIntkFNpBErC4XZLYROnT4 rEM/0iuCJBhC/uQxsDqxcJdfykXjAsrjNI+oLyE2MkTwp/dtfwuEa1UV5b43sQ9MnNZu k9V14QJRCl//tuepBFzHPnle9ffDIK6X4vDvoZuPLb8xCQp6Xxoevh8ACPlO6Y/0i1Fi u296ISi6fppANhbU+qor2jX4F+plP+Go/dQIrGUgVMRhJsf9aRsiW2GUj6zp3iZgPbTp uWUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Ki3qJE/S"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q4-20020a17090311c400b0019c33978781si472184plh.283.2023.02.17.12.26.50; Fri, 17 Feb 2023 12:27:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Ki3qJE/S"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229477AbjBQUYj (ORCPT + 99 others); Fri, 17 Feb 2023 15:24:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjBQUYe (ORCPT ); Fri, 17 Feb 2023 15:24:34 -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 A9DE960A5D for ; Fri, 17 Feb 2023 12:23:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676665406; 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=jNwMQS2nb5Snx2PKXCZ6inX1tp7FOHWAWLevabGCm8U=; b=Ki3qJE/S/vtuF2jzTCXjOeSJTWQqrF9ZSMCCYM+2H8OzlMb92+kVVaYnpHwGMI642JyHos sMLw2UD2n+rMHqMB4Lgv1ZzJRcQ3nfMP0KWcp7ztwRqSNEkj+2KaQInaaUGfWUdn35sDgP ca8EvxuzdwD7HlbRlbqLCEtBgfE610U= 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-136-1e9Ia_q4NjmCzRE9jXbKHA-1; Fri, 17 Feb 2023 15:23:21 -0500 X-MC-Unique: 1e9Ia_q4NjmCzRE9jXbKHA-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 C4F601C05B03; Fri, 17 Feb 2023 20:23:20 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 77C15C15BA0; Fri, 17 Feb 2023 20:23:17 +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 1/4] Move COMPAT_ATM_ADDPARTY to net/atm/svc.c Date: Fri, 17 Feb 2023 21:22:58 +0100 Message-Id: <20230217202301.436895-2-thuth@redhat.com> In-Reply-To: <20230217202301.436895-1-thuth@redhat.com> References: <20230217202301.436895-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758111332612217956?= X-GMAIL-MSGID: =?utf-8?q?1758111332612217956?= From: Palmer Dabbelt This used to be behind an #ifdef COMPAT_COMPAT, so most of userspace wouldn't have seen the definition before. Unfortunately this header file became visible to userspace, so the definition has instead been moved to net/atm/svc.c (the only user). Signed-off-by: Palmer Dabbelt Reviewed-by: Andrew Waterman Reviewed-by: Albert Ou Message-Id: <1447119071-19392-4-git-send-email-palmer@dabbelt.com> Reviewed-by: Arnd Bergmann Signed-off-by: Thomas Huth Reviewed-by: Christoph Hellwig --- include/uapi/linux/atmdev.h | 4 ---- net/atm/svc.c | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/uapi/linux/atmdev.h b/include/uapi/linux/atmdev.h index a5c15cf23bd7..20b0215084fc 100644 --- a/include/uapi/linux/atmdev.h +++ b/include/uapi/linux/atmdev.h @@ -101,10 +101,6 @@ struct atm_dev_stats { /* use backend to make new if */ #define ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf) /* add party to p2mp call */ -#ifdef CONFIG_COMPAT -/* It actually takes struct sockaddr_atmsvc, not struct atm_iobuf */ -#define COMPAT_ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct compat_atm_iobuf) -#endif #define ATM_DROPPARTY _IOW('a', ATMIOC_SPECIAL+5,int) /* drop party from p2mp call */ diff --git a/net/atm/svc.c b/net/atm/svc.c index 4a02bcaad279..d83556d8beb9 100644 --- a/net/atm/svc.c +++ b/net/atm/svc.c @@ -28,6 +28,11 @@ #include "signaling.h" #include "addr.h" +#ifdef CONFIG_COMPAT +/* It actually takes struct sockaddr_atmsvc, not struct atm_iobuf */ +#define COMPAT_ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL + 4, struct compat_atm_iobuf) +#endif + static int svc_create(struct net *net, struct socket *sock, int protocol, int kern); From patchwork Fri Feb 17 20:22:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 58768 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp53238wrn; Fri, 17 Feb 2023 12:27:40 -0800 (PST) X-Google-Smtp-Source: AK7set+CjmVnVQp/cKWcC5z8WNtrGtX9KFxsTSziiL6jQQZFHqLqYKWJTBOn8UUeQZ4cn2TJeAlA X-Received: by 2002:a05:6a20:914d:b0:c6:babf:e49a with SMTP id x13-20020a056a20914d00b000c6babfe49amr2044787pzc.48.1676665659921; Fri, 17 Feb 2023 12:27:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676665659; cv=none; d=google.com; s=arc-20160816; b=iio28kx3Wb3enCo1Q7X21z8MH5KWXpbKxuKwOvX3WCmQ2MtEJ05pqThqp+hTA5b2yC V/eunLxyGtUqWkjoRW+h7/010jL+PhcOfRWrYN7RKWsL7qc6qWkNIGQanTOYXPdUKQR+ v225jEtBWEGwBcA3sHl/+WlxEUzkOU/VKxy8t9GLOL31ozOpMDXaXPSV64w+oM0Awr2Q 9ydexp/XmtYLqZeT8+3/jqtUo991VTtM4n8sr/xXmEoozOOh/eKsw5khy2O5Pi91ESJG Q+JqUT2sb5zI4bX8kqii3kh0Q2c6knTrvT1x52hXLJwOzHsXxRvTeYuHSjACxNIjnCFb mmFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0Vkw80Lh2WZ1pgTqp4QzUJ+bx7WsMyBCfB53lcaCvBU=; b=KWyq5VvrGY+iYzIvavErGxtcdoKn5WMFdeWvyEtEi3uQ3goR3cGWRw0dvZR4IdADSM lF82VMeSEpL4qdLVaTGggRfdMWH8zVMv3VAVXp5a1j7bgGLi2lcGLzsFvYbEEmVFBeQr 2GnUZV9cO51lHdaWKHbwfoVVc9Lvf5tsYAGqm4HzLFvyjsHKXCC+3dbBWO9xxxmfYz/r CONUja9S51R5XgC5/iDQYJFb+qYU/C4CYs5csQKJVBKnSvp+UUvXEuZcu5tWHBwdgQzQ WymjqB88bGQW6ewWZVOpyk/7HNIUV58fjx7Dh26yRe/Io+Y1BJjWUbVzq98zmHlCBpf/ po6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Y0ojCTrI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x17-20020a056a00189100b005a8b3c6b5c1si6428934pfh.245.2023.02.17.12.27.27; Fri, 17 Feb 2023 12:27:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Y0ojCTrI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229760AbjBQUYr (ORCPT + 99 others); Fri, 17 Feb 2023 15:24:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbjBQUYj (ORCPT ); Fri, 17 Feb 2023 15:24:39 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8774160FBB for ; Fri, 17 Feb 2023 12:23:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676665408; 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=0Vkw80Lh2WZ1pgTqp4QzUJ+bx7WsMyBCfB53lcaCvBU=; b=Y0ojCTrI4Gzi1vCd1WtRpJ/kQxHIFgyZ8+FqxzlDp+4aLb9HJpKlPckU+XoAYkZoslF3Oz IsggM+eMvTUsGoERxZTV5U4w0/qZeekBdMuWu2Cb87g8sBImHpcg1H68lYCXDoJMAVABdD fnCxjg9X1HIXJ1OpnRJnHy3sbS5Ak7s= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-599-NbWsCke6M9-NvswkNOAIJQ-1; Fri, 17 Feb 2023 15:23:25 -0500 X-MC-Unique: NbWsCke6M9-NvswkNOAIJQ-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 C4FD085A5A3; Fri, 17 Feb 2023 20:23:24 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 46E71C15BA0; Fri, 17 Feb 2023 20:23:21 +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 2/4] Move ep_take_care_of_epollwakeup() to fs/eventpoll.c Date: Fri, 17 Feb 2023 21:22:59 +0100 Message-Id: <20230217202301.436895-3-thuth@redhat.com> In-Reply-To: <20230217202301.436895-1-thuth@redhat.com> References: <20230217202301.436895-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758111370814134354?= X-GMAIL-MSGID: =?utf-8?q?1758111370814134354?= From: Palmer Dabbelt This doesn't make any sense to expose to userspace, so it's been moved to the one user. This was introduced by commit 95f19f658ce1 ("epoll: drop EPOLLWAKEUP if PM_SLEEP is disabled"). Signed-off-by: Palmer Dabbelt Reviewed-by: Andrew Waterman Reviewed-by: Albert Ou Message-Id: <1447119071-19392-7-git-send-email-palmer@dabbelt.com> [thuth: Rebased to fix contextual conflicts] Signed-off-by: Thomas Huth Reviewed-by: Arnd Bergmann Reviewed-by: Christoph Hellwig --- fs/eventpoll.c | 13 +++++++++++++ include/uapi/linux/eventpoll.h | 12 ------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 64659b110973..e2a5d2cc9051 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -2042,6 +2042,19 @@ SYSCALL_DEFINE1(epoll_create, int, size) return do_epoll_create(0); } +#ifdef CONFIG_PM_SLEEP +static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev) +{ + if ((epev->events & EPOLLWAKEUP) && !capable(CAP_BLOCK_SUSPEND)) + epev->events &= ~EPOLLWAKEUP; +} +#else +static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev) +{ + epev->events &= ~EPOLLWAKEUP; +} +#endif + static inline int epoll_mutex_lock(struct mutex *mutex, int depth, bool nonblock) { diff --git a/include/uapi/linux/eventpoll.h b/include/uapi/linux/eventpoll.h index e687658843b1..cfbcc4cc49ac 100644 --- a/include/uapi/linux/eventpoll.h +++ b/include/uapi/linux/eventpoll.h @@ -85,16 +85,4 @@ struct epoll_event { __u64 data; } EPOLL_PACKED; -#ifdef CONFIG_PM_SLEEP -static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev) -{ - if ((epev->events & EPOLLWAKEUP) && !capable(CAP_BLOCK_SUSPEND)) - epev->events &= ~EPOLLWAKEUP; -} -#else -static inline void ep_take_care_of_epollwakeup(struct epoll_event *epev) -{ - epev->events &= ~EPOLLWAKEUP; -} -#endif #endif /* _UAPI_LINUX_EVENTPOLL_H */ From patchwork Fri Feb 17 20:23:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 58769 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp53558wrn; Fri, 17 Feb 2023 12:28:34 -0800 (PST) X-Google-Smtp-Source: AK7set/3cIcaLwNRfoiYzgMukeyQOdCLNexIP9gPS8/Kwhgwzi8blj7eacWg3cdnqa0cdkxDlRKr X-Received: by 2002:a17:902:d48a:b0:19a:a520:b1fc with SMTP id c10-20020a170902d48a00b0019aa520b1fcmr8060965plg.14.1676665714528; Fri, 17 Feb 2023 12:28:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676665714; cv=none; d=google.com; s=arc-20160816; b=cnw7M7cFZ0xWsH5QbqQGRXhno3Pbct8onEv/8K0xIUeGkuDEs/19e7VaSgCc++G6xz Kg8a10iVLW5OP2G7Zhj5xIftBjtH3k1WSEj45OavrYuuiJzyit/5mRyK7dpNx1SwAtFp Y+Swq4m0HM2oE/7dIwZWACQjGf5wOvz1DRFP0EqltDFbMfMTb39bg5VBIQtpXm93fELL 2IMkN84733ktGFUaJj/N9oTFL57Xsc8h1873GB6zBQXl9bXveAjc6qFrOqDRbSWtjerX 0XMymggkrNObL+WTelbHPfBOxuWHNwFfOTM08aTW2e7rnUHuBKYOrvk0wLJY00vmNwuY gFMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wrWT4jn5+t1KTthhCnIcACsrevlB9KLW8lZHoH25D7E=; b=zBbH6EfbiLWBEgH2/73GbeYCoisyxb5yLlydqU7rO/S7WsDjIlgFtVvo2O3LMpoBgv jTMB2yRBfe1qUHMyi2ntHtB3mvPT6mx326F0zDu1Vl4cRt2KXGCU/77VW4qMlclrQlxk rriy/R887CFxnaF/vFpW/ByMoAfoxy/SP+mhqM+TIZkLG7AC+OhwuPdFnUZkK5ZrD+VV emIsvSAiXnvs3P6QvESlIVQ694MX9vmvQlkASle9T8fDFe1pyHbaabluw38KbZsXeAMy eaibF99ba4qLUTnfhkCwjr/caPF2nazjsyoulI0Wy5jT2xovJ7h6cTIP1oBr/Bb7EaO0 57UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=culeujin; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p23-20020a1709027ed700b0019a95a281b9si613550plb.84.2023.02.17.12.28.20; Fri, 17 Feb 2023 12:28:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=culeujin; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229824AbjBQUZG (ORCPT + 99 others); Fri, 17 Feb 2023 15:25:06 -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 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758111428044992220?= X-GMAIL-MSGID: =?utf-8?q?1758111428044992220?= 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 Reviewed-by: Arnd Bergmann Reviewed-by: Christoph Hellwig --- 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 */ From patchwork Fri Feb 17 20:23:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 58770 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp53681wrn; Fri, 17 Feb 2023 12:28:56 -0800 (PST) X-Google-Smtp-Source: AK7set9mgQAKMZyQHQ/tKY5D1I2R5g/KgbsND01wtyEyEL6BLaY+/3byRtgXdAVtz+6oe4QH5COF X-Received: by 2002:a17:906:4081:b0:88c:617f:bcf8 with SMTP id u1-20020a170906408100b0088c617fbcf8mr159082ejj.61.1676665736366; Fri, 17 Feb 2023 12:28:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676665736; cv=none; d=google.com; s=arc-20160816; b=H28huVT11omJejoKyD22aJELdKZ9YiWtdUaiBDP2qbOPbXUGGGppNhJzi9NG7fIFqQ ++9yh50ZGzIzo/bPBP4QXNd7CNa8sl7RXBFTVKOiJVPJbfXLUHhOq6+A814vnwZCbO0p kpphwTHOjdA87rfLurwPbkhqJMOj3z0BY+mdlseaj762JNjSn06xEB6twbIhgGUoCP8o rYgUJF8y7EmzvEESsvx4rX3ApdK1Dg/HIY5sfdAAH3PleH20U4dwxG+NDg73r28mnYWf qFX8OpNlsRHd62Oo1payOs4ivYaBLjtm9WkLGkGkee5wphca2ezZGfeZBmS7Tmzl4oSB ZsJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=s8KVm+rH4OiProm3VFkUTkkgWGgDejSqetBx+uMahJ4=; b=PDexV3D9nzO4+SsFUx7AN+OV5e6KxNMzXR8ySQIKyuK8Cekh9FpW/OCuFrFp9cr7bH ZqYXmP00SrLJgEroGOg7pxmJdaV/U1tEma1WZW/oW8wTp+FSbb1cuwfUfaZF0eFvTu03 zsdkxgfqg7yNW3uo+LQc46jESLXrxmHsIkBv0Wpm4J3zijOeX9V51KMLiTTPqr1yR/zo 3WlksAECp+04DZJPgUv0KM2YvZF2hqvZxv1yW/rHsZh9/CGqLfH7dSxMl5rwoJnUHrrv 8uWvQmjSGS/a7qA2SuPm+3K8ldG+gTu1ggmNU0os//Pjr3ZnOEtThFDAzzClTeaEWgoj kdVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dmEp0VQw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v20-20020a17090610d400b008835feef9a6si8229412ejv.491.2023.02.17.12.28.33; Fri, 17 Feb 2023 12:28:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dmEp0VQw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229793AbjBQUZN (ORCPT + 99 others); Fri, 17 Feb 2023 15:25:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229766AbjBQUZB (ORCPT ); Fri, 17 Feb 2023 15:25:01 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FCA460F83 for ; Fri, 17 Feb 2023 12:23:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676665420; 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=s8KVm+rH4OiProm3VFkUTkkgWGgDejSqetBx+uMahJ4=; b=dmEp0VQw8Pe4imYBMFoapzPsiGsLfFsDWtXDjRu3kFVvXBnvIWN592Q1SaELE80BKJd/QZ XDj/r+w2WzQ9YHxjuUG8UL9moQsH/zSYMp0b/osEn95m1REAvcujzTJlWgpxWvdYrhKDKW NdjiujSoi6QkIgwIkQSmnOd6fuSz1co= 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-533-aZh4fNSdOp27lS4lj24o0A-1; Fri, 17 Feb 2023 15:23:34 -0500 X-MC-Unique: aZh4fNSdOp27lS4lj24o0A-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 414092805586; Fri, 17 Feb 2023 20:23:33 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6B920C15BA0; Fri, 17 Feb 2023 20:23:28 +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 4/4] Move USE_WCACHING to drivers/block/pktcdvd.c Date: Fri, 17 Feb 2023 21:23:01 +0100 Message-Id: <20230217202301.436895-5-thuth@redhat.com> In-Reply-To: <20230217202301.436895-1-thuth@redhat.com> References: <20230217202301.436895-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758111451409643527?= X-GMAIL-MSGID: =?utf-8?q?1758111451409643527?= From: Palmer Dabbelt I don't think this was ever intended to be exposed to userspace, but it did require an "#ifdef CONFIG_*". Since the name is kind of generic and was only used in one place, I've moved the definition to the one user. Signed-off-by: Palmer Dabbelt Reviewed-by: Andrew Waterman Reviewed-by: Albert Ou Message-Id: <1447119071-19392-11-git-send-email-palmer@dabbelt.com> Signed-off-by: Thomas Huth Reviewed-by: Arnd Bergmann --- drivers/block/pktcdvd.c | 11 +++++++++++ include/uapi/linux/pktcdvd.h | 11 ----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 2f1a92509271..1d5ec8d9d1a5 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -90,6 +90,17 @@ do { \ #define MAX_SPEED 0xffff +/* + * use drive write caching -- we need deferred error handling to be + * able to successfully recover with this option (drive will return good + * status as soon as the cdb is validated). + */ +#if defined(CONFIG_CDROM_PKTCDVD_WCACHE) +#define USE_WCACHING 1 +#else +#define USE_WCACHING 0 +#endif + static DEFINE_MUTEX(pktcdvd_mutex); static struct pktcdvd_device *pkt_devs[MAX_WRITERS]; static struct proc_dir_entry *pkt_proc; diff --git a/include/uapi/linux/pktcdvd.h b/include/uapi/linux/pktcdvd.h index 9cbb55d21c94..6a5552dfd6af 100644 --- a/include/uapi/linux/pktcdvd.h +++ b/include/uapi/linux/pktcdvd.h @@ -29,17 +29,6 @@ */ #define PACKET_WAIT_TIME (HZ * 5 / 1000) -/* - * use drive write caching -- we need deferred error handling to be - * able to successfully recover with this option (drive will return good - * status as soon as the cdb is validated). - */ -#if defined(CONFIG_CDROM_PKTCDVD_WCACHE) -#define USE_WCACHING 1 -#else -#define USE_WCACHING 0 -#endif - /* * No user-servicable parts beyond this point -> */