Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8351713ybn; Tue, 1 Oct 2019 07:01:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuQAFOsOPHH7DmhCMtg2cXuDWYEOmYochhW204Xm+D/c17encqUveSwExPkYjagoAZxfHj X-Received: by 2002:a50:91d0:: with SMTP id h16mr26625558eda.152.1569938471200; Tue, 01 Oct 2019 07:01:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569938471; cv=none; d=google.com; s=arc-20160816; b=HX1QjfHJGeTMrPqo+Vg1rzRvG73deHp1qs9YhMg/Kl/CXc3JuVQbw4Gl0yOqeItoE4 l3/U77GY/nOxNDWJdsKLBu5qwv68/yCG20In9GmCOe0FBbecnUwVSSCacWP7icIL3F40 Z1VnJV2cqTHVnp5IhUc+E4Kdh68thnFvwSktNLroU6VPQ4oETbow1erhGDICWh52onER nSkjDxrmY+o0cba+Twm06LWzQ4KX3WqeeytxmKdwnPctmZLK5jaJ9Qu1lFhB31ggEL2R zSaSFQVCLUtGMvTbNen4aduON4LcTOZnYndVKAvh61nz61U8SJCkChvwZo4oL5AYK9Qu JMUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=xZEK9bcVsY2hd/8FUH/DYNQlXCwZdq3YBjZjLOcKlUk=; b=099Wl5gO1kFoHGsNSw5EDWOROIRXHAz7VY98Pr/3ca+XzdMHkbAk08P87PS4gr8B6y bvCtGAMLvMT68NuK+5OLwLpVD9F0+e2wucUh3fY5xxlicgJ0ZL5QKyAsx9jAK/WHbVgk bPBayPjOZwMQo8SwaxGBFYqITCu4Fv0GNZ6kheC0k/yqTZv5mpu46Z3WpKoJ2ZE7ayvI TUTBW8/Ezbu7dNOoQzBLLkdnWNTQbYxsVTvHqGYbEcifea9FkFUSEX/SYiDYx/VXAq8g j2ny5Vwx1AoJJyc8MFCPO+RvvgBgz3deTSe11q4pjxq7j6I2nZ0EKMDJIL9dZO8t82aB 0rJA== 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 op4si8695282ejb.77.2019.10.01.07.00.45; Tue, 01 Oct 2019 07:01:11 -0700 (PDT) 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 S1727063AbfJAN74 (ORCPT + 99 others); Tue, 1 Oct 2019 09:59:56 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:48220 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726710AbfJAN74 (ORCPT ); Tue, 1 Oct 2019 09:59:56 -0400 Received: (qmail 2179 invoked by uid 2102); 1 Oct 2019 09:59:55 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 1 Oct 2019 09:59:55 -0400 Date: Tue, 1 Oct 2019 09:59:55 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Arnaldo Carvalho de Melo cc: Ingo Molnar , Thomas Gleixner , Jiri Olsa , Namhyung Kim , Clark Williams , , , Arnaldo Carvalho de Melo , Adrian Hunter , Brendan Gregg , Greg Kroah-Hartman , =?UTF-8?q?Luis=20Cl=C3=A1udio=20Gon=C3=A7alves?= Subject: Re: [PATCH 06/24] tools headers uapi: Sync linux/usbdevice_fs.h with the kernel sources In-Reply-To: <20191001111216.7208-7-acme@kernel.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 1 Oct 2019, Arnaldo Carvalho de Melo wrote: > From: Arnaldo Carvalho de Melo > > To pick up the changes from: > > 4ed3350539aa ("USB: usbfs: Add a capability flag for runtime suspend") > 7794f486ed0b ("usbfs: Add ioctls for runtime power management") > > This triggers these changes in the kernel sources, automagically > supporting these new ioctls in the 'perf trace' beautifiers. > > Soon this will be used in things like filter expressions for tracepoints > in 'perf record', 'perf trace', 'perf top', i.e. filter expressions will > do a lookup to turn things like USBDEVFS_WAIT_FOR_RESUME into _IO('U', > 35) before associating the tracepoint expression to tracepoint perf > event. > > $ tools/perf/trace/beauty/usbdevfs_ioctl.sh > before > $ cp include/uapi/linux/usbdevice_fs.h tools/include/uapi/linux/usbdevice_fs.h > $ git diff > diff --git a/tools/include/uapi/linux/usbdevice_fs.h b/tools/include/uapi/linux/usbdevice_fs.h > index 78efe870c2b7..cf525cddeb94 100644 > --- a/tools/include/uapi/linux/usbdevice_fs.h > +++ b/tools/include/uapi/linux/usbdevice_fs.h > @@ -158,6 +158,7 @@ struct usbdevfs_hub_portinfo { > #define USBDEVFS_CAP_MMAP 0x20 > #define USBDEVFS_CAP_DROP_PRIVILEGES 0x40 > #define USBDEVFS_CAP_CONNINFO_EX 0x80 > +#define USBDEVFS_CAP_SUSPEND 0x100 > > /* USBDEVFS_DISCONNECT_CLAIM flags & struct */ > > @@ -223,5 +224,8 @@ struct usbdevfs_streams { > * extending size of the data returned. > */ > #define USBDEVFS_CONNINFO_EX(len) _IOC(_IOC_READ, 'U', 32, len) > +#define USBDEVFS_FORBID_SUSPEND _IO('U', 33) > +#define USBDEVFS_ALLOW_SUSPEND _IO('U', 34) > +#define USBDEVFS_WAIT_FOR_RESUME _IO('U', 35) > > #endif /* _UAPI_LINUX_USBDEVICE_FS_H */ > $ tools/perf/trace/beauty/usbdevfs_ioctl.sh > after > $ diff -u before after > --- before 2019-09-27 11:41:50.634867620 -0300 > +++ after 2019-09-27 11:42:07.453102978 -0300 > @@ -24,6 +24,9 @@ > [30] = "DROP_PRIVILEGES", > [31] = "GET_SPEED", > [32] = "CONNINFO_EX", > + [33] = "FORBID_SUSPEND", > + [34] = "ALLOW_SUSPEND", > + [35] = "WAIT_FOR_RESUME", > [3] = "RESETEP", > [4] = "SETINTERFACE", > [5] = "SETCONFIGURATION", > $ > > This addresses the following perf build warning: > > Warning: Kernel ABI header at 'tools/include/uapi/linux/usbdevice_fs.h' differs from latest version at 'include/uapi/linux/usbdevice_fs.h' > diff -u tools/include/uapi/linux/usbdevice_fs.h include/uapi/linux/usbdevice_fs.h This may sound silly, and undoubtedly the question has been asked before. Nevertheless... Why go to the time and trouble to detect differences between tools/include/uapi/linux/usbdevice_fs.h and include/uapi/linux/usbdevice_fs.h? Why not just make the first a symbolic link to the second? Or get rid of the first entirely, and change the source code so that it #include's the second? Alan Stern