Re: [PATCH v2 2/2] kernel.h: Disable -Wreturn-stack-address for _THIS_IP_
From: kbuild test robot
Date: Tue Jul 31 2018 - 09:54:48 EST
Hi Nick,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v4.18-rc7 next-20180727]
[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/Nick-Desaulniers/compiler-clang-h-Add-CLANG_VERSION-and-__diag-macros/20180731-161932
config: x86_64-randconfig-s1-07312048 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/gpu//drm/i915/i915_gem.c: In function '__i915_gem_object_set_pages':
>> drivers/gpu//drm/i915/i915_gem.c:2697:1: error: expected expression before '#pragma'
GEM_BUG_ON(!HAS_PAGE_SIZES(i915, obj->mm.page_sizes.sg));
^~~
vim +2697 drivers/gpu//drm/i915/i915_gem.c
03ac84f18 Chris Wilson 2016-10-28 2658
03ac84f18 Chris Wilson 2016-10-28 2659 void __i915_gem_object_set_pages(struct drm_i915_gem_object *obj,
a5c081662 Matthew Auld 2017-10-06 2660 struct sg_table *pages,
84e8978e6 Matthew Auld 2017-10-09 2661 unsigned int sg_page_sizes)
03ac84f18 Chris Wilson 2016-10-28 2662 {
a5c081662 Matthew Auld 2017-10-06 2663 struct drm_i915_private *i915 = to_i915(obj->base.dev);
a5c081662 Matthew Auld 2017-10-06 2664 unsigned long supported = INTEL_INFO(i915)->page_sizes;
a5c081662 Matthew Auld 2017-10-06 2665 int i;
a5c081662 Matthew Auld 2017-10-06 2666
1233e2db1 Chris Wilson 2016-10-28 2667 lockdep_assert_held(&obj->mm.lock);
03ac84f18 Chris Wilson 2016-10-28 2668
03ac84f18 Chris Wilson 2016-10-28 2669 obj->mm.get_page.sg_pos = pages->sgl;
03ac84f18 Chris Wilson 2016-10-28 2670 obj->mm.get_page.sg_idx = 0;
03ac84f18 Chris Wilson 2016-10-28 2671
03ac84f18 Chris Wilson 2016-10-28 2672 obj->mm.pages = pages;
2c3a3f44d Chris Wilson 2016-11-04 2673
2c3a3f44d Chris Wilson 2016-11-04 2674 if (i915_gem_object_is_tiled(obj) &&
f2123818f Chris Wilson 2017-10-16 2675 i915->quirks & QUIRK_PIN_SWIZZLED_PAGES) {
2c3a3f44d Chris Wilson 2016-11-04 2676 GEM_BUG_ON(obj->mm.quirked);
2c3a3f44d Chris Wilson 2016-11-04 2677 __i915_gem_object_pin_pages(obj);
2c3a3f44d Chris Wilson 2016-11-04 2678 obj->mm.quirked = true;
2c3a3f44d Chris Wilson 2016-11-04 2679 }
a5c081662 Matthew Auld 2017-10-06 2680
84e8978e6 Matthew Auld 2017-10-09 2681 GEM_BUG_ON(!sg_page_sizes);
84e8978e6 Matthew Auld 2017-10-09 2682 obj->mm.page_sizes.phys = sg_page_sizes;
a5c081662 Matthew Auld 2017-10-06 2683
a5c081662 Matthew Auld 2017-10-06 2684 /*
84e8978e6 Matthew Auld 2017-10-09 2685 * Calculate the supported page-sizes which fit into the given
84e8978e6 Matthew Auld 2017-10-09 2686 * sg_page_sizes. This will give us the page-sizes which we may be able
84e8978e6 Matthew Auld 2017-10-09 2687 * to use opportunistically when later inserting into the GTT. For
84e8978e6 Matthew Auld 2017-10-09 2688 * example if phys=2G, then in theory we should be able to use 1G, 2M,
84e8978e6 Matthew Auld 2017-10-09 2689 * 64K or 4K pages, although in practice this will depend on a number of
84e8978e6 Matthew Auld 2017-10-09 2690 * other factors.
a5c081662 Matthew Auld 2017-10-06 2691 */
a5c081662 Matthew Auld 2017-10-06 2692 obj->mm.page_sizes.sg = 0;
a5c081662 Matthew Auld 2017-10-06 2693 for_each_set_bit(i, &supported, ilog2(I915_GTT_MAX_PAGE_SIZE) + 1) {
a5c081662 Matthew Auld 2017-10-06 2694 if (obj->mm.page_sizes.phys & ~0u << i)
a5c081662 Matthew Auld 2017-10-06 2695 obj->mm.page_sizes.sg |= BIT(i);
a5c081662 Matthew Auld 2017-10-06 2696 }
a5c081662 Matthew Auld 2017-10-06 @2697 GEM_BUG_ON(!HAS_PAGE_SIZES(i915, obj->mm.page_sizes.sg));
f2123818f Chris Wilson 2017-10-16 2698
f2123818f Chris Wilson 2017-10-16 2699 spin_lock(&i915->mm.obj_lock);
f2123818f Chris Wilson 2017-10-16 2700 list_add(&obj->mm.link, &i915->mm.unbound_list);
f2123818f Chris Wilson 2017-10-16 2701 spin_unlock(&i915->mm.obj_lock);
03ac84f18 Chris Wilson 2016-10-28 2702 }
03ac84f18 Chris Wilson 2016-10-28 2703
:::::: The code at line 2697 was first introduced by commit
:::::: a5c08166265adc172a4cbde8ed26a1a96ce77fb7 drm/i915: introduce page_size members
:::::: TO: Matthew Auld <matthew.auld@xxxxxxxxx>
:::::: CC: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip