From: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
To: Dan Streetman <ddstreet@us.ibm.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
gustavold@linux.vnet.ibm.com
Subject: [PATCH 6/6] nx-842-platform: if NX842 platform drivers are not modules, don't try to load them
Date: Thu, 2 Jul 2015 15:42:26 -0700 [thread overview]
Message-ID: <20150702224225.GG1712@linux.vnet.ibm.com> (raw)
In-Reply-To: <20150702223800.GA1712@linux.vnet.ibm.com>
Based off the CONFIG_SPU_FS_MODULE code, only attempt to load platform
modules if the nx-842 pseries/powernv drivers are built as modules.
Otherwise, if CONFIG_DEV_NX_COMPRESS=y,
CONFIG_DEV_NX_COMPRESS_PSERIES=y, CONFIG_DEV_NX_POWERNV=y, the following
message is emitted at boot:
nx_compress: no nx842 driver found.
even though the drivers successfully loads.
This is because in the =y case, the module_init() calls get converted to
initcalls and the nx842_init() runs before the platform driver
nx842_pseries_init() or nx842_powernv_init() functions, which are what
normally set the static platform driver.
Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
Cc: Dan Streetman <ddstreet@us.ibm.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
---
drivers/crypto/nx/nx-842-platform.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/crypto/nx/nx-842-platform.c b/drivers/crypto/nx/nx-842-platform.c
index 664f13dd06ed..5363c72593b4 100644
--- a/drivers/crypto/nx/nx-842-platform.c
+++ b/drivers/crypto/nx/nx-842-platform.c
@@ -53,6 +53,7 @@ void nx842_platform_driver_unset(struct nx842_driver *_driver)
}
EXPORT_SYMBOL_GPL(nx842_platform_driver_unset);
+#if defined(CONFIG_CRYPTO_DEV_NX_COMPRESS_PSERIES_MODULE) || defined(CONFIG_CRYPTO_DEV_NX_COMPRESS_POWERNV_MODULE)
bool nx842_platform_driver_get(void)
{
bool ret = false;
@@ -66,7 +67,6 @@ bool nx842_platform_driver_get(void)
return ret;
}
-EXPORT_SYMBOL_GPL(nx842_platform_driver_get);
void nx842_platform_driver_put(void)
{
@@ -77,6 +77,17 @@ void nx842_platform_driver_put(void)
spin_unlock(&driver_lock);
}
+#else
+bool nx842_platform_driver_get(void)
+{
+ return true;
+}
+
+void nx842_platform_driver_put(void)
+{
+}
+#endif
+EXPORT_SYMBOL_GPL(nx842_platform_driver_get);
EXPORT_SYMBOL_GPL(nx842_platform_driver_put);
MODULE_LICENSE("GPL");
--
2.1.4
next prev parent reply other threads:[~2015-07-02 22:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-02 22:38 [PATCH 0/6] drivers/nx-842: reduce verbosity of logging Nishanth Aravamudan
2015-07-02 22:38 ` [PATCH 1/6] crypto/nx-842-pseries: nx842_OF_upd_status should return ENODEV if device is not 'okay' Nishanth Aravamudan
2015-07-02 22:39 ` [PATCH 2/6] nx-842-pseries: rename nx842_{init,exit} to nx842_pseries_{init,exit} Nishanth Aravamudan
2015-07-02 22:40 ` [PATCH 3/6] nx-842-pseries: do not emit extra output if status is disabled Nishanth Aravamudan
2015-07-02 22:40 ` [PATCH 4/6] crypto/nx-842-{powerpc,pseries}: only load on the appropriate machine type Nishanth Aravamudan
2015-07-03 1:30 ` Michael Ellerman
2015-07-06 17:06 ` [PATCH v2] crypto/nx-842-{powerpc,pseries}: reduce chattiness of platform drivers Nishanth Aravamudan
2015-07-07 9:36 ` Michael Ellerman
2015-07-07 14:01 ` Herbert Xu
2015-07-07 14:01 ` [PATCH v2] crypto/nx-842-{powerpc, pseries}: " Herbert Xu
2015-07-02 22:41 ` [PATCH 5/6] [RFC] crypto/testmgr: add null test for 842 algorithm Nishanth Aravamudan
2015-07-03 6:26 ` Stephan Mueller
2015-07-04 7:24 ` Herbert Xu
2015-07-04 7:24 ` Herbert Xu
2015-07-14 0:05 ` Nishanth Aravamudan
2015-07-14 0:05 ` Nishanth Aravamudan
2015-07-15 14:25 ` Dan Streetman
2015-07-02 22:42 ` Nishanth Aravamudan [this message]
2015-07-06 8:13 ` [PATCH 6/6] nx-842-platform: if NX842 platform drivers are not modules, don't try to load them Herbert Xu
2015-07-06 17:07 ` Nishanth Aravamudan
2015-07-15 14:33 ` Dan Streetman
2015-07-06 8:34 ` [PATCH 0/6] drivers/nx-842: reduce verbosity of logging Herbert Xu
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=20150702224225.GG1712@linux.vnet.ibm.com \
--to=nacc@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=ddstreet@us.ibm.com \
--cc=gustavold@linux.vnet.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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 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.