public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Please revert fc4c73554c9d93b3e495f2f7acae1323b0d5db84. Re: [PATCH  1/2] ftrace: Fix the conditional that updates $ref_func
@ 2009-08-05  7:13 Dave Airlie
  2009-08-05  8:13 ` Matt Fleming
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Dave Airlie @ 2009-08-05  7:13 UTC (permalink / raw)
  To: Matt Fleming, Ingo Molnar, Linus Torvalds, Benjamin Herrenschmidt,
	Paul Mackerras
  Cc: Steven Rostedt, linux-kernel, Dave Jones

On Fri, Jul 24, 2009 at 2:16 AM, Matt Fleming<matt@console-pimps.org> wrote:
> Fix the conditional that checks if we already have a $ref_func and that
> the new function is weak. The code as previously checking whether either
> condition was false, and we really need to only update $ref_func is both
> cconditions are false.
>

This breaks the powerpc build on Fedora.

When building on ppc64 this commit causes the links of drivers/hwmon/lm93.o
to fail.

It introduces an undefined symbol
                 U .LM93_IN_FROM_REG

that isn't produced when this patch is reverted

This was found when the Fedora kernel failed to build when I pulled in
-rc5-git3.

can be seen at the end of:
http://koji.fedoraproject.org/koji/getfile?taskID=1582002&name=build.log

So can we revert this (at this stage in -rc5 or maybe fix it).

Dave.

> Signed-off-by: Matt Fleming <matt@console-pimps.org>
> ---
>  scripts/recordmcount.pl |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
> index 7109e2b..16c5563 100755
> --- a/scripts/recordmcount.pl
> +++ b/scripts/recordmcount.pl
> @@ -414,7 +414,7 @@ while (<IN>) {
>            $read_function = 0;
>        } else {
>            # if we already have a function, and this is weak, skip it
> -           if (!defined($ref_func) || !defined($weak{$text})) {
> +           if (!defined($ref_func) && !defined($weak{$text})) {
>                $ref_func = $text;
>            }
>        }
> --
> 1.6.4.rc0
>
> --
> 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/
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Please revert fc4c73554c9d93b3e495f2f7acae1323b0d5db84. Re: [PATCH 1/2] ftrace: Fix the conditional that updates $ref_func
  2009-08-05  7:13 Please revert fc4c73554c9d93b3e495f2f7acae1323b0d5db84. Re: [PATCH 1/2] ftrace: Fix the conditional that updates $ref_func Dave Airlie
@ 2009-08-05  8:13 ` Matt Fleming
  2009-08-05 13:30 ` Steven Rostedt
  2009-08-05 19:33 ` Steven Rostedt
  2 siblings, 0 replies; 8+ messages in thread
From: Matt Fleming @ 2009-08-05  8:13 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Ingo Molnar, Linus Torvalds, Benjamin Herrenschmidt,
	Paul Mackerras, Steven Rostedt, linux-kernel, Dave Jones

On Wed, Aug 05, 2009 at 05:13:33PM +1000, Dave Airlie wrote:
> On Fri, Jul 24, 2009 at 2:16 AM, Matt Fleming<matt@console-pimps.org> wrote:
> > Fix the conditional that checks if we already have a $ref_func and that
> > the new function is weak. The code as previously checking whether either
> > condition was false, and we really need to only update $ref_func is both
> > cconditions are false.
> >
> 
> This breaks the powerpc build on Fedora.
> 
> When building on ppc64 this commit causes the links of drivers/hwmon/lm93.o
> to fail.
> 
> It introduces an undefined symbol
>                  U .LM93_IN_FROM_REG
> 
> that isn't produced when this patch is reverted
> 
> This was found when the Fedora kernel failed to build when I pulled in
> -rc5-git3.
> 
> can be seen at the end of:
> http://koji.fedoraproject.org/koji/getfile?taskID=1582002&name=build.log
> 
> So can we revert this (at this stage in -rc5 or maybe fix it).
> 
> Dave.
> 

Eek! So the patch actually causes recordmcount.pl to remove
LM_IN_FROM_REG from the object file? Sorry about that. That is not at
all something I would ever expect to happen. I'll see if I can recreate
this and try figure out what is going on.

Thanks for the report.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Please revert fc4c73554c9d93b3e495f2f7acae1323b0d5db84. Re: [PATCH  1/2] ftrace: Fix the conditional that updates $ref_func
  2009-08-05  7:13 Please revert fc4c73554c9d93b3e495f2f7acae1323b0d5db84. Re: [PATCH 1/2] ftrace: Fix the conditional that updates $ref_func Dave Airlie
  2009-08-05  8:13 ` Matt Fleming
@ 2009-08-05 13:30 ` Steven Rostedt
  2009-08-05 21:17   ` Dave Airlie
  2009-08-05 19:33 ` Steven Rostedt
  2 siblings, 1 reply; 8+ messages in thread
From: Steven Rostedt @ 2009-08-05 13:30 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Matt Fleming, Ingo Molnar, Linus Torvalds, Benjamin Herrenschmidt,
	Paul Mackerras, LKML, Dave Jones


On Wed, 5 Aug 2009, Dave Airlie wrote:

> On Fri, Jul 24, 2009 at 2:16 AM, Matt Fleming<matt@console-pimps.org> wrote:
> > Fix the conditional that checks if we already have a $ref_func and that
> > the new function is weak. The code as previously checking whether either
> > condition was false, and we really need to only update $ref_func is both
> > cconditions are false.
> >
> 
> This breaks the powerpc build on Fedora.
> 
> When building on ppc64 this commit causes the links of drivers/hwmon/lm93.o
> to fail.
> 
> It introduces an undefined symbol
>                  U .LM93_IN_FROM_REG
> 
> that isn't produced when this patch is reverted
> 
> This was found when the Fedora kernel failed to build when I pulled in
> -rc5-git3.
> 
> can be seen at the end of:
> http://koji.fedoraproject.org/koji/getfile?taskID=1582002&name=build.log
> 
> So can we revert this (at this stage in -rc5 or maybe fix it).

I'll boot up my PPC64 box and see if I can reproduce. In the mean time,
could you send me your config (privately)

Thanks,

-- Steve

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Please revert fc4c73554c9d93b3e495f2f7acae1323b0d5db84. Re: [PATCH  1/2] ftrace: Fix the conditional that updates $ref_func
  2009-08-05  7:13 Please revert fc4c73554c9d93b3e495f2f7acae1323b0d5db84. Re: [PATCH 1/2] ftrace: Fix the conditional that updates $ref_func Dave Airlie
  2009-08-05  8:13 ` Matt Fleming
  2009-08-05 13:30 ` Steven Rostedt
@ 2009-08-05 19:33 ` Steven Rostedt
  2009-08-05 21:21   ` Steven Rostedt
  2 siblings, 1 reply; 8+ messages in thread
From: Steven Rostedt @ 2009-08-05 19:33 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Matt Fleming, Ingo Molnar, Linus Torvalds, Benjamin Herrenschmidt,
	Paul Mackerras, linux-kernel, Dave Jones


On Wed, 5 Aug 2009, Dave Airlie wrote:

> On Fri, Jul 24, 2009 at 2:16 AM, Matt Fleming<matt@console-pimps.org> wrote:
> > Fix the conditional that checks if we already have a $ref_func and that
> > the new function is weak. The code as previously checking whether either
> > condition was false, and we really need to only update $ref_func is both
> > cconditions are false.
> >
> 
> This breaks the powerpc build on Fedora.
> 
> When building on ppc64 this commit causes the links of drivers/hwmon/lm93.o
> to fail.
> 
> It introduces an undefined symbol
>                  U .LM93_IN_FROM_REG
> 
> that isn't produced when this patch is reverted
> 
> This was found when the Fedora kernel failed to build when I pulled in
> -rc5-git3.
> 
> can be seen at the end of:
> http://koji.fedoraproject.org/koji/getfile?taskID=1582002&name=build.log
> 
> So can we revert this (at this stage in -rc5 or maybe fix it).
> 

I was not able to reproduce it, but could you see if this patch fixes the 
issue?

-- Steve

diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index d29baa2..a6bfecb 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -402,7 +402,6 @@ while (<IN>) {
 
     # section found, now is this a start of a function?
     } elsif ($read_function && /$function_regex/) {
-	$text_found = 1;
 	$text = $2;
 
 	# if this is either a local function or a weak function
@@ -412,11 +411,13 @@ while (<IN>) {
 	    $ref_func = $text;
 	    $read_function = 0;
 	    $offset = hex $1;
+	    $text_found = 1;
 	} else {
 	    # if we already have a function, and this is weak, skip it
 	    if (!defined($ref_func) && !defined($weak{$text})) {
 		$ref_func = $text;
 		$offset = hex $1;
+		$text_found = 1;
 	    }
 	}
     } elsif ($read_headers && /$mcount_section/) {

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: Please revert fc4c73554c9d93b3e495f2f7acae1323b0d5db84. Re:  [PATCH 1/2] ftrace: Fix the conditional that updates $ref_func
  2009-08-05 13:30 ` Steven Rostedt
@ 2009-08-05 21:17   ` Dave Airlie
  0 siblings, 0 replies; 8+ messages in thread
From: Dave Airlie @ 2009-08-05 21:17 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Matt Fleming, Ingo Molnar, Linus Torvalds, Benjamin Herrenschmidt,
	Paul Mackerras, LKML, Dave Jones

On Wed, Aug 5, 2009 at 11:30 PM, Steven Rostedt<rostedt@goodmis.org> wrote:
>
> On Wed, 5 Aug 2009, Dave Airlie wrote:
>
>> On Fri, Jul 24, 2009 at 2:16 AM, Matt Fleming<matt@console-pimps.org> wrote:
>> > Fix the conditional that checks if we already have a $ref_func and that
>> > the new function is weak. The code as previously checking whether either
>> > condition was false, and we really need to only update $ref_func is both
>> > cconditions are false.
>> >
>>
>> This breaks the powerpc build on Fedora.
>>
>> When building on ppc64 this commit causes the links of drivers/hwmon/lm93.o
>> to fail.
>>
>> It introduces an undefined symbol
>>                  U .LM93_IN_FROM_REG
>>
>> that isn't produced when this patch is reverted
>>
>> This was found when the Fedora kernel failed to build when I pulled in
>> -rc5-git3.
>>
>> can be seen at the end of:
>> http://koji.fedoraproject.org/koji/getfile?taskID=1582002&name=build.log
>>
>> So can we revert this (at this stage in -rc5 or maybe fix it).
>
> I'll boot up my PPC64 box and see if I can reproduce. In the mean time,
> could you send me your config (privately)
>

http://people.freedesktop.org/~airlied/for_mfleming.tar.gz

has my config along with the stuff produced.

Dave.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Please revert fc4c73554c9d93b3e495f2f7acae1323b0d5db84. Re: [PATCH  1/2] ftrace: Fix the conditional that updates $ref_func
  2009-08-05 19:33 ` Steven Rostedt
@ 2009-08-05 21:21   ` Steven Rostedt
  2009-08-06  1:17     ` Dave Airlie
  0 siblings, 1 reply; 8+ messages in thread
From: Steven Rostedt @ 2009-08-05 21:21 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Matt Fleming, Ingo Molnar, Linus Torvalds, Benjamin Herrenschmidt,
	Paul Mackerras, linux-kernel, Dave Jones


On Wed, 5 Aug 2009, Steven Rostedt wrote:

> 
> On Wed, 5 Aug 2009, Dave Airlie wrote:
> 
> > On Fri, Jul 24, 2009 at 2:16 AM, Matt Fleming<matt@console-pimps.org> wrote:
> > > Fix the conditional that checks if we already have a $ref_func and that
> > > the new function is weak. The code as previously checking whether either
> > > condition was false, and we really need to only update $ref_func is both
> > > cconditions are false.
> > >
> > 
> > This breaks the powerpc build on Fedora.
> > 
> > When building on ppc64 this commit causes the links of drivers/hwmon/lm93.o
> > to fail.
> > 
> > It introduces an undefined symbol
> >                  U .LM93_IN_FROM_REG
> > 
> > that isn't produced when this patch is reverted
> > 
> > This was found when the Fedora kernel failed to build when I pulled in
> > -rc5-git3.
> > 
> > can be seen at the end of:
> > http://koji.fedoraproject.org/koji/getfile?taskID=1582002&name=build.log
> > 
> > So can we revert this (at this stage in -rc5 or maybe fix it).
> > 
> 
> I was not able to reproduce it, but could you see if this patch fixes the 
> issue?
> 

Forget that one. I was finally able to reproduce it. This patch fixed it 
for me:

-- Steve

diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index d29baa2..98e4afb 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -135,6 +135,7 @@ $mv = "mv" if ((length $mv) == 0);
 
 my %locals;		# List of local (static) functions
 my %weak;		# List of weak functions
+my %symbols;		# List of symbols that are not local or weak
 my %convert;		# List of local functions used that needs conversion
 
 my $type;
@@ -318,6 +319,8 @@ while (<IN>) {
 	$locals{$1} = 1;
     } elsif (/^[0-9a-fA-F]+\s+([wW])\s+(\S+)/) {
 	$weak{$2} = $1;
+    } elsif (/^[0-9a-fA-F]+\s+(\S+)\s+(\S+)/) {
+	$symbols{$2} = $1;
     }
 }
 close(IN);
@@ -408,13 +411,15 @@ while (<IN>) {
 	# if this is either a local function or a weak function
 	# keep looking for functions that are global that
 	# we can use safely.
-	if (!defined($locals{$text}) && !defined($weak{$text})) {
+	if (!defined($locals{$text}) && !defined($weak{$text}) &&
+	    defined($symbols{$text})) {
 	    $ref_func = $text;
 	    $read_function = 0;
 	    $offset = hex $1;
 	} else {
 	    # if we already have a function, and this is weak, skip it
-	    if (!defined($ref_func) && !defined($weak{$text})) {
+	    if (!defined($ref_func) && defined($locals{$text}) &&
+		!defined($weak{$text})) {
 		$ref_func = $text;
 		$offset = hex $1;
 	    }

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: Please revert fc4c73554c9d93b3e495f2f7acae1323b0d5db84. Re:  [PATCH 1/2] ftrace: Fix the conditional that updates $ref_func
  2009-08-05 21:21   ` Steven Rostedt
@ 2009-08-06  1:17     ` Dave Airlie
  2009-08-06  1:21       ` Steven Rostedt
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Airlie @ 2009-08-06  1:17 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Matt Fleming, Ingo Molnar, Linus Torvalds, Benjamin Herrenschmidt,
	Paul Mackerras, linux-kernel, Dave Jones

On Thu, Aug 6, 2009 at 7:21 AM, Steven Rostedt<rostedt@goodmis.org> wrote:
>
> On Wed, 5 Aug 2009, Steven Rostedt wrote:
>
>>
>> On Wed, 5 Aug 2009, Dave Airlie wrote:
>>
>> > On Fri, Jul 24, 2009 at 2:16 AM, Matt Fleming<matt@console-pimps.org> wrote:
>> > > Fix the conditional that checks if we already have a $ref_func and that
>> > > the new function is weak. The code as previously checking whether either
>> > > condition was false, and we really need to only update $ref_func is both
>> > > cconditions are false.
>> > >
>> >
>> > This breaks the powerpc build on Fedora.
>> >
>> > When building on ppc64 this commit causes the links of drivers/hwmon/lm93.o
>> > to fail.
>> >
>> > It introduces an undefined symbol
>> >                  U .LM93_IN_FROM_REG
>> >
>> > that isn't produced when this patch is reverted
>> >
>> > This was found when the Fedora kernel failed to build when I pulled in
>> > -rc5-git3.
>> >
>> > can be seen at the end of:
>> > http://koji.fedoraproject.org/koji/getfile?taskID=1582002&name=build.log
>> >
>> > So can we revert this (at this stage in -rc5 or maybe fix it).
>> >
>>
>> I was not able to reproduce it, but could you see if this patch fixes the
>> issue?
>>
>
> Forget that one. I was finally able to reproduce it. This patch fixed it
> for me:
>

Doesn't seem to work here, I put the patch in on top of the Fedora
kernel instead of the previous one and got a link failure again in lm93.o

I'll reconfirm it now.

Dave.


> -- Steve
>
> diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
> index d29baa2..98e4afb 100755
> --- a/scripts/recordmcount.pl
> +++ b/scripts/recordmcount.pl
> @@ -135,6 +135,7 @@ $mv = "mv" if ((length $mv) == 0);
>
>  my %locals;            # List of local (static) functions
>  my %weak;              # List of weak functions
> +my %symbols;           # List of symbols that are not local or weak
>  my %convert;           # List of local functions used that needs conversion
>
>  my $type;
> @@ -318,6 +319,8 @@ while (<IN>) {
>        $locals{$1} = 1;
>     } elsif (/^[0-9a-fA-F]+\s+([wW])\s+(\S+)/) {
>        $weak{$2} = $1;
> +    } elsif (/^[0-9a-fA-F]+\s+(\S+)\s+(\S+)/) {
> +       $symbols{$2} = $1;
>     }
>  }
>  close(IN);
> @@ -408,13 +411,15 @@ while (<IN>) {
>        # if this is either a local function or a weak function
>        # keep looking for functions that are global that
>        # we can use safely.
> -       if (!defined($locals{$text}) && !defined($weak{$text})) {
> +       if (!defined($locals{$text}) && !defined($weak{$text}) &&
> +           defined($symbols{$text})) {
>            $ref_func = $text;
>            $read_function = 0;
>            $offset = hex $1;
>        } else {
>            # if we already have a function, and this is weak, skip it
> -           if (!defined($ref_func) && !defined($weak{$text})) {
> +           if (!defined($ref_func) && defined($locals{$text}) &&
> +               !defined($weak{$text})) {
>                $ref_func = $text;
>                $offset = hex $1;
>            }
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Please revert fc4c73554c9d93b3e495f2f7acae1323b0d5db84. Re:  [PATCH 1/2] ftrace: Fix the conditional that updates $ref_func
  2009-08-06  1:17     ` Dave Airlie
@ 2009-08-06  1:21       ` Steven Rostedt
  0 siblings, 0 replies; 8+ messages in thread
From: Steven Rostedt @ 2009-08-06  1:21 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Matt Fleming, Ingo Molnar, Linus Torvalds, Benjamin Herrenschmidt,
	Paul Mackerras, linux-kernel, Dave Jones


On Thu, 6 Aug 2009, Dave Airlie wrote:

> Doesn't seem to work here, I put the patch in on top of the Fedora
> kernel instead of the previous one and got a link failure again in lm93.o
> 
> I'll reconfirm it now.
> 

This is weird. I took the object file out of the build and got it to work 
with this patched recordmcount.pl script, but when I do it in the build it 
doesn't work. I'm still investigating.

-- Steve


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-08-06  1:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-05  7:13 Please revert fc4c73554c9d93b3e495f2f7acae1323b0d5db84. Re: [PATCH 1/2] ftrace: Fix the conditional that updates $ref_func Dave Airlie
2009-08-05  8:13 ` Matt Fleming
2009-08-05 13:30 ` Steven Rostedt
2009-08-05 21:17   ` Dave Airlie
2009-08-05 19:33 ` Steven Rostedt
2009-08-05 21:21   ` Steven Rostedt
2009-08-06  1:17     ` Dave Airlie
2009-08-06  1:21       ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox