Received: by 10.192.165.156 with SMTP id m28csp197259imm; Sun, 15 Apr 2018 20:54:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx4947+88PVjBaf8Oi7Mu/hHjSxEDE0oIemL8g1hAckVJ+jZt8GTk3kuZ6ytbWNZHoadnJzbJ X-Received: by 10.98.242.6 with SMTP id m6mr20234595pfh.170.1523850863764; Sun, 15 Apr 2018 20:54:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523850863; cv=none; d=google.com; s=arc-20160816; b=ww6khgOYYvK9ES5m8LpVie+Tzvj1Nhme91WbA9nrwdX/e1Z2E9toFkFiT0+OYNgBau BWioB88IGcYkTTtGmDorGqklc3Azbqjl8xes2lSeYPheD1GxBsKu8vu8Y4gxAY0nLru+ k3NCSU7eNgiktr/+s2ImbzTLDSF4WzwRhTPiDR6vxFIwwVgCyTeb6+FuTUjqyyDc8ux2 LVQyu8MUAmNyrhIVXibsCnjqF0QEeMDfJLRzIADVV5bRkyLYTO0tuIvHnmRjXKJLOVQa VmA707CvVeNQQvuZJVOdVzeS1B+0rlXdT21FynNjGPb2DE+PSbAvL+2cB6W/x+KQco// wTEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=n39lFH0jj1xwL0PqgeEflZYdhrtSj12sD5VvkChXx8A=; b=jQ6OGeXs5UzQXRGvkBLexOm6PAMW0lAk7IHF/sdgC4VPVIn8XZxjb4EdEzLQCoSNTb m6eDibqsOs7NjltlNdO7mHAZpFCdedZ2I3l+LYMhDMFKPUvJaLx4A0LK8ho5+qwaFTJF 98s+pXFRjBN8KQLkk4XWaxNPANOSQ27r3tnPGaBGO4X6fHQCFPwpOtVogEXL3oCB9UDP wEc3y52j6NDj6uzwMmPM99QSO+X3ytMdPj9wt9Hce/AlcoLjD7MWO0nYxTubuCyeh2Jn +spDECpLXjRlIJNNjF4cmRq09hQR77Q6LbE7f0UOeYQMhYDnpfsLV7Cfgq+UlNJU2oF6 3ouQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=i5fH3Ayk; 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 t24-v6si1356228plo.258.2018.04.15.20.54.09; Sun, 15 Apr 2018 20:54:23 -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; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=i5fH3Ayk; 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 S1752755AbeDPDxF (ORCPT + 99 others); Sun, 15 Apr 2018 23:53:05 -0400 Received: from casper.infradead.org ([85.118.1.10]:49614 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751135AbeDPDxE (ORCPT ); Sun, 15 Apr 2018 23:53:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: Message-ID:In-Reply-To:Subject:cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=n39lFH0jj1xwL0PqgeEflZYdhrtSj12sD5VvkChXx8A=; b=i5fH3AykXlD1jYYE67UxYL6R2 oZlso2OcFY+sB2QyBcWzl9TvrKxVneXj30GVouXFfrJZ5FRpb0N5/OFZlnK+NnFlhRvntB5/U2Fqz 4xIjQpFQYkkgEZg6MQgLOG4FYqfF44RuS7E/d3MnAEXKC/lJAXJm4uK84ElG0XCNW9tiaj0bgg6yn D7cc/P6b25L/KQRtDXh70FfapKzMz8t82uGmdwcruOi0TMRr2GOAZGs5HmAIz5AQWO9KCjcQ4RQQJ 9PKxNPV9qhWEE+hEXqwpoFaRIFqaHaVT5f5c4L1c1GykLznfVh8o1B/0/17P1vfhDzWQyKEhBvoKg lOiTmzMCA==; Received: from jsimmons (helo=localhost) by casper.infradead.org with local-esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f7vCK-00057T-30; Mon, 16 Apr 2018 03:52:57 +0000 Date: Mon, 16 Apr 2018 04:52:55 +0100 (BST) From: James Simmons To: NeilBrown cc: Oleg Drokin , Greg Kroah-Hartman , Andreas Dilger , Linux Kernel Mailing List , Lustre Development List Subject: Re: [PATCH 3/6] staging: lustre: remove include/linux/libcfs/linux/linux-cpu.h In-Reply-To: <152383935737.23409.2271901486597092772.stgit@noble> Message-ID: References: <152383910760.23409.2327082725637657049.stgit@noble> <152383935737.23409.2271901486597092772.stgit@noble> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180416_045256_150057_FD1084DD X-CRM114-Status: GOOD ( 30.82 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 NO_RELAYS Informational: message was not relayed via SMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > This include file contains definitions used when CONFIG_SMP > is in effect. Other includes contain corresponding definitions > for when it isn't. > This can be hard to follow, so move the definitions to the one place. > > As HAVE_LIBCFS_CPT is defined precisely when CONFIG_SMP, we discard > that macro and just use CONFIG_SMP when needed. Nak. The lustre SMP is broken and needed to badly be reworked. I have it ready and can push it. I was waiting to see if I had to rebase it once the rc1 stuff but since their is a push to get everything out their I will push it. > --- > .../staging/lustre/include/linux/libcfs/libcfs.h | 1 > .../lustre/include/linux/libcfs/libcfs_cpu.h | 33 ++++++++ > .../lustre/include/linux/libcfs/linux/linux-cpu.h | 78 -------------------- > drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c | 4 + > 4 files changed, 35 insertions(+), 81 deletions(-) > delete mode 100644 drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h > > diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h > index e59d107d6482..aca1f19c4977 100644 > --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h > +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h > @@ -78,7 +78,6 @@ > #include > #include > #include > -#include > > #include > #include > diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h > index 61bce77fddd6..829c35e68db8 100644 > --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h > +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h > @@ -72,10 +72,43 @@ > #ifndef __LIBCFS_CPU_H__ > #define __LIBCFS_CPU_H__ > > +#include > +#include > +#include > + > /* any CPU partition */ > #define CFS_CPT_ANY (-1) > > #ifdef CONFIG_SMP > +/** virtual processing unit */ > +struct cfs_cpu_partition { > + /* CPUs mask for this partition */ > + cpumask_var_t cpt_cpumask; > + /* nodes mask for this partition */ > + nodemask_t *cpt_nodemask; > + /* spread rotor for NUMA allocator */ > + unsigned int cpt_spread_rotor; > +}; > + > + > +/** descriptor for CPU partitions */ > +struct cfs_cpt_table { > + /* version, reserved for hotplug */ > + unsigned int ctb_version; > + /* spread rotor for NUMA allocator */ > + unsigned int ctb_spread_rotor; > + /* # of CPU partitions */ > + unsigned int ctb_nparts; > + /* partitions tables */ > + struct cfs_cpu_partition *ctb_parts; > + /* shadow HW CPU to CPU partition ID */ > + int *ctb_cpu2cpt; > + /* all cpus in this partition table */ > + cpumask_var_t ctb_cpumask; > + /* all nodes in this partition table */ > + nodemask_t *ctb_nodemask; > +}; > + > /** > * return cpumask of CPU partition \a cpt > */ > diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h > deleted file mode 100644 > index 6035376f2830..000000000000 > --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h > +++ /dev/null > @@ -1,78 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0 > -/* > - * GPL HEADER START > - * > - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > - * > - * This program is free software; you can redistribute it and/or modify > - * it under the terms of the GNU General Public License version 2 only, > - * as published by the Free Software Foundation. > - * > - * This program is distributed in the hope that it will be useful, but > - * WITHOUT ANY WARRANTY; without even the implied warranty of > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > - * General Public License version 2 for more details (a copy is included > - * in the LICENSE file that accompanied this code). > - * > - * GPL HEADER END > - */ > -/* > - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. > - * Copyright (c) 2012, Intel Corporation. > - */ > -/* > - * This file is part of Lustre, http://www.lustre.org/ > - * Lustre is a trademark of Sun Microsystems, Inc. > - * > - * libcfs/include/libcfs/linux/linux-cpu.h > - * > - * Basic library routines. > - * > - * Author: liang@whamcloud.com > - */ > - > -#ifndef __LIBCFS_LINUX_CPU_H__ > -#define __LIBCFS_LINUX_CPU_H__ > - > -#ifndef __LIBCFS_LIBCFS_H__ > -#error Do not #include this file directly. #include instead > -#endif > - > -#include > -#include > -#include > - > -#ifdef CONFIG_SMP > - > -#define HAVE_LIBCFS_CPT > - > -/** virtual processing unit */ > -struct cfs_cpu_partition { > - /* CPUs mask for this partition */ > - cpumask_var_t cpt_cpumask; > - /* nodes mask for this partition */ > - nodemask_t *cpt_nodemask; > - /* spread rotor for NUMA allocator */ > - unsigned int cpt_spread_rotor; > -}; > - > -/** descriptor for CPU partitions */ > -struct cfs_cpt_table { > - /* version, reserved for hotplug */ > - unsigned int ctb_version; > - /* spread rotor for NUMA allocator */ > - unsigned int ctb_spread_rotor; > - /* # of CPU partitions */ > - unsigned int ctb_nparts; > - /* partitions tables */ > - struct cfs_cpu_partition *ctb_parts; > - /* shadow HW CPU to CPU partition ID */ > - int *ctb_cpu2cpt; > - /* all cpus in this partition table */ > - cpumask_var_t ctb_cpumask; > - /* all nodes in this partition table */ > - nodemask_t *ctb_nodemask; > -}; > - > -#endif /* CONFIG_SMP */ > -#endif /* __LIBCFS_LINUX_CPU_H__ */ > diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c > index 76291a350406..5818f641455f 100644 > --- a/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c > +++ b/drivers/staging/lustre/lnet/libcfs/libcfs_cpu.c > @@ -37,7 +37,7 @@ > struct cfs_cpt_table *cfs_cpt_table __read_mostly; > EXPORT_SYMBOL(cfs_cpt_table); > > -#ifndef HAVE_LIBCFS_CPT > +#ifndef CONFIG_SMP > > #define CFS_CPU_VERSION_MAGIC 0xbabecafe > > @@ -225,4 +225,4 @@ cfs_cpu_init(void) > return cfs_cpt_table ? 0 : -1; > } > > -#endif /* HAVE_LIBCFS_CPT */ > +#endif /* CONFIG_SMP */ > > >