@@ -632,17 +632,36 @@ static ssize_t ndev_debugfs_read(struct file *filp, char __user *ubuf,
632
632
off += scnprintf (buf + off , buf_size - off ,
633
633
"XLAT23 -\t\t%#018llx\n" , u .v64 );
634
634
635
- u .v64 = ioread64 (mmio + bar2_off (ndev -> xlat_reg -> bar2_xlat , 4 ));
636
- off += scnprintf (buf + off , buf_size - off ,
637
- "XLAT45 -\t\t%#018llx\n" , u .v64 );
635
+ if (ndev -> bar4_split ) {
636
+ u .v32 = ioread32 (mmio + bar2_off (ndev -> xlat_reg -> bar2_xlat , 4 ));
637
+ off += scnprintf (buf + off , buf_size - off ,
638
+ "XLAT4 -\t\t\t%#06x\n" , u .v32 );
639
+
640
+ u .v32 = ioread32 (mmio + bar2_off (ndev -> xlat_reg -> bar2_xlat , 5 ));
641
+ off += scnprintf (buf + off , buf_size - off ,
642
+ "XLAT5 -\t\t\t%#06x\n" , u .v32 );
643
+ } else {
644
+ u .v64 = ioread64 (mmio + bar2_off (ndev -> xlat_reg -> bar2_xlat , 4 ));
645
+ off += scnprintf (buf + off , buf_size - off ,
646
+ "XLAT45 -\t\t%#018llx\n" , u .v64 );
647
+ }
638
648
639
649
u .v64 = ioread64 (mmio + bar2_off (ndev -> xlat_reg -> bar2_limit , 2 ));
640
650
off += scnprintf (buf + off , buf_size - off ,
641
651
"LMT23 -\t\t\t%#018llx\n" , u .v64 );
642
652
643
- u .v64 = ioread64 (mmio + bar2_off (ndev -> xlat_reg -> bar2_limit , 4 ));
644
- off += scnprintf (buf + off , buf_size - off ,
645
- "LMT45 -\t\t\t%#018llx\n" , u .v64 );
653
+ if (ndev -> bar4_split ) {
654
+ u .v32 = ioread32 (mmio + bar2_off (ndev -> xlat_reg -> bar2_limit , 4 ));
655
+ off += scnprintf (buf + off , buf_size - off ,
656
+ "LMT4 -\t\t\t%#06x\n" , u .v32 );
657
+ u .v32 = ioread32 (mmio + bar2_off (ndev -> xlat_reg -> bar2_limit , 5 ));
658
+ off += scnprintf (buf + off , buf_size - off ,
659
+ "LMT5 -\t\t\t%#06x\n" , u .v32 );
660
+ } else {
661
+ u .v64 = ioread64 (mmio + bar2_off (ndev -> xlat_reg -> bar2_limit , 4 ));
662
+ off += scnprintf (buf + off , buf_size - off ,
663
+ "LMT45 -\t\t\t%#018llx\n" , u .v64 );
664
+ }
646
665
647
666
if (pdev_is_xeon (ndev -> ntb .pdev )) {
648
667
if (ntb_topo_is_b2b (ndev -> ntb .topo )) {
@@ -653,17 +672,41 @@ static ssize_t ndev_debugfs_read(struct file *filp, char __user *ubuf,
653
672
off += scnprintf (buf + off , buf_size - off ,
654
673
"B2B XLAT23 -\t\t%#018llx\n" , u .v64 );
655
674
656
- u .v64 = ioread64 (mmio + XEON_PBAR45XLAT_OFFSET );
657
- off += scnprintf (buf + off , buf_size - off ,
658
- "B2B XLAT45 -\t\t%#018llx\n" , u .v64 );
675
+ if (ndev -> bar4_split ) {
676
+ u .v32 = ioread32 (mmio + XEON_PBAR4XLAT_OFFSET );
677
+ off += scnprintf (buf + off , buf_size - off ,
678
+ "B2B XLAT4 -\t\t%#06x\n" ,
679
+ u .v32 );
680
+ u .v32 = ioread32 (mmio + XEON_PBAR5XLAT_OFFSET );
681
+ off += scnprintf (buf + off , buf_size - off ,
682
+ "B2B XLAT5 -\t\t%#06x\n" ,
683
+ u .v32 );
684
+ } else {
685
+ u .v64 = ioread64 (mmio + XEON_PBAR45XLAT_OFFSET );
686
+ off += scnprintf (buf + off , buf_size - off ,
687
+ "B2B XLAT45 -\t\t%#018llx\n" ,
688
+ u .v64 );
689
+ }
659
690
660
691
u .v64 = ioread64 (mmio + XEON_PBAR23LMT_OFFSET );
661
692
off += scnprintf (buf + off , buf_size - off ,
662
693
"B2B LMT23 -\t\t%#018llx\n" , u .v64 );
663
694
664
- u .v64 = ioread64 (mmio + XEON_PBAR45LMT_OFFSET );
665
- off += scnprintf (buf + off , buf_size - off ,
666
- "B2B LMT45 -\t\t%#018llx\n" , u .v64 );
695
+ if (ndev -> bar4_split ) {
696
+ u .v32 = ioread32 (mmio + XEON_PBAR4LMT_OFFSET );
697
+ off += scnprintf (buf + off , buf_size - off ,
698
+ "B2B LMT4 -\t\t%#06x\n" ,
699
+ u .v32 );
700
+ u .v32 = ioread32 (mmio + XEON_PBAR5LMT_OFFSET );
701
+ off += scnprintf (buf + off , buf_size - off ,
702
+ "B2B LMT5 -\t\t%#06x\n" ,
703
+ u .v32 );
704
+ } else {
705
+ u .v64 = ioread64 (mmio + XEON_PBAR45LMT_OFFSET );
706
+ off += scnprintf (buf + off , buf_size - off ,
707
+ "B2B LMT45 -\t\t%#018llx\n" ,
708
+ u .v64 );
709
+ }
667
710
668
711
off += scnprintf (buf + off , buf_size - off ,
669
712
"\nNTB Secondary BAR:\n" );
@@ -676,9 +719,19 @@ static ssize_t ndev_debugfs_read(struct file *filp, char __user *ubuf,
676
719
off += scnprintf (buf + off , buf_size - off ,
677
720
"SBAR23 -\t\t%#018llx\n" , u .v64 );
678
721
679
- u .v64 = ioread64 (mmio + XEON_SBAR45BASE_OFFSET );
680
- off += scnprintf (buf + off , buf_size - off ,
681
- "SBAR45 -\t\t%#018llx\n" , u .v64 );
722
+ if (ndev -> bar4_split ) {
723
+ u .v32 = ioread32 (mmio + XEON_SBAR4BASE_OFFSET );
724
+ off += scnprintf (buf + off , buf_size - off ,
725
+ "SBAR4 -\t\t\t%#06x\n" , u .v32 );
726
+ u .v32 = ioread32 (mmio + XEON_SBAR5BASE_OFFSET );
727
+ off += scnprintf (buf + off , buf_size - off ,
728
+ "SBAR5 -\t\t\t%#06x\n" , u .v32 );
729
+ } else {
730
+ u .v64 = ioread64 (mmio + XEON_SBAR45BASE_OFFSET );
731
+ off += scnprintf (buf + off , buf_size - off ,
732
+ "SBAR45 -\t\t%#018llx\n" ,
733
+ u .v64 );
734
+ }
682
735
}
683
736
684
737
off += scnprintf (buf + off , buf_size - off ,
0 commit comments