[igt-dev] (no subject)


Sat Jan 20 10:58:21 UTC 2018


>From fetchmail  Fri Jan 19 23:11:26 2018
X-Default-Received-SPF: pass (skip=g_gateway_allow (res=PASS))
 x-ip-name=52.211.27.78; 
Received: from mail.fireflyinternet.com [109.228.58.192]
 by mail.alporthouse.com with POP3 (fetchmail-6.3.26)
 for <ickle at localhost> (single-drop); Fri, 19 Jan 2018 23:11:26 +0000 (GMT)
Received: from spamshield.firefly-cloud.com (unverified [52.211.27.78]) 
 by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 10386004-1500050 
 for <chris.alporthouse at surfanytime.net>; Fri, 19 Jan 2018 23:11:20 +0000
Return-Path: <chris at chris-wilson.co.uk>
Received: from localhost (localhost [127.0.0.1])
 by spamshield.firefly-cloud.com (Postfix) with ESMTP id 691B2A92AC
 for <chris.alporthouse at surfanytime.net>; Fri, 19 Jan 2018 23:11:20 +0000 (GMT)
X-Virus-Scanned: by SpamTitan at eu-west-1.compute.internal
X-Amavis-Alert: BAD HEADER SECTION, Improper folded header field made up
 entirely of whitespace (char 20 hex): X-Spam_Report: ...that system
 for details.  Content previ[...]
X-Spam-Flag: NO
X-Spam-Score: 0.2
X-Spam-Level: 
X-Spam-Status: No, score=0.2 tagged_above=-999 required=5
 tests=[BAYES_00=-1.9, KAM_COUK=0.85, KAM_LAZY_DOMAIN_SECURITY=1,
 RCVD_IN_DNSWL_NONE=-0.0001, SARE_HEAD_HDR_XCNTRY=0.25]
 autolearn=no autolearn_force=no
Received: from spamshield.firefly-cloud.com (localhost [127.0.0.1])
 by spamshield.firefly-cloud.com (Postfix) with ESMTP id 7082EA929D
 for <chris.alporthouse at surfanytime.net>; Fri, 19 Jan 2018 23:11:19 +0000 (GMT)
Received-SPF: none (chris-wilson.co.uk: No applicable sender policy available)
 receiver=spamshield.firefly-cloud.com; identity=mailfrom;
 envelope-from="chris at chris-wilson.co.uk"; helo=svcemlmtal21.svc.group.zone;
 client-ip=185.26.230.65
Received: from svcemlmtal21.svc.group.zone (svcemlmtal01.netnames.net
 [185.26.230.65])
 by spamshield.firefly-cloud.com (Postfix) with ESMTP id 6883AA92AC
 for <chris.alporthouse at surfanytime.net>; Fri, 19 Jan 2018 23:11:19 +0000 (GMT)
Received: from mail.fireflyinternet.com ([109.228.58.192]:63319
 helo=fireflyinternet.com)
 by svcemlmtal21.svc.group.zone with esmtp (NBT 4.87 2)
 id 1ecfob-0002eV-1q
 for chris at chris-wilson.co.uk; Fri, 19 Jan 2018 23:11:18 +0000
X-Default-Received-SPF: pass (skip=forwardok (res=PASS))
 x-ip-name=78.156.65.138; 
Received: from haswell.alporthouse.com (unverified [78.156.65.138]) 
 by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 10386003-1500050 
 for multiple; Fri, 19 Jan 2018 23:11:14 +0000
Received: by haswell.alporthouse.com (sSMTP sendmail emulation);
 Fri, 19 Jan 2018 23:11:14 +0000
From: Chris Wilson <chris at chris-wilson.co.uk>
To: intel-gfx at lists.freedesktop.org
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Subject: [PATCH igt] igt/gen7_forcewake_mt: Make the mmio register as volatile
Date: Fri, 19 Jan 2018 23:11:13 +0000
Message-Id: <20180119231113.4908-1-chris at chris-wilson.co.uk>
X-Mailer: git-send-email 2.15.1
X-Originating-IP: 78.156.65.138
X-Country: code=GB country="United Kingdom" ip=78.156.65.138
X-Spam_Score: 1.1
X-Spam_Level: (+)
X-Spam_Report: Spam detection software,
 running on the system "SVCEMLSPAML03.SVC.group.zone", 
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: Prevent the compiler from caching reads/writes to the hw
 register
 as we do want to perform mmio. Signed-off-by: Chris Wilson
 <chris at chris-wilson.co.uk>
 --- tests/gen7_forcewake_mt.c | 5 +++-- 1 file changed, 3 insertions(+),
 2 deletions(-) [...] 
 Content analysis details:   (1.1 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.1 RDNS_NONE Delivered to internal network by a host with no rDNS
 1.0 KAM_LAZY_DOMAIN_SECURITY Sending domain does not have any
 anti-forgery methods
X-Originally-To: chris at chris-wilson.co.uk
X-To-Not-Matched: true
X-IsFriend: <chris at chris-wilson.co.uk>
X-Rcpt-To: <chris.alporthouse at surfanytime.net>
X-FriendScore: : 0.0 sd=0.0 Exact nspam=0 nok=1 0.00 $0.10(X-Phrase:clean)
 $0.10(X-myrbl:Color=yellow) $0.87(Received:for multiple)
 $0.20(X-SpamContent:clean) $0.36(X-LangGuess:English)
 $0.63(X-To-Not-Matched:true)
X-SpamContent: Clean
X-LangGuess: English
X-Probe: +OK skipped, from friend
X-Phrase: Clean score=0.00
X-Avast: GetHandleFailed
X-X-MyRbl: Color=Yellow Age=0 Spam=0 Notspam=0 Stars=0 Good=484 Friend=0 Surbl=0
 Catch=0 r=0 ip=78.156.65.138
X-IP-stats: Incoming Last 0, First 567, in=16915, out=0,
 spam=0 ip=78.156.65.138
Status: U
Resent-From: Chris Wilson <chris at chris-wilson.co.uk>
Resent-To: igt-dev at lists.freedesktop.org
X-To-Not-Matched: true

Prevent the compiler from caching reads/writes to the hw register as we
do want to perform mmio.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/gen7_forcewake_mt.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/gen7_forcewake_mt.c b/tests/gen7_forcewake_mt.c
index 07320ef9e..8a23d13e0 100644
--- a/tests/gen7_forcewake_mt.c
+++ b/tests/gen7_forcewake_mt.c
@@ -106,8 +106,9 @@ static void *igfx_get_mmio(void)
 static void *thread(void *arg)
 {
 	struct thread *t = arg;
-	uint32_t *forcewake_mt = (uint32_t *)((char *)t->mmio + FORCEWAKE_MT);
-	uint32_t bit = 1 << t->bit;
+	const uint32_t bit = 1 << t->bit;
+	volatile uint32_t *forcewake_mt =
+		(volatile uint32_t *)((char *)t->mmio + FORCEWAKE_MT);
 
 	while (1) {
 		*forcewake_mt = bit << 16 | bit;
-- 
2.15.1



More information about the igt-dev mailing list