From patchwork Tue Sep 27 04:23:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 9351579 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 7AF56600CB for ; Tue, 27 Sep 2016 08:02:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D7D828B01 for ; Tue, 27 Sep 2016 08:02:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 623562903B; Tue, 27 Sep 2016 08:02:41 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4370428FE1 for ; Tue, 27 Sep 2016 08:02:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 562516E61C; Tue, 27 Sep 2016 08:02:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) by gabe.freedesktop.org (Postfix) with ESMTPS id BD3606E5E8 for ; Tue, 27 Sep 2016 04:23:31 +0000 (UTC) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 3sjnl35gLyz9sXR; Tue, 27 Sep 2016 14:23:27 +1000 (AEST) From: Michael Ellerman To: Emilio =?utf-8?Q?L=C3=B3pez?= Subject: Re: [PATCH 1/7] selftest: sync: basic tests for sw_sync framework In-Reply-To: <56f420ed-e985-2433-31fd-50515d8bcd1c@collabora.co.uk> References: <20160921211205.22657-1-emilio.lopez@collabora.co.uk> <20160921211205.22657-2-emilio.lopez@collabora.co.uk> <87fuos8e25.fsf@concordia.ellerman.id.au> <56f420ed-e985-2433-31fd-50515d8bcd1c@collabora.co.uk> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Tue, 27 Sep 2016 14:23:25 +1000 Message-ID: <87ponq6kea.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 X-Mailman-Approved-At: Tue, 27 Sep 2016 08:02:23 +0000 Cc: devel@driverdev.osuosl.org, daniels@collabora.com, shuah@kernel.org, arve@android.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, emil.l.velikov@gmail.com, riandrews@android.com, linux-kselftest@vger.kernel.org, daniel.vetter@ffwll.ch, gustavo.padovan@collabora.co.uk, John.C.Harrison@Intel.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Emilio López writes: > El 22/09/16 a las 06:43, Michael Ellerman escribió: >> Emilio López writes: >> >> Please don't include the *kernel* headers, they're really not meant to >> be used in userspace programs :) >> >>> +CFLAGS += -I../../../../usr/include/ >> >> That is the correct place to get them from. They'll have been put there >> by 'make headers_install'. > > My inspiration here has been tools/testing/selftests/memfd/Makefile, > which does it this way. If I only include the ones on usr then it > doesn't build, as there's no sync_file.h available, even after running > make headers_install. How am I supposed to use the ioctls from there? It looks like it's missing from include/uapi/linux/Kbuild, you need to add it to the list of exported headers: cheers diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index dd604395606b..40411b4ff012 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -397,6 +397,7 @@ header-y += stddef.h header-y += string.h header-y += suspend_ioctls.h header-y += swab.h +header-y += sync_file.h header-y += synclink.h header-y += sysctl.h header-y += sysinfo.h