From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753187AbbJMOnV (ORCPT ); Tue, 13 Oct 2015 10:43:21 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:31318 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751779AbbJMOnU (ORCPT ); Tue, 13 Oct 2015 10:43:20 -0400 Subject: Re: [RFC v2 PATCH 09/14] MIPS: add support for generic SMP IPI support To: Thomas Gleixner References: <1444731382-19313-1-git-send-email-qais.yousef@imgtec.com> <1444731382-19313-10-git-send-email-qais.yousef@imgtec.com> CC: , , , , , From: Qais Yousef Message-ID: <561D1885.9050708@imgtec.com> Date: Tue, 13 Oct 2015 15:43:17 +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 10/13/2015 02:48 PM, Thomas Gleixner wrote: > On Tue, 13 Oct 2015, Qais Yousef wrote: >> >> +#ifdef CONFIG_GENERIC_IRQ_IPI >> +void generic_smp_send_ipi_single(int cpu, unsigned int action) > Please use a mips name space. This suggests that it s completely > generic, which is not true. > >> +{ >> + generic_smp_send_ipi_mask(cpumask_of(cpu), action); >> +} >> + >> +void generic_smp_send_ipi_mask(const struct cpumask *mask, unsigned int action) > Ditto. OK. >> +{ >> + unsigned long flags; >> + unsigned int core; >> + int cpu; >> + struct ipi_mask ipi_mask; >> + >> + ipi_mask.cpumask = ((struct cpumask *)mask)->bits; > We have accessors for that. Hmm, so for this case we must make the > ipi_mask different: > > struct ipi_mask { > unsigned int nbits; > bool global; > union { > struct cpumask *mask; > unsigned long cpu_bitmap[]; > }; > }; > Right. This looks cleaner for sure. Not sure why I haven't though about this. Thanks, Qais