diff options
Diffstat (limited to 'include')
50 files changed, 583 insertions, 93 deletions
diff --git a/include/asm-generic/export.h b/include/asm-generic/export.h index 63554e9f6e0c..719db1968d81 100644 --- a/include/asm-generic/export.h +++ b/include/asm-generic/export.h | |||
| @@ -9,18 +9,15 @@ | |||
| 9 | #ifndef KSYM_ALIGN | 9 | #ifndef KSYM_ALIGN |
| 10 | #define KSYM_ALIGN 8 | 10 | #define KSYM_ALIGN 8 |
| 11 | #endif | 11 | #endif |
| 12 | #ifndef KCRC_ALIGN | ||
| 13 | #define KCRC_ALIGN 8 | ||
| 14 | #endif | ||
| 15 | #else | 12 | #else |
| 16 | #define __put .long | 13 | #define __put .long |
| 17 | #ifndef KSYM_ALIGN | 14 | #ifndef KSYM_ALIGN |
| 18 | #define KSYM_ALIGN 4 | 15 | #define KSYM_ALIGN 4 |
| 19 | #endif | 16 | #endif |
| 17 | #endif | ||
| 20 | #ifndef KCRC_ALIGN | 18 | #ifndef KCRC_ALIGN |
| 21 | #define KCRC_ALIGN 4 | 19 | #define KCRC_ALIGN 4 |
| 22 | #endif | 20 | #endif |
| 23 | #endif | ||
| 24 | 21 | ||
| 25 | #ifdef CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX | 22 | #ifdef CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX |
| 26 | #define KSYM(name) _##name | 23 | #define KSYM(name) _##name |
| @@ -52,7 +49,11 @@ KSYM(__kstrtab_\name): | |||
| 52 | .section ___kcrctab\sec+\name,"a" | 49 | .section ___kcrctab\sec+\name,"a" |
| 53 | .balign KCRC_ALIGN | 50 | .balign KCRC_ALIGN |
| 54 | KSYM(__kcrctab_\name): | 51 | KSYM(__kcrctab_\name): |
| 55 | __put KSYM(__crc_\name) | 52 | #if defined(CONFIG_MODULE_REL_CRCS) |
| 53 | .long KSYM(__crc_\name) - . | ||
| 54 | #else | ||
| 55 | .long KSYM(__crc_\name) | ||
| 56 | #endif | ||
| 56 | .weak KSYM(__crc_\name) | 57 | .weak KSYM(__crc_\name) |
| 57 | .previous | 58 | .previous |
| 58 | #endif | 59 | #endif |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 21a3a666a2fd..6105c050d7bc 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
| @@ -518,6 +518,7 @@ struct drm_device { | |||
| 518 | struct drm_minor *control; /**< Control node */ | 518 | struct drm_minor *control; /**< Control node */ |
| 519 | struct drm_minor *primary; /**< Primary node */ | 519 | struct drm_minor *primary; /**< Primary node */ |
| 520 | struct drm_minor *render; /**< Render node */ | 520 | struct drm_minor *render; /**< Render node */ |
| 521 | bool registered; | ||
| 521 | 522 | ||
| 522 | /* currently active master for this device. Protected by master_mutex */ | 523 | /* currently active master for this device. Protected by master_mutex */ |
| 523 | struct drm_master *master; | 524 | struct drm_master *master; |
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index 3fa6e8dcb9d8..c6f355a970d2 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h | |||
| @@ -145,7 +145,7 @@ struct __drm_crtcs_state { | |||
| 145 | struct drm_crtc *ptr; | 145 | struct drm_crtc *ptr; |
| 146 | struct drm_crtc_state *state, *old_state, *new_state; | 146 | struct drm_crtc_state *state, *old_state, *new_state; |
| 147 | struct drm_crtc_commit *commit; | 147 | struct drm_crtc_commit *commit; |
| 148 | s64 __user *out_fence_ptr; | 148 | s32 __user *out_fence_ptr; |
| 149 | unsigned last_vblank_count; | 149 | unsigned last_vblank_count; |
| 150 | }; | 150 | }; |
| 151 | 151 | ||
diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h index 6cd541d69c2e..29f734a542c8 100644 --- a/include/drm/drm_mode_config.h +++ b/include/drm/drm_mode_config.h | |||
| @@ -496,7 +496,7 @@ struct drm_mode_config { | |||
| 496 | /** | 496 | /** |
| 497 | * @prop_out_fence_ptr: Sync File fd pointer representing the | 497 | * @prop_out_fence_ptr: Sync File fd pointer representing the |
| 498 | * outgoing fences for a CRTC. Userspace should provide a pointer to a | 498 | * outgoing fences for a CRTC. Userspace should provide a pointer to a |
| 499 | * value of type s64, and then cast that pointer to u64. | 499 | * value of type s32, and then cast that pointer to u64. |
| 500 | */ | 500 | */ |
| 501 | struct drm_property *prop_out_fence_ptr; | 501 | struct drm_property *prop_out_fence_ptr; |
| 502 | /** | 502 | /** |
diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index 220d1e2b3db1..4b76cf2d5a7b 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h | |||
| @@ -193,9 +193,9 @@ int drm_panel_attach(struct drm_panel *panel, struct drm_connector *connector); | |||
| 193 | int drm_panel_detach(struct drm_panel *panel); | 193 | int drm_panel_detach(struct drm_panel *panel); |
| 194 | 194 | ||
| 195 | #ifdef CONFIG_OF | 195 | #ifdef CONFIG_OF |
| 196 | struct drm_panel *of_drm_find_panel(struct device_node *np); | 196 | struct drm_panel *of_drm_find_panel(const struct device_node *np); |
| 197 | #else | 197 | #else |
| 198 | static inline struct drm_panel *of_drm_find_panel(struct device_node *np) | 198 | static inline struct drm_panel *of_drm_find_panel(const struct device_node *np) |
| 199 | { | 199 | { |
| 200 | return NULL; | 200 | return NULL; |
| 201 | } | 201 | } |
diff --git a/include/drm/tinydrm/ili9341.h b/include/drm/tinydrm/ili9341.h new file mode 100644 index 000000000000..807a09f43cad --- /dev/null +++ b/include/drm/tinydrm/ili9341.h | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | /* | ||
| 2 | * ILI9341 LCD controller | ||
| 3 | * | ||
| 4 | * Copyright 2016 Noralf Trønnes | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __LINUX_ILI9341_H | ||
| 13 | #define __LINUX_ILI9341_H | ||
| 14 | |||
| 15 | #define ILI9341_FRMCTR1 0xb1 | ||
| 16 | #define ILI9341_FRMCTR2 0xb2 | ||
| 17 | #define ILI9341_FRMCTR3 0xb3 | ||
| 18 | #define ILI9341_INVTR 0xb4 | ||
| 19 | #define ILI9341_PRCTR 0xb5 | ||
| 20 | #define ILI9341_DISCTRL 0xb6 | ||
| 21 | #define ILI9341_ETMOD 0xb7 | ||
| 22 | |||
| 23 | #define ILI9341_PWCTRL1 0xc0 | ||
| 24 | #define ILI9341_PWCTRL2 0xc1 | ||
| 25 | #define ILI9341_VMCTRL1 0xc5 | ||
| 26 | #define ILI9341_VMCTRL2 0xc7 | ||
| 27 | #define ILI9341_PWCTRLA 0xcb | ||
| 28 | #define ILI9341_PWCTRLB 0xcf | ||
| 29 | |||
| 30 | #define ILI9341_RDID1 0xda | ||
| 31 | #define ILI9341_RDID2 0xdb | ||
| 32 | #define ILI9341_RDID3 0xdc | ||
| 33 | #define ILI9341_RDID4 0xd3 | ||
| 34 | |||
| 35 | #define ILI9341_PGAMCTRL 0xe0 | ||
| 36 | #define ILI9341_NGAMCTRL 0xe1 | ||
| 37 | #define ILI9341_DGAMCTRL1 0xe2 | ||
| 38 | #define ILI9341_DGAMCTRL2 0xe3 | ||
| 39 | #define ILI9341_DTCTRLA 0xe8 | ||
| 40 | #define ILI9341_DTCTRLB 0xea | ||
| 41 | #define ILI9341_PWRSEQ 0xed | ||
| 42 | |||
| 43 | #define ILI9341_EN3GAM 0xf2 | ||
| 44 | #define ILI9341_IFCTRL 0xf6 | ||
| 45 | #define ILI9341_PUMPCTRL 0xf7 | ||
| 46 | |||
| 47 | #define ILI9341_MADCTL_MH BIT(2) | ||
| 48 | #define ILI9341_MADCTL_BGR BIT(3) | ||
| 49 | #define ILI9341_MADCTL_ML BIT(4) | ||
| 50 | #define ILI9341_MADCTL_MV BIT(5) | ||
| 51 | #define ILI9341_MADCTL_MX BIT(6) | ||
| 52 | #define ILI9341_MADCTL_MY BIT(7) | ||
| 53 | |||
| 54 | #endif /* __LINUX_ILI9341_H */ | ||
diff --git a/include/drm/tinydrm/mipi-dbi.h b/include/drm/tinydrm/mipi-dbi.h new file mode 100644 index 000000000000..d137b16ee873 --- /dev/null +++ b/include/drm/tinydrm/mipi-dbi.h | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | /* | ||
| 2 | * MIPI Display Bus Interface (DBI) LCD controller support | ||
| 3 | * | ||
| 4 | * Copyright 2016 Noralf Trønnes | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __LINUX_MIPI_DBI_H | ||
| 13 | #define __LINUX_MIPI_DBI_H | ||
| 14 | |||
| 15 | #include <drm/tinydrm/tinydrm.h> | ||
| 16 | |||
| 17 | struct spi_device; | ||
| 18 | struct gpio_desc; | ||
| 19 | struct regulator; | ||
| 20 | |||
| 21 | /** | ||
| 22 | * struct mipi_dbi - MIPI DBI controller | ||
| 23 | * @tinydrm: tinydrm base | ||
| 24 | * @spi: SPI device | ||
| 25 | * @enabled: Pipeline is enabled | ||
| 26 | * @cmdlock: Command lock | ||
| 27 | * @command: Bus specific callback executing commands. | ||
| 28 | * @read_commands: Array of read commands terminated by a zero entry. | ||
| 29 | * Reading is disabled if this is NULL. | ||
| 30 | * @dc: Optional D/C gpio. | ||
| 31 | * @tx_buf: Buffer used for transfer (copy clip rect area) | ||
| 32 | * @tx_buf9: Buffer used for Option 1 9-bit conversion | ||
| 33 | * @tx_buf9_len: Size of tx_buf9. | ||
| 34 | * @swap_bytes: Swap bytes in buffer before transfer | ||
| 35 | * @reset: Optional reset gpio | ||
| 36 | * @rotation: initial rotation in degrees Counter Clock Wise | ||
| 37 | * @backlight: backlight device (optional) | ||
| 38 | * @regulator: power regulator (optional) | ||
| 39 | */ | ||
| 40 | struct mipi_dbi { | ||
| 41 | struct tinydrm_device tinydrm; | ||
| 42 | struct spi_device *spi; | ||
| 43 | bool enabled; | ||
| 44 | struct mutex cmdlock; | ||
| 45 | int (*command)(struct mipi_dbi *mipi, u8 cmd, u8 *param, size_t num); | ||
| 46 | const u8 *read_commands; | ||
| 47 | struct gpio_desc *dc; | ||
| 48 | u16 *tx_buf; | ||
| 49 | void *tx_buf9; | ||
| 50 | size_t tx_buf9_len; | ||
| 51 | bool swap_bytes; | ||
| 52 | struct gpio_desc *reset; | ||
| 53 | unsigned int rotation; | ||
| 54 | struct backlight_device *backlight; | ||
| 55 | struct regulator *regulator; | ||
| 56 | }; | ||
| 57 | |||
| 58 | static inline struct mipi_dbi * | ||
| 59 | mipi_dbi_from_tinydrm(struct tinydrm_device *tdev) | ||
| 60 | { | ||
| 61 | return container_of(tdev, struct mipi_dbi, tinydrm); | ||
| 62 | } | ||
| 63 | |||
| 64 | int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *mipi, | ||
| 65 | struct gpio_desc *dc, | ||
| 66 | const struct drm_simple_display_pipe_funcs *pipe_funcs, | ||
| 67 | struct drm_driver *driver, | ||
| 68 | const struct drm_display_mode *mode, | ||
| 69 | unsigned int rotation); | ||
| 70 | int mipi_dbi_init(struct device *dev, struct mipi_dbi *mipi, | ||
| 71 | const struct drm_simple_display_pipe_funcs *pipe_funcs, | ||
| 72 | struct drm_driver *driver, | ||
| 73 | const struct drm_display_mode *mode, unsigned int rotation); | ||
| 74 | void mipi_dbi_pipe_enable(struct drm_simple_display_pipe *pipe, | ||
| 75 | struct drm_crtc_state *crtc_state); | ||
| 76 | void mipi_dbi_pipe_disable(struct drm_simple_display_pipe *pipe); | ||
| 77 | void mipi_dbi_hw_reset(struct mipi_dbi *mipi); | ||
| 78 | bool mipi_dbi_display_is_on(struct mipi_dbi *mipi); | ||
| 79 | |||
| 80 | int mipi_dbi_command_read(struct mipi_dbi *mipi, u8 cmd, u8 *val); | ||
| 81 | int mipi_dbi_command_buf(struct mipi_dbi *mipi, u8 cmd, u8 *data, size_t len); | ||
| 82 | |||
| 83 | /** | ||
| 84 | * mipi_dbi_command - MIPI DCS command with optional parameter(s) | ||
| 85 | * @mipi: MIPI structure | ||
| 86 | * @cmd: Command | ||
| 87 | * @seq...: Optional parameter(s) | ||
| 88 | * | ||
| 89 | * Send MIPI DCS command to the controller. Use mipi_dbi_command_read() for | ||
| 90 | * get/read. | ||
| 91 | * | ||
| 92 | * Returns: | ||
| 93 | * Zero on success, negative error code on failure. | ||
| 94 | */ | ||
| 95 | #define mipi_dbi_command(mipi, cmd, seq...) \ | ||
| 96 | ({ \ | ||
| 97 | u8 d[] = { seq }; \ | ||
| 98 | mipi_dbi_command_buf(mipi, cmd, d, ARRAY_SIZE(d)); \ | ||
| 99 | }) | ||
| 100 | |||
| 101 | #ifdef CONFIG_DEBUG_FS | ||
| 102 | int mipi_dbi_debugfs_init(struct drm_minor *minor); | ||
| 103 | #else | ||
| 104 | #define mipi_dbi_debugfs_init NULL | ||
| 105 | #endif | ||
| 106 | |||
| 107 | #endif /* __LINUX_MIPI_DBI_H */ | ||
diff --git a/include/drm/tinydrm/tinydrm-helpers.h b/include/drm/tinydrm/tinydrm-helpers.h new file mode 100644 index 000000000000..9b9b6cfe3ba5 --- /dev/null +++ b/include/drm/tinydrm/tinydrm-helpers.h | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2016 Noralf Trønnes | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __LINUX_TINYDRM_HELPERS_H | ||
| 11 | #define __LINUX_TINYDRM_HELPERS_H | ||
| 12 | |||
| 13 | struct backlight_device; | ||
| 14 | struct tinydrm_device; | ||
| 15 | struct drm_clip_rect; | ||
| 16 | struct spi_transfer; | ||
| 17 | struct spi_message; | ||
| 18 | struct spi_device; | ||
| 19 | struct device; | ||
| 20 | |||
| 21 | /** | ||
| 22 | * tinydrm_machine_little_endian - Machine is little endian | ||
| 23 | * | ||
| 24 | * Returns: | ||
| 25 | * true if *defined(__LITTLE_ENDIAN)*, false otherwise | ||
| 26 | */ | ||
| 27 | static inline bool tinydrm_machine_little_endian(void) | ||
| 28 | { | ||
| 29 | #if defined(__LITTLE_ENDIAN) | ||
| 30 | return true; | ||
| 31 | #else | ||
| 32 | return false; | ||
| 33 | #endif | ||
| 34 | } | ||
| 35 | |||
| 36 | bool tinydrm_merge_clips(struct drm_clip_rect *dst, | ||
| 37 | struct drm_clip_rect *src, unsigned int num_clips, | ||
| 38 | unsigned int flags, u32 max_width, u32 max_height); | ||
| 39 | void tinydrm_memcpy(void *dst, void *vaddr, struct drm_framebuffer *fb, | ||
| 40 | struct drm_clip_rect *clip); | ||
| 41 | void tinydrm_swab16(u16 *dst, void *vaddr, struct drm_framebuffer *fb, | ||
| 42 | struct drm_clip_rect *clip); | ||
| 43 | void tinydrm_xrgb8888_to_rgb565(u16 *dst, void *vaddr, | ||
| 44 | struct drm_framebuffer *fb, | ||
| 45 | struct drm_clip_rect *clip, bool swap); | ||
| 46 | |||
| 47 | struct backlight_device *tinydrm_of_find_backlight(struct device *dev); | ||
| 48 | int tinydrm_enable_backlight(struct backlight_device *backlight); | ||
| 49 | int tinydrm_disable_backlight(struct backlight_device *backlight); | ||
| 50 | |||
| 51 | size_t tinydrm_spi_max_transfer_size(struct spi_device *spi, size_t max_len); | ||
| 52 | bool tinydrm_spi_bpw_supported(struct spi_device *spi, u8 bpw); | ||
| 53 | int tinydrm_spi_transfer(struct spi_device *spi, u32 speed_hz, | ||
| 54 | struct spi_transfer *header, u8 bpw, const void *buf, | ||
| 55 | size_t len); | ||
| 56 | void _tinydrm_dbg_spi_message(struct spi_device *spi, struct spi_message *m); | ||
| 57 | |||
| 58 | #ifdef DEBUG | ||
| 59 | /** | ||
| 60 | * tinydrm_dbg_spi_message - Dump SPI message | ||
| 61 | * @spi: SPI device | ||
| 62 | * @m: SPI message | ||
| 63 | * | ||
| 64 | * Dumps info about the transfers in a SPI message including buffer content. | ||
| 65 | * DEBUG has to be defined for this function to be enabled alongside setting | ||
| 66 | * the DRM_UT_DRIVER bit of &drm_debug. | ||
| 67 | */ | ||
| 68 | static inline void tinydrm_dbg_spi_message(struct spi_device *spi, | ||
| 69 | struct spi_message *m) | ||
| 70 | { | ||
| 71 | if (drm_debug & DRM_UT_DRIVER) | ||
| 72 | _tinydrm_dbg_spi_message(spi, m); | ||
| 73 | } | ||
| 74 | #else | ||
| 75 | static inline void tinydrm_dbg_spi_message(struct spi_device *spi, | ||
| 76 | struct spi_message *m) | ||
| 77 | { | ||
| 78 | } | ||
| 79 | #endif /* DEBUG */ | ||
| 80 | |||
| 81 | #endif /* __LINUX_TINYDRM_HELPERS_H */ | ||
diff --git a/include/drm/tinydrm/tinydrm.h b/include/drm/tinydrm/tinydrm.h new file mode 100644 index 000000000000..cf9ca207b8b1 --- /dev/null +++ b/include/drm/tinydrm/tinydrm.h | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2016 Noralf Trønnes | ||
| 3 | * | ||
| 4 | * This program is free software; you can redistribute it and/or modify | ||
| 5 | * it under the terms of the GNU General Public License as published by | ||
| 6 | * the Free Software Foundation; either version 2 of the License, or | ||
| 7 | * (at your option) any later version. | ||
| 8 | */ | ||
| 9 | |||
| 10 | #ifndef __LINUX_TINYDRM_H | ||
| 11 | #define __LINUX_TINYDRM_H | ||
| 12 | |||
| 13 | #include <drm/drm_gem_cma_helper.h> | ||
| 14 | #include <drm/drm_fb_cma_helper.h> | ||
| 15 | #include <drm/drm_simple_kms_helper.h> | ||
| 16 | |||
| 17 | /** | ||
| 18 | * struct tinydrm_device - tinydrm device | ||
| 19 | * @drm: DRM device | ||
| 20 | * @pipe: Display pipe structure | ||
| 21 | * @dirty_lock: Serializes framebuffer flushing | ||
| 22 | * @fbdev_cma: CMA fbdev structure | ||
| 23 | * @suspend_state: Atomic state when suspended | ||
| 24 | * @fb_funcs: Framebuffer functions used when creating framebuffers | ||
| 25 | */ | ||
| 26 | struct tinydrm_device { | ||
| 27 | struct drm_device *drm; | ||
| 28 | struct drm_simple_display_pipe pipe; | ||
| 29 | struct mutex dirty_lock; | ||
| 30 | struct drm_fbdev_cma *fbdev_cma; | ||
| 31 | struct drm_atomic_state *suspend_state; | ||
| 32 | const struct drm_framebuffer_funcs *fb_funcs; | ||
| 33 | }; | ||
| 34 | |||
| 35 | static inline struct tinydrm_device * | ||
| 36 | pipe_to_tinydrm(struct drm_simple_display_pipe *pipe) | ||
| 37 | { | ||
| 38 | return container_of(pipe, struct tinydrm_device, pipe); | ||
| 39 | } | ||
| 40 | |||
| 41 | /** | ||
| 42 | * TINYDRM_GEM_DRIVER_OPS - default tinydrm gem operations | ||
| 43 | * | ||
| 44 | * This macro provides a shortcut for setting the tinydrm GEM operations in | ||
| 45 | * the &drm_driver structure. | ||
| 46 | */ | ||
| 47 | #define TINYDRM_GEM_DRIVER_OPS \ | ||
| 48 | .gem_free_object = tinydrm_gem_cma_free_object, \ | ||
| 49 | .gem_vm_ops = &drm_gem_cma_vm_ops, \ | ||
| 50 | .prime_handle_to_fd = drm_gem_prime_handle_to_fd, \ | ||
| 51 | .prime_fd_to_handle = drm_gem_prime_fd_to_handle, \ | ||
| 52 | .gem_prime_import = drm_gem_prime_import, \ | ||
| 53 | .gem_prime_export = drm_gem_prime_export, \ | ||
| 54 | .gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table, \ | ||
| 55 | .gem_prime_import_sg_table = tinydrm_gem_cma_prime_import_sg_table, \ | ||
| 56 | .gem_prime_vmap = drm_gem_cma_prime_vmap, \ | ||
| 57 | .gem_prime_vunmap = drm_gem_cma_prime_vunmap, \ | ||
| 58 | .gem_prime_mmap = drm_gem_cma_prime_mmap, \ | ||
| 59 | .dumb_create = drm_gem_cma_dumb_create, \ | ||
| 60 | .dumb_map_offset = drm_gem_cma_dumb_map_offset, \ | ||
| 61 | .dumb_destroy = drm_gem_dumb_destroy, \ | ||
| 62 | .fops = &tinydrm_fops | ||
| 63 | |||
| 64 | /** | ||
| 65 | * TINYDRM_MODE - tinydrm display mode | ||
| 66 | * @hd: Horizontal resolution, width | ||
| 67 | * @vd: Vertical resolution, height | ||
| 68 | * @hd_mm: Display width in millimeters | ||
| 69 | * @vd_mm: Display height in millimeters | ||
| 70 | * | ||
| 71 | * This macro creates a &drm_display_mode for use with tinydrm. | ||
| 72 | */ | ||
| 73 | #define TINYDRM_MODE(hd, vd, hd_mm, vd_mm) \ | ||
| 74 | .hdisplay = (hd), \ | ||
| 75 | .hsync_start = (hd), \ | ||
| 76 | .hsync_end = (hd), \ | ||
| 77 | .htotal = (hd), \ | ||
| 78 | .vdisplay = (vd), \ | ||
| 79 | .vsync_start = (vd), \ | ||
| 80 | .vsync_end = (vd), \ | ||
| 81 | .vtotal = (vd), \ | ||
| 82 | .width_mm = (hd_mm), \ | ||
| 83 | .height_mm = (vd_mm), \ | ||
| 84 | .type = DRM_MODE_TYPE_DRIVER, \ | ||
| 85 | .clock = 1 /* pass validation */ | ||
| 86 | |||
| 87 | extern const struct file_operations tinydrm_fops; | ||
| 88 | void tinydrm_lastclose(struct drm_device *drm); | ||
| 89 | void tinydrm_gem_cma_free_object(struct drm_gem_object *gem_obj); | ||
| 90 | struct drm_gem_object * | ||
| 91 | tinydrm_gem_cma_prime_import_sg_table(struct drm_device *drm, | ||
| 92 | struct dma_buf_attachment *attach, | ||
| 93 | struct sg_table *sgt); | ||
| 94 | int devm_tinydrm_init(struct device *parent, struct tinydrm_device *tdev, | ||
| 95 | const struct drm_framebuffer_funcs *fb_funcs, | ||
| 96 | struct drm_driver *driver); | ||
| 97 | int devm_tinydrm_register(struct tinydrm_device *tdev); | ||
| 98 | void tinydrm_shutdown(struct tinydrm_device *tdev); | ||
| 99 | int tinydrm_suspend(struct tinydrm_device *tdev); | ||
| 100 | int tinydrm_resume(struct tinydrm_device *tdev); | ||
| 101 | |||
| 102 | void tinydrm_display_pipe_update(struct drm_simple_display_pipe *pipe, | ||
| 103 | struct drm_plane_state *old_state); | ||
| 104 | int tinydrm_display_pipe_prepare_fb(struct drm_simple_display_pipe *pipe, | ||
| 105 | struct drm_plane_state *plane_state); | ||
| 106 | int | ||
| 107 | tinydrm_display_pipe_init(struct tinydrm_device *tdev, | ||
| 108 | const struct drm_simple_display_pipe_funcs *funcs, | ||
| 109 | int connector_type, | ||
| 110 | const uint32_t *formats, | ||
| 111 | unsigned int format_count, | ||
| 112 | const struct drm_display_mode *mode, | ||
| 113 | unsigned int rotation); | ||
| 114 | |||
| 115 | #endif /* __LINUX_TINYDRM_H */ | ||
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index 7e75fa053473..a8e8db024980 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h | |||
| @@ -42,7 +42,7 @@ | |||
| 42 | #include <linux/spinlock.h> | 42 | #include <linux/spinlock.h> |
| 43 | #include <linux/reservation.h> | 43 | #include <linux/reservation.h> |
| 44 | 44 | ||
| 45 | #define TTM_MAX_BO_PRIORITY 16 | 45 | #define TTM_MAX_BO_PRIORITY 16U |
| 46 | 46 | ||
| 47 | struct ttm_backend_func { | 47 | struct ttm_backend_func { |
| 48 | /** | 48 | /** |
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 05cf951df3fe..3ed1f3b1d594 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h | |||
| @@ -247,6 +247,8 @@ struct bpf_map * __must_check bpf_map_inc(struct bpf_map *map, bool uref); | |||
| 247 | void bpf_map_put_with_uref(struct bpf_map *map); | 247 | void bpf_map_put_with_uref(struct bpf_map *map); |
| 248 | void bpf_map_put(struct bpf_map *map); | 248 | void bpf_map_put(struct bpf_map *map); |
| 249 | int bpf_map_precharge_memlock(u32 pages); | 249 | int bpf_map_precharge_memlock(u32 pages); |
| 250 | void *bpf_map_area_alloc(size_t size); | ||
| 251 | void bpf_map_area_free(void *base); | ||
| 250 | 252 | ||
| 251 | extern int sysctl_unprivileged_bpf_disabled; | 253 | extern int sysctl_unprivileged_bpf_disabled; |
| 252 | 254 | ||
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index d67ab83823ad..79591c3660cc 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
| @@ -243,12 +243,10 @@ static inline int block_page_mkwrite_return(int err) | |||
| 243 | { | 243 | { |
| 244 | if (err == 0) | 244 | if (err == 0) |
| 245 | return VM_FAULT_LOCKED; | 245 | return VM_FAULT_LOCKED; |
| 246 | if (err == -EFAULT) | 246 | if (err == -EFAULT || err == -EAGAIN) |
| 247 | return VM_FAULT_NOPAGE; | 247 | return VM_FAULT_NOPAGE; |
| 248 | if (err == -ENOMEM) | 248 | if (err == -ENOMEM) |
| 249 | return VM_FAULT_OOM; | 249 | return VM_FAULT_OOM; |
| 250 | if (err == -EAGAIN) | ||
| 251 | return VM_FAULT_RETRY; | ||
| 252 | /* -ENOSPC, -EDQUOT, -EIO ... */ | 250 | /* -ENOSPC, -EDQUOT, -EIO ... */ |
| 253 | return VM_FAULT_SIGBUS; | 251 | return VM_FAULT_SIGBUS; |
| 254 | } | 252 | } |
diff --git a/include/linux/can/core.h b/include/linux/can/core.h index a0875001b13c..df08a41d5be5 100644 --- a/include/linux/can/core.h +++ b/include/linux/can/core.h | |||
| @@ -45,10 +45,9 @@ struct can_proto { | |||
| 45 | extern int can_proto_register(const struct can_proto *cp); | 45 | extern int can_proto_register(const struct can_proto *cp); |
| 46 | extern void can_proto_unregister(const struct can_proto *cp); | 46 | extern void can_proto_unregister(const struct can_proto *cp); |
| 47 | 47 | ||
| 48 | extern int can_rx_register(struct net_device *dev, canid_t can_id, | 48 | int can_rx_register(struct net_device *dev, canid_t can_id, canid_t mask, |
| 49 | canid_t mask, | 49 | void (*func)(struct sk_buff *, void *), |
| 50 | void (*func)(struct sk_buff *, void *), | 50 | void *data, char *ident, struct sock *sk); |
| 51 | void *data, char *ident); | ||
| 52 | 51 | ||
| 53 | extern void can_rx_unregister(struct net_device *dev, canid_t can_id, | 52 | extern void can_rx_unregister(struct net_device *dev, canid_t can_id, |
| 54 | canid_t mask, | 53 | canid_t mask, |
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h index d936a0021839..921acaaa1601 100644 --- a/include/linux/cpuhotplug.h +++ b/include/linux/cpuhotplug.h | |||
| @@ -8,9 +8,7 @@ enum cpuhp_state { | |||
| 8 | CPUHP_CREATE_THREADS, | 8 | CPUHP_CREATE_THREADS, |
| 9 | CPUHP_PERF_PREPARE, | 9 | CPUHP_PERF_PREPARE, |
| 10 | CPUHP_PERF_X86_PREPARE, | 10 | CPUHP_PERF_X86_PREPARE, |
| 11 | CPUHP_PERF_X86_UNCORE_PREP, | ||
| 12 | CPUHP_PERF_X86_AMD_UNCORE_PREP, | 11 | CPUHP_PERF_X86_AMD_UNCORE_PREP, |
| 13 | CPUHP_PERF_X86_RAPL_PREP, | ||
| 14 | CPUHP_PERF_BFIN, | 12 | CPUHP_PERF_BFIN, |
| 15 | CPUHP_PERF_POWER, | 13 | CPUHP_PERF_POWER, |
| 16 | CPUHP_PERF_SUPERH, | 14 | CPUHP_PERF_SUPERH, |
| @@ -86,7 +84,6 @@ enum cpuhp_state { | |||
| 86 | CPUHP_AP_IRQ_ARMADA_XP_STARTING, | 84 | CPUHP_AP_IRQ_ARMADA_XP_STARTING, |
| 87 | CPUHP_AP_IRQ_BCM2836_STARTING, | 85 | CPUHP_AP_IRQ_BCM2836_STARTING, |
| 88 | CPUHP_AP_ARM_MVEBU_COHERENCY, | 86 | CPUHP_AP_ARM_MVEBU_COHERENCY, |
| 89 | CPUHP_AP_PERF_X86_UNCORE_STARTING, | ||
| 90 | CPUHP_AP_PERF_X86_AMD_UNCORE_STARTING, | 87 | CPUHP_AP_PERF_X86_AMD_UNCORE_STARTING, |
| 91 | CPUHP_AP_PERF_X86_STARTING, | 88 | CPUHP_AP_PERF_X86_STARTING, |
| 92 | CPUHP_AP_PERF_X86_AMD_IBS_STARTING, | 89 | CPUHP_AP_PERF_X86_AMD_IBS_STARTING, |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index c717f5ea88cb..b3d2c1a89ac4 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
| @@ -560,7 +560,7 @@ static inline void cpumask_copy(struct cpumask *dstp, | |||
| 560 | static inline int cpumask_parse_user(const char __user *buf, int len, | 560 | static inline int cpumask_parse_user(const char __user *buf, int len, |
| 561 | struct cpumask *dstp) | 561 | struct cpumask *dstp) |
| 562 | { | 562 | { |
| 563 | return bitmap_parse_user(buf, len, cpumask_bits(dstp), nr_cpu_ids); | 563 | return bitmap_parse_user(buf, len, cpumask_bits(dstp), nr_cpumask_bits); |
| 564 | } | 564 | } |
| 565 | 565 | ||
| 566 | /** | 566 | /** |
| @@ -575,7 +575,7 @@ static inline int cpumask_parselist_user(const char __user *buf, int len, | |||
| 575 | struct cpumask *dstp) | 575 | struct cpumask *dstp) |
| 576 | { | 576 | { |
| 577 | return bitmap_parselist_user(buf, len, cpumask_bits(dstp), | 577 | return bitmap_parselist_user(buf, len, cpumask_bits(dstp), |
| 578 | nr_cpu_ids); | 578 | nr_cpumask_bits); |
| 579 | } | 579 | } |
| 580 | 580 | ||
| 581 | /** | 581 | /** |
| @@ -590,7 +590,7 @@ static inline int cpumask_parse(const char *buf, struct cpumask *dstp) | |||
| 590 | char *nl = strchr(buf, '\n'); | 590 | char *nl = strchr(buf, '\n'); |
| 591 | unsigned int len = nl ? (unsigned int)(nl - buf) : strlen(buf); | 591 | unsigned int len = nl ? (unsigned int)(nl - buf) : strlen(buf); |
| 592 | 592 | ||
| 593 | return bitmap_parse(buf, len, cpumask_bits(dstp), nr_cpu_ids); | 593 | return bitmap_parse(buf, len, cpumask_bits(dstp), nr_cpumask_bits); |
| 594 | } | 594 | } |
| 595 | 595 | ||
| 596 | /** | 596 | /** |
| @@ -602,7 +602,7 @@ static inline int cpumask_parse(const char *buf, struct cpumask *dstp) | |||
| 602 | */ | 602 | */ |
| 603 | static inline int cpulist_parse(const char *buf, struct cpumask *dstp) | 603 | static inline int cpulist_parse(const char *buf, struct cpumask *dstp) |
| 604 | { | 604 | { |
| 605 | return bitmap_parselist(buf, cpumask_bits(dstp), nr_cpu_ids); | 605 | return bitmap_parselist(buf, cpumask_bits(dstp), nr_cpumask_bits); |
| 606 | } | 606 | } |
| 607 | 607 | ||
| 608 | /** | 608 | /** |
diff --git a/include/linux/export.h b/include/linux/export.h index 2a0f61fbc731..1a1dfdb2a5c6 100644 --- a/include/linux/export.h +++ b/include/linux/export.h | |||
| @@ -43,12 +43,19 @@ extern struct module __this_module; | |||
| 43 | #ifdef CONFIG_MODVERSIONS | 43 | #ifdef CONFIG_MODVERSIONS |
| 44 | /* Mark the CRC weak since genksyms apparently decides not to | 44 | /* Mark the CRC weak since genksyms apparently decides not to |
| 45 | * generate a checksums for some symbols */ | 45 | * generate a checksums for some symbols */ |
| 46 | #if defined(CONFIG_MODULE_REL_CRCS) | ||
| 46 | #define __CRC_SYMBOL(sym, sec) \ | 47 | #define __CRC_SYMBOL(sym, sec) \ |
| 47 | extern __visible void *__crc_##sym __attribute__((weak)); \ | 48 | asm(" .section \"___kcrctab" sec "+" #sym "\", \"a\" \n" \ |
| 48 | static const unsigned long __kcrctab_##sym \ | 49 | " .weak " VMLINUX_SYMBOL_STR(__crc_##sym) " \n" \ |
| 49 | __used \ | 50 | " .long " VMLINUX_SYMBOL_STR(__crc_##sym) " - . \n" \ |
| 50 | __attribute__((section("___kcrctab" sec "+" #sym), used)) \ | 51 | " .previous \n"); |
| 51 | = (unsigned long) &__crc_##sym; | 52 | #else |
| 53 | #define __CRC_SYMBOL(sym, sec) \ | ||
| 54 | asm(" .section \"___kcrctab" sec "+" #sym "\", \"a\" \n" \ | ||
| 55 | " .weak " VMLINUX_SYMBOL_STR(__crc_##sym) " \n" \ | ||
| 56 | " .long " VMLINUX_SYMBOL_STR(__crc_##sym) " \n" \ | ||
| 57 | " .previous \n"); | ||
| 58 | #endif | ||
| 52 | #else | 59 | #else |
| 53 | #define __CRC_SYMBOL(sym, sec) | 60 | #define __CRC_SYMBOL(sym, sec) |
| 54 | #endif | 61 | #endif |
diff --git a/include/linux/fscache-cache.h b/include/linux/fscache-cache.h index 13ba552e6c09..4c467ef50159 100644 --- a/include/linux/fscache-cache.h +++ b/include/linux/fscache-cache.h | |||
| @@ -360,6 +360,7 @@ struct fscache_object { | |||
| 360 | #define FSCACHE_OBJECT_IS_AVAILABLE 5 /* T if object has become active */ | 360 | #define FSCACHE_OBJECT_IS_AVAILABLE 5 /* T if object has become active */ |
| 361 | #define FSCACHE_OBJECT_RETIRED 6 /* T if object was retired on relinquishment */ | 361 | #define FSCACHE_OBJECT_RETIRED 6 /* T if object was retired on relinquishment */ |
| 362 | #define FSCACHE_OBJECT_KILLED_BY_CACHE 7 /* T if object was killed by the cache */ | 362 | #define FSCACHE_OBJECT_KILLED_BY_CACHE 7 /* T if object was killed by the cache */ |
| 363 | #define FSCACHE_OBJECT_RUN_AFTER_DEAD 8 /* T if object has been dispatched after death */ | ||
| 363 | 364 | ||
| 364 | struct list_head cache_link; /* link in cache->object_list */ | 365 | struct list_head cache_link; /* link in cache->object_list */ |
| 365 | struct hlist_node cookie_link; /* link in cookie->backing_objects */ | 366 | struct hlist_node cookie_link; /* link in cookie->backing_objects */ |
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 42fe43fb0c80..183efde54269 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
| @@ -128,6 +128,7 @@ struct hv_ring_buffer_info { | |||
| 128 | u32 ring_data_startoffset; | 128 | u32 ring_data_startoffset; |
| 129 | u32 priv_write_index; | 129 | u32 priv_write_index; |
| 130 | u32 priv_read_index; | 130 | u32 priv_read_index; |
| 131 | u32 cached_read_index; | ||
| 131 | }; | 132 | }; |
| 132 | 133 | ||
| 133 | /* | 134 | /* |
| @@ -180,6 +181,19 @@ static inline u32 hv_get_bytes_to_write(struct hv_ring_buffer_info *rbi) | |||
| 180 | return write; | 181 | return write; |
| 181 | } | 182 | } |
| 182 | 183 | ||
| 184 | static inline u32 hv_get_cached_bytes_to_write( | ||
| 185 | const struct hv_ring_buffer_info *rbi) | ||
| 186 | { | ||
| 187 | u32 read_loc, write_loc, dsize, write; | ||
| 188 | |||
| 189 | dsize = rbi->ring_datasize; | ||
| 190 | read_loc = rbi->cached_read_index; | ||
| 191 | write_loc = rbi->ring_buffer->write_index; | ||
| 192 | |||
| 193 | write = write_loc >= read_loc ? dsize - (write_loc - read_loc) : | ||
| 194 | read_loc - write_loc; | ||
| 195 | return write; | ||
| 196 | } | ||
| 183 | /* | 197 | /* |
| 184 | * VMBUS version is 32 bit entity broken up into | 198 | * VMBUS version is 32 bit entity broken up into |
| 185 | * two 16 bit quantities: major_number. minor_number. | 199 | * two 16 bit quantities: major_number. minor_number. |
| @@ -1488,7 +1502,7 @@ hv_get_ring_buffer(struct hv_ring_buffer_info *ring_info) | |||
| 1488 | 1502 | ||
| 1489 | static inline void hv_signal_on_read(struct vmbus_channel *channel) | 1503 | static inline void hv_signal_on_read(struct vmbus_channel *channel) |
| 1490 | { | 1504 | { |
| 1491 | u32 cur_write_sz; | 1505 | u32 cur_write_sz, cached_write_sz; |
| 1492 | u32 pending_sz; | 1506 | u32 pending_sz; |
| 1493 | struct hv_ring_buffer_info *rbi = &channel->inbound; | 1507 | struct hv_ring_buffer_info *rbi = &channel->inbound; |
| 1494 | 1508 | ||
| @@ -1512,12 +1526,24 @@ static inline void hv_signal_on_read(struct vmbus_channel *channel) | |||
| 1512 | 1526 | ||
| 1513 | cur_write_sz = hv_get_bytes_to_write(rbi); | 1527 | cur_write_sz = hv_get_bytes_to_write(rbi); |
| 1514 | 1528 | ||
| 1515 | if (cur_write_sz >= pending_sz) | 1529 | if (cur_write_sz < pending_sz) |
| 1530 | return; | ||
| 1531 | |||
| 1532 | cached_write_sz = hv_get_cached_bytes_to_write(rbi); | ||
| 1533 | if (cached_write_sz < pending_sz) | ||
| 1516 | vmbus_setevent(channel); | 1534 | vmbus_setevent(channel); |
| 1517 | 1535 | ||
| 1518 | return; | 1536 | return; |
| 1519 | } | 1537 | } |
| 1520 | 1538 | ||
| 1539 | static inline void | ||
| 1540 | init_cached_read_index(struct vmbus_channel *channel) | ||
| 1541 | { | ||
| 1542 | struct hv_ring_buffer_info *rbi = &channel->inbound; | ||
| 1543 | |||
| 1544 | rbi->cached_read_index = rbi->ring_buffer->read_index; | ||
| 1545 | } | ||
| 1546 | |||
| 1521 | /* | 1547 | /* |
| 1522 | * An API to support in-place processing of incoming VMBUS packets. | 1548 | * An API to support in-place processing of incoming VMBUS packets. |
| 1523 | */ | 1549 | */ |
| @@ -1569,6 +1595,8 @@ static inline void put_pkt_raw(struct vmbus_channel *channel, | |||
| 1569 | * This call commits the read index and potentially signals the host. | 1595 | * This call commits the read index and potentially signals the host. |
| 1570 | * Here is the pattern for using the "in-place" consumption APIs: | 1596 | * Here is the pattern for using the "in-place" consumption APIs: |
| 1571 | * | 1597 | * |
| 1598 | * init_cached_read_index(); | ||
| 1599 | * | ||
| 1572 | * while (get_next_pkt_raw() { | 1600 | * while (get_next_pkt_raw() { |
| 1573 | * process the packet "in-place"; | 1601 | * process the packet "in-place"; |
| 1574 | * put_pkt_raw(); | 1602 | * put_pkt_raw(); |
diff --git a/include/linux/irq.h b/include/linux/irq.h index e79875574b39..39e3254e5769 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -184,6 +184,7 @@ struct irq_data { | |||
| 184 | * | 184 | * |
| 185 | * IRQD_TRIGGER_MASK - Mask for the trigger type bits | 185 | * IRQD_TRIGGER_MASK - Mask for the trigger type bits |
| 186 | * IRQD_SETAFFINITY_PENDING - Affinity setting is pending | 186 | * IRQD_SETAFFINITY_PENDING - Affinity setting is pending |
| 187 | * IRQD_ACTIVATED - Interrupt has already been activated | ||
| 187 | * IRQD_NO_BALANCING - Balancing disabled for this IRQ | 188 | * IRQD_NO_BALANCING - Balancing disabled for this IRQ |
| 188 | * IRQD_PER_CPU - Interrupt is per cpu | 189 | * IRQD_PER_CPU - Interrupt is per cpu |
| 189 | * IRQD_AFFINITY_SET - Interrupt affinity was set | 190 | * IRQD_AFFINITY_SET - Interrupt affinity was set |
| @@ -202,6 +203,7 @@ struct irq_data { | |||
| 202 | enum { | 203 | enum { |
| 203 | IRQD_TRIGGER_MASK = 0xf, | 204 | IRQD_TRIGGER_MASK = 0xf, |
| 204 | IRQD_SETAFFINITY_PENDING = (1 << 8), | 205 | IRQD_SETAFFINITY_PENDING = (1 << 8), |
| 206 | IRQD_ACTIVATED = (1 << 9), | ||
| 205 | IRQD_NO_BALANCING = (1 << 10), | 207 | IRQD_NO_BALANCING = (1 << 10), |
| 206 | IRQD_PER_CPU = (1 << 11), | 208 | IRQD_PER_CPU = (1 << 11), |
| 207 | IRQD_AFFINITY_SET = (1 << 12), | 209 | IRQD_AFFINITY_SET = (1 << 12), |
| @@ -312,6 +314,21 @@ static inline bool irqd_affinity_is_managed(struct irq_data *d) | |||
| 312 | return __irqd_to_state(d) & IRQD_AFFINITY_MANAGED; | 314 | return __irqd_to_state(d) & IRQD_AFFINITY_MANAGED; |
| 313 | } | 315 | } |
| 314 | 316 | ||
| 317 | static inline bool irqd_is_activated(struct irq_data *d) | ||
| 318 | { | ||
| 319 | return __irqd_to_state(d) & IRQD_ACTIVATED; | ||
| 320 | } | ||
| 321 | |||
| 322 | static inline void irqd_set_activated(struct irq_data *d) | ||
| 323 | { | ||
| 324 | __irqd_to_state(d) |= IRQD_ACTIVATED; | ||
| 325 | } | ||
| 326 | |||
| 327 | static inline void irqd_clr_activated(struct irq_data *d) | ||
| 328 | { | ||
| 329 | __irqd_to_state(d) &= ~IRQD_ACTIVATED; | ||
| 330 | } | ||
| 331 | |||
| 315 | #undef __irqd_to_state | 332 | #undef __irqd_to_state |
| 316 | 333 | ||
| 317 | static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d) | 334 | static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d) |
diff --git a/include/linux/log2.h b/include/linux/log2.h index fd7ff3d91e6a..ef3d4f67118c 100644 --- a/include/linux/log2.h +++ b/include/linux/log2.h | |||
| @@ -203,6 +203,17 @@ unsigned long __rounddown_pow_of_two(unsigned long n) | |||
| 203 | * ... and so on. | 203 | * ... and so on. |
| 204 | */ | 204 | */ |
| 205 | 205 | ||
| 206 | #define order_base_2(n) ilog2(roundup_pow_of_two(n)) | 206 | static inline __attribute_const__ |
| 207 | int __order_base_2(unsigned long n) | ||
| 208 | { | ||
| 209 | return n > 1 ? ilog2(n - 1) + 1 : 0; | ||
| 210 | } | ||
| 207 | 211 | ||
| 212 | #define order_base_2(n) \ | ||
| 213 | ( \ | ||
| 214 | __builtin_constant_p(n) ? ( \ | ||
| 215 | ((n) == 0 || (n) == 1) ? 0 : \ | ||
| 216 | ilog2((n) - 1) + 1) : \ | ||
| 217 | __order_base_2(n) \ | ||
| 218 | ) | ||
| 208 | #endif /* _LINUX_LOG2_H */ | 219 | #endif /* _LINUX_LOG2_H */ |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index c1784c0b4f35..134a2f69c21a 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
| @@ -85,7 +85,8 @@ extern int zone_grow_waitqueues(struct zone *zone, unsigned long nr_pages); | |||
| 85 | extern int add_one_highpage(struct page *page, int pfn, int bad_ppro); | 85 | extern int add_one_highpage(struct page *page, int pfn, int bad_ppro); |
| 86 | /* VM interface that may be used by firmware interface */ | 86 | /* VM interface that may be used by firmware interface */ |
| 87 | extern int online_pages(unsigned long, unsigned long, int); | 87 | extern int online_pages(unsigned long, unsigned long, int); |
| 88 | extern int test_pages_in_a_zone(unsigned long, unsigned long); | 88 | extern int test_pages_in_a_zone(unsigned long start_pfn, unsigned long end_pfn, |
| 89 | unsigned long *valid_start, unsigned long *valid_end); | ||
| 89 | extern void __offline_isolated_pages(unsigned long, unsigned long); | 90 | extern void __offline_isolated_pages(unsigned long, unsigned long); |
| 90 | 91 | ||
| 91 | typedef void (*online_page_callback_t)(struct page *page); | 92 | typedef void (*online_page_callback_t)(struct page *page); |
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h index 257173e0095e..f541da68d1e7 100644 --- a/include/linux/micrel_phy.h +++ b/include/linux/micrel_phy.h | |||
| @@ -35,6 +35,8 @@ | |||
| 35 | #define PHY_ID_KSZ886X 0x00221430 | 35 | #define PHY_ID_KSZ886X 0x00221430 |
| 36 | #define PHY_ID_KSZ8863 0x00221435 | 36 | #define PHY_ID_KSZ8863 0x00221435 |
| 37 | 37 | ||
| 38 | #define PHY_ID_KSZ8795 0x00221550 | ||
| 39 | |||
| 38 | /* struct phy_device dev_flags definitions */ | 40 | /* struct phy_device dev_flags definitions */ |
| 39 | #define MICREL_PHY_50MHZ_CLK 0x00000001 | 41 | #define MICREL_PHY_50MHZ_CLK 0x00000001 |
| 40 | #define MICREL_PHY_FXEN 0x00000002 | 42 | #define MICREL_PHY_FXEN 0x00000002 |
diff --git a/include/linux/module.h b/include/linux/module.h index 7c84273d60b9..cc7cba219b20 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -346,7 +346,7 @@ struct module { | |||
| 346 | 346 | ||
| 347 | /* Exported symbols */ | 347 | /* Exported symbols */ |
| 348 | const struct kernel_symbol *syms; | 348 | const struct kernel_symbol *syms; |
| 349 | const unsigned long *crcs; | 349 | const s32 *crcs; |
| 350 | unsigned int num_syms; | 350 | unsigned int num_syms; |
| 351 | 351 | ||
| 352 | /* Kernel parameters. */ | 352 | /* Kernel parameters. */ |
| @@ -359,18 +359,18 @@ struct module { | |||
| 359 | /* GPL-only exported symbols. */ | 359 | /* GPL-only exported symbols. */ |
| 360 | unsigned int num_gpl_syms; | 360 | unsigned int num_gpl_syms; |
| 361 | const struct kernel_symbol *gpl_syms; | 361 | const struct kernel_symbol *gpl_syms; |
| 362 | const unsigned long *gpl_crcs; | 362 | const s32 *gpl_crcs; |
| 363 | 363 | ||
| 364 | #ifdef CONFIG_UNUSED_SYMBOLS | 364 | #ifdef CONFIG_UNUSED_SYMBOLS |
| 365 | /* unused exported symbols. */ | 365 | /* unused exported symbols. */ |
| 366 | const struct kernel_symbol *unused_syms; | 366 | const struct kernel_symbol *unused_syms; |
| 367 | const unsigned long *unused_crcs; | 367 | const s32 *unused_crcs; |
| 368 | unsigned int num_unused_syms; | 368 | unsigned int num_unused_syms; |
| 369 | 369 | ||
| 370 | /* GPL-only, unused exported symbols. */ | 370 | /* GPL-only, unused exported symbols. */ |
| 371 | unsigned int num_unused_gpl_syms; | 371 | unsigned int num_unused_gpl_syms; |
| 372 | const struct kernel_symbol *unused_gpl_syms; | 372 | const struct kernel_symbol *unused_gpl_syms; |
| 373 | const unsigned long *unused_gpl_crcs; | 373 | const s32 *unused_gpl_crcs; |
| 374 | #endif | 374 | #endif |
| 375 | 375 | ||
| 376 | #ifdef CONFIG_MODULE_SIG | 376 | #ifdef CONFIG_MODULE_SIG |
| @@ -382,7 +382,7 @@ struct module { | |||
| 382 | 382 | ||
| 383 | /* symbols that will be GPL-only in the near future. */ | 383 | /* symbols that will be GPL-only in the near future. */ |
| 384 | const struct kernel_symbol *gpl_future_syms; | 384 | const struct kernel_symbol *gpl_future_syms; |
| 385 | const unsigned long *gpl_future_crcs; | 385 | const s32 *gpl_future_crcs; |
| 386 | unsigned int num_gpl_future_syms; | 386 | unsigned int num_gpl_future_syms; |
| 387 | 387 | ||
| 388 | /* Exception table */ | 388 | /* Exception table */ |
| @@ -523,7 +523,7 @@ struct module *find_module(const char *name); | |||
| 523 | 523 | ||
| 524 | struct symsearch { | 524 | struct symsearch { |
| 525 | const struct kernel_symbol *start, *stop; | 525 | const struct kernel_symbol *start, *stop; |
| 526 | const unsigned long *crcs; | 526 | const s32 *crcs; |
| 527 | enum { | 527 | enum { |
| 528 | NOT_GPL_ONLY, | 528 | NOT_GPL_ONLY, |
| 529 | GPL_ONLY, | 529 | GPL_ONLY, |
| @@ -539,7 +539,7 @@ struct symsearch { | |||
| 539 | */ | 539 | */ |
| 540 | const struct kernel_symbol *find_symbol(const char *name, | 540 | const struct kernel_symbol *find_symbol(const char *name, |
| 541 | struct module **owner, | 541 | struct module **owner, |
| 542 | const unsigned long **crc, | 542 | const s32 **crc, |
| 543 | bool gplok, | 543 | bool gplok, |
| 544 | bool warn); | 544 | bool warn); |
| 545 | 545 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9bde9558b596..27914672602d 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -866,11 +866,15 @@ struct netdev_xdp { | |||
| 866 | * of useless work if you return NETDEV_TX_BUSY. | 866 | * of useless work if you return NETDEV_TX_BUSY. |
| 867 | * Required; cannot be NULL. | 867 | * Required; cannot be NULL. |
| 868 | * | 868 | * |
| 869 | * netdev_features_t (*ndo_fix_features)(struct net_device *dev, | 869 | * netdev_features_t (*ndo_features_check)(struct sk_buff *skb, |
| 870 | * netdev_features_t features); | 870 | * struct net_device *dev |
| 871 | * Adjusts the requested feature flags according to device-specific | 871 | * netdev_features_t features); |
| 872 | * constraints, and returns the resulting flags. Must not modify | 872 | * Called by core transmit path to determine if device is capable of |
| 873 | * the device state. | 873 | * performing offload operations on a given packet. This is to give |
| 874 | * the device an opportunity to implement any restrictions that cannot | ||
| 875 | * be otherwise expressed by feature flags. The check is called with | ||
| 876 | * the set of features that the stack has calculated and it returns | ||
| 877 | * those the driver believes to be appropriate. | ||
| 874 | * | 878 | * |
| 875 | * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb, | 879 | * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb, |
| 876 | * void *accel_priv, select_queue_fallback_t fallback); | 880 | * void *accel_priv, select_queue_fallback_t fallback); |
| @@ -1028,6 +1032,12 @@ struct netdev_xdp { | |||
| 1028 | * Called to release previously enslaved netdev. | 1032 | * Called to release previously enslaved netdev. |
| 1029 | * | 1033 | * |
| 1030 | * Feature/offload setting functions. | 1034 | * Feature/offload setting functions. |
| 1035 | * netdev_features_t (*ndo_fix_features)(struct net_device *dev, | ||
| 1036 | * netdev_features_t features); | ||
| 1037 | * Adjusts the requested feature flags according to device-specific | ||
| 1038 | * constraints, and returns the resulting flags. Must not modify | ||
| 1039 | * the device state. | ||
| 1040 | * | ||
| 1031 | * int (*ndo_set_features)(struct net_device *dev, netdev_features_t features); | 1041 | * int (*ndo_set_features)(struct net_device *dev, netdev_features_t features); |
| 1032 | * Called to update device configuration to new features. Passed | 1042 | * Called to update device configuration to new features. Passed |
| 1033 | * feature set might be less than what was returned by ndo_fix_features()). | 1043 | * feature set might be less than what was returned by ndo_fix_features()). |
| @@ -1100,15 +1110,6 @@ struct netdev_xdp { | |||
| 1100 | * Callback to use for xmit over the accelerated station. This | 1110 | * Callback to use for xmit over the accelerated station. This |
| 1101 | * is used in place of ndo_start_xmit on accelerated net | 1111 | * is used in place of ndo_start_xmit on accelerated net |
| 1102 | * devices. | 1112 | * devices. |
| 1103 | * netdev_features_t (*ndo_features_check)(struct sk_buff *skb, | ||
| 1104 | * struct net_device *dev | ||
| 1105 | * netdev_features_t features); | ||
| 1106 | * Called by core transmit path to determine if device is capable of | ||
| 1107 | * performing offload operations on a given packet. This is to give | ||
| 1108 | * the device an opportunity to implement any restrictions that cannot | ||
| 1109 | * be otherwise expressed by feature flags. The check is called with | ||
| 1110 | * the set of features that the stack has calculated and it returns | ||
| 1111 | * those the driver believes to be appropriate. | ||
| 1112 | * int (*ndo_set_tx_maxrate)(struct net_device *dev, | 1113 | * int (*ndo_set_tx_maxrate)(struct net_device *dev, |
| 1113 | * int queue_index, u32 maxrate); | 1114 | * int queue_index, u32 maxrate); |
| 1114 | * Called when a user wants to set a max-rate limitation of specific | 1115 | * Called when a user wants to set a max-rate limitation of specific |
| @@ -1510,6 +1511,7 @@ enum netdev_priv_flags { | |||
| 1510 | * @max_mtu: Interface Maximum MTU value | 1511 | * @max_mtu: Interface Maximum MTU value |
| 1511 | * @type: Interface hardware type | 1512 | * @type: Interface hardware type |
| 1512 | * @hard_header_len: Maximum hardware header length. | 1513 | * @hard_header_len: Maximum hardware header length. |
| 1514 | * @min_header_len: Minimum hardware header length | ||
| 1513 | * | 1515 | * |
| 1514 | * @needed_headroom: Extra headroom the hardware may need, but not in all | 1516 | * @needed_headroom: Extra headroom the hardware may need, but not in all |
| 1515 | * cases can this be guaranteed | 1517 | * cases can this be guaranteed |
| @@ -1727,6 +1729,7 @@ struct net_device { | |||
| 1727 | unsigned int max_mtu; | 1729 | unsigned int max_mtu; |
| 1728 | unsigned short type; | 1730 | unsigned short type; |
| 1729 | unsigned short hard_header_len; | 1731 | unsigned short hard_header_len; |
| 1732 | unsigned short min_header_len; | ||
| 1730 | 1733 | ||
| 1731 | unsigned short needed_headroom; | 1734 | unsigned short needed_headroom; |
| 1732 | unsigned short needed_tailroom; | 1735 | unsigned short needed_tailroom; |
| @@ -2693,6 +2696,8 @@ static inline bool dev_validate_header(const struct net_device *dev, | |||
| 2693 | { | 2696 | { |
| 2694 | if (likely(len >= dev->hard_header_len)) | 2697 | if (likely(len >= dev->hard_header_len)) |
| 2695 | return true; | 2698 | return true; |
| 2699 | if (len < dev->min_header_len) | ||
| 2700 | return false; | ||
| 2696 | 2701 | ||
| 2697 | if (capable(CAP_SYS_RAWIO)) { | 2702 | if (capable(CAP_SYS_RAWIO)) { |
| 2698 | memset(ll_header + len, 0, dev->hard_header_len - len); | 2703 | memset(ll_header + len, 0, dev->hard_header_len - len); |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index bca536341d1a..1b1ca04820a3 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
| @@ -282,7 +282,7 @@ enum nfsstat4 { | |||
| 282 | 282 | ||
| 283 | static inline bool seqid_mutating_err(u32 err) | 283 | static inline bool seqid_mutating_err(u32 err) |
| 284 | { | 284 | { |
| 285 | /* rfc 3530 section 8.1.5: */ | 285 | /* See RFC 7530, section 9.1.7 */ |
| 286 | switch (err) { | 286 | switch (err) { |
| 287 | case NFS4ERR_STALE_CLIENTID: | 287 | case NFS4ERR_STALE_CLIENTID: |
| 288 | case NFS4ERR_STALE_STATEID: | 288 | case NFS4ERR_STALE_STATEID: |
| @@ -291,6 +291,7 @@ static inline bool seqid_mutating_err(u32 err) | |||
| 291 | case NFS4ERR_BADXDR: | 291 | case NFS4ERR_BADXDR: |
| 292 | case NFS4ERR_RESOURCE: | 292 | case NFS4ERR_RESOURCE: |
| 293 | case NFS4ERR_NOFILEHANDLE: | 293 | case NFS4ERR_NOFILEHANDLE: |
| 294 | case NFS4ERR_MOVED: | ||
| 294 | return false; | 295 | return false; |
| 295 | }; | 296 | }; |
| 296 | return true; | 297 | return true; |
diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h index 1c7eec09e5eb..3a481a49546e 100644 --- a/include/linux/percpu-refcount.h +++ b/include/linux/percpu-refcount.h | |||
| @@ -204,7 +204,7 @@ static inline void percpu_ref_get(struct percpu_ref *ref) | |||
| 204 | static inline bool percpu_ref_tryget(struct percpu_ref *ref) | 204 | static inline bool percpu_ref_tryget(struct percpu_ref *ref) |
| 205 | { | 205 | { |
| 206 | unsigned long __percpu *percpu_count; | 206 | unsigned long __percpu *percpu_count; |
| 207 | int ret; | 207 | bool ret; |
| 208 | 208 | ||
| 209 | rcu_read_lock_sched(); | 209 | rcu_read_lock_sched(); |
| 210 | 210 | ||
| @@ -238,7 +238,7 @@ static inline bool percpu_ref_tryget(struct percpu_ref *ref) | |||
| 238 | static inline bool percpu_ref_tryget_live(struct percpu_ref *ref) | 238 | static inline bool percpu_ref_tryget_live(struct percpu_ref *ref) |
| 239 | { | 239 | { |
| 240 | unsigned long __percpu *percpu_count; | 240 | unsigned long __percpu *percpu_count; |
| 241 | int ret = false; | 241 | bool ret = false; |
| 242 | 242 | ||
| 243 | rcu_read_lock_sched(); | 243 | rcu_read_lock_sched(); |
| 244 | 244 | ||
diff --git a/include/linux/phy.h b/include/linux/phy.h index f7d95f644eed..7fc1105605bf 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
| @@ -25,7 +25,6 @@ | |||
| 25 | #include <linux/timer.h> | 25 | #include <linux/timer.h> |
| 26 | #include <linux/workqueue.h> | 26 | #include <linux/workqueue.h> |
| 27 | #include <linux/mod_devicetable.h> | 27 | #include <linux/mod_devicetable.h> |
| 28 | #include <linux/phy_led_triggers.h> | ||
| 29 | 28 | ||
| 30 | #include <linux/atomic.h> | 29 | #include <linux/atomic.h> |
| 31 | 30 | ||
diff --git a/include/linux/phy_led_triggers.h b/include/linux/phy_led_triggers.h index a2daea0a37d2..b37b05bfd1a6 100644 --- a/include/linux/phy_led_triggers.h +++ b/include/linux/phy_led_triggers.h | |||
| @@ -18,11 +18,11 @@ struct phy_device; | |||
| 18 | #ifdef CONFIG_LED_TRIGGER_PHY | 18 | #ifdef CONFIG_LED_TRIGGER_PHY |
| 19 | 19 | ||
| 20 | #include <linux/leds.h> | 20 | #include <linux/leds.h> |
| 21 | #include <linux/phy.h> | ||
| 21 | 22 | ||
| 22 | #define PHY_LED_TRIGGER_SPEED_SUFFIX_SIZE 10 | 23 | #define PHY_LED_TRIGGER_SPEED_SUFFIX_SIZE 10 |
| 23 | #define PHY_MII_BUS_ID_SIZE (20 - 3) | ||
| 24 | 24 | ||
| 25 | #define PHY_LINK_LED_TRIGGER_NAME_SIZE (PHY_MII_BUS_ID_SIZE + \ | 25 | #define PHY_LINK_LED_TRIGGER_NAME_SIZE (MII_BUS_ID_SIZE + \ |
| 26 | FIELD_SIZEOF(struct mdio_device, addr)+\ | 26 | FIELD_SIZEOF(struct mdio_device, addr)+\ |
| 27 | PHY_LED_TRIGGER_SPEED_SUFFIX_SIZE) | 27 | PHY_LED_TRIGGER_SPEED_SUFFIX_SIZE) |
| 28 | 28 | ||
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 85cc819676e8..333ad11b3dd9 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
| @@ -216,5 +216,6 @@ void rpc_clnt_xprt_switch_put(struct rpc_clnt *); | |||
| 216 | void rpc_clnt_xprt_switch_add_xprt(struct rpc_clnt *, struct rpc_xprt *); | 216 | void rpc_clnt_xprt_switch_add_xprt(struct rpc_clnt *, struct rpc_xprt *); |
| 217 | bool rpc_clnt_xprt_switch_has_addr(struct rpc_clnt *clnt, | 217 | bool rpc_clnt_xprt_switch_has_addr(struct rpc_clnt *clnt, |
| 218 | const struct sockaddr *sap); | 218 | const struct sockaddr *sap); |
| 219 | void rpc_cleanup_clids(void); | ||
| 219 | #endif /* __KERNEL__ */ | 220 | #endif /* __KERNEL__ */ |
| 220 | #endif /* _LINUX_SUNRPC_CLNT_H */ | 221 | #endif /* _LINUX_SUNRPC_CLNT_H */ |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 0c729c3c8549..d9718378a8be 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
| @@ -194,8 +194,6 @@ struct platform_freeze_ops { | |||
| 194 | }; | 194 | }; |
| 195 | 195 | ||
| 196 | #ifdef CONFIG_SUSPEND | 196 | #ifdef CONFIG_SUSPEND |
| 197 | extern suspend_state_t mem_sleep_default; | ||
| 198 | |||
| 199 | /** | 197 | /** |
| 200 | * suspend_set_ops - set platform dependent suspend operations | 198 | * suspend_set_ops - set platform dependent suspend operations |
| 201 | * @ops: The new suspend operations to set. | 199 | * @ops: The new suspend operations to set. |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 66204007d7ac..5209b5ed2a64 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
| @@ -56,7 +56,8 @@ static inline int virtio_net_hdr_to_skb(struct sk_buff *skb, | |||
| 56 | 56 | ||
| 57 | static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb, | 57 | static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb, |
| 58 | struct virtio_net_hdr *hdr, | 58 | struct virtio_net_hdr *hdr, |
| 59 | bool little_endian) | 59 | bool little_endian, |
| 60 | bool has_data_valid) | ||
| 60 | { | 61 | { |
| 61 | memset(hdr, 0, sizeof(*hdr)); /* no info leak */ | 62 | memset(hdr, 0, sizeof(*hdr)); /* no info leak */ |
| 62 | 63 | ||
| @@ -91,7 +92,8 @@ static inline int virtio_net_hdr_from_skb(const struct sk_buff *skb, | |||
| 91 | skb_checksum_start_offset(skb)); | 92 | skb_checksum_start_offset(skb)); |
| 92 | hdr->csum_offset = __cpu_to_virtio16(little_endian, | 93 | hdr->csum_offset = __cpu_to_virtio16(little_endian, |
| 93 | skb->csum_offset); | 94 | skb->csum_offset); |
| 94 | } else if (skb->ip_summed == CHECKSUM_UNNECESSARY) { | 95 | } else if (has_data_valid && |
| 96 | skb->ip_summed == CHECKSUM_UNNECESSARY) { | ||
| 95 | hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID; | 97 | hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID; |
| 96 | } /* else everything is zero */ | 98 | } /* else everything is zero */ |
| 97 | 99 | ||
diff --git a/include/net/cipso_ipv4.h b/include/net/cipso_ipv4.h index 3ebb168b9afc..a34b141f125f 100644 --- a/include/net/cipso_ipv4.h +++ b/include/net/cipso_ipv4.h | |||
| @@ -309,6 +309,10 @@ static inline int cipso_v4_validate(const struct sk_buff *skb, | |||
| 309 | } | 309 | } |
| 310 | 310 | ||
| 311 | for (opt_iter = 6; opt_iter < opt_len;) { | 311 | for (opt_iter = 6; opt_iter < opt_len;) { |
| 312 | if (opt_iter + 1 == opt_len) { | ||
| 313 | err_offset = opt_iter; | ||
| 314 | goto out; | ||
| 315 | } | ||
| 312 | tag_len = opt[opt_iter + 1]; | 316 | tag_len = opt[opt_iter + 1]; |
| 313 | if ((tag_len == 0) || (tag_len > (opt_len - opt_iter))) { | 317 | if ((tag_len == 0) || (tag_len > (opt_len - opt_iter))) { |
| 314 | err_offset = opt_iter + 1; | 318 | err_offset = opt_iter + 1; |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 487e57391664..dbf0abba33b8 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
| @@ -776,6 +776,11 @@ static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb, | |||
| 776 | { | 776 | { |
| 777 | u32 hash; | 777 | u32 hash; |
| 778 | 778 | ||
| 779 | /* @flowlabel may include more than a flow label, eg, the traffic class. | ||
| 780 | * Here we want only the flow label value. | ||
| 781 | */ | ||
| 782 | flowlabel &= IPV6_FLOWLABEL_MASK; | ||
| 783 | |||
| 779 | if (flowlabel || | 784 | if (flowlabel || |
| 780 | net->ipv6.sysctl.auto_flowlabels == IP6_AUTO_FLOW_LABEL_OFF || | 785 | net->ipv6.sysctl.auto_flowlabels == IP6_AUTO_FLOW_LABEL_OFF || |
| 781 | (!autolabel && | 786 | (!autolabel && |
| @@ -871,7 +876,7 @@ int ip6_rcv_finish(struct net *net, struct sock *sk, struct sk_buff *skb); | |||
| 871 | * upper-layer output functions | 876 | * upper-layer output functions |
| 872 | */ | 877 | */ |
| 873 | int ip6_xmit(const struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6, | 878 | int ip6_xmit(const struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6, |
| 874 | struct ipv6_txoptions *opt, int tclass); | 879 | __u32 mark, struct ipv6_txoptions *opt, int tclass); |
| 875 | 880 | ||
| 876 | int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr); | 881 | int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr); |
| 877 | 882 | ||
diff --git a/include/net/lwtunnel.h b/include/net/lwtunnel.h index d4c1c75b8862..0388b9c5f5e2 100644 --- a/include/net/lwtunnel.h +++ b/include/net/lwtunnel.h | |||
| @@ -44,6 +44,8 @@ struct lwtunnel_encap_ops { | |||
| 44 | int (*get_encap_size)(struct lwtunnel_state *lwtstate); | 44 | int (*get_encap_size)(struct lwtunnel_state *lwtstate); |
| 45 | int (*cmp_encap)(struct lwtunnel_state *a, struct lwtunnel_state *b); | 45 | int (*cmp_encap)(struct lwtunnel_state *a, struct lwtunnel_state *b); |
| 46 | int (*xmit)(struct sk_buff *skb); | 46 | int (*xmit)(struct sk_buff *skb); |
| 47 | |||
| 48 | struct module *owner; | ||
| 47 | }; | 49 | }; |
| 48 | 50 | ||
| 49 | #ifdef CONFIG_LWTUNNEL | 51 | #ifdef CONFIG_LWTUNNEL |
| @@ -105,6 +107,8 @@ int lwtunnel_encap_add_ops(const struct lwtunnel_encap_ops *op, | |||
| 105 | unsigned int num); | 107 | unsigned int num); |
| 106 | int lwtunnel_encap_del_ops(const struct lwtunnel_encap_ops *op, | 108 | int lwtunnel_encap_del_ops(const struct lwtunnel_encap_ops *op, |
| 107 | unsigned int num); | 109 | unsigned int num); |
| 110 | int lwtunnel_valid_encap_type(u16 encap_type); | ||
| 111 | int lwtunnel_valid_encap_type_attr(struct nlattr *attr, int len); | ||
| 108 | int lwtunnel_build_state(struct net_device *dev, u16 encap_type, | 112 | int lwtunnel_build_state(struct net_device *dev, u16 encap_type, |
| 109 | struct nlattr *encap, | 113 | struct nlattr *encap, |
| 110 | unsigned int family, const void *cfg, | 114 | unsigned int family, const void *cfg, |
| @@ -168,6 +172,18 @@ static inline int lwtunnel_encap_del_ops(const struct lwtunnel_encap_ops *op, | |||
| 168 | return -EOPNOTSUPP; | 172 | return -EOPNOTSUPP; |
| 169 | } | 173 | } |
| 170 | 174 | ||
| 175 | static inline int lwtunnel_valid_encap_type(u16 encap_type) | ||
| 176 | { | ||
| 177 | return -EOPNOTSUPP; | ||
| 178 | } | ||
| 179 | static inline int lwtunnel_valid_encap_type_attr(struct nlattr *attr, int len) | ||
| 180 | { | ||
| 181 | /* return 0 since we are not walking attr looking for | ||
| 182 | * RTA_ENCAP_TYPE attribute on nexthops. | ||
| 183 | */ | ||
| 184 | return 0; | ||
| 185 | } | ||
| 186 | |||
| 171 | static inline int lwtunnel_build_state(struct net_device *dev, u16 encap_type, | 187 | static inline int lwtunnel_build_state(struct net_device *dev, u16 encap_type, |
| 172 | struct nlattr *encap, | 188 | struct nlattr *encap, |
| 173 | unsigned int family, const void *cfg, | 189 | unsigned int family, const void *cfg, |
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 924325c46aab..7dfdb517f0be 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h | |||
| @@ -207,9 +207,9 @@ struct nft_set_iter { | |||
| 207 | unsigned int skip; | 207 | unsigned int skip; |
| 208 | int err; | 208 | int err; |
| 209 | int (*fn)(const struct nft_ctx *ctx, | 209 | int (*fn)(const struct nft_ctx *ctx, |
| 210 | const struct nft_set *set, | 210 | struct nft_set *set, |
| 211 | const struct nft_set_iter *iter, | 211 | const struct nft_set_iter *iter, |
| 212 | const struct nft_set_elem *elem); | 212 | struct nft_set_elem *elem); |
| 213 | }; | 213 | }; |
| 214 | 214 | ||
| 215 | /** | 215 | /** |
| @@ -301,7 +301,7 @@ struct nft_set_ops { | |||
| 301 | void (*remove)(const struct nft_set *set, | 301 | void (*remove)(const struct nft_set *set, |
| 302 | const struct nft_set_elem *elem); | 302 | const struct nft_set_elem *elem); |
| 303 | void (*walk)(const struct nft_ctx *ctx, | 303 | void (*walk)(const struct nft_ctx *ctx, |
| 304 | const struct nft_set *set, | 304 | struct nft_set *set, |
| 305 | struct nft_set_iter *iter); | 305 | struct nft_set_iter *iter); |
| 306 | 306 | ||
| 307 | unsigned int (*privsize)(const struct nlattr * const nla[]); | 307 | unsigned int (*privsize)(const struct nlattr * const nla[]); |
diff --git a/include/net/netfilter/nft_fib.h b/include/net/netfilter/nft_fib.h index cbedda077db2..5ceb2205e4e3 100644 --- a/include/net/netfilter/nft_fib.h +++ b/include/net/netfilter/nft_fib.h | |||
| @@ -9,6 +9,12 @@ struct nft_fib { | |||
| 9 | 9 | ||
| 10 | extern const struct nla_policy nft_fib_policy[]; | 10 | extern const struct nla_policy nft_fib_policy[]; |
| 11 | 11 | ||
| 12 | static inline bool | ||
| 13 | nft_fib_is_loopback(const struct sk_buff *skb, const struct net_device *in) | ||
| 14 | { | ||
| 15 | return skb->pkt_type == PACKET_LOOPBACK || in->flags & IFF_LOOPBACK; | ||
| 16 | } | ||
| 17 | |||
| 12 | int nft_fib_dump(struct sk_buff *skb, const struct nft_expr *expr); | 18 | int nft_fib_dump(struct sk_buff *skb, const struct nft_expr *expr); |
| 13 | int nft_fib_init(const struct nft_ctx *ctx, const struct nft_expr *expr, | 19 | int nft_fib_init(const struct nft_ctx *ctx, const struct nft_expr *expr, |
| 14 | const struct nlattr * const tb[]); | 20 | const struct nlattr * const tb[]); |
diff --git a/include/net/sock.h b/include/net/sock.h index f0e867f58722..c4f5e6fca17c 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -2006,7 +2006,9 @@ void sk_reset_timer(struct sock *sk, struct timer_list *timer, | |||
| 2006 | void sk_stop_timer(struct sock *sk, struct timer_list *timer); | 2006 | void sk_stop_timer(struct sock *sk, struct timer_list *timer); |
| 2007 | 2007 | ||
| 2008 | int __sk_queue_drop_skb(struct sock *sk, struct sk_buff *skb, | 2008 | int __sk_queue_drop_skb(struct sock *sk, struct sk_buff *skb, |
| 2009 | unsigned int flags); | 2009 | unsigned int flags, |
| 2010 | void (*destructor)(struct sock *sk, | ||
| 2011 | struct sk_buff *skb)); | ||
| 2010 | int __sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); | 2012 | int __sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); |
| 2011 | int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); | 2013 | int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); |
| 2012 | 2014 | ||
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 958a24d8fae7..b567e4452a47 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h | |||
| @@ -352,6 +352,20 @@ static inline int ib_mtu_enum_to_int(enum ib_mtu mtu) | |||
| 352 | } | 352 | } |
| 353 | } | 353 | } |
| 354 | 354 | ||
| 355 | static inline enum ib_mtu ib_mtu_int_to_enum(int mtu) | ||
| 356 | { | ||
| 357 | if (mtu >= 4096) | ||
| 358 | return IB_MTU_4096; | ||
| 359 | else if (mtu >= 2048) | ||
| 360 | return IB_MTU_2048; | ||
| 361 | else if (mtu >= 1024) | ||
| 362 | return IB_MTU_1024; | ||
| 363 | else if (mtu >= 512) | ||
| 364 | return IB_MTU_512; | ||
| 365 | else | ||
| 366 | return IB_MTU_256; | ||
| 367 | } | ||
| 368 | |||
| 355 | enum ib_port_state { | 369 | enum ib_port_state { |
| 356 | IB_PORT_NOP = 0, | 370 | IB_PORT_NOP = 0, |
| 357 | IB_PORT_DOWN = 1, | 371 | IB_PORT_DOWN = 1, |
diff --git a/include/soc/arc/mcip.h b/include/soc/arc/mcip.h index 6902c2a8bd23..4b6b489a8d7c 100644 --- a/include/soc/arc/mcip.h +++ b/include/soc/arc/mcip.h | |||
| @@ -55,17 +55,17 @@ struct mcip_cmd { | |||
| 55 | 55 | ||
| 56 | struct mcip_bcr { | 56 | struct mcip_bcr { |
| 57 | #ifdef CONFIG_CPU_BIG_ENDIAN | 57 | #ifdef CONFIG_CPU_BIG_ENDIAN |
| 58 | unsigned int pad3:8, | 58 | unsigned int pad4:6, pw_dom:1, pad3:1, |
| 59 | idu:1, llm:1, num_cores:6, | 59 | idu:1, pad2:1, num_cores:6, |
| 60 | iocoh:1, gfrc:1, dbg:1, pad2:1, | 60 | pad:1, gfrc:1, dbg:1, pw:1, |
| 61 | msg:1, sem:1, ipi:1, pad:1, | 61 | msg:1, sem:1, ipi:1, slv:1, |
| 62 | ver:8; | 62 | ver:8; |
| 63 | #else | 63 | #else |
| 64 | unsigned int ver:8, | 64 | unsigned int ver:8, |
| 65 | pad:1, ipi:1, sem:1, msg:1, | 65 | slv:1, ipi:1, sem:1, msg:1, |
| 66 | pad2:1, dbg:1, gfrc:1, iocoh:1, | 66 | pw:1, dbg:1, gfrc:1, pad:1, |
| 67 | num_cores:6, llm:1, idu:1, | 67 | num_cores:6, pad2:1, idu:1, |
| 68 | pad3:8; | 68 | pad3:1, pw_dom:1, pad4:6; |
| 69 | #endif | 69 | #endif |
| 70 | }; | 70 | }; |
| 71 | 71 | ||
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 43edf82e54ff..da854fb4530f 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -538,6 +538,7 @@ struct se_node_acl { | |||
| 538 | char initiatorname[TRANSPORT_IQN_LEN]; | 538 | char initiatorname[TRANSPORT_IQN_LEN]; |
| 539 | /* Used to signal demo mode created ACL, disabled by default */ | 539 | /* Used to signal demo mode created ACL, disabled by default */ |
| 540 | bool dynamic_node_acl; | 540 | bool dynamic_node_acl; |
| 541 | bool dynamic_stop; | ||
| 541 | u32 queue_depth; | 542 | u32 queue_depth; |
| 542 | u32 acl_index; | 543 | u32 acl_index; |
| 543 | enum target_prot_type saved_prot_type; | 544 | enum target_prot_type saved_prot_type; |
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index f330ba4547cf..900129c8f6cf 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild | |||
| @@ -109,6 +109,7 @@ header-y += dlm_netlink.h | |||
| 109 | header-y += dlm_plock.h | 109 | header-y += dlm_plock.h |
| 110 | header-y += dm-ioctl.h | 110 | header-y += dm-ioctl.h |
| 111 | header-y += dm-log-userspace.h | 111 | header-y += dm-log-userspace.h |
| 112 | header-y += dma-buf.h | ||
| 112 | header-y += dn.h | 113 | header-y += dn.h |
| 113 | header-y += dqblk_xfs.h | 114 | header-y += dqblk_xfs.h |
| 114 | header-y += edd.h | 115 | header-y += edd.h |
diff --git a/include/uapi/linux/cec-funcs.h b/include/uapi/linux/cec-funcs.h index 3cbc327801d6..c451eec42a83 100644 --- a/include/uapi/linux/cec-funcs.h +++ b/include/uapi/linux/cec-funcs.h | |||
| @@ -1665,14 +1665,15 @@ static inline void cec_msg_report_current_latency(struct cec_msg *msg, | |||
| 1665 | __u8 audio_out_compensated, | 1665 | __u8 audio_out_compensated, |
| 1666 | __u8 audio_out_delay) | 1666 | __u8 audio_out_delay) |
| 1667 | { | 1667 | { |
| 1668 | msg->len = 7; | 1668 | msg->len = 6; |
| 1669 | msg->msg[0] |= 0xf; /* broadcast */ | 1669 | msg->msg[0] |= 0xf; /* broadcast */ |
| 1670 | msg->msg[1] = CEC_MSG_REPORT_CURRENT_LATENCY; | 1670 | msg->msg[1] = CEC_MSG_REPORT_CURRENT_LATENCY; |
| 1671 | msg->msg[2] = phys_addr >> 8; | 1671 | msg->msg[2] = phys_addr >> 8; |
| 1672 | msg->msg[3] = phys_addr & 0xff; | 1672 | msg->msg[3] = phys_addr & 0xff; |
| 1673 | msg->msg[4] = video_latency; | 1673 | msg->msg[4] = video_latency; |
| 1674 | msg->msg[5] = (low_latency_mode << 2) | audio_out_compensated; | 1674 | msg->msg[5] = (low_latency_mode << 2) | audio_out_compensated; |
| 1675 | msg->msg[6] = audio_out_delay; | 1675 | if (audio_out_compensated == 3) |
| 1676 | msg->msg[msg->len++] = audio_out_delay; | ||
| 1676 | } | 1677 | } |
| 1677 | 1678 | ||
| 1678 | static inline void cec_ops_report_current_latency(const struct cec_msg *msg, | 1679 | static inline void cec_ops_report_current_latency(const struct cec_msg *msg, |
| @@ -1686,7 +1687,10 @@ static inline void cec_ops_report_current_latency(const struct cec_msg *msg, | |||
| 1686 | *video_latency = msg->msg[4]; | 1687 | *video_latency = msg->msg[4]; |
| 1687 | *low_latency_mode = (msg->msg[5] >> 2) & 1; | 1688 | *low_latency_mode = (msg->msg[5] >> 2) & 1; |
| 1688 | *audio_out_compensated = msg->msg[5] & 3; | 1689 | *audio_out_compensated = msg->msg[5] & 3; |
| 1689 | *audio_out_delay = msg->msg[6]; | 1690 | if (*audio_out_compensated == 3 && msg->len >= 7) |
| 1691 | *audio_out_delay = msg->msg[6]; | ||
| 1692 | else | ||
| 1693 | *audio_out_delay = 0; | ||
| 1690 | } | 1694 | } |
| 1691 | 1695 | ||
| 1692 | static inline void cec_msg_request_current_latency(struct cec_msg *msg, | 1696 | static inline void cec_msg_request_current_latency(struct cec_msg *msg, |
diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index f0db7788f887..3dc91a46e8b8 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h | |||
| @@ -1384,6 +1384,8 @@ enum ethtool_link_mode_bit_indices { | |||
| 1384 | ETHTOOL_LINK_MODE_10000baseLR_Full_BIT = 44, | 1384 | ETHTOOL_LINK_MODE_10000baseLR_Full_BIT = 44, |
| 1385 | ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT = 45, | 1385 | ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT = 45, |
| 1386 | ETHTOOL_LINK_MODE_10000baseER_Full_BIT = 46, | 1386 | ETHTOOL_LINK_MODE_10000baseER_Full_BIT = 46, |
| 1387 | ETHTOOL_LINK_MODE_2500baseT_Full_BIT = 47, | ||
| 1388 | ETHTOOL_LINK_MODE_5000baseT_Full_BIT = 48, | ||
| 1387 | 1389 | ||
| 1388 | 1390 | ||
| 1389 | /* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit | 1391 | /* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit |
| @@ -1393,7 +1395,7 @@ enum ethtool_link_mode_bit_indices { | |||
| 1393 | */ | 1395 | */ |
| 1394 | 1396 | ||
| 1395 | __ETHTOOL_LINK_MODE_LAST | 1397 | __ETHTOOL_LINK_MODE_LAST |
| 1396 | = ETHTOOL_LINK_MODE_10000baseER_Full_BIT, | 1398 | = ETHTOOL_LINK_MODE_5000baseT_Full_BIT, |
| 1397 | }; | 1399 | }; |
| 1398 | 1400 | ||
| 1399 | #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) \ | 1401 | #define __ETHTOOL_LINK_MODE_LEGACY_MASK(base_name) \ |
diff --git a/include/uapi/linux/netfilter/nf_log.h b/include/uapi/linux/netfilter/nf_log.h index 8be21e02387d..d0b5fa91ff54 100644 --- a/include/uapi/linux/netfilter/nf_log.h +++ b/include/uapi/linux/netfilter/nf_log.h | |||
| @@ -9,4 +9,6 @@ | |||
| 9 | #define NF_LOG_MACDECODE 0x20 /* Decode MAC header */ | 9 | #define NF_LOG_MACDECODE 0x20 /* Decode MAC header */ |
| 10 | #define NF_LOG_MASK 0x2f | 10 | #define NF_LOG_MASK 0x2f |
| 11 | 11 | ||
| 12 | #define NF_LOG_PREFIXLEN 128 | ||
| 13 | |||
| 12 | #endif /* _NETFILTER_NF_LOG_H */ | 14 | #endif /* _NETFILTER_NF_LOG_H */ |
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h index 881d49e94569..e3f27e09eb2b 100644 --- a/include/uapi/linux/netfilter/nf_tables.h +++ b/include/uapi/linux/netfilter/nf_tables.h | |||
| @@ -235,7 +235,7 @@ enum nft_rule_compat_flags { | |||
| 235 | /** | 235 | /** |
| 236 | * enum nft_rule_compat_attributes - nf_tables rule compat attributes | 236 | * enum nft_rule_compat_attributes - nf_tables rule compat attributes |
| 237 | * | 237 | * |
| 238 | * @NFTA_RULE_COMPAT_PROTO: numerice value of handled protocol (NLA_U32) | 238 | * @NFTA_RULE_COMPAT_PROTO: numeric value of handled protocol (NLA_U32) |
| 239 | * @NFTA_RULE_COMPAT_FLAGS: bitmask of enum nft_rule_compat_flags (NLA_U32) | 239 | * @NFTA_RULE_COMPAT_FLAGS: bitmask of enum nft_rule_compat_flags (NLA_U32) |
| 240 | */ | 240 | */ |
| 241 | enum nft_rule_compat_attributes { | 241 | enum nft_rule_compat_attributes { |
| @@ -499,7 +499,7 @@ enum nft_bitwise_attributes { | |||
| 499 | * enum nft_byteorder_ops - nf_tables byteorder operators | 499 | * enum nft_byteorder_ops - nf_tables byteorder operators |
| 500 | * | 500 | * |
| 501 | * @NFT_BYTEORDER_NTOH: network to host operator | 501 | * @NFT_BYTEORDER_NTOH: network to host operator |
| 502 | * @NFT_BYTEORDER_HTON: host to network opertaor | 502 | * @NFT_BYTEORDER_HTON: host to network operator |
| 503 | */ | 503 | */ |
| 504 | enum nft_byteorder_ops { | 504 | enum nft_byteorder_ops { |
| 505 | NFT_BYTEORDER_NTOH, | 505 | NFT_BYTEORDER_NTOH, |
diff --git a/include/uapi/linux/seg6.h b/include/uapi/linux/seg6.h index c396a8052f73..052799e4d751 100644 --- a/include/uapi/linux/seg6.h +++ b/include/uapi/linux/seg6.h | |||
| @@ -23,14 +23,12 @@ struct ipv6_sr_hdr { | |||
| 23 | __u8 type; | 23 | __u8 type; |
| 24 | __u8 segments_left; | 24 | __u8 segments_left; |
| 25 | __u8 first_segment; | 25 | __u8 first_segment; |
| 26 | __u8 flag_1; | 26 | __u8 flags; |
| 27 | __u8 flag_2; | 27 | __u16 reserved; |
| 28 | __u8 reserved; | ||
| 29 | 28 | ||
| 30 | struct in6_addr segments[0]; | 29 | struct in6_addr segments[0]; |
| 31 | }; | 30 | }; |
| 32 | 31 | ||
| 33 | #define SR6_FLAG1_CLEANUP (1 << 7) | ||
| 34 | #define SR6_FLAG1_PROTECTED (1 << 6) | 32 | #define SR6_FLAG1_PROTECTED (1 << 6) |
| 35 | #define SR6_FLAG1_OAM (1 << 5) | 33 | #define SR6_FLAG1_OAM (1 << 5) |
| 36 | #define SR6_FLAG1_ALERT (1 << 4) | 34 | #define SR6_FLAG1_ALERT (1 << 4) |
| @@ -42,8 +40,7 @@ struct ipv6_sr_hdr { | |||
| 42 | #define SR6_TLV_PADDING 4 | 40 | #define SR6_TLV_PADDING 4 |
| 43 | #define SR6_TLV_HMAC 5 | 41 | #define SR6_TLV_HMAC 5 |
| 44 | 42 | ||
| 45 | #define sr_has_cleanup(srh) ((srh)->flag_1 & SR6_FLAG1_CLEANUP) | 43 | #define sr_has_hmac(srh) ((srh)->flags & SR6_FLAG1_HMAC) |
| 46 | #define sr_has_hmac(srh) ((srh)->flag_1 & SR6_FLAG1_HMAC) | ||
| 47 | 44 | ||
| 48 | struct sr6_tlv { | 45 | struct sr6_tlv { |
| 49 | __u8 type; | 46 | __u8 type; |
diff --git a/include/uapi/rdma/Kbuild b/include/uapi/rdma/Kbuild index 82bdf5626859..bb68cb1b04ed 100644 --- a/include/uapi/rdma/Kbuild +++ b/include/uapi/rdma/Kbuild | |||
| @@ -16,3 +16,4 @@ header-y += nes-abi.h | |||
| 16 | header-y += ocrdma-abi.h | 16 | header-y += ocrdma-abi.h |
| 17 | header-y += hns-abi.h | 17 | header-y += hns-abi.h |
| 18 | header-y += vmw_pvrdma-abi.h | 18 | header-y += vmw_pvrdma-abi.h |
| 19 | header-y += qedr-abi.h | ||
diff --git a/include/uapi/rdma/cxgb3-abi.h b/include/uapi/rdma/cxgb3-abi.h index 48a19bda071b..d24eee12128f 100644 --- a/include/uapi/rdma/cxgb3-abi.h +++ b/include/uapi/rdma/cxgb3-abi.h | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | * SOFTWARE. | 30 | * SOFTWARE. |
| 31 | */ | 31 | */ |
| 32 | #ifndef CXGB3_ABI_USER_H | 32 | #ifndef CXGB3_ABI_USER_H |
| 33 | #define CXBG3_ABI_USER_H | 33 | #define CXGB3_ABI_USER_H |
| 34 | 34 | ||
| 35 | #include <linux/types.h> | 35 | #include <linux/types.h> |
| 36 | 36 | ||
diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h index dfdfe4e92d31..f4f87cff6dc6 100644 --- a/include/uapi/rdma/ib_user_verbs.h +++ b/include/uapi/rdma/ib_user_verbs.h | |||
| @@ -37,7 +37,6 @@ | |||
| 37 | #define IB_USER_VERBS_H | 37 | #define IB_USER_VERBS_H |
| 38 | 38 | ||
| 39 | #include <linux/types.h> | 39 | #include <linux/types.h> |
| 40 | #include <rdma/ib_verbs.h> | ||
| 41 | 40 | ||
| 42 | /* | 41 | /* |
| 43 | * Increment this value if any changes that break userspace ABI | 42 | * Increment this value if any changes that break userspace ABI |
| @@ -548,11 +547,17 @@ enum { | |||
| 548 | }; | 547 | }; |
| 549 | 548 | ||
| 550 | enum { | 549 | enum { |
| 551 | IB_USER_LEGACY_LAST_QP_ATTR_MASK = IB_QP_DEST_QPN | 550 | /* |
| 551 | * This value is equal to IB_QP_DEST_QPN. | ||
| 552 | */ | ||
| 553 | IB_USER_LEGACY_LAST_QP_ATTR_MASK = 1ULL << 20, | ||
| 552 | }; | 554 | }; |
| 553 | 555 | ||
| 554 | enum { | 556 | enum { |
| 555 | IB_USER_LAST_QP_ATTR_MASK = IB_QP_RATE_LIMIT | 557 | /* |
| 558 | * This value is equal to IB_QP_RATE_LIMIT. | ||
| 559 | */ | ||
| 560 | IB_USER_LAST_QP_ATTR_MASK = 1ULL << 25, | ||
| 556 | }; | 561 | }; |
| 557 | 562 | ||
| 558 | struct ib_uverbs_ex_create_qp { | 563 | struct ib_uverbs_ex_create_qp { |
diff --git a/include/video/exynos5433_decon.h b/include/video/exynos5433_decon.h index 0098a522d9f4..ef8e2a8ad0af 100644 --- a/include/video/exynos5433_decon.h +++ b/include/video/exynos5433_decon.h | |||
| @@ -89,6 +89,8 @@ | |||
| 89 | #define VIDCON0_ENVID_F (1 << 0) | 89 | #define VIDCON0_ENVID_F (1 << 0) |
| 90 | 90 | ||
| 91 | /* VIDOUTCON0 */ | 91 | /* VIDOUTCON0 */ |
| 92 | #define VIDOUT_INTERLACE_FIELD_F (1 << 29) | ||
| 93 | #define VIDOUT_INTERLACE_EN_F (1 << 28) | ||
| 92 | #define VIDOUT_LCD_ON (1 << 24) | 94 | #define VIDOUT_LCD_ON (1 << 24) |
| 93 | #define VIDOUT_IF_F_MASK (0x3 << 20) | 95 | #define VIDOUT_IF_F_MASK (0x3 << 20) |
| 94 | #define VIDOUT_RGB_IF (0x0 << 20) | 96 | #define VIDOUT_RGB_IF (0x0 << 20) |
