All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v10 2/7] ARM: hi3xxx: add board support with device tree
Date: Wed, 16 Oct 2013 09:27:27 +0200	[thread overview]
Message-ID: <201310160927.27412.arnd@arndb.de> (raw)
In-Reply-To: <CAD6h2NQ4fT7ycmxh+iLiBx4+u6+QB-H98309cRJLtRO3LGCbJg@mail.gmail.com>

On Wednesday 16 October 2013, Haojian Zhuang wrote:
> Oh, no. I shouldn't extend the static mapping table to the entire range.
> 
> Most of the registers only need to map once in the probe() function
> of the driver. Whether it's using static mapping or dynamic mapping,
> there's no difference.

There is a small difference in that having a megabyte-sized mapping will
reduce the number of TLB entries required for I/O access, which can
improve performance slightly. Other platforms do it for this reason.

>  The sysctrl register bank is used in both clock & platform
> driver. Each clock node contains reg property, it needs to be parsed
> by of_iomap(). Hotplug & SMP platform driver needs to parse sysctrl
> register bank also. If I don't choose the static IO mapping for sysctrl
> register bank, I have to define some global variable to store the
> virtual address mapping. Or I have to cost lots of redundant virtual
> address space for the same IO mapping.

It's a small cost, but your approach makes sense, just make sure
you have a comment in the map_io code explaining it.

> So I'll only keep the static IO mapping for sysctrl.

I'd still choose the larger mapping, but I'll leave the decision to you.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, Kevin Hilman <khilman@linaro.org>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Shaojie Sun <shaojie.sun@linaro.org>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Patch Tracking <patches@linaro.org>,
	Rob Herring <rob.herring@calxeda.com>,
	Grant Likely <grant.likely@linaro.org>,
	John Stultz <john.stultz@linaro.org>,
	Olof Johansson <olof@lixom.net>,
	Mike Turquette <mturquette@linaro.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v10 2/7] ARM: hi3xxx: add board support with device tree
Date: Wed, 16 Oct 2013 09:27:27 +0200	[thread overview]
Message-ID: <201310160927.27412.arnd@arndb.de> (raw)
In-Reply-To: <CAD6h2NQ4fT7ycmxh+iLiBx4+u6+QB-H98309cRJLtRO3LGCbJg@mail.gmail.com>

On Wednesday 16 October 2013, Haojian Zhuang wrote:
> Oh, no. I shouldn't extend the static mapping table to the entire range.
> 
> Most of the registers only need to map once in the probe() function
> of the driver. Whether it's using static mapping or dynamic mapping,
> there's no difference.

There is a small difference in that having a megabyte-sized mapping will
reduce the number of TLB entries required for I/O access, which can
improve performance slightly. Other platforms do it for this reason.

>  The sysctrl register bank is used in both clock & platform
> driver. Each clock node contains reg property, it needs to be parsed
> by of_iomap(). Hotplug & SMP platform driver needs to parse sysctrl
> register bank also. If I don't choose the static IO mapping for sysctrl
> register bank, I have to define some global variable to store the
> virtual address mapping. Or I have to cost lots of redundant virtual
> address space for the same IO mapping.

It's a small cost, but your approach makes sense, just make sure
you have a comment in the map_io code explaining it.

> So I'll only keep the static IO mapping for sysctrl.

I'd still choose the larger mapping, but I'll leave the decision to you.

	Arnd

  reply	other threads:[~2013-10-16  7:27 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15  9:16 [PATCH v10 0/7] enable hi3xxx SoC Haojian Zhuang
2013-10-15  9:16 ` Haojian Zhuang
2013-10-15  9:16 ` [PATCH v10 1/7] clk: hi3xxx: add clock support Haojian Zhuang
2013-10-15  9:16   ` Haojian Zhuang
2013-10-30 19:44   ` Mike Turquette
2013-10-30 19:44     ` Mike Turquette
2013-10-15  9:16 ` [PATCH v10 2/7] ARM: hi3xxx: add board support with device tree Haojian Zhuang
2013-10-15  9:16   ` Haojian Zhuang
2013-10-15 13:00   ` Arnd Bergmann
2013-10-15 13:00     ` Arnd Bergmann
2013-10-15 13:12     ` Haojian Zhuang
2013-10-15 13:12       ` Haojian Zhuang
2013-10-15 18:06       ` Arnd Bergmann
2013-10-15 18:06         ` Arnd Bergmann
2013-10-16  1:08         ` Haojian Zhuang
2013-10-16  1:08           ` Haojian Zhuang
2013-10-16  1:31           ` Haojian Zhuang
2013-10-16  1:31             ` Haojian Zhuang
2013-10-16  7:27             ` Arnd Bergmann [this message]
2013-10-16  7:27               ` Arnd Bergmann
2013-10-15  9:16 ` [PATCH v10 3/7] ARM: dts: enable hi4511 " Haojian Zhuang
2013-10-15  9:16   ` Haojian Zhuang
2013-10-15 18:18   ` Arnd Bergmann
2013-10-15 18:18     ` Arnd Bergmann
2013-10-16  2:09     ` Haojian Zhuang
2013-10-16  2:09       ` Haojian Zhuang
2013-10-16  7:10       ` Arnd Bergmann
2013-10-16  7:10         ` Arnd Bergmann
2013-10-16  7:26     ` Linus Walleij
2013-10-16  7:26       ` Linus Walleij
2013-10-15  9:16 ` [PATCH v10 4/7] ARM: config: enable hi3xxx in multi_v7_defconfig Haojian Zhuang
2013-10-15  9:16   ` Haojian Zhuang
2013-10-15  9:16 ` [PATCH v10 5/7] ARM: config: add defconfig for Hi3xxx Haojian Zhuang
2013-10-15  9:16   ` Haojian Zhuang
2013-10-15  9:16 ` [PATCH v10 6/7] ARM: hi3xxx: add smp support Haojian Zhuang
2013-10-15  9:16   ` Haojian Zhuang
2013-10-15  9:16 ` [PATCH v10 7/7] ARM: hi3xxx: add hotplug support Haojian Zhuang
2013-10-15  9:16   ` Haojian Zhuang

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=201310160927.27412.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.