History

Merge 5.5-rc6 into usb-next

We need the USB fixes in here as well.

Greg Kroah-Hartman committed 6 years ago

Commit 845f0812 parents 585c91f b3a987b485 files · +3773 −2350Browse files

Showing the changes to include/linux (16 of 485 files). Show all

Unified · Split

16 files
  1. include/linux/ahci_platform.h +2 −0
  2. include/linux/bio.h +1 −0
  3. include/linux/bvec.h +0 −22
  4. include/linux/can/dev.h +34 −0
  5. include/linux/dmaengine.h +4 −1
  6. include/linux/if_ether.h +8 −0
  7. include/linux/kernel.h +0 −9
  8. include/linux/libata.h +1 −0
  9. include/linux/memory_hotplug.h +5 −2
  10. include/linux/mfd/mt6397/rtc.h +8 −0
  11. include/linux/mtd/flashchip.h +1 −1
  12. include/linux/of_mdio.h +1 −1
  13. include/linux/posix-clock.h +11 −8
  14. include/linux/spi/spi.h +2 −2
  15. include/linux/sxgbe_platform.h +1 −1
  16. include/linux/syscalls.h +1 −0
include/linux/ahci_platform.h+2−0
@@ -19,6 +19,8 @@ struct ahci_host_priv; · 18 unmodified lines
19struct platform_device;19struct platform_device;
20struct scsi_host_template;20struct scsi_host_template;
21 21
22int ahci_platform_enable_phys(struct ahci_host_priv *hpriv);
23void ahci_platform_disable_phys(struct ahci_host_priv *hpriv);
22int ahci_platform_enable_clks(struct ahci_host_priv *hpriv);24int ahci_platform_enable_clks(struct ahci_host_priv *hpriv);
23void ahci_platform_disable_clks(struct ahci_host_priv *hpriv);25void ahci_platform_disable_clks(struct ahci_host_priv *hpriv);
24int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv);26int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv);
include/linux/bio.h+1−0
@@ -470,6 +470,7 @@ extern struct bio *bio_copy_user_iov(struct request_queue *, · 469 unmodified lines
470 gfp_t);470 gfp_t);
471extern int bio_uncopy_user(struct bio *);471extern int bio_uncopy_user(struct bio *);
472void zero_fill_bio_iter(struct bio *bio, struct bvec_iter iter);472void zero_fill_bio_iter(struct bio *bio, struct bvec_iter iter);
473void bio_truncate(struct bio *bio, unsigned new_size);
473 474
474static inline void zero_fill_bio(struct bio *bio)475static inline void zero_fill_bio(struct bio *bio)
475{476{
include/linux/bvec.h+0−22
@@ -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 */
160static 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#endif /* __LINUX_BVEC_ITER_H */156#endif /* __LINUX_BVEC_ITER_H */
include/linux/can/dev.h+34−0
@@ -18,6 +18,7 @@ · 17 unmodified lines
18#include <linux/can/error.h>18#include <linux/can/error.h>
19#include <linux/can/led.h>19#include <linux/can/led.h>
20#include <linux/can/netlink.h>20#include <linux/can/netlink.h>
21#include <linux/can/skb.h>
21#include <linux/netdevice.h>22#include <linux/netdevice.h>
22 23
23/*24/*
@@ -91,6 +92,36 @@ struct can_priv { · 67 unmodified lines
91#define get_can_dlc(i) (min_t(__u8, (i), CAN_MAX_DLC))92#define get_can_dlc(i) (min_t(__u8, (i), CAN_MAX_DLC))
92#define get_canfd_dlc(i) (min_t(__u8, (i), CANFD_MAX_DLC))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 */
96static 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/* Drop a given socketbuffer if it does not contain a valid CAN frame. */125/* Drop a given socketbuffer if it does not contain a valid CAN frame. */
95static inline bool can_dropped_invalid_skb(struct net_device *dev,126static inline bool can_dropped_invalid_skb(struct net_device *dev,
96 struct sk_buff *skb)127 struct sk_buff *skb)
@@ -108,6 +139,9 @@ static inline bool can_dropped_invalid_skb(struct net_device *dev, · 11 unmodified lines
108 } else139 } else
109 goto inval_skb;140 goto inval_skb;
110 141
142 if (!can_skb_headroom_valid(dev, skb))
143 goto inval_skb;
144
111 return false;145 return false;
112 146
113inval_skb:147inval_skb:
include/linux/dmaengine.h+4−1
@@ -1364,8 +1364,11 @@ static inline int dma_get_slave_caps(struct dma_chan *chan, · 1363 unmodified lines
1364static inline int dmaengine_desc_set_reuse(struct dma_async_tx_descriptor *tx)1364static inline int dmaengine_desc_set_reuse(struct dma_async_tx_descriptor *tx)
1365{1365{
1366 struct dma_slave_caps caps;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 if (caps.descriptor_reuse) {1373 if (caps.descriptor_reuse) {
1371 tx->flags |= DMA_CTRL_REUSE;1374 tx->flags |= DMA_CTRL_REUSE;
include/linux/if_ether.h+8−0
@@ -24,6 +24,14 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) · 23 unmodified lines
24 return (struct ethhdr *)skb_mac_header(skb);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 */
30static inline struct ethhdr *skb_eth_hdr(const struct sk_buff *skb)
31{
32 return (struct ethhdr *)skb->data;
33}
34
27static inline struct ethhdr *inner_eth_hdr(const struct sk_buff *skb)35static inline struct ethhdr *inner_eth_hdr(const struct sk_buff *skb)
28{36{
29 return (struct ethhdr *)skb_inner_mac_header(skb);37 return (struct ethhdr *)skb_inner_mac_header(skb);
include/linux/kernel.h+0−9
@@ -79,15 +79,6 @@ · 78 unmodified lines
79 */79 */
80#define round_down(x, y) ((x) & ~__round_mask(x, y))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#define typeof_member(T, m) typeof(((T*)0)->m)82#define typeof_member(T, m) typeof(((T*)0)->m)
92 83
93#define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP84#define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP
include/linux/libata.h+1−0
@@ -1175,6 +1175,7 @@ extern unsigned int ata_do_dev_read_id(struct ata_device *dev, · 1174 unmodified lines
1175 struct ata_taskfile *tf, u16 *id);1175 struct ata_taskfile *tf, u16 *id);
1176extern void ata_qc_complete(struct ata_queued_cmd *qc);1176extern void ata_qc_complete(struct ata_queued_cmd *qc);
1177extern int ata_qc_complete_multiple(struct ata_port *ap, u64 qc_active);1177extern int ata_qc_complete_multiple(struct ata_port *ap, u64 qc_active);
1178extern u64 ata_qc_get_active(struct ata_port *ap);
1178extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd);1179extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd);
1179extern int ata_std_bios_param(struct scsi_device *sdev,1180extern int ata_std_bios_param(struct scsi_device *sdev,
1180 struct block_device *bdev,1181 struct block_device *bdev,
include/linux/memory_hotplug.h+5−2
@@ -122,8 +122,8 @@ static inline bool movable_node_is_enabled(void) · 121 unmodified lines
122 122
123extern void arch_remove_memory(int nid, u64 start, u64 size,123extern void arch_remove_memory(int nid, u64 start, u64 size,
124 struct vmem_altmap *altmap);124 struct vmem_altmap *altmap);
125extern void __remove_pages(struct zone *zone, unsigned long start_pfn,125extern void __remove_pages(unsigned long start_pfn, unsigned long nr_pages,
126 unsigned long nr_pages, struct vmem_altmap *altmap);126 struct vmem_altmap *altmap);
127 127
128/* reasonably generic interface to expand the physical pages */128/* reasonably generic interface to expand the physical pages */
129extern int __add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,129extern 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
342extern int add_memory_resource(int nid, struct resource *resource);342extern int add_memory_resource(int nid, struct resource *resource);
343extern void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn,343extern void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn,
344 unsigned long nr_pages, struct vmem_altmap *altmap);344 unsigned long nr_pages, struct vmem_altmap *altmap);
345extern void remove_pfn_range_from_zone(struct zone *zone,
346 unsigned long start_pfn,
347 unsigned long nr_pages);
345extern bool is_memblock_offlined(struct memory_block *mem);348extern bool is_memblock_offlined(struct memory_block *mem);
346extern int sparse_add_section(int nid, unsigned long pfn,349extern int sparse_add_section(int nid, unsigned long pfn,
347 unsigned long nr_pages, struct vmem_altmap *altmap);350 unsigned long nr_pages, struct vmem_altmap *altmap);
include/linux/mfd/mt6397/rtc.h+8−0
@@ -46,6 +46,14 @@ · 45 unmodified lines
46 46
47#define RTC_AL_SEC 0x001847#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#define RTC_PDN2 0x002e57#define RTC_PDN2 0x002e
50#define RTC_PDN2_PWRON_ALARM BIT(4)58#define RTC_PDN2_PWRON_ALARM BIT(4)
51 59
include/linux/mtd/flashchip.h+1−1
@@ -40,7 +40,7 @@ typedef enum { · 39 unmodified lines
40 FL_READING,40 FL_READING,
41 FL_CACHEDPRG,41 FL_CACHEDPRG,
42 /* These 4 come from onenand_state_t, which has been unified here */42 /* These 4 come from onenand_state_t, which has been unified here */
43 FL_RESETING,43 FL_RESETTING,
44 FL_OTPING,44 FL_OTPING,
45 FL_PREPARING_ERASE,45 FL_PREPARING_ERASE,
46 FL_VERIFYING_ERASE,46 FL_VERIFYING_ERASE,
include/linux/of_mdio.h+1−1
@@ -55,7 +55,7 @@ static inline int of_mdio_parse_addr(struct device *dev, · 54 unmodified lines
55}55}
56 56
57#else /* CONFIG_OF_MDIO */57#else /* CONFIG_OF_MDIO */
58static bool of_mdiobus_child_is_phy(struct device_node *child)58static inline bool of_mdiobus_child_is_phy(struct device_node *child)
59{59{
60 return false;60 return false;
61}61}
include/linux/posix-clock.h+11−8
@@ -69,29 +69,32 @@ struct posix_clock_operations { · 68 unmodified lines
69 *69 *
70 * @ops: Functional interface to the clock70 * @ops: Functional interface to the clock
71 * @cdev: Character device instance for this clock71 * @cdev: Character device instance for this clock
72 * @kref: Reference count.72 * @dev: Pointer to the clock's device.
73 * @rwsem: Protects the 'zombie' field from concurrent access.73 * @rwsem: Protects the 'zombie' field from concurrent access.
74 * @zombie: If 'zombie' is true, then the hardware has disappeared.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 * Drivers should embed their struct posix_clock within a private76 * Drivers should embed their struct posix_clock within a private
79 * structure, obtaining a reference to it during callbacks using77 * structure, obtaining a reference to it during callbacks using
80 * container_of().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 */
82struct posix_clock {85struct posix_clock {
83 struct posix_clock_operations ops;86 struct posix_clock_operations ops;
84 struct cdev cdev;87 struct cdev cdev;
85 struct kref kref;88 struct device *dev;
86 struct rw_semaphore rwsem;89 struct rw_semaphore rwsem;
87 bool zombie;90 bool zombie;
88 void (*release)(struct posix_clock *clk);
89};91};
90 92
91/**93/**
92 * posix_clock_register() - register a new clock94 * posix_clock_register() - register a new clock
93 * @clk: Pointer to the clock. Caller must provide 'ops' and 'release'95 * @clk: Pointer to the clock. Caller must provide 'ops' field
94 * @devid: Allocated device id96 * @dev: Pointer to the initialized device. Caller must provide
97 * 'release' field
95 *98 *
96 * A clock driver calls this function to register itself with the99 * A clock driver calls this function to register itself with the
97 * clock device subsystem. If 'clk' points to dynamically allocated100 * clock device subsystem. If 'clk' points to dynamically allocated
@@ -100,7 +103,7 @@ struct posix_clock { · 2 unmodified lines
100 *103 *
101 * Returns zero on success, non-zero otherwise.104 * Returns zero on success, non-zero otherwise.
102 */105 */
103int posix_clock_register(struct posix_clock *clk, dev_t devid);106int posix_clock_register(struct posix_clock *clk, struct device *dev);
104 107
105/**108/**
106 * posix_clock_unregister() - unregister a clock109 * posix_clock_unregister() - unregister a clock
include/linux/spi/spi.h+2−2
@@ -689,10 +689,10 @@ extern void spi_finalize_current_transfer(struct spi_controller *ctlr); · 688 unmodified lines
689/* Helper calls for driver to timestamp transfer */689/* Helper calls for driver to timestamp transfer */
690void spi_take_timestamp_pre(struct spi_controller *ctlr,690void spi_take_timestamp_pre(struct spi_controller *ctlr,
691 struct spi_transfer *xfer,691 struct spi_transfer *xfer,
692 const void *tx, bool irqs_off);692 size_t progress, bool irqs_off);
693void spi_take_timestamp_post(struct spi_controller *ctlr,693void spi_take_timestamp_post(struct spi_controller *ctlr,
694 struct spi_transfer *xfer,694 struct spi_transfer *xfer,
695 const void *tx, bool irqs_off);695 size_t progress, bool irqs_off);
696 696
697/* the spi driver core manages memory for the spi_controller classdev */697/* the spi driver core manages memory for the spi_controller classdev */
698extern struct spi_controller *__spi_alloc_controller(struct device *host,698extern struct spi_controller *__spi_alloc_controller(struct device *host,
include/linux/sxgbe_platform.h+1−1
@@ -1,6 +1,6 @@
1/* SPDX-License-Identifier: GPL-2.0-only */1/* SPDX-License-Identifier: GPL-2.0-only */
2/*2/*
3 * 10G controller driver for Samsung EXYNOS SoCs3 * 10G controller driver for Samsung Exynos SoCs
4 *4 *
5 * Copyright (C) 2013 Samsung Electronics Co., Ltd.5 * Copyright (C) 2013 Samsung Electronics Co., Ltd.
6 * http://www.samsung.com6 * http://www.samsung.com
include/linux/syscalls.h+1−0
@@ -1232,6 +1232,7 @@ asmlinkage long sys_ni_syscall(void); · 1231 unmodified lines
1232 */1232 */
1233 1233
1234int ksys_umount(char __user *name, int flags);1234int ksys_umount(char __user *name, int flags);
1235int ksys_dup(unsigned int fildes);
1235int ksys_chroot(const char __user *filename);1236int ksys_chroot(const char __user *filename);
1236ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count);1237ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count);
1237int ksys_chdir(const char __user *filename);1238int ksys_chdir(const char __user *filename);