linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Steffen Eiden <seiden@linux.ibm.com>
To: Heiko Carstens <hca@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Cc: nrb@linux.ibm.com
Subject: [PATCH 2/2] drivers/s390/char/uvdevice: Autoload module based on CPU feature
Date: Fri,  1 Jul 2022 12:02:10 +0200	[thread overview]
Message-ID: <20220701100210.5482-3-seiden@linux.ibm.com> (raw)
In-Reply-To: <20220701100210.5482-1-seiden@linux.ibm.com>

With this patch the uvdevice will be automatically loaded when the
HWCAP_UV bit is set.

Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
---
 drivers/s390/char/uvdevice.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/s390/char/uvdevice.c b/drivers/s390/char/uvdevice.c
index 66505d7166a6..fddbfc1e27a2 100644
--- a/drivers/s390/char/uvdevice.c
+++ b/drivers/s390/char/uvdevice.c
@@ -27,6 +27,7 @@
 #include <linux/stddef.h>
 #include <linux/vmalloc.h>
 #include <linux/slab.h>
+#include <linux/cpufeature.h>
 
 #include <asm/uvdevice.h>
 #include <asm/uv.h>
@@ -244,12 +245,10 @@ static void __exit uvio_dev_exit(void)
 
 static int __init uvio_dev_init(void)
 {
-	if (!test_facility(158))
-		return -ENXIO;
 	return misc_register(&uvio_dev_miscdev);
 }
 
-module_init(uvio_dev_init);
+module_cpu_feature_match(UV, uvio_dev_init);
 module_exit(uvio_dev_exit);
 
 MODULE_AUTHOR("IBM Corporation");
-- 
2.35.3



      parent reply	other threads:[~2022-07-01 10:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01 10:02 [PATCH 0/2] s390: Autoload uvdevice module based on CPU feature Steffen Eiden
2022-07-01 10:02 ` [PATCH 1/2] s390/hwcaps: Add HWCAP_UV Steffen Eiden
2022-07-01 10:10   ` Christian Borntraeger
2022-07-04 10:00     ` Heiko Carstens
2022-07-04 11:35       ` Steffen Eiden
2022-07-01 10:02 ` Steffen Eiden [this message]

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=20220701100210.5482-3-seiden@linux.ibm.com \
    --to=seiden@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).