]> err.no Git - linux-2.6/blobdiff - include/asm-ia64/sn/nodepda.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux-2.6] / include / asm-ia64 / sn / nodepda.h
index 13cc1002b29493fa05a4adf871016841b691b62e..ee118b901de479e065ccc1cf361c1db141680f4c 100644 (file)
@@ -9,11 +9,9 @@
 #define _ASM_IA64_SN_NODEPDA_H
 
 
-#include <asm/semaphore.h>
 #include <asm/irq.h>
 #include <asm/sn/arch.h>
 #include <asm/sn/intr.h>
-#include <asm/sn/pda.h>
 #include <asm/sn/bte.h>
 
 /*
@@ -38,7 +36,6 @@ struct phys_cpuid {
 
 struct nodepda_s {
        void            *pdinfo;        /* Platform-dependent per-node info */
-       spinlock_t              bist_lock;
 
        /*
         * The BTEs on this node are shared by the local cpus
@@ -56,6 +53,7 @@ struct nodepda_s {
         * Array of physical cpu identifiers. Indexed by cpuid.
         */
        struct phys_cpuid       phys_cpuid[NR_CPUS];
+       spinlock_t              ptc_lock ____cacheline_aligned_in_smp;
 };
 
 typedef struct nodepda_s nodepda_t;
@@ -67,20 +65,18 @@ typedef struct nodepda_s nodepda_t;
  * The next set of definitions provides this.
  * Routines are expected to use 
  *
- *     nodepda                 -> to access node PDA for the node on which code is running
- *     subnodepda              -> to access subnode PDA for the subnode on which code is running
- *
- *     NODEPDA(cnode)          -> to access node PDA for cnodeid 
- *     SUBNODEPDA(cnode,sn)    -> to access subnode PDA for cnodeid/subnode
+ *     sn_nodepda   - to access node PDA for the node on which code is running
+ *     NODEPDA(cnodeid)   - to access node PDA for cnodeid
  */
 
-#define        nodepda         pda->p_nodepda          /* Ptr to this node's PDA */
-#define        NODEPDA(cnode)          (nodepda->pernode_pdaindr[cnode])
+DECLARE_PER_CPU(struct nodepda_s *, __sn_nodepda);
+#define sn_nodepda             (__get_cpu_var(__sn_nodepda))
+#define        NODEPDA(cnodeid)        (sn_nodepda->pernode_pdaindr[cnodeid])
 
 /*
  * Check if given a compact node id the corresponding node has all the
  * cpus disabled. 
  */
-#define is_headless_node(cnode)                (nr_cpus_node(cnode) == 0)
+#define is_headless_node(cnodeid)      (nr_cpus_node(cnodeid) == 0)
 
 #endif /* _ASM_IA64_SN_NODEPDA_H */