+struct nx_info *create_nx_info(void)
+{
+ struct nx_info *new;
+ int err;
+
+ nxdprintk("create_nx_info()\n");
+ if (!(new = __loc_nx_info(NX_DYNAMIC_ID, &err)))
+ return NULL;
+ return new;
+}
+
+
+#endif
+
+#ifdef CONFIG_PROC_FS
+
+#define hlist_for_each_rcu(pos, head) \
+ for (pos = (head)->first; pos && ({ prefetch(pos->next); 1;}); \
+ pos = pos->next, ({ smp_read_barrier_depends(); 0;}))
+
+int get_nid_list(int index, unsigned int *nids, int size)
+{
+ int hindex, nr_nids = 0;
+
+ rcu_read_lock();
+ for (hindex = 0; hindex < NX_HASH_SIZE; hindex++) {
+ struct hlist_head *head = &nx_info_hash[hindex];
+ struct hlist_node *pos;
+
+ hlist_for_each_rcu(pos, head) {
+ struct nx_info *nxi;
+
+ if (--index > 0)
+ continue;
+
+ nxi = hlist_entry(pos, struct nx_info, nx_hlist);
+ nids[nr_nids] = nxi->nx_id;
+ if (++nr_nids >= size)
+ goto out;
+ }
+ }
+out:
+ rcu_read_unlock();
+ return nr_nids;
+}
+#endif
+
+