diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-12-01 04:56:43 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-12-01 04:56:43 -0500 |
commit | bd3c97a7c718bfb9f1e4f31c16c383a5c6f815eb (patch) | |
tree | 3f56594e813c6f35cbacbdb3e137ba5bfd0b3069 /include/asm-powerpc/ppc_asm.h | |
parent | 6c33cafc794d07c9254c160789120a0e98c088c9 (diff) | |
parent | 0215ffb08ce99e2bb59eca114a99499a4d06e704 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/asm-powerpc/ppc_asm.h')
-rw-r--r-- | include/asm-powerpc/ppc_asm.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h index a940cfe040da..fa083d8e4663 100644 --- a/include/asm-powerpc/ppc_asm.h +++ b/include/asm-powerpc/ppc_asm.h | |||
@@ -30,9 +30,9 @@ BEGIN_FTR_SECTION; \ | |||
30 | mfspr ra,SPRN_PURR; /* get processor util. reg */ \ | 30 | mfspr ra,SPRN_PURR; /* get processor util. reg */ \ |
31 | END_FTR_SECTION_IFSET(CPU_FTR_PURR); \ | 31 | END_FTR_SECTION_IFSET(CPU_FTR_PURR); \ |
32 | BEGIN_FTR_SECTION; \ | 32 | BEGIN_FTR_SECTION; \ |
33 | mftb ra; /* or get TB if no PURR */ \ | 33 | MFTB(ra); /* or get TB if no PURR */ \ |
34 | END_FTR_SECTION_IFCLR(CPU_FTR_PURR); \ | 34 | END_FTR_SECTION_IFCLR(CPU_FTR_PURR); \ |
35 | ld rb,PACA_STARTPURR(r13); \ | 35 | ld rb,PACA_STARTPURR(r13); \ |
36 | std ra,PACA_STARTPURR(r13); \ | 36 | std ra,PACA_STARTPURR(r13); \ |
37 | subf rb,rb,ra; /* subtract start value */ \ | 37 | subf rb,rb,ra; /* subtract start value */ \ |
38 | ld ra,PACA_USER_TIME(r13); \ | 38 | ld ra,PACA_USER_TIME(r13); \ |
@@ -45,9 +45,9 @@ BEGIN_FTR_SECTION; \ | |||
45 | mfspr ra,SPRN_PURR; /* get processor util. reg */ \ | 45 | mfspr ra,SPRN_PURR; /* get processor util. reg */ \ |
46 | END_FTR_SECTION_IFSET(CPU_FTR_PURR); \ | 46 | END_FTR_SECTION_IFSET(CPU_FTR_PURR); \ |
47 | BEGIN_FTR_SECTION; \ | 47 | BEGIN_FTR_SECTION; \ |
48 | mftb ra; /* or get TB if no PURR */ \ | 48 | MFTB(ra); /* or get TB if no PURR */ \ |
49 | END_FTR_SECTION_IFCLR(CPU_FTR_PURR); \ | 49 | END_FTR_SECTION_IFCLR(CPU_FTR_PURR); \ |
50 | ld rb,PACA_STARTPURR(r13); \ | 50 | ld rb,PACA_STARTPURR(r13); \ |
51 | std ra,PACA_STARTPURR(r13); \ | 51 | std ra,PACA_STARTPURR(r13); \ |
52 | subf rb,rb,ra; /* subtract start value */ \ | 52 | subf rb,rb,ra; /* subtract start value */ \ |
53 | ld ra,PACA_SYSTEM_TIME(r13); \ | 53 | ld ra,PACA_SYSTEM_TIME(r13); \ |
@@ -274,6 +274,16 @@ END_FTR_SECTION_IFSET(CPU_FTR_601) | |||
274 | #define ISYNC_601 | 274 | #define ISYNC_601 |
275 | #endif | 275 | #endif |
276 | 276 | ||
277 | #ifdef CONFIG_PPC_CELL | ||
278 | #define MFTB(dest) \ | ||
279 | 90: mftb dest; \ | ||
280 | BEGIN_FTR_SECTION_NESTED(96); \ | ||
281 | cmpwi dest,0; \ | ||
282 | beq- 90b; \ | ||
283 | END_FTR_SECTION_NESTED(CPU_FTR_CELL_TB_BUG, CPU_FTR_CELL_TB_BUG, 96) | ||
284 | #else | ||
285 | #define MFTB(dest) mftb dest | ||
286 | #endif | ||
277 | 287 | ||
278 | #ifndef CONFIG_SMP | 288 | #ifndef CONFIG_SMP |
279 | #define TLBSYNC | 289 | #define TLBSYNC |