All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: "Christian König" <deathsimple@vodafone.de>
Cc: kbuild-all@01.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/ttm: add transparent huge page support for DMA allocations
Date: Fri, 14 Jul 2017 08:32:49 +0800	[thread overview]
Message-ID: <201707140802.nQlHC5cI%fengguang.wu@intel.com> (raw)
In-Reply-To: <1499954169-3209-3-git-send-email-deathsimple@vodafone.de>

[-- Attachment #1: Type: text/plain, Size: 4260 bytes --]

Hi Christian,

[auto build test WARNING on drm/drm-next]
[also build test WARNING on v4.12 next-20170713]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Christian-K-nig/drm-ttm-add-support-for-different-pool-sizes/20170714-075329
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: i386-randconfig-x013-201728 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/gpu//drm/ttm/ttm_page_alloc_dma.c: In function 'ttm_dma_pool_init':
>> drivers/gpu//drm/ttm/ttm_page_alloc_dma.c:636:5: warning: "CONFIG_TRANSPARENT_HUGEPAGE" is not defined [-Wundef]
    #if CONFIG_TRANSPARENT_HUGEPAGE
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu//drm/ttm/ttm_page_alloc_dma.c: In function 'ttm_dma_populate':
   drivers/gpu//drm/ttm/ttm_page_alloc_dma.c:943:5: warning: "CONFIG_TRANSPARENT_HUGEPAGE" is not defined [-Wundef]
    #if CONFIG_TRANSPARENT_HUGEPAGE
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu//drm/ttm/ttm_page_alloc_dma.c: In function 'ttm_dma_unpopulate':
   drivers/gpu//drm/ttm/ttm_page_alloc_dma.c:1036:5: warning: "CONFIG_TRANSPARENT_HUGEPAGE" is not defined [-Wundef]
    #if CONFIG_TRANSPARENT_HUGEPAGE
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/CONFIG_TRANSPARENT_HUGEPAGE +636 drivers/gpu//drm/ttm/ttm_page_alloc_dma.c

   593	
   594	static struct dma_pool *ttm_dma_pool_init(struct device *dev, gfp_t flags,
   595						  enum pool_type type)
   596	{
   597		const char *n[] = {"wc", "uc", "cached", " dma32", "huge"};
   598		enum pool_type t[] = {IS_WC, IS_UC, IS_CACHED, IS_DMA32, IS_HUGE};
   599		struct device_pools *sec_pool = NULL;
   600		struct dma_pool *pool = NULL, **ptr;
   601		unsigned i;
   602		int ret = -ENODEV;
   603		char *p;
   604	
   605		if (!dev)
   606			return NULL;
   607	
   608		ptr = devres_alloc(ttm_dma_pool_release, sizeof(*ptr), GFP_KERNEL);
   609		if (!ptr)
   610			return NULL;
   611	
   612		ret = -ENOMEM;
   613	
   614		pool = kmalloc_node(sizeof(struct dma_pool), GFP_KERNEL,
   615				    dev_to_node(dev));
   616		if (!pool)
   617			goto err_mem;
   618	
   619		sec_pool = kmalloc_node(sizeof(struct device_pools), GFP_KERNEL,
   620					dev_to_node(dev));
   621		if (!sec_pool)
   622			goto err_mem;
   623	
   624		INIT_LIST_HEAD(&sec_pool->pools);
   625		sec_pool->dev = dev;
   626		sec_pool->pool =  pool;
   627	
   628		INIT_LIST_HEAD(&pool->free_list);
   629		INIT_LIST_HEAD(&pool->pools);
   630		spin_lock_init(&pool->lock);
   631		pool->dev = dev;
   632		pool->npages_free = pool->npages_in_use = 0;
   633		pool->nfrees = 0;
   634		pool->gfp_flags = flags;
   635		if (type & IS_HUGE)
 > 636	#if CONFIG_TRANSPARENT_HUGEPAGE
   637			pool->size = HPAGE_PMD_SIZE;
   638	#else
   639			BUG();
   640	#endif
   641		else
   642			pool->size = PAGE_SIZE;
   643		pool->type = type;
   644		pool->nrefills = 0;
   645		p = pool->name;
   646		for (i = 0; i < ARRAY_SIZE(t); i++) {
   647			if (type & t[i]) {
   648				p += snprintf(p, sizeof(pool->name) - (p - pool->name),
   649					      "%s", n[i]);
   650			}
   651		}
   652		*p = 0;
   653		/* We copy the name for pr_ calls b/c when dma_pool_destroy is called
   654		 * - the kobj->name has already been deallocated.*/
   655		snprintf(pool->dev_name, sizeof(pool->dev_name), "%s %s",
   656			 dev_driver_string(dev), dev_name(dev));
   657		mutex_lock(&_manager->lock);
   658		/* You can get the dma_pool from either the global: */
   659		list_add(&sec_pool->pools, &_manager->pools);
   660		_manager->npools++;
   661		/* or from 'struct device': */
   662		list_add(&pool->pools, &dev->dma_pools);
   663		mutex_unlock(&_manager->lock);
   664	
   665		*ptr = pool;
   666		devres_add(dev, ptr);
   667	
   668		return pool;
   669	err_mem:
   670		devres_free(ptr);
   671		kfree(sec_pool);
   672		kfree(pool);
   673		return ERR_PTR(ret);
   674	}
   675	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24243 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-07-14  0:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13 13:56 [PATCH 1/3] drm/ttm: add support for different pool sizes Christian König
2017-07-13 13:56 ` [PATCH 2/3] drm/ttm: cleanup ttm_page_alloc_dma.c Christian König
2017-07-14 15:42   ` Alex Deucher
2017-07-13 13:56 ` [PATCH 3/3] drm/ttm: add transparent huge page support for DMA allocations Christian König
2017-07-14  0:32   ` kbuild test robot [this message]
2017-07-14 16:24   ` Alex Deucher
2017-07-14 15:41 ` [PATCH 1/3] drm/ttm: add support for different pool sizes Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201707140802.nQlHC5cI%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=deathsimple@vodafone.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kbuild-all@01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.