Showing the changes to include/linux (7 of 197 files). Show all
Unified · Split
| @@ -470,6 +470,7 @@ extern struct bio *bio_copy_user_iov(struct request_queue *, · 469 unmodified lines | |||
| 470 | gfp_t); | 470 | gfp_t); |
| 471 | extern int bio_uncopy_user(struct bio *); | 471 | extern int bio_uncopy_user(struct bio *); |
| 472 | void zero_fill_bio_iter(struct bio *bio, struct bvec_iter iter); | 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 | static inline void zero_fill_bio(struct bio *bio) | 475 | static inline void zero_fill_bio(struct bio *bio) |
| 475 | { | 476 | { |
| @@ -1364,8 +1364,11 @@ static inline int dma_get_slave_caps(struct dma_chan *chan, · 1363 unmodified lines | |||
| 1364 | static inline int dmaengine_desc_set_reuse(struct dma_async_tx_descriptor *tx) | 1364 | static 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; |
| @@ -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_UP | 84 | #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP |
| @@ -122,8 +122,8 @@ static inline bool movable_node_is_enabled(void) · 121 unmodified lines | |||
| 122 | 122 | ||
| 123 | extern void arch_remove_memory(int nid, u64 start, u64 size, | 123 | extern void arch_remove_memory(int nid, u64 start, u64 size, |
| 124 | struct vmem_altmap *altmap); | 124 | struct vmem_altmap *altmap); |
| 125 | extern void __remove_pages(struct zone *zone, unsigned long start_pfn, | 125 | extern 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 */ |
| 129 | extern int __add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages, | 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 | extern int add_memory_resource(int nid, struct resource *resource); | 342 | extern int add_memory_resource(int nid, struct resource *resource); |
| 343 | extern void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn, | 343 | extern 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); |
| 345 | extern void remove_pfn_range_from_zone(struct zone *zone, | ||
| 346 | unsigned long start_pfn, | ||
| 347 | unsigned long nr_pages); | ||
| 345 | extern bool is_memblock_offlined(struct memory_block *mem); | 348 | extern bool is_memblock_offlined(struct memory_block *mem); |
| 346 | extern int sparse_add_section(int nid, unsigned long pfn, | 349 | extern 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); |
| @@ -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 */ |
| 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 | return false; | 60 | return false; |
| 61 | } | 61 | } |
| @@ -69,29 +69,32 @@ struct posix_clock_operations { · 68 unmodified lines | |||
| 69 | * | 69 | * |
| 70 | * @ops: Functional interface to the clock | 70 | * @ops: Functional interface to the clock |
| 71 | * @cdev: Character device instance for this clock | 71 | * @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 private | 76 | * Drivers should embed their struct posix_clock within a private |
| 79 | * structure, obtaining a reference to it during callbacks using | 77 | * 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 | */ |
| 82 | struct posix_clock { | 85 | struct 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 clock | 94 | * 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 id | 96 | * @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 the | 99 | * A clock driver calls this function to register itself with the |
| 97 | * clock device subsystem. If 'clk' points to dynamically allocated | 100 | * 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 | */ |
| 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 | * posix_clock_unregister() - unregister a clock | 109 | * posix_clock_unregister() - unregister a clock |
| @@ -1232,6 +1232,7 @@ asmlinkage long sys_ni_syscall(void); · 1231 unmodified lines | |||
| 1232 | */ | 1232 | */ |
| 1233 | 1233 | ||
| 1234 | int ksys_umount(char __user *name, int flags); | 1234 | int ksys_umount(char __user *name, int flags); |
| 1235 | int ksys_dup(unsigned int fildes); | ||
| 1235 | int ksys_chroot(const char __user *filename); | 1236 | int ksys_chroot(const char __user *filename); |
| 1236 | ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count); | 1237 | ssize_t ksys_write(unsigned int fd, const char __user *buf, size_t count); |
| 1237 | int ksys_chdir(const char __user *filename); | 1238 | int ksys_chdir(const char __user *filename); |