All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qais Yousef <qais.yousef@imgtec.com>
To: Thomas Gleixner <tglx@linutronix.de>
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: [RFC v2 PATCH 09/14] MIPS: add support for generic SMP IPI support
Date: Tue, 13 Oct 2015 15:43:17 +0100	[thread overview]
Message-ID: <561D1885.9050708@imgtec.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1510131543340.25029@nanos>

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

WARNING: multiple messages have this Message-ID (diff)
From: Qais Yousef <qais.yousef@imgtec.com>
To: Thomas Gleixner <tglx@linutronix.de>
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: [RFC v2 PATCH 09/14] MIPS: add support for generic SMP IPI support
Date: Tue, 13 Oct 2015 15:43:17 +0100	[thread overview]
Message-ID: <561D1885.9050708@imgtec.com> (raw)
Message-ID: <20151013144317.A1EfciFgitDS3P81zlqkR5vAstzhODY-e1xKM8VI4Ok@z> (raw)
In-Reply-To: <alpine.DEB.2.11.1510131543340.25029@nanos>

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

  reply	other threads:[~2015-10-13 14:43 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-13 10:16 [RFC v2 PATCH 00/14] Implement generic IPI support mechanism Qais Yousef
2015-10-13 10:16 ` Qais Yousef
2015-10-13 10:16 ` [RFC v2 PATCH 01/14] irq: add new IRQ_DOMAIN_FLAGS_IPI Qais Yousef
2015-10-13 10:16   ` Qais Yousef
2015-10-13 10:16 ` [RFC v2 PATCH 02/14] irq: add GENERIC_IRQ_IPI Kconfig symbol Qais Yousef
2015-10-13 10:16   ` Qais Yousef
2015-10-13 10:16 ` [RFC v2 PATCH 03/14] irq: add new struct ipi_mask Qais Yousef
2015-10-13 10:16   ` Qais Yousef
2015-10-13 13:26   ` Thomas Gleixner
2015-10-13 14:26     ` Qais Yousef
2015-10-13 14:26       ` Qais Yousef
2015-10-13 10:16 ` [RFC v2 PATCH 04/14] irq: add a new irq_send_ipi() to irq_chip Qais Yousef
2015-10-13 10:16   ` Qais Yousef
2015-10-13 10:16 ` [RFC v2 PATCH 05/14] irq: add struct ipi_mask to irq_data Qais Yousef
2015-10-13 10:16   ` Qais Yousef
2015-10-13 12:36   ` kbuild test robot
2015-10-13 12:36     ` kbuild test robot
2015-10-14 14:50   ` Davidlohr Bueso
2015-10-14 15:46     ` Qais Yousef
2015-10-14 15:46       ` Qais Yousef
2015-10-13 10:16 ` [RFC v2 PATCH 06/14] irq: add struct ipi_mapping and its helper functions Qais Yousef
2015-10-13 10:16   ` Qais Yousef
2015-10-13 13:31   ` Thomas Gleixner
2015-10-13 14:30     ` Qais Yousef
2015-10-13 14:30       ` Qais Yousef
2015-10-13 10:16 ` [RFC v2 PATCH 07/14] irq: add a new generic IPI reservation code to irq core Qais Yousef
2015-10-13 10:16   ` Qais Yousef
2015-10-13 10:56   ` kbuild test robot
2015-10-13 10:56     ` kbuild test robot
2015-10-13 10:56   ` kbuild test robot
2015-10-13 10:56     ` kbuild test robot
2015-10-13 13:37   ` Thomas Gleixner
2015-10-13 14:38     ` Qais Yousef
2015-10-13 14:38       ` Qais Yousef
2015-10-28 15:46       ` Qais Yousef
2015-10-28 15:46         ` Qais Yousef
2015-10-29 10:39         ` Qais Yousef
2015-10-29 10:39           ` Qais Yousef
2015-10-13 10:16 ` [RFC v2 PATCH 08/14] irq: implement irq_send_ipi Qais Yousef
2015-10-13 10:16   ` Qais Yousef
2015-10-13 11:12   ` kbuild test robot
2015-10-13 11:12     ` kbuild test robot
2015-10-13 11:29   ` kbuild test robot
2015-10-13 11:29     ` kbuild test robot
2015-10-13 13:40   ` Thomas Gleixner
2015-10-13 14:41     ` Qais Yousef
2015-10-13 14:41       ` Qais Yousef
2015-10-13 10:16 ` [RFC v2 PATCH 09/14] MIPS: add support for generic SMP IPI support Qais Yousef
2015-10-13 10:16   ` Qais Yousef
2015-10-13 13:48   ` Thomas Gleixner
2015-10-13 14:43     ` Qais Yousef [this message]
2015-10-13 14:43       ` Qais Yousef
2015-10-13 10:16 ` [RFC v2 PATCH 10/14] MIPS: make smp CMP, CPS and MT use the new generic IPI functions Qais Yousef
2015-10-13 10:16   ` Qais Yousef
2015-10-13 13:49   ` Thomas Gleixner
2015-10-13 14:46     ` Qais Yousef
2015-10-13 14:46       ` Qais Yousef
2015-10-13 10:16 ` [RFC v2 PATCH 11/14] MIPS: delete smp-gic.c Qais Yousef
2015-10-13 10:16   ` Qais Yousef
2015-10-13 10:16 ` [RFC v2 PATCH 12/14] irqchip: mips-gic: add a IPI hierarchy domain Qais Yousef
2015-10-13 10:16   ` Qais Yousef
2015-10-13 10:16 ` [RFC v2 PATCH 13/14] irqchip: mips-gic: implement the new irq_send_ipi Qais Yousef
2015-10-13 10:16   ` Qais Yousef
2015-10-13 10:16 ` [RFC v2 PATCH 14/14] irqchip: mips-gic: remove IPI init code Qais Yousef
2015-10-13 10:16   ` Qais Yousef
2015-10-13 13:53 ` [RFC v2 PATCH 00/14] Implement generic IPI support mechanism Thomas Gleixner
2015-10-13 14:48   ` Qais Yousef
2015-10-13 14:48     ` Qais Yousef
2015-10-13 17:24   ` Sergei Shtylyov
2015-10-13 17:27     ` Thomas Gleixner
2015-10-14 15:04 ` Davidlohr Bueso
2015-10-14 15:49   ` Qais Yousef
2015-10-14 15:49     ` Qais Yousef

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=561D1885.9050708@imgtec.com \
    --to=qais.yousef@imgtec.com \
    --cc=jason@lakedaemon.net \
    --cc=jiang.liu@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=marc.zyngier@arm.com \
    --cc=ralf@linux-mips.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.