tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 1b5044021070efa3259f3e9548dc35d1eb6aa844 commit: dbed452a078d56bc7f1abecc3edd6a75e8e4484e dma-pool: decouple DMA_REMAP from DMA_COHERENT_POOL date: 3 days ago config: x86_64-randconfig-s031-20200618 (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.2-rc1-10-gc17b1b06-dirty git checkout dbed452a078d56bc7f1abecc3edd6a75e8e4484e # save the attached .config to linux build tree make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <l...@intel.com> All errors (new ones prefixed by >>): vim +104 include/linux/genalloc.h b26981c8f743d3 Zhao Qiang 2015-11-30 95 929f97276bcf7f Dean Nelson 2006-06-23 96 extern struct gen_pool *gen_pool_create(int, int); 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 97 extern phys_addr_t gen_pool_virt_to_phys(struct gen_pool *pool, unsigned long); 795ee30648c708 Dan Williams 2019-06-13 98 extern int gen_pool_add_owner(struct gen_pool *, unsigned long, phys_addr_t, 795ee30648c708 Dan Williams 2019-06-13 99 size_t, int, void *); 795ee30648c708 Dan Williams 2019-06-13 100 795ee30648c708 Dan Williams 2019-06-13 101 static inline int gen_pool_add_virt(struct gen_pool *pool, unsigned long addr, 795ee30648c708 Dan Williams 2019-06-13 102 phys_addr_t phys, size_t size, int nid) 795ee30648c708 Dan Williams 2019-06-13 103 { 795ee30648c708 Dan Williams 2019-06-13 @104 return gen_pool_add_owner(pool, addr, phys, size, nid, NULL); 795ee30648c708 Dan Williams 2019-06-13 105 } 795ee30648c708 Dan Williams 2019-06-13 106 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 107 /** 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 108 * gen_pool_add - add a new chunk of special memory to the pool 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 109 * @pool: pool to add new memory chunk to 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 110 * @addr: starting address of memory chunk to add to pool 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 111 * @size: size in bytes of the memory chunk to add to pool 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 112 * @nid: node id of the node the chunk structure and bitmap should be 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 113 * allocated on, or -1 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 114 * 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 115 * Add a new chunk of special memory to the specified pool. 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 116 * 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 117 * Returns 0 on success or a -ve errno on failure. 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 118 */ 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 119 static inline int gen_pool_add(struct gen_pool *pool, unsigned long addr, 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 120 size_t size, int nid) 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 121 { 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 122 return gen_pool_add_virt(pool, addr, -1, size, nid); 3c8f370ded3483 Jean-Christophe PLAGNIOL-VILLARD 2011-05-24 123 } 322acc96d4bd3d Steve Wise 2006-10-02 124 extern void gen_pool_destroy(struct gen_pool *); 795ee30648c708 Dan Williams 2019-06-13 125 unsigned long gen_pool_alloc_algo_owner(struct gen_pool *pool, size_t size, 795ee30648c708 Dan Williams 2019-06-13 126 genpool_algo_t algo, void *data, void **owner); 795ee30648c708 Dan Williams 2019-06-13 127 795ee30648c708 Dan Williams 2019-06-13 128 static inline unsigned long gen_pool_alloc_owner(struct gen_pool *pool, 795ee30648c708 Dan Williams 2019-06-13 129 size_t size, void **owner) 795ee30648c708 Dan Williams 2019-06-13 130 { 795ee30648c708 Dan Williams 2019-06-13 131 return gen_pool_alloc_algo_owner(pool, size, pool->algo, pool->data, 795ee30648c708 Dan Williams 2019-06-13 132 owner); 795ee30648c708 Dan Williams 2019-06-13 133 } 795ee30648c708 Dan Williams 2019-06-13 134 795ee30648c708 Dan Williams 2019-06-13 135 static inline unsigned long gen_pool_alloc_algo(struct gen_pool *pool, 795ee30648c708 Dan Williams 2019-06-13 136 size_t size, genpool_algo_t algo, void *data) 795ee30648c708 Dan Williams 2019-06-13 137 { 795ee30648c708 Dan Williams 2019-06-13 @138 return gen_pool_alloc_algo_owner(pool, size, algo, data, NULL); 795ee30648c708 Dan Williams 2019-06-13 139 } 795ee30648c708 Dan Williams 2019-06-13 140 795ee30648c708 Dan Williams 2019-06-13 141 /** 795ee30648c708 Dan Williams 2019-06-13 142 * gen_pool_alloc - allocate special memory from the pool 795ee30648c708 Dan Williams 2019-06-13 143 * @pool: pool to allocate from 795ee30648c708 Dan Williams 2019-06-13 144 * @size: number of bytes to allocate from the pool 795ee30648c708 Dan Williams 2019-06-13 145 * 795ee30648c708 Dan Williams 2019-06-13 146 * Allocate the requested number of bytes from the specified pool. 795ee30648c708 Dan Williams 2019-06-13 147 * Uses the pool allocation function (with first-fit algorithm by default). 795ee30648c708 Dan Williams 2019-06-13 148 * Can not be used in NMI handler on architectures without 795ee30648c708 Dan Williams 2019-06-13 149 * NMI-safe cmpxchg implementation. 795ee30648c708 Dan Williams 2019-06-13 150 */ 795ee30648c708 Dan Williams 2019-06-13 151 static inline unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size) 795ee30648c708 Dan Williams 2019-06-13 152 { 795ee30648c708 Dan Williams 2019-06-13 153 return gen_pool_alloc_algo(pool, size, pool->algo, pool->data); 795ee30648c708 Dan Williams 2019-06-13 154 } 795ee30648c708 Dan Williams 2019-06-13 155 684f0d3d14f274 Nicolin Chen 2013-11-12 156 extern void *gen_pool_dma_alloc(struct gen_pool *pool, size_t size, 684f0d3d14f274 Nicolin Chen 2013-11-12 157 dma_addr_t *dma); cf394fc5f7155c Fredrik Noring 2019-06-25 158 extern void *gen_pool_dma_alloc_algo(struct gen_pool *pool, size_t size, cf394fc5f7155c Fredrik Noring 2019-06-25 159 dma_addr_t *dma, genpool_algo_t algo, void *data); cf394fc5f7155c Fredrik Noring 2019-06-25 160 extern void *gen_pool_dma_alloc_align(struct gen_pool *pool, size_t size, cf394fc5f7155c Fredrik Noring 2019-06-25 161 dma_addr_t *dma, int align); cf394fc5f7155c Fredrik Noring 2019-06-25 162 extern void *gen_pool_dma_zalloc(struct gen_pool *pool, size_t size, dma_addr_t *dma); cf394fc5f7155c Fredrik Noring 2019-06-25 163 extern void *gen_pool_dma_zalloc_algo(struct gen_pool *pool, size_t size, cf394fc5f7155c Fredrik Noring 2019-06-25 164 dma_addr_t *dma, genpool_algo_t algo, void *data); cf394fc5f7155c Fredrik Noring 2019-06-25 165 extern void *gen_pool_dma_zalloc_align(struct gen_pool *pool, size_t size, cf394fc5f7155c Fredrik Noring 2019-06-25 166 dma_addr_t *dma, int align); 795ee30648c708 Dan Williams 2019-06-13 167 extern void gen_pool_free_owner(struct gen_pool *pool, unsigned long addr, 795ee30648c708 Dan Williams 2019-06-13 168 size_t size, void **owner); 795ee30648c708 Dan Williams 2019-06-13 169 static inline void gen_pool_free(struct gen_pool *pool, unsigned long addr, 795ee30648c708 Dan Williams 2019-06-13 170 size_t size) 795ee30648c708 Dan Williams 2019-06-13 171 { 795ee30648c708 Dan Williams 2019-06-13 @172 gen_pool_free_owner(pool, addr, size, NULL); 795ee30648c708 Dan Williams 2019-06-13 173 } 795ee30648c708 Dan Williams 2019-06-13 174 :::::: The code at line 104 was first introduced by commit :::::: 795ee30648c708502da9df637f83c33361d68dcc lib/genalloc: introduce chunk owners :::::: TO: Dan Williams <dan.j.willi...@intel.com> :::::: CC: Linus Torvalds <torva...@linux-foundation.org> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
.config.gz
Description: application/gzip