* [PATCH] ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins()
@ 2014-02-17 6:35 Magnus Damm
2014-02-17 8:52 ` Geert Uytterhoeven
2014-02-17 10:59 ` Laurent Pinchart
0 siblings, 2 replies; 6+ messages in thread
From: Magnus Damm @ 2014-02-17 6:35 UTC (permalink / raw)
To: linux-arm-kernel
From: Magnus Damm <damm@opensource.se>
Remove __init from rcar_gen2_read_mode_pins() to allow
it to be used after boot. For instance the R-Car Gen2
MD21 check is needed even in the case of CPU Hotplug.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
Written against renesas-devel-v3.14-rc2-20140213
arch/arm/mach-shmobile/setup-rcar-gen2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 0001/arch/arm/mach-shmobile/setup-rcar-gen2.c
+++ work/arch/arm/mach-shmobile/setup-rcar-gen2.c 2014-02-17 15:02:48.000000000 +0900
@@ -28,7 +28,7 @@
#define MODEMR 0xe6160060
-u32 __init rcar_gen2_read_mode_pins(void)
+u32 rcar_gen2_read_mode_pins(void)
{
void __iomem *modemr = ioremap_nocache(MODEMR, 4);
u32 mode;
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins()
2014-02-17 6:35 [PATCH] ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins() Magnus Damm
@ 2014-02-17 8:52 ` Geert Uytterhoeven
2014-02-17 10:59 ` Laurent Pinchart
1 sibling, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-02-17 8:52 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Feb 17, 2014 at 7:35 AM, Magnus Damm <magnus.damm@gmail.com> wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Remove __init from rcar_gen2_read_mode_pins() to allow
> it to be used after boot. For instance the R-Car Gen2
> MD21 check is needed even in the case of CPU Hotplug.
This is a prerequisite for "[PATCH] ARM: shmobile: Check MD21 at SMP
boot in case of APMU"
> Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins()
2014-02-17 6:35 [PATCH] ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins() Magnus Damm
2014-02-17 8:52 ` Geert Uytterhoeven
@ 2014-02-17 10:59 ` Laurent Pinchart
2014-02-17 11:08 ` Geert Uytterhoeven
2014-02-17 11:16 ` Magnus Damm
1 sibling, 2 replies; 6+ messages in thread
From: Laurent Pinchart @ 2014-02-17 10:59 UTC (permalink / raw)
To: linux-arm-kernel
Hi Magnus,
Thank you for the patch.
On Monday 17 February 2014 15:35:10 Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
>
> Remove __init from rcar_gen2_read_mode_pins() to allow
> it to be used after boot. For instance the R-Car Gen2
> MD21 check is needed even in the case of CPU Hotplug.
>
> Signed-off-by: Magnus Damm <damm@opensource.se>
> ---
>
> Written against renesas-devel-v3.14-rc2-20140213
>
> arch/arm/mach-shmobile/setup-rcar-gen2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- 0001/arch/arm/mach-shmobile/setup-rcar-gen2.c
> +++ work/arch/arm/mach-shmobile/setup-rcar-gen2.c 2014-02-17
> 15:02:48.000000000 +0900 @@ -28,7 +28,7 @@
>
> #define MODEMR 0xe6160060
>
> -u32 __init rcar_gen2_read_mode_pins(void)
> +u32 rcar_gen2_read_mode_pins(void)
> {
> void __iomem *modemr = ioremap_nocache(MODEMR, 4);
> u32 mode;
Should we read the value once at boot time and cache it ?
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins()
2014-02-17 10:59 ` Laurent Pinchart
@ 2014-02-17 11:08 ` Geert Uytterhoeven
2014-02-17 11:16 ` Magnus Damm
1 sibling, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-02-17 11:08 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Feb 17, 2014 at 11:59 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>> --- 0001/arch/arm/mach-shmobile/setup-rcar-gen2.c
>> +++ work/arch/arm/mach-shmobile/setup-rcar-gen2.c 2014-02-17
>> 15:02:48.000000000 +0900 @@ -28,7 +28,7 @@
>>
>> #define MODEMR 0xe6160060
>>
>> -u32 __init rcar_gen2_read_mode_pins(void)
>> +u32 rcar_gen2_read_mode_pins(void)
>> {
>> void __iomem *modemr = ioremap_nocache(MODEMR, 4);
>> u32 mode;
>
> Should we read the value once at boot time and cache it ?
That sounds like a great idea to me. The value doesn't change, and
it avoids the ioremap()/iounmap() overhead on subsequent calls.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins()
2014-02-17 10:59 ` Laurent Pinchart
2014-02-17 11:08 ` Geert Uytterhoeven
@ 2014-02-17 11:16 ` Magnus Damm
2014-02-18 0:18 ` Simon Horman
1 sibling, 1 reply; 6+ messages in thread
From: Magnus Damm @ 2014-02-17 11:16 UTC (permalink / raw)
To: linux-arm-kernel
Hi Laurent,
On Mon, Feb 17, 2014 at 7:59 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Magnus,
>
> Thank you for the patch.
>
> On Monday 17 February 2014 15:35:10 Magnus Damm wrote:
>> From: Magnus Damm <damm@opensource.se>
>>
>> Remove __init from rcar_gen2_read_mode_pins() to allow
>> it to be used after boot. For instance the R-Car Gen2
>> MD21 check is needed even in the case of CPU Hotplug.
>>
>> Signed-off-by: Magnus Damm <damm@opensource.se>
>> ---
>>
>> Written against renesas-devel-v3.14-rc2-20140213
>>
>> arch/arm/mach-shmobile/setup-rcar-gen2.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- 0001/arch/arm/mach-shmobile/setup-rcar-gen2.c
>> +++ work/arch/arm/mach-shmobile/setup-rcar-gen2.c 2014-02-17
>> 15:02:48.000000000 +0900 @@ -28,7 +28,7 @@
>>
>> #define MODEMR 0xe6160060
>>
>> -u32 __init rcar_gen2_read_mode_pins(void)
>> +u32 rcar_gen2_read_mode_pins(void)
>> {
>> void __iomem *modemr = ioremap_nocache(MODEMR, 4);
>> u32 mode;
>
> Should we read the value once at boot time and cache it ?
Seems a bit of a micro-optimization to me, but sure, it can't hurt.
Care to cook up an incremental patch implementing that? =)
Cheers,
/ magnus
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins()
2014-02-17 11:16 ` Magnus Damm
@ 2014-02-18 0:18 ` Simon Horman
0 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2014-02-18 0:18 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Feb 17, 2014 at 08:16:47PM +0900, Magnus Damm wrote:
> Hi Laurent,
>
> On Mon, Feb 17, 2014 at 7:59 PM, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
> > Hi Magnus,
> >
> > Thank you for the patch.
> >
> > On Monday 17 February 2014 15:35:10 Magnus Damm wrote:
> >> From: Magnus Damm <damm@opensource.se>
> >>
> >> Remove __init from rcar_gen2_read_mode_pins() to allow
> >> it to be used after boot. For instance the R-Car Gen2
> >> MD21 check is needed even in the case of CPU Hotplug.
> >>
> >> Signed-off-by: Magnus Damm <damm@opensource.se>
> >> ---
> >>
> >> Written against renesas-devel-v3.14-rc2-20140213
> >>
> >> arch/arm/mach-shmobile/setup-rcar-gen2.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> --- 0001/arch/arm/mach-shmobile/setup-rcar-gen2.c
> >> +++ work/arch/arm/mach-shmobile/setup-rcar-gen2.c 2014-02-17
> >> 15:02:48.000000000 +0900 @@ -28,7 +28,7 @@
> >>
> >> #define MODEMR 0xe6160060
> >>
> >> -u32 __init rcar_gen2_read_mode_pins(void)
> >> +u32 rcar_gen2_read_mode_pins(void)
> >> {
> >> void __iomem *modemr = ioremap_nocache(MODEMR, 4);
> >> u32 mode;
> >
> > Should we read the value once at boot time and cache it ?
>
> Seems a bit of a micro-optimization to me, but sure, it can't hurt.
>
> Care to cook up an incremental patch implementing that? =)
I have decided to take this patch as-is.
Feel free to make incremental changes on top of it.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-18 0:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-17 6:35 [PATCH] ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins() Magnus Damm
2014-02-17 8:52 ` Geert Uytterhoeven
2014-02-17 10:59 ` Laurent Pinchart
2014-02-17 11:08 ` Geert Uytterhoeven
2014-02-17 11:16 ` Magnus Damm
2014-02-18 0:18 ` Simon Horman
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).