Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1232163 > unrolled thread
| Started by | Denys Vlasenko <dvlasenk@redhat.com> |
|---|---|
| First post | 2015-09-24 17:00 +0200 |
| Last post | 2015-10-05 15:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] iwlwifi: Deinline iwl_write8/write32/read32() Denys Vlasenko <dvlasenk@redhat.com> - 2015-09-24 17:00 +0200
Re: [PATCH] iwlwifi: Deinline iwl_write8/write32/read32() Luca Coelho <luca@coelho.fi> - 2015-10-05 15:10 +0200
| From | Denys Vlasenko <dvlasenk@redhat.com> |
|---|---|
| Date | 2015-09-24 17:00 +0200 |
| Subject | [PATCH] iwlwifi: Deinline iwl_write8/write32/read32() |
| Message-ID | <qcga8-6cP-49@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Luca Coelho <luca@coelho.fi> |
|---|---|
| Date | 2015-10-05 15:10 +0200 |
| Message-ID | <qgdGG-8dn-17@gated-at.bofh.it> |
| In reply to | #1232163 |
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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web