diff options
author | Seema Khowala <seemaj@nvidia.com> | 2017-06-02 12:06:42 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-08 14:35:48 -0400 |
commit | cf33b6c26bd054f5fe09be78ed754049821a8737 (patch) | |
tree | 8d12e3a664eae06e1ffe2ede4e58a26a7c63c24c /drivers/gpu/nvgpu/include | |
parent | afa31cdd8cc6bb04faeed30b2cc30f5e6be888b5 (diff) |
gpu: nvgpu: gv11b: generated mmu fault fields/masks
Generated h/w header for mmu fault handling
JIRA GPUT19X-7
JIRA GPUT19X-12
Change-Id: I857ab6b67f6d9ac9a2c2ee982496dd0603bd010e
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master/r/1494842
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/include')
3 files changed, 113 insertions, 173 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fb_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fb_gv11b.h index e261ef14..fd5427ec 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fb_gv11b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fb_gv11b.h | |||
@@ -174,6 +174,10 @@ static inline u32 fb_mmu_invalidate_replay_start_ack_all_f(void) | |||
174 | { | 174 | { |
175 | return 0x10; | 175 | return 0x10; |
176 | } | 176 | } |
177 | static inline u32 fb_mmu_invalidate_replay_cancel_global_f(void) | ||
178 | { | ||
179 | return 0x20; | ||
180 | } | ||
177 | static inline u32 fb_mmu_invalidate_sys_membar_s(void) | 181 | static inline u32 fb_mmu_invalidate_sys_membar_s(void) |
178 | { | 182 | { |
179 | return 1; | 183 | return 1; |
@@ -742,65 +746,65 @@ static inline u32 fb_niso_intr_r(void) | |||
742 | { | 746 | { |
743 | return 0x00100a20; | 747 | return 0x00100a20; |
744 | } | 748 | } |
745 | static inline u32 fb_niso_intr_hub_access_counter_notify_f(u32 v) | 749 | static inline u32 fb_niso_intr_hub_access_counter_notify_m(void) |
746 | { | 750 | { |
747 | return (v & 0x1) << 0; | 751 | return 0x1 << 0; |
748 | } | 752 | } |
749 | static inline u32 fb_niso_intr_hub_access_counter_notify_pending_f(void) | 753 | static inline u32 fb_niso_intr_hub_access_counter_notify_pending_f(void) |
750 | { | 754 | { |
751 | return 0x1; | 755 | return 0x1; |
752 | } | 756 | } |
753 | static inline u32 fb_niso_intr_hub_access_counter_error_f(u32 v) | 757 | static inline u32 fb_niso_intr_hub_access_counter_error_m(void) |
754 | { | 758 | { |
755 | return (v & 0x1) << 1; | 759 | return 0x1 << 1; |
756 | } | 760 | } |
757 | static inline u32 fb_niso_intr_hub_access_counter_error_pending_f(void) | 761 | static inline u32 fb_niso_intr_hub_access_counter_error_pending_f(void) |
758 | { | 762 | { |
759 | return 0x2; | 763 | return 0x2; |
760 | } | 764 | } |
761 | static inline u32 fb_niso_intr_mmu_replayable_fault_notify_f(u32 v) | 765 | static inline u32 fb_niso_intr_mmu_replayable_fault_notify_m(void) |
762 | { | 766 | { |
763 | return (v & 0x1) << 27; | 767 | return 0x1 << 27; |
764 | } | 768 | } |
765 | static inline u32 fb_niso_intr_mmu_replayable_fault_notify_pending_f(void) | 769 | static inline u32 fb_niso_intr_mmu_replayable_fault_notify_pending_f(void) |
766 | { | 770 | { |
767 | return 0x8000000; | 771 | return 0x8000000; |
768 | } | 772 | } |
769 | static inline u32 fb_niso_intr_mmu_replayable_fault_overflow_f(u32 v) | 773 | static inline u32 fb_niso_intr_mmu_replayable_fault_overflow_m(void) |
770 | { | 774 | { |
771 | return (v & 0x1) << 28; | 775 | return 0x1 << 28; |
772 | } | 776 | } |
773 | static inline u32 fb_niso_intr_mmu_replayable_fault_overflow_pending_f(void) | 777 | static inline u32 fb_niso_intr_mmu_replayable_fault_overflow_pending_f(void) |
774 | { | 778 | { |
775 | return 0x10000000; | 779 | return 0x10000000; |
776 | } | 780 | } |
777 | static inline u32 fb_niso_intr_mmu_nonreplayable_fault_notify_f(u32 v) | 781 | static inline u32 fb_niso_intr_mmu_nonreplayable_fault_notify_m(void) |
778 | { | 782 | { |
779 | return (v & 0x1) << 29; | 783 | return 0x1 << 29; |
780 | } | 784 | } |
781 | static inline u32 fb_niso_intr_mmu_nonreplayable_fault_notify_pending_f(void) | 785 | static inline u32 fb_niso_intr_mmu_nonreplayable_fault_notify_pending_f(void) |
782 | { | 786 | { |
783 | return 0x20000000; | 787 | return 0x20000000; |
784 | } | 788 | } |
785 | static inline u32 fb_niso_intr_mmu_nonreplayable_fault_overflow_f(u32 v) | 789 | static inline u32 fb_niso_intr_mmu_nonreplayable_fault_overflow_m(void) |
786 | { | 790 | { |
787 | return (v & 0x1) << 30; | 791 | return 0x1 << 30; |
788 | } | 792 | } |
789 | static inline u32 fb_niso_intr_mmu_nonreplayable_fault_overflow_pending_f(void) | 793 | static inline u32 fb_niso_intr_mmu_nonreplayable_fault_overflow_pending_f(void) |
790 | { | 794 | { |
791 | return 0x40000000; | 795 | return 0x40000000; |
792 | } | 796 | } |
793 | static inline u32 fb_niso_intr_mmu_other_fault_notify_f(u32 v) | 797 | static inline u32 fb_niso_intr_mmu_other_fault_notify_m(void) |
794 | { | 798 | { |
795 | return (v & 0x1) << 31; | 799 | return 0x1 << 31; |
796 | } | 800 | } |
797 | static inline u32 fb_niso_intr_mmu_other_fault_notify_pending_f(void) | 801 | static inline u32 fb_niso_intr_mmu_other_fault_notify_pending_f(void) |
798 | { | 802 | { |
799 | return 0x80000000; | 803 | return 0x80000000; |
800 | } | 804 | } |
801 | static inline u32 fb_niso_intr_mmu_ecc_uncorrected_error_notify_f(u32 v) | 805 | static inline u32 fb_niso_intr_mmu_ecc_uncorrected_error_notify_m(void) |
802 | { | 806 | { |
803 | return (v & 0x1) << 26; | 807 | return 0x1 << 26; |
804 | } | 808 | } |
805 | static inline u32 fb_niso_intr_mmu_ecc_uncorrected_error_notify_pending_f(void) | 809 | static inline u32 fb_niso_intr_mmu_ecc_uncorrected_error_notify_pending_f(void) |
806 | { | 810 | { |
@@ -886,65 +890,65 @@ static inline u32 fb_niso_intr_en_set__size_1_v(void) | |||
886 | { | 890 | { |
887 | return 0x00000002; | 891 | return 0x00000002; |
888 | } | 892 | } |
889 | static inline u32 fb_niso_intr_en_set_hub_access_counter_notify_f(u32 v) | 893 | static inline u32 fb_niso_intr_en_set_hub_access_counter_notify_m(void) |
890 | { | 894 | { |
891 | return (v & 0x1) << 0; | 895 | return 0x1 << 0; |
892 | } | 896 | } |
893 | static inline u32 fb_niso_intr_en_set_hub_access_counter_notify_set_f(void) | 897 | static inline u32 fb_niso_intr_en_set_hub_access_counter_notify_set_f(void) |
894 | { | 898 | { |
895 | return 0x1; | 899 | return 0x1; |
896 | } | 900 | } |
897 | static inline u32 fb_niso_intr_en_set_hub_access_counter_error_f(u32 v) | 901 | static inline u32 fb_niso_intr_en_set_hub_access_counter_error_m(void) |
898 | { | 902 | { |
899 | return (v & 0x1) << 1; | 903 | return 0x1 << 1; |
900 | } | 904 | } |
901 | static inline u32 fb_niso_intr_en_set_hub_access_counter_error_set_f(void) | 905 | static inline u32 fb_niso_intr_en_set_hub_access_counter_error_set_f(void) |
902 | { | 906 | { |
903 | return 0x2; | 907 | return 0x2; |
904 | } | 908 | } |
905 | static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_notify_f(u32 v) | 909 | static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_notify_m(void) |
906 | { | 910 | { |
907 | return (v & 0x1) << 27; | 911 | return 0x1 << 27; |
908 | } | 912 | } |
909 | static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_notify_set_f(void) | 913 | static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_notify_set_f(void) |
910 | { | 914 | { |
911 | return 0x8000000; | 915 | return 0x8000000; |
912 | } | 916 | } |
913 | static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_overflow_f(u32 v) | 917 | static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_overflow_m(void) |
914 | { | 918 | { |
915 | return (v & 0x1) << 28; | 919 | return 0x1 << 28; |
916 | } | 920 | } |
917 | static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_overflow_set_f(void) | 921 | static inline u32 fb_niso_intr_en_set_mmu_replayable_fault_overflow_set_f(void) |
918 | { | 922 | { |
919 | return 0x10000000; | 923 | return 0x10000000; |
920 | } | 924 | } |
921 | static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_notify_f(u32 v) | 925 | static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_notify_m(void) |
922 | { | 926 | { |
923 | return (v & 0x1) << 29; | 927 | return 0x1 << 29; |
924 | } | 928 | } |
925 | static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_notify_set_f(void) | 929 | static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_notify_set_f(void) |
926 | { | 930 | { |
927 | return 0x20000000; | 931 | return 0x20000000; |
928 | } | 932 | } |
929 | static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_overflow_f(u32 v) | 933 | static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_overflow_m(void) |
930 | { | 934 | { |
931 | return (v & 0x1) << 30; | 935 | return 0x1 << 30; |
932 | } | 936 | } |
933 | static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_overflow_set_f(void) | 937 | static inline u32 fb_niso_intr_en_set_mmu_nonreplayable_fault_overflow_set_f(void) |
934 | { | 938 | { |
935 | return 0x40000000; | 939 | return 0x40000000; |
936 | } | 940 | } |
937 | static inline u32 fb_niso_intr_en_set_mmu_other_fault_notify_f(u32 v) | 941 | static inline u32 fb_niso_intr_en_set_mmu_other_fault_notify_m(void) |
938 | { | 942 | { |
939 | return (v & 0x1) << 31; | 943 | return 0x1 << 31; |
940 | } | 944 | } |
941 | static inline u32 fb_niso_intr_en_set_mmu_other_fault_notify_set_f(void) | 945 | static inline u32 fb_niso_intr_en_set_mmu_other_fault_notify_set_f(void) |
942 | { | 946 | { |
943 | return 0x80000000; | 947 | return 0x80000000; |
944 | } | 948 | } |
945 | static inline u32 fb_niso_intr_en_set_mmu_ecc_uncorrected_error_notify_f(u32 v) | 949 | static inline u32 fb_niso_intr_en_set_mmu_ecc_uncorrected_error_notify_m(void) |
946 | { | 950 | { |
947 | return (v & 0x1) << 26; | 951 | return 0x1 << 26; |
948 | } | 952 | } |
949 | static inline u32 fb_niso_intr_en_set_mmu_ecc_uncorrected_error_notify_set_f(void) | 953 | static inline u32 fb_niso_intr_en_set_mmu_ecc_uncorrected_error_notify_set_f(void) |
950 | { | 954 | { |
@@ -958,65 +962,65 @@ static inline u32 fb_niso_intr_en_clr__size_1_v(void) | |||
958 | { | 962 | { |
959 | return 0x00000002; | 963 | return 0x00000002; |
960 | } | 964 | } |
961 | static inline u32 fb_niso_intr_en_clr_hub_access_counter_notify_f(u32 v) | 965 | static inline u32 fb_niso_intr_en_clr_hub_access_counter_notify_m(void) |
962 | { | 966 | { |
963 | return (v & 0x1) << 0; | 967 | return 0x1 << 0; |
964 | } | 968 | } |
965 | static inline u32 fb_niso_intr_en_clr_hub_access_counter_notify_set_f(void) | 969 | static inline u32 fb_niso_intr_en_clr_hub_access_counter_notify_set_f(void) |
966 | { | 970 | { |
967 | return 0x1; | 971 | return 0x1; |
968 | } | 972 | } |
969 | static inline u32 fb_niso_intr_en_clr_hub_access_counter_error_f(u32 v) | 973 | static inline u32 fb_niso_intr_en_clr_hub_access_counter_error_m(void) |
970 | { | 974 | { |
971 | return (v & 0x1) << 1; | 975 | return 0x1 << 1; |
972 | } | 976 | } |
973 | static inline u32 fb_niso_intr_en_clr_hub_access_counter_error_set_f(void) | 977 | static inline u32 fb_niso_intr_en_clr_hub_access_counter_error_set_f(void) |
974 | { | 978 | { |
975 | return 0x2; | 979 | return 0x2; |
976 | } | 980 | } |
977 | static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_notify_f(u32 v) | 981 | static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_notify_m(void) |
978 | { | 982 | { |
979 | return (v & 0x1) << 27; | 983 | return 0x1 << 27; |
980 | } | 984 | } |
981 | static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_notify_set_f(void) | 985 | static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_notify_set_f(void) |
982 | { | 986 | { |
983 | return 0x8000000; | 987 | return 0x8000000; |
984 | } | 988 | } |
985 | static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_overflow_f(u32 v) | 989 | static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_overflow_m(void) |
986 | { | 990 | { |
987 | return (v & 0x1) << 28; | 991 | return 0x1 << 28; |
988 | } | 992 | } |
989 | static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_overflow_set_f(void) | 993 | static inline u32 fb_niso_intr_en_clr_mmu_replayable_fault_overflow_set_f(void) |
990 | { | 994 | { |
991 | return 0x10000000; | 995 | return 0x10000000; |
992 | } | 996 | } |
993 | static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_notify_f(u32 v) | 997 | static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_notify_m(void) |
994 | { | 998 | { |
995 | return (v & 0x1) << 29; | 999 | return 0x1 << 29; |
996 | } | 1000 | } |
997 | static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_notify_set_f(void) | 1001 | static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_notify_set_f(void) |
998 | { | 1002 | { |
999 | return 0x20000000; | 1003 | return 0x20000000; |
1000 | } | 1004 | } |
1001 | static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_overflow_f(u32 v) | 1005 | static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_overflow_m(void) |
1002 | { | 1006 | { |
1003 | return (v & 0x1) << 30; | 1007 | return 0x1 << 30; |
1004 | } | 1008 | } |
1005 | static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_overflow_set_f(void) | 1009 | static inline u32 fb_niso_intr_en_clr_mmu_nonreplayable_fault_overflow_set_f(void) |
1006 | { | 1010 | { |
1007 | return 0x40000000; | 1011 | return 0x40000000; |
1008 | } | 1012 | } |
1009 | static inline u32 fb_niso_intr_en_clr_mmu_other_fault_notify_f(u32 v) | 1013 | static inline u32 fb_niso_intr_en_clr_mmu_other_fault_notify_m(void) |
1010 | { | 1014 | { |
1011 | return (v & 0x1) << 31; | 1015 | return 0x1 << 31; |
1012 | } | 1016 | } |
1013 | static inline u32 fb_niso_intr_en_clr_mmu_other_fault_notify_set_f(void) | 1017 | static inline u32 fb_niso_intr_en_clr_mmu_other_fault_notify_set_f(void) |
1014 | { | 1018 | { |
1015 | return 0x80000000; | 1019 | return 0x80000000; |
1016 | } | 1020 | } |
1017 | static inline u32 fb_niso_intr_en_clr_mmu_ecc_uncorrected_error_notify_f(u32 v) | 1021 | static inline u32 fb_niso_intr_en_clr_mmu_ecc_uncorrected_error_notify_m(void) |
1018 | { | 1022 | { |
1019 | return (v & 0x1) << 26; | 1023 | return 0x1 << 26; |
1020 | } | 1024 | } |
1021 | static inline u32 fb_niso_intr_en_clr_mmu_ecc_uncorrected_error_notify_set_f(void) | 1025 | static inline u32 fb_niso_intr_en_clr_mmu_ecc_uncorrected_error_notify_set_f(void) |
1022 | { | 1026 | { |
@@ -1142,13 +1146,9 @@ static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_f(u32 v) | |||
1142 | { | 1146 | { |
1143 | return (v & 0x1) << 30; | 1147 | return (v & 0x1) << 30; |
1144 | } | 1148 | } |
1145 | static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_v(u32 r) | 1149 | static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_m(void) |
1146 | { | 1150 | { |
1147 | return (r >> 30) & 0x1; | 1151 | return 0x1 << 30; |
1148 | } | ||
1149 | static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_yes_v(void) | ||
1150 | { | ||
1151 | return 0x00000001; | ||
1152 | } | 1152 | } |
1153 | static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_clear_v(void) | 1153 | static inline u32 fb_mmu_fault_buffer_get_getptr_corrupted_clear_v(void) |
1154 | { | 1154 | { |
@@ -1162,17 +1162,9 @@ static inline u32 fb_mmu_fault_buffer_get_overflow_f(u32 v) | |||
1162 | { | 1162 | { |
1163 | return (v & 0x1) << 31; | 1163 | return (v & 0x1) << 31; |
1164 | } | 1164 | } |
1165 | static inline u32 fb_mmu_fault_buffer_get_overflow_v(u32 r) | 1165 | static inline u32 fb_mmu_fault_buffer_get_overflow_m(void) |
1166 | { | 1166 | { |
1167 | return (r >> 31) & 0x1; | 1167 | return 0x1 << 31; |
1168 | } | ||
1169 | static inline u32 fb_mmu_fault_buffer_get_overflow_yes_v(void) | ||
1170 | { | ||
1171 | return 0x00000001; | ||
1172 | } | ||
1173 | static inline u32 fb_mmu_fault_buffer_get_overflow_yes_f(void) | ||
1174 | { | ||
1175 | return 0x80000000; | ||
1176 | } | 1168 | } |
1177 | static inline u32 fb_mmu_fault_buffer_get_overflow_clear_v(void) | 1169 | static inline u32 fb_mmu_fault_buffer_get_overflow_clear_v(void) |
1178 | { | 1170 | { |
@@ -1290,6 +1282,10 @@ static inline u32 fb_mmu_fault_buffer_size_enable_f(u32 v) | |||
1290 | { | 1282 | { |
1291 | return (v & 0x1) << 31; | 1283 | return (v & 0x1) << 31; |
1292 | } | 1284 | } |
1285 | static inline u32 fb_mmu_fault_buffer_size_enable_m(void) | ||
1286 | { | ||
1287 | return 0x1 << 31; | ||
1288 | } | ||
1293 | static inline u32 fb_mmu_fault_buffer_size_enable_v(u32 r) | 1289 | static inline u32 fb_mmu_fault_buffer_size_enable_v(u32 r) |
1294 | { | 1290 | { |
1295 | return (r >> 31) & 0x1; | 1291 | return (r >> 31) & 0x1; |
@@ -1430,13 +1426,9 @@ static inline u32 fb_mmu_fault_status_r(void) | |||
1430 | { | 1426 | { |
1431 | return 0x00100e60; | 1427 | return 0x00100e60; |
1432 | } | 1428 | } |
1433 | static inline u32 fb_mmu_fault_status_dropped_bar1_phys_f(u32 v) | 1429 | static inline u32 fb_mmu_fault_status_dropped_bar1_phys_m(void) |
1434 | { | ||
1435 | return (v & 0x1) << 0; | ||
1436 | } | ||
1437 | static inline u32 fb_mmu_fault_status_dropped_bar1_phys_v(u32 r) | ||
1438 | { | 1430 | { |
1439 | return (r >> 0) & 0x1; | 1431 | return 0x1 << 0; |
1440 | } | 1432 | } |
1441 | static inline u32 fb_mmu_fault_status_dropped_bar1_phys_set_v(void) | 1433 | static inline u32 fb_mmu_fault_status_dropped_bar1_phys_set_v(void) |
1442 | { | 1434 | { |
@@ -1454,13 +1446,9 @@ static inline u32 fb_mmu_fault_status_dropped_bar1_phys_clear_f(void) | |||
1454 | { | 1446 | { |
1455 | return 0x1; | 1447 | return 0x1; |
1456 | } | 1448 | } |
1457 | static inline u32 fb_mmu_fault_status_dropped_bar1_virt_f(u32 v) | 1449 | static inline u32 fb_mmu_fault_status_dropped_bar1_virt_m(void) |
1458 | { | ||
1459 | return (v & 0x1) << 1; | ||
1460 | } | ||
1461 | static inline u32 fb_mmu_fault_status_dropped_bar1_virt_v(u32 r) | ||
1462 | { | 1450 | { |
1463 | return (r >> 1) & 0x1; | 1451 | return 0x1 << 1; |
1464 | } | 1452 | } |
1465 | static inline u32 fb_mmu_fault_status_dropped_bar1_virt_set_v(void) | 1453 | static inline u32 fb_mmu_fault_status_dropped_bar1_virt_set_v(void) |
1466 | { | 1454 | { |
@@ -1478,13 +1466,9 @@ static inline u32 fb_mmu_fault_status_dropped_bar1_virt_clear_f(void) | |||
1478 | { | 1466 | { |
1479 | return 0x2; | 1467 | return 0x2; |
1480 | } | 1468 | } |
1481 | static inline u32 fb_mmu_fault_status_dropped_bar2_phys_f(u32 v) | 1469 | static inline u32 fb_mmu_fault_status_dropped_bar2_phys_m(void) |
1482 | { | ||
1483 | return (v & 0x1) << 2; | ||
1484 | } | ||
1485 | static inline u32 fb_mmu_fault_status_dropped_bar2_phys_v(u32 r) | ||
1486 | { | 1470 | { |
1487 | return (r >> 2) & 0x1; | 1471 | return 0x1 << 2; |
1488 | } | 1472 | } |
1489 | static inline u32 fb_mmu_fault_status_dropped_bar2_phys_set_v(void) | 1473 | static inline u32 fb_mmu_fault_status_dropped_bar2_phys_set_v(void) |
1490 | { | 1474 | { |
@@ -1502,13 +1486,9 @@ static inline u32 fb_mmu_fault_status_dropped_bar2_phys_clear_f(void) | |||
1502 | { | 1486 | { |
1503 | return 0x4; | 1487 | return 0x4; |
1504 | } | 1488 | } |
1505 | static inline u32 fb_mmu_fault_status_dropped_bar2_virt_f(u32 v) | 1489 | static inline u32 fb_mmu_fault_status_dropped_bar2_virt_m(void) |
1506 | { | 1490 | { |
1507 | return (v & 0x1) << 3; | 1491 | return 0x1 << 3; |
1508 | } | ||
1509 | static inline u32 fb_mmu_fault_status_dropped_bar2_virt_v(u32 r) | ||
1510 | { | ||
1511 | return (r >> 3) & 0x1; | ||
1512 | } | 1492 | } |
1513 | static inline u32 fb_mmu_fault_status_dropped_bar2_virt_set_v(void) | 1493 | static inline u32 fb_mmu_fault_status_dropped_bar2_virt_set_v(void) |
1514 | { | 1494 | { |
@@ -1526,13 +1506,9 @@ static inline u32 fb_mmu_fault_status_dropped_bar2_virt_clear_f(void) | |||
1526 | { | 1506 | { |
1527 | return 0x8; | 1507 | return 0x8; |
1528 | } | 1508 | } |
1529 | static inline u32 fb_mmu_fault_status_dropped_ifb_phys_f(u32 v) | 1509 | static inline u32 fb_mmu_fault_status_dropped_ifb_phys_m(void) |
1530 | { | ||
1531 | return (v & 0x1) << 4; | ||
1532 | } | ||
1533 | static inline u32 fb_mmu_fault_status_dropped_ifb_phys_v(u32 r) | ||
1534 | { | 1510 | { |
1535 | return (r >> 4) & 0x1; | 1511 | return 0x1 << 4; |
1536 | } | 1512 | } |
1537 | static inline u32 fb_mmu_fault_status_dropped_ifb_phys_set_v(void) | 1513 | static inline u32 fb_mmu_fault_status_dropped_ifb_phys_set_v(void) |
1538 | { | 1514 | { |
@@ -1550,13 +1526,9 @@ static inline u32 fb_mmu_fault_status_dropped_ifb_phys_clear_f(void) | |||
1550 | { | 1526 | { |
1551 | return 0x10; | 1527 | return 0x10; |
1552 | } | 1528 | } |
1553 | static inline u32 fb_mmu_fault_status_dropped_ifb_virt_f(u32 v) | 1529 | static inline u32 fb_mmu_fault_status_dropped_ifb_virt_m(void) |
1554 | { | 1530 | { |
1555 | return (v & 0x1) << 5; | 1531 | return 0x1 << 5; |
1556 | } | ||
1557 | static inline u32 fb_mmu_fault_status_dropped_ifb_virt_v(u32 r) | ||
1558 | { | ||
1559 | return (r >> 5) & 0x1; | ||
1560 | } | 1532 | } |
1561 | static inline u32 fb_mmu_fault_status_dropped_ifb_virt_set_v(void) | 1533 | static inline u32 fb_mmu_fault_status_dropped_ifb_virt_set_v(void) |
1562 | { | 1534 | { |
@@ -1574,13 +1546,9 @@ static inline u32 fb_mmu_fault_status_dropped_ifb_virt_clear_f(void) | |||
1574 | { | 1546 | { |
1575 | return 0x20; | 1547 | return 0x20; |
1576 | } | 1548 | } |
1577 | static inline u32 fb_mmu_fault_status_dropped_other_phys_f(u32 v) | 1549 | static inline u32 fb_mmu_fault_status_dropped_other_phys_m(void) |
1578 | { | 1550 | { |
1579 | return (v & 0x1) << 6; | 1551 | return 0x1 << 6; |
1580 | } | ||
1581 | static inline u32 fb_mmu_fault_status_dropped_other_phys_v(u32 r) | ||
1582 | { | ||
1583 | return (r >> 6) & 0x1; | ||
1584 | } | 1552 | } |
1585 | static inline u32 fb_mmu_fault_status_dropped_other_phys_set_v(void) | 1553 | static inline u32 fb_mmu_fault_status_dropped_other_phys_set_v(void) |
1586 | { | 1554 | { |
@@ -1598,13 +1566,9 @@ static inline u32 fb_mmu_fault_status_dropped_other_phys_clear_f(void) | |||
1598 | { | 1566 | { |
1599 | return 0x40; | 1567 | return 0x40; |
1600 | } | 1568 | } |
1601 | static inline u32 fb_mmu_fault_status_dropped_other_virt_f(u32 v) | 1569 | static inline u32 fb_mmu_fault_status_dropped_other_virt_m(void) |
1602 | { | 1570 | { |
1603 | return (v & 0x1) << 7; | 1571 | return 0x1 << 7; |
1604 | } | ||
1605 | static inline u32 fb_mmu_fault_status_dropped_other_virt_v(u32 r) | ||
1606 | { | ||
1607 | return (r >> 7) & 0x1; | ||
1608 | } | 1572 | } |
1609 | static inline u32 fb_mmu_fault_status_dropped_other_virt_set_v(void) | 1573 | static inline u32 fb_mmu_fault_status_dropped_other_virt_set_v(void) |
1610 | { | 1574 | { |
@@ -1622,13 +1586,9 @@ static inline u32 fb_mmu_fault_status_dropped_other_virt_clear_f(void) | |||
1622 | { | 1586 | { |
1623 | return 0x80; | 1587 | return 0x80; |
1624 | } | 1588 | } |
1625 | static inline u32 fb_mmu_fault_status_replayable_f(u32 v) | 1589 | static inline u32 fb_mmu_fault_status_replayable_m(void) |
1626 | { | 1590 | { |
1627 | return (v & 0x1) << 8; | 1591 | return 0x1 << 8; |
1628 | } | ||
1629 | static inline u32 fb_mmu_fault_status_replayable_v(u32 r) | ||
1630 | { | ||
1631 | return (r >> 8) & 0x1; | ||
1632 | } | 1592 | } |
1633 | static inline u32 fb_mmu_fault_status_replayable_set_v(void) | 1593 | static inline u32 fb_mmu_fault_status_replayable_set_v(void) |
1634 | { | 1594 | { |
@@ -1642,13 +1602,9 @@ static inline u32 fb_mmu_fault_status_replayable_reset_f(void) | |||
1642 | { | 1602 | { |
1643 | return 0x0; | 1603 | return 0x0; |
1644 | } | 1604 | } |
1645 | static inline u32 fb_mmu_fault_status_non_replayable_f(u32 v) | 1605 | static inline u32 fb_mmu_fault_status_non_replayable_m(void) |
1646 | { | ||
1647 | return (v & 0x1) << 9; | ||
1648 | } | ||
1649 | static inline u32 fb_mmu_fault_status_non_replayable_v(u32 r) | ||
1650 | { | 1606 | { |
1651 | return (r >> 9) & 0x1; | 1607 | return 0x1 << 9; |
1652 | } | 1608 | } |
1653 | static inline u32 fb_mmu_fault_status_non_replayable_set_v(void) | 1609 | static inline u32 fb_mmu_fault_status_non_replayable_set_v(void) |
1654 | { | 1610 | { |
@@ -1662,13 +1618,9 @@ static inline u32 fb_mmu_fault_status_non_replayable_reset_f(void) | |||
1662 | { | 1618 | { |
1663 | return 0x0; | 1619 | return 0x0; |
1664 | } | 1620 | } |
1665 | static inline u32 fb_mmu_fault_status_replayable_error_f(u32 v) | 1621 | static inline u32 fb_mmu_fault_status_replayable_error_m(void) |
1666 | { | 1622 | { |
1667 | return (v & 0x1) << 10; | 1623 | return 0x1 << 10; |
1668 | } | ||
1669 | static inline u32 fb_mmu_fault_status_replayable_error_v(u32 r) | ||
1670 | { | ||
1671 | return (r >> 10) & 0x1; | ||
1672 | } | 1624 | } |
1673 | static inline u32 fb_mmu_fault_status_replayable_error_set_v(void) | 1625 | static inline u32 fb_mmu_fault_status_replayable_error_set_v(void) |
1674 | { | 1626 | { |
@@ -1682,13 +1634,9 @@ static inline u32 fb_mmu_fault_status_replayable_error_reset_f(void) | |||
1682 | { | 1634 | { |
1683 | return 0x0; | 1635 | return 0x0; |
1684 | } | 1636 | } |
1685 | static inline u32 fb_mmu_fault_status_non_replayable_error_f(u32 v) | 1637 | static inline u32 fb_mmu_fault_status_non_replayable_error_m(void) |
1686 | { | ||
1687 | return (v & 0x1) << 11; | ||
1688 | } | ||
1689 | static inline u32 fb_mmu_fault_status_non_replayable_error_v(u32 r) | ||
1690 | { | 1638 | { |
1691 | return (r >> 11) & 0x1; | 1639 | return 0x1 << 11; |
1692 | } | 1640 | } |
1693 | static inline u32 fb_mmu_fault_status_non_replayable_error_set_v(void) | 1641 | static inline u32 fb_mmu_fault_status_non_replayable_error_set_v(void) |
1694 | { | 1642 | { |
@@ -1702,13 +1650,9 @@ static inline u32 fb_mmu_fault_status_non_replayable_error_reset_f(void) | |||
1702 | { | 1650 | { |
1703 | return 0x0; | 1651 | return 0x0; |
1704 | } | 1652 | } |
1705 | static inline u32 fb_mmu_fault_status_replayable_overflow_f(u32 v) | 1653 | static inline u32 fb_mmu_fault_status_replayable_overflow_m(void) |
1706 | { | ||
1707 | return (v & 0x1) << 12; | ||
1708 | } | ||
1709 | static inline u32 fb_mmu_fault_status_replayable_overflow_v(u32 r) | ||
1710 | { | 1654 | { |
1711 | return (r >> 12) & 0x1; | 1655 | return 0x1 << 12; |
1712 | } | 1656 | } |
1713 | static inline u32 fb_mmu_fault_status_replayable_overflow_set_v(void) | 1657 | static inline u32 fb_mmu_fault_status_replayable_overflow_set_v(void) |
1714 | { | 1658 | { |
@@ -1722,13 +1666,9 @@ static inline u32 fb_mmu_fault_status_replayable_overflow_reset_f(void) | |||
1722 | { | 1666 | { |
1723 | return 0x0; | 1667 | return 0x0; |
1724 | } | 1668 | } |
1725 | static inline u32 fb_mmu_fault_status_non_replayable_overflow_f(u32 v) | 1669 | static inline u32 fb_mmu_fault_status_non_replayable_overflow_m(void) |
1726 | { | 1670 | { |
1727 | return (v & 0x1) << 13; | 1671 | return 0x1 << 13; |
1728 | } | ||
1729 | static inline u32 fb_mmu_fault_status_non_replayable_overflow_v(u32 r) | ||
1730 | { | ||
1731 | return (r >> 13) & 0x1; | ||
1732 | } | 1672 | } |
1733 | static inline u32 fb_mmu_fault_status_non_replayable_overflow_set_v(void) | 1673 | static inline u32 fb_mmu_fault_status_non_replayable_overflow_set_v(void) |
1734 | { | 1674 | { |
@@ -1742,13 +1682,9 @@ static inline u32 fb_mmu_fault_status_non_replayable_overflow_reset_f(void) | |||
1742 | { | 1682 | { |
1743 | return 0x0; | 1683 | return 0x0; |
1744 | } | 1684 | } |
1745 | static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_f(u32 v) | 1685 | static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_m(void) |
1746 | { | 1686 | { |
1747 | return (v & 0x1) << 14; | 1687 | return 0x1 << 14; |
1748 | } | ||
1749 | static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_v(u32 r) | ||
1750 | { | ||
1751 | return (r >> 14) & 0x1; | ||
1752 | } | 1688 | } |
1753 | static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_set_v(void) | 1689 | static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_set_v(void) |
1754 | { | 1690 | { |
@@ -1758,13 +1694,9 @@ static inline u32 fb_mmu_fault_status_replayable_getptr_corrupted_set_f(void) | |||
1758 | { | 1694 | { |
1759 | return 0x4000; | 1695 | return 0x4000; |
1760 | } | 1696 | } |
1761 | static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_f(u32 v) | 1697 | static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_m(void) |
1762 | { | ||
1763 | return (v & 0x1) << 15; | ||
1764 | } | ||
1765 | static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_v(u32 r) | ||
1766 | { | 1698 | { |
1767 | return (r >> 15) & 0x1; | 1699 | return 0x1 << 15; |
1768 | } | 1700 | } |
1769 | static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_set_v(void) | 1701 | static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_set_v(void) |
1770 | { | 1702 | { |
@@ -1774,13 +1706,9 @@ static inline u32 fb_mmu_fault_status_non_replayable_getptr_corrupted_set_f(void | |||
1774 | { | 1706 | { |
1775 | return 0x8000; | 1707 | return 0x8000; |
1776 | } | 1708 | } |
1777 | static inline u32 fb_mmu_fault_status_busy_f(u32 v) | 1709 | static inline u32 fb_mmu_fault_status_busy_m(void) |
1778 | { | 1710 | { |
1779 | return (v & 0x1) << 30; | 1711 | return 0x1 << 30; |
1780 | } | ||
1781 | static inline u32 fb_mmu_fault_status_busy_v(u32 r) | ||
1782 | { | ||
1783 | return (r >> 30) & 0x1; | ||
1784 | } | 1712 | } |
1785 | static inline u32 fb_mmu_fault_status_busy_true_v(void) | 1713 | static inline u32 fb_mmu_fault_status_busy_true_v(void) |
1786 | { | 1714 | { |
@@ -1790,13 +1718,9 @@ static inline u32 fb_mmu_fault_status_busy_true_f(void) | |||
1790 | { | 1718 | { |
1791 | return 0x40000000; | 1719 | return 0x40000000; |
1792 | } | 1720 | } |
1793 | static inline u32 fb_mmu_fault_status_valid_f(u32 v) | 1721 | static inline u32 fb_mmu_fault_status_valid_m(void) |
1794 | { | ||
1795 | return (v & 0x1) << 31; | ||
1796 | } | ||
1797 | static inline u32 fb_mmu_fault_status_valid_v(u32 r) | ||
1798 | { | 1722 | { |
1799 | return (r >> 31) & 0x1; | 1723 | return 0x1 << 31; |
1800 | } | 1724 | } |
1801 | static inline u32 fb_mmu_fault_status_valid_set_v(void) | 1725 | static inline u32 fb_mmu_fault_status_valid_set_v(void) |
1802 | { | 1726 | { |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gmmu_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gmmu_gv11b.h index 22ad23bc..383f7773 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gmmu_gv11b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gmmu_gv11b.h | |||
@@ -1274,6 +1274,10 @@ static inline u32 gmmu_fault_mmu_eng_id_physical_v(void) | |||
1274 | { | 1274 | { |
1275 | return 0x0000001f; | 1275 | return 0x0000001f; |
1276 | } | 1276 | } |
1277 | static inline u32 gmmu_fault_mmu_eng_id_ce0_v(void) | ||
1278 | { | ||
1279 | return 0x0000000f; | ||
1280 | } | ||
1277 | static inline u32 gmmu_fault_buf_size_v(void) | 1281 | static inline u32 gmmu_fault_buf_size_v(void) |
1278 | { | 1282 | { |
1279 | return 0x00000020; | 1283 | return 0x00000020; |
@@ -1458,6 +1462,10 @@ static inline u32 gmmu_fault_buf_entry_replayable_fault_en_true_f(void) | |||
1458 | { | 1462 | { |
1459 | return 0x40000000; | 1463 | return 0x40000000; |
1460 | } | 1464 | } |
1465 | static inline u32 gmmu_fault_buf_entry_valid_m(void) | ||
1466 | { | ||
1467 | return 0x1 << 31; | ||
1468 | } | ||
1461 | static inline u32 gmmu_fault_buf_entry_valid_v(u32 r) | 1469 | static inline u32 gmmu_fault_buf_entry_valid_v(u32 r) |
1462 | { | 1470 | { |
1463 | return (r >> 31) & 0x1; | 1471 | return (r >> 31) & 0x1; |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_top_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_top_gv11b.h index 2e2ff6ba..dbfc99b9 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_top_gv11b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_top_gv11b.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -94,6 +94,14 @@ static inline u32 top_num_ltcs_r(void) | |||
94 | { | 94 | { |
95 | return 0x00022454; | 95 | return 0x00022454; |
96 | } | 96 | } |
97 | static inline u32 top_num_ces_r(void) | ||
98 | { | ||
99 | return 0x00022444; | ||
100 | } | ||
101 | static inline u32 top_num_ces_value_v(u32 r) | ||
102 | { | ||
103 | return (r >> 0) & 0x1f; | ||
104 | } | ||
97 | static inline u32 top_device_info_r(u32 i) | 105 | static inline u32 top_device_info_r(u32 i) |
98 | { | 106 | { |
99 | return 0x00022700 + i*4; | 107 | return 0x00022700 + i*4; |