Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Paul Burton <paul.burton@imgtec.com>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: <linux-mips@linux-mips.org>, Jason Cooper <jason@lakedaemon.net>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH 00/38] irqchip: mips-gic: Cleanup & optimisation
Date: Tue, 15 Aug 2017 09:16:21 -0700	[thread overview]
Message-ID: <1561377.UX34hIl2NL@np-p-burton> (raw)
In-Reply-To: <deae1e69-010e-474d-9bb6-a4d92c955356@arm.com>

[-- Attachment #1: Type: text/plain, Size: 4388 bytes --]

Hi Marc,

On Tuesday, 15 August 2017 03:13:03 PDT Marc Zyngier wrote:
> Hi Paul,
> 
> On 13/08/17 05:36, Paul Burton wrote:
> > This series cleans up the MIPS Global Interrupt Controller (GIC) driver
> > somewhat. It moves us towards using a header in a similar vein to the
> > ones we have for the MIPS Coherence Manager (CM) & Cluster Power
> > Controller (CPC) which allows us to access the GIC outside of the
> > irqchip driver - something beneficial already for the clocksource &
> > clock event driver, and which will be beneficial for further drivers
> > (eg. one for the GIC watchdog timer) and for multi-cluster work. Using
> > this header is also beneficial for consistency & code-sharing.
> > 
> > In addition to cleanups the series also optimises the driver in various
> > ways, including by using a per-CPU variable for pcpu_masks & removing
> > the need to read the GIC_SH_MASK_* registers when decoding interrupts in
> > gic_handle_shared_int().
> > 
> > This series requires my "[PATCH 00/19] MIPS: Initial multi-cluster
> > support" series to be applied first.
> 
> I'm not on Cc on this one, so it is a bit hard to see what's going on.

That other series is only really related insomuch as it adds asm/mips-cps.h 
which this series makes use of, and changes a couple of lines in irq-mips-
gic.c which would cause conflicts if this series is applied without the other 
first.

> But overall, it is incredibly difficult to follow what is going on here.
> Everything seems to move around, and while I'm sure that you have
> something in mind, the mix of fixes+optimizations+new features is a bit
> hard to swallow (not to mention the VDSO stuff in the middle of what is
> supposed to be an irqchip series).

In general the non-irqchip patches preceed the irqchip patch that they enable. 
For example, the VDSO patch you mention (presumably patch 22 "MIPS: VDSO: Drop 
git_get_usm_range() usage") is followed immediately by the removal of that 
function in patch 23 "irqchip: mips-gic: Remove gic_get_usm_range()".

The issue is that the MIPS GIC irqchip driver currently provides a bunch of 
functions which have nothing to do with interrupts, and so probably ought to 
be elsewhere. Moving that code elsewhere involves both adjusting the callers 
of those functions & then removing them from the irqchip driver, hence the 
non-irqchip patches followed by the related irqchip patches.

In general the only things that move are:

 - The GIC register definitions, to asm/mips-gic.h for reasons described in 
patch 2.

 - Functions as I mentioned in the previous paragraph which have nothing to do 
with the irqchip driver & don't need to be there once we have access to GIC 
registers elsewhere through asm/mips-gic.h.

 - A few other bits from linux/irqchip/mips-gic.h just so we can drop that 
header.

> Is there any chance you could rework this to have a more logical
> ordering? Something like fixes first, new features next, and
> optimizations in the end, organized by domains (arch stuff first, then
> irqchip, then timer, then userspace)?

It's already almost grouped like that. We have:

- Patch 1 is a fix.

- Patches 2 through 34 are cleanup, though a couple could probably be 
secondarily considered optimisations too.

- Patch 35 is an optimisation.

- Patches 36 through 38 could be considered optimisation or cleanup depending 
upon the tint of your glasses.

So I'm not sure what you're asking me to do here - to group them better I 
could perhaps move patch 35 to the end, but I'm not sure I see how that would 
make review any easier.

I didn't group by domain like you suggest for the reason I mention before - 
the non-irqchip patches are purely there to enable the following irqchip patch 
so it made sense to me to group those together. If you really want I could 
move all the non-irqchip patches to the start & all the irqchip patches to the 
end, but again I'm not sure I see how that helps - it would just mean that 
tightly related patches no longer follow one another.

> Because at the moment, this is a bit overwhelming...

My intent in splitting this into so many patches, and in grouping together the 
related non-irqchip & irqchip patches, was to reduce that overwhelming-ness by 
making each patch pretty readable by itself & perhaps taking into account only 
a patch or two before it. I guess that didn't work though.. :)

Thanks,
    Paul

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Paul Burton <paul.burton@imgtec.com>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-mips@linux-mips.org, Jason Cooper <jason@lakedaemon.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH 00/38] irqchip: mips-gic: Cleanup & optimisation
Date: Tue, 15 Aug 2017 09:16:21 -0700	[thread overview]
Message-ID: <1561377.UX34hIl2NL@np-p-burton> (raw)
Message-ID: <20170815161621.Rgrp0-Gvw7gA6c85mxpEJL5qG2XSUsm4b4pO9NDIEX0@z> (raw)
In-Reply-To: <deae1e69-010e-474d-9bb6-a4d92c955356@arm.com>

[-- Attachment #1: Type: text/plain, Size: 4388 bytes --]

Hi Marc,

On Tuesday, 15 August 2017 03:13:03 PDT Marc Zyngier wrote:
> Hi Paul,
> 
> On 13/08/17 05:36, Paul Burton wrote:
> > This series cleans up the MIPS Global Interrupt Controller (GIC) driver
> > somewhat. It moves us towards using a header in a similar vein to the
> > ones we have for the MIPS Coherence Manager (CM) & Cluster Power
> > Controller (CPC) which allows us to access the GIC outside of the
> > irqchip driver - something beneficial already for the clocksource &
> > clock event driver, and which will be beneficial for further drivers
> > (eg. one for the GIC watchdog timer) and for multi-cluster work. Using
> > this header is also beneficial for consistency & code-sharing.
> > 
> > In addition to cleanups the series also optimises the driver in various
> > ways, including by using a per-CPU variable for pcpu_masks & removing
> > the need to read the GIC_SH_MASK_* registers when decoding interrupts in
> > gic_handle_shared_int().
> > 
> > This series requires my "[PATCH 00/19] MIPS: Initial multi-cluster
> > support" series to be applied first.
> 
> I'm not on Cc on this one, so it is a bit hard to see what's going on.

That other series is only really related insomuch as it adds asm/mips-cps.h 
which this series makes use of, and changes a couple of lines in irq-mips-
gic.c which would cause conflicts if this series is applied without the other 
first.

> But overall, it is incredibly difficult to follow what is going on here.
> Everything seems to move around, and while I'm sure that you have
> something in mind, the mix of fixes+optimizations+new features is a bit
> hard to swallow (not to mention the VDSO stuff in the middle of what is
> supposed to be an irqchip series).

In general the non-irqchip patches preceed the irqchip patch that they enable. 
For example, the VDSO patch you mention (presumably patch 22 "MIPS: VDSO: Drop 
git_get_usm_range() usage") is followed immediately by the removal of that 
function in patch 23 "irqchip: mips-gic: Remove gic_get_usm_range()".

The issue is that the MIPS GIC irqchip driver currently provides a bunch of 
functions which have nothing to do with interrupts, and so probably ought to 
be elsewhere. Moving that code elsewhere involves both adjusting the callers 
of those functions & then removing them from the irqchip driver, hence the 
non-irqchip patches followed by the related irqchip patches.

In general the only things that move are:

 - The GIC register definitions, to asm/mips-gic.h for reasons described in 
patch 2.

 - Functions as I mentioned in the previous paragraph which have nothing to do 
with the irqchip driver & don't need to be there once we have access to GIC 
registers elsewhere through asm/mips-gic.h.

 - A few other bits from linux/irqchip/mips-gic.h just so we can drop that 
header.

> Is there any chance you could rework this to have a more logical
> ordering? Something like fixes first, new features next, and
> optimizations in the end, organized by domains (arch stuff first, then
> irqchip, then timer, then userspace)?

It's already almost grouped like that. We have:

- Patch 1 is a fix.

- Patches 2 through 34 are cleanup, though a couple could probably be 
secondarily considered optimisations too.

- Patch 35 is an optimisation.

- Patches 36 through 38 could be considered optimisation or cleanup depending 
upon the tint of your glasses.

So I'm not sure what you're asking me to do here - to group them better I 
could perhaps move patch 35 to the end, but I'm not sure I see how that would 
make review any easier.

I didn't group by domain like you suggest for the reason I mention before - 
the non-irqchip patches are purely there to enable the following irqchip patch 
so it made sense to me to group those together. If you really want I could 
move all the non-irqchip patches to the start & all the irqchip patches to the 
end, but again I'm not sure I see how that helps - it would just mean that 
tightly related patches no longer follow one another.

> Because at the moment, this is a bit overwhelming...

My intent in splitting this into so many patches, and in grouping together the 
related non-irqchip & irqchip patches, was to reduce that overwhelming-ness by 
making each patch pretty readable by itself & perhaps taking into account only 
a patch or two before it. I guess that didn't work though.. :)

Thanks,
    Paul

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-08-15 16:16 UTC|newest]

Thread overview: 111+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-13  4:36 [PATCH 00/38] irqchip: mips-gic: Cleanup & optimisation Paul Burton
2017-08-13  4:36 ` Paul Burton
2017-08-13  4:36 ` [PATCH 01/38] irqchip: mips-gic: SYNC after enabling GIC region Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 02/38] MIPS: GIC: Introduce asm/mips-gic.h with accessor functions Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-18 11:10   ` Marc Zyngier
2017-08-18 16:43     ` Paul Burton
2017-08-18 16:43       ` Paul Burton
2017-08-13  4:36 ` [PATCH 03/38] clocksource: mips-gic-timer: Use new GIC " Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 04/38] irqchip: mips-gic: Remove counter access functions Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 05/38] MIPS: CPS: Read GIC_VL_IDENT directly, not via irqchip driver Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 06/38] irqchip: mips-gic: Remove gic_read_local_vp_id() Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 07/38] lib/iomap_copy.c: Add __ioread64_copy Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 08/38] irqchip: mips-gic: Simplify shared interrupt pending/mask reads Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 09/38] irqchip: mips-gic: Simplify gic_local_irq_domain_map() Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 10/38] irqchip: mips-gic: Drop gic_(re)set_mask() functions Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 11/38] irqchip: mips-gic: Remove gic_set_polarity() Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 12/38] irqchip: mips-gic: Remove gic_set_trigger() Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 13/38] irqchip: mips-gic: Remove gic_set_dual_edge() Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 14/38] irqchip: mips-gic: Remove gic_map_to_pin() Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 15/38] irqchip: mips-gic: Remove gic_map_to_vpe() Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 16/38] irqchip: mips-gic: Convert remaining shared reg access to new accessors Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 17/38] irqchip: mips-gic: Convert local int mask " Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 18/38] irqchip: mips-gic: Convert remaining local reg " Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 19/38] MIPS: GIC: Move GIC_LOCAL_INT_* to asm/mips-gic.h Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 20/38] irqchip: mips-gic: Remove GIC_CPU_INT* macros Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 21/38] irqchip: mips-gic: Move various definitions to the driver Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 22/38] MIPS: VDSO: Drop gic_get_usm_range() usage Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-18 11:38   ` Marc Zyngier
2017-08-18 16:47     ` Paul Burton
2017-08-18 16:47       ` Paul Burton
2017-08-18 16:52       ` Marc Zyngier
2017-08-13  4:36 ` [PATCH 23/38] irqchip: mips-gic: Remove gic_get_usm_range() Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 24/38] irqchip: mips-gic: Remove __gic_irq_dispatch() forward declaration Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 25/38] irqchip: mips-gic: Remove gic_init() Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 26/38] MIPS: Use mips_gic_present() in place of gic_present Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 27/38] irqchip: mips-gic: Remove gic_present Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 28/38] irqchip: mips-gic: Move gic_get_c0_*_int() to asm/mips-gic.h Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 29/38] MIPS: VDSO: Avoid use of linux/irqchip/mips-gic.h Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 30/38] MIPS: Remove unnecessary inclusions " Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 31/38] irqchip: mips-gic: Remove linux/irqchip/mips-gic.h Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 32/38] irqchip: mips-gic: Inline __gic_init() Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 33/38] irqchip: mips-gic: Inline gic_basic_init() Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 34/38] irqchip: mips-gic: Make pcpu_masks a per-cpu variable Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-18 15:37   ` Marc Zyngier
2017-08-18 17:02     ` Paul Burton
2017-08-18 17:02       ` Paul Burton
2017-08-18 17:18       ` Marc Zyngier
2017-08-13  4:36 ` [PATCH 35/38] irqchip: mips-gic: Use pcpu_masks to avoid reading GIC_SH_MASK* Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-18 15:44   ` Marc Zyngier
2017-08-18 17:11     ` Paul Burton
2017-08-18 17:11       ` Paul Burton
2017-08-18 17:25       ` Marc Zyngier
2017-08-18 21:02         ` [PATCH v2 " Paul Burton
2017-08-18 21:02           ` Paul Burton
2017-08-13  4:36 ` [PATCH 36/38] irqchip: mips-gic: Clean up mti,reserved-cpu-vectors handling Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  4:36 ` [PATCH 37/38] irqchip: mips-gic: Use cpumask_first_and() in gic_set_affinity() Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-13  9:08   ` Sergei Shtylyov
2017-08-14 16:18     ` Paul Burton
2017-08-14 16:18       ` Paul Burton
2017-08-14 16:48       ` Sergei Shtylyov
2017-08-18 21:04   ` [PATCH v2 " Paul Burton
2017-08-18 21:04     ` Paul Burton
2017-08-13  4:36 ` [PATCH 38/38] irqchip: mips-gic: Let the core set struct irq_common_data affinity Paul Burton
2017-08-13  4:36   ` Paul Burton
2017-08-15 10:13 ` [PATCH 00/38] irqchip: mips-gic: Cleanup & optimisation Marc Zyngier
2017-08-15 16:16   ` Paul Burton [this message]
2017-08-15 16:16     ` Paul Burton
2017-08-15 16:49     ` Marc Zyngier
2017-08-18 17:28 ` Marc Zyngier
2017-08-18 17:44   ` Paul Burton
2017-08-18 17:44     ` Paul Burton
2017-08-18 17:49     ` Marc Zyngier
2017-08-18 21:09       ` Paul Burton
2017-08-18 21:09         ` Paul Burton

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=1561377.UX34hIl2NL@np-p-burton \
    --to=paul.burton@imgtec.com \
    --cc=jason@lakedaemon.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox