linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 6/6] ARM: tegra114: add CPU hotplug support
Date: Wed, 15 May 2013 17:11:41 -0600	[thread overview]
Message-ID: <5194162D.7010007@wwwdotorg.org> (raw)
In-Reply-To: <1368613644-11863-7-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

On 05/15/2013 04:27 AM, Joseph Lo wrote:
> The Tegra114 is a quad cores SoC. Each core can be hotplugged including
> CPU0. The hotplug sequence can be controlled by setting event trigger in
> flow controller. Then the flow controller will take care all the power
> sequence that include CPU up and down.

> diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile

> +obj-$(CONFIG_ARCH_TEGRA_114_SOC)	+= sleep-tegra30.o

CONFIG_ARCH_TEGRA_3x_SOC also adds that to obj-y. Will including it
twice cause problems?

> diff --git a/arch/arm/mach-tegra/reset-handler.S b/arch/arm/mach-tegra/reset-handler.S

>   *	  CPU boot vector when restarting the a CPU following
>   *	  an LP2 transition. Also branched to by LP0 and LP1 resume after
>   *	  re-enabling sdram.
> + *
> + *	r6: SoC ID << 8

I meant to ask in patch 1: Perhaps the macro could do a >>8 so that code
can compare directly against the SoC IDs instead of having to compare
against shifted values.

> +	tegra_check_soc_id TEGRA114, TEGRA_APB_MISC_BASE, r6, r7
> +	beq	no_cpu0_chk

Does that need a THUMB(it ...) added? Same elsewhere.

> +	cmp	r6, #(TEGRA114 <<8)

Needs a space after <<.

> diff --git a/arch/arm/mach-tegra/sleep-tegra30.S b/arch/arm/mach-tegra/sleep-tegra30.S

> @@ -45,12 +46,17 @@ ENDPROC(tegra30_hotplug_shutdown)
>   * and powergates it -- flags (in R0) indicate the request type.
>   * Must never be called for CPU 0.

That comment is wrong now, I think.

>  	tst	r0, #TEGRA30_POWER_HOTPLUG_SHUTDOWN
> +	beq	flow_ctrl_setting_for_lp2
> +
> +	/* flow controller set up for hotplug */
> +	mov	r3, #FLOW_CTRL_WAITEVENT		@ For hotplug
> +	b	flow_ctrl_done
> +flow_ctrl_setting_for_lp2:
> +	/* flow controller set up for LP2 */
> +	cmp	r10, #(TEGRA30 << 8)
>  	moveq   r3, #FLOW_CTRL_WAIT_FOR_INTERRUPT	@ For LP2

Do you need e.g. "movne r3, #0" or similar here? Otherwise, I think r3
ends up not being initialized.

> -	movne	r3, #FLOW_CTRL_WAITEVENT		@ For hotplug
> +flow_ctrl_done:
> +	cmp	r10, #(TEGRA30 << 8)
>  	str	r3, [r2]

I wonder whether creating a separate tegra114_cpu_shutdown() wouldn't be
better, to avoid all the runtime conditional code.

  parent reply	other threads:[~2013-05-15 23:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-15 10:27 [PATCH 0/6] ARM: tegra114: add CPU hotplug support Joseph Lo
     [not found] ` <1368613644-11863-1-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-15 10:27   ` [PATCH 1/6] ARM: tegra: add an assembly marco to check Tegra SoC ID Joseph Lo
     [not found]     ` <1368613644-11863-2-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-15 22:43       ` Stephen Warren
     [not found]         ` <51940FA4.6050609-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-16 10:09           ` Joseph Lo
     [not found]             ` <1368698988.7403.25.camel-yx3yKKdKkHfc7b1ADBJPm0n48jw8i0AO@public.gmane.org>
2013-05-16 18:21               ` Stephen Warren
2013-05-15 10:27   ` [PATCH 2/6] ARM: tegra: skip SCU and PL310 code when CPU is not Cortex-A9 Joseph Lo
     [not found]     ` <1368613644-11863-3-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-15 22:48       ` Stephen Warren
     [not found]         ` <519410D7.9060201-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-16 10:13           ` Joseph Lo
2013-05-15 10:27   ` [PATCH 3/6] ARM: tegra: make tegra_resume can work for Tegra114 Joseph Lo
     [not found]     ` <1368613644-11863-4-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-15 22:57       ` Stephen Warren
     [not found]         ` <519412E9.2080905-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-16 10:35           ` Joseph Lo
     [not found]             ` <1368700533.7403.47.camel-yx3yKKdKkHfc7b1ADBJPm0n48jw8i0AO@public.gmane.org>
2013-05-16 18:24               ` Stephen Warren
2013-05-15 10:27   ` [PATCH 4/6] ARM: tegra114: add power up sequence for warm boot CPU Joseph Lo
2013-05-15 10:27   ` [PATCH 5/6] clk: tegra114: implement wait_for_reset and disable_clock for tegra_cpu_car_ops Joseph Lo
     [not found]     ` <1368613644-11863-6-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-15 23:02       ` Stephen Warren
2013-05-16 19:17       ` Mike Turquette
2013-05-15 10:27   ` [PATCH 6/6] ARM: tegra114: add CPU hotplug support Joseph Lo
     [not found]     ` <1368613644-11863-7-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-15 23:11       ` Stephen Warren [this message]
     [not found]         ` <5194162D.7010007-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-16 11:14           ` Joseph Lo
     [not found]             ` <1368702862.7403.86.camel-yx3yKKdKkHfc7b1ADBJPm0n48jw8i0AO@public.gmane.org>
2013-05-16 18:26               ` Stephen Warren
2013-05-15 23:38   ` [PATCH 0/6] " Stephen Warren
     [not found]     ` <51941C58.9060002-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-16  9:53       ` Joseph Lo
     [not found]         ` <1368698019.7403.10.camel-yx3yKKdKkHfc7b1ADBJPm0n48jw8i0AO@public.gmane.org>
2013-05-16 18:19           ` Stephen Warren
     [not found]             ` <51952344.1090003-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-17 10:15               ` Joseph Lo
2013-05-17 10:27               ` Russell King - ARM Linux
2013-05-17 10:23           ` Russell King - ARM Linux

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=5194162D.7010007@wwwdotorg.org \
    --to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
    --cc=josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 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).