public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: tegra_cpu_die() dead code?
Date: Wed, 19 Dec 2012 11:11:05 -0700	[thread overview]
Message-ID: <50D20339.4090402@wwwdotorg.org> (raw)

Joseph,

In next-20121217, I see:

void __ref tegra_cpu_die(unsigned int cpu)
{
        cpu = cpu_logical_map(cpu);

        /* Flush the L1 data cache. */
        flush_cache_all();

        /* Shut down the current CPU. */
        tegra_hotplug_shutdown();

        /* Clock gate the CPU */
        tegra_wait_cpu_in_reset(cpu);
        tegra_disable_cpu_clock(cpu);
	
        /* Should never return here. */
        BUG();

Given that both implementations (Tegra20/30) of tegra_hotplug_shutdown
include:

        bl      tegra20_cpu_shutdown
        mov     pc, lr                  @ should never get here

why does tegra_cpu_die() include the calls to tegra_wait_cpu_in_reset()
and tegra_disable_cpu_clock() after calling tegra_hotplug_shutdown()?
(and how can a CPU wait for itself to be in reset anyway)?

Perhaps this is fixed by the various patches you've posted but are
awaiting being applied?

             reply	other threads:[~2012-12-19 18:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-19 18:11 Stephen Warren [this message]
     [not found] ` <50D20339.4090402-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-12-20  0:40   ` tegra_cpu_die() dead code? Joseph Lo

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=50D20339.4090402@wwwdotorg.org \
    --to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
    --cc=josephl-DDmLM1+adcrQT0dZR+AlfA@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