History

Merge tag 'nand/for-5.6' into mtd/next

Raw NAND * Macronix: Use match_string() helper * Atmel: switch to using devm_fwnode_gpiod_get() * Denali: rework the SKIP_BYTES feature and add reset controlling * Brcmnand: set appropriate DMA mask * Various cleanup. Onenand drivers * Rename Samsung and Omap2 drivers to avoid possible build warnings * Enable compile testing * Various build issues * Kconfig cleanup SPI-NAND * Support for Toshiba TC58CVG2S0HRAIJ

Miquel Raynal committed 6 years ago

Commit 45752432 parents 701ddf0 d85339d496 files · +3928 −2438Browse files

Showing the changes to include/linux (16 of 496 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
1919 struct platform_device;
2020 struct scsi_host_template;
2121
22+int ahci_platform_enable_phys(struct ahci_host_priv *hpriv);
23+void ahci_platform_disable_phys(struct ahci_host_priv *hpriv);
2224 int ahci_platform_enable_clks(struct ahci_host_priv *hpriv);
2325 void ahci_platform_disable_clks(struct ahci_host_priv *hpriv);
2426 int 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
470470 gfp_t);
471471 extern int bio_uncopy_user(struct bio *);
472472 void zero_fill_bio_iter(struct bio *bio, struct bvec_iter iter);
473+void bio_truncate(struct bio *bio, unsigned new_size);
473474
474475 static inline void zero_fill_bio(struct bio *bio)
475476 {
include/linux/bvec.h+0−22
@@ -153,26 +153,4 @@ static inline void bvec_advance(const struct bio_vec *bvec, · 152 unmodified lines
153153 }
154154 }
155155
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−
178156 #endif /* __LINUX_BVEC_ITER_H */
include/linux/can/dev.h+34−0
@@ -18,6 +18,7 @@ · 17 unmodified lines
1818 #include <linux/can/error.h>
1919 #include <linux/can/led.h>
2020 #include <linux/can/netlink.h>
21+#include <linux/can/skb.h>
2122 #include <linux/netdevice.h>
2223
2324 /*
@@ -91,6 +92,36 @@ struct can_priv { · 67 unmodified lines
9192 #define get_can_dlc(i) (min_t(__u8, (i), CAN_MAX_DLC))
9293 #define get_canfd_dlc(i) (min_t(__u8, (i), CANFD_MAX_DLC))
9394
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+
94125 /* Drop a given socketbuffer if it does not contain a valid CAN frame. */
95126 static inline bool can_dropped_invalid_skb(struct net_device *dev,
96127 struct sk_buff *skb)
@@ -108,6 +139,9 @@ static inline bool can_dropped_invalid_skb(struct net_device *dev, · 11 unmodified lines
108139 } else
109140 goto inval_skb;
110141
142+ if (!can_skb_headroom_valid(dev, skb))
143+ goto inval_skb;
144+
111145 return false;
112146
113147 inval_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
13641364 static inline int dmaengine_desc_set_reuse(struct dma_async_tx_descriptor *tx)
13651365 {
13661366 struct dma_slave_caps caps;
1367+ int ret;
13671368
1368− dma_get_slave_caps(tx->chan, &caps);
1369+ ret = dma_get_slave_caps(tx->chan, &caps);
1370+ if (ret)
1371+ return ret;
13691372
13701373 if (caps.descriptor_reuse) {
13711374 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
2424 return (struct ethhdr *)skb_mac_header(skb);
2525 }
2626
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+
2735 static inline struct ethhdr *inner_eth_hdr(const struct sk_buff *skb)
2836 {
2937 return (struct ethhdr *)skb_inner_mac_header(skb);
include/linux/kernel.h+0−9
@@ -79,15 +79,6 @@ · 78 unmodified lines
7979 */
8080 #define round_down(x, y) ((x) & ~__round_mask(x, y))
8181
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−
9182 #define typeof_member(T, m) typeof(((T*)0)->m)
9283
9384 #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
11751175 struct ata_taskfile *tf, u16 *id);
11761176 extern void ata_qc_complete(struct ata_queued_cmd *qc);
11771177 extern int ata_qc_complete_multiple(struct ata_port *ap, u64 qc_active);
1178+extern u64 ata_qc_get_active(struct ata_port *ap);
11781179 extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd);
11791180 extern int ata_std_bios_param(struct scsi_device *sdev,
11801181 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
122122
123123 extern void arch_remove_memory(int nid, u64 start, u64 size,
124124 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);
127127
128128 /* reasonably generic interface to expand the physical pages */
129129 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
342342 extern int add_memory_resource(int nid, struct resource *resource);
343343 extern void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn,
344344 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);
345348 extern bool is_memblock_offlined(struct memory_block *mem);
346349 extern int sparse_add_section(int nid, unsigned long pfn,
347350 unsigned long nr_pages, struct vmem_altmap *altmap);
include/linux/mfd/mt6397/rtc.h+8−0
@@ -46,6 +46,14 @@ · 45 unmodified lines
4646
4747 #define RTC_AL_SEC 0x0018
4848
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+
4957 #define RTC_PDN2 0x002e
5058 #define RTC_PDN2_PWRON_ALARM BIT(4)
5159
include/linux/mtd/flashchip.h+1−1
@@ -40,7 +40,7 @@ typedef enum { · 39 unmodified lines
4040 FL_READING,
4141 FL_CACHEDPRG,
4242 /* These 4 come from onenand_state_t, which has been unified here */
43− FL_RESETING,
43+ FL_RESETTING,
4444 FL_OTPING,
4545 FL_PREPARING_ERASE,
4646 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
5555 }
5656
5757 #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)
5959 {
6060 return false;
6161 }
include/linux/posix-clock.h+11−8
@@ -69,29 +69,32 @@ struct posix_clock_operations { · 68 unmodified lines
6969 *
7070 * @ops: Functional interface to the clock
7171 * @cdev: Character device instance for this clock
72− * @kref: Reference count.
72+ * @dev: Pointer to the clock's device.
7373 * @rwsem: Protects the 'zombie' field from concurrent access.
7474 * @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.
7775 *
7876 * Drivers should embed their struct posix_clock within a private
7977 * structure, obtaining a reference to it during callbacks using
8078 * 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.
8184 */
8285 struct posix_clock {
8386 struct posix_clock_operations ops;
8487 struct cdev cdev;
85− struct kref kref;
88+ struct device *dev;
8689 struct rw_semaphore rwsem;
8790 bool zombie;
88− void (*release)(struct posix_clock *clk);
8991 };
9092
9193 /**
9294 * 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
9598 *
9699 * A clock driver calls this function to register itself with the
97100 * clock device subsystem. If 'clk' points to dynamically allocated
@@ -100,7 +103,7 @@ struct posix_clock { · 2 unmodified lines
100103 *
101104 * Returns zero on success, non-zero otherwise.
102105 */
103−int posix_clock_register(struct posix_clock *clk, dev_t devid);
106+int posix_clock_register(struct posix_clock *clk, struct device *dev);
104107
105108 /**
106109 * 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
689689 /* Helper calls for driver to timestamp transfer */
690690 void spi_take_timestamp_pre(struct spi_controller *ctlr,
691691 struct spi_transfer *xfer,
692− const void *tx, bool irqs_off);
692+ size_t progress, bool irqs_off);
693693 void spi_take_timestamp_post(struct spi_controller *ctlr,
694694 struct spi_transfer *xfer,
695− const void *tx, bool irqs_off);
695+ size_t progress, bool irqs_off);
696696
697697 /* the spi driver core manages memory for the spi_controller classdev */
698698 extern struct spi_controller *__spi_alloc_controller(struct device *host,
include/linux/sxgbe_platform.h+1−1
@@ -1,6 +1,6 @@
11 /* SPDX-License-Identifier: GPL-2.0-only */
22 /*
3− * 10G controller driver for Samsung EXYNOS SoCs
3+ * 10G controller driver for Samsung Exynos SoCs
44 *
55 * Copyright (C) 2013 Samsung Electronics Co., Ltd.
66 * http://www.samsung.com
include/linux/syscalls.h+1−0
@@ -1232,6 +1232,7 @@ asmlinkage long sys_ni_syscall(void); · 1231 unmodified lines
12321232 */
12331233
12341234 int ksys_umount(char __user *name, int flags);
1235+int ksys_dup(unsigned int fildes);
12351236 int ksys_chroot(const char __user *filename);
12361237 ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count);
12371238 int ksys_chdir(const char __user *filename);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t