From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753464AbbK3LVA (ORCPT ); Mon, 30 Nov 2015 06:21:00 -0500 Received: from www.linutronix.de ([62.245.132.108]:50802 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751116AbbK3LU7 (ORCPT ); Mon, 30 Nov 2015 06:20:59 -0500 Date: Mon, 30 Nov 2015 12:20:13 +0100 (CET) From: Thomas Gleixner To: Qais Yousef cc: linux-kernel@vger.kernel.org, jason@lakedaemon.net, marc.zyngier@arm.com, jiang.liu@linux.intel.com, ralf@linux-mips.org, linux-mips@linux-mips.org Subject: Re: [PATCH v2 04/19] genirq: Add new struct ipi_mask and helper functions In-Reply-To: <1448453217-3874-5-git-send-email-qais.yousef@imgtec.com> Message-ID: References: <1448453217-3874-1-git-send-email-qais.yousef@imgtec.com> <1448453217-3874-5-git-send-email-qais.yousef@imgtec.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 25 Nov 2015, Qais Yousef wrote: > cpumask is limited to NR_CPUS. Introduce ipi_mask which allows us to address > cpu range that is higher than NR_CPUS which is required for drivers to send > IPIs for coprocessor that are outside Linux CPU range. I have second thoughts on this. cpumask is indeed limited to NR_CPUS or in case of CPUMASK_ON_STACK limited to nr_cpu_ids. But, that's not an issue for that coprocessor case. Let's assume you have 16 Linux CPUs and 4 coprocessors. So you set the number of possible cpus (NR_CPUS) to 20. That makes the cpumask sizeof 20. The boot-process sets the number of available cpus to 16. So the Linux side will never try to access anything beyond cpu15. But you can spare that extra mask magic and simply use cpumask. Sorry that I did not think about that earlier. Thanks, tglx