Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3985843imm; Wed, 5 Sep 2018 08:57:40 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZq9ARwQWN1RwB+Oacik75PTyJlq5rdGBh71sxCoPv6xdG4cgRaKYdP2tVDFbw5U7sO7RX2 X-Received: by 2002:a62:c182:: with SMTP id i124-v6mr40817026pfg.248.1536163060503; Wed, 05 Sep 2018 08:57:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536163060; cv=none; d=google.com; s=arc-20160816; b=tV9uvxraD5JLYymfzC5HuZPMUmiFxgVP71rDB9Z4RZbOrT1lwrNRlcbSGRcd9Iaf06 tGpXSsidEJ6v4aPVXQWHJZcjTDpQ4aP/DJPJ+FTn4WvXofQmo9xH/rkK53h1x30A9QaP I2yFVvCBb70MjNMfSIUNG0Z/Fsxwb9wderVOMQJeva5+HCnBWE+lkxFjt8wdKDgSHuFE GOu87UhdAYr1gnX/C+xsSEMXGarKI7XvtQ7GlaZKbskY0xE86RiwgYWlwjnCc0GXd7Xs DZdeCKzxEqmExMrk2P5cV9nyk/LGYasHUVcIptww4sttpu5J1pyr2RA1Vs65bayT4dJw ktzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:organization; bh=Vfu3uO6x7USvCMCJUZBJ0M4zu8/jMx2e2AxDhwDA6Os=; b=jds7d1XV2VLAWSTddXL4gmKjKANsj31JEw/s9DduEagaLT2B7yzXi8oUDjimP69q8Z 01nF0FpOMGnWEoCkRXrTmjOx9F+4AC5FTYGk6LonRkUwTAu3vUUYkyCkE0g65G2WQANL FXybNMzTh6lhdpg5czIQARh2ZZfrXBPNAU5NXFUEcy6mdgpUdoBQrn9X3ipbQtWh5Ldt GkzUaV6G2dkzb3s50yxaTsYvFEIZiUlY4kEPrk97QRlo2kM0XuoKs/FDv2+xg1R+0wEh Y8c18TpMuf56pLViA7yaPbAAZQGm3JVFsrA1clJ9cocXe7u1KvL2jzcmQdMYY6B8Ydy8 o+2Q== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d5-v6si2121344pgq.316.2018.09.05.08.57.25; Wed, 05 Sep 2018 08:57:40 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727942AbeIEU0e (ORCPT + 99 others); Wed, 5 Sep 2018 16:26:34 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:34108 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726189AbeIEU0d (ORCPT ); Wed, 5 Sep 2018 16:26:33 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 81C7A40216E3; Wed, 5 Sep 2018 15:55:45 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-123-84.rdu2.redhat.com [10.10.123.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id AFD782156701; Wed, 5 Sep 2018 15:55:44 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH 10/11] UAPI: ndctl: Remove use of PAGE_SIZE From: David Howells To: linux-api@vger.kernel.org, linux-kbuild@vger.kernel.org Cc: Dan Williams , linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, dhowells@redhat.com Date: Wed, 05 Sep 2018 16:55:44 +0100 Message-ID: <153616294415.23468.9444162145650526598.stgit@warthog.procyon.org.uk> In-Reply-To: <153616286704.23468.584491117180383924.stgit@warthog.procyon.org.uk> References: <153616286704.23468.584491117180383924.stgit@warthog.procyon.org.uk> User-Agent: StGit/unknown-version MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 05 Sep 2018 15:55:45 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 05 Sep 2018 15:55:45 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dhowells@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The macro PAGE_SIZE isn't valid outside of the kernel, so it should not appear in UAPI headers. Furthermore, the actual machine page size could theoretically change from an application's point of view if it's running in a container that gets migrated to another machine (say 4K/ppc64 to 64K/ppc64). Fixes: f2ba5a5baecf ("libnvdimm, namespace: make min namespace size 4K") Signed-off-by: David Howells cc: Dan Williams cc: linux-nvdimm@lists.01.org --- include/linux/ndctl.h | 22 ++++++++++++++++++++++ include/uapi/linux/ndctl.h | 4 ---- 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 include/linux/ndctl.h diff --git a/include/linux/ndctl.h b/include/linux/ndctl.h new file mode 100644 index 000000000000..cd5a293ce3ae --- /dev/null +++ b/include/linux/ndctl.h @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2014-2016, Intel Corporation. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU Lesser General Public License, + * version 2.1, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for + * more details. + */ +#ifndef _LINUX_NDCTL_H +#define _LINUX_NDCTL_H + +#include + +enum { + ND_MIN_NAMESPACE_SIZE = PAGE_SIZE, +}; + +#endif /* _LINUX_NDCTL_H */ diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h index 9c89159f6a0f..bcda968e6d80 100644 --- a/include/uapi/linux/ndctl.h +++ b/include/uapi/linux/ndctl.h @@ -216,10 +216,6 @@ enum nd_driver_flags { ND_DRIVER_DAX_PMEM = 1 << ND_DEVICE_DAX_PMEM, }; -enum { - ND_MIN_NAMESPACE_SIZE = PAGE_SIZE, -}; - enum ars_masks { ARS_STATUS_MASK = 0x0000FFFF, ARS_EXT_STATUS_SHIFT = 16,