aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/time.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-09 18:16:52 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-09 18:16:52 -0500
commitc4888f9ffafe7db107b7eafb3a68eaeeff3779c3 (patch)
treed30da15f6b5d74c8c04fd92991af5e1615d95691 /include/asm-powerpc/time.h
parente36aeee65d4db050bd8713537416a0a0632db079 (diff)
parent688016f4e2028e3c2c27e959ad001536e10ee2c5 (diff)
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (37 commits) [POWERPC] EEH: Make sure warning message is printed [POWERPC] Make altivec code in swsusp_32.S depend on CONFIG_ALTIVEC [POWERPC] windfarm: Fix windfarm thread freezer interaction [POWERPC] Fix si_addr value on low level hash failures [POWERPC] Refresh ppc64_defconfig and enable pasemi-related options [POWERPC] pasemi: Update defconfig [POWERPC] iSeries: Fix ref counting in vio setup [POWERPC] ] Fix memset size error [POWERPC] Fix link errors for allyesconfig [POWERPC] iSeries_init_IRQ non-PCI tidy [POWERPC] Change fallocate to match unistd.h on powerpc [POWERPC] EEH: Avoid crash on null device [POWERPC] EEH: Drivers that need reset trump others [POWERPC] EEH: Clean up comments [POWERPC] Fix off-by-one error in setting decrementer on Book E/4xx (v2) [POWERPC] Fix switch_slb handling of 1T ESID values [POWERPC] Fix build failure when CONFIG_VIRT_CPU_ACCOUNTING is not defined [POWERPC] Include udbg.h when using udbg_printf [POWERPC] Fix cache line vs. block size confusion [POWERPC] Fix sysctl table check failure on PowerMac ...
Diffstat (limited to 'include/asm-powerpc/time.h')
-rw-r--r--include/asm-powerpc/time.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h
index f05895522f7f..780f82642756 100644
--- a/include/asm-powerpc/time.h
+++ b/include/asm-powerpc/time.h
@@ -176,25 +176,31 @@ static inline unsigned int get_dec(void)
176#endif 176#endif
177} 177}
178 178
179/*
180 * Note: Book E and 4xx processors differ from other PowerPC processors
181 * in when the decrementer generates its interrupt: on the 1 to 0
182 * transition for Book E/4xx, but on the 0 to -1 transition for others.
183 */
179static inline void set_dec(int val) 184static inline void set_dec(int val)
180{ 185{
181#if defined(CONFIG_40x) 186#if defined(CONFIG_40x)
182 mtspr(SPRN_PIT, val); 187 mtspr(SPRN_PIT, val);
183#elif defined(CONFIG_8xx_CPU6) 188#elif defined(CONFIG_8xx_CPU6)
184 set_dec_cpu6(val); 189 set_dec_cpu6(val - 1);
185#else 190#else
191#ifndef CONFIG_BOOKE
192 --val;
193#endif
186#ifdef CONFIG_PPC_ISERIES 194#ifdef CONFIG_PPC_ISERIES
187 int cur_dec;
188
189 if (firmware_has_feature(FW_FEATURE_ISERIES) && 195 if (firmware_has_feature(FW_FEATURE_ISERIES) &&
190 get_lppaca()->shared_proc) { 196 get_lppaca()->shared_proc) {
191 get_lppaca()->virtual_decr = val; 197 get_lppaca()->virtual_decr = val;
192 cur_dec = get_dec(); 198 if (get_dec() > val)
193 if (cur_dec > val)
194 HvCall_setVirtualDecr(); 199 HvCall_setVirtualDecr();
195 } else 200 return;
201 }
196#endif 202#endif
197 mtspr(SPRN_DEC, val); 203 mtspr(SPRN_DEC, val);
198#endif /* not 40x or 8xx_CPU6 */ 204#endif /* not 40x or 8xx_CPU6 */
199} 205}
200 206