linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the final tree
@ 2011-05-27  5:11 Stephen Rothwell
  2011-05-27 14:47 ` Mike Frysinger
  2011-05-28 14:04 ` [PATCH] kgdbts: only use new asm-generic/ptrace.h api when needed Mike Frysinger
  0 siblings, 2 replies; 7+ messages in thread
From: Stephen Rothwell @ 2011-05-27  5:11 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: linux-next, linux-kernel, Linus, Andrew Morton

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]

Hi all,

After merging the final tree, today's linux-next build (sparc32 defconfig)
failed like this:

drivers/misc/kgdbts.c: In function 'check_and_rewind_pc':
drivers/misc/kgdbts.c:307: error: implicit declaration of function 'instruction_pointer_set'

Caused by commit 63ab25ebbc50 ("kgdbts: unify/generalize gdb breakpoint
adjustment") from Linus' tree.

Lots of architectures do not use asm-generic/ptrace.h where
instruction_pointer_set() is defined.

I have reverted that commit for today.

This error was detected in our builds of the mmotm tree on May 14
(see http://kisskb.ellerman.id.au/kisskb/buildresult/4161286/).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: linux-next: build failure after merge of the final tree
  2011-05-27  5:11 linux-next: build failure after merge of the final tree Stephen Rothwell
@ 2011-05-27 14:47 ` Mike Frysinger
  2011-05-28 14:04 ` [PATCH] kgdbts: only use new asm-generic/ptrace.h api when needed Mike Frysinger
  1 sibling, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2011-05-27 14:47 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Linus, Andrew Morton

On Fri, May 27, 2011 at 01:11, Stephen Rothwell wrote:
> After merging the final tree, today's linux-next build (sparc32 defconfig)
> failed like this:
>
> drivers/misc/kgdbts.c: In function 'check_and_rewind_pc':
> drivers/misc/kgdbts.c:307: error: implicit declaration of function 'instruction_pointer_set'
>
> Caused by commit 63ab25ebbc50 ("kgdbts: unify/generalize gdb breakpoint
> adjustment") from Linus' tree.
>
> Lots of architectures do not use asm-generic/ptrace.h where
> instruction_pointer_set() is defined.

yes, but lots of arches dont implement kgdb, so it doesnt matter :).
i thought i got all of them, but i must have missed some, or new
arches showed up since i wrote the patches.  i'll take a look later
today and send out a fix.
-mike

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

* [PATCH] kgdbts: only use new asm-generic/ptrace.h api when needed
  2011-05-27  5:11 linux-next: build failure after merge of the final tree Stephen Rothwell
  2011-05-27 14:47 ` Mike Frysinger
@ 2011-05-28 14:04 ` Mike Frysinger
  2011-05-30  9:51   ` [Kgdb-bugreport] " Sergei Shtylyov
  1 sibling, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2011-05-28 14:04 UTC (permalink / raw)
  To: kgdb-bugreport, Jason Wessel, Andrew Morton; +Cc: linux-kernel, linux-next

The new instruction_pointer_set helper is defined for people who have
converted to asm-generic/ptrace.h, so don't use it generally unless
the arch needs it (in which case it has been converted).  This should
fix building of kgdb tests for arches not yet converted.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 drivers/misc/kgdbts.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
index b0c5631..8cebec5 100644
--- a/drivers/misc/kgdbts.c
+++ b/drivers/misc/kgdbts.c
@@ -304,7 +304,10 @@ static int check_and_rewind_pc(char *put_str, char *arg)
 		return 1;
 	}
 	/* Readjust the instruction pointer if needed */
-	instruction_pointer_set(&kgdbts_regs, ip + offset);
+	ip += offset;
+#ifdef GDB_ADJUSTS_BREAK_OFFSET
+	instruction_pointer_set(&kgdbts_regs, ip);
+#endif
 	return 0;
 }
 
-- 
1.7.5.rc3

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

* Re: [Kgdb-bugreport] [PATCH] kgdbts: only use new asm-generic/ptrace.h api when needed
  2011-05-28 14:04 ` [PATCH] kgdbts: only use new asm-generic/ptrace.h api when needed Mike Frysinger
@ 2011-05-30  9:51   ` Sergei Shtylyov
  2011-05-30 16:28     ` Mike Frysinger
  0 siblings, 1 reply; 7+ messages in thread
From: Sergei Shtylyov @ 2011-05-30  9:51 UTC (permalink / raw)
  To: Mike Frysinger
  Cc: kgdb-bugreport, Jason Wessel, Andrew Morton, linux-next, linux-kernel

Hello.

On 28-05-2011 18:04, Mike Frysinger wrote:

> The new instruction_pointer_set helper is defined for people who have
> converted to asm-generic/ptrace.h, so don't use it generally unless
> the arch needs it (in which case it has been converted).  This should
> fix building of kgdb tests for arches not yet converted.

> Signed-off-by: Mike Frysinger<vapier@gentoo.org>
> ---
>   drivers/misc/kgdbts.c |    5 ++++-
>   1 files changed, 4 insertions(+), 1 deletions(-)

> diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
> index b0c5631..8cebec5 100644
> --- a/drivers/misc/kgdbts.c
> +++ b/drivers/misc/kgdbts.c
> @@ -304,7 +304,10 @@ static int check_and_rewind_pc(char *put_str, char *arg)
>   		return 1;
>   	}
>   	/* Readjust the instruction pointer if needed */
> -	instruction_pointer_set(&kgdbts_regs, ip + offset);
> +	ip += offset;

    Since 'íp' is local, incrementing it is pointless here unless you have 
GDB_ADJUSTS_BREAK_OFFSET defined. Why not keep instruction_pointer_set() call 
as is?

> +#ifdef GDB_ADJUSTS_BREAK_OFFSET
> +	instruction_pointer_set(&kgdbts_regs, ip);
> +#endif
>   	return 0;
>   }
>

WBR, Sergei

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

* Re: [Kgdb-bugreport] [PATCH] kgdbts: only use new asm-generic/ptrace.h api when needed
  2011-05-30  9:51   ` [Kgdb-bugreport] " Sergei Shtylyov
@ 2011-05-30 16:28     ` Mike Frysinger
  2011-06-01  0:11       ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2011-05-30 16:28 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: kgdb-bugreport, Jason Wessel, Andrew Morton, linux-next, linux-kernel

On Mon, May 30, 2011 at 05:51, Sergei Shtylyov wrote:
> On 28-05-2011 18:04, Mike Frysinger wrote:
>> The new instruction_pointer_set helper is defined for people who have
>> converted to asm-generic/ptrace.h, so don't use it generally unless
>> the arch needs it (in which case it has been converted).  This should
>> fix building of kgdb tests for arches not yet converted.
>
>> --- a/drivers/misc/kgdbts.c
>> +++ b/drivers/misc/kgdbts.c
>> @@ -304,7 +304,10 @@ static int check_and_rewind_pc(char *put_str, char
>> *arg)
>>                return 1;
>>        }
>>        /* Readjust the instruction pointer if needed */
>> -       instruction_pointer_set(&kgdbts_regs, ip + offset);
>> +       ip += offset;
>
>   Since 'íp' is local, incrementing it is pointless here unless you have
> GDB_ADJUSTS_BREAK_OFFSET defined. Why not keep instruction_pointer_set()
> call as is?

i prefer to have as much outside of ifdefs as possible.  gcc optimizes
the result away, so it isnt a code size problem.
-mike

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

* Re: [Kgdb-bugreport] [PATCH] kgdbts: only use new asm-generic/ptrace.h api when needed
  2011-05-30 16:28     ` Mike Frysinger
@ 2011-06-01  0:11       ` Stephen Rothwell
  2011-06-01  2:19         ` Mike Frysinger
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2011-06-01  0:11 UTC (permalink / raw)
  To: Mike Frysinger, Linus
  Cc: Sergei Shtylyov, kgdb-bugreport, Jason Wessel, Andrew Morton,
	linux-next, linux-kernel

On Mon, 30 May 2011 12:28:17 -0400 Mike Frysinger <vapier@gentoo.org> wrote:
>
> i prefer to have as much outside of ifdefs as possible.  gcc optimizes
> the result away, so it isnt a code size problem.

Can we just get a patch sent to Linus, please?   His tree has now been
broken for powerpc and sparc32 for 5 days :-(

It would have been nice if the original patch had been in linux-next at
some point (especially given that I have a "kgdb" tree in linux-next).

/me just slightly annoyed.

Linus, the fix patch is below (I have applied it to linux-next today):

From:	Mike Frysinger <vapier@gentoo.org>
To:	kgdb-bugreport@lists.sourceforge.net,
	Jason Wessel <jason.wessel@windriver.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc:	linux-kernel@vger.kernel.org, linux-next@vger.kernel.org
Subject: [PATCH] kgdbts: only use new asm-generic/ptrace.h api when needed
Date:	Sat, 28 May 2011 10:04:25 -0400

The new instruction_pointer_set helper is defined for people who have
converted to asm-generic/ptrace.h, so don't use it generally unless
the arch needs it (in which case it has been converted).  This should
fix building of kgdb tests for arches not yet converted.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 drivers/misc/kgdbts.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c
index b0c5631..8cebec5 100644
--- a/drivers/misc/kgdbts.c
+++ b/drivers/misc/kgdbts.c
@@ -304,7 +304,10 @@ static int check_and_rewind_pc(char *put_str, char *arg)
 		return 1;
 	}
 	/* Readjust the instruction pointer if needed */
-	instruction_pointer_set(&kgdbts_regs, ip + offset);
+	ip += offset;
+#ifdef GDB_ADJUSTS_BREAK_OFFSET
+	instruction_pointer_set(&kgdbts_regs, ip);
+#endif
 	return 0;
 }
 
-- 
1.7.5.rc3

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

* Re: [Kgdb-bugreport] [PATCH] kgdbts: only use new asm-generic/ptrace.h api when needed
  2011-06-01  0:11       ` Stephen Rothwell
@ 2011-06-01  2:19         ` Mike Frysinger
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2011-06-01  2:19 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linus, Sergei Shtylyov, kgdb-bugreport, Jason Wessel,
	Andrew Morton, linux-next, linux-kernel

On Tue, May 31, 2011 at 20:11, Stephen Rothwell wrote:
> It would have been nice if the original patch had been in linux-next at
> some point (especially given that I have a "kgdb" tree in linux-next).

complain to akpm.  the patches sat in his tree for some time with no complaints.
-mike

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

end of thread, other threads:[~2011-06-01  2:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-27  5:11 linux-next: build failure after merge of the final tree Stephen Rothwell
2011-05-27 14:47 ` Mike Frysinger
2011-05-28 14:04 ` [PATCH] kgdbts: only use new asm-generic/ptrace.h api when needed Mike Frysinger
2011-05-30  9:51   ` [Kgdb-bugreport] " Sergei Shtylyov
2011-05-30 16:28     ` Mike Frysinger
2011-06-01  0:11       ` Stephen Rothwell
2011-06-01  2:19         ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).