linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Jiandi An <jiandi.an@amd.com>
Cc: kbuild-all@01.org, dri-devel@lists.freedesktop.org,
	airlied@linux.ie, linux-kernel@vger.kernel.org,
	ray.huang@amd.com, jiandi.an@amd.com, Jerry.Zhang@amd.com,
	christian.koenig@amd.com
Subject: Re: [PATCH 1/1] drm/ttm: Set memory as decrypted for ttm framebuffer mappings
Date: Thu, 23 Aug 2018 14:42:07 +0800	[thread overview]
Message-ID: <201808231438.vltLWlI5%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180822185754.104729-1-jiandi.an@amd.com>

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

Hi Jiandi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.18 next-20180822]
[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/Jiandi-An/drm-ttm-Set-memory-as-decrypted-for-ttm-framebuffer-mappings/20180823-113546
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=arm64 

All errors (new ones prefixed by >>):

   drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_bo_kmap':
>> drivers/gpu/drm/ttm/ttm_bo_util.c:644:15: error: implicit declaration of function 'sev_active'; did you mean 'cpu_active'? [-Werror=implicit-function-declaration]
      if (!ret && sev_active())
                  ^~~~~~~~~~
                  cpu_active
>> drivers/gpu/drm/ttm/ttm_bo_util.c:645:4: error: implicit declaration of function 'set_memory_decrypted'; did you mean 'set_memory_valid'? [-Werror=implicit-function-declaration]
       set_memory_decrypted((unsigned long) map->virtual,
       ^~~~~~~~~~~~~~~~~~~~
       set_memory_valid
   drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_bo_kunmap':
>> drivers/gpu/drm/ttm/ttm_bo_util.c:670:4: error: implicit declaration of function 'set_memory_encrypted'; did you mean 'set_memory_valid'? [-Werror=implicit-function-declaration]
       set_memory_encrypted((unsigned long) map->virtual,
       ^~~~~~~~~~~~~~~~~~~~
       set_memory_valid
   cc1: some warnings being treated as errors

vim +644 drivers/gpu/drm/ttm/ttm_bo_util.c

   617	
   618	int ttm_bo_kmap(struct ttm_buffer_object *bo,
   619			unsigned long start_page, unsigned long num_pages,
   620			struct ttm_bo_kmap_obj *map)
   621	{
   622		struct ttm_mem_type_manager *man =
   623			&bo->bdev->man[bo->mem.mem_type];
   624		unsigned long offset, size;
   625		int ret;
   626	
   627		map->virtual = NULL;
   628		map->bo = bo;
   629		if (num_pages > bo->num_pages)
   630			return -EINVAL;
   631		if (start_page > bo->num_pages)
   632			return -EINVAL;
   633	#if 0
   634		if (num_pages > 1 && !capable(CAP_SYS_ADMIN))
   635			return -EPERM;
   636	#endif
   637		(void) ttm_mem_io_lock(man, false);
   638		ret = ttm_mem_io_reserve(bo->bdev, &bo->mem);
   639		ttm_mem_io_unlock(man);
   640		if (ret)
   641			return ret;
   642		if (!bo->mem.bus.is_iomem) {
   643			ret = ttm_bo_kmap_ttm(bo, start_page, num_pages, map);
 > 644			if (!ret && sev_active())
 > 645				set_memory_decrypted((unsigned long) map->virtual,
   646						     num_pages);
   647			return ret;
   648		} else {
   649			offset = start_page << PAGE_SHIFT;
   650			size = num_pages << PAGE_SHIFT;
   651			return ttm_bo_ioremap(bo, offset, size, map);
   652		}
   653	}
   654	EXPORT_SYMBOL(ttm_bo_kmap);
   655	
   656	void ttm_bo_kunmap(struct ttm_bo_kmap_obj *map)
   657	{
   658		struct ttm_buffer_object *bo = map->bo;
   659		struct ttm_mem_type_manager *man =
   660			&bo->bdev->man[bo->mem.mem_type];
   661	
   662		if (!map->virtual)
   663			return;
   664		switch (map->bo_kmap_type) {
   665		case ttm_bo_map_iomap:
   666			iounmap(map->virtual);
   667			break;
   668		case ttm_bo_map_vmap:
   669			if (sev_active())
 > 670				set_memory_encrypted((unsigned long) map->virtual,
   671						     bo->num_pages);
   672			vunmap(map->virtual);
   673			break;
   674		case ttm_bo_map_kmap:
   675			if (sev_active())
   676				set_memory_encrypted((unsigned long) map->virtual, 1);
   677			kunmap(map->page);
   678			break;
   679		case ttm_bo_map_premapped:
   680			break;
   681		default:
   682			BUG();
   683		}
   684		(void) ttm_mem_io_lock(man, false);
   685		ttm_mem_io_free(map->bo->bdev, &map->bo->mem);
   686		ttm_mem_io_unlock(man);
   687		map->virtual = NULL;
   688		map->page = NULL;
   689	}
   690	EXPORT_SYMBOL(ttm_bo_kunmap);
   691	

---
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: 39470 bytes --]

      parent reply	other threads:[~2018-08-23  6:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22 18:57 [PATCH 1/1] drm/ttm: Set memory as decrypted for ttm framebuffer mappings Jiandi An
2018-08-22 19:09 ` Christian König
2018-08-22 20:57   ` Jiandi An
2018-08-23  6:47     ` Christian König
2018-08-23 23:05       ` Jiandi An
2018-08-24  7:21         ` Christian König
2018-09-27 20:28           ` Jiandi An
2018-08-23  6:23 ` kbuild test robot
2018-08-23  6:42 ` kbuild test robot [this message]

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=201808231438.vltLWlI5%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=Jerry.Zhang@amd.com \
    --cc=airlied@linux.ie \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jiandi.an@amd.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ray.huang@amd.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).