Skip to content

Commit

Permalink
ARM: ux500: Fix regression while init PM domains
Browse files Browse the repository at this point in the history
The commit afece3a ("PM / Domains: Add time accounting to various
genpd states") causes a boot regression for ux500.

The problem occurs when the ux500 machine code calls pm_genpd_init(), which
since the above change triggers a call to ktime_get(). More precisely,
because ux500 initializes PM domains in the init_IRQ() phase of the boot,
timekeeping has not yet been initialized.

Fix the problem by moving the initialization of the PM domains to after
timekeeping has been initialized.

Fixes: afece3a ("PM / Domains: Add time accounting to various genpd..")
Cc: Thara Gopinath <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
  • Loading branch information
storulf authored and arndb committed Oct 19, 2017
1 parent 8633e4f commit 72ecd79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions arch/arm/mach-ux500/cpu-db8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <asm/mach/arch.h>

#include "db8500-regs.h"
#include "pm_domains.h"

static int __init ux500_l2x0_unlock(void)
{
Expand Down Expand Up @@ -157,6 +158,9 @@ static const struct of_device_id u8500_local_bus_nodes[] = {

static void __init u8500_init_machine(void)
{
/* Initialize ux500 power domains */
ux500_pm_domains_init();

/* automatically probe child nodes of dbx5x0 devices */
if (of_machine_is_compatible("st-ericsson,u8540"))
of_platform_populate(NULL, u8500_local_bus_nodes,
Expand Down
4 changes: 0 additions & 4 deletions arch/arm/mach-ux500/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <linux/of_address.h>

#include "db8500-regs.h"
#include "pm_domains.h"

/* ARM WFI Standby signal register */
#define PRCM_ARM_WFI_STANDBY (prcmu_base + 0x130)
Expand Down Expand Up @@ -203,7 +202,4 @@ void __init ux500_pm_init(u32 phy_base, u32 size)

/* Set up ux500 suspend callbacks. */
suspend_set_ops(UX500_SUSPEND_OPS);

/* Initialize ux500 power domains */
ux500_pm_domains_init();
}

0 comments on commit 72ecd79

Please sign in to comment.