All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] Fix global symbol loading failure in resolve function
@ 2019-09-24  8:02 brandon.hong
  2019-09-24  8:26 ` Chris Wilson
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: brandon.hong @ 2019-09-24  8:02 UTC (permalink / raw)
  To: igt-dev

From: Brandon Hong <brandon.hong@intel.com>

270 out of 284 tests get failed with SIGSEGV on ClearLinux because the ifunc
resolver resolve_half_to_float() tries to call unbound global function
igt_x86_features(). This patch fixes the issue by adding a F16C checking
local function.

Signed-off-by: Brandon Hong <brandon.hong@intel.com>
---
 lib/igt_halffloat.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/lib/igt_halffloat.c b/lib/igt_halffloat.c
index 08ab05fc..17e9cf9d 100644
--- a/lib/igt_halffloat.c
+++ b/lib/igt_halffloat.c
@@ -24,6 +24,8 @@
 
 #include <assert.h>
 #include <math.h>
+#include <stdbool.h>
+#include <cpuid.h>
 
 #include "igt_halffloat.h"
 #include "igt_x86.h"
@@ -182,6 +184,20 @@ static void half_to_float_f16c(const uint16_t *h, float *f, unsigned int num)
 
 #pragma GCC pop_options
 
+static bool f16c_is_supported(void)
+{
+	unsigned max = __get_cpuid_max(0, NULL);
+	unsigned eax, ebx, ecx, edx;
+
+	if (max >= 1) {
+		__cpuid(1, eax, ebx, ecx, edx);
+
+		if (ecx & bit_F16C)
+			return true;
+	}
+	return false;
+}
+
 static void float_to_half(const float *f, uint16_t *h, unsigned int num)
 {
 	for (int i = 0; i < num; i++)
@@ -194,9 +210,10 @@ static void half_to_float(const uint16_t *h, float *f, unsigned int num)
 		f[i] = _half_to_float(h[i]);
 }
 
+
 static void (*resolve_float_to_half(void))(const float *f, uint16_t *h, unsigned int num)
 {
-	if (igt_x86_features() & F16C)
+	if (f16c_is_supported())
 		return float_to_half_f16c;
 
 	return float_to_half;
@@ -207,7 +224,7 @@ void igt_float_to_half(const float *f, uint16_t *h, unsigned int num)
 
 static void (*resolve_half_to_float(void))(const uint16_t *h, float *f, unsigned int num)
 {
-	if (igt_x86_features() & F16C)
+	if (f16c_is_supported())
 		return half_to_float_f16c;
 
 	return half_to_float;
-- 
2.23.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] Fix global symbol loading failure in resolve function
  2019-09-24  8:02 [igt-dev] [PATCH i-g-t] Fix global symbol loading failure in resolve function brandon.hong
@ 2019-09-24  8:26 ` Chris Wilson
  2019-09-24 14:22   ` Hong, Brandon
  2019-09-24  8:42 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Chris Wilson @ 2019-09-24  8:26 UTC (permalink / raw)
  To: brandon.hong, igt-dev

Quoting brandon.hong@intel.com (2019-09-24 09:02:07)
> From: Brandon Hong <brandon.hong@intel.com>
> 
> 270 out of 284 tests get failed with SIGSEGV on ClearLinux because the ifunc
> resolver resolve_half_to_float() tries to call unbound global function
> igt_x86_features(). This patch fixes the issue by adding a F16C checking
> local function.

So, out of curiosity, why is the global function not bound?
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] ✗ GitLab.Pipeline: warning for Fix global symbol loading failure in resolve function
  2019-09-24  8:02 [igt-dev] [PATCH i-g-t] Fix global symbol loading failure in resolve function brandon.hong
  2019-09-24  8:26 ` Chris Wilson
@ 2019-09-24  8:42 ` Patchwork
  2019-09-24  8:55 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
  2019-09-24 17:28 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2019-09-24  8:42 UTC (permalink / raw)
  To: brandon.hong; +Cc: igt-dev

== Series Details ==

Series: Fix global symbol loading failure in resolve function
URL   : https://patchwork.freedesktop.org/series/67150/
State : warning

== Summary ==

Did not get list of undocumented tests for this run, something is wrong!

Other than that, pipeline status: FAILED.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/65845 for more details

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/65845
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for Fix global symbol loading failure in resolve function
  2019-09-24  8:02 [igt-dev] [PATCH i-g-t] Fix global symbol loading failure in resolve function brandon.hong
  2019-09-24  8:26 ` Chris Wilson
  2019-09-24  8:42 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
@ 2019-09-24  8:55 ` Patchwork
  2019-09-24 17:28 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  3 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2019-09-24  8:55 UTC (permalink / raw)
  To: brandon.hong; +Cc: igt-dev

== Series Details ==

Series: Fix global symbol loading failure in resolve function
URL   : https://patchwork.freedesktop.org/series/67150/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6946 -> IGTPW_3493
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/67150/revisions/1/mbox/

Known issues
------------

  Here are the changes found in IGTPW_3493 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_create@basic-files:
    - fi-icl-u2:          [PASS][1] -> [INCOMPLETE][2] ([fdo#107713] / [fdo#109100])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/fi-icl-u2/igt@gem_ctx_create@basic-files.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/fi-icl-u2/igt@gem_ctx_create@basic-files.html

  
#### Possible fixes ####

  * igt@gem_ctx_switch@legacy-render:
    - {fi-tgl-u2}:        [INCOMPLETE][3] ([fdo#111381]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/fi-tgl-u2/igt@gem_ctx_switch@legacy-render.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/fi-tgl-u2/igt@gem_ctx_switch@legacy-render.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][5] ([fdo#111407]) -> [PASS][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-blb-e6850:       [INCOMPLETE][7] ([fdo#107718]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/fi-blb-e6850/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/fi-blb-e6850/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
  [fdo#110566]: https://bugs.freedesktop.org/show_bug.cgi?id=110566
  [fdo#111381]: https://bugs.freedesktop.org/show_bug.cgi?id=111381
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [fdo#111600]: https://bugs.freedesktop.org/show_bug.cgi?id=111600


Participating hosts (54 -> 45)
------------------------------

  Missing    (9): fi-ilk-m540 fi-bxt-dsi fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-apl-guc fi-icl-y fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_5198 -> IGTPW_3493

  CI-20190529: 20190529
  CI_DRM_6946: af23c2755dca7e363fb694a871a2c7d3e1b5d16d @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3493: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/
  IGT_5198: dde20ad4ebde98770e4da8129cc8e169162c34fe @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] Fix global symbol loading failure in resolve function
  2019-09-24  8:26 ` Chris Wilson
@ 2019-09-24 14:22   ` Hong, Brandon
  0 siblings, 0 replies; 11+ messages in thread
From: Hong, Brandon @ 2019-09-24 14:22 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

Unfortunately, I do not have a clear answer why it's not bound.
I guess it's related to IFUNC lazy binding because I observed crash call stack related to glibc elf_machine_rela() and the crash didn’t happen when I call the same global function igt_x86_features() in rewritten generic FUNC igt_half_to_float() for testing.
- Brandon

> On 24 Sep 2019, at 5:26 PM, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> 
> Quoting brandon.hong@intel.com (2019-09-24 09:02:07)
>> From: Brandon Hong <brandon.hong@intel.com>
>> 
>> 270 out of 284 tests get failed with SIGSEGV on ClearLinux because the ifunc
>> resolver resolve_half_to_float() tries to call unbound global function
>> igt_x86_features(). This patch fixes the issue by adding a F16C checking
>> local function.
> 
> So, out of curiosity, why is the global function not bound?
> -Chris

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for Fix global symbol loading failure in resolve function
  2019-09-24  8:02 [igt-dev] [PATCH i-g-t] Fix global symbol loading failure in resolve function brandon.hong
                   ` (2 preceding siblings ...)
  2019-09-24  8:55 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
@ 2019-09-24 17:28 ` Patchwork
  3 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2019-09-24 17:28 UTC (permalink / raw)
  To: Hong, Brandon; +Cc: igt-dev

== Series Details ==

Series: Fix global symbol loading failure in resolve function
URL   : https://patchwork.freedesktop.org/series/67150/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6946_full -> IGTPW_3493_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/67150/revisions/1/mbox/

Known issues
------------

  Here are the changes found in IGTPW_3493_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_switch@legacy-bsd2-heavy:
    - shard-iclb:         [PASS][1] -> [SKIP][2] ([fdo#109276]) +14 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb2/igt@gem_ctx_switch@legacy-bsd2-heavy.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb6/igt@gem_ctx_switch@legacy-bsd2-heavy.html

  * igt@gem_exec_schedule@preempt-other-bsd:
    - shard-iclb:         [PASS][3] -> [SKIP][4] ([fdo#111325]) +6 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb7/igt@gem_exec_schedule@preempt-other-bsd.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb1/igt@gem_exec_schedule@preempt-other-bsd.html

  * igt@i915_selftest@mock_fence:
    - shard-iclb:         [PASS][5] -> [INCOMPLETE][6] ([fdo#107713])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb4/igt@i915_selftest@mock_fence.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb7/igt@i915_selftest@mock_fence.html

  * igt@kms_cursor_crc@pipe-a-cursor-128x42-sliding:
    - shard-apl:          [PASS][7] -> [FAIL][8] ([fdo#103232])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-apl5/igt@kms_cursor_crc@pipe-a-cursor-128x42-sliding.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-apl4/igt@kms_cursor_crc@pipe-a-cursor-128x42-sliding.html
    - shard-kbl:          [PASS][9] -> [FAIL][10] ([fdo#103232])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-kbl6/igt@kms_cursor_crc@pipe-a-cursor-128x42-sliding.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-kbl1/igt@kms_cursor_crc@pipe-a-cursor-128x42-sliding.html

  * igt@kms_flip@flip-vs-suspend-interruptible:
    - shard-hsw:          [PASS][11] -> [INCOMPLETE][12] ([fdo#103540])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-hsw5/igt@kms_flip@flip-vs-suspend-interruptible.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-hsw2/igt@kms_flip@flip-vs-suspend-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-stridechange:
    - shard-iclb:         [PASS][13] -> [FAIL][14] ([fdo#103167]) +6 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-stridechange.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-stridechange.html

  * igt@kms_plane_lowres@pipe-a-tiling-y:
    - shard-iclb:         [PASS][15] -> [FAIL][16] ([fdo#103166])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb3/igt@kms_plane_lowres@pipe-a-tiling-y.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb1/igt@kms_plane_lowres@pipe-a-tiling-y.html

  * igt@kms_psr@psr2_cursor_render:
    - shard-iclb:         [PASS][17] -> [SKIP][18] ([fdo#109441]) +1 similar issue
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb5/igt@kms_psr@psr2_cursor_render.html

  * igt@kms_setmode@basic:
    - shard-hsw:          [PASS][19] -> [FAIL][20] ([fdo#99912])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-hsw6/igt@kms_setmode@basic.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-hsw8/igt@kms_setmode@basic.html

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-apl:          [PASS][21] -> [DMESG-WARN][22] ([fdo#108566]) +5 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-apl5/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-apl3/igt@kms_vblank@pipe-c-ts-continuation-suspend.html

  
#### Possible fixes ####

  * igt@gem_eio@in-flight-suspend:
    - shard-apl:          [DMESG-WARN][23] ([fdo#108566]) -> [PASS][24] +5 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-apl3/igt@gem_eio@in-flight-suspend.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-apl1/igt@gem_eio@in-flight-suspend.html

  * igt@gem_exec_schedule@deep-bsd:
    - shard-iclb:         [SKIP][25] ([fdo#111325]) -> [PASS][26] +4 similar issues
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb4/igt@gem_exec_schedule@deep-bsd.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb3/igt@gem_exec_schedule@deep-bsd.html

  * igt@gem_exec_schedule@preempt-queue-contexts-chain-bsd1:
    - shard-iclb:         [SKIP][27] ([fdo#109276]) -> [PASS][28] +13 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb8/igt@gem_exec_schedule@preempt-queue-contexts-chain-bsd1.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb1/igt@gem_exec_schedule@preempt-queue-contexts-chain-bsd1.html

  * igt@gem_softpin@noreloc-s3:
    - shard-iclb:         [INCOMPLETE][29] ([fdo#107713] / [fdo#109100]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb3/igt@gem_softpin@noreloc-s3.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb2/igt@gem_softpin@noreloc-s3.html

  * {igt@i915_pm_dc@dc6-dpms}:
    - shard-iclb:         [FAIL][31] ([fdo#110548]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb3/igt@i915_pm_dc@dc6-dpms.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb2/igt@i915_pm_dc@dc6-dpms.html

  * igt@kms_cursor_legacy@cursor-vs-flip-atomic:
    - shard-hsw:          [FAIL][33] ([fdo#103355]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-hsw1/igt@kms_cursor_legacy@cursor-vs-flip-atomic.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-hsw8/igt@kms_cursor_legacy@cursor-vs-flip-atomic.html

  * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
    - shard-glk:          [FAIL][35] ([fdo#105363]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-glk2/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-glk2/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw:
    - shard-apl:          [INCOMPLETE][37] ([fdo#103927]) -> [PASS][38] +1 similar issue
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-apl1/igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-apl4/igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt:
    - shard-iclb:         [FAIL][39] ([fdo#103167]) -> [PASS][40] +3 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb3/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt.html

  * igt@kms_psr2_su@frontbuffer:
    - shard-iclb:         [SKIP][41] ([fdo#109642] / [fdo#111068]) -> [PASS][42] +1 similar issue
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb5/igt@kms_psr2_su@frontbuffer.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb2/igt@kms_psr2_su@frontbuffer.html

  * igt@kms_psr@no_drrs:
    - shard-iclb:         [FAIL][43] ([fdo#108341]) -> [PASS][44]
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb1/igt@kms_psr@no_drrs.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb2/igt@kms_psr@no_drrs.html

  * igt@kms_psr@psr2_cursor_plane_onoff:
    - shard-iclb:         [SKIP][45] ([fdo#109441]) -> [PASS][46] +1 similar issue
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb6/igt@kms_psr@psr2_cursor_plane_onoff.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb2/igt@kms_psr@psr2_cursor_plane_onoff.html

  
#### Warnings ####

  * igt@gem_mocs_settings@mocs-rc6-bsd2:
    - shard-iclb:         [SKIP][47] ([fdo#109276]) -> [FAIL][48] ([fdo#111330])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb5/igt@gem_mocs_settings@mocs-rc6-bsd2.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb2/igt@gem_mocs_settings@mocs-rc6-bsd2.html

  * igt@gem_mocs_settings@mocs-settings-bsd2:
    - shard-iclb:         [FAIL][49] ([fdo#111330]) -> [SKIP][50] ([fdo#109276])
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6946/shard-iclb2/igt@gem_mocs_settings@mocs-settings-bsd2.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/shard-iclb3/igt@gem_mocs_settings@mocs-settings-bsd2.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103355]: https://bugs.freedesktop.org/show_bug.cgi?id=103355
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#110548]: https://bugs.freedesktop.org/show_bug.cgi?id=110548
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
  [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


Participating hosts (9 -> 6)
------------------------------

  Missing    (3): pig-skl-6260u shard-skl pig-hsw-4770r 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_5198 -> IGTPW_3493
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_6946: af23c2755dca7e363fb694a871a2c7d3e1b5d16d @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3493: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/
  IGT_5198: dde20ad4ebde98770e4da8129cc8e169162c34fe @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3493/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t] Fix global symbol loading failure in resolve function
@ 2019-09-30  9:30 brandon.hong
  0 siblings, 0 replies; 11+ messages in thread
From: brandon.hong @ 2019-09-30  9:30 UTC (permalink / raw)
  To: igt-dev

From: Brandon Hong <brandon.hong@intel.com>

270 out of 284 tests get failed with SIGSEGV on ClearLinux because the ifunc
resolver resolve_half_to_float() tries to call unbound global function
igt_x86_features(). This patch fixes the issue by adding a F16C checking
local function.

Signed-off-by: Brandon Hong <brandon.hong@intel.com>
---
 lib/igt_halffloat.c | 31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

diff --git a/lib/igt_halffloat.c b/lib/igt_halffloat.c
index 08ab05fc..e5e8a5bd 100644
--- a/lib/igt_halffloat.c
+++ b/lib/igt_halffloat.c
@@ -24,6 +24,19 @@
 
 #include <assert.h>
 #include <math.h>
+#include <stdbool.h>
+
+#ifdef HAVE_CPUID_H
+#include <cpuid.h>
+#else
+#define __get_cpuid_max(x, y) 0
+#define __cpuid(level, a, b, c, d) a = b = c = d = 0
+#define __cpuid_count(level, count, a, b, c, d) a = b = c = d = 0
+#endif
+
+#ifndef bit_F16C
+#define bit_F16C	(1 << 29)
+#endif
 
 #include "igt_halffloat.h"
 #include "igt_x86.h"
@@ -182,6 +195,20 @@ static void half_to_float_f16c(const uint16_t *h, float *f, unsigned int num)
 
 #pragma GCC pop_options
 
+static bool f16c_is_supported(void)
+{
+	unsigned max = __get_cpuid_max(0, NULL);
+	unsigned eax, ebx, ecx, edx;
+
+	if (max >= 1) {
+		__cpuid(1, eax, ebx, ecx, edx);
+
+		if (ecx & bit_F16C)
+			return true;
+	}
+	return false;
+}
+
 static void float_to_half(const float *f, uint16_t *h, unsigned int num)
 {
 	for (int i = 0; i < num; i++)
@@ -196,7 +223,7 @@ static void half_to_float(const uint16_t *h, float *f, unsigned int num)
 
 static void (*resolve_float_to_half(void))(const float *f, uint16_t *h, unsigned int num)
 {
-	if (igt_x86_features() & F16C)
+	if (f16c_is_supported())
 		return float_to_half_f16c;
 
 	return float_to_half;
@@ -207,7 +234,7 @@ void igt_float_to_half(const float *f, uint16_t *h, unsigned int num)
 
 static void (*resolve_half_to_float(void))(const uint16_t *h, float *f, unsigned int num)
 {
-	if (igt_x86_features() & F16C)
+	if (f16c_is_supported())
 		return half_to_float_f16c;
 
 	return half_to_float;
-- 
2.23.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t] Fix global symbol loading failure in resolve function
@ 2019-09-30  9:06 brandon.hong
  0 siblings, 0 replies; 11+ messages in thread
From: brandon.hong @ 2019-09-30  9:06 UTC (permalink / raw)
  To: igt-dev

From: Brandon Hong <brandon.hong@intel.com>

270 out of 284 tests get failed with SIGSEGV on ClearLinux because the ifunc
resolver resolve_half_to_float() tries to call unbound global function
igt_x86_features(). This patch fixes the issue by adding a F16C checking
local function.

Signed-off-by: Brandon Hong <brandon.hong@intel.com>
---
 lib/igt_halffloat.c | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/lib/igt_halffloat.c b/lib/igt_halffloat.c
index 08ab05fc..ec365829 100644
--- a/lib/igt_halffloat.c
+++ b/lib/igt_halffloat.c
@@ -24,6 +24,15 @@
 
 #include <assert.h>
 #include <math.h>
+#include <stdbool.h>
+
+#ifdef HAVE_CPUID_H
+#include <cpuid.h>
+#else
+#define __get_cpuid_max(x, y) 0
+#define __cpuid(level, a, b, c, d) a = b = c = d = 0
+#define __cpuid_count(level, count, a, b, c, d) a = b = c = d = 0
+#endif
 
 #include "igt_halffloat.h"
 #include "igt_x86.h"
@@ -182,6 +191,20 @@ static void half_to_float_f16c(const uint16_t *h, float *f, unsigned int num)
 
 #pragma GCC pop_options
 
+static bool f16c_is_supported(void)
+{
+	unsigned max = __get_cpuid_max(0, NULL);
+	unsigned eax, ebx, ecx, edx;
+
+	if (max >= 1) {
+		__cpuid(1, eax, ebx, ecx, edx);
+
+		if (ecx & bit_F16C)
+			return true;
+	}
+	return false;
+}
+
 static void float_to_half(const float *f, uint16_t *h, unsigned int num)
 {
 	for (int i = 0; i < num; i++)
@@ -196,7 +219,7 @@ static void half_to_float(const uint16_t *h, float *f, unsigned int num)
 
 static void (*resolve_float_to_half(void))(const float *f, uint16_t *h, unsigned int num)
 {
-	if (igt_x86_features() & F16C)
+	if (f16c_is_supported())
 		return float_to_half_f16c;
 
 	return float_to_half;
@@ -207,7 +230,7 @@ void igt_float_to_half(const float *f, uint16_t *h, unsigned int num)
 
 static void (*resolve_half_to_float(void))(const uint16_t *h, float *f, unsigned int num)
 {
-	if (igt_x86_features() & F16C)
+	if (f16c_is_supported())
 		return half_to_float_f16c;
 
 	return half_to_float;
-- 
2.23.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] Fix global symbol loading failure in resolve function
  2019-09-27 17:26 ` Ville Syrjälä
@ 2019-09-30  9:04   ` Hong, Brandon
  0 siblings, 0 replies; 11+ messages in thread
From: Hong, Brandon @ 2019-09-30  9:04 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: igt-dev



> On 28 Sep 2019, at 2:26 AM, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> 
> On Tue, Sep 24, 2019 at 10:02:29PM +0800, brandon.hong@intel.com wrote:
>> From: Brandon Hong <brandon.hong@intel.com>
>> 
>> 270 out of 284 tests get failed with SIGSEGV on ClearLinux because the ifunc
>> resolver resolve_half_to_float() tries to call unbound global function
>> igt_x86_features(). This patch fixes the issue by adding a F16C checking
>> local function.
> 
> The rules for this stuff seem to be poorly documented. But I did find
> some docs that support this. So generally lgtm, just a few nitpicks
> below…
> 
>> 
>> Signed-off-by: Brandon Hong <brandon.hong@intel.com>
>> ---
>> lib/igt_halffloat.c | 22 ++++++++++++++++++++--
>> 1 file changed, 20 insertions(+), 2 deletions(-)
>> 
>> diff --git a/lib/igt_halffloat.c b/lib/igt_halffloat.c
>> index 08ab05fc..fa7ad2e0 100644
>> --- a/lib/igt_halffloat.c
>> +++ b/lib/igt_halffloat.c
>> @@ -24,6 +24,7 @@
>> 
>> #include <assert.h>
>> #include <math.h>
>> +#include <stdbool.h>
>> 
>> #include "igt_halffloat.h"
>> #include "igt_x86.h"
>> @@ -163,6 +164,8 @@ static inline float _half_to_float(uint16_t val)
>> }
>> 
>> #if defined(__x86_64__) && !defined(__clang__)
>> +#include <cpuid.h>
> 
> igt_x86.c has HAVE_CPUID_H protection around this stuff.
> I suppose we'd want the same here?

Thanks for pointing it out. Will add HAVE_CPUID_H as same as igt_x86.c file.

> 
>> +
>> #pragma GCC push_options
>> #pragma GCC target("f16c")
>> 
>> @@ -182,6 +185,20 @@ static void half_to_float_f16c(const uint16_t *h, float *f, unsigned int num)
>> 
>> #pragma GCC pop_options
>> 
>> +static bool f16c_is_supported(void)
>> +{
>> +	unsigned max = __get_cpuid_max(0, NULL);
>> +	unsigned eax, ebx, ecx, edx;
>> +
>> +	if (max >= 1) {
>> +		__cpuid(1, eax, ebx, ecx, edx);
>> +
>> +		if (ecx & bit_F16C)
>> +			return true;
>> +	}
>> +	return false;
>> +}
>> +
>> static void float_to_half(const float *f, uint16_t *h, unsigned int num)
>> {
>> 	for (int i = 0; i < num; i++)
>> @@ -194,9 +211,10 @@ static void half_to_float(const uint16_t *h, float *f, unsigned int num)
>> 		f[i] = _half_to_float(h[i]);
>> }
>> 
>> +
> 
> Spurious newline.
Will remove it and re-submit.

> 
>> static void (*resolve_float_to_half(void))(const float *f, uint16_t *h, unsigned int num)
>> {
>> -	if (igt_x86_features() & F16C)
>> +	if (f16c_is_supported())
>> 		return float_to_half_f16c;
>> 
>> 	return float_to_half;
>> @@ -207,7 +225,7 @@ void igt_float_to_half(const float *f, uint16_t *h, unsigned int num)
>> 
>> static void (*resolve_half_to_float(void))(const uint16_t *h, float *f, unsigned int num)
>> {
>> -	if (igt_x86_features() & F16C)
>> +	if (f16c_is_supported())
>> 		return half_to_float_f16c;
>> 
>> 	return half_to_float;
>> -- 
>> 2.23.0
>> 
>> _______________________________________________
>> igt-dev mailing list
>> igt-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/igt-dev
> 
> -- 
> Ville Syrjälä
> Intel

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] Fix global symbol loading failure in resolve function
  2019-09-24 14:02 [igt-dev] [PATCH i-g-t] " brandon.hong
@ 2019-09-27 17:26 ` Ville Syrjälä
  2019-09-30  9:04   ` Hong, Brandon
  0 siblings, 1 reply; 11+ messages in thread
From: Ville Syrjälä @ 2019-09-27 17:26 UTC (permalink / raw)
  To: brandon.hong; +Cc: igt-dev

On Tue, Sep 24, 2019 at 10:02:29PM +0800, brandon.hong@intel.com wrote:
> From: Brandon Hong <brandon.hong@intel.com>
> 
> 270 out of 284 tests get failed with SIGSEGV on ClearLinux because the ifunc
> resolver resolve_half_to_float() tries to call unbound global function
> igt_x86_features(). This patch fixes the issue by adding a F16C checking
> local function.

The rules for this stuff seem to be poorly documented. But I did find
some docs that support this. So generally lgtm, just a few nitpicks
below...

> 
> Signed-off-by: Brandon Hong <brandon.hong@intel.com>
> ---
>  lib/igt_halffloat.c | 22 ++++++++++++++++++++--
>  1 file changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/igt_halffloat.c b/lib/igt_halffloat.c
> index 08ab05fc..fa7ad2e0 100644
> --- a/lib/igt_halffloat.c
> +++ b/lib/igt_halffloat.c
> @@ -24,6 +24,7 @@
>  
>  #include <assert.h>
>  #include <math.h>
> +#include <stdbool.h>
>  
>  #include "igt_halffloat.h"
>  #include "igt_x86.h"
> @@ -163,6 +164,8 @@ static inline float _half_to_float(uint16_t val)
>  }
>  
>  #if defined(__x86_64__) && !defined(__clang__)
> +#include <cpuid.h>

igt_x86.c has HAVE_CPUID_H protection around this stuff.
I suppose we'd want the same here?

> +
>  #pragma GCC push_options
>  #pragma GCC target("f16c")
>  
> @@ -182,6 +185,20 @@ static void half_to_float_f16c(const uint16_t *h, float *f, unsigned int num)
>  
>  #pragma GCC pop_options
>  
> +static bool f16c_is_supported(void)
> +{
> +	unsigned max = __get_cpuid_max(0, NULL);
> +	unsigned eax, ebx, ecx, edx;
> +
> +	if (max >= 1) {
> +		__cpuid(1, eax, ebx, ecx, edx);
> +
> +		if (ecx & bit_F16C)
> +			return true;
> +	}
> +	return false;
> +}
> +
>  static void float_to_half(const float *f, uint16_t *h, unsigned int num)
>  {
>  	for (int i = 0; i < num; i++)
> @@ -194,9 +211,10 @@ static void half_to_float(const uint16_t *h, float *f, unsigned int num)
>  		f[i] = _half_to_float(h[i]);
>  }
>  
> +

Spurious newline.

>  static void (*resolve_float_to_half(void))(const float *f, uint16_t *h, unsigned int num)
>  {
> -	if (igt_x86_features() & F16C)
> +	if (f16c_is_supported())
>  		return float_to_half_f16c;
>  
>  	return float_to_half;
> @@ -207,7 +225,7 @@ void igt_float_to_half(const float *f, uint16_t *h, unsigned int num)
>  
>  static void (*resolve_half_to_float(void))(const uint16_t *h, float *f, unsigned int num)
>  {
> -	if (igt_x86_features() & F16C)
> +	if (f16c_is_supported())
>  		return half_to_float_f16c;
>  
>  	return half_to_float;
> -- 
> 2.23.0
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t] Fix global symbol loading failure in resolve function
@ 2019-09-24 14:02 brandon.hong
  2019-09-27 17:26 ` Ville Syrjälä
  0 siblings, 1 reply; 11+ messages in thread
From: brandon.hong @ 2019-09-24 14:02 UTC (permalink / raw)
  To: igt-dev

From: Brandon Hong <brandon.hong@intel.com>

270 out of 284 tests get failed with SIGSEGV on ClearLinux because the ifunc
resolver resolve_half_to_float() tries to call unbound global function
igt_x86_features(). This patch fixes the issue by adding a F16C checking
local function.

Signed-off-by: Brandon Hong <brandon.hong@intel.com>
---
 lib/igt_halffloat.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/lib/igt_halffloat.c b/lib/igt_halffloat.c
index 08ab05fc..fa7ad2e0 100644
--- a/lib/igt_halffloat.c
+++ b/lib/igt_halffloat.c
@@ -24,6 +24,7 @@
 
 #include <assert.h>
 #include <math.h>
+#include <stdbool.h>
 
 #include "igt_halffloat.h"
 #include "igt_x86.h"
@@ -163,6 +164,8 @@ static inline float _half_to_float(uint16_t val)
 }
 
 #if defined(__x86_64__) && !defined(__clang__)
+#include <cpuid.h>
+
 #pragma GCC push_options
 #pragma GCC target("f16c")
 
@@ -182,6 +185,20 @@ static void half_to_float_f16c(const uint16_t *h, float *f, unsigned int num)
 
 #pragma GCC pop_options
 
+static bool f16c_is_supported(void)
+{
+	unsigned max = __get_cpuid_max(0, NULL);
+	unsigned eax, ebx, ecx, edx;
+
+	if (max >= 1) {
+		__cpuid(1, eax, ebx, ecx, edx);
+
+		if (ecx & bit_F16C)
+			return true;
+	}
+	return false;
+}
+
 static void float_to_half(const float *f, uint16_t *h, unsigned int num)
 {
 	for (int i = 0; i < num; i++)
@@ -194,9 +211,10 @@ static void half_to_float(const uint16_t *h, float *f, unsigned int num)
 		f[i] = _half_to_float(h[i]);
 }
 
+
 static void (*resolve_float_to_half(void))(const float *f, uint16_t *h, unsigned int num)
 {
-	if (igt_x86_features() & F16C)
+	if (f16c_is_supported())
 		return float_to_half_f16c;
 
 	return float_to_half;
@@ -207,7 +225,7 @@ void igt_float_to_half(const float *f, uint16_t *h, unsigned int num)
 
 static void (*resolve_half_to_float(void))(const uint16_t *h, float *f, unsigned int num)
 {
-	if (igt_x86_features() & F16C)
+	if (f16c_is_supported())
 		return half_to_float_f16c;
 
 	return half_to_float;
-- 
2.23.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-09-30  9:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-24  8:02 [igt-dev] [PATCH i-g-t] Fix global symbol loading failure in resolve function brandon.hong
2019-09-24  8:26 ` Chris Wilson
2019-09-24 14:22   ` Hong, Brandon
2019-09-24  8:42 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
2019-09-24  8:55 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2019-09-24 17:28 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-09-24 14:02 [igt-dev] [PATCH i-g-t] " brandon.hong
2019-09-27 17:26 ` Ville Syrjälä
2019-09-30  9:04   ` Hong, Brandon
2019-09-30  9:06 brandon.hong
2019-09-30  9:30 brandon.hong

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.