From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754361AbbI3OIl (ORCPT ); Wed, 30 Sep 2015 10:08:41 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:1116 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752668AbbI3OIc (ORCPT ); Wed, 30 Sep 2015 10:08:32 -0400 Subject: Re: [PATCH 0/6] Implement generic IPI support mechanism To: Thomas Gleixner References: <1443019758-20620-1-git-send-email-qais.yousef@imgtec.com> <5602D958.6000003@linux.intel.com> <5603B6CA.7050601@imgtec.com> <560BE4F3.7060607@imgtec.com> CC: Jiang Liu , , , , From: Qais Yousef Message-ID: <560BECDE.7090405@imgtec.com> Date: Wed, 30 Sep 2015 15:08:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.154.94] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/30/2015 03:03 PM, Thomas Gleixner wrote: > On Wed, 30 Sep 2015, Qais Yousef wrote: > >> On 09/29/2015 09:48 PM, Thomas Gleixner wrote: >>> Now how these hwirqs are allocated is a domain/architecture >>> specific issue. >>> >>> x86 will just find a vector which is available on all target >>> cpus and mark it as used. That's a single hw irq number. >>> >>> mips and others, which implement IPIs as regular hw interrupt >>> numbers, will allocate a these (consecutive) hw interrupt >>> numbers either from a reserved region or just from the >>> regular space. That's a bunch of hw irq numbers and we need >>> to come up with a proper storage format in the irqdata for >>> that. That might be >>> >>> struct ipi_mapping { >>> unsigned int nr_hwirqs; >>> unsigned int cpumap[NR_CPUS]; >>> }; >> Can we use NR_CPUS here? If we run in UP configuration for instance, this will >> be one. The coprocessor could be outside the NR_CPUS range in general, no? >> >> How about >> >> struct ipi_mapping { >> unsigned int nr_hwirqs; >> unsigned int nr_cpus; >> unsigned int *cpumap; >> } >> >> where cpumap is dynamically allocated by the controller which has better >> knowledge about the supported cpu range it can talk to? > Sure. As I said: 'That might be' .... > > OK thanks. I just wanted to make sure I didn't misunderstand anything. Will try to send an updated version with all the changes soon. Thanks, Qais