From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753078AbdHXOdp (ORCPT ); Thu, 24 Aug 2017 10:33:45 -0400 Received: from mail-qt0-f181.google.com ([209.85.216.181]:36576 "EHLO mail-qt0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751083AbdHXOdn (ORCPT ); Thu, 24 Aug 2017 10:33:43 -0400 Date: Thu, 24 Aug 2017 07:33:39 -0700 From: Tejun Heo To: Geert Uytterhoeven Cc: Linus Torvalds , "linux-kernel@vger.kernel.org" , Lai Jiangshan , Michael Bringmann Subject: Re: [GIT PULL] workqueue fixes for v4.13-rc3 Message-ID: <20170824143339.GO491396@devbig577.frc2.facebook.com> References: <20170731153806.GC447614@devbig577.frc2.facebook.com> <20170807170659.GB537256@devbig577.frc2.facebook.com> <20170823142421.GK491396@devbig577.frc2.facebook.com> <20170823170805.GL491396@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Thu, Aug 24, 2017 at 03:32:04PM +0200, Geert Uytterhoeven wrote: > > Ah, okay, so it has multiple nodes but not NUMA. The generic numa > > topology code assumes that there's only one node if !NUMA and reports > > all online cpus regardless of the node number, which makes the same > > CPUs to be reported for all nodes on the system. I think something > > like the following (completely untested) should work. > > Thank you, that got rid of the warning. Great, it turns out we already have cpu_none_mask. Can you please test the following works too? Thanks. diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h index fc824e2..5d2add1 100644 --- a/include/asm-generic/topology.h +++ b/include/asm-generic/topology.h @@ -48,7 +48,11 @@ #define parent_node(node) ((void)(node),0) #endif #ifndef cpumask_of_node -#define cpumask_of_node(node) ((void)node, cpu_online_mask) + #ifdef CONFIG_NEED_MULTIPLE_NODES + #define cpumask_of_node(node) ((node) == 0 ? cpu_online_mask : cpu_none_mask) + #else + #define cpumask_of_node(node) ((void)node, cpu_online_mask) + #endif #endif #ifndef pcibus_to_node #define pcibus_to_node(bus) ((void)(bus), -1)