All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org, "Cédric Le Goater" <clg@kaod.org>
Subject: [PATCH 3/3] powerpc/xive: Do not expose a debugfs file when XIVE is disabled
Date: Wed, 29 Apr 2020 09:51:22 +0200	[thread overview]
Message-ID: <20200429075122.1216388-4-clg@kaod.org> (raw)
In-Reply-To: <20200429075122.1216388-1-clg@kaod.org>

The XIVE interrupt mode can be disabled with the "xive=off" kernel
parameter, in which case there is nothing to present to the user in the
associated /sys/kernel/debug/powerpc/xive file.

Fixes: 930914b7d528 ("powerpc/xive: Add a debugfs file to dump internal XIVE state")
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 arch/powerpc/sysdev/xive/common.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c
index 3dbc94cb4380..f591be9f01f4 100644
--- a/arch/powerpc/sysdev/xive/common.c
+++ b/arch/powerpc/sysdev/xive/common.c
@@ -1664,7 +1664,8 @@ DEFINE_SHOW_ATTRIBUTE(xive_core_debug);
 
 int xive_core_debug_init(void)
 {
-	debugfs_create_file("xive", 0400, powerpc_debugfs_root,
-			    NULL, &xive_core_debug_fops);
+	if (xive_enabled())
+		debugfs_create_file("xive", 0400, powerpc_debugfs_root,
+				    NULL, &xive_core_debug_fops);
 	return 0;
 }
-- 
2.25.4


  parent reply	other threads:[~2020-04-29  8:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29  7:51 [PATCH 0/3] powerpc/xive: PCI hotplug fixes under PowerVM Cédric Le Goater
2020-04-29  7:51 ` [PATCH 1/3] powerpc/xive: Clear the page tables for the ESB IO mapping Cédric Le Goater
2020-04-29  7:51 ` [PATCH 2/3] powerpc/pci: unmap legacy INTx interrupts of passthrough IO adapters Cédric Le Goater
2020-05-21  7:13   ` Cédric Le Goater
2020-05-27  0:57   ` Oliver O'Halloran
2020-05-27  7:31     ` Cédric Le Goater
2020-06-10 18:10     ` Cédric Le Goater
2020-05-27 11:05   ` Cédric Le Goater
2020-05-28 13:25     ` Michael Ellerman
2020-04-29  7:51 ` Cédric Le Goater [this message]
2020-06-09  5:28 ` [PATCH 0/3] powerpc/xive: PCI hotplug fixes under PowerVM Michael Ellerman

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=20200429075122.1216388-4-clg@kaod.org \
    --to=clg@kaod.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /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 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.