From: "Heiko Stübner" <heiko@sntech.de> To: linux-arm-kernel@lists.infradead.org Cc: Masahiro Yamada <yamada.masahiro@socionext.com>, Olof Johansson <olof@lixom.net>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de> Subject: Re: [PATCH v4 1/4] ARM: UniPhier: add basic support for UniPhier architecture Date: Tue, 21 Apr 2015 16:56:46 +0200 [thread overview] Message-ID: <4816076.vmWnA5VvTb@diego> (raw) In-Reply-To: <1429600890-26713-2-git-send-email-yamada.masahiro@socionext.com> Am Dienstag, 21. April 2015, 16:21:27 schrieb Masahiro Yamada: > Initial commit for a new SoC family, UniPhier, developed by > Socionext Inc. (formerly, System LSI Business Division of > Panasonic Corporation). > > This commit includes a minimal set of components for booting the > kernel, including SMP support. > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> > --- [...] > +static int uniphier_boot_secondary(unsigned int cpu, > + struct task_struct *idle) > +{ > + struct regmap *sbcm_regmap; > + int ret; > + > + sbcm_regmap = syscon_regmap_lookup_by_compatible( > + "socionext,uniphier-system-bus-controller-misc"); > + if (IS_ERR(sbcm_regmap)) { > + pr_err("failed to regmap system-bus-controller-misc\n"); > + return PTR_ERR(sbcm_regmap); > + } > + > + ret = regmap_write(sbcm_regmap, 0x1208, > + virt_to_phys(uniphier_secondary_startup)); > + if (!ret) > + asm("sev"); /* wake up secondary CPU */ > + > + return ret; > +} > + > +struct smp_operations uniphier_smp_ops __initdata = { > + .smp_prepare_cpus = uniphier_smp_prepare_cpus, > + .smp_boot_secondary = uniphier_boot_secondary, > +}; this is more of a drive-by comment, but you're doing the syscon lookup on every boot of a core, which includes walking big parts of the devicetree every time. Is there anything speaking against doing this once in a .smp_prepare_cpus callback? Heiko
WARNING: multiple messages have this Message-ID (diff)
From: heiko@sntech.de (Heiko Stübner) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 1/4] ARM: UniPhier: add basic support for UniPhier architecture Date: Tue, 21 Apr 2015 16:56:46 +0200 [thread overview] Message-ID: <4816076.vmWnA5VvTb@diego> (raw) In-Reply-To: <1429600890-26713-2-git-send-email-yamada.masahiro@socionext.com> Am Dienstag, 21. April 2015, 16:21:27 schrieb Masahiro Yamada: > Initial commit for a new SoC family, UniPhier, developed by > Socionext Inc. (formerly, System LSI Business Division of > Panasonic Corporation). > > This commit includes a minimal set of components for booting the > kernel, including SMP support. > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> > --- [...] > +static int uniphier_boot_secondary(unsigned int cpu, > + struct task_struct *idle) > +{ > + struct regmap *sbcm_regmap; > + int ret; > + > + sbcm_regmap = syscon_regmap_lookup_by_compatible( > + "socionext,uniphier-system-bus-controller-misc"); > + if (IS_ERR(sbcm_regmap)) { > + pr_err("failed to regmap system-bus-controller-misc\n"); > + return PTR_ERR(sbcm_regmap); > + } > + > + ret = regmap_write(sbcm_regmap, 0x1208, > + virt_to_phys(uniphier_secondary_startup)); > + if (!ret) > + asm("sev"); /* wake up secondary CPU */ > + > + return ret; > +} > + > +struct smp_operations uniphier_smp_ops __initdata = { > + .smp_prepare_cpus = uniphier_smp_prepare_cpus, > + .smp_boot_secondary = uniphier_boot_secondary, > +}; this is more of a drive-by comment, but you're doing the syscon lookup on every boot of a core, which includes walking big parts of the devicetree every time. Is there anything speaking against doing this once in a .smp_prepare_cpus callback? Heiko
next prev parent reply other threads:[~2015-04-21 14:56 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-04-21 7:21 [PATCH v4 0/4] ARM: SoC: add a new platform, UniPhier (arch/arm/mach-uniphier) Masahiro Yamada 2015-04-21 7:21 ` Masahiro Yamada 2015-04-21 7:21 ` Masahiro Yamada 2015-04-21 7:21 ` [PATCH v4 1/4] ARM: UniPhier: add basic support for UniPhier architecture Masahiro Yamada 2015-04-21 7:21 ` Masahiro Yamada 2015-04-21 14:56 ` Heiko Stübner [this message] 2015-04-21 14:56 ` Heiko Stübner 2015-04-23 3:41 ` Masahiro Yamada 2015-04-23 3:41 ` Masahiro Yamada 2015-04-23 3:41 ` Masahiro Yamada 2015-04-21 7:21 ` [PATCH v4 2/4] ARM: multi_v7_defconfig: enable UniPhier SoC family Masahiro Yamada 2015-04-21 7:21 ` Masahiro Yamada 2015-04-21 7:21 ` [PATCH v4 3/4] ARM: dts: UniPhier: add support for UniPhier SoCs and boards Masahiro Yamada 2015-04-21 7:21 ` Masahiro Yamada 2015-04-21 7:21 ` Masahiro Yamada 2015-04-21 7:21 ` [PATCH v4 4/4] MAINTAINERS: add myself as ARM/UniPhier maintainer Masahiro Yamada 2015-04-21 7:21 ` Masahiro Yamada
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=4816076.vmWnA5VvTb@diego \ --to=heiko@sntech.de \ --cc=arnd@arndb.de \ --cc=devicetree@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=olof@lixom.net \ --cc=yamada.masahiro@socionext.com \ /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: linkBe 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.