Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH i-g-t] intel_l3_parity: Restore support for Ivybridge
Date: Thu, 11 Jul 2019 15:10:04 +0100	[thread overview]
Message-ID: <20190711141004.8728-1-chris@chris-wilson.co.uk> (raw)

With the fancy second slice of Haswell, we lost support for Ivybridge
with its paltry single slice.

Fixes: 8ddcfd6882a9 ("intel_l3_parity: slice support")
Testcase: igt/tools_test/sysfs_l3_parity
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tools/intel_l3_parity.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/intel_l3_parity.c b/tools/intel_l3_parity.c
index d8c997af9..dc3d08048 100644
--- a/tools/intel_l3_parity.c
+++ b/tools/intel_l3_parity.c
@@ -195,6 +195,9 @@ int main(int argc, char *argv[])
 
 	for_each_slice(i) {
 		fd[i] = openat(dir, path[i], O_RDWR);
+		if (fd[i] < 0)
+			continue;
+
 		if (read(fd[i], l3logs[i], NUM_REGS * sizeof(uint32_t)) < 0) {
 			perror(path[i]);
 			exit(77);
@@ -333,6 +336,9 @@ int main(int argc, char *argv[])
 
 	/* Per slice operations */
 	for_each_slice(i) {
+		if (fd[i] < 0)
+			continue;
+
 		switch (action) {
 			case 'l':
 				dumpit(i);
@@ -374,6 +380,9 @@ int main(int argc, char *argv[])
 		exit(EXIT_SUCCESS);
 
 	for_each_slice(i) {
+		if (fd[i] < 0)
+			continue;
+
 		ret = write(fd[i], l3logs[i], NUM_REGS * sizeof(uint32_t));
 		if (ret == -1) {
 			perror("Writing sysfs");
-- 
2.22.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2019-07-11 14:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-11 14:10 Chris Wilson [this message]
2019-07-11 14:27 ` [igt-dev] [Intel-gfx] [PATCH i-g-t] intel_l3_parity: Restore support for Ivybridge Ville Syrjälä
2019-07-11 14:33   ` Ville Syrjälä
2019-07-11 17:45 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-07-12 17:10 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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=20190711141004.8728-1-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /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