We need the USB fixes in here as well.
Showing the changes to include/linux (16 of 485 files). Show all
Unified · Split
| @@ -19,6 +19,8 @@ struct ahci_host_priv; · 18 unmodified lines | ||
| 19 | 19 | struct platform_device; |
| 20 | 20 | struct scsi_host_template; |
| 21 | 21 | |
| 22 | +int ahci_platform_enable_phys(struct ahci_host_priv *hpriv); | |
| 23 | +void ahci_platform_disable_phys(struct ahci_host_priv *hpriv); | |
| 22 | 24 | int ahci_platform_enable_clks(struct ahci_host_priv *hpriv); |
| 23 | 25 | void ahci_platform_disable_clks(struct ahci_host_priv *hpriv); |
| 24 | 26 | int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv); |
| @@ -470,6 +470,7 @@ extern struct bio *bio_copy_user_iov(struct request_queue *, · 469 unmodified lines | ||
| 470 | 470 | gfp_t); |
| 471 | 471 | extern int bio_uncopy_user(struct bio *); |
| 472 | 472 | void zero_fill_bio_iter(struct bio *bio, struct bvec_iter iter); |
| 473 | +void bio_truncate(struct bio *bio, unsigned new_size); | |
| 473 | 474 | |
| 474 | 475 | static inline void zero_fill_bio(struct bio *bio) |
| 475 | 476 | { |
| @@ -153,26 +153,4 @@ static inline void bvec_advance(const struct bio_vec *bvec, · 152 unmodified lines | ||
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | −/* | |
| 157 | − * Get the last single-page segment from the multi-page bvec and store it | |
| 158 | − * in @seg | |
| 159 | − */ | |
| 160 | −static inline void mp_bvec_last_segment(const struct bio_vec *bvec, | |
| 161 | − struct bio_vec *seg) | |
| 162 | −{ | |
| 163 | − unsigned total = bvec->bv_offset + bvec->bv_len; | |
| 164 | − unsigned last_page = (total - 1) / PAGE_SIZE; | |
| 165 | − | |
| 166 | − seg->bv_page = bvec->bv_page + last_page; | |
| 167 | − | |
| 168 | − /* the whole segment is inside the last page */ | |
| 169 | − if (bvec->bv_offset >= last_page * PAGE_SIZE) { | |
| 170 | − seg->bv_offset = bvec->bv_offset % PAGE_SIZE; | |
| 171 | − seg->bv_len = bvec->bv_len; | |
| 172 | − } else { | |
| 173 | − seg->bv_offset = 0; | |
| 174 | − seg->bv_len = total - last_page * PAGE_SIZE; | |
| 175 | − } | |
| 176 | −} | |
| 177 | − | |
| 178 | 156 | #endif /* __LINUX_BVEC_ITER_H */ |
| @@ -18,6 +18,7 @@ · 17 unmodified lines | ||
| 18 | 18 | #include <linux/can/error.h> |
| 19 | 19 | #include <linux/can/led.h> |
| 20 | 20 | #include <linux/can/netlink.h> |
| 21 | +#include <linux/can/skb.h> | |
| 21 | 22 | #include <linux/netdevice.h> |
| 22 | 23 | |
| 23 | 24 | /* |
| @@ -91,6 +92,36 @@ struct can_priv { · 67 unmodified lines | ||
| 91 | 92 | #define get_can_dlc(i) (min_t(__u8, (i), CAN_MAX_DLC)) |
| 92 | 93 | #define get_canfd_dlc(i) (min_t(__u8, (i), CANFD_MAX_DLC)) |
| 93 | 94 | |
| 95 | +/* Check for outgoing skbs that have not been created by the CAN subsystem */ | |
| 96 | +static inline bool can_skb_headroom_valid(struct net_device *dev, | |
| 97 | + struct sk_buff *skb) | |
| 98 | +{ | |
| 99 | + /* af_packet creates a headroom of HH_DATA_MOD bytes which is fine */ | |
| 100 | + if (WARN_ON_ONCE(skb_headroom(skb) < sizeof(struct can_skb_priv))) | |
| 101 | + return false; | |
| 102 | + | |
| 103 | + /* af_packet does not apply CAN skb specific settings */ | |
| 104 | + if (skb->ip_summed == CHECKSUM_NONE) { | |
| 105 | + /* init headroom */ | |
| 106 | + can_skb_prv(skb)->ifindex = dev->ifindex; | |
| 107 | + can_skb_prv(skb)->skbcnt = 0; | |
| 108 | + | |
| 109 | + skb->ip_summed = CHECKSUM_UNNECESSARY; | |
| 110 | + | |
| 111 | + /* preform proper loopback on capable devices */ | |
| 112 | + if (dev->flags & IFF_ECHO) | |
| 113 | + skb->pkt_type = PACKET_LOOPBACK; | |
| 114 | + else | |
| 115 | + skb->pkt_type = PACKET_HOST; | |
| 116 | + | |
| 117 | + skb_reset_mac_header(skb); | |
| 118 | + skb_reset_network_header(skb); | |
| 119 | + skb_reset_transport_header(skb); | |
| 120 | + } | |
| 121 | + | |
| 122 | + return true; | |
| 123 | +} | |
| 124 | + | |
| 94 | 125 | /* Drop a given socketbuffer if it does not contain a valid CAN frame. */ |
| 95 | 126 | static inline bool can_dropped_invalid_skb(struct net_device *dev, |
| 96 | 127 | struct sk_buff *skb) |
| @@ -108,6 +139,9 @@ static inline bool can_dropped_invalid_skb(struct net_device *dev, · 11 unmodified lines | ||
| 108 | 139 | } else |
| 109 | 140 | goto inval_skb; |
| 110 | 141 | |
| 142 | + if (!can_skb_headroom_valid(dev, skb)) | |
| 143 | + goto inval_skb; | |
| 144 | + | |
| 111 | 145 | return false; |
| 112 | 146 | |
| 113 | 147 | inval_skb: |
| @@ -1364,8 +1364,11 @@ static inline int dma_get_slave_caps(struct dma_chan *chan, · 1363 unmodified lines | ||
| 1364 | 1364 | static inline int dmaengine_desc_set_reuse(struct dma_async_tx_descriptor *tx) |
| 1365 | 1365 | { |
| 1366 | 1366 | struct dma_slave_caps caps; |
| 1367 | + int ret; | |
| 1367 | 1368 | |
| 1368 | − dma_get_slave_caps(tx->chan, &caps); | |
| 1369 | + ret = dma_get_slave_caps(tx->chan, &caps); | |
| 1370 | + if (ret) | |
| 1371 | + return ret; | |
| 1369 | 1372 | |
| 1370 | 1373 | if (caps.descriptor_reuse) { |
| 1371 | 1374 | tx->flags |= DMA_CTRL_REUSE; |
| @@ -24,6 +24,14 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) · 23 unmodified lines | ||
| 24 | 24 | return (struct ethhdr *)skb_mac_header(skb); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | +/* Prefer this version in TX path, instead of | |
| 28 | + * skb_reset_mac_header() + eth_hdr() | |
| 29 | + */ | |
| 30 | +static inline struct ethhdr *skb_eth_hdr(const struct sk_buff *skb) | |
| 31 | +{ | |
| 32 | + return (struct ethhdr *)skb->data; | |
| 33 | +} | |
| 34 | + | |
| 27 | 35 | static inline struct ethhdr *inner_eth_hdr(const struct sk_buff *skb) |
| 28 | 36 | { |
| 29 | 37 | return (struct ethhdr *)skb_inner_mac_header(skb); |
| @@ -79,15 +79,6 @@ · 78 unmodified lines | ||
| 79 | 79 | */ |
| 80 | 80 | #define round_down(x, y) ((x) & ~__round_mask(x, y)) |
| 81 | 81 | |
| 82 | −/** | |
| 83 | − * FIELD_SIZEOF - get the size of a struct's field | |
| 84 | − * @t: the target struct | |
| 85 | − * @f: the target struct's field | |
| 86 | − * Return: the size of @f in the struct definition without having a | |
| 87 | − * declared instance of @t. | |
| 88 | − */ | |
| 89 | −#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | |
| 90 | − | |
| 91 | 82 | #define typeof_member(T, m) typeof(((T*)0)->m) |
| 92 | 83 | |
| 93 | 84 | #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP |
| @@ -1175,6 +1175,7 @@ extern unsigned int ata_do_dev_read_id(struct ata_device *dev, · 1174 unmodified lines | ||
| 1175 | 1175 | struct ata_taskfile *tf, u16 *id); |
| 1176 | 1176 | extern void ata_qc_complete(struct ata_queued_cmd *qc); |
| 1177 | 1177 | extern int ata_qc_complete_multiple(struct ata_port *ap, u64 qc_active); |
| 1178 | +extern u64 ata_qc_get_active(struct ata_port *ap); | |
| 1178 | 1179 | extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd); |
| 1179 | 1180 | extern int ata_std_bios_param(struct scsi_device *sdev, |
| 1180 | 1181 | struct block_device *bdev, |
| @@ -122,8 +122,8 @@ static inline bool movable_node_is_enabled(void) · 121 unmodified lines | ||
| 122 | 122 | |
| 123 | 123 | extern void arch_remove_memory(int nid, u64 start, u64 size, |
| 124 | 124 | struct vmem_altmap *altmap); |
| 125 | −extern void __remove_pages(struct zone *zone, unsigned long start_pfn, | |
| 126 | − unsigned long nr_pages, struct vmem_altmap *altmap); | |
| 125 | +extern void __remove_pages(unsigned long start_pfn, unsigned long nr_pages, | |
| 126 | + struct vmem_altmap *altmap); | |
| 127 | 127 | |
| 128 | 128 | /* reasonably generic interface to expand the physical pages */ |
| 129 | 129 | extern int __add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages, |
| @@ -342,6 +342,9 @@ extern int add_memory(int nid, u64 start, u64 size); · 212 unmodified lines | ||
| 342 | 342 | extern int add_memory_resource(int nid, struct resource *resource); |
| 343 | 343 | extern void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn, |
| 344 | 344 | unsigned long nr_pages, struct vmem_altmap *altmap); |
| 345 | +extern void remove_pfn_range_from_zone(struct zone *zone, | |
| 346 | + unsigned long start_pfn, | |
| 347 | + unsigned long nr_pages); | |
| 345 | 348 | extern bool is_memblock_offlined(struct memory_block *mem); |
| 346 | 349 | extern int sparse_add_section(int nid, unsigned long pfn, |
| 347 | 350 | unsigned long nr_pages, struct vmem_altmap *altmap); |
| @@ -46,6 +46,14 @@ · 45 unmodified lines | ||
| 46 | 46 | |
| 47 | 47 | #define RTC_AL_SEC 0x0018 |
| 48 | 48 | |
| 49 | +#define RTC_AL_SEC_MASK 0x003f | |
| 50 | +#define RTC_AL_MIN_MASK 0x003f | |
| 51 | +#define RTC_AL_HOU_MASK 0x001f | |
| 52 | +#define RTC_AL_DOM_MASK 0x001f | |
| 53 | +#define RTC_AL_DOW_MASK 0x0007 | |
| 54 | +#define RTC_AL_MTH_MASK 0x000f | |
| 55 | +#define RTC_AL_YEA_MASK 0x007f | |
| 56 | + | |
| 49 | 57 | #define RTC_PDN2 0x002e |
| 50 | 58 | #define RTC_PDN2_PWRON_ALARM BIT(4) |
| 51 | 59 | |
| @@ -40,7 +40,7 @@ typedef enum { · 39 unmodified lines | ||
| 40 | 40 | FL_READING, |
| 41 | 41 | FL_CACHEDPRG, |
| 42 | 42 | /* These 4 come from onenand_state_t, which has been unified here */ |
| 43 | − FL_RESETING, | |
| 43 | + FL_RESETTING, | |
| 44 | 44 | FL_OTPING, |
| 45 | 45 | FL_PREPARING_ERASE, |
| 46 | 46 | FL_VERIFYING_ERASE, |
| @@ -55,7 +55,7 @@ static inline int of_mdio_parse_addr(struct device *dev, · 54 unmodified lines | ||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | #else /* CONFIG_OF_MDIO */ |
| 58 | −static bool of_mdiobus_child_is_phy(struct device_node *child) | |
| 58 | +static inline bool of_mdiobus_child_is_phy(struct device_node *child) | |
| 59 | 59 | { |
| 60 | 60 | return false; |
| 61 | 61 | } |
| @@ -69,29 +69,32 @@ struct posix_clock_operations { · 68 unmodified lines | ||
| 69 | 69 | * |
| 70 | 70 | * @ops: Functional interface to the clock |
| 71 | 71 | * @cdev: Character device instance for this clock |
| 72 | − * @kref: Reference count. | |
| 72 | + * @dev: Pointer to the clock's device. | |
| 73 | 73 | * @rwsem: Protects the 'zombie' field from concurrent access. |
| 74 | 74 | * @zombie: If 'zombie' is true, then the hardware has disappeared. |
| 75 | − * @release: A function to free the structure when the reference count reaches | |
| 76 | − * zero. May be NULL if structure is statically allocated. | |
| 77 | 75 | * |
| 78 | 76 | * Drivers should embed their struct posix_clock within a private |
| 79 | 77 | * structure, obtaining a reference to it during callbacks using |
| 80 | 78 | * container_of(). |
| 79 | + * | |
| 80 | + * Drivers should supply an initialized but not exposed struct device | |
| 81 | + * to posix_clock_register(). It is used to manage lifetime of the | |
| 82 | + * driver's private structure. It's 'release' field should be set to | |
| 83 | + * a release function for this private structure. | |
| 81 | 84 | */ |
| 82 | 85 | struct posix_clock { |
| 83 | 86 | struct posix_clock_operations ops; |
| 84 | 87 | struct cdev cdev; |
| 85 | − struct kref kref; | |
| 88 | + struct device *dev; | |
| 86 | 89 | struct rw_semaphore rwsem; |
| 87 | 90 | bool zombie; |
| 88 | − void (*release)(struct posix_clock *clk); | |
| 89 | 91 | }; |
| 90 | 92 | |
| 91 | 93 | /** |
| 92 | 94 | * posix_clock_register() - register a new clock |
| 93 | − * @clk: Pointer to the clock. Caller must provide 'ops' and 'release' | |
| 94 | − * @devid: Allocated device id | |
| 95 | + * @clk: Pointer to the clock. Caller must provide 'ops' field | |
| 96 | + * @dev: Pointer to the initialized device. Caller must provide | |
| 97 | + * 'release' field | |
| 95 | 98 | * |
| 96 | 99 | * A clock driver calls this function to register itself with the |
| 97 | 100 | * clock device subsystem. If 'clk' points to dynamically allocated |
| @@ -100,7 +103,7 @@ struct posix_clock { · 2 unmodified lines | ||
| 100 | 103 | * |
| 101 | 104 | * Returns zero on success, non-zero otherwise. |
| 102 | 105 | */ |
| 103 | −int posix_clock_register(struct posix_clock *clk, dev_t devid); | |
| 106 | +int posix_clock_register(struct posix_clock *clk, struct device *dev); | |
| 104 | 107 | |
| 105 | 108 | /** |
| 106 | 109 | * posix_clock_unregister() - unregister a clock |
| @@ -689,10 +689,10 @@ extern void spi_finalize_current_transfer(struct spi_controller *ctlr); · 688 unmodified lines | ||
| 689 | 689 | /* Helper calls for driver to timestamp transfer */ |
| 690 | 690 | void spi_take_timestamp_pre(struct spi_controller *ctlr, |
| 691 | 691 | struct spi_transfer *xfer, |
| 692 | − const void *tx, bool irqs_off); | |
| 692 | + size_t progress, bool irqs_off); | |
| 693 | 693 | void spi_take_timestamp_post(struct spi_controller *ctlr, |
| 694 | 694 | struct spi_transfer *xfer, |
| 695 | − const void *tx, bool irqs_off); | |
| 695 | + size_t progress, bool irqs_off); | |
| 696 | 696 | |
| 697 | 697 | /* the spi driver core manages memory for the spi_controller classdev */ |
| 698 | 698 | extern struct spi_controller *__spi_alloc_controller(struct device *host, |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | 2 | /* |
| 3 | − * 10G controller driver for Samsung EXYNOS SoCs | |
| 3 | + * 10G controller driver for Samsung Exynos SoCs | |
| 4 | 4 | * |
| 5 | 5 | * Copyright (C) 2013 Samsung Electronics Co., Ltd. |
| 6 | 6 | * http://www.samsung.com |
| @@ -1232,6 +1232,7 @@ asmlinkage long sys_ni_syscall(void); · 1231 unmodified lines | ||
| 1232 | 1232 | */ |
| 1233 | 1233 | |
| 1234 | 1234 | int ksys_umount(char __user *name, int flags); |
| 1235 | +int ksys_dup(unsigned int fildes); | |
| 1235 | 1236 | int ksys_chroot(const char __user *filename); |
| 1236 | 1237 | ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count); |
| 1237 | 1238 | int ksys_chdir(const char __user *filename); |