Re: [PATCH 56/74] lto, workaround: Add workaround for missing LTO symbols in igb

2012-08-22 Thread Andi Kleen
On Wed, Aug 22, 2012 at 08:43:35AM +, Arnd Bergmann wrote:
> On Sunday 19 August 2012, Andi Kleen wrote:
> > -static struct e1000_mac_operations e1000_mac_ops_82575 = {
> > +/* Workaround for LTO bug */
> > +__visible struct e1000_mac_operations e1000_mac_ops_82575 = {
> 
> The comment is not very clear outside the context of this patch.
> Maybe change it to /* __visible added to work around an LTO but */.

I hope to remove this soon, just needs another fix for initcalls
first. 

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


Re: [PATCH 56/74] lto, workaround: Add workaround for missing LTO symbols in igb

2012-08-22 Thread Arnd Bergmann
On Sunday 19 August 2012, Andi Kleen wrote:
> -static struct e1000_mac_operations e1000_mac_ops_82575 = {
> +/* Workaround for LTO bug */
> +__visible struct e1000_mac_operations e1000_mac_ops_82575 = {

The comment is not very clear outside the context of this patch.
Maybe change it to /* __visible added to work around an LTO but */.

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


[PATCH 56/74] lto, workaround: Add workaround for missing LTO symbols in igb

2012-08-18 Thread Andi Kleen
From: Andi Kleen 

The gcc 4.7 LTO with -fno-toplevel-reorder sometimes drops data
variables. These show up as undefined symbols at link time.
As a workaround just make a few where it happened visible for now.

There isl nothing wrong with this driver, just a toolchain problem.

Signed-off-by: Andi Kleen 
---
 drivers/net/ethernet/intel/igb/e1000_82575.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c 
b/drivers/net/ethernet/intel/igb/e1000_82575.c
index ba994fb..86b985a 100644
--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
@@ -2254,7 +2254,8 @@ out:
return ret_val;
 }
 
-static struct e1000_mac_operations e1000_mac_ops_82575 = {
+/* Workaround for LTO bug */
+__visible struct e1000_mac_operations e1000_mac_ops_82575 = {
.init_hw  = igb_init_hw_82575,
.check_for_link   = igb_check_for_link_82575,
.rar_set  = igb_rar_set,
@@ -2262,13 +2263,13 @@ static struct e1000_mac_operations e1000_mac_ops_82575 
= {
.get_speed_and_duplex = igb_get_speed_and_duplex_copper,
 };
 
-static struct e1000_phy_operations e1000_phy_ops_82575 = {
+__visible struct e1000_phy_operations e1000_phy_ops_82575 = {
.acquire  = igb_acquire_phy_82575,
.get_cfg_done = igb_get_cfg_done_82575,
.release  = igb_release_phy_82575,
 };
 
-static struct e1000_nvm_operations e1000_nvm_ops_82575 = {
+__visible struct e1000_nvm_operations e1000_nvm_ops_82575 = {
.acquire  = igb_acquire_nvm_82575,
.read = igb_read_nvm_eerd,
.release  = igb_release_nvm_82575,
-- 
1.7.7.6

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