asm-generic: rename atomic.h to atomic-long.h
[safe/jmp/linux-2.6] / arch / powerpc / include / asm / ppc_asm.h
index 0966899..384d90c 100644 (file)
@@ -4,9 +4,11 @@
 #ifndef _ASM_POWERPC_PPC_ASM_H
 #define _ASM_POWERPC_PPC_ASM_H
 
+#include <linux/init.h>
 #include <linux/stringify.h>
 #include <asm/asm-compat.h>
 #include <asm/processor.h>
+#include <asm/ppc-opcode.h>
 
 #ifndef __ASSEMBLY__
 #error __FILE__ should only be used in assembler files
@@ -167,11 +169,6 @@ END_FTR_SECTION_IFCLR(CPU_FTR_PURR);                                       \
 #define HMT_MEDIUM_HIGH or     5,5,5           # medium high priority
 #define HMT_HIGH       or      3,3,3
 
-/* handle instructions that older assemblers may not know */
-#define RFCI           .long 0x4c000066        /* rfci instruction */
-#define RFDI           .long 0x4c00004e        /* rfdi instruction */
-#define RFMCI          .long 0x4c00004c        /* rfmci instruction */
-
 #ifdef __KERNEL__
 #ifdef CONFIG_PPC64
 
@@ -193,7 +190,7 @@ name: \
 GLUE(.,name):
 
 #define _INIT_GLOBAL(name) \
-       .section ".text.init.refok"; \
+       __REF; \
        .align 2 ; \
        .globl name; \
        .globl GLUE(.,name); \
@@ -233,7 +230,7 @@ name: \
 GLUE(.,name):
 
 #define _INIT_STATIC(name) \
-       .section ".text.init.refok"; \
+       __REF; \
        .align 2 ; \
        .section ".opd","aw"; \
 name: \
@@ -268,7 +265,7 @@ n:
  *   Loads the value of the constant expression 'expr' into register 'rn'
  *   using immediate instructions only.  Use this when it's important not
  *   to reference other data (i.e. on ppc64 when the TOC pointer is not
- *   valid).
+ *   valid) and when 'expr' is a constant or absolute address.
  *
  * LOAD_REG_ADDR(rn, name)
  *   Loads the address of label 'name' into register 'rn'.  Use this when
@@ -425,14 +422,14 @@ END_FTR_SECTION_IFCLR(CPU_FTR_601)
 #define fromreal(rd)   tovirt(rd,rd)
 
 #define tophys(rd,rs)                          \
-0:     addis   rd,rs,-KERNELBASE@h;            \
+0:     addis   rd,rs,-PAGE_OFFSET@h;           \
        .section ".vtop_fixup","aw";            \
        .align  1;                              \
        .long   0b;                             \
        .previous
 
 #define tovirt(rd,rs)                          \
-0:     addis   rd,rs,KERNELBASE@h;             \
+0:     addis   rd,rs,PAGE_OFFSET@h;            \
        .section ".ptov_fixup","aw";            \
        .align  1;                              \
        .long   0b;                             \