devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Kevin Cernekee <cernekee@gmail.com>
Cc: f.fainelli@gmail.com, tglx@linutronix.de, jason@lakedaemon.net,
	ralf@linux-mips.org, linux-sh@vger.kernel.org,
	sergei.shtylyov@cogentembedded.com, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, mbizon@freebox.fr, jogo@openwrt.org,
	linux-mips@linux-mips.org
Subject: Re: [PATCH V3 00/14] genirq endian fixes; bcm7120/brcmstb IRQ updates
Date: Mon, 03 Nov 2014 12:56:52 +0100	[thread overview]
Message-ID: <2217077.1aQXS9nJph@wuerfel> (raw)
In-Reply-To: <1414890241-9938-1-git-send-email-cernekee@gmail.com>

On Saturday 01 November 2014 18:03:47 Kevin Cernekee wrote:
> V2->V3:
> 
>  - Move updated irq_reg_{readl,writel} functions back into <linux/irq.h>
>    so they can be called by irqchip drivers
> 
>  - Add gc->reg_{readl,writel} function pointers so that irqchip
>    drivers like arch/sh/boards/mach-se/{7343,7722}/irq.c can override them
> 
>  - CC: linux-sh list in lieu of Paul's defunct linux-sh.org email address
> 
>  - Fix handling of zero L2 status in bcm7120-l2.c
> 
>  - Rebase on Linus' head of tree

Looks all great. I also looked at the series now and am very happy
about how it turned out.

>  - Drop GENERIC_CHIP / GENERIC_CHIP_BE compile-time optimizations
> 
> For the latter item, I ran a quick benchmark to see if the extra
> indirection in irq_reg_{readl,write} had any perceptible effect on
> register access times.  The MIPS BE case did show a small performance
> hit from using the read wrapper, but on ARM LE the only differences
> were attributed to the presence/absence of a barrier:
>
>
> BCM3384 (UBUS architecture, MIPS BE, IRQ_GC_BE_IO):
> 
> irq_reg_readl       : 207 ns
> readl               : 186 ns
> __raw_readl         : 186 ns
> ioread32be          : 195 ns
> 
> irq_reg_writel      : 177 ns
> writel              : 177 ns
> __raw_writel        : 177 ns
> iowrite32be         : 177 ns
> 
> 
> BCM7445 (GISB architecture, ARM LE, standard LE readl):
> 
> irq_reg_readl       : 519 ns
> readl               : 519 ns
> __raw_readl         : 482 ns
> ioread32be          : 519 ns
> 
> irq_reg_writel      : 500 ns
> writel              : 500 ns
> __raw_writel        : 482 ns
> iowrite32be         : 500 ns
> 

Yes, good idea to check this. 43ns is probably not significant to
warrant optimizing this, but if we wanted to, a driver could now
override the accessors using readl_relaxed()/writel_relaxed().

Note that the cost of the barriers can depend a lot on the hardware
setup and on the state of the system. I believe synchronizing the
L2 cache on some Cortex-A9 machines can be particularly expensive.

Anyway, the existing code doesn't do it, so we can leave that as
a possible optimization.

	Arnd

  parent reply	other threads:[~2014-11-03 11:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-02  1:03 [PATCH V3 00/14] genirq endian fixes; bcm7120/brcmstb IRQ updates Kevin Cernekee
2014-11-02  1:03 ` [PATCH V3 01/14] sh: Eliminate unused irq_reg_{readl,writel} accessors Kevin Cernekee
2014-11-02  1:03 ` [PATCH V3 02/14] genirq: Generic chip: Change irq_reg_{readl,writel} arguments Kevin Cernekee
2014-11-02  1:03 ` [PATCH V3 03/14] genirq: Generic chip: Allow irqchip drivers to override irq_reg_{readl,writel} Kevin Cernekee
2014-11-02  1:03 ` [PATCH V3 04/14] genirq: Generic chip: Add big endian I/O accessors Kevin Cernekee
2014-11-02  1:03 ` [PATCH V3 05/14] irqchip: brcmstb-l2: Eliminate dependency on ARM code Kevin Cernekee
2014-11-02  1:03 ` [PATCH V3 06/14] irqchip: bcm7120-l2: Eliminate bad IRQ check Kevin Cernekee
2014-11-02  1:03 ` [PATCH V3 07/14] irqchip: bcm7120-l2, brcmstb-l2: Remove ARM Kconfig dependency Kevin Cernekee
2014-11-02  1:03 ` [PATCH V3 08/14] irqchip: bcm7120-l2: Make sure all register accesses use base+offset Kevin Cernekee
2014-11-02  1:03 ` [PATCH V3 09/14] irqchip: bcm7120-l2: Fix missing nibble in gc->unused mask Kevin Cernekee
2014-11-02  1:03 ` [PATCH V3 10/14] irqchip: bcm7120-l2: Use gc->mask_cache to simplify suspend/resume functions Kevin Cernekee
2014-11-02  1:03 ` [PATCH V3 11/14] irqchip: bcm7120-l2: Extend driver to support 64+ bit controllers Kevin Cernekee
2014-11-02  1:03 ` [PATCH V3 12/14] irqchip: bcm7120-l2: Decouple driver from brcmstb-l2 Kevin Cernekee
2014-11-02  1:04 ` [PATCH V3 13/14] irqchip: bcm7120-l2: Convert driver to use irq_reg_{readl,writel} Kevin Cernekee
2014-11-02  1:04 ` [PATCH V3 14/14] irqchip: brcmstb-l2: " Kevin Cernekee
2014-11-03 11:56 ` Arnd Bergmann [this message]
2014-11-03 20:18   ` [PATCH V3 00/14] genirq endian fixes; bcm7120/brcmstb IRQ updates Thomas Gleixner
2014-11-04  8:18     ` Arnd Bergmann
2014-11-07  5:00 ` Jason Cooper

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=2217077.1aQXS9nJph@wuerfel \
    --to=arnd@arndb.de \
    --cc=cernekee@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=jason@lakedaemon.net \
    --cc=jogo@openwrt.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=mbizon@freebox.fr \
    --cc=ralf@linux-mips.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    --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;
as well as URLs for NNTP newsgroup(s).