lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55A502B6.5090806@cogentembedded.com>
Date:	Tue, 14 Jul 2015 15:38:14 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Denys Vlasenko <dvlasenk@...hat.com>,
	Emmanuel Grumbach <emmanuel.grumbach@...el.com>
Cc:	Johannes Berg <johannes.berg@...el.com>,
	"John W. Linville" <linville@...driver.com>,
	Intel Linux Wireless <ilw@...ux.intel.com>,
	linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iwlwifi: Deinline iwl_{read,write}{8,32}

Hello.

On 7/14/2015 3:22 PM, Denys Vlasenko wrote:

> With CONFIG_IWLWIFI_DEVICE_TRACING=y, these functions are rather large,
> too big for inlining.

> With this .config: http://busybox.net/~vda/kernel_config,
> after uninlining these functions have sizes and callsite counts
> as follows:

> iwl_read32  475 bytes, 51 callsites
> iwl_write32 477 bytes, 90 callsites
> iwl_write8  493 bytes, 3 callsites

> Reduction in size is about 74,000 bytes:

>      text     data      bss       dec     hex filename
> 90758147 17226024 36659200 144643371 89f152b vmlinux0
> 90687995 17221928 36659200 144569123 89df323 vmlinux.after

> Signed-off-by: Denys Vlasenko <dvlasenk@...hat.com>
> CC: Johannes Berg <johannes.berg@...el.com>
> CC: Emmanuel Grumbach <emmanuel.grumbach@...el.com>
> Cc: "John W. Linville" <linville@...driver.com>
> Cc: Intel Linux Wireless <ilw@...ux.intel.com>
> Cc: linux-wireless@...r.kernel.org
> Cc: netdev@...r.kernel.org
> CC: linux-kernel@...r.kernel.org
> ---
>   drivers/net/wireless/iwlwifi/iwl-io.c |  7 +++++++
>   drivers/net/wireless/iwlwifi/iwl-io.h | 39 +++++++++++++++++++++--------------
>   2 files changed, 30 insertions(+), 16 deletions(-)

[...]
> diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h
> index 705d12c..3c9d2a8 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-io.h
> +++ b/drivers/net/wireless/iwlwifi/iwl-io.h
> @@ -32,24 +32,31 @@
>   #include "iwl-devtrace.h"
>   #include "iwl-trans.h"
>
[...]
> +#define IWL_READ_WRITE(static_inline) \
> +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; \
>   }
[...]
> +#if !defined(CONFIG_IWLWIFI_DEVICE_TRACING)
> +IWL_READ_WRITE(static inline)

    Not static_inline?

> +#else
> +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);
> +#endif

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ