]> err.no Git - linux-2.6/blobdiff - include/asm-powerpc/spu_csa.h
[Bluetooth] Add platform device for virtual and serial devices
[linux-2.6] / include / asm-powerpc / spu_csa.h
index 2a8af416638ffe9d655e0a00261bbe9e98cec62b..964c2d38ccb75123421cde8a4716c7a86ba20102 100644 (file)
@@ -22,6 +22,7 @@
 
 #ifndef _SPU_CSA_H_
 #define _SPU_CSA_H_
+#ifdef __KERNEL__
 
 /*
  * Total number of 128-bit registers.
@@ -85,12 +86,18 @@ struct spu_lscsa {
        struct spu_reg128 event_mask;
        struct spu_reg128 srr0;
        struct spu_reg128 stopped_status;
-       struct spu_reg128 pad[119];     /* 'ls' must be page-aligned. */
-       unsigned char ls[LS_SIZE];
-};
 
-#ifdef __KERNEL__
+       /*
+        * 'ls' must be page-aligned on all configurations.
+        * Since we don't want to rely on having the spu-gcc
+        * installed to build the kernel and this structure
+        * is used in the SPU-side code, make it 64k-page
+        * aligned for now.
+        */
+       unsigned char ls[LS_SIZE] __attribute__((aligned(65536)));
+};
 
+#ifndef __SPU__
 /*
  * struct spu_problem_collapsed - condensed problem state area, w/o pads.
  */
@@ -251,6 +258,7 @@ extern int spu_restore(struct spu_state *new, struct spu *spu);
 extern int spu_switch(struct spu_state *prev, struct spu_state *new,
                      struct spu *spu);
 
+#endif /* !__SPU__ */
 #endif /* __KERNEL__ */
 #endif /* !__ASSEMBLY__ */
 #endif /* _SPU_CSA_H_ */