diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-08 16:10:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-08 16:10:57 -0500 |
commit | eb59c505f8a5906ad2e053d14fab50eb8574fd6f (patch) | |
tree | c6e875adc12b481b916e847e8f80b8881a0fb02c /arch | |
parent | 1619ed8f60959829d070d8f39cd2f8ca0e7135ce (diff) | |
parent | c233523b3d392e530033a7587d7970dc62a02361 (diff) |
Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
* 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (76 commits)
PM / Hibernate: Implement compat_ioctl for /dev/snapshot
PM / Freezer: fix return value of freezable_schedule_timeout_killable()
PM / shmobile: Allow the A4R domain to be turned off at run time
PM / input / touchscreen: Make st1232 use device PM QoS constraints
PM / QoS: Introduce dev_pm_qos_add_ancestor_request()
PM / shmobile: Remove the stay_on flag from SH7372's PM domains
PM / shmobile: Don't include SH7372's INTCS in syscore suspend/resume
PM / shmobile: Add support for the sh7372 A4S power domain / sleep mode
PM: Drop generic_subsys_pm_ops
PM / Sleep: Remove forward-only callbacks from AMBA bus type
PM / Sleep: Remove forward-only callbacks from platform bus type
PM: Run the driver callback directly if the subsystem one is not there
PM / Sleep: Make pm_op() and pm_noirq_op() return callback pointers
PM/Devfreq: Add Exynos4-bus device DVFS driver for Exynos4210/4212/4412.
PM / Sleep: Merge internal functions in generic_ops.c
PM / Sleep: Simplify generic system suspend callbacks
PM / Hibernate: Remove deprecated hibernation snapshot ioctls
PM / Sleep: Fix freezer failures due to racy usermodehelper_is_disabled()
ARM: S3C64XX: Implement basic power domain support
PM / shmobile: Use common always on power domain governor
...
Fix up trivial conflict in fs/xfs/xfs_buf.c due to removal of unused
XBT_FORCE_SLEEP bit
Diffstat (limited to 'arch')
34 files changed, 400 insertions, 114 deletions
diff --git a/arch/alpha/include/asm/thread_info.h b/arch/alpha/include/asm/thread_info.h index ff73db022342..28335bd40e40 100644 --- a/arch/alpha/include/asm/thread_info.h +++ b/arch/alpha/include/asm/thread_info.h | |||
@@ -79,7 +79,6 @@ register struct thread_info *__current_thread_info __asm__("$8"); | |||
79 | #define TIF_UAC_SIGBUS 12 /* ! userspace part of 'osf_sysinfo' */ | 79 | #define TIF_UAC_SIGBUS 12 /* ! userspace part of 'osf_sysinfo' */ |
80 | #define TIF_MEMDIE 13 /* is terminating due to OOM killer */ | 80 | #define TIF_MEMDIE 13 /* is terminating due to OOM killer */ |
81 | #define TIF_RESTORE_SIGMASK 14 /* restore signal mask in do_signal */ | 81 | #define TIF_RESTORE_SIGMASK 14 /* restore signal mask in do_signal */ |
82 | #define TIF_FREEZE 16 /* is freezing for suspend */ | ||
83 | 82 | ||
84 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 83 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
85 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 84 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
@@ -87,7 +86,6 @@ register struct thread_info *__current_thread_info __asm__("$8"); | |||
87 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 86 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
88 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 87 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
89 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 88 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
90 | #define _TIF_FREEZE (1<<TIF_FREEZE) | ||
91 | 89 | ||
92 | /* Work to do on interrupt/exception return. */ | 90 | /* Work to do on interrupt/exception return. */ |
93 | #define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \ | 91 | #define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \ |
diff --git a/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index 7b5cc8dae06e..0f30c3a78fc1 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -142,7 +142,6 @@ extern void vfp_flush_hwstate(struct thread_info *); | |||
142 | #define TIF_POLLING_NRFLAG 16 | 142 | #define TIF_POLLING_NRFLAG 16 |
143 | #define TIF_USING_IWMMXT 17 | 143 | #define TIF_USING_IWMMXT 17 |
144 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 144 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
145 | #define TIF_FREEZE 19 | ||
146 | #define TIF_RESTORE_SIGMASK 20 | 145 | #define TIF_RESTORE_SIGMASK 20 |
147 | #define TIF_SECCOMP 21 | 146 | #define TIF_SECCOMP 21 |
148 | 147 | ||
@@ -152,7 +151,6 @@ extern void vfp_flush_hwstate(struct thread_info *); | |||
152 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 151 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
153 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 152 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
154 | #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) | 153 | #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) |
155 | #define _TIF_FREEZE (1 << TIF_FREEZE) | ||
156 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | 154 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) |
157 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | 155 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
158 | 156 | ||
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig index 5552e048c2be..381586c7b1b2 100644 --- a/arch/arm/mach-s3c64xx/Kconfig +++ b/arch/arm/mach-s3c64xx/Kconfig | |||
@@ -8,6 +8,7 @@ config PLAT_S3C64XX | |||
8 | bool | 8 | bool |
9 | depends on ARCH_S3C64XX | 9 | depends on ARCH_S3C64XX |
10 | select SAMSUNG_WAKEMASK | 10 | select SAMSUNG_WAKEMASK |
11 | select PM_GENERIC_DOMAINS | ||
11 | default y | 12 | default y |
12 | help | 13 | help |
13 | Base platform code for any Samsung S3C64XX device | 14 | Base platform code for any Samsung S3C64XX device |
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c index f1c848aa4a1e..fb786b6a2eae 100644 --- a/arch/arm/mach-s3c64xx/mach-crag6410.c +++ b/arch/arm/mach-s3c64xx/mach-crag6410.c | |||
@@ -706,7 +706,7 @@ static void __init crag6410_machine_init(void) | |||
706 | 706 | ||
707 | regulator_has_full_constraints(); | 707 | regulator_has_full_constraints(); |
708 | 708 | ||
709 | s3c_pm_init(); | 709 | s3c64xx_pm_init(); |
710 | } | 710 | } |
711 | 711 | ||
712 | MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410") | 712 | MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410") |
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c index b375cd5c47cb..7d3e81b9dd06 100644 --- a/arch/arm/mach-s3c64xx/pm.c +++ b/arch/arm/mach-s3c64xx/pm.c | |||
@@ -17,10 +17,12 @@ | |||
17 | #include <linux/serial_core.h> | 17 | #include <linux/serial_core.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/pm_domain.h> | ||
20 | 21 | ||
21 | #include <mach/map.h> | 22 | #include <mach/map.h> |
22 | #include <mach/irqs.h> | 23 | #include <mach/irqs.h> |
23 | 24 | ||
25 | #include <plat/devs.h> | ||
24 | #include <plat/pm.h> | 26 | #include <plat/pm.h> |
25 | #include <plat/wakeup-mask.h> | 27 | #include <plat/wakeup-mask.h> |
26 | 28 | ||
@@ -31,6 +33,148 @@ | |||
31 | #include <mach/regs-gpio-memport.h> | 33 | #include <mach/regs-gpio-memport.h> |
32 | #include <mach/regs-modem.h> | 34 | #include <mach/regs-modem.h> |
33 | 35 | ||
36 | struct s3c64xx_pm_domain { | ||
37 | char *const name; | ||
38 | u32 ena; | ||
39 | u32 pwr_stat; | ||
40 | struct generic_pm_domain pd; | ||
41 | }; | ||
42 | |||
43 | static int s3c64xx_pd_off(struct generic_pm_domain *domain) | ||
44 | { | ||
45 | struct s3c64xx_pm_domain *pd; | ||
46 | u32 val; | ||
47 | |||
48 | pd = container_of(domain, struct s3c64xx_pm_domain, pd); | ||
49 | |||
50 | val = __raw_readl(S3C64XX_NORMAL_CFG); | ||
51 | val &= ~(pd->ena); | ||
52 | __raw_writel(val, S3C64XX_NORMAL_CFG); | ||
53 | |||
54 | return 0; | ||
55 | } | ||
56 | |||
57 | static int s3c64xx_pd_on(struct generic_pm_domain *domain) | ||
58 | { | ||
59 | struct s3c64xx_pm_domain *pd; | ||
60 | u32 val; | ||
61 | long retry = 1000000L; | ||
62 | |||
63 | pd = container_of(domain, struct s3c64xx_pm_domain, pd); | ||
64 | |||
65 | val = __raw_readl(S3C64XX_NORMAL_CFG); | ||
66 | val |= pd->ena; | ||
67 | __raw_writel(val, S3C64XX_NORMAL_CFG); | ||
68 | |||
69 | /* Not all domains provide power status readback */ | ||
70 | if (pd->pwr_stat) { | ||
71 | do { | ||
72 | cpu_relax(); | ||
73 | if (__raw_readl(S3C64XX_BLK_PWR_STAT) & pd->pwr_stat) | ||
74 | break; | ||
75 | } while (retry--); | ||
76 | |||
77 | if (!retry) { | ||
78 | pr_err("Failed to start domain %s\n", pd->name); | ||
79 | return -EBUSY; | ||
80 | } | ||
81 | } | ||
82 | |||
83 | return 0; | ||
84 | } | ||
85 | |||
86 | static struct s3c64xx_pm_domain s3c64xx_pm_irom = { | ||
87 | .name = "IROM", | ||
88 | .ena = S3C64XX_NORMALCFG_IROM_ON, | ||
89 | .pd = { | ||
90 | .power_off = s3c64xx_pd_off, | ||
91 | .power_on = s3c64xx_pd_on, | ||
92 | }, | ||
93 | }; | ||
94 | |||
95 | static struct s3c64xx_pm_domain s3c64xx_pm_etm = { | ||
96 | .name = "ETM", | ||
97 | .ena = S3C64XX_NORMALCFG_DOMAIN_ETM_ON, | ||
98 | .pwr_stat = S3C64XX_BLKPWRSTAT_ETM, | ||
99 | .pd = { | ||
100 | .power_off = s3c64xx_pd_off, | ||
101 | .power_on = s3c64xx_pd_on, | ||
102 | }, | ||
103 | }; | ||
104 | |||
105 | static struct s3c64xx_pm_domain s3c64xx_pm_s = { | ||
106 | .name = "S", | ||
107 | .ena = S3C64XX_NORMALCFG_DOMAIN_S_ON, | ||
108 | .pwr_stat = S3C64XX_BLKPWRSTAT_S, | ||
109 | .pd = { | ||
110 | .power_off = s3c64xx_pd_off, | ||
111 | .power_on = s3c64xx_pd_on, | ||
112 | }, | ||
113 | }; | ||
114 | |||
115 | static struct s3c64xx_pm_domain s3c64xx_pm_f = { | ||
116 | .name = "F", | ||
117 | .ena = S3C64XX_NORMALCFG_DOMAIN_F_ON, | ||
118 | .pwr_stat = S3C64XX_BLKPWRSTAT_F, | ||
119 | .pd = { | ||
120 | .power_off = s3c64xx_pd_off, | ||
121 | .power_on = s3c64xx_pd_on, | ||
122 | }, | ||
123 | }; | ||
124 | |||
125 | static struct s3c64xx_pm_domain s3c64xx_pm_p = { | ||
126 | .name = "P", | ||
127 | .ena = S3C64XX_NORMALCFG_DOMAIN_P_ON, | ||
128 | .pwr_stat = S3C64XX_BLKPWRSTAT_P, | ||
129 | .pd = { | ||
130 | .power_off = s3c64xx_pd_off, | ||
131 | .power_on = s3c64xx_pd_on, | ||
132 | }, | ||
133 | }; | ||
134 | |||
135 | static struct s3c64xx_pm_domain s3c64xx_pm_i = { | ||
136 | .name = "I", | ||
137 | .ena = S3C64XX_NORMALCFG_DOMAIN_I_ON, | ||
138 | .pwr_stat = S3C64XX_BLKPWRSTAT_I, | ||
139 | .pd = { | ||
140 | .power_off = s3c64xx_pd_off, | ||
141 | .power_on = s3c64xx_pd_on, | ||
142 | }, | ||
143 | }; | ||
144 | |||
145 | static struct s3c64xx_pm_domain s3c64xx_pm_g = { | ||
146 | .name = "G", | ||
147 | .ena = S3C64XX_NORMALCFG_DOMAIN_G_ON, | ||
148 | .pd = { | ||
149 | .power_off = s3c64xx_pd_off, | ||
150 | .power_on = s3c64xx_pd_on, | ||
151 | }, | ||
152 | }; | ||
153 | |||
154 | static struct s3c64xx_pm_domain s3c64xx_pm_v = { | ||
155 | .name = "V", | ||
156 | .ena = S3C64XX_NORMALCFG_DOMAIN_V_ON, | ||
157 | .pwr_stat = S3C64XX_BLKPWRSTAT_V, | ||
158 | .pd = { | ||
159 | .power_off = s3c64xx_pd_off, | ||
160 | .power_on = s3c64xx_pd_on, | ||
161 | }, | ||
162 | }; | ||
163 | |||
164 | static struct s3c64xx_pm_domain *s3c64xx_always_on_pm_domains[] = { | ||
165 | &s3c64xx_pm_irom, | ||
166 | }; | ||
167 | |||
168 | static struct s3c64xx_pm_domain *s3c64xx_pm_domains[] = { | ||
169 | &s3c64xx_pm_etm, | ||
170 | &s3c64xx_pm_g, | ||
171 | &s3c64xx_pm_v, | ||
172 | &s3c64xx_pm_i, | ||
173 | &s3c64xx_pm_p, | ||
174 | &s3c64xx_pm_s, | ||
175 | &s3c64xx_pm_f, | ||
176 | }; | ||
177 | |||
34 | #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK | 178 | #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK |
35 | void s3c_pm_debug_smdkled(u32 set, u32 clear) | 179 | void s3c_pm_debug_smdkled(u32 set, u32 clear) |
36 | { | 180 | { |
@@ -89,6 +233,8 @@ static struct sleep_save misc_save[] = { | |||
89 | 233 | ||
90 | SAVE_ITEM(S3C64XX_SDMA_SEL), | 234 | SAVE_ITEM(S3C64XX_SDMA_SEL), |
91 | SAVE_ITEM(S3C64XX_MODEM_MIFPCON), | 235 | SAVE_ITEM(S3C64XX_MODEM_MIFPCON), |
236 | |||
237 | SAVE_ITEM(S3C64XX_NORMAL_CFG), | ||
92 | }; | 238 | }; |
93 | 239 | ||
94 | void s3c_pm_configure_extint(void) | 240 | void s3c_pm_configure_extint(void) |
@@ -179,7 +325,26 @@ static void s3c64xx_pm_prepare(void) | |||
179 | __raw_writel(__raw_readl(S3C64XX_WAKEUP_STAT), S3C64XX_WAKEUP_STAT); | 325 | __raw_writel(__raw_readl(S3C64XX_WAKEUP_STAT), S3C64XX_WAKEUP_STAT); |
180 | } | 326 | } |
181 | 327 | ||
182 | static int s3c64xx_pm_init(void) | 328 | int __init s3c64xx_pm_init(void) |
329 | { | ||
330 | int i; | ||
331 | |||
332 | s3c_pm_init(); | ||
333 | |||
334 | for (i = 0; i < ARRAY_SIZE(s3c64xx_always_on_pm_domains); i++) | ||
335 | pm_genpd_init(&s3c64xx_always_on_pm_domains[i]->pd, | ||
336 | &pm_domain_always_on_gov, false); | ||
337 | |||
338 | for (i = 0; i < ARRAY_SIZE(s3c64xx_pm_domains); i++) | ||
339 | pm_genpd_init(&s3c64xx_pm_domains[i]->pd, NULL, false); | ||
340 | |||
341 | if (dev_get_platdata(&s3c_device_fb.dev)) | ||
342 | pm_genpd_add_device(&s3c64xx_pm_f.pd, &s3c_device_fb.dev); | ||
343 | |||
344 | return 0; | ||
345 | } | ||
346 | |||
347 | static __init int s3c64xx_pm_initcall(void) | ||
183 | { | 348 | { |
184 | pm_cpu_prep = s3c64xx_pm_prepare; | 349 | pm_cpu_prep = s3c64xx_pm_prepare; |
185 | pm_cpu_sleep = s3c64xx_cpu_suspend; | 350 | pm_cpu_sleep = s3c64xx_cpu_suspend; |
@@ -198,5 +363,12 @@ static int s3c64xx_pm_init(void) | |||
198 | 363 | ||
199 | return 0; | 364 | return 0; |
200 | } | 365 | } |
366 | arch_initcall(s3c64xx_pm_initcall); | ||
367 | |||
368 | static __init int s3c64xx_pm_late_initcall(void) | ||
369 | { | ||
370 | pm_genpd_poweroff_unused(); | ||
201 | 371 | ||
202 | arch_initcall(s3c64xx_pm_init); | 372 | return 0; |
373 | } | ||
374 | late_initcall(s3c64xx_pm_late_initcall); | ||
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 4bf82c156771..be78a2c73db4 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -34,8 +34,8 @@ extern void sh7372_add_standard_devices(void); | |||
34 | extern void sh7372_clock_init(void); | 34 | extern void sh7372_clock_init(void); |
35 | extern void sh7372_pinmux_init(void); | 35 | extern void sh7372_pinmux_init(void); |
36 | extern void sh7372_pm_init(void); | 36 | extern void sh7372_pm_init(void); |
37 | extern void sh7372_resume_core_standby_a3sm(void); | 37 | extern void sh7372_resume_core_standby_sysc(void); |
38 | extern int sh7372_do_idle_a3sm(unsigned long unused); | 38 | extern int sh7372_do_idle_sysc(unsigned long sleep_mode); |
39 | extern struct clk sh7372_extal1_clk; | 39 | extern struct clk sh7372_extal1_clk; |
40 | extern struct clk sh7372_extal2_clk; | 40 | extern struct clk sh7372_extal2_clk; |
41 | 41 | ||
diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/include/mach/sh7372.h index 84532f9629b2..8254ab86f6cd 100644 --- a/arch/arm/mach-shmobile/include/mach/sh7372.h +++ b/arch/arm/mach-shmobile/include/mach/sh7372.h | |||
@@ -480,11 +480,10 @@ struct platform_device; | |||
480 | struct sh7372_pm_domain { | 480 | struct sh7372_pm_domain { |
481 | struct generic_pm_domain genpd; | 481 | struct generic_pm_domain genpd; |
482 | struct dev_power_governor *gov; | 482 | struct dev_power_governor *gov; |
483 | void (*suspend)(void); | 483 | int (*suspend)(void); |
484 | void (*resume)(void); | 484 | void (*resume)(void); |
485 | unsigned int bit_shift; | 485 | unsigned int bit_shift; |
486 | bool no_debug; | 486 | bool no_debug; |
487 | bool stay_on; | ||
488 | }; | 487 | }; |
489 | 488 | ||
490 | static inline struct sh7372_pm_domain *to_sh7372_pd(struct generic_pm_domain *d) | 489 | static inline struct sh7372_pm_domain *to_sh7372_pd(struct generic_pm_domain *d) |
@@ -499,6 +498,7 @@ extern struct sh7372_pm_domain sh7372_d4; | |||
499 | extern struct sh7372_pm_domain sh7372_a4r; | 498 | extern struct sh7372_pm_domain sh7372_a4r; |
500 | extern struct sh7372_pm_domain sh7372_a3rv; | 499 | extern struct sh7372_pm_domain sh7372_a3rv; |
501 | extern struct sh7372_pm_domain sh7372_a3ri; | 500 | extern struct sh7372_pm_domain sh7372_a3ri; |
501 | extern struct sh7372_pm_domain sh7372_a4s; | ||
502 | extern struct sh7372_pm_domain sh7372_a3sp; | 502 | extern struct sh7372_pm_domain sh7372_a3sp; |
503 | extern struct sh7372_pm_domain sh7372_a3sg; | 503 | extern struct sh7372_pm_domain sh7372_a3sg; |
504 | 504 | ||
@@ -515,5 +515,7 @@ extern void sh7372_pm_add_subdomain(struct sh7372_pm_domain *sh7372_pd, | |||
515 | 515 | ||
516 | extern void sh7372_intcs_suspend(void); | 516 | extern void sh7372_intcs_suspend(void); |
517 | extern void sh7372_intcs_resume(void); | 517 | extern void sh7372_intcs_resume(void); |
518 | extern void sh7372_intca_suspend(void); | ||
519 | extern void sh7372_intca_resume(void); | ||
518 | 520 | ||
519 | #endif /* __ASM_SH7372_H__ */ | 521 | #endif /* __ASM_SH7372_H__ */ |
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c index 2d8856df80e2..89afcaba99a1 100644 --- a/arch/arm/mach-shmobile/intc-sh7372.c +++ b/arch/arm/mach-shmobile/intc-sh7372.c | |||
@@ -535,6 +535,7 @@ static struct resource intcs_resources[] __initdata = { | |||
535 | static struct intc_desc intcs_desc __initdata = { | 535 | static struct intc_desc intcs_desc __initdata = { |
536 | .name = "sh7372-intcs", | 536 | .name = "sh7372-intcs", |
537 | .force_enable = ENABLED_INTCS, | 537 | .force_enable = ENABLED_INTCS, |
538 | .skip_syscore_suspend = true, | ||
538 | .resource = intcs_resources, | 539 | .resource = intcs_resources, |
539 | .num_resources = ARRAY_SIZE(intcs_resources), | 540 | .num_resources = ARRAY_SIZE(intcs_resources), |
540 | .hw = INTC_HW_DESC(intcs_vectors, intcs_groups, intcs_mask_registers, | 541 | .hw = INTC_HW_DESC(intcs_vectors, intcs_groups, intcs_mask_registers, |
@@ -611,3 +612,52 @@ void sh7372_intcs_resume(void) | |||
611 | for (k = 0x80; k <= 0x9c; k += 4) | 612 | for (k = 0x80; k <= 0x9c; k += 4) |
612 | __raw_writeb(ffd5[k], intcs_ffd5 + k); | 613 | __raw_writeb(ffd5[k], intcs_ffd5 + k); |
613 | } | 614 | } |
615 | |||
616 | static unsigned short e694[0x200]; | ||
617 | static unsigned short e695[0x200]; | ||
618 | |||
619 | void sh7372_intca_suspend(void) | ||
620 | { | ||
621 | int k; | ||
622 | |||
623 | for (k = 0x00; k <= 0x38; k += 4) | ||
624 | e694[k] = __raw_readw(0xe6940000 + k); | ||
625 | |||
626 | for (k = 0x80; k <= 0xb4; k += 4) | ||
627 | e694[k] = __raw_readb(0xe6940000 + k); | ||
628 | |||
629 | for (k = 0x180; k <= 0x1b4; k += 4) | ||
630 | e694[k] = __raw_readb(0xe6940000 + k); | ||
631 | |||
632 | for (k = 0x00; k <= 0x50; k += 4) | ||
633 | e695[k] = __raw_readw(0xe6950000 + k); | ||
634 | |||
635 | for (k = 0x80; k <= 0xa8; k += 4) | ||
636 | e695[k] = __raw_readb(0xe6950000 + k); | ||
637 | |||
638 | for (k = 0x180; k <= 0x1a8; k += 4) | ||
639 | e695[k] = __raw_readb(0xe6950000 + k); | ||
640 | } | ||
641 | |||
642 | void sh7372_intca_resume(void) | ||
643 | { | ||
644 | int k; | ||
645 | |||
646 | for (k = 0x00; k <= 0x38; k += 4) | ||
647 | __raw_writew(e694[k], 0xe6940000 + k); | ||
648 | |||
649 | for (k = 0x80; k <= 0xb4; k += 4) | ||
650 | __raw_writeb(e694[k], 0xe6940000 + k); | ||
651 | |||
652 | for (k = 0x180; k <= 0x1b4; k += 4) | ||
653 | __raw_writeb(e694[k], 0xe6940000 + k); | ||
654 | |||
655 | for (k = 0x00; k <= 0x50; k += 4) | ||
656 | __raw_writew(e695[k], 0xe6950000 + k); | ||
657 | |||
658 | for (k = 0x80; k <= 0xa8; k += 4) | ||
659 | __raw_writeb(e695[k], 0xe6950000 + k); | ||
660 | |||
661 | for (k = 0x180; k <= 0x1a8; k += 4) | ||
662 | __raw_writeb(e695[k], 0xe6950000 + k); | ||
663 | } | ||
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c index 34bbcbfb1706..77b8fc12fc2f 100644 --- a/arch/arm/mach-shmobile/pm-sh7372.c +++ b/arch/arm/mach-shmobile/pm-sh7372.c | |||
@@ -82,11 +82,12 @@ static int pd_power_down(struct generic_pm_domain *genpd) | |||
82 | struct sh7372_pm_domain *sh7372_pd = to_sh7372_pd(genpd); | 82 | struct sh7372_pm_domain *sh7372_pd = to_sh7372_pd(genpd); |
83 | unsigned int mask = 1 << sh7372_pd->bit_shift; | 83 | unsigned int mask = 1 << sh7372_pd->bit_shift; |
84 | 84 | ||
85 | if (sh7372_pd->suspend) | 85 | if (sh7372_pd->suspend) { |
86 | sh7372_pd->suspend(); | 86 | int ret = sh7372_pd->suspend(); |
87 | 87 | ||
88 | if (sh7372_pd->stay_on) | 88 | if (ret) |
89 | return 0; | 89 | return ret; |
90 | } | ||
90 | 91 | ||
91 | if (__raw_readl(PSTR) & mask) { | 92 | if (__raw_readl(PSTR) & mask) { |
92 | unsigned int retry_count; | 93 | unsigned int retry_count; |
@@ -101,8 +102,8 @@ static int pd_power_down(struct generic_pm_domain *genpd) | |||
101 | } | 102 | } |
102 | 103 | ||
103 | if (!sh7372_pd->no_debug) | 104 | if (!sh7372_pd->no_debug) |
104 | pr_debug("sh7372 power domain down 0x%08x -> PSTR = 0x%08x\n", | 105 | pr_debug("%s: Power off, 0x%08x -> PSTR = 0x%08x\n", |
105 | mask, __raw_readl(PSTR)); | 106 | genpd->name, mask, __raw_readl(PSTR)); |
106 | 107 | ||
107 | return 0; | 108 | return 0; |
108 | } | 109 | } |
@@ -113,9 +114,6 @@ static int __pd_power_up(struct sh7372_pm_domain *sh7372_pd, bool do_resume) | |||
113 | unsigned int retry_count; | 114 | unsigned int retry_count; |
114 | int ret = 0; | 115 | int ret = 0; |
115 | 116 | ||
116 | if (sh7372_pd->stay_on) | ||
117 | goto out; | ||
118 | |||
119 | if (__raw_readl(PSTR) & mask) | 117 | if (__raw_readl(PSTR) & mask) |
120 | goto out; | 118 | goto out; |
121 | 119 | ||
@@ -133,8 +131,8 @@ static int __pd_power_up(struct sh7372_pm_domain *sh7372_pd, bool do_resume) | |||
133 | ret = -EIO; | 131 | ret = -EIO; |
134 | 132 | ||
135 | if (!sh7372_pd->no_debug) | 133 | if (!sh7372_pd->no_debug) |
136 | pr_debug("sh7372 power domain up 0x%08x -> PSTR = 0x%08x\n", | 134 | pr_debug("%s: Power on, 0x%08x -> PSTR = 0x%08x\n", |
137 | mask, __raw_readl(PSTR)); | 135 | sh7372_pd->genpd.name, mask, __raw_readl(PSTR)); |
138 | 136 | ||
139 | out: | 137 | out: |
140 | if (ret == 0 && sh7372_pd->resume && do_resume) | 138 | if (ret == 0 && sh7372_pd->resume && do_resume) |
@@ -148,35 +146,60 @@ static int pd_power_up(struct generic_pm_domain *genpd) | |||
148 | return __pd_power_up(to_sh7372_pd(genpd), true); | 146 | return __pd_power_up(to_sh7372_pd(genpd), true); |
149 | } | 147 | } |
150 | 148 | ||
151 | static void sh7372_a4r_suspend(void) | 149 | static int sh7372_a4r_suspend(void) |
152 | { | 150 | { |
153 | sh7372_intcs_suspend(); | 151 | sh7372_intcs_suspend(); |
154 | __raw_writel(0x300fffff, WUPRMSK); /* avoid wakeup */ | 152 | __raw_writel(0x300fffff, WUPRMSK); /* avoid wakeup */ |
153 | return 0; | ||
155 | } | 154 | } |
156 | 155 | ||
157 | static bool pd_active_wakeup(struct device *dev) | 156 | static bool pd_active_wakeup(struct device *dev) |
158 | { | 157 | { |
159 | return true; | 158 | bool (*active_wakeup)(struct device *dev); |
159 | |||
160 | active_wakeup = dev_gpd_data(dev)->ops.active_wakeup; | ||
161 | return active_wakeup ? active_wakeup(dev) : true; | ||
160 | } | 162 | } |
161 | 163 | ||
162 | static bool sh7372_power_down_forbidden(struct dev_pm_domain *domain) | 164 | static int sh7372_stop_dev(struct device *dev) |
163 | { | 165 | { |
164 | return false; | 166 | int (*stop)(struct device *dev); |
167 | |||
168 | stop = dev_gpd_data(dev)->ops.stop; | ||
169 | if (stop) { | ||
170 | int ret = stop(dev); | ||
171 | if (ret) | ||
172 | return ret; | ||
173 | } | ||
174 | return pm_clk_suspend(dev); | ||
165 | } | 175 | } |
166 | 176 | ||
167 | struct dev_power_governor sh7372_always_on_gov = { | 177 | static int sh7372_start_dev(struct device *dev) |
168 | .power_down_ok = sh7372_power_down_forbidden, | 178 | { |
169 | }; | 179 | int (*start)(struct device *dev); |
180 | int ret; | ||
181 | |||
182 | ret = pm_clk_resume(dev); | ||
183 | if (ret) | ||
184 | return ret; | ||
185 | |||
186 | start = dev_gpd_data(dev)->ops.start; | ||
187 | if (start) | ||
188 | ret = start(dev); | ||
189 | |||
190 | return ret; | ||
191 | } | ||
170 | 192 | ||
171 | void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd) | 193 | void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd) |
172 | { | 194 | { |
173 | struct generic_pm_domain *genpd = &sh7372_pd->genpd; | 195 | struct generic_pm_domain *genpd = &sh7372_pd->genpd; |
196 | struct dev_power_governor *gov = sh7372_pd->gov; | ||
174 | 197 | ||
175 | pm_genpd_init(genpd, sh7372_pd->gov, false); | 198 | pm_genpd_init(genpd, gov ? : &simple_qos_governor, false); |
176 | genpd->stop_device = pm_clk_suspend; | 199 | genpd->dev_ops.stop = sh7372_stop_dev; |
177 | genpd->start_device = pm_clk_resume; | 200 | genpd->dev_ops.start = sh7372_start_dev; |
201 | genpd->dev_ops.active_wakeup = pd_active_wakeup; | ||
178 | genpd->dev_irq_safe = true; | 202 | genpd->dev_irq_safe = true; |
179 | genpd->active_wakeup = pd_active_wakeup; | ||
180 | genpd->power_off = pd_power_down; | 203 | genpd->power_off = pd_power_down; |
181 | genpd->power_on = pd_power_up; | 204 | genpd->power_on = pd_power_up; |
182 | __pd_power_up(sh7372_pd, false); | 205 | __pd_power_up(sh7372_pd, false); |
@@ -199,48 +222,73 @@ void sh7372_pm_add_subdomain(struct sh7372_pm_domain *sh7372_pd, | |||
199 | } | 222 | } |
200 | 223 | ||
201 | struct sh7372_pm_domain sh7372_a4lc = { | 224 | struct sh7372_pm_domain sh7372_a4lc = { |
225 | .genpd.name = "A4LC", | ||
202 | .bit_shift = 1, | 226 | .bit_shift = 1, |
203 | }; | 227 | }; |
204 | 228 | ||
205 | struct sh7372_pm_domain sh7372_a4mp = { | 229 | struct sh7372_pm_domain sh7372_a4mp = { |
230 | .genpd.name = "A4MP", | ||
206 | .bit_shift = 2, | 231 | .bit_shift = 2, |
207 | }; | 232 | }; |
208 | 233 | ||
209 | struct sh7372_pm_domain sh7372_d4 = { | 234 | struct sh7372_pm_domain sh7372_d4 = { |
235 | .genpd.name = "D4", | ||
210 | .bit_shift = 3, | 236 | .bit_shift = 3, |
211 | }; | 237 | }; |
212 | 238 | ||
213 | struct sh7372_pm_domain sh7372_a4r = { | 239 | struct sh7372_pm_domain sh7372_a4r = { |
240 | .genpd.name = "A4R", | ||
214 | .bit_shift = 5, | 241 | .bit_shift = 5, |
215 | .gov = &sh7372_always_on_gov, | ||
216 | .suspend = sh7372_a4r_suspend, | 242 | .suspend = sh7372_a4r_suspend, |
217 | .resume = sh7372_intcs_resume, | 243 | .resume = sh7372_intcs_resume, |
218 | .stay_on = true, | ||
219 | }; | 244 | }; |
220 | 245 | ||
221 | struct sh7372_pm_domain sh7372_a3rv = { | 246 | struct sh7372_pm_domain sh7372_a3rv = { |
247 | .genpd.name = "A3RV", | ||
222 | .bit_shift = 6, | 248 | .bit_shift = 6, |
223 | }; | 249 | }; |
224 | 250 | ||
225 | struct sh7372_pm_domain sh7372_a3ri = { | 251 | struct sh7372_pm_domain sh7372_a3ri = { |
252 | .genpd.name = "A3RI", | ||
226 | .bit_shift = 8, | 253 | .bit_shift = 8, |
227 | }; | 254 | }; |
228 | 255 | ||
229 | struct sh7372_pm_domain sh7372_a3sp = { | 256 | static int sh7372_a4s_suspend(void) |
230 | .bit_shift = 11, | 257 | { |
231 | .gov = &sh7372_always_on_gov, | 258 | /* |
259 | * The A4S domain contains the CPU core and therefore it should | ||
260 | * only be turned off if the CPU is in use. | ||
261 | */ | ||
262 | return -EBUSY; | ||
263 | } | ||
264 | |||
265 | struct sh7372_pm_domain sh7372_a4s = { | ||
266 | .genpd.name = "A4S", | ||
267 | .bit_shift = 10, | ||
268 | .gov = &pm_domain_always_on_gov, | ||
232 | .no_debug = true, | 269 | .no_debug = true, |
270 | .suspend = sh7372_a4s_suspend, | ||
233 | }; | 271 | }; |
234 | 272 | ||
235 | static void sh7372_a3sp_init(void) | 273 | static int sh7372_a3sp_suspend(void) |
236 | { | 274 | { |
237 | /* serial consoles make use of SCIF hardware located in A3SP, | 275 | /* |
276 | * Serial consoles make use of SCIF hardware located in A3SP, | ||
238 | * keep such power domain on if "no_console_suspend" is set. | 277 | * keep such power domain on if "no_console_suspend" is set. |
239 | */ | 278 | */ |
240 | sh7372_a3sp.stay_on = !console_suspend_enabled; | 279 | return console_suspend_enabled ? -EBUSY : 0; |
241 | } | 280 | } |
242 | 281 | ||
282 | struct sh7372_pm_domain sh7372_a3sp = { | ||
283 | .genpd.name = "A3SP", | ||
284 | .bit_shift = 11, | ||
285 | .gov = &pm_domain_always_on_gov, | ||
286 | .no_debug = true, | ||
287 | .suspend = sh7372_a3sp_suspend, | ||
288 | }; | ||
289 | |||
243 | struct sh7372_pm_domain sh7372_a3sg = { | 290 | struct sh7372_pm_domain sh7372_a3sg = { |
291 | .genpd.name = "A3SG", | ||
244 | .bit_shift = 13, | 292 | .bit_shift = 13, |
245 | }; | 293 | }; |
246 | 294 | ||
@@ -257,11 +305,16 @@ static int sh7372_do_idle_core_standby(unsigned long unused) | |||
257 | return 0; | 305 | return 0; |
258 | } | 306 | } |
259 | 307 | ||
260 | static void sh7372_enter_core_standby(void) | 308 | static void sh7372_set_reset_vector(unsigned long address) |
261 | { | 309 | { |
262 | /* set reset vector, translate 4k */ | 310 | /* set reset vector, translate 4k */ |
263 | __raw_writel(__pa(sh7372_resume_core_standby_a3sm), SBAR); | 311 | __raw_writel(address, SBAR); |
264 | __raw_writel(0, APARMBAREA); | 312 | __raw_writel(0, APARMBAREA); |
313 | } | ||
314 | |||
315 | static void sh7372_enter_core_standby(void) | ||
316 | { | ||
317 | sh7372_set_reset_vector(__pa(sh7372_resume_core_standby_sysc)); | ||
265 | 318 | ||
266 | /* enter sleep mode with SYSTBCR to 0x10 */ | 319 | /* enter sleep mode with SYSTBCR to 0x10 */ |
267 | __raw_writel(0x10, SYSTBCR); | 320 | __raw_writel(0x10, SYSTBCR); |
@@ -274,27 +327,22 @@ static void sh7372_enter_core_standby(void) | |||
274 | #endif | 327 | #endif |
275 | 328 | ||
276 | #ifdef CONFIG_SUSPEND | 329 | #ifdef CONFIG_SUSPEND |
277 | static void sh7372_enter_a3sm_common(int pllc0_on) | 330 | static void sh7372_enter_sysc(int pllc0_on, unsigned long sleep_mode) |
278 | { | 331 | { |
279 | /* set reset vector, translate 4k */ | ||
280 | __raw_writel(__pa(sh7372_resume_core_standby_a3sm), SBAR); | ||
281 | __raw_writel(0, APARMBAREA); | ||
282 | |||
283 | if (pllc0_on) | 332 | if (pllc0_on) |
284 | __raw_writel(0, PLLC01STPCR); | 333 | __raw_writel(0, PLLC01STPCR); |
285 | else | 334 | else |
286 | __raw_writel(1 << 28, PLLC01STPCR); | 335 | __raw_writel(1 << 28, PLLC01STPCR); |
287 | 336 | ||
288 | __raw_writel(0, PDNSEL); /* power-down A3SM only, not A4S */ | ||
289 | __raw_readl(WUPSFAC); /* read wakeup int. factor before sleep */ | 337 | __raw_readl(WUPSFAC); /* read wakeup int. factor before sleep */ |
290 | cpu_suspend(0, sh7372_do_idle_a3sm); | 338 | cpu_suspend(sleep_mode, sh7372_do_idle_sysc); |
291 | __raw_readl(WUPSFAC); /* read wakeup int. factor after wakeup */ | 339 | __raw_readl(WUPSFAC); /* read wakeup int. factor after wakeup */ |
292 | 340 | ||
293 | /* disable reset vector translation */ | 341 | /* disable reset vector translation */ |
294 | __raw_writel(0, SBAR); | 342 | __raw_writel(0, SBAR); |
295 | } | 343 | } |
296 | 344 | ||
297 | static int sh7372_a3sm_valid(unsigned long *mskp, unsigned long *msk2p) | 345 | static int sh7372_sysc_valid(unsigned long *mskp, unsigned long *msk2p) |
298 | { | 346 | { |
299 | unsigned long mstpsr0, mstpsr1, mstpsr2, mstpsr3, mstpsr4; | 347 | unsigned long mstpsr0, mstpsr1, mstpsr2, mstpsr3, mstpsr4; |
300 | unsigned long msk, msk2; | 348 | unsigned long msk, msk2; |
@@ -382,7 +430,7 @@ static void sh7372_icr_to_irqcr(unsigned long icr, u16 *irqcr1p, u16 *irqcr2p) | |||
382 | *irqcr2p = irqcr2; | 430 | *irqcr2p = irqcr2; |
383 | } | 431 | } |
384 | 432 | ||
385 | static void sh7372_setup_a3sm(unsigned long msk, unsigned long msk2) | 433 | static void sh7372_setup_sysc(unsigned long msk, unsigned long msk2) |
386 | { | 434 | { |
387 | u16 irqcrx_low, irqcrx_high, irqcry_low, irqcry_high; | 435 | u16 irqcrx_low, irqcrx_high, irqcry_low, irqcry_high; |
388 | unsigned long tmp; | 436 | unsigned long tmp; |
@@ -415,6 +463,22 @@ static void sh7372_setup_a3sm(unsigned long msk, unsigned long msk2) | |||
415 | __raw_writel((irqcrx_high << 16) | irqcrx_low, IRQCR3); | 463 | __raw_writel((irqcrx_high << 16) | irqcrx_low, IRQCR3); |
416 | __raw_writel((irqcry_high << 16) | irqcry_low, IRQCR4); | 464 | __raw_writel((irqcry_high << 16) | irqcry_low, IRQCR4); |
417 | } | 465 | } |
466 | |||
467 | static void sh7372_enter_a3sm_common(int pllc0_on) | ||
468 | { | ||
469 | sh7372_set_reset_vector(__pa(sh7372_resume_core_standby_sysc)); | ||
470 | sh7372_enter_sysc(pllc0_on, 1 << 12); | ||
471 | } | ||
472 | |||
473 | static void sh7372_enter_a4s_common(int pllc0_on) | ||
474 | { | ||
475 | sh7372_intca_suspend(); | ||
476 | memcpy((void *)SMFRAM, sh7372_resume_core_standby_sysc, 0x100); | ||
477 | sh7372_set_reset_vector(SMFRAM); | ||
478 | sh7372_enter_sysc(pllc0_on, 1 << 10); | ||
479 | sh7372_intca_resume(); | ||
480 | } | ||
481 | |||
418 | #endif | 482 | #endif |
419 | 483 | ||
420 | #ifdef CONFIG_CPU_IDLE | 484 | #ifdef CONFIG_CPU_IDLE |
@@ -448,14 +512,20 @@ static int sh7372_enter_suspend(suspend_state_t suspend_state) | |||
448 | unsigned long msk, msk2; | 512 | unsigned long msk, msk2; |
449 | 513 | ||
450 | /* check active clocks to determine potential wakeup sources */ | 514 | /* check active clocks to determine potential wakeup sources */ |
451 | if (sh7372_a3sm_valid(&msk, &msk2)) { | 515 | if (sh7372_sysc_valid(&msk, &msk2)) { |
452 | |||
453 | /* convert INTC mask and sense to SYSC mask and sense */ | 516 | /* convert INTC mask and sense to SYSC mask and sense */ |
454 | sh7372_setup_a3sm(msk, msk2); | 517 | sh7372_setup_sysc(msk, msk2); |
455 | 518 | ||
456 | /* enter A3SM sleep with PLLC0 off */ | 519 | if (!console_suspend_enabled && |
457 | pr_debug("entering A3SM\n"); | 520 | sh7372_a4s.genpd.status == GPD_STATE_POWER_OFF) { |
458 | sh7372_enter_a3sm_common(0); | 521 | /* enter A4S sleep with PLLC0 off */ |
522 | pr_debug("entering A4S\n"); | ||
523 | sh7372_enter_a4s_common(0); | ||
524 | } else { | ||
525 | /* enter A3SM sleep with PLLC0 off */ | ||
526 | pr_debug("entering A3SM\n"); | ||
527 | sh7372_enter_a3sm_common(0); | ||
528 | } | ||
459 | } else { | 529 | } else { |
460 | /* default to Core Standby that supports all wakeup sources */ | 530 | /* default to Core Standby that supports all wakeup sources */ |
461 | pr_debug("entering Core Standby\n"); | 531 | pr_debug("entering Core Standby\n"); |
@@ -464,9 +534,37 @@ static int sh7372_enter_suspend(suspend_state_t suspend_state) | |||
464 | return 0; | 534 | return 0; |
465 | } | 535 | } |
466 | 536 | ||
537 | /** | ||
538 | * sh7372_pm_notifier_fn - SH7372 PM notifier routine. | ||
539 | * @notifier: Unused. | ||
540 | * @pm_event: Event being handled. | ||
541 | * @unused: Unused. | ||
542 | */ | ||
543 | static int sh7372_pm_notifier_fn(struct notifier_block *notifier, | ||
544 | unsigned long pm_event, void *unused) | ||
545 | { | ||
546 | switch (pm_event) { | ||
547 | case PM_SUSPEND_PREPARE: | ||
548 | /* | ||
549 | * This is necessary, because the A4R domain has to be "on" | ||
550 | * when suspend_device_irqs() and resume_device_irqs() are | ||
551 | * executed during system suspend and resume, respectively, so | ||
552 | * that those functions don't crash while accessing the INTCS. | ||
553 | */ | ||
554 | pm_genpd_poweron(&sh7372_a4r.genpd); | ||
555 | break; | ||
556 | case PM_POST_SUSPEND: | ||
557 | pm_genpd_poweroff_unused(); | ||
558 | break; | ||
559 | } | ||
560 | |||
561 | return NOTIFY_DONE; | ||
562 | } | ||
563 | |||
467 | static void sh7372_suspend_init(void) | 564 | static void sh7372_suspend_init(void) |
468 | { | 565 | { |
469 | shmobile_suspend_ops.enter = sh7372_enter_suspend; | 566 | shmobile_suspend_ops.enter = sh7372_enter_suspend; |
567 | pm_notifier(sh7372_pm_notifier_fn, 0); | ||
470 | } | 568 | } |
471 | #else | 569 | #else |
472 | static void sh7372_suspend_init(void) {} | 570 | static void sh7372_suspend_init(void) {} |
@@ -482,8 +580,6 @@ void __init sh7372_pm_init(void) | |||
482 | /* do not convert A3SM, A3SP, A3SG, A4R power down into A4S */ | 580 | /* do not convert A3SM, A3SP, A3SG, A4R power down into A4S */ |
483 | __raw_writel(0, PDNSEL); | 581 | __raw_writel(0, PDNSEL); |
484 | 582 | ||
485 | sh7372_a3sp_init(); | ||
486 | |||
487 | sh7372_suspend_init(); | 583 | sh7372_suspend_init(); |
488 | sh7372_cpuidle_init(); | 584 | sh7372_cpuidle_init(); |
489 | } | 585 | } |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 2380389e6ac5..c197f9d29d04 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -994,12 +994,16 @@ void __init sh7372_add_standard_devices(void) | |||
994 | sh7372_init_pm_domain(&sh7372_a4r); | 994 | sh7372_init_pm_domain(&sh7372_a4r); |
995 | sh7372_init_pm_domain(&sh7372_a3rv); | 995 | sh7372_init_pm_domain(&sh7372_a3rv); |
996 | sh7372_init_pm_domain(&sh7372_a3ri); | 996 | sh7372_init_pm_domain(&sh7372_a3ri); |
997 | sh7372_init_pm_domain(&sh7372_a3sg); | 997 | sh7372_init_pm_domain(&sh7372_a4s); |
998 | sh7372_init_pm_domain(&sh7372_a3sp); | 998 | sh7372_init_pm_domain(&sh7372_a3sp); |
999 | sh7372_init_pm_domain(&sh7372_a3sg); | ||
999 | 1000 | ||
1000 | sh7372_pm_add_subdomain(&sh7372_a4lc, &sh7372_a3rv); | 1001 | sh7372_pm_add_subdomain(&sh7372_a4lc, &sh7372_a3rv); |
1001 | sh7372_pm_add_subdomain(&sh7372_a4r, &sh7372_a4lc); | 1002 | sh7372_pm_add_subdomain(&sh7372_a4r, &sh7372_a4lc); |
1002 | 1003 | ||
1004 | sh7372_pm_add_subdomain(&sh7372_a4s, &sh7372_a3sg); | ||
1005 | sh7372_pm_add_subdomain(&sh7372_a4s, &sh7372_a3sp); | ||
1006 | |||
1003 | platform_add_devices(sh7372_early_devices, | 1007 | platform_add_devices(sh7372_early_devices, |
1004 | ARRAY_SIZE(sh7372_early_devices)); | 1008 | ARRAY_SIZE(sh7372_early_devices)); |
1005 | 1009 | ||
diff --git a/arch/arm/mach-shmobile/sleep-sh7372.S b/arch/arm/mach-shmobile/sleep-sh7372.S index f3ab3c5810ea..1d564674451d 100644 --- a/arch/arm/mach-shmobile/sleep-sh7372.S +++ b/arch/arm/mach-shmobile/sleep-sh7372.S | |||
@@ -37,13 +37,18 @@ | |||
37 | #if defined(CONFIG_SUSPEND) || defined(CONFIG_CPU_IDLE) | 37 | #if defined(CONFIG_SUSPEND) || defined(CONFIG_CPU_IDLE) |
38 | .align 12 | 38 | .align 12 |
39 | .text | 39 | .text |
40 | .global sh7372_resume_core_standby_a3sm | 40 | .global sh7372_resume_core_standby_sysc |
41 | sh7372_resume_core_standby_a3sm: | 41 | sh7372_resume_core_standby_sysc: |
42 | ldr pc, 1f | 42 | ldr pc, 1f |
43 | 1: .long cpu_resume - PAGE_OFFSET + PLAT_PHYS_OFFSET | 43 | 1: .long cpu_resume - PAGE_OFFSET + PLAT_PHYS_OFFSET |
44 | 44 | ||
45 | .global sh7372_do_idle_a3sm | 45 | #define SPDCR 0xe6180008 |
46 | sh7372_do_idle_a3sm: | 46 | |
47 | /* A3SM & A4S power down */ | ||
48 | .global sh7372_do_idle_sysc | ||
49 | sh7372_do_idle_sysc: | ||
50 | mov r8, r0 /* sleep mode passed in r0 */ | ||
51 | |||
47 | /* | 52 | /* |
48 | * Clear the SCTLR.C bit to prevent further data cache | 53 | * Clear the SCTLR.C bit to prevent further data cache |
49 | * allocation. Clearing SCTLR.C would make all the data accesses | 54 | * allocation. Clearing SCTLR.C would make all the data accesses |
@@ -80,13 +85,9 @@ sh7372_do_idle_a3sm: | |||
80 | dsb | 85 | dsb |
81 | dmb | 86 | dmb |
82 | 87 | ||
83 | #define SPDCR 0xe6180008 | 88 | /* SYSC power down */ |
84 | #define A3SM (1 << 12) | ||
85 | |||
86 | /* A3SM power down */ | ||
87 | ldr r0, =SPDCR | 89 | ldr r0, =SPDCR |
88 | ldr r1, =A3SM | 90 | str r8, [r0] |
89 | str r1, [r0] | ||
90 | 1: | 91 | 1: |
91 | b 1b | 92 | b 1b |
92 | 93 | ||
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h index 78014e53eb3c..61fc53740fbd 100644 --- a/arch/arm/plat-samsung/include/plat/pm.h +++ b/arch/arm/plat-samsung/include/plat/pm.h | |||
@@ -22,6 +22,7 @@ struct device; | |||
22 | #ifdef CONFIG_PM | 22 | #ifdef CONFIG_PM |
23 | 23 | ||
24 | extern __init int s3c_pm_init(void); | 24 | extern __init int s3c_pm_init(void); |
25 | extern __init int s3c64xx_pm_init(void); | ||
25 | 26 | ||
26 | #else | 27 | #else |
27 | 28 | ||
@@ -29,6 +30,11 @@ static inline int s3c_pm_init(void) | |||
29 | { | 30 | { |
30 | return 0; | 31 | return 0; |
31 | } | 32 | } |
33 | |||
34 | static inline int s3c64xx_pm_init(void) | ||
35 | { | ||
36 | return 0; | ||
37 | } | ||
32 | #endif | 38 | #endif |
33 | 39 | ||
34 | /* configuration for the IRQ mask over sleep */ | 40 | /* configuration for the IRQ mask over sleep */ |
diff --git a/arch/avr32/include/asm/thread_info.h b/arch/avr32/include/asm/thread_info.h index 7a9c03dcb0b6..e5deda4691db 100644 --- a/arch/avr32/include/asm/thread_info.h +++ b/arch/avr32/include/asm/thread_info.h | |||
@@ -85,7 +85,6 @@ static inline struct thread_info *current_thread_info(void) | |||
85 | #define TIF_RESTORE_SIGMASK 7 /* restore signal mask in do_signal */ | 85 | #define TIF_RESTORE_SIGMASK 7 /* restore signal mask in do_signal */ |
86 | #define TIF_CPU_GOING_TO_SLEEP 8 /* CPU is entering sleep 0 mode */ | 86 | #define TIF_CPU_GOING_TO_SLEEP 8 /* CPU is entering sleep 0 mode */ |
87 | #define TIF_NOTIFY_RESUME 9 /* callback before returning to user */ | 87 | #define TIF_NOTIFY_RESUME 9 /* callback before returning to user */ |
88 | #define TIF_FREEZE 29 | ||
89 | #define TIF_DEBUG 30 /* debugging enabled */ | 88 | #define TIF_DEBUG 30 /* debugging enabled */ |
90 | #define TIF_USERSPACE 31 /* true if FS sets userspace */ | 89 | #define TIF_USERSPACE 31 /* true if FS sets userspace */ |
91 | 90 | ||
@@ -98,7 +97,6 @@ static inline struct thread_info *current_thread_info(void) | |||
98 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | 97 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) |
99 | #define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP) | 98 | #define _TIF_CPU_GOING_TO_SLEEP (1 << TIF_CPU_GOING_TO_SLEEP) |
100 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 99 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
101 | #define _TIF_FREEZE (1 << TIF_FREEZE) | ||
102 | 100 | ||
103 | /* Note: The masks below must never span more than 16 bits! */ | 101 | /* Note: The masks below must never span more than 16 bits! */ |
104 | 102 | ||
diff --git a/arch/blackfin/include/asm/thread_info.h b/arch/blackfin/include/asm/thread_info.h index 02560fd8a121..53ad10005ae3 100644 --- a/arch/blackfin/include/asm/thread_info.h +++ b/arch/blackfin/include/asm/thread_info.h | |||
@@ -100,7 +100,6 @@ static inline struct thread_info *current_thread_info(void) | |||
100 | TIF_NEED_RESCHED */ | 100 | TIF_NEED_RESCHED */ |
101 | #define TIF_MEMDIE 4 /* is terminating due to OOM killer */ | 101 | #define TIF_MEMDIE 4 /* is terminating due to OOM killer */ |
102 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ | 102 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ |
103 | #define TIF_FREEZE 6 /* is freezing for suspend */ | ||
104 | #define TIF_IRQ_SYNC 7 /* sync pipeline stage */ | 103 | #define TIF_IRQ_SYNC 7 /* sync pipeline stage */ |
105 | #define TIF_NOTIFY_RESUME 8 /* callback before returning to user */ | 104 | #define TIF_NOTIFY_RESUME 8 /* callback before returning to user */ |
106 | #define TIF_SINGLESTEP 9 | 105 | #define TIF_SINGLESTEP 9 |
@@ -111,7 +110,6 @@ static inline struct thread_info *current_thread_info(void) | |||
111 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 110 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
112 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 111 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
113 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 112 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
114 | #define _TIF_FREEZE (1<<TIF_FREEZE) | ||
115 | #define _TIF_IRQ_SYNC (1<<TIF_IRQ_SYNC) | 113 | #define _TIF_IRQ_SYNC (1<<TIF_IRQ_SYNC) |
116 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 114 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
117 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 115 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
diff --git a/arch/cris/include/asm/thread_info.h b/arch/cris/include/asm/thread_info.h index 332f19c54557..29b92884d793 100644 --- a/arch/cris/include/asm/thread_info.h +++ b/arch/cris/include/asm/thread_info.h | |||
@@ -86,7 +86,6 @@ struct thread_info { | |||
86 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ | 86 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ |
87 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 87 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
88 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ | 88 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ |
89 | #define TIF_FREEZE 18 /* is freezing for suspend */ | ||
90 | 89 | ||
91 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 90 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
92 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 91 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
@@ -94,7 +93,6 @@ struct thread_info { | |||
94 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 93 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
95 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 94 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
96 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 95 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
97 | #define _TIF_FREEZE (1<<TIF_FREEZE) | ||
98 | 96 | ||
99 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ | 97 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ |
100 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ | 98 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ |
diff --git a/arch/frv/include/asm/thread_info.h b/arch/frv/include/asm/thread_info.h index cefbe73dc119..92d83ea99ae5 100644 --- a/arch/frv/include/asm/thread_info.h +++ b/arch/frv/include/asm/thread_info.h | |||
@@ -111,7 +111,6 @@ register struct thread_info *__current_thread_info asm("gr15"); | |||
111 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ | 111 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ |
112 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 112 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
113 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ | 113 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ |
114 | #define TIF_FREEZE 18 /* freezing for suspend */ | ||
115 | 114 | ||
116 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 115 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
117 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 116 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
@@ -120,7 +119,6 @@ register struct thread_info *__current_thread_info asm("gr15"); | |||
120 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 119 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
121 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | 120 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) |
122 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 121 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
123 | #define _TIF_FREEZE (1 << TIF_FREEZE) | ||
124 | 122 | ||
125 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ | 123 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ |
126 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ | 124 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ |
diff --git a/arch/h8300/include/asm/thread_info.h b/arch/h8300/include/asm/thread_info.h index d6f1784bfdee..9c126e0c09aa 100644 --- a/arch/h8300/include/asm/thread_info.h +++ b/arch/h8300/include/asm/thread_info.h | |||
@@ -90,7 +90,6 @@ static inline struct thread_info *current_thread_info(void) | |||
90 | #define TIF_MEMDIE 4 /* is terminating due to OOM killer */ | 90 | #define TIF_MEMDIE 4 /* is terminating due to OOM killer */ |
91 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ | 91 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ |
92 | #define TIF_NOTIFY_RESUME 6 /* callback before returning to user */ | 92 | #define TIF_NOTIFY_RESUME 6 /* callback before returning to user */ |
93 | #define TIF_FREEZE 16 /* is freezing for suspend */ | ||
94 | 93 | ||
95 | /* as above, but as bit values */ | 94 | /* as above, but as bit values */ |
96 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 95 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
@@ -99,7 +98,6 @@ static inline struct thread_info *current_thread_info(void) | |||
99 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 98 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
100 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 99 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
101 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 100 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
102 | #define _TIF_FREEZE (1<<TIF_FREEZE) | ||
103 | 101 | ||
104 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ | 102 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ |
105 | 103 | ||
diff --git a/arch/ia64/include/asm/thread_info.h b/arch/ia64/include/asm/thread_info.h index ff0cc84e7bcc..e054bcc4273c 100644 --- a/arch/ia64/include/asm/thread_info.h +++ b/arch/ia64/include/asm/thread_info.h | |||
@@ -113,7 +113,6 @@ struct thread_info { | |||
113 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ | 113 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ |
114 | #define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ | 114 | #define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ |
115 | #define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */ | 115 | #define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */ |
116 | #define TIF_FREEZE 20 /* is freezing for suspend */ | ||
117 | #define TIF_RESTORE_RSE 21 /* user RBS is newer than kernel RBS */ | 116 | #define TIF_RESTORE_RSE 21 /* user RBS is newer than kernel RBS */ |
118 | 117 | ||
119 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 118 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
@@ -126,7 +125,6 @@ struct thread_info { | |||
126 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 125 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
127 | #define _TIF_MCA_INIT (1 << TIF_MCA_INIT) | 126 | #define _TIF_MCA_INIT (1 << TIF_MCA_INIT) |
128 | #define _TIF_DB_DISABLED (1 << TIF_DB_DISABLED) | 127 | #define _TIF_DB_DISABLED (1 << TIF_DB_DISABLED) |
129 | #define _TIF_FREEZE (1 << TIF_FREEZE) | ||
130 | #define _TIF_RESTORE_RSE (1 << TIF_RESTORE_RSE) | 128 | #define _TIF_RESTORE_RSE (1 << TIF_RESTORE_RSE) |
131 | 129 | ||
132 | /* "work to do on user-return" bits */ | 130 | /* "work to do on user-return" bits */ |
diff --git a/arch/m32r/include/asm/thread_info.h b/arch/m32r/include/asm/thread_info.h index 0227dba44068..bf8fa3c06f4e 100644 --- a/arch/m32r/include/asm/thread_info.h +++ b/arch/m32r/include/asm/thread_info.h | |||
@@ -138,7 +138,6 @@ static inline unsigned int get_thread_fault_code(void) | |||
138 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 138 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ |
139 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 139 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
140 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 140 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
141 | #define TIF_FREEZE 19 /* is freezing for suspend */ | ||
142 | 141 | ||
143 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 142 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
144 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 143 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
@@ -149,7 +148,6 @@ static inline unsigned int get_thread_fault_code(void) | |||
149 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 148 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
150 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | 149 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) |
151 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 150 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
152 | #define _TIF_FREEZE (1<<TIF_FREEZE) | ||
153 | 151 | ||
154 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ | 152 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ |
155 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ | 153 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ |
diff --git a/arch/m68k/include/asm/thread_info.h b/arch/m68k/include/asm/thread_info.h index 29fa6da4f17c..e8665e6f9464 100644 --- a/arch/m68k/include/asm/thread_info.h +++ b/arch/m68k/include/asm/thread_info.h | |||
@@ -76,7 +76,6 @@ static inline struct thread_info *current_thread_info(void) | |||
76 | #define TIF_DELAYED_TRACE 14 /* single step a syscall */ | 76 | #define TIF_DELAYED_TRACE 14 /* single step a syscall */ |
77 | #define TIF_SYSCALL_TRACE 15 /* syscall trace active */ | 77 | #define TIF_SYSCALL_TRACE 15 /* syscall trace active */ |
78 | #define TIF_MEMDIE 16 /* is terminating due to OOM killer */ | 78 | #define TIF_MEMDIE 16 /* is terminating due to OOM killer */ |
79 | #define TIF_FREEZE 17 /* thread is freezing for suspend */ | ||
80 | #define TIF_RESTORE_SIGMASK 18 /* restore signal mask in do_signal */ | 79 | #define TIF_RESTORE_SIGMASK 18 /* restore signal mask in do_signal */ |
81 | 80 | ||
82 | #endif /* _ASM_M68K_THREAD_INFO_H */ | 81 | #endif /* _ASM_M68K_THREAD_INFO_H */ |
diff --git a/arch/microblaze/include/asm/thread_info.h b/arch/microblaze/include/asm/thread_info.h index b73da2ac21b3..1a8ab6a5c03f 100644 --- a/arch/microblaze/include/asm/thread_info.h +++ b/arch/microblaze/include/asm/thread_info.h | |||
@@ -125,7 +125,6 @@ static inline struct thread_info *current_thread_info(void) | |||
125 | #define TIF_MEMDIE 6 /* is terminating due to OOM killer */ | 125 | #define TIF_MEMDIE 6 /* is terminating due to OOM killer */ |
126 | #define TIF_SYSCALL_AUDIT 9 /* syscall auditing active */ | 126 | #define TIF_SYSCALL_AUDIT 9 /* syscall auditing active */ |
127 | #define TIF_SECCOMP 10 /* secure computing */ | 127 | #define TIF_SECCOMP 10 /* secure computing */ |
128 | #define TIF_FREEZE 14 /* Freezing for suspend */ | ||
129 | 128 | ||
130 | /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 129 | /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
131 | #define TIF_POLLING_NRFLAG 16 | 130 | #define TIF_POLLING_NRFLAG 16 |
@@ -137,7 +136,6 @@ static inline struct thread_info *current_thread_info(void) | |||
137 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 136 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
138 | #define _TIF_IRET (1 << TIF_IRET) | 137 | #define _TIF_IRET (1 << TIF_IRET) |
139 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 138 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
140 | #define _TIF_FREEZE (1 << TIF_FREEZE) | ||
141 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 139 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
142 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | 140 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
143 | 141 | ||
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h index 97f8bf6639e7..0d85d8e440c5 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h | |||
@@ -117,7 +117,6 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
117 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 117 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ |
118 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 118 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
119 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 119 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
120 | #define TIF_FREEZE 19 | ||
121 | #define TIF_FIXADE 20 /* Fix address errors in software */ | 120 | #define TIF_FIXADE 20 /* Fix address errors in software */ |
122 | #define TIF_LOGADE 21 /* Log address errors to syslog */ | 121 | #define TIF_LOGADE 21 /* Log address errors to syslog */ |
123 | #define TIF_32BIT_REGS 22 /* also implies 16/32 fprs */ | 122 | #define TIF_32BIT_REGS 22 /* also implies 16/32 fprs */ |
@@ -141,7 +140,6 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
141 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 140 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
142 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | 141 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) |
143 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 142 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
144 | #define _TIF_FREEZE (1<<TIF_FREEZE) | ||
145 | #define _TIF_FIXADE (1<<TIF_FIXADE) | 143 | #define _TIF_FIXADE (1<<TIF_FIXADE) |
146 | #define _TIF_LOGADE (1<<TIF_LOGADE) | 144 | #define _TIF_LOGADE (1<<TIF_LOGADE) |
147 | #define _TIF_32BIT_REGS (1<<TIF_32BIT_REGS) | 145 | #define _TIF_32BIT_REGS (1<<TIF_32BIT_REGS) |
diff --git a/arch/mn10300/include/asm/thread_info.h b/arch/mn10300/include/asm/thread_info.h index 87c213002d4c..28cf52100baa 100644 --- a/arch/mn10300/include/asm/thread_info.h +++ b/arch/mn10300/include/asm/thread_info.h | |||
@@ -165,7 +165,6 @@ extern void free_thread_info(struct thread_info *); | |||
165 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ | 165 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ |
166 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 166 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
167 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ | 167 | #define TIF_MEMDIE 17 /* is terminating due to OOM killer */ |
168 | #define TIF_FREEZE 18 /* freezing for suspend */ | ||
169 | 168 | ||
170 | #define _TIF_SYSCALL_TRACE +(1 << TIF_SYSCALL_TRACE) | 169 | #define _TIF_SYSCALL_TRACE +(1 << TIF_SYSCALL_TRACE) |
171 | #define _TIF_NOTIFY_RESUME +(1 << TIF_NOTIFY_RESUME) | 170 | #define _TIF_NOTIFY_RESUME +(1 << TIF_NOTIFY_RESUME) |
@@ -174,7 +173,6 @@ extern void free_thread_info(struct thread_info *); | |||
174 | #define _TIF_SINGLESTEP +(1 << TIF_SINGLESTEP) | 173 | #define _TIF_SINGLESTEP +(1 << TIF_SINGLESTEP) |
175 | #define _TIF_RESTORE_SIGMASK +(1 << TIF_RESTORE_SIGMASK) | 174 | #define _TIF_RESTORE_SIGMASK +(1 << TIF_RESTORE_SIGMASK) |
176 | #define _TIF_POLLING_NRFLAG +(1 << TIF_POLLING_NRFLAG) | 175 | #define _TIF_POLLING_NRFLAG +(1 << TIF_POLLING_NRFLAG) |
177 | #define _TIF_FREEZE +(1 << TIF_FREEZE) | ||
178 | 176 | ||
179 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ | 177 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ |
180 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ | 178 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ |
diff --git a/arch/parisc/include/asm/thread_info.h b/arch/parisc/include/asm/thread_info.h index aa8de727e90b..6d9c7c7973d0 100644 --- a/arch/parisc/include/asm/thread_info.h +++ b/arch/parisc/include/asm/thread_info.h | |||
@@ -58,7 +58,6 @@ struct thread_info { | |||
58 | #define TIF_32BIT 4 /* 32 bit binary */ | 58 | #define TIF_32BIT 4 /* 32 bit binary */ |
59 | #define TIF_MEMDIE 5 /* is terminating due to OOM killer */ | 59 | #define TIF_MEMDIE 5 /* is terminating due to OOM killer */ |
60 | #define TIF_RESTORE_SIGMASK 6 /* restore saved signal mask */ | 60 | #define TIF_RESTORE_SIGMASK 6 /* restore saved signal mask */ |
61 | #define TIF_FREEZE 7 /* is freezing for suspend */ | ||
62 | #define TIF_NOTIFY_RESUME 8 /* callback before returning to user */ | 61 | #define TIF_NOTIFY_RESUME 8 /* callback before returning to user */ |
63 | #define TIF_SINGLESTEP 9 /* single stepping? */ | 62 | #define TIF_SINGLESTEP 9 /* single stepping? */ |
64 | #define TIF_BLOCKSTEP 10 /* branch stepping? */ | 63 | #define TIF_BLOCKSTEP 10 /* branch stepping? */ |
@@ -69,7 +68,6 @@ struct thread_info { | |||
69 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 68 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
70 | #define _TIF_32BIT (1 << TIF_32BIT) | 69 | #define _TIF_32BIT (1 << TIF_32BIT) |
71 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | 70 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) |
72 | #define _TIF_FREEZE (1 << TIF_FREEZE) | ||
73 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 71 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
74 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 72 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
75 | #define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP) | 73 | #define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP) |
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index 836f231ec1f0..964714940961 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h | |||
@@ -109,7 +109,6 @@ static inline struct thread_info *current_thread_info(void) | |||
109 | #define TIF_RESTOREALL 11 /* Restore all regs (implies NOERROR) */ | 109 | #define TIF_RESTOREALL 11 /* Restore all regs (implies NOERROR) */ |
110 | #define TIF_NOERROR 12 /* Force successful syscall return */ | 110 | #define TIF_NOERROR 12 /* Force successful syscall return */ |
111 | #define TIF_NOTIFY_RESUME 13 /* callback before returning to user */ | 111 | #define TIF_NOTIFY_RESUME 13 /* callback before returning to user */ |
112 | #define TIF_FREEZE 14 /* Freezing for suspend */ | ||
113 | #define TIF_SYSCALL_TRACEPOINT 15 /* syscall tracepoint instrumentation */ | 112 | #define TIF_SYSCALL_TRACEPOINT 15 /* syscall tracepoint instrumentation */ |
114 | #define TIF_RUNLATCH 16 /* Is the runlatch enabled? */ | 113 | #define TIF_RUNLATCH 16 /* Is the runlatch enabled? */ |
115 | 114 | ||
@@ -127,7 +126,6 @@ static inline struct thread_info *current_thread_info(void) | |||
127 | #define _TIF_RESTOREALL (1<<TIF_RESTOREALL) | 126 | #define _TIF_RESTOREALL (1<<TIF_RESTOREALL) |
128 | #define _TIF_NOERROR (1<<TIF_NOERROR) | 127 | #define _TIF_NOERROR (1<<TIF_NOERROR) |
129 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 128 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
130 | #define _TIF_FREEZE (1<<TIF_FREEZE) | ||
131 | #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) | 129 | #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) |
132 | #define _TIF_RUNLATCH (1<<TIF_RUNLATCH) | 130 | #define _TIF_RUNLATCH (1<<TIF_RUNLATCH) |
133 | #define _TIF_SYSCALL_T_OR_A (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \ | 131 | #define _TIF_SYSCALL_T_OR_A (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \ |
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index f65af61996bd..8b086299ba25 100644 --- a/arch/powerpc/kernel/vio.c +++ b/arch/powerpc/kernel/vio.c | |||
@@ -1406,7 +1406,6 @@ static struct bus_type vio_bus_type = { | |||
1406 | .match = vio_bus_match, | 1406 | .match = vio_bus_match, |
1407 | .probe = vio_bus_probe, | 1407 | .probe = vio_bus_probe, |
1408 | .remove = vio_bus_remove, | 1408 | .remove = vio_bus_remove, |
1409 | .pm = GENERIC_SUBSYS_PM_OPS, | ||
1410 | }; | 1409 | }; |
1411 | 1410 | ||
1412 | /** | 1411 | /** |
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h index a23183423b14..a73038155e0d 100644 --- a/arch/s390/include/asm/thread_info.h +++ b/arch/s390/include/asm/thread_info.h | |||
@@ -102,7 +102,6 @@ static inline struct thread_info *current_thread_info(void) | |||
102 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 102 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
103 | #define TIF_RESTORE_SIGMASK 19 /* restore signal mask in do_signal() */ | 103 | #define TIF_RESTORE_SIGMASK 19 /* restore signal mask in do_signal() */ |
104 | #define TIF_SINGLE_STEP 20 /* This task is single stepped */ | 104 | #define TIF_SINGLE_STEP 20 /* This task is single stepped */ |
105 | #define TIF_FREEZE 21 /* thread is freezing for suspend */ | ||
106 | 105 | ||
107 | #define _TIF_SYSCALL (1<<TIF_SYSCALL) | 106 | #define _TIF_SYSCALL (1<<TIF_SYSCALL) |
108 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 107 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
@@ -119,7 +118,6 @@ static inline struct thread_info *current_thread_info(void) | |||
119 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 118 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
120 | #define _TIF_31BIT (1<<TIF_31BIT) | 119 | #define _TIF_31BIT (1<<TIF_31BIT) |
121 | #define _TIF_SINGLE_STEP (1<<TIF_SINGLE_STEP) | 120 | #define _TIF_SINGLE_STEP (1<<TIF_SINGLE_STEP) |
122 | #define _TIF_FREEZE (1<<TIF_FREEZE) | ||
123 | 121 | ||
124 | #ifdef CONFIG_64BIT | 122 | #ifdef CONFIG_64BIT |
125 | #define is_32bit_task() (test_thread_flag(TIF_31BIT)) | 123 | #define is_32bit_task() (test_thread_flag(TIF_31BIT)) |
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h index ea2d5089de1e..20ee40af16e9 100644 --- a/arch/sh/include/asm/thread_info.h +++ b/arch/sh/include/asm/thread_info.h | |||
@@ -122,7 +122,6 @@ extern void init_thread_xstate(void); | |||
122 | #define TIF_SYSCALL_TRACEPOINT 8 /* for ftrace syscall instrumentation */ | 122 | #define TIF_SYSCALL_TRACEPOINT 8 /* for ftrace syscall instrumentation */ |
123 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 123 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
124 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 124 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
125 | #define TIF_FREEZE 19 /* Freezing for suspend */ | ||
126 | 125 | ||
127 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 126 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
128 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 127 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
@@ -133,7 +132,6 @@ extern void init_thread_xstate(void); | |||
133 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 132 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
134 | #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) | 133 | #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) |
135 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 134 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
136 | #define _TIF_FREEZE (1 << TIF_FREEZE) | ||
137 | 135 | ||
138 | /* | 136 | /* |
139 | * _TIF_ALLWORK_MASK and _TIF_WORK_MASK need to fit within 2 bytes, or we | 137 | * _TIF_ALLWORK_MASK and _TIF_WORK_MASK need to fit within 2 bytes, or we |
diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h index fa5753233410..5cc5888ad5a3 100644 --- a/arch/sparc/include/asm/thread_info_32.h +++ b/arch/sparc/include/asm/thread_info_32.h | |||
@@ -133,7 +133,6 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *) | |||
133 | #define TIF_POLLING_NRFLAG 9 /* true if poll_idle() is polling | 133 | #define TIF_POLLING_NRFLAG 9 /* true if poll_idle() is polling |
134 | * TIF_NEED_RESCHED */ | 134 | * TIF_NEED_RESCHED */ |
135 | #define TIF_MEMDIE 10 /* is terminating due to OOM killer */ | 135 | #define TIF_MEMDIE 10 /* is terminating due to OOM killer */ |
136 | #define TIF_FREEZE 11 /* is freezing for suspend */ | ||
137 | 136 | ||
138 | /* as above, but as bit values */ | 137 | /* as above, but as bit values */ |
139 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 138 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
@@ -147,7 +146,6 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *) | |||
147 | #define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | \ | 146 | #define _TIF_DO_NOTIFY_RESUME_MASK (_TIF_NOTIFY_RESUME | \ |
148 | _TIF_SIGPENDING | \ | 147 | _TIF_SIGPENDING | \ |
149 | _TIF_RESTORE_SIGMASK) | 148 | _TIF_RESTORE_SIGMASK) |
150 | #define _TIF_FREEZE (1<<TIF_FREEZE) | ||
151 | 149 | ||
152 | #endif /* __KERNEL__ */ | 150 | #endif /* __KERNEL__ */ |
153 | 151 | ||
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h index 60d86be1a533..01d057fe6a3f 100644 --- a/arch/sparc/include/asm/thread_info_64.h +++ b/arch/sparc/include/asm/thread_info_64.h | |||
@@ -225,7 +225,6 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
225 | /* flag bit 12 is available */ | 225 | /* flag bit 12 is available */ |
226 | #define TIF_MEMDIE 13 /* is terminating due to OOM killer */ | 226 | #define TIF_MEMDIE 13 /* is terminating due to OOM killer */ |
227 | #define TIF_POLLING_NRFLAG 14 | 227 | #define TIF_POLLING_NRFLAG 14 |
228 | #define TIF_FREEZE 15 /* is freezing for suspend */ | ||
229 | 228 | ||
230 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 229 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
231 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 230 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
@@ -237,7 +236,6 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
237 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 236 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
238 | #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) | 237 | #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) |
239 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 238 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
240 | #define _TIF_FREEZE (1<<TIF_FREEZE) | ||
241 | 239 | ||
242 | #define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ | 240 | #define _TIF_USER_WORK_MASK ((0xff << TI_FLAG_WSAVED_SHIFT) | \ |
243 | _TIF_DO_NOTIFY_RESUME_MASK | \ | 241 | _TIF_DO_NOTIFY_RESUME_MASK | \ |
diff --git a/arch/um/include/asm/thread_info.h b/arch/um/include/asm/thread_info.h index 5bd1bad33fab..200c4ab1240c 100644 --- a/arch/um/include/asm/thread_info.h +++ b/arch/um/include/asm/thread_info.h | |||
@@ -71,7 +71,6 @@ static inline struct thread_info *current_thread_info(void) | |||
71 | #define TIF_MEMDIE 5 /* is terminating due to OOM killer */ | 71 | #define TIF_MEMDIE 5 /* is terminating due to OOM killer */ |
72 | #define TIF_SYSCALL_AUDIT 6 | 72 | #define TIF_SYSCALL_AUDIT 6 |
73 | #define TIF_RESTORE_SIGMASK 7 | 73 | #define TIF_RESTORE_SIGMASK 7 |
74 | #define TIF_FREEZE 16 /* is freezing for suspend */ | ||
75 | 74 | ||
76 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 75 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
77 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 76 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
@@ -80,6 +79,5 @@ static inline struct thread_info *current_thread_info(void) | |||
80 | #define _TIF_MEMDIE (1 << TIF_MEMDIE) | 79 | #define _TIF_MEMDIE (1 << TIF_MEMDIE) |
81 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 80 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
82 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | 81 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) |
83 | #define _TIF_FREEZE (1 << TIF_FREEZE) | ||
84 | 82 | ||
85 | #endif | 83 | #endif |
diff --git a/arch/unicore32/include/asm/thread_info.h b/arch/unicore32/include/asm/thread_info.h index c270e9e04861..89f7557583b8 100644 --- a/arch/unicore32/include/asm/thread_info.h +++ b/arch/unicore32/include/asm/thread_info.h | |||
@@ -135,14 +135,12 @@ static inline struct thread_info *current_thread_info(void) | |||
135 | #define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ | 135 | #define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ |
136 | #define TIF_SYSCALL_TRACE 8 | 136 | #define TIF_SYSCALL_TRACE 8 |
137 | #define TIF_MEMDIE 18 | 137 | #define TIF_MEMDIE 18 |
138 | #define TIF_FREEZE 19 | ||
139 | #define TIF_RESTORE_SIGMASK 20 | 138 | #define TIF_RESTORE_SIGMASK 20 |
140 | 139 | ||
141 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 140 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
142 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 141 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
143 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 142 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
144 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 143 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
145 | #define _TIF_FREEZE (1 << TIF_FREEZE) | ||
146 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | 144 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) |
147 | 145 | ||
148 | /* | 146 | /* |
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index 185b719ec61a..74047159d0ab 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h | |||
@@ -91,7 +91,6 @@ struct thread_info { | |||
91 | #define TIF_MEMDIE 20 /* is terminating due to OOM killer */ | 91 | #define TIF_MEMDIE 20 /* is terminating due to OOM killer */ |
92 | #define TIF_DEBUG 21 /* uses debug registers */ | 92 | #define TIF_DEBUG 21 /* uses debug registers */ |
93 | #define TIF_IO_BITMAP 22 /* uses I/O bitmap */ | 93 | #define TIF_IO_BITMAP 22 /* uses I/O bitmap */ |
94 | #define TIF_FREEZE 23 /* is freezing for suspend */ | ||
95 | #define TIF_FORCED_TF 24 /* true if TF in eflags artificially */ | 94 | #define TIF_FORCED_TF 24 /* true if TF in eflags artificially */ |
96 | #define TIF_BLOCKSTEP 25 /* set when we want DEBUGCTLMSR_BTF */ | 95 | #define TIF_BLOCKSTEP 25 /* set when we want DEBUGCTLMSR_BTF */ |
97 | #define TIF_LAZY_MMU_UPDATES 27 /* task is updating the mmu lazily */ | 96 | #define TIF_LAZY_MMU_UPDATES 27 /* task is updating the mmu lazily */ |
@@ -113,7 +112,6 @@ struct thread_info { | |||
113 | #define _TIF_FORK (1 << TIF_FORK) | 112 | #define _TIF_FORK (1 << TIF_FORK) |
114 | #define _TIF_DEBUG (1 << TIF_DEBUG) | 113 | #define _TIF_DEBUG (1 << TIF_DEBUG) |
115 | #define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP) | 114 | #define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP) |
116 | #define _TIF_FREEZE (1 << TIF_FREEZE) | ||
117 | #define _TIF_FORCED_TF (1 << TIF_FORCED_TF) | 115 | #define _TIF_FORCED_TF (1 << TIF_FORCED_TF) |
118 | #define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP) | 116 | #define _TIF_BLOCKSTEP (1 << TIF_BLOCKSTEP) |
119 | #define _TIF_LAZY_MMU_UPDATES (1 << TIF_LAZY_MMU_UPDATES) | 117 | #define _TIF_LAZY_MMU_UPDATES (1 << TIF_LAZY_MMU_UPDATES) |
diff --git a/arch/xtensa/include/asm/thread_info.h b/arch/xtensa/include/asm/thread_info.h index 7be8accb0b0c..6abbedd09d85 100644 --- a/arch/xtensa/include/asm/thread_info.h +++ b/arch/xtensa/include/asm/thread_info.h | |||
@@ -132,7 +132,6 @@ static inline struct thread_info *current_thread_info(void) | |||
132 | #define TIF_MEMDIE 5 /* is terminating due to OOM killer */ | 132 | #define TIF_MEMDIE 5 /* is terminating due to OOM killer */ |
133 | #define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */ | 133 | #define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */ |
134 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 134 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
135 | #define TIF_FREEZE 17 /* is freezing for suspend */ | ||
136 | 135 | ||
137 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 136 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
138 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 137 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
@@ -141,7 +140,6 @@ static inline struct thread_info *current_thread_info(void) | |||
141 | #define _TIF_IRET (1<<TIF_IRET) | 140 | #define _TIF_IRET (1<<TIF_IRET) |
142 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 141 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
143 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 142 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
144 | #define _TIF_FREEZE (1<<TIF_FREEZE) | ||
145 | 143 | ||
146 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ | 144 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ |
147 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ | 145 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ |