diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2014-05-28 13:00:14 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-05-29 09:08:23 -0400 |
commit | 2e2d663d2dd64ffe9855be0b35aa221c9b8139f2 (patch) | |
tree | 508667aa6fbab564e7875d3953671265d0176e69 /arch/mips/mm/c-r4k.c | |
parent | 5ec79bf919ddb53fd98893b7217897c839aa19cc (diff) | |
parent | 322014531e1fac4674b8eef67e4f80aca1e9f003 (diff) |
Merge branch 'wip-mips-pm' of https://github.com/paulburton/linux into mips-for-linux-next
Diffstat (limited to 'arch/mips/mm/c-r4k.c')
-rw-r--r-- | arch/mips/mm/c-r4k.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 5c2128283ba6..587a14874f98 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -7,6 +7,7 @@ | |||
7 | * Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Ralf Baechle (ralf@gnu.org) | 7 | * Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Ralf Baechle (ralf@gnu.org) |
8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | 8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
9 | */ | 9 | */ |
10 | #include <linux/cpu_pm.h> | ||
10 | #include <linux/hardirq.h> | 11 | #include <linux/hardirq.h> |
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/highmem.h> | 13 | #include <linux/highmem.h> |
@@ -1643,3 +1644,26 @@ void r4k_cache_init(void) | |||
1643 | coherency_setup(); | 1644 | coherency_setup(); |
1644 | board_cache_error_setup = r4k_cache_error_setup; | 1645 | board_cache_error_setup = r4k_cache_error_setup; |
1645 | } | 1646 | } |
1647 | |||
1648 | static int r4k_cache_pm_notifier(struct notifier_block *self, unsigned long cmd, | ||
1649 | void *v) | ||
1650 | { | ||
1651 | switch (cmd) { | ||
1652 | case CPU_PM_ENTER_FAILED: | ||
1653 | case CPU_PM_EXIT: | ||
1654 | coherency_setup(); | ||
1655 | break; | ||
1656 | } | ||
1657 | |||
1658 | return NOTIFY_OK; | ||
1659 | } | ||
1660 | |||
1661 | static struct notifier_block r4k_cache_pm_notifier_block = { | ||
1662 | .notifier_call = r4k_cache_pm_notifier, | ||
1663 | }; | ||
1664 | |||
1665 | int __init r4k_cache_init_pm(void) | ||
1666 | { | ||
1667 | return cpu_pm_register_notifier(&r4k_cache_pm_notifier_block); | ||
1668 | } | ||
1669 | arch_initcall(r4k_cache_init_pm); | ||