From patchwork Mon Apr 1 14:39:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Tucker X-Patchwork-Id: 10880133 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 12662922 for ; Mon, 1 Apr 2019 14:41:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F2D6B289A3 for ; Mon, 1 Apr 2019 14:41:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0FD4289BC; Mon, 1 Apr 2019 14:41:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 84144289B7 for ; Mon, 1 Apr 2019 14:41:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4955F6E1B6; Mon, 1 Apr 2019 14:41:02 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7B2936E193; Mon, 1 Apr 2019 14:41:01 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: gtucker) with ESMTPSA id C4618281FA0 From: Guillaume Tucker To: Arkadiusz Hiler , Petri Latvala Date: Mon, 1 Apr 2019 16:39:24 +0200 Message-Id: X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] i915/gem_create: Do not build create-clear for MIPS X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP The MIPS architecture doesn't provide the hardware atomics that are required for the "create-clear" sub-test such as __sync_add_and_fetch(). As a simple and pragmatic solution, disable this sub-test when building for MIPS. A better approach would be to add a fallback implementation for these operations. Fixes: 6727e17c00b2 ("i915/gem_create: Verify that all new objects are clear") Signed-off-by: Guillaume Tucker --- tests/i915/gem_create.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c index 2a861ca8a7ec..8a48496e6c19 100644 --- a/tests/i915/gem_create.c +++ b/tests/i915/gem_create.c @@ -142,6 +142,7 @@ static void invalid_nonaligned_size(int fd) gem_close(fd, handle); } +#if !defined(__mips__) /* MIPS doesn't provide the required hardware atomics */ static uint64_t get_npages(uint64_t *global, uint64_t npages) { uint64_t try, old, max; @@ -208,6 +209,7 @@ static void always_clear(int i915, int timeout) for (int i = 0; i < ncpus; i++) pthread_join(thread[i], NULL); } +#endif /* !defined(__mips__) */ igt_main { @@ -231,6 +233,8 @@ igt_main igt_subtest("create-invalid-nonaligned") invalid_nonaligned_size(fd); +#if !defined(__mips__) igt_subtest("create-clear") always_clear(fd, 30); +#endif }