* [PATCH] iwlwifi: Deinline iwl_write8/write32/read32()
@ 2015-09-24 14:58 Denys Vlasenko
2015-10-05 12:26 ` Luca Coelho
0 siblings, 1 reply; 2+ messages in thread
From: Denys Vlasenko @ 2015-09-24 14:58 UTC (permalink / raw)
To: Johannes Berg
Cc: Denys Vlasenko, Emmanuel Grumbach, Intel Linux Wireless,
Gregory Greenman, John Linville, linux-wireless, linux-kernel
With this .config: http://busybox.net/~vda/kernel_config_ALLYES_Os,
after deinlining these functions have sizes and callsite counts
as follows:
iwl_write8: 315 bytes, 3 calls
iwl_write32: 296 bytes, 90 calls
iwl_read32: 278 bytes, 51 calls
Total size reduction is about 40 kbytes.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: Johannes Berg <johannes.berg@intel.com>
CC: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
CC: Intel Linux Wireless <ilw@linux.intel.com>
CC: Gregory Greenman <gregory.greenman@intel.com>
CC: John Linville <linville@tuxdriver.com>
CC: linux-wireless@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
drivers/net/wireless/iwlwifi/iwl-io.c | 22 ++++++++++++++++++++++
drivers/net/wireless/iwlwifi/iwl-io.h | 21 +++------------------
2 files changed, 25 insertions(+), 18 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.c b/drivers/net/wireless/iwlwifi/iwl-io.c
index 27c66e4..782e7e9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-io.c
+++ b/drivers/net/wireless/iwlwifi/iwl-io.c
@@ -38,6 +38,28 @@
#define IWL_POLL_INTERVAL 10 /* microseconds */
+void iwl_write8(struct iwl_trans *trans, u32 ofs, u8 val)
+{
+ trace_iwlwifi_dev_iowrite8(trans->dev, ofs, val);
+ iwl_trans_write8(trans, ofs, val);
+}
+IWL_EXPORT_SYMBOL(iwl_write8);
+
+void iwl_write32(struct iwl_trans *trans, u32 ofs, u32 val)
+{
+ trace_iwlwifi_dev_iowrite32(trans->dev, ofs, val);
+ iwl_trans_write32(trans, ofs, val);
+}
+IWL_EXPORT_SYMBOL(iwl_write32);
+
+u32 iwl_read32(struct iwl_trans *trans, u32 ofs)
+{
+ u32 val = iwl_trans_read32(trans, ofs);
+ trace_iwlwifi_dev_ioread32(trans->dev, ofs, val);
+ return val;
+}
+IWL_EXPORT_SYMBOL(iwl_read32);
+
int iwl_poll_bit(struct iwl_trans *trans, u32 addr,
u32 bits, u32 mask, int timeout)
{
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h
index 705d12c..501d056 100644
--- a/drivers/net/wireless/iwlwifi/iwl-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-io.h
@@ -32,24 +32,9 @@
#include "iwl-devtrace.h"
#include "iwl-trans.h"
-static inline void iwl_write8(struct iwl_trans *trans, u32 ofs, u8 val)
-{
- trace_iwlwifi_dev_iowrite8(trans->dev, ofs, val);
- iwl_trans_write8(trans, ofs, val);
-}
-
-static inline void iwl_write32(struct iwl_trans *trans, u32 ofs, u32 val)
-{
- trace_iwlwifi_dev_iowrite32(trans->dev, ofs, val);
- iwl_trans_write32(trans, ofs, val);
-}
-
-static inline u32 iwl_read32(struct iwl_trans *trans, u32 ofs)
-{
- u32 val = iwl_trans_read32(trans, ofs);
- trace_iwlwifi_dev_ioread32(trans->dev, ofs, val);
- return val;
-}
+void iwl_write8(struct iwl_trans *trans, u32 ofs, u8 val);
+void iwl_write32(struct iwl_trans *trans, u32 ofs, u32 val);
+u32 iwl_read32(struct iwl_trans *trans, u32 ofs);
static inline void iwl_set_bit(struct iwl_trans *trans, u32 reg, u32 mask)
{
--
1.8.1.4
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] iwlwifi: Deinline iwl_write8/write32/read32()
2015-09-24 14:58 [PATCH] iwlwifi: Deinline iwl_write8/write32/read32() Denys Vlasenko
@ 2015-10-05 12:26 ` Luca Coelho
0 siblings, 0 replies; 2+ messages in thread
From: Luca Coelho @ 2015-10-05 12:26 UTC (permalink / raw)
To: Denys Vlasenko, Johannes Berg
Cc: Emmanuel Grumbach, Intel Linux Wireless, Gregory Greenman,
John Linville, linux-wireless, linux-kernel
Hi Denys,
On Thu, 2015-09-24 at 16:58 +0200, Denys Vlasenko wrote:
> With this .config: http://busybox.net/~vda/kernel_config_ALLYES_Os,
> after deinlining these functions have sizes and callsite counts
> as follows:
>
> iwl_write8: 315 bytes, 3 calls
> iwl_write32: 296 bytes, 90 calls
> iwl_read32: 278 bytes, 51 calls
>
> Total size reduction is about 40 kbytes.
>
> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
> CC: Johannes Berg <johannes.berg@intel.com>
> CC: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> CC: Intel Linux Wireless <ilw@linux.intel.com>
> CC: Gregory Greenman <gregory.greenman@intel.com>
> CC: John Linville <linville@tuxdriver.com>
> CC: linux-wireless@vger.kernel.org
> CC: linux-kernel@vger.kernel.org
Emmanuel already wrote and applied a patch like this. Check here:
http://mid.gmane.org/1442869141-31637-4-git-send-email-luca@coelho.fi
Thanks for your patch anyway and for reporting this. :)
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-05 13:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-24 14:58 [PATCH] iwlwifi: Deinline iwl_write8/write32/read32() Denys Vlasenko
2015-10-05 12:26 ` Luca Coelho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®