lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 17 Aug 2012 18:10:09 +0900
From:	Magnus Damm <magnus.damm@...il.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Linux-sh list <linux-sh@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Linux PM list <linux-pm@...r.kernel.org>
Subject: Re: [PATCH] ARM: shmobile: Add A4S cpuidle state on sh7372

Hi Rafael,

Thanks for your patch. Please see below for my comment.

On Fri, Aug 17, 2012 at 5:10 AM, Rafael J. Wysocki <rjw@...k.pl> wrote:
>
> Add a "C5" cpuidle state to the SH7372 SoC connected to the A4S power
> domain in such a way that A4S may be turned off by cpuidle if all
> I/O devices in that domain have been suspended (or do not have
> attached drivers).
>
> This requires some reorganization of the initialization of SH7372
> power management which affects the the boards based on it, Mackerel
> and AP4EVB.
>
> Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>
> ---

[snip]

> --- linux.orig/arch/arm/mach-shmobile/pm-sh7372.c
> +++ linux/arch/arm/mach-shmobile/pm-sh7372.c
> @@ -339,6 +339,21 @@ static void sh7372_enter_a3sm_common(int
>         sh7372_set_reset_vector(__pa(sh7372_resume_core_standby_sysc));
>         sh7372_enter_sysc(pllc0_on, 1 << 12);
>  }
> +
> +static void sh7372_enter_a4s_common(int pllc0_on)
> +{
> +       sh7372_intca_suspend();
> +       sh7372_enter_sysc(pllc0_on, 1 << 10);
> +       sh7372_intca_resume();
> +}
> +
> +static void sh7372_pm_setup_smfram(void)
> +{
> +       memcpy((void *)SMFRAM, sh7372_resume_core_standby_sysc, 0x100);
> +       sh7372_set_reset_vector(SMFRAM);
> +}

I believe the reset vector is being setup dynamically depending on the
sleep mode, so you probably want to move sh7372_set_reset_vector()
into sh7372_enter_a4s_common().

Cheers,

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists