aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/4level-fixup.h2
-rw-r--r--include/asm-generic/5level-fixup.h2
-rw-r--r--include/asm-generic/pgtable-nop4d-hack.h2
-rw-r--r--include/asm-generic/pgtable-nop4d.h2
-rw-r--r--include/asm-generic/pgtable-nopmd.h2
-rw-r--r--include/asm-generic/pgtable-nopud.h2
-rw-r--r--include/asm-generic/pgtable.h16
-rw-r--r--include/drm/drmP.h1
-rw-r--r--include/drm/drm_connector.h20
-rw-r--r--include/drm/drm_dp_helper.h95
-rw-r--r--include/drm/drm_global.h53
-rw-r--r--include/drm/drm_hdcp.h212
-rw-r--r--include/drm/gpu_scheduler.h5
-rw-r--r--include/drm/i915_pciids.h21
-rw-r--r--include/drm/ttm/ttm_bo_driver.h23
-rw-r--r--include/drm/ttm/ttm_memory.h4
-rw-r--r--include/linux/ceph/ceph_features.h8
-rw-r--r--include/linux/compiler-gcc.h12
-rw-r--r--include/linux/compiler.h2
-rw-r--r--include/linux/compiler_attributes.h14
-rw-r--r--include/linux/compiler_types.h4
-rw-r--r--include/linux/efi.h7
-rw-r--r--include/linux/hid.h4
-rw-r--r--include/linux/i8253.h1
-rw-r--r--include/linux/mm.h8
-rw-r--r--include/linux/mtd/nand.h7
-rw-r--r--include/linux/netdevice.h20
-rw-r--r--include/linux/netfilter/ipset/ip_set.h2
-rw-r--r--include/linux/netfilter/ipset/ip_set_comment.h4
-rw-r--r--include/linux/nmi.h2
-rw-r--r--include/linux/swap.h4
-rw-r--r--include/net/addrconf.h2
-rw-r--r--include/net/if_inet6.h2
-rw-r--r--include/net/netfilter/nf_conntrack_l4proto.h39
-rw-r--r--include/trace/events/kyber.h8
-rw-r--r--include/uapi/drm/amdgpu_drm.h6
-rw-r--r--include/uapi/drm/i915_drm.h8
-rw-r--r--include/uapi/linux/kfd_ioctl.h18
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h4
-rw-r--r--include/uapi/linux/netfilter_bridge.h4
-rw-r--r--include/uapi/linux/sctp.h3
-rw-r--r--include/xen/xen-ops.h12
42 files changed, 524 insertions, 143 deletions
diff --git a/include/asm-generic/4level-fixup.h b/include/asm-generic/4level-fixup.h
index 89f3b03b1445..e3667c9a33a5 100644
--- a/include/asm-generic/4level-fixup.h
+++ b/include/asm-generic/4level-fixup.h
@@ -3,7 +3,7 @@
3#define _4LEVEL_FIXUP_H 3#define _4LEVEL_FIXUP_H
4 4
5#define __ARCH_HAS_4LEVEL_HACK 5#define __ARCH_HAS_4LEVEL_HACK
6#define __PAGETABLE_PUD_FOLDED 6#define __PAGETABLE_PUD_FOLDED 1
7 7
8#define PUD_SHIFT PGDIR_SHIFT 8#define PUD_SHIFT PGDIR_SHIFT
9#define PUD_SIZE PGDIR_SIZE 9#define PUD_SIZE PGDIR_SIZE
diff --git a/include/asm-generic/5level-fixup.h b/include/asm-generic/5level-fixup.h
index 9c2e0708eb82..73474bb52344 100644
--- a/include/asm-generic/5level-fixup.h
+++ b/include/asm-generic/5level-fixup.h
@@ -3,7 +3,7 @@
3#define _5LEVEL_FIXUP_H 3#define _5LEVEL_FIXUP_H
4 4
5#define __ARCH_HAS_5LEVEL_HACK 5#define __ARCH_HAS_5LEVEL_HACK
6#define __PAGETABLE_P4D_FOLDED 6#define __PAGETABLE_P4D_FOLDED 1
7 7
8#define P4D_SHIFT PGDIR_SHIFT 8#define P4D_SHIFT PGDIR_SHIFT
9#define P4D_SIZE PGDIR_SIZE 9#define P4D_SIZE PGDIR_SIZE
diff --git a/include/asm-generic/pgtable-nop4d-hack.h b/include/asm-generic/pgtable-nop4d-hack.h
index 0c34215263b8..1d6dd38c0e5e 100644
--- a/include/asm-generic/pgtable-nop4d-hack.h
+++ b/include/asm-generic/pgtable-nop4d-hack.h
@@ -5,7 +5,7 @@
5#ifndef __ASSEMBLY__ 5#ifndef __ASSEMBLY__
6#include <asm-generic/5level-fixup.h> 6#include <asm-generic/5level-fixup.h>
7 7
8#define __PAGETABLE_PUD_FOLDED 8#define __PAGETABLE_PUD_FOLDED 1
9 9
10/* 10/*
11 * Having the pud type consist of a pgd gets the size right, and allows 11 * Having the pud type consist of a pgd gets the size right, and allows
diff --git a/include/asm-generic/pgtable-nop4d.h b/include/asm-generic/pgtable-nop4d.h
index 1a29b2a0282b..04cb913797bc 100644
--- a/include/asm-generic/pgtable-nop4d.h
+++ b/include/asm-generic/pgtable-nop4d.h
@@ -4,7 +4,7 @@
4 4
5#ifndef __ASSEMBLY__ 5#ifndef __ASSEMBLY__
6 6
7#define __PAGETABLE_P4D_FOLDED 7#define __PAGETABLE_P4D_FOLDED 1
8 8
9typedef struct { pgd_t pgd; } p4d_t; 9typedef struct { pgd_t pgd; } p4d_t;
10 10
diff --git a/include/asm-generic/pgtable-nopmd.h b/include/asm-generic/pgtable-nopmd.h
index f35f6e8149e4..b85b8271a73d 100644
--- a/include/asm-generic/pgtable-nopmd.h
+++ b/include/asm-generic/pgtable-nopmd.h
@@ -8,7 +8,7 @@
8 8
9struct mm_struct; 9struct mm_struct;
10 10
11#define __PAGETABLE_PMD_FOLDED 11#define __PAGETABLE_PMD_FOLDED 1
12 12
13/* 13/*
14 * Having the pmd type consist of a pud gets the size right, and allows 14 * Having the pmd type consist of a pud gets the size right, and allows
diff --git a/include/asm-generic/pgtable-nopud.h b/include/asm-generic/pgtable-nopud.h
index e950b9c50f34..9bef475db6fe 100644
--- a/include/asm-generic/pgtable-nopud.h
+++ b/include/asm-generic/pgtable-nopud.h
@@ -9,7 +9,7 @@
9#else 9#else
10#include <asm-generic/pgtable-nop4d.h> 10#include <asm-generic/pgtable-nop4d.h>
11 11
12#define __PAGETABLE_PUD_FOLDED 12#define __PAGETABLE_PUD_FOLDED 1
13 13
14/* 14/*
15 * Having the pud type consist of a p4d gets the size right, and allows 15 * Having the pud type consist of a p4d gets the size right, and allows
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 5657a20e0c59..359fb935ded6 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -1127,4 +1127,20 @@ static inline bool arch_has_pfn_modify_check(void)
1127#endif 1127#endif
1128#endif 1128#endif
1129 1129
1130/*
1131 * On some architectures it depends on the mm if the p4d/pud or pmd
1132 * layer of the page table hierarchy is folded or not.
1133 */
1134#ifndef mm_p4d_folded
1135#define mm_p4d_folded(mm) __is_defined(__PAGETABLE_P4D_FOLDED)
1136#endif
1137
1138#ifndef mm_pud_folded
1139#define mm_pud_folded(mm) __is_defined(__PAGETABLE_PUD_FOLDED)
1140#endif
1141
1142#ifndef mm_pmd_folded
1143#define mm_pmd_folded(mm) __is_defined(__PAGETABLE_PMD_FOLDED)
1144#endif
1145
1130#endif /* _ASM_GENERIC_PGTABLE_H */ 1146#endif /* _ASM_GENERIC_PGTABLE_H */
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 514beb2d483a..bdb0d5548f39 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -68,7 +68,6 @@
68#include <drm/drm_agpsupport.h> 68#include <drm/drm_agpsupport.h>
69#include <drm/drm_crtc.h> 69#include <drm/drm_crtc.h>
70#include <drm/drm_fourcc.h> 70#include <drm/drm_fourcc.h>
71#include <drm/drm_global.h>
72#include <drm/drm_hashtab.h> 71#include <drm/drm_hashtab.h>
73#include <drm/drm_mm.h> 72#include <drm/drm_mm.h>
74#include <drm/drm_os_linux.h> 73#include <drm/drm_os_linux.h>
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 2f38d3598eb4..665b9cae7f43 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -508,6 +508,18 @@ struct drm_connector_state {
508 * drm_writeback_signal_completion() 508 * drm_writeback_signal_completion()
509 */ 509 */
510 struct drm_writeback_job *writeback_job; 510 struct drm_writeback_job *writeback_job;
511
512 /**
513 * @max_requested_bpc: Connector property to limit the maximum bit
514 * depth of the pixels.
515 */
516 u8 max_requested_bpc;
517
518 /**
519 * @max_bpc: Connector max_bpc based on the requested max_bpc property
520 * and the connector bpc limitations obtained from edid.
521 */
522 u8 max_bpc;
511}; 523};
512 524
513/** 525/**
@@ -973,6 +985,12 @@ struct drm_connector {
973 */ 985 */
974 struct drm_property_blob *path_blob_ptr; 986 struct drm_property_blob *path_blob_ptr;
975 987
988 /**
989 * @max_bpc_property: Default connector property for the max bpc to be
990 * driven out of the connector.
991 */
992 struct drm_property *max_bpc_property;
993
976#define DRM_CONNECTOR_POLL_HPD (1 << 0) 994#define DRM_CONNECTOR_POLL_HPD (1 << 0)
977#define DRM_CONNECTOR_POLL_CONNECT (1 << 1) 995#define DRM_CONNECTOR_POLL_CONNECT (1 << 1)
978#define DRM_CONNECTOR_POLL_DISCONNECT (1 << 2) 996#define DRM_CONNECTOR_POLL_DISCONNECT (1 << 2)
@@ -1245,6 +1263,8 @@ void drm_connector_set_link_status_property(struct drm_connector *connector,
1245 uint64_t link_status); 1263 uint64_t link_status);
1246int drm_connector_init_panel_orientation_property( 1264int drm_connector_init_panel_orientation_property(
1247 struct drm_connector *connector, int width, int height); 1265 struct drm_connector *connector, int width, int height);
1266int drm_connector_attach_max_bpc_property(struct drm_connector *connector,
1267 int min, int max);
1248 1268
1249/** 1269/**
1250 * struct drm_tile_group - Tile group metadata 1270 * struct drm_tile_group - Tile group metadata
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 9ad98e8d9ede..3314e91f6eb3 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -231,6 +231,8 @@
231#define DP_DSC_MAX_BITS_PER_PIXEL_LOW 0x067 /* eDP 1.4 */ 231#define DP_DSC_MAX_BITS_PER_PIXEL_LOW 0x067 /* eDP 1.4 */
232 232
233#define DP_DSC_MAX_BITS_PER_PIXEL_HI 0x068 /* eDP 1.4 */ 233#define DP_DSC_MAX_BITS_PER_PIXEL_HI 0x068 /* eDP 1.4 */
234# define DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK (0x3 << 0)
235# define DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT 8
234 236
235#define DP_DSC_DEC_COLOR_FORMAT_CAP 0x069 237#define DP_DSC_DEC_COLOR_FORMAT_CAP 0x069
236# define DP_DSC_RGB (1 << 0) 238# define DP_DSC_RGB (1 << 0)
@@ -279,6 +281,8 @@
279# define DP_DSC_THROUGHPUT_MODE_1_1000 (14 << 4) 281# define DP_DSC_THROUGHPUT_MODE_1_1000 (14 << 4)
280 282
281#define DP_DSC_MAX_SLICE_WIDTH 0x06C 283#define DP_DSC_MAX_SLICE_WIDTH 0x06C
284#define DP_DSC_MIN_SLICE_WIDTH_VALUE 2560
285#define DP_DSC_SLICE_WIDTH_MULTIPLIER 320
282 286
283#define DP_DSC_SLICE_CAP_2 0x06D 287#define DP_DSC_SLICE_CAP_2 0x06D
284# define DP_DSC_16_PER_DP_DSC_SINK (1 << 0) 288# define DP_DSC_16_PER_DP_DSC_SINK (1 << 0)
@@ -477,6 +481,7 @@
477# define DP_AUX_FRAME_SYNC_VALID (1 << 0) 481# define DP_AUX_FRAME_SYNC_VALID (1 << 0)
478 482
479#define DP_DSC_ENABLE 0x160 /* DP 1.4 */ 483#define DP_DSC_ENABLE 0x160 /* DP 1.4 */
484# define DP_DECOMPRESSION_EN (1 << 0)
480 485
481#define DP_PSR_EN_CFG 0x170 /* XXX 1.2? */ 486#define DP_PSR_EN_CFG 0x170 /* XXX 1.2? */
482# define DP_PSR_ENABLE (1 << 0) 487# define DP_PSR_ENABLE (1 << 0)
@@ -907,6 +912,57 @@
907#define DP_AUX_HDCP_KSV_FIFO 0x6802C 912#define DP_AUX_HDCP_KSV_FIFO 0x6802C
908#define DP_AUX_HDCP_AINFO 0x6803B 913#define DP_AUX_HDCP_AINFO 0x6803B
909 914
915/* DP HDCP2.2 parameter offsets in DPCD address space */
916#define DP_HDCP_2_2_REG_RTX_OFFSET 0x69000
917#define DP_HDCP_2_2_REG_TXCAPS_OFFSET 0x69008
918#define DP_HDCP_2_2_REG_CERT_RX_OFFSET 0x6900B
919#define DP_HDCP_2_2_REG_RRX_OFFSET 0x69215
920#define DP_HDCP_2_2_REG_RX_CAPS_OFFSET 0x6921D
921#define DP_HDCP_2_2_REG_EKPUB_KM_OFFSET 0x69220
922#define DP_HDCP_2_2_REG_EKH_KM_WR_OFFSET 0x692A0
923#define DP_HDCP_2_2_REG_M_OFFSET 0x692B0
924#define DP_HDCP_2_2_REG_HPRIME_OFFSET 0x692C0
925#define DP_HDCP_2_2_REG_EKH_KM_RD_OFFSET 0x692E0
926#define DP_HDCP_2_2_REG_RN_OFFSET 0x692F0
927#define DP_HDCP_2_2_REG_LPRIME_OFFSET 0x692F8
928#define DP_HDCP_2_2_REG_EDKEY_KS_OFFSET 0x69318
929#define DP_HDCP_2_2_REG_RIV_OFFSET 0x69328
930#define DP_HDCP_2_2_REG_RXINFO_OFFSET 0x69330
931#define DP_HDCP_2_2_REG_SEQ_NUM_V_OFFSET 0x69332
932#define DP_HDCP_2_2_REG_VPRIME_OFFSET 0x69335
933#define DP_HDCP_2_2_REG_RECV_ID_LIST_OFFSET 0x69345
934#define DP_HDCP_2_2_REG_V_OFFSET 0x693E0
935#define DP_HDCP_2_2_REG_SEQ_NUM_M_OFFSET 0x693F0
936#define DP_HDCP_2_2_REG_K_OFFSET 0x693F3
937#define DP_HDCP_2_2_REG_STREAM_ID_TYPE_OFFSET 0x693F5
938#define DP_HDCP_2_2_REG_MPRIME_OFFSET 0x69473
939#define DP_HDCP_2_2_REG_RXSTATUS_OFFSET 0x69493
940#define DP_HDCP_2_2_REG_STREAM_TYPE_OFFSET 0x69494
941#define DP_HDCP_2_2_REG_DBG_OFFSET 0x69518
942
943/* DP HDCP message start offsets in DPCD address space */
944#define DP_HDCP_2_2_AKE_INIT_OFFSET DP_HDCP_2_2_REG_RTX_OFFSET
945#define DP_HDCP_2_2_AKE_SEND_CERT_OFFSET DP_HDCP_2_2_REG_CERT_RX_OFFSET
946#define DP_HDCP_2_2_AKE_NO_STORED_KM_OFFSET DP_HDCP_2_2_REG_EKPUB_KM_OFFSET
947#define DP_HDCP_2_2_AKE_STORED_KM_OFFSET DP_HDCP_2_2_REG_EKH_KM_WR_OFFSET
948#define DP_HDCP_2_2_AKE_SEND_HPRIME_OFFSET DP_HDCP_2_2_REG_HPRIME_OFFSET
949#define DP_HDCP_2_2_AKE_SEND_PAIRING_INFO_OFFSET \
950 DP_HDCP_2_2_REG_EKH_KM_RD_OFFSET
951#define DP_HDCP_2_2_LC_INIT_OFFSET DP_HDCP_2_2_REG_RN_OFFSET
952#define DP_HDCP_2_2_LC_SEND_LPRIME_OFFSET DP_HDCP_2_2_REG_LPRIME_OFFSET
953#define DP_HDCP_2_2_SKE_SEND_EKS_OFFSET DP_HDCP_2_2_REG_EDKEY_KS_OFFSET
954#define DP_HDCP_2_2_REP_SEND_RECVID_LIST_OFFSET DP_HDCP_2_2_REG_RXINFO_OFFSET
955#define DP_HDCP_2_2_REP_SEND_ACK_OFFSET DP_HDCP_2_2_REG_V_OFFSET
956#define DP_HDCP_2_2_REP_STREAM_MANAGE_OFFSET DP_HDCP_2_2_REG_SEQ_NUM_M_OFFSET
957#define DP_HDCP_2_2_REP_STREAM_READY_OFFSET DP_HDCP_2_2_REG_MPRIME_OFFSET
958
959#define HDCP_2_2_DP_RXSTATUS_LEN 1
960#define HDCP_2_2_DP_RXSTATUS_READY(x) ((x) & BIT(0))
961#define HDCP_2_2_DP_RXSTATUS_H_PRIME(x) ((x) & BIT(1))
962#define HDCP_2_2_DP_RXSTATUS_PAIRING(x) ((x) & BIT(2))
963#define HDCP_2_2_DP_RXSTATUS_REAUTH_REQ(x) ((x) & BIT(3))
964#define HDCP_2_2_DP_RXSTATUS_LINK_FAILED(x) ((x) & BIT(4))
965
910/* DP 1.2 Sideband message defines */ 966/* DP 1.2 Sideband message defines */
911/* peer device type - DP 1.2a Table 2-92 */ 967/* peer device type - DP 1.2a Table 2-92 */
912#define DP_PEER_DEVICE_NONE 0x0 968#define DP_PEER_DEVICE_NONE 0x0
@@ -965,6 +1021,7 @@ u8 drm_dp_get_adjust_request_pre_emphasis(const u8 link_status[DP_LINK_STATUS_SI
965 1021
966#define DP_BRANCH_OUI_HEADER_SIZE 0xc 1022#define DP_BRANCH_OUI_HEADER_SIZE 0xc
967#define DP_RECEIVER_CAP_SIZE 0xf 1023#define DP_RECEIVER_CAP_SIZE 0xf
1024#define DP_DSC_RECEIVER_CAP_SIZE 0xf
968#define EDP_PSR_RECEIVER_CAP_SIZE 2 1025#define EDP_PSR_RECEIVER_CAP_SIZE 2
969#define EDP_DISPLAY_CTL_CAP_SIZE 3 1026#define EDP_DISPLAY_CTL_CAP_SIZE 3
970 1027
@@ -995,6 +1052,7 @@ struct dp_sdp_header {
995 1052
996#define EDP_SDP_HEADER_REVISION_MASK 0x1F 1053#define EDP_SDP_HEADER_REVISION_MASK 0x1F
997#define EDP_SDP_HEADER_VALID_PAYLOAD_BYTES 0x1F 1054#define EDP_SDP_HEADER_VALID_PAYLOAD_BYTES 0x1F
1055#define DP_SDP_PPS_HEADER_PAYLOAD_BYTES_MINUS_1 0x7F
998 1056
999struct edp_vsc_psr { 1057struct edp_vsc_psr {
1000 struct dp_sdp_header sdp_header; 1058 struct dp_sdp_header sdp_header;
@@ -1061,6 +1119,43 @@ drm_dp_is_branch(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
1061 return dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT; 1119 return dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_PRESENT;
1062} 1120}
1063 1121
1122/* DP/eDP DSC support */
1123u8 drm_dp_dsc_sink_max_slice_count(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
1124 bool is_edp);
1125u8 drm_dp_dsc_sink_line_buf_depth(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE]);
1126u8 drm_dp_dsc_sink_max_color_depth(const u8 dsc_dpc[DP_DSC_RECEIVER_CAP_SIZE]);
1127
1128static inline bool
1129drm_dp_sink_supports_dsc(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
1130{
1131 return dsc_dpcd[DP_DSC_SUPPORT - DP_DSC_SUPPORT] &
1132 DP_DSC_DECOMPRESSION_IS_SUPPORTED;
1133}
1134
1135static inline u16
1136drm_edp_dsc_sink_output_bpp(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
1137{
1138 return dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_LOW - DP_DSC_SUPPORT] |
1139 (dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI - DP_DSC_SUPPORT] &
1140 DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK <<
1141 DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT);
1142}
1143
1144static inline u32
1145drm_dp_dsc_sink_max_slice_width(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
1146{
1147 /* Max Slicewidth = Number of Pixels * 320 */
1148 return dsc_dpcd[DP_DSC_MAX_SLICE_WIDTH - DP_DSC_SUPPORT] *
1149 DP_DSC_SLICE_WIDTH_MULTIPLIER;
1150}
1151
1152/* Forward Error Correction Support on DP 1.4 */
1153static inline bool
1154drm_dp_sink_supports_fec(const u8 fec_capable)
1155{
1156 return fec_capable & DP_FEC_CAPABLE;
1157}
1158
1064/* 1159/*
1065 * DisplayPort AUX channel 1160 * DisplayPort AUX channel
1066 */ 1161 */
diff --git a/include/drm/drm_global.h b/include/drm/drm_global.h
deleted file mode 100644
index 3a830602a2e4..000000000000
--- a/include/drm/drm_global.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/**************************************************************************
2 *
3 * Copyright 2008-2009 VMware, Inc., Palo Alto, CA., USA
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
16 * of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
21 * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
22 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
23 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
24 * USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 **************************************************************************/
27/*
28 * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
29 */
30
31#ifndef _DRM_GLOBAL_H_
32#define _DRM_GLOBAL_H_
33enum drm_global_types {
34 DRM_GLOBAL_TTM_MEM = 0,
35 DRM_GLOBAL_TTM_BO,
36 DRM_GLOBAL_TTM_OBJECT,
37 DRM_GLOBAL_NUM
38};
39
40struct drm_global_reference {
41 enum drm_global_types global_type;
42 size_t size;
43 void *object;
44 int (*init) (struct drm_global_reference *);
45 void (*release) (struct drm_global_reference *);
46};
47
48void drm_global_init(void);
49void drm_global_release(void);
50int drm_global_item_ref(struct drm_global_reference *ref);
51void drm_global_item_unref(struct drm_global_reference *ref);
52
53#endif
diff --git a/include/drm/drm_hdcp.h b/include/drm/drm_hdcp.h
index 98e63d870139..a6de09c5e47f 100644
--- a/include/drm/drm_hdcp.h
+++ b/include/drm/drm_hdcp.h
@@ -38,4 +38,216 @@
38#define DRM_HDCP_DDC_BSTATUS 0x41 38#define DRM_HDCP_DDC_BSTATUS 0x41
39#define DRM_HDCP_DDC_KSV_FIFO 0x43 39#define DRM_HDCP_DDC_KSV_FIFO 0x43
40 40
41#define DRM_HDCP_1_4_SRM_ID 0x8
42#define DRM_HDCP_1_4_VRL_LENGTH_SIZE 3
43#define DRM_HDCP_1_4_DCP_SIG_SIZE 40
44
45/* Protocol message definition for HDCP2.2 specification */
46/*
47 * Protected content streams are classified into 2 types:
48 * - Type0: Can be transmitted with HDCP 1.4+
49 * - Type1: Can be transmitted with HDCP 2.2+
50 */
51#define HDCP_STREAM_TYPE0 0x00
52#define HDCP_STREAM_TYPE1 0x01
53
54/* HDCP2.2 Msg IDs */
55#define HDCP_2_2_NULL_MSG 1
56#define HDCP_2_2_AKE_INIT 2
57#define HDCP_2_2_AKE_SEND_CERT 3
58#define HDCP_2_2_AKE_NO_STORED_KM 4
59#define HDCP_2_2_AKE_STORED_KM 5
60#define HDCP_2_2_AKE_SEND_HPRIME 7
61#define HDCP_2_2_AKE_SEND_PAIRING_INFO 8
62#define HDCP_2_2_LC_INIT 9
63#define HDCP_2_2_LC_SEND_LPRIME 10
64#define HDCP_2_2_SKE_SEND_EKS 11
65#define HDCP_2_2_REP_SEND_RECVID_LIST 12
66#define HDCP_2_2_REP_SEND_ACK 15
67#define HDCP_2_2_REP_STREAM_MANAGE 16
68#define HDCP_2_2_REP_STREAM_READY 17
69#define HDCP_2_2_ERRATA_DP_STREAM_TYPE 50
70
71#define HDCP_2_2_RTX_LEN 8
72#define HDCP_2_2_RRX_LEN 8
73
74#define HDCP_2_2_K_PUB_RX_MOD_N_LEN 128
75#define HDCP_2_2_K_PUB_RX_EXP_E_LEN 3
76#define HDCP_2_2_K_PUB_RX_LEN (HDCP_2_2_K_PUB_RX_MOD_N_LEN + \
77 HDCP_2_2_K_PUB_RX_EXP_E_LEN)
78
79#define HDCP_2_2_DCP_LLC_SIG_LEN 384
80
81#define HDCP_2_2_E_KPUB_KM_LEN 128
82#define HDCP_2_2_E_KH_KM_M_LEN (16 + 16)
83#define HDCP_2_2_H_PRIME_LEN 32
84#define HDCP_2_2_E_KH_KM_LEN 16
85#define HDCP_2_2_RN_LEN 8
86#define HDCP_2_2_L_PRIME_LEN 32
87#define HDCP_2_2_E_DKEY_KS_LEN 16
88#define HDCP_2_2_RIV_LEN 8
89#define HDCP_2_2_SEQ_NUM_LEN 3
90#define HDCP_2_2_V_PRIME_HALF_LEN (HDCP_2_2_L_PRIME_LEN / 2)
91#define HDCP_2_2_RECEIVER_ID_LEN DRM_HDCP_KSV_LEN
92#define HDCP_2_2_MAX_DEVICE_COUNT 31
93#define HDCP_2_2_RECEIVER_IDS_MAX_LEN (HDCP_2_2_RECEIVER_ID_LEN * \
94 HDCP_2_2_MAX_DEVICE_COUNT)
95#define HDCP_2_2_MPRIME_LEN 32
96
97/* Following Macros take a byte at a time for bit(s) masking */
98/*
99 * TODO: This has to be changed for DP MST, as multiple stream on
100 * same port is possible.
101 * For HDCP2.2 on HDMI and DP SST this value is always 1.
102 */
103#define HDCP_2_2_MAX_CONTENT_STREAMS_CNT 1
104#define HDCP_2_2_TXCAP_MASK_LEN 2
105#define HDCP_2_2_RXCAPS_LEN 3
106#define HDCP_2_2_RX_REPEATER(x) ((x) & BIT(0))
107#define HDCP_2_2_DP_HDCP_CAPABLE(x) ((x) & BIT(1))
108#define HDCP_2_2_RXINFO_LEN 2
109
110/* HDCP1.x compliant device in downstream */
111#define HDCP_2_2_HDCP1_DEVICE_CONNECTED(x) ((x) & BIT(0))
112
113/* HDCP2.0 Compliant repeater in downstream */
114#define HDCP_2_2_HDCP_2_0_REP_CONNECTED(x) ((x) & BIT(1))
115#define HDCP_2_2_MAX_CASCADE_EXCEEDED(x) ((x) & BIT(2))
116#define HDCP_2_2_MAX_DEVS_EXCEEDED(x) ((x) & BIT(3))
117#define HDCP_2_2_DEV_COUNT_LO(x) (((x) & (0xF << 4)) >> 4)
118#define HDCP_2_2_DEV_COUNT_HI(x) ((x) & BIT(0))
119#define HDCP_2_2_DEPTH(x) (((x) & (0x7 << 1)) >> 1)
120
121struct hdcp2_cert_rx {
122 u8 receiver_id[HDCP_2_2_RECEIVER_ID_LEN];
123 u8 kpub_rx[HDCP_2_2_K_PUB_RX_LEN];
124 u8 reserved[2];
125 u8 dcp_signature[HDCP_2_2_DCP_LLC_SIG_LEN];
126} __packed;
127
128struct hdcp2_streamid_type {
129 u8 stream_id;
130 u8 stream_type;
131} __packed;
132
133/*
134 * The TxCaps field specified in the HDCP HDMI, DP specs
135 * This field is big endian as specified in the errata.
136 */
137struct hdcp2_tx_caps {
138 /* Transmitter must set this to 0x2 */
139 u8 version;
140
141 /* Reserved for HDCP and DP Spec. Read as Zero */
142 u8 tx_cap_mask[HDCP_2_2_TXCAP_MASK_LEN];
143} __packed;
144
145/* Main structures for HDCP2.2 protocol communication */
146struct hdcp2_ake_init {
147 u8 msg_id;
148 u8 r_tx[HDCP_2_2_RTX_LEN];
149 struct hdcp2_tx_caps tx_caps;
150} __packed;
151
152struct hdcp2_ake_send_cert {
153 u8 msg_id;
154 struct hdcp2_cert_rx cert_rx;
155 u8 r_rx[HDCP_2_2_RRX_LEN];
156 u8 rx_caps[HDCP_2_2_RXCAPS_LEN];
157} __packed;
158
159struct hdcp2_ake_no_stored_km {
160 u8 msg_id;
161 u8 e_kpub_km[HDCP_2_2_E_KPUB_KM_LEN];
162} __packed;
163
164struct hdcp2_ake_stored_km {
165 u8 msg_id;
166 u8 e_kh_km_m[HDCP_2_2_E_KH_KM_M_LEN];
167} __packed;
168
169struct hdcp2_ake_send_hprime {
170 u8 msg_id;
171 u8 h_prime[HDCP_2_2_H_PRIME_LEN];
172} __packed;
173
174struct hdcp2_ake_send_pairing_info {
175 u8 msg_id;
176 u8 e_kh_km[HDCP_2_2_E_KH_KM_LEN];
177} __packed;
178
179struct hdcp2_lc_init {
180 u8 msg_id;
181 u8 r_n[HDCP_2_2_RN_LEN];
182} __packed;
183
184struct hdcp2_lc_send_lprime {
185 u8 msg_id;
186 u8 l_prime[HDCP_2_2_L_PRIME_LEN];
187} __packed;
188
189struct hdcp2_ske_send_eks {
190 u8 msg_id;
191 u8 e_dkey_ks[HDCP_2_2_E_DKEY_KS_LEN];
192 u8 riv[HDCP_2_2_RIV_LEN];
193} __packed;
194
195struct hdcp2_rep_send_receiverid_list {
196 u8 msg_id;
197 u8 rx_info[HDCP_2_2_RXINFO_LEN];
198 u8 seq_num_v[HDCP_2_2_SEQ_NUM_LEN];
199 u8 v_prime[HDCP_2_2_V_PRIME_HALF_LEN];
200 u8 receiver_ids[HDCP_2_2_RECEIVER_IDS_MAX_LEN];
201} __packed;
202
203struct hdcp2_rep_send_ack {
204 u8 msg_id;
205 u8 v[HDCP_2_2_V_PRIME_HALF_LEN];
206} __packed;
207
208struct hdcp2_rep_stream_manage {
209 u8 msg_id;
210 u8 seq_num_m[HDCP_2_2_SEQ_NUM_LEN];
211 __be16 k;
212 struct hdcp2_streamid_type streams[HDCP_2_2_MAX_CONTENT_STREAMS_CNT];
213} __packed;
214
215struct hdcp2_rep_stream_ready {
216 u8 msg_id;
217 u8 m_prime[HDCP_2_2_MPRIME_LEN];
218} __packed;
219
220struct hdcp2_dp_errata_stream_type {
221 u8 msg_id;
222 u8 stream_type;
223} __packed;
224
225/* HDCP2.2 TIMEOUTs in mSec */
226#define HDCP_2_2_CERT_TIMEOUT_MS 100
227#define HDCP_2_2_HPRIME_NO_PAIRED_TIMEOUT_MS 1000
228#define HDCP_2_2_HPRIME_PAIRED_TIMEOUT_MS 200
229#define HDCP_2_2_PAIRING_TIMEOUT_MS 200
230#define HDCP_2_2_HDMI_LPRIME_TIMEOUT_MS 20
231#define HDCP_2_2_DP_LPRIME_TIMEOUT_MS 7
232#define HDCP_2_2_RECVID_LIST_TIMEOUT_MS 3000
233#define HDCP_2_2_STREAM_READY_TIMEOUT_MS 100
234
235/* HDMI HDCP2.2 Register Offsets */
236#define HDCP_2_2_HDMI_REG_VER_OFFSET 0x50
237#define HDCP_2_2_HDMI_REG_WR_MSG_OFFSET 0x60
238#define HDCP_2_2_HDMI_REG_RXSTATUS_OFFSET 0x70
239#define HDCP_2_2_HDMI_REG_RD_MSG_OFFSET 0x80
240#define HDCP_2_2_HDMI_REG_DBG_OFFSET 0xC0
241
242#define HDCP_2_2_HDMI_SUPPORT_MASK BIT(2)
243#define HDCP_2_2_RX_CAPS_VERSION_VAL 0x02
244#define HDCP_2_2_SEQ_NUM_MAX 0xFFFFFF
245#define HDCP_2_2_DELAY_BEFORE_ENCRYPTION_EN 200
246
247/* Below macros take a byte at a time and mask the bit(s) */
248#define HDCP_2_2_HDMI_RXSTATUS_LEN 2
249#define HDCP_2_2_HDMI_RXSTATUS_MSG_SZ_HI(x) ((x) & 0x3)
250#define HDCP_2_2_HDMI_RXSTATUS_READY(x) ((x) & BIT(2))
251#define HDCP_2_2_HDMI_RXSTATUS_REAUTH_REQ(x) ((x) & BIT(3))
252
41#endif 253#endif
diff --git a/include/drm/gpu_scheduler.h b/include/drm/gpu_scheduler.h
index d87b268f1781..926379d53484 100644
--- a/include/drm/gpu_scheduler.h
+++ b/include/drm/gpu_scheduler.h
@@ -264,6 +264,7 @@ struct drm_sched_backend_ops {
264 * @hang_limit: once the hangs by a job crosses this limit then it is marked 264 * @hang_limit: once the hangs by a job crosses this limit then it is marked
265 * guilty and it will be considered for scheduling further. 265 * guilty and it will be considered for scheduling further.
266 * @num_jobs: the number of jobs in queue in the scheduler 266 * @num_jobs: the number of jobs in queue in the scheduler
267 * @ready: marks if the underlying HW is ready to work
267 * 268 *
268 * One scheduler is implemented for each hardware ring. 269 * One scheduler is implemented for each hardware ring.
269 */ 270 */
@@ -283,22 +284,26 @@ struct drm_gpu_scheduler {
283 spinlock_t job_list_lock; 284 spinlock_t job_list_lock;
284 int hang_limit; 285 int hang_limit;
285 atomic_t num_jobs; 286 atomic_t num_jobs;
287 bool ready;
286}; 288};
287 289
288int drm_sched_init(struct drm_gpu_scheduler *sched, 290int drm_sched_init(struct drm_gpu_scheduler *sched,
289 const struct drm_sched_backend_ops *ops, 291 const struct drm_sched_backend_ops *ops,
290 uint32_t hw_submission, unsigned hang_limit, long timeout, 292 uint32_t hw_submission, unsigned hang_limit, long timeout,
291 const char *name); 293 const char *name);
294
292void drm_sched_fini(struct drm_gpu_scheduler *sched); 295void drm_sched_fini(struct drm_gpu_scheduler *sched);
293int drm_sched_job_init(struct drm_sched_job *job, 296int drm_sched_job_init(struct drm_sched_job *job,
294 struct drm_sched_entity *entity, 297 struct drm_sched_entity *entity,
295 void *owner); 298 void *owner);
299void drm_sched_job_cleanup(struct drm_sched_job *job);
296void drm_sched_wakeup(struct drm_gpu_scheduler *sched); 300void drm_sched_wakeup(struct drm_gpu_scheduler *sched);
297void drm_sched_hw_job_reset(struct drm_gpu_scheduler *sched, 301void drm_sched_hw_job_reset(struct drm_gpu_scheduler *sched,
298 struct drm_sched_job *job); 302 struct drm_sched_job *job);
299void drm_sched_job_recovery(struct drm_gpu_scheduler *sched); 303void drm_sched_job_recovery(struct drm_gpu_scheduler *sched);
300bool drm_sched_dependency_optimized(struct dma_fence* fence, 304bool drm_sched_dependency_optimized(struct dma_fence* fence,
301 struct drm_sched_entity *entity); 305 struct drm_sched_entity *entity);
306void drm_sched_fault(struct drm_gpu_scheduler *sched);
302void drm_sched_job_kickout(struct drm_sched_job *s_job); 307void drm_sched_job_kickout(struct drm_sched_job *s_job);
303 308
304void drm_sched_rq_add_entity(struct drm_sched_rq *rq, 309void drm_sched_rq_add_entity(struct drm_sched_rq *rq,
diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
index fd965ffbb92e..192667144693 100644
--- a/include/drm/i915_pciids.h
+++ b/include/drm/i915_pciids.h
@@ -365,16 +365,20 @@
365 INTEL_VGA_DEVICE(0x593B, info) /* Halo GT4 */ 365 INTEL_VGA_DEVICE(0x593B, info) /* Halo GT4 */
366 366
367/* AML/KBL Y GT2 */ 367/* AML/KBL Y GT2 */
368#define INTEL_AML_GT2_IDS(info) \ 368#define INTEL_AML_KBL_GT2_IDS(info) \
369 INTEL_VGA_DEVICE(0x591C, info), /* ULX GT2 */ \ 369 INTEL_VGA_DEVICE(0x591C, info), /* ULX GT2 */ \
370 INTEL_VGA_DEVICE(0x87C0, info) /* ULX GT2 */ 370 INTEL_VGA_DEVICE(0x87C0, info) /* ULX GT2 */
371 371
372/* AML/CFL Y GT2 */
373#define INTEL_AML_CFL_GT2_IDS(info) \
374 INTEL_VGA_DEVICE(0x87CA, info)
375
372#define INTEL_KBL_IDS(info) \ 376#define INTEL_KBL_IDS(info) \
373 INTEL_KBL_GT1_IDS(info), \ 377 INTEL_KBL_GT1_IDS(info), \
374 INTEL_KBL_GT2_IDS(info), \ 378 INTEL_KBL_GT2_IDS(info), \
375 INTEL_KBL_GT3_IDS(info), \ 379 INTEL_KBL_GT3_IDS(info), \
376 INTEL_KBL_GT4_IDS(info), \ 380 INTEL_KBL_GT4_IDS(info), \
377 INTEL_AML_GT2_IDS(info) 381 INTEL_AML_KBL_GT2_IDS(info)
378 382
379/* CFL S */ 383/* CFL S */
380#define INTEL_CFL_S_GT1_IDS(info) \ 384#define INTEL_CFL_S_GT1_IDS(info) \
@@ -407,17 +411,17 @@
407 411
408/* WHL/CFL U GT1 */ 412/* WHL/CFL U GT1 */
409#define INTEL_WHL_U_GT1_IDS(info) \ 413#define INTEL_WHL_U_GT1_IDS(info) \
410 INTEL_VGA_DEVICE(0x3EA1, info) 414 INTEL_VGA_DEVICE(0x3EA1, info), \
415 INTEL_VGA_DEVICE(0x3EA4, info)
411 416
412/* WHL/CFL U GT2 */ 417/* WHL/CFL U GT2 */
413#define INTEL_WHL_U_GT2_IDS(info) \ 418#define INTEL_WHL_U_GT2_IDS(info) \
414 INTEL_VGA_DEVICE(0x3EA0, info) 419 INTEL_VGA_DEVICE(0x3EA0, info), \
420 INTEL_VGA_DEVICE(0x3EA3, info)
415 421
416/* WHL/CFL U GT3 */ 422/* WHL/CFL U GT3 */
417#define INTEL_WHL_U_GT3_IDS(info) \ 423#define INTEL_WHL_U_GT3_IDS(info) \
418 INTEL_VGA_DEVICE(0x3EA2, info), \ 424 INTEL_VGA_DEVICE(0x3EA2, info)
419 INTEL_VGA_DEVICE(0x3EA3, info), \
420 INTEL_VGA_DEVICE(0x3EA4, info)
421 425
422#define INTEL_CFL_IDS(info) \ 426#define INTEL_CFL_IDS(info) \
423 INTEL_CFL_S_GT1_IDS(info), \ 427 INTEL_CFL_S_GT1_IDS(info), \
@@ -427,7 +431,8 @@
427 INTEL_CFL_U_GT3_IDS(info), \ 431 INTEL_CFL_U_GT3_IDS(info), \
428 INTEL_WHL_U_GT1_IDS(info), \ 432 INTEL_WHL_U_GT1_IDS(info), \
429 INTEL_WHL_U_GT2_IDS(info), \ 433 INTEL_WHL_U_GT2_IDS(info), \
430 INTEL_WHL_U_GT3_IDS(info) 434 INTEL_WHL_U_GT3_IDS(info), \
435 INTEL_AML_CFL_GT2_IDS(info)
431 436
432/* CNL */ 437/* CNL */
433#define INTEL_CNL_IDS(info) \ 438#define INTEL_CNL_IDS(info) \
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index e4fee8e02559..1021106438b2 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -31,7 +31,6 @@
31#define _TTM_BO_DRIVER_H_ 31#define _TTM_BO_DRIVER_H_
32 32
33#include <drm/drm_mm.h> 33#include <drm/drm_mm.h>
34#include <drm/drm_global.h>
35#include <drm/drm_vma_manager.h> 34#include <drm/drm_vma_manager.h>
36#include <linux/workqueue.h> 35#include <linux/workqueue.h>
37#include <linux/fs.h> 36#include <linux/fs.h>
@@ -385,15 +384,6 @@ struct ttm_bo_driver {
385}; 384};
386 385
387/** 386/**
388 * struct ttm_bo_global_ref - Argument to initialize a struct ttm_bo_global.
389 */
390
391struct ttm_bo_global_ref {
392 struct drm_global_reference ref;
393 struct ttm_mem_global *mem_glob;
394};
395
396/**
397 * struct ttm_bo_global - Buffer object driver global data. 387 * struct ttm_bo_global - Buffer object driver global data.
398 * 388 *
399 * @mem_glob: Pointer to a struct ttm_mem_global object for accounting. 389 * @mem_glob: Pointer to a struct ttm_mem_global object for accounting.
@@ -407,7 +397,7 @@ struct ttm_bo_global_ref {
407 * @swap_lru: Lru list of buffer objects used for swapping. 397 * @swap_lru: Lru list of buffer objects used for swapping.
408 */ 398 */
409 399
410struct ttm_bo_global { 400extern struct ttm_bo_global {
411 401
412 /** 402 /**
413 * Constant after init. 403 * Constant after init.
@@ -416,12 +406,12 @@ struct ttm_bo_global {
416 struct kobject kobj; 406 struct kobject kobj;
417 struct ttm_mem_global *mem_glob; 407 struct ttm_mem_global *mem_glob;
418 struct page *dummy_read_page; 408 struct page *dummy_read_page;
419 struct mutex device_list_mutex;
420 spinlock_t lru_lock; 409 spinlock_t lru_lock;
421 410
422 /** 411 /**
423 * Protected by device_list_mutex. 412 * Protected by ttm_global_mutex.
424 */ 413 */
414 unsigned int use_count;
425 struct list_head device_list; 415 struct list_head device_list;
426 416
427 /** 417 /**
@@ -433,7 +423,7 @@ struct ttm_bo_global {
433 * Internal protection. 423 * Internal protection.
434 */ 424 */
435 atomic_t bo_count; 425 atomic_t bo_count;
436}; 426} ttm_bo_glob;
437 427
438 428
439#define TTM_NUM_MEM_TYPES 8 429#define TTM_NUM_MEM_TYPES 8
@@ -578,9 +568,6 @@ void ttm_bo_mem_put(struct ttm_buffer_object *bo, struct ttm_mem_reg *mem);
578void ttm_bo_mem_put_locked(struct ttm_buffer_object *bo, 568void ttm_bo_mem_put_locked(struct ttm_buffer_object *bo,
579 struct ttm_mem_reg *mem); 569 struct ttm_mem_reg *mem);
580 570
581void ttm_bo_global_release(struct drm_global_reference *ref);
582int ttm_bo_global_init(struct drm_global_reference *ref);
583
584int ttm_bo_device_release(struct ttm_bo_device *bdev); 571int ttm_bo_device_release(struct ttm_bo_device *bdev);
585 572
586/** 573/**
@@ -598,7 +585,7 @@ int ttm_bo_device_release(struct ttm_bo_device *bdev);
598 * Returns: 585 * Returns:
599 * !0: Failure. 586 * !0: Failure.
600 */ 587 */
601int ttm_bo_device_init(struct ttm_bo_device *bdev, struct ttm_bo_global *glob, 588int ttm_bo_device_init(struct ttm_bo_device *bdev,
602 struct ttm_bo_driver *driver, 589 struct ttm_bo_driver *driver,
603 struct address_space *mapping, 590 struct address_space *mapping,
604 uint64_t file_page_offset, bool need_dma32); 591 uint64_t file_page_offset, bool need_dma32);
diff --git a/include/drm/ttm/ttm_memory.h b/include/drm/ttm/ttm_memory.h
index 737b5fed8003..3ff48a0a2d7b 100644
--- a/include/drm/ttm/ttm_memory.h
+++ b/include/drm/ttm/ttm_memory.h
@@ -63,7 +63,7 @@
63 63
64#define TTM_MEM_MAX_ZONES 2 64#define TTM_MEM_MAX_ZONES 2
65struct ttm_mem_zone; 65struct ttm_mem_zone;
66struct ttm_mem_global { 66extern struct ttm_mem_global {
67 struct kobject kobj; 67 struct kobject kobj;
68 struct ttm_bo_global *bo_glob; 68 struct ttm_bo_global *bo_glob;
69 struct workqueue_struct *swap_queue; 69 struct workqueue_struct *swap_queue;
@@ -78,7 +78,7 @@ struct ttm_mem_global {
78#else 78#else
79 struct ttm_mem_zone *zone_dma32; 79 struct ttm_mem_zone *zone_dma32;
80#endif 80#endif
81}; 81} ttm_mem_glob;
82 82
83extern int ttm_mem_global_init(struct ttm_mem_global *glob); 83extern int ttm_mem_global_init(struct ttm_mem_global *glob);
84extern void ttm_mem_global_release(struct ttm_mem_global *glob); 84extern void ttm_mem_global_release(struct ttm_mem_global *glob);
diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h
index 6b92b3395fa9..65a38c4a02a1 100644
--- a/include/linux/ceph/ceph_features.h
+++ b/include/linux/ceph/ceph_features.h
@@ -213,12 +213,6 @@ DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) // client-facin
213 CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING | \ 213 CEPH_FEATURE_NEW_OSDOPREPLY_ENCODING | \
214 CEPH_FEATURE_CEPHX_V2) 214 CEPH_FEATURE_CEPHX_V2)
215 215
216#define CEPH_FEATURES_REQUIRED_DEFAULT \ 216#define CEPH_FEATURES_REQUIRED_DEFAULT 0
217 (CEPH_FEATURE_NOSRCADDR | \
218 CEPH_FEATURE_SUBSCRIBE2 | \
219 CEPH_FEATURE_RECONNECT_SEQ | \
220 CEPH_FEATURE_PGID64 | \
221 CEPH_FEATURE_PGPOOL3 | \
222 CEPH_FEATURE_OSDENC)
223 217
224#endif 218#endif
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index c0f5db3a9621..2010493e1040 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -143,18 +143,6 @@
143#define KASAN_ABI_VERSION 3 143#define KASAN_ABI_VERSION 3
144#endif 144#endif
145 145
146/*
147 * Because __no_sanitize_address conflicts with inlining:
148 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
149 * we do one or the other.
150 */
151#ifdef CONFIG_KASAN
152#define __no_sanitize_address_or_inline \
153 __no_sanitize_address __maybe_unused notrace
154#else
155#define __no_sanitize_address_or_inline inline
156#endif
157
158#if GCC_VERSION >= 50100 146#if GCC_VERSION >= 50100
159#define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1 147#define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1
160#endif 148#endif
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 18c80cfa4fc4..06396c1cf127 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -189,7 +189,7 @@ void __read_once_size(const volatile void *p, void *res, int size)
189 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 189 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368
190 * '__maybe_unused' allows us to avoid defined-but-not-used warnings. 190 * '__maybe_unused' allows us to avoid defined-but-not-used warnings.
191 */ 191 */
192# define __no_kasan_or_inline __no_sanitize_address __maybe_unused 192# define __no_kasan_or_inline __no_sanitize_address notrace __maybe_unused
193#else 193#else
194# define __no_kasan_or_inline __always_inline 194# define __no_kasan_or_inline __always_inline
195#endif 195#endif
diff --git a/include/linux/compiler_attributes.h b/include/linux/compiler_attributes.h
index 6b28c1b7310c..f8c400ba1929 100644
--- a/include/linux/compiler_attributes.h
+++ b/include/linux/compiler_attributes.h
@@ -4,22 +4,26 @@
4 4
5/* 5/*
6 * The attributes in this file are unconditionally defined and they directly 6 * The attributes in this file are unconditionally defined and they directly
7 * map to compiler attribute(s) -- except those that are optional. 7 * map to compiler attribute(s), unless one of the compilers does not support
8 * the attribute. In that case, __has_attribute is used to check for support
9 * and the reason is stated in its comment ("Optional: ...").
8 * 10 *
9 * Any other "attributes" (i.e. those that depend on a configuration option, 11 * Any other "attributes" (i.e. those that depend on a configuration option,
10 * on a compiler, on an architecture, on plugins, on other attributes...) 12 * on a compiler, on an architecture, on plugins, on other attributes...)
11 * should be defined elsewhere (e.g. compiler_types.h or compiler-*.h). 13 * should be defined elsewhere (e.g. compiler_types.h or compiler-*.h).
14 * The intention is to keep this file as simple as possible, as well as
15 * compiler- and version-agnostic (e.g. avoiding GCC_VERSION checks).
12 * 16 *
13 * This file is meant to be sorted (by actual attribute name, 17 * This file is meant to be sorted (by actual attribute name,
14 * not by #define identifier). Use the __attribute__((__name__)) syntax 18 * not by #define identifier). Use the __attribute__((__name__)) syntax
15 * (i.e. with underscores) to avoid future collisions with other macros. 19 * (i.e. with underscores) to avoid future collisions with other macros.
16 * If an attribute is optional, state the reason in the comment. 20 * Provide links to the documentation of each supported compiler, if it exists.
17 */ 21 */
18 22
19/* 23/*
20 * To check for optional attributes, we use __has_attribute, which is supported 24 * __has_attribute is supported on gcc >= 5, clang >= 2.9 and icc >= 17.
21 * on gcc >= 5, clang >= 2.9 and icc >= 17. In the meantime, to support 25 * In the meantime, to support 4.6 <= gcc < 5, we implement __has_attribute
22 * 4.6 <= gcc < 5, we implement __has_attribute by hand. 26 * by hand.
23 * 27 *
24 * sparse does not support __has_attribute (yet) and defines __GNUC_MINOR__ 28 * sparse does not support __has_attribute (yet) and defines __GNUC_MINOR__
25 * depending on the compiler used to build it; however, these attributes have 29 * depending on the compiler used to build it; however, these attributes have
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 3439d7d0249a..4a3f9c09c92d 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -130,6 +130,10 @@ struct ftrace_likely_data {
130# define randomized_struct_fields_end 130# define randomized_struct_fields_end
131#endif 131#endif
132 132
133#ifndef asm_volatile_goto
134#define asm_volatile_goto(x...) asm goto(x)
135#endif
136
133/* Are two types/vars the same type (ignoring qualifiers)? */ 137/* Are two types/vars the same type (ignoring qualifiers)? */
134#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) 138#define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
135 139
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 845174e113ce..100ce4a4aff6 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -1167,6 +1167,8 @@ static inline bool efi_enabled(int feature)
1167extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused); 1167extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused);
1168 1168
1169extern bool efi_is_table_address(unsigned long phys_addr); 1169extern bool efi_is_table_address(unsigned long phys_addr);
1170
1171extern int efi_apply_persistent_mem_reservations(void);
1170#else 1172#else
1171static inline bool efi_enabled(int feature) 1173static inline bool efi_enabled(int feature)
1172{ 1174{
@@ -1185,6 +1187,11 @@ static inline bool efi_is_table_address(unsigned long phys_addr)
1185{ 1187{
1186 return false; 1188 return false;
1187} 1189}
1190
1191static inline int efi_apply_persistent_mem_reservations(void)
1192{
1193 return 0;
1194}
1188#endif 1195#endif
1189 1196
1190extern int efi_status_to_err(efi_status_t status); 1197extern int efi_status_to_err(efi_status_t status);
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 2827b87590d8..387c70df6f29 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -722,8 +722,8 @@ struct hid_usage_id {
722 * input will not be passed to raw_event unless hid_device_io_start is 722 * input will not be passed to raw_event unless hid_device_io_start is
723 * called. 723 * called.
724 * 724 *
725 * raw_event and event should return 0 on no action performed, 1 when no 725 * raw_event and event should return negative on error, any other value will
726 * further processing should be done and negative on error 726 * pass the event on to .event() typically return 0 for success.
727 * 727 *
728 * input_mapping shall return a negative value to completely ignore this usage 728 * input_mapping shall return a negative value to completely ignore this usage
729 * (e.g. doubled or invalid usage), zero to continue with parsing of this 729 * (e.g. doubled or invalid usage), zero to continue with parsing of this
diff --git a/include/linux/i8253.h b/include/linux/i8253.h
index e6bb36a97519..8336b2f6f834 100644
--- a/include/linux/i8253.h
+++ b/include/linux/i8253.h
@@ -21,6 +21,7 @@
21#define PIT_LATCH ((PIT_TICK_RATE + HZ/2) / HZ) 21#define PIT_LATCH ((PIT_TICK_RATE + HZ/2) / HZ)
22 22
23extern raw_spinlock_t i8253_lock; 23extern raw_spinlock_t i8253_lock;
24extern bool i8253_clear_counter_on_shutdown;
24extern struct clock_event_device i8253_clockevent; 25extern struct clock_event_device i8253_clockevent;
25extern void clockevent_i8253_init(bool oneshot); 26extern void clockevent_i8253_init(bool oneshot);
26 27
diff --git a/include/linux/mm.h b/include/linux/mm.h
index fcf9cc9d535f..5411de93a363 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1744,11 +1744,15 @@ int __pud_alloc(struct mm_struct *mm, p4d_t *p4d, unsigned long address);
1744 1744
1745static inline void mm_inc_nr_puds(struct mm_struct *mm) 1745static inline void mm_inc_nr_puds(struct mm_struct *mm)
1746{ 1746{
1747 if (mm_pud_folded(mm))
1748 return;
1747 atomic_long_add(PTRS_PER_PUD * sizeof(pud_t), &mm->pgtables_bytes); 1749 atomic_long_add(PTRS_PER_PUD * sizeof(pud_t), &mm->pgtables_bytes);
1748} 1750}
1749 1751
1750static inline void mm_dec_nr_puds(struct mm_struct *mm) 1752static inline void mm_dec_nr_puds(struct mm_struct *mm)
1751{ 1753{
1754 if (mm_pud_folded(mm))
1755 return;
1752 atomic_long_sub(PTRS_PER_PUD * sizeof(pud_t), &mm->pgtables_bytes); 1756 atomic_long_sub(PTRS_PER_PUD * sizeof(pud_t), &mm->pgtables_bytes);
1753} 1757}
1754#endif 1758#endif
@@ -1768,11 +1772,15 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address);
1768 1772
1769static inline void mm_inc_nr_pmds(struct mm_struct *mm) 1773static inline void mm_inc_nr_pmds(struct mm_struct *mm)
1770{ 1774{
1775 if (mm_pmd_folded(mm))
1776 return;
1771 atomic_long_add(PTRS_PER_PMD * sizeof(pmd_t), &mm->pgtables_bytes); 1777 atomic_long_add(PTRS_PER_PMD * sizeof(pmd_t), &mm->pgtables_bytes);
1772} 1778}
1773 1779
1774static inline void mm_dec_nr_pmds(struct mm_struct *mm) 1780static inline void mm_dec_nr_pmds(struct mm_struct *mm)
1775{ 1781{
1782 if (mm_pmd_folded(mm))
1783 return;
1776 atomic_long_sub(PTRS_PER_PMD * sizeof(pmd_t), &mm->pgtables_bytes); 1784 atomic_long_sub(PTRS_PER_PMD * sizeof(pmd_t), &mm->pgtables_bytes);
1777} 1785}
1778#endif 1786#endif
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index abe975c87b90..7f53ece2c039 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -324,9 +324,8 @@ static inline unsigned int nanddev_ntargets(const struct nand_device *nand)
324 */ 324 */
325static inline unsigned int nanddev_neraseblocks(const struct nand_device *nand) 325static inline unsigned int nanddev_neraseblocks(const struct nand_device *nand)
326{ 326{
327 return (u64)nand->memorg.luns_per_target * 327 return nand->memorg.ntargets * nand->memorg.luns_per_target *
328 nand->memorg.eraseblocks_per_lun * 328 nand->memorg.eraseblocks_per_lun;
329 nand->memorg.pages_per_eraseblock;
330} 329}
331 330
332/** 331/**
@@ -569,7 +568,7 @@ static inline void nanddev_pos_next_eraseblock(struct nand_device *nand,
569} 568}
570 569
571/** 570/**
572 * nanddev_pos_next_eraseblock() - Move a position to the next page 571 * nanddev_pos_next_page() - Move a position to the next page
573 * @nand: NAND device 572 * @nand: NAND device
574 * @pos: the position to update 573 * @pos: the position to update
575 * 574 *
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index dc1d9ed33b31..857f8abf7b91 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3190,6 +3190,26 @@ static inline void netdev_tx_sent_queue(struct netdev_queue *dev_queue,
3190#endif 3190#endif
3191} 3191}
3192 3192
3193/* Variant of netdev_tx_sent_queue() for drivers that are aware
3194 * that they should not test BQL status themselves.
3195 * We do want to change __QUEUE_STATE_STACK_XOFF only for the last
3196 * skb of a batch.
3197 * Returns true if the doorbell must be used to kick the NIC.
3198 */
3199static inline bool __netdev_tx_sent_queue(struct netdev_queue *dev_queue,
3200 unsigned int bytes,
3201 bool xmit_more)
3202{
3203 if (xmit_more) {
3204#ifdef CONFIG_BQL
3205 dql_queued(&dev_queue->dql, bytes);
3206#endif
3207 return netif_tx_queue_stopped(dev_queue);
3208 }
3209 netdev_tx_sent_queue(dev_queue, bytes);
3210 return true;
3211}
3212
3193/** 3213/**
3194 * netdev_sent_queue - report the number of bytes queued to hardware 3214 * netdev_sent_queue - report the number of bytes queued to hardware
3195 * @dev: network device 3215 * @dev: network device
diff --git a/include/linux/netfilter/ipset/ip_set.h b/include/linux/netfilter/ipset/ip_set.h
index 34fc80f3eb90..1d100efe74ec 100644
--- a/include/linux/netfilter/ipset/ip_set.h
+++ b/include/linux/netfilter/ipset/ip_set.h
@@ -314,7 +314,7 @@ enum {
314extern ip_set_id_t ip_set_get_byname(struct net *net, 314extern ip_set_id_t ip_set_get_byname(struct net *net,
315 const char *name, struct ip_set **set); 315 const char *name, struct ip_set **set);
316extern void ip_set_put_byindex(struct net *net, ip_set_id_t index); 316extern void ip_set_put_byindex(struct net *net, ip_set_id_t index);
317extern const char *ip_set_name_byindex(struct net *net, ip_set_id_t index); 317extern void ip_set_name_byindex(struct net *net, ip_set_id_t index, char *name);
318extern ip_set_id_t ip_set_nfnl_get_byindex(struct net *net, ip_set_id_t index); 318extern ip_set_id_t ip_set_nfnl_get_byindex(struct net *net, ip_set_id_t index);
319extern void ip_set_nfnl_put(struct net *net, ip_set_id_t index); 319extern void ip_set_nfnl_put(struct net *net, ip_set_id_t index);
320 320
diff --git a/include/linux/netfilter/ipset/ip_set_comment.h b/include/linux/netfilter/ipset/ip_set_comment.h
index 8e2bab1e8e90..70877f8de7e9 100644
--- a/include/linux/netfilter/ipset/ip_set_comment.h
+++ b/include/linux/netfilter/ipset/ip_set_comment.h
@@ -43,11 +43,11 @@ ip_set_init_comment(struct ip_set *set, struct ip_set_comment *comment,
43 rcu_assign_pointer(comment->c, c); 43 rcu_assign_pointer(comment->c, c);
44} 44}
45 45
46/* Used only when dumping a set, protected by rcu_read_lock_bh() */ 46/* Used only when dumping a set, protected by rcu_read_lock() */
47static inline int 47static inline int
48ip_set_put_comment(struct sk_buff *skb, const struct ip_set_comment *comment) 48ip_set_put_comment(struct sk_buff *skb, const struct ip_set_comment *comment)
49{ 49{
50 struct ip_set_comment_rcu *c = rcu_dereference_bh(comment->c); 50 struct ip_set_comment_rcu *c = rcu_dereference(comment->c);
51 51
52 if (!c) 52 if (!c)
53 return 0; 53 return 0;
diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index 08f9247e9827..9003e29cde46 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -119,6 +119,8 @@ static inline int hardlockup_detector_perf_init(void) { return 0; }
119void watchdog_nmi_stop(void); 119void watchdog_nmi_stop(void);
120void watchdog_nmi_start(void); 120void watchdog_nmi_start(void);
121int watchdog_nmi_probe(void); 121int watchdog_nmi_probe(void);
122int watchdog_nmi_enable(unsigned int cpu);
123void watchdog_nmi_disable(unsigned int cpu);
122 124
123/** 125/**
124 * touch_nmi_watchdog - restart NMI watchdog timeout. 126 * touch_nmi_watchdog - restart NMI watchdog timeout.
diff --git a/include/linux/swap.h b/include/linux/swap.h
index d8a07a4f171d..a8f6d5d89524 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -18,6 +18,8 @@ struct notifier_block;
18 18
19struct bio; 19struct bio;
20 20
21struct pagevec;
22
21#define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */ 23#define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */
22#define SWAP_FLAG_PRIO_MASK 0x7fff 24#define SWAP_FLAG_PRIO_MASK 0x7fff
23#define SWAP_FLAG_PRIO_SHIFT 0 25#define SWAP_FLAG_PRIO_SHIFT 0
@@ -369,7 +371,7 @@ static inline int node_reclaim(struct pglist_data *pgdat, gfp_t mask,
369#endif 371#endif
370 372
371extern int page_evictable(struct page *page); 373extern int page_evictable(struct page *page);
372extern void check_move_unevictable_pages(struct page **, int nr_pages); 374extern void check_move_unevictable_pages(struct pagevec *pvec);
373 375
374extern int kswapd_run(int nid); 376extern int kswapd_run(int nid);
375extern void kswapd_stop(int nid); 377extern void kswapd_stop(int nid);
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 14b789a123e7..1656c5978498 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -317,6 +317,8 @@ bool ipv6_chk_acast_addr(struct net *net, struct net_device *dev,
317 const struct in6_addr *addr); 317 const struct in6_addr *addr);
318bool ipv6_chk_acast_addr_src(struct net *net, struct net_device *dev, 318bool ipv6_chk_acast_addr_src(struct net *net, struct net_device *dev,
319 const struct in6_addr *addr); 319 const struct in6_addr *addr);
320int ipv6_anycast_init(void);
321void ipv6_anycast_cleanup(void);
320 322
321/* Device notifier */ 323/* Device notifier */
322int register_inet6addr_notifier(struct notifier_block *nb); 324int register_inet6addr_notifier(struct notifier_block *nb);
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index d7578cf49c3a..c9c78c15bce0 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -146,10 +146,12 @@ struct ifacaddr6 {
146 struct in6_addr aca_addr; 146 struct in6_addr aca_addr;
147 struct fib6_info *aca_rt; 147 struct fib6_info *aca_rt;
148 struct ifacaddr6 *aca_next; 148 struct ifacaddr6 *aca_next;
149 struct hlist_node aca_addr_lst;
149 int aca_users; 150 int aca_users;
150 refcount_t aca_refcnt; 151 refcount_t aca_refcnt;
151 unsigned long aca_cstamp; 152 unsigned long aca_cstamp;
152 unsigned long aca_tstamp; 153 unsigned long aca_tstamp;
154 struct rcu_head rcu;
153}; 155};
154 156
155#define IFA_HOST IPV6_ADDR_LOOPBACK 157#define IFA_HOST IPV6_ADDR_LOOPBACK
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h
index eed04af9b75e..ae7b86f587f2 100644
--- a/include/net/netfilter/nf_conntrack_l4proto.h
+++ b/include/net/netfilter/nf_conntrack_l4proto.h
@@ -153,4 +153,43 @@ void nf_ct_l4proto_log_invalid(const struct sk_buff *skb,
153 const char *fmt, ...) { } 153 const char *fmt, ...) { }
154#endif /* CONFIG_SYSCTL */ 154#endif /* CONFIG_SYSCTL */
155 155
156static inline struct nf_generic_net *nf_generic_pernet(struct net *net)
157{
158 return &net->ct.nf_ct_proto.generic;
159}
160
161static inline struct nf_tcp_net *nf_tcp_pernet(struct net *net)
162{
163 return &net->ct.nf_ct_proto.tcp;
164}
165
166static inline struct nf_udp_net *nf_udp_pernet(struct net *net)
167{
168 return &net->ct.nf_ct_proto.udp;
169}
170
171static inline struct nf_icmp_net *nf_icmp_pernet(struct net *net)
172{
173 return &net->ct.nf_ct_proto.icmp;
174}
175
176static inline struct nf_icmp_net *nf_icmpv6_pernet(struct net *net)
177{
178 return &net->ct.nf_ct_proto.icmpv6;
179}
180
181#ifdef CONFIG_NF_CT_PROTO_DCCP
182static inline struct nf_dccp_net *nf_dccp_pernet(struct net *net)
183{
184 return &net->ct.nf_ct_proto.dccp;
185}
186#endif
187
188#ifdef CONFIG_NF_CT_PROTO_SCTP
189static inline struct nf_sctp_net *nf_sctp_pernet(struct net *net)
190{
191 return &net->ct.nf_ct_proto.sctp;
192}
193#endif
194
156#endif /*_NF_CONNTRACK_PROTOCOL_H*/ 195#endif /*_NF_CONNTRACK_PROTOCOL_H*/
diff --git a/include/trace/events/kyber.h b/include/trace/events/kyber.h
index a9834c37ac40..c0e7d24ca256 100644
--- a/include/trace/events/kyber.h
+++ b/include/trace/events/kyber.h
@@ -31,8 +31,8 @@ TRACE_EVENT(kyber_latency,
31 31
32 TP_fast_assign( 32 TP_fast_assign(
33 __entry->dev = disk_devt(dev_to_disk(kobj_to_dev(q->kobj.parent))); 33 __entry->dev = disk_devt(dev_to_disk(kobj_to_dev(q->kobj.parent)));
34 strlcpy(__entry->domain, domain, DOMAIN_LEN); 34 strlcpy(__entry->domain, domain, sizeof(__entry->domain));
35 strlcpy(__entry->type, type, DOMAIN_LEN); 35 strlcpy(__entry->type, type, sizeof(__entry->type));
36 __entry->percentile = percentile; 36 __entry->percentile = percentile;
37 __entry->numerator = numerator; 37 __entry->numerator = numerator;
38 __entry->denominator = denominator; 38 __entry->denominator = denominator;
@@ -60,7 +60,7 @@ TRACE_EVENT(kyber_adjust,
60 60
61 TP_fast_assign( 61 TP_fast_assign(
62 __entry->dev = disk_devt(dev_to_disk(kobj_to_dev(q->kobj.parent))); 62 __entry->dev = disk_devt(dev_to_disk(kobj_to_dev(q->kobj.parent)));
63 strlcpy(__entry->domain, domain, DOMAIN_LEN); 63 strlcpy(__entry->domain, domain, sizeof(__entry->domain));
64 __entry->depth = depth; 64 __entry->depth = depth;
65 ), 65 ),
66 66
@@ -82,7 +82,7 @@ TRACE_EVENT(kyber_throttled,
82 82
83 TP_fast_assign( 83 TP_fast_assign(
84 __entry->dev = disk_devt(dev_to_disk(kobj_to_dev(q->kobj.parent))); 84 __entry->dev = disk_devt(dev_to_disk(kobj_to_dev(q->kobj.parent)));
85 strlcpy(__entry->domain, domain, DOMAIN_LEN); 85 strlcpy(__entry->domain, domain, sizeof(__entry->domain));
86 ), 86 ),
87 87
88 TP_printk("%d,%d %s", MAJOR(__entry->dev), MINOR(__entry->dev), 88 TP_printk("%d,%d %s", MAJOR(__entry->dev), MINOR(__entry->dev),
diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index 370e9a5536ef..be84e43c1e19 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -326,6 +326,12 @@ struct drm_amdgpu_gem_userptr {
326/* GFX9 and later: */ 326/* GFX9 and later: */
327#define AMDGPU_TILING_SWIZZLE_MODE_SHIFT 0 327#define AMDGPU_TILING_SWIZZLE_MODE_SHIFT 0
328#define AMDGPU_TILING_SWIZZLE_MODE_MASK 0x1f 328#define AMDGPU_TILING_SWIZZLE_MODE_MASK 0x1f
329#define AMDGPU_TILING_DCC_OFFSET_256B_SHIFT 5
330#define AMDGPU_TILING_DCC_OFFSET_256B_MASK 0xFFFFFF
331#define AMDGPU_TILING_DCC_PITCH_MAX_SHIFT 29
332#define AMDGPU_TILING_DCC_PITCH_MAX_MASK 0x3FFF
333#define AMDGPU_TILING_DCC_INDEPENDENT_64B_SHIFT 43
334#define AMDGPU_TILING_DCC_INDEPENDENT_64B_MASK 0x1
329 335
330/* Set/Get helpers for tiling flags. */ 336/* Set/Get helpers for tiling flags. */
331#define AMDGPU_TILING_SET(field, value) \ 337#define AMDGPU_TILING_SET(field, value) \
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index a4446f452040..298b2e197744 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -412,6 +412,14 @@ typedef struct drm_i915_irq_wait {
412 int irq_seq; 412 int irq_seq;
413} drm_i915_irq_wait_t; 413} drm_i915_irq_wait_t;
414 414
415/*
416 * Different modes of per-process Graphics Translation Table,
417 * see I915_PARAM_HAS_ALIASING_PPGTT
418 */
419#define I915_GEM_PPGTT_NONE 0
420#define I915_GEM_PPGTT_ALIASING 1
421#define I915_GEM_PPGTT_FULL 2
422
415/* Ioctl to query kernel params: 423/* Ioctl to query kernel params:
416 */ 424 */
417#define I915_PARAM_IRQ_ACTIVE 1 425#define I915_PARAM_IRQ_ACTIVE 1
diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h
index f5ff8a76e208..b01eb502d49c 100644
--- a/include/uapi/linux/kfd_ioctl.h
+++ b/include/uapi/linux/kfd_ioctl.h
@@ -83,11 +83,11 @@ struct kfd_ioctl_set_cu_mask_args {
83}; 83};
84 84
85struct kfd_ioctl_get_queue_wave_state_args { 85struct kfd_ioctl_get_queue_wave_state_args {
86 uint64_t ctl_stack_address; /* to KFD */ 86 __u64 ctl_stack_address; /* to KFD */
87 uint32_t ctl_stack_used_size; /* from KFD */ 87 __u32 ctl_stack_used_size; /* from KFD */
88 uint32_t save_area_used_size; /* from KFD */ 88 __u32 save_area_used_size; /* from KFD */
89 uint32_t queue_id; /* to KFD */ 89 __u32 queue_id; /* to KFD */
90 uint32_t pad; 90 __u32 pad;
91}; 91};
92 92
93/* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */ 93/* For kfd_ioctl_set_memory_policy_args.default_policy and alternate_policy */
@@ -255,10 +255,10 @@ struct kfd_hsa_memory_exception_data {
255 255
256/* hw exception data */ 256/* hw exception data */
257struct kfd_hsa_hw_exception_data { 257struct kfd_hsa_hw_exception_data {
258 uint32_t reset_type; 258 __u32 reset_type;
259 uint32_t reset_cause; 259 __u32 reset_cause;
260 uint32_t memory_lost; 260 __u32 memory_lost;
261 uint32_t gpu_id; 261 __u32 gpu_id;
262}; 262};
263 263
264/* Event data */ 264/* Event data */
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index 579974b0bf0d..7de4f1bdaf06 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -1635,8 +1635,8 @@ enum nft_ng_attributes {
1635 NFTA_NG_MODULUS, 1635 NFTA_NG_MODULUS,
1636 NFTA_NG_TYPE, 1636 NFTA_NG_TYPE,
1637 NFTA_NG_OFFSET, 1637 NFTA_NG_OFFSET,
1638 NFTA_NG_SET_NAME, 1638 NFTA_NG_SET_NAME, /* deprecated */
1639 NFTA_NG_SET_ID, 1639 NFTA_NG_SET_ID, /* deprecated */
1640 __NFTA_NG_MAX 1640 __NFTA_NG_MAX
1641}; 1641};
1642#define NFTA_NG_MAX (__NFTA_NG_MAX - 1) 1642#define NFTA_NG_MAX (__NFTA_NG_MAX - 1)
diff --git a/include/uapi/linux/netfilter_bridge.h b/include/uapi/linux/netfilter_bridge.h
index 156ccd089df1..1610fdbab98d 100644
--- a/include/uapi/linux/netfilter_bridge.h
+++ b/include/uapi/linux/netfilter_bridge.h
@@ -11,6 +11,10 @@
11#include <linux/if_vlan.h> 11#include <linux/if_vlan.h>
12#include <linux/if_pppox.h> 12#include <linux/if_pppox.h>
13 13
14#ifndef __KERNEL__
15#include <limits.h> /* for INT_MIN, INT_MAX */
16#endif
17
14/* Bridge Hooks */ 18/* Bridge Hooks */
15/* After promisc drops, checksum checks. */ 19/* After promisc drops, checksum checks. */
16#define NF_BR_PRE_ROUTING 0 20#define NF_BR_PRE_ROUTING 0
diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
index 34dd3d497f2c..c81feb373d3e 100644
--- a/include/uapi/linux/sctp.h
+++ b/include/uapi/linux/sctp.h
@@ -568,6 +568,8 @@ struct sctp_assoc_reset_event {
568 568
569#define SCTP_ASSOC_CHANGE_DENIED 0x0004 569#define SCTP_ASSOC_CHANGE_DENIED 0x0004
570#define SCTP_ASSOC_CHANGE_FAILED 0x0008 570#define SCTP_ASSOC_CHANGE_FAILED 0x0008
571#define SCTP_STREAM_CHANGE_DENIED SCTP_ASSOC_CHANGE_DENIED
572#define SCTP_STREAM_CHANGE_FAILED SCTP_ASSOC_CHANGE_FAILED
571struct sctp_stream_change_event { 573struct sctp_stream_change_event {
572 __u16 strchange_type; 574 __u16 strchange_type;
573 __u16 strchange_flags; 575 __u16 strchange_flags;
@@ -1151,6 +1153,7 @@ struct sctp_add_streams {
1151/* SCTP Stream schedulers */ 1153/* SCTP Stream schedulers */
1152enum sctp_sched_type { 1154enum sctp_sched_type {
1153 SCTP_SS_FCFS, 1155 SCTP_SS_FCFS,
1156 SCTP_SS_DEFAULT = SCTP_SS_FCFS,
1154 SCTP_SS_PRIO, 1157 SCTP_SS_PRIO,
1155 SCTP_SS_RR, 1158 SCTP_SS_RR,
1156 SCTP_SS_MAX = SCTP_SS_RR 1159 SCTP_SS_MAX = SCTP_SS_RR
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h
index 18803ff76e27..4969817124a8 100644
--- a/include/xen/xen-ops.h
+++ b/include/xen/xen-ops.h
@@ -42,16 +42,12 @@ int xen_setup_shutdown_event(void);
42 42
43extern unsigned long *xen_contiguous_bitmap; 43extern unsigned long *xen_contiguous_bitmap;
44 44
45#ifdef CONFIG_XEN_PV 45#if defined(CONFIG_XEN_PV) || defined(CONFIG_ARM) || defined(CONFIG_ARM64)
46int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order, 46int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order,
47 unsigned int address_bits, 47 unsigned int address_bits,
48 dma_addr_t *dma_handle); 48 dma_addr_t *dma_handle);
49 49
50void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order); 50void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order);
51
52int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr,
53 xen_pfn_t *pfn, int nr, int *err_ptr, pgprot_t prot,
54 unsigned int domid, bool no_translate, struct page **pages);
55#else 51#else
56static inline int xen_create_contiguous_region(phys_addr_t pstart, 52static inline int xen_create_contiguous_region(phys_addr_t pstart,
57 unsigned int order, 53 unsigned int order,
@@ -63,7 +59,13 @@ static inline int xen_create_contiguous_region(phys_addr_t pstart,
63 59
64static inline void xen_destroy_contiguous_region(phys_addr_t pstart, 60static inline void xen_destroy_contiguous_region(phys_addr_t pstart,
65 unsigned int order) { } 61 unsigned int order) { }
62#endif
66 63
64#if defined(CONFIG_XEN_PV)
65int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr,
66 xen_pfn_t *pfn, int nr, int *err_ptr, pgprot_t prot,
67 unsigned int domid, bool no_translate, struct page **pages);
68#else
67static inline int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr, 69static inline int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr,
68 xen_pfn_t *pfn, int nr, int *err_ptr, 70 xen_pfn_t *pfn, int nr, int *err_ptr,
69 pgprot_t prot, unsigned int domid, 71 pgprot_t prot, unsigned int domid,