diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/sgi-xp/xpc.h | 6 | ||||
-rw-r--r-- | drivers/misc/sgi-xp/xpc_main.c | 8 | ||||
-rw-r--r-- | drivers/misc/sgi-xp/xpc_partition.c | 14 | ||||
-rw-r--r-- | drivers/misc/sgi-xp/xpc_sn2.c | 26 |
4 files changed, 28 insertions, 26 deletions
diff --git a/drivers/misc/sgi-xp/xpc.h b/drivers/misc/sgi-xp/xpc.h index 0907934cdd8f..e194d3140f68 100644 --- a/drivers/misc/sgi-xp/xpc.h +++ b/drivers/misc/sgi-xp/xpc.h | |||
@@ -87,7 +87,7 @@ | |||
87 | * which are partition specific (vars part). These are setup by XPC. | 87 | * which are partition specific (vars part). These are setup by XPC. |
88 | * (Local partition's vars pointers are xpc_vars and xpc_vars_part.) | 88 | * (Local partition's vars pointers are xpc_vars and xpc_vars_part.) |
89 | * | 89 | * |
90 | * Note: Until 'stamp' is set non-zero, the partition XPC code has not been | 90 | * Note: Until 'ts_jiffies' is set non-zero, the partition XPC code has not been |
91 | * initialized. | 91 | * initialized. |
92 | */ | 92 | */ |
93 | struct xpc_rsvd_page { | 93 | struct xpc_rsvd_page { |
@@ -101,7 +101,7 @@ struct xpc_rsvd_page { | |||
101 | u64 vars_pa; /* physical address of struct xpc_vars */ | 101 | u64 vars_pa; /* physical address of struct xpc_vars */ |
102 | u64 activate_mq_gpa; /* global phys address of activate_mq */ | 102 | u64 activate_mq_gpa; /* global phys address of activate_mq */ |
103 | } sn; | 103 | } sn; |
104 | unsigned long stamp; /* time when reserved page was setup by XPC */ | 104 | unsigned long ts_jiffies; /* timestamp when rsvd pg was setup by XPC */ |
105 | u64 pad2[10]; /* align to last u64 in 2nd 64-byte cacheline */ | 105 | u64 pad2[10]; /* align to last u64 in 2nd 64-byte cacheline */ |
106 | u64 SAL_nasids_size; /* SAL: size of each nasid mask in bytes */ | 106 | u64 SAL_nasids_size; /* SAL: size of each nasid mask in bytes */ |
107 | }; | 107 | }; |
@@ -534,7 +534,7 @@ struct xpc_partition { | |||
534 | /* XPC HB infrastructure */ | 534 | /* XPC HB infrastructure */ |
535 | 535 | ||
536 | u8 remote_rp_version; /* version# of partition's rsvd pg */ | 536 | u8 remote_rp_version; /* version# of partition's rsvd pg */ |
537 | unsigned long remote_rp_stamp; /* time when rsvd pg was initialized */ | 537 | unsigned long remote_rp_ts_jiffies; /* timestamp when rsvd pg setup */ |
538 | u64 remote_rp_pa; /* phys addr of partition's rsvd pg */ | 538 | u64 remote_rp_pa; /* phys addr of partition's rsvd pg */ |
539 | u64 last_heartbeat; /* HB at last read */ | 539 | u64 last_heartbeat; /* HB at last read */ |
540 | u32 activate_IRQ_rcvd; /* IRQs since activation */ | 540 | u32 activate_IRQ_rcvd; /* IRQs since activation */ |
diff --git a/drivers/misc/sgi-xp/xpc_main.c b/drivers/misc/sgi-xp/xpc_main.c index 36dfccea5247..e7ff9e1670f6 100644 --- a/drivers/misc/sgi-xp/xpc_main.c +++ b/drivers/misc/sgi-xp/xpc_main.c | |||
@@ -862,8 +862,8 @@ xpc_do_exit(enum xp_retval reason) | |||
862 | DBUG_ON(xpc_any_partition_engaged()); | 862 | DBUG_ON(xpc_any_partition_engaged()); |
863 | DBUG_ON(xpc_any_hbs_allowed() != 0); | 863 | DBUG_ON(xpc_any_hbs_allowed() != 0); |
864 | 864 | ||
865 | /* indicate to others that our reserved page is uninitialized */ | 865 | /* a zero timestamp indicates our rsvd page is not initialized */ |
866 | xpc_rsvd_page->stamp = 0; | 866 | xpc_rsvd_page->ts_jiffies = 0; |
867 | 867 | ||
868 | if (reason == xpUnloading) { | 868 | if (reason == xpUnloading) { |
869 | (void)unregister_die_notifier(&xpc_die_notifier); | 869 | (void)unregister_die_notifier(&xpc_die_notifier); |
@@ -1152,8 +1152,8 @@ xpc_init(void) | |||
1152 | 1152 | ||
1153 | /* initialization was not successful */ | 1153 | /* initialization was not successful */ |
1154 | out_3: | 1154 | out_3: |
1155 | /* indicate to others that our reserved page is uninitialized */ | 1155 | /* a zero timestamp indicates our rsvd page is not initialized */ |
1156 | xpc_rsvd_page->stamp = 0; | 1156 | xpc_rsvd_page->ts_jiffies = 0; |
1157 | 1157 | ||
1158 | (void)unregister_die_notifier(&xpc_die_notifier); | 1158 | (void)unregister_die_notifier(&xpc_die_notifier); |
1159 | (void)unregister_reboot_notifier(&xpc_reboot_notifier); | 1159 | (void)unregister_reboot_notifier(&xpc_reboot_notifier); |
diff --git a/drivers/misc/sgi-xp/xpc_partition.c b/drivers/misc/sgi-xp/xpc_partition.c index ca6784f55970..70d4a00c9723 100644 --- a/drivers/misc/sgi-xp/xpc_partition.c +++ b/drivers/misc/sgi-xp/xpc_partition.c | |||
@@ -133,7 +133,7 @@ xpc_setup_rsvd_page(void) | |||
133 | { | 133 | { |
134 | struct xpc_rsvd_page *rp; | 134 | struct xpc_rsvd_page *rp; |
135 | u64 rp_pa; | 135 | u64 rp_pa; |
136 | unsigned long new_stamp; | 136 | unsigned long new_ts_jiffies; |
137 | 137 | ||
138 | /* get the local reserved page's address */ | 138 | /* get the local reserved page's address */ |
139 | 139 | ||
@@ -183,10 +183,10 @@ xpc_setup_rsvd_page(void) | |||
183 | * This signifies to the remote partition that our reserved | 183 | * This signifies to the remote partition that our reserved |
184 | * page is initialized. | 184 | * page is initialized. |
185 | */ | 185 | */ |
186 | new_stamp = jiffies; | 186 | new_ts_jiffies = jiffies; |
187 | if (new_stamp == 0 || new_stamp == rp->stamp) | 187 | if (new_ts_jiffies == 0 || new_ts_jiffies == rp->ts_jiffies) |
188 | new_stamp++; | 188 | new_ts_jiffies++; |
189 | rp->stamp = new_stamp; | 189 | rp->ts_jiffies = new_ts_jiffies; |
190 | 190 | ||
191 | return rp; | 191 | return rp; |
192 | } | 192 | } |
@@ -225,8 +225,8 @@ xpc_get_remote_rp(int nasid, unsigned long *discovered_nasids, | |||
225 | discovered_nasids[l] |= remote_part_nasids[l]; | 225 | discovered_nasids[l] |= remote_part_nasids[l]; |
226 | } | 226 | } |
227 | 227 | ||
228 | /* see if the reserved page has been set up by XPC */ | 228 | /* zero timestamp indicates the reserved page has not been setup */ |
229 | if (remote_rp->stamp == 0) | 229 | if (remote_rp->ts_jiffies == 0) |
230 | return xpRsvdPageNotSet; | 230 | return xpRsvdPageNotSet; |
231 | 231 | ||
232 | if (XPC_VERSION_MAJOR(remote_rp->version) != | 232 | if (XPC_VERSION_MAJOR(remote_rp->version) != |
diff --git a/drivers/misc/sgi-xp/xpc_sn2.c b/drivers/misc/sgi-xp/xpc_sn2.c index f82889f60151..4b5f69edf0d2 100644 --- a/drivers/misc/sgi-xp/xpc_sn2.c +++ b/drivers/misc/sgi-xp/xpc_sn2.c | |||
@@ -863,8 +863,8 @@ xpc_partition_deactivation_requested_sn2(short partid) | |||
863 | */ | 863 | */ |
864 | static void | 864 | static void |
865 | xpc_update_partition_info_sn2(struct xpc_partition *part, u8 remote_rp_version, | 865 | xpc_update_partition_info_sn2(struct xpc_partition *part, u8 remote_rp_version, |
866 | unsigned long *remote_rp_stamp, u64 remote_rp_pa, | 866 | unsigned long *remote_rp_ts_jiffies, |
867 | u64 remote_vars_pa, | 867 | u64 remote_rp_pa, u64 remote_vars_pa, |
868 | struct xpc_vars_sn2 *remote_vars) | 868 | struct xpc_vars_sn2 *remote_vars) |
869 | { | 869 | { |
870 | struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; | 870 | struct xpc_partition_sn2 *part_sn2 = &part->sn.sn2; |
@@ -873,9 +873,9 @@ xpc_update_partition_info_sn2(struct xpc_partition *part, u8 remote_rp_version, | |||
873 | dev_dbg(xpc_part, " remote_rp_version = 0x%016x\n", | 873 | dev_dbg(xpc_part, " remote_rp_version = 0x%016x\n", |
874 | part->remote_rp_version); | 874 | part->remote_rp_version); |
875 | 875 | ||
876 | part->remote_rp_stamp = *remote_rp_stamp; | 876 | part->remote_rp_ts_jiffies = *remote_rp_ts_jiffies; |
877 | dev_dbg(xpc_part, " remote_rp_stamp = 0x%016lx\n", | 877 | dev_dbg(xpc_part, " remote_rp_ts_jiffies = 0x%016lx\n", |
878 | part->remote_rp_stamp); | 878 | part->remote_rp_ts_jiffies); |
879 | 879 | ||
880 | part->remote_rp_pa = remote_rp_pa; | 880 | part->remote_rp_pa = remote_rp_pa; |
881 | dev_dbg(xpc_part, " remote_rp_pa = 0x%016lx\n", part->remote_rp_pa); | 881 | dev_dbg(xpc_part, " remote_rp_pa = 0x%016lx\n", part->remote_rp_pa); |
@@ -933,7 +933,7 @@ xpc_identify_activate_IRQ_req_sn2(int nasid) | |||
933 | u64 remote_vars_pa; | 933 | u64 remote_vars_pa; |
934 | int remote_rp_version; | 934 | int remote_rp_version; |
935 | int reactivate = 0; | 935 | int reactivate = 0; |
936 | unsigned long remote_rp_stamp = 0; | 936 | unsigned long remote_rp_ts_jiffies = 0; |
937 | short partid; | 937 | short partid; |
938 | struct xpc_partition *part; | 938 | struct xpc_partition *part; |
939 | struct xpc_partition_sn2 *part_sn2; | 939 | struct xpc_partition_sn2 *part_sn2; |
@@ -952,7 +952,7 @@ xpc_identify_activate_IRQ_req_sn2(int nasid) | |||
952 | 952 | ||
953 | remote_vars_pa = remote_rp->sn.vars_pa; | 953 | remote_vars_pa = remote_rp->sn.vars_pa; |
954 | remote_rp_version = remote_rp->version; | 954 | remote_rp_version = remote_rp->version; |
955 | remote_rp_stamp = remote_rp->stamp; | 955 | remote_rp_ts_jiffies = remote_rp->ts_jiffies; |
956 | 956 | ||
957 | partid = remote_rp->SAL_partid; | 957 | partid = remote_rp->SAL_partid; |
958 | part = &xpc_partitions[partid]; | 958 | part = &xpc_partitions[partid]; |
@@ -981,8 +981,9 @@ xpc_identify_activate_IRQ_req_sn2(int nasid) | |||
981 | part->act_state == XPC_P_INACTIVE) { | 981 | part->act_state == XPC_P_INACTIVE) { |
982 | 982 | ||
983 | xpc_update_partition_info_sn2(part, remote_rp_version, | 983 | xpc_update_partition_info_sn2(part, remote_rp_version, |
984 | &remote_rp_stamp, remote_rp_pa, | 984 | &remote_rp_ts_jiffies, |
985 | remote_vars_pa, remote_vars); | 985 | remote_rp_pa, remote_vars_pa, |
986 | remote_vars); | ||
986 | 987 | ||
987 | if (xpc_partition_deactivation_requested_sn2(partid)) { | 988 | if (xpc_partition_deactivation_requested_sn2(partid)) { |
988 | /* | 989 | /* |
@@ -999,7 +1000,7 @@ xpc_identify_activate_IRQ_req_sn2(int nasid) | |||
999 | DBUG_ON(part->remote_rp_version == 0); | 1000 | DBUG_ON(part->remote_rp_version == 0); |
1000 | DBUG_ON(part_sn2->remote_vars_version == 0); | 1001 | DBUG_ON(part_sn2->remote_vars_version == 0); |
1001 | 1002 | ||
1002 | if (remote_rp_stamp != part->remote_rp_stamp) { | 1003 | if (remote_rp_ts_jiffies != part->remote_rp_ts_jiffies) { |
1003 | 1004 | ||
1004 | /* the other side rebooted */ | 1005 | /* the other side rebooted */ |
1005 | 1006 | ||
@@ -1007,8 +1008,9 @@ xpc_identify_activate_IRQ_req_sn2(int nasid) | |||
1007 | DBUG_ON(xpc_partition_deactivation_requested_sn2(partid)); | 1008 | DBUG_ON(xpc_partition_deactivation_requested_sn2(partid)); |
1008 | 1009 | ||
1009 | xpc_update_partition_info_sn2(part, remote_rp_version, | 1010 | xpc_update_partition_info_sn2(part, remote_rp_version, |
1010 | &remote_rp_stamp, remote_rp_pa, | 1011 | &remote_rp_ts_jiffies, |
1011 | remote_vars_pa, remote_vars); | 1012 | remote_rp_pa, remote_vars_pa, |
1013 | remote_vars); | ||
1012 | reactivate = 1; | 1014 | reactivate = 1; |
1013 | } | 1015 | } |
1014 | 1016 | ||