65
65
* UV2: Bit 19 selects between
66
66
* (0): 10 microsecond timebase and
67
67
* (1): 80 microseconds
68
- * we're using 655us , similar to UV1: 65 units of 10us
68
+ * we're using 560us , similar to UV1: 65 units of 10us
69
69
*/
70
70
#define UV1_INTD_SOFT_ACK_TIMEOUT_PERIOD (9UL)
71
71
#define UV2_INTD_SOFT_ACK_TIMEOUT_PERIOD (15UL)
167
167
#define FLUSH_RETRY_TIMEOUT 2
168
168
#define FLUSH_GIVEUP 3
169
169
#define FLUSH_COMPLETE 4
170
+ #define FLUSH_RETRY_BUSYBUG 5
170
171
171
172
/*
172
173
* tuning the action when the numalink network is extremely delayed
@@ -235,10 +236,10 @@ struct bau_msg_payload {
235
236
236
237
237
238
/*
238
- * Message header: 16 bytes (128 bits) (bytes 0x30-0x3f of descriptor)
239
+ * UV1 Message header: 16 bytes (128 bits) (bytes 0x30-0x3f of descriptor)
239
240
* see table 4.2.3.0.1 in broacast_assist spec.
240
241
*/
241
- struct bau_msg_header {
242
+ struct uv1_bau_msg_header {
242
243
unsigned int dest_subnodeid :6 ; /* must be 0x10, for the LB */
243
244
/* bits 5:0 */
244
245
unsigned int base_dest_nasid :15 ; /* nasid of the first bit */
@@ -317,20 +318,88 @@ struct bau_msg_header {
317
318
/* bits 127:107 */
318
319
};
319
320
321
+ /*
322
+ * UV2 Message header: 16 bytes (128 bits) (bytes 0x30-0x3f of descriptor)
323
+ * see figure 9-2 of harp_sys.pdf
324
+ */
325
+ struct uv2_bau_msg_header {
326
+ unsigned int base_dest_nasid :15 ; /* nasid of the first bit */
327
+ /* bits 14:0 */ /* in uvhub map */
328
+ unsigned int dest_subnodeid :5 ; /* must be 0x10, for the LB */
329
+ /* bits 19:15 */
330
+ unsigned int rsvd_1 :1 ; /* must be zero */
331
+ /* bit 20 */
332
+ /* Address bits 59:21 */
333
+ /* bits 25:2 of address (44:21) are payload */
334
+ /* these next 24 bits become bytes 12-14 of msg */
335
+ /* bits 28:21 land in byte 12 */
336
+ unsigned int replied_to :1 ; /* sent as 0 by the source to
337
+ byte 12 */
338
+ /* bit 21 */
339
+ unsigned int msg_type :3 ; /* software type of the
340
+ message */
341
+ /* bits 24:22 */
342
+ unsigned int canceled :1 ; /* message canceled, resource
343
+ is to be freed*/
344
+ /* bit 25 */
345
+ unsigned int payload_1 :3 ; /* not currently used */
346
+ /* bits 28:26 */
347
+
348
+ /* bits 36:29 land in byte 13 */
349
+ unsigned int payload_2a :3 ; /* not currently used */
350
+ unsigned int payload_2b :5 ; /* not currently used */
351
+ /* bits 36:29 */
352
+
353
+ /* bits 44:37 land in byte 14 */
354
+ unsigned int payload_3 :8 ; /* not currently used */
355
+ /* bits 44:37 */
356
+
357
+ unsigned int rsvd_2 :7 ; /* reserved */
358
+ /* bits 51:45 */
359
+ unsigned int swack_flag :1 ; /* software acknowledge flag */
360
+ /* bit 52 */
361
+ unsigned int rsvd_3a :3 ; /* must be zero */
362
+ unsigned int rsvd_3b :8 ; /* must be zero */
363
+ unsigned int rsvd_3c :8 ; /* must be zero */
364
+ unsigned int rsvd_3d :3 ; /* must be zero */
365
+ /* bits 74:53 */
366
+ unsigned int fairness :3 ; /* usually zero */
367
+ /* bits 77:75 */
368
+
369
+ unsigned int sequence :16 ; /* message sequence number */
370
+ /* bits 93:78 Suppl_A */
371
+ unsigned int chaining :1 ; /* next descriptor is part of
372
+ this activation*/
373
+ /* bit 94 */
374
+ unsigned int multilevel :1 ; /* multi-level multicast
375
+ format */
376
+ /* bit 95 */
377
+ unsigned int rsvd_4 :24 ; /* ordered / source node /
378
+ source subnode / aging
379
+ must be zero */
380
+ /* bits 119:96 */
381
+ unsigned int command :8 ; /* message type */
382
+ /* bits 127:120 */
383
+ };
384
+
320
385
/*
321
386
* The activation descriptor:
322
387
* The format of the message to send, plus all accompanying control
323
388
* Should be 64 bytes
324
389
*/
325
390
struct bau_desc {
326
- struct pnmask distribution ;
391
+ struct pnmask distribution ;
327
392
/*
328
393
* message template, consisting of header and payload:
329
394
*/
330
- struct bau_msg_header header ;
331
- struct bau_msg_payload payload ;
395
+ union bau_msg_header {
396
+ struct uv1_bau_msg_header uv1_hdr ;
397
+ struct uv2_bau_msg_header uv2_hdr ;
398
+ } header ;
399
+
400
+ struct bau_msg_payload payload ;
332
401
};
333
- /*
402
+ /* UV1:
334
403
* -payload-- ---------header------
335
404
* bytes 0-11 bits 41-56 bits 58-81
336
405
* A B (2) C (3)
@@ -340,6 +409,16 @@ struct bau_desc {
340
409
* bytes 0-11 bytes 12-14 bytes 16-17 (byte 15 filled in by hw as vector)
341
410
* ------------payload queue-----------
342
411
*/
412
+ /* UV2:
413
+ * -payload-- ---------header------
414
+ * bytes 0-11 bits 70-78 bits 21-44
415
+ * A B (2) C (3)
416
+ *
417
+ * A/B/C are moved to:
418
+ * A C B
419
+ * bytes 0-11 bytes 12-14 bytes 16-17 (byte 15 filled in by hw as vector)
420
+ * ------------payload queue-----------
421
+ */
343
422
344
423
/*
345
424
* The payload queue on the destination side is an array of these.
@@ -385,7 +464,6 @@ struct bau_pq_entry {
385
464
struct msg_desc {
386
465
struct bau_pq_entry * msg ;
387
466
int msg_slot ;
388
- int swack_slot ;
389
467
struct bau_pq_entry * queue_first ;
390
468
struct bau_pq_entry * queue_last ;
391
469
};
@@ -405,6 +483,7 @@ struct ptc_stats {
405
483
requests */
406
484
unsigned long s_stimeout ; /* source side timeouts */
407
485
unsigned long s_dtimeout ; /* destination side timeouts */
486
+ unsigned long s_strongnacks ; /* number of strong nack's */
408
487
unsigned long s_time ; /* time spent in sending side */
409
488
unsigned long s_retriesok ; /* successful retries */
410
489
unsigned long s_ntargcpu ; /* total number of cpu's
@@ -439,6 +518,9 @@ struct ptc_stats {
439
518
unsigned long s_retry_messages ; /* retry broadcasts */
440
519
unsigned long s_bau_reenabled ; /* for bau enable/disable */
441
520
unsigned long s_bau_disabled ; /* for bau enable/disable */
521
+ unsigned long s_uv2_wars ; /* uv2 workaround, perm. busy */
522
+ unsigned long s_uv2_wars_hw ; /* uv2 workaround, hiwater */
523
+ unsigned long s_uv2_war_waits ; /* uv2 workaround, long waits */
442
524
/* destination statistics */
443
525
unsigned long d_alltlb ; /* times all tlb's on this
444
526
cpu were flushed */
@@ -511,9 +593,12 @@ struct bau_control {
511
593
short osnode ;
512
594
short uvhub_cpu ;
513
595
short uvhub ;
596
+ short uvhub_version ;
514
597
short cpus_in_socket ;
515
598
short cpus_in_uvhub ;
516
599
short partition_base_pnode ;
600
+ short using_desc ; /* an index, like uvhub_cpu */
601
+ unsigned int inuse_map ;
517
602
unsigned short message_number ;
518
603
unsigned short uvhub_quiesce ;
519
604
short socket_acknowledge_count [DEST_Q_SIZE ];
@@ -531,6 +616,7 @@ struct bau_control {
531
616
int cong_response_us ;
532
617
int cong_reps ;
533
618
int cong_period ;
619
+ unsigned long clocks_per_100_usec ;
534
620
cycles_t period_time ;
535
621
long period_requests ;
536
622
struct hub_and_pnode * thp ;
@@ -591,6 +677,11 @@ static inline void write_mmr_sw_ack(unsigned long mr)
591
677
uv_write_local_mmr (UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_ALIAS , mr );
592
678
}
593
679
680
+ static inline void write_gmmr_sw_ack (int pnode , unsigned long mr )
681
+ {
682
+ write_gmmr (pnode , UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE_ALIAS , mr );
683
+ }
684
+
594
685
static inline unsigned long read_mmr_sw_ack (void )
595
686
{
596
687
return read_lmmr (UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE );
0 commit comments