Re: [PATCH 2/2] lib/genalloc.c: export symbol addr_in_gen_pool
On Thu, Jan 03, 2019 at 06:11:59PM +0800, Huang Shijie wrote: > On Wed, Jan 02, 2019 at 11:55:50PM -0800, Christoph Hellwig wrote: > > On Mon, Dec 24, 2018 at 03:06:22PM +0800, Huang Shijie wrote: > > > We may use the addr_in_gen_pool() in the driver module. > > > So export the addr_in_gen_pool for the compiling. > > > > Please send this along with the driver that plans to use it. > The driver is still under develop with the FPGA, and our hardware chip maybe > tape out at next year. So lets wait for the driver submission or another user before we export the symbol.
Re: [PATCH 2/2] lib/genalloc.c: export symbol addr_in_gen_pool
On Wed, Jan 02, 2019 at 11:55:50PM -0800, Christoph Hellwig wrote: > On Mon, Dec 24, 2018 at 03:06:22PM +0800, Huang Shijie wrote: > > We may use the addr_in_gen_pool() in the driver module. > > So export the addr_in_gen_pool for the compiling. > > Please send this along with the driver that plans to use it. The driver is still under develop with the FPGA, and our hardware chip maybe tape out at next year. Thanks Huang Shijie
Re: [PATCH 2/2] lib/genalloc.c: export symbol addr_in_gen_pool
On Mon, Dec 24, 2018 at 03:06:22PM +0800, Huang Shijie wrote: > We may use the addr_in_gen_pool() in the driver module. > So export the addr_in_gen_pool for the compiling. Please send this along with the driver that plans to use it.
Re: [PATCH 2/2] lib/genalloc.c: export symbol addr_in_gen_pool
On Thu, Dec 27, 2018 at 09:49:29PM -0800, Andrew Morton wrote: > On Mon, 24 Dec 2018 15:06:22 +0800 Huang Shijie wrote: > > > We may use the addr_in_gen_pool() in the driver module. > > So export the addr_in_gen_pool for the compiling. > > > > ... > > > > --- a/lib/genalloc.c > > +++ b/lib/genalloc.c > > @@ -450,6 +450,7 @@ bool addr_in_gen_pool(struct gen_pool *pool, unsigned > > long start, > > rcu_read_unlock(); > > return found; > > } > > +EXPORT_SYMBOL(addr_in_gen_pool); > > > > /** > > * gen_pool_avail - get available free space of the pool > > OK, but... The name is poor. > > q:/usr/src/25> grep EXPORT_SYMBOL lib/genalloc.c > EXPORT_SYMBOL(gen_pool_create); > EXPORT_SYMBOL(gen_pool_add_virt); > EXPORT_SYMBOL(gen_pool_virt_to_phys); > EXPORT_SYMBOL(gen_pool_destroy); > EXPORT_SYMBOL(gen_pool_alloc); > EXPORT_SYMBOL(gen_pool_alloc_algo); > EXPORT_SYMBOL(gen_pool_dma_alloc); > EXPORT_SYMBOL(gen_pool_free); > EXPORT_SYMBOL(gen_pool_for_each_chunk); > EXPORT_SYMBOL_GPL(gen_pool_avail); > EXPORT_SYMBOL_GPL(gen_pool_size); > EXPORT_SYMBOL(gen_pool_set_algo); > EXPORT_SYMBOL(gen_pool_first_fit); > EXPORT_SYMBOL(gen_pool_first_fit_align); > EXPORT_SYMBOL(gen_pool_fixed_alloc); > EXPORT_SYMBOL(gen_pool_first_fit_order_align); > EXPORT_SYMBOL(gen_pool_best_fit); > EXPORT_SYMBOL_GPL(gen_pool_get); > EXPORT_SYMBOL(devm_gen_pool_create); > EXPORT_SYMBOL_GPL(of_gen_pool_get); > > See? Almost everything is called gen_pool_foo. Which is correct as > per kernel conventions. We should globally rename this to > gen_pool_has_addr or similar. okay, I will do it right now.. Thanks Huang Shijie
Re: [PATCH 2/2] lib/genalloc.c: export symbol addr_in_gen_pool
On Mon, 24 Dec 2018 15:06:22 +0800 Huang Shijie wrote: > We may use the addr_in_gen_pool() in the driver module. > So export the addr_in_gen_pool for the compiling. > > ... > > --- a/lib/genalloc.c > +++ b/lib/genalloc.c > @@ -450,6 +450,7 @@ bool addr_in_gen_pool(struct gen_pool *pool, unsigned > long start, > rcu_read_unlock(); > return found; > } > +EXPORT_SYMBOL(addr_in_gen_pool); > > /** > * gen_pool_avail - get available free space of the pool OK, but... The name is poor. q:/usr/src/25> grep EXPORT_SYMBOL lib/genalloc.c EXPORT_SYMBOL(gen_pool_create); EXPORT_SYMBOL(gen_pool_add_virt); EXPORT_SYMBOL(gen_pool_virt_to_phys); EXPORT_SYMBOL(gen_pool_destroy); EXPORT_SYMBOL(gen_pool_alloc); EXPORT_SYMBOL(gen_pool_alloc_algo); EXPORT_SYMBOL(gen_pool_dma_alloc); EXPORT_SYMBOL(gen_pool_free); EXPORT_SYMBOL(gen_pool_for_each_chunk); EXPORT_SYMBOL_GPL(gen_pool_avail); EXPORT_SYMBOL_GPL(gen_pool_size); EXPORT_SYMBOL(gen_pool_set_algo); EXPORT_SYMBOL(gen_pool_first_fit); EXPORT_SYMBOL(gen_pool_first_fit_align); EXPORT_SYMBOL(gen_pool_fixed_alloc); EXPORT_SYMBOL(gen_pool_first_fit_order_align); EXPORT_SYMBOL(gen_pool_best_fit); EXPORT_SYMBOL_GPL(gen_pool_get); EXPORT_SYMBOL(devm_gen_pool_create); EXPORT_SYMBOL_GPL(of_gen_pool_get); See? Almost everything is called gen_pool_foo. Which is correct as per kernel conventions. We should globally rename this to gen_pool_has_addr or similar.
[PATCH 2/2] lib/genalloc.c: export symbol addr_in_gen_pool
We may use the addr_in_gen_pool() in the driver module. So export the addr_in_gen_pool for the compiling. Signed-off-by: Huang Shijie --- lib/genalloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/genalloc.c b/lib/genalloc.c index 0d0ff9f0483f..9da91a16046f 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c @@ -450,6 +450,7 @@ bool addr_in_gen_pool(struct gen_pool *pool, unsigned long start, rcu_read_unlock(); return found; } +EXPORT_SYMBOL(addr_in_gen_pool); /** * gen_pool_avail - get available free space of the pool -- 2.17.1