* [PATCH] elfcore.h : Fix UML build breakage
@ 2009-07-08 2:41 Parag Warudkar
2009-07-08 4:30 ` Amerigo Wang
0 siblings, 1 reply; 4+ messages in thread
From: Parag Warudkar @ 2009-07-08 2:41 UTC (permalink / raw)
To: linux-kernel; +Cc: torvalds, akpm, teawater, mingo, tj, xiyou.wangcong
[-- Attachment #1: Type: TEXT/PLAIN, Size: 887 bytes --]
Commit a65e7bfcd74e4c0939f235d2bf9f48ddb3a57991 breaks UML build with
below error -
In file included from fs/proc/kcore.c:17:
include/linux/elfcore.h: In function ‘elf_core_copy_task_regs’:
include/linux/elfcore.h:129: error: implicit declaration of function
‘task_pt_regs’
Fix this by restoring the previous behavior of returning 0 for all arches
like UML that don't define task_pt_regs.
Signed-off-by: Parag Warudkar <parag.lkml@gmail.com>
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
index 03ec167..28f722e 100644
--- a/include/linux/elfcore.h
+++ b/include/linux/elfcore.h
@@ -125,7 +125,7 @@ static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t*
#ifdef ELF_CORE_COPY_TASK_REGS
return ELF_CORE_COPY_TASK_REGS(t, elfregs);
-#else
+#elif defined task_pt_regs
elf_core_copy_regs(elfregs, task_pt_regs(t));
#endif
return 0;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] elfcore.h : Fix UML build breakage
2009-07-08 2:41 [PATCH] elfcore.h : Fix UML build breakage Parag Warudkar
@ 2009-07-08 4:30 ` Amerigo Wang
2009-07-08 15:46 ` Parag Warudkar
0 siblings, 1 reply; 4+ messages in thread
From: Amerigo Wang @ 2009-07-08 4:30 UTC (permalink / raw)
To: Parag Warudkar
Cc: linux-kernel, torvalds, akpm, teawater, mingo, tj, xiyou.wangcong
On Tue, Jul 07, 2009 at 10:41:50PM -0400, Parag Warudkar wrote:
>Commit a65e7bfcd74e4c0939f235d2bf9f48ddb3a57991 breaks UML build with
>below error -
>
>In file included from fs/proc/kcore.c:17:
>include/linux/elfcore.h: In function ‘elf_core_copy_task_regs’:
>include/linux/elfcore.h:129: error: implicit declaration of function
>‘task_pt_regs’
>
>Fix this by restoring the previous behavior of returning 0 for all arches
>like UML that don't define task_pt_regs.
Good catch!
>
>Signed-off-by: Parag Warudkar <parag.lkml@gmail.com>
>
>diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
>index 03ec167..28f722e 100644
>--- a/include/linux/elfcore.h
>+++ b/include/linux/elfcore.h
>@@ -125,7 +125,7 @@ static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t*
> #ifdef ELF_CORE_COPY_TASK_REGS
>
> return ELF_CORE_COPY_TASK_REGS(t, elfregs);
>-#else
>+#elif defined task_pt_regs
> elf_core_copy_regs(elfregs, task_pt_regs(t));
> #endif
> return 0;
#elif defined doesn't match #ifdef well, how about:
#if defined (ELF_CORE_COPY_TASK_REGS)
...
#elif defined (task_pt_regs)
...
#endif
?
Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] elfcore.h : Fix UML build breakage
2009-07-08 4:30 ` Amerigo Wang
@ 2009-07-08 15:46 ` Parag Warudkar
2009-07-09 5:58 ` Amerigo Wang
0 siblings, 1 reply; 4+ messages in thread
From: Parag Warudkar @ 2009-07-08 15:46 UTC (permalink / raw)
To: Amerigo Wang
Cc: Parag Warudkar, linux-kernel, torvalds, akpm, teawater, mingo, tj
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1425 bytes --]
On Wed, 8 Jul 2009, Amerigo Wang wrote:
> On Tue, Jul 07, 2009 at 10:41:50PM -0400, Parag Warudkar wrote:
> >Commit a65e7bfcd74e4c0939f235d2bf9f48ddb3a57991 breaks UML build with
> >below error -
> >
> >In file included from fs/proc/kcore.c:17:
> >include/linux/elfcore.h: In function ‘elf_core_copy_task_regs’:
> >include/linux/elfcore.h:129: error: implicit declaration of function
> >‘task_pt_regs’
> >
> >Fix this by restoring the previous behavior of returning 0 for all arches
> >like UML that don't define task_pt_regs.
> #elif defined doesn't match #ifdef well, how about:
>
> #if defined (ELF_CORE_COPY_TASK_REGS)
> ...
> #elif defined (task_pt_regs)
> ...
> #endif
Updated patch below -
Fix UML build breakage due to commit
a65e7bfcd74e4c0939f235d2bf9f48ddb3a57991.
Signed-off-by: Parag Warudkar <parag.lkml@gmail.com>
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
index 03ec167..00d6a68 100644
--- a/include/linux/elfcore.h
+++ b/include/linux/elfcore.h
@@ -122,10 +122,9 @@ static inline void elf_core_copy_kernel_regs(elf_gregset_t *elfregs, struct pt_r
static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs)
{
-#ifdef ELF_CORE_COPY_TASK_REGS
-
+#if defined (ELF_CORE_COPY_TASK_REGS)
return ELF_CORE_COPY_TASK_REGS(t, elfregs);
-#else
+#elif defined (task_pt_regs)
elf_core_copy_regs(elfregs, task_pt_regs(t));
#endif
return 0;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] elfcore.h : Fix UML build breakage
2009-07-08 15:46 ` Parag Warudkar
@ 2009-07-09 5:58 ` Amerigo Wang
0 siblings, 0 replies; 4+ messages in thread
From: Amerigo Wang @ 2009-07-09 5:58 UTC (permalink / raw)
To: Parag Warudkar
Cc: Amerigo Wang, linux-kernel, torvalds, akpm, teawater, mingo, tj
On Wed, Jul 08, 2009 at 11:46:02AM -0400, Parag Warudkar wrote:
>
>
>On Wed, 8 Jul 2009, Amerigo Wang wrote:
>
>> On Tue, Jul 07, 2009 at 10:41:50PM -0400, Parag Warudkar wrote:
>> >Commit a65e7bfcd74e4c0939f235d2bf9f48ddb3a57991 breaks UML build with
>> >below error -
>> >
>> >In file included from fs/proc/kcore.c:17:
>> >include/linux/elfcore.h: In function ‘elf_core_copy_task_regs’:
>> >include/linux/elfcore.h:129: error: implicit declaration of function
>> >‘task_pt_regs’
>> >
>> >Fix this by restoring the previous behavior of returning 0 for all arches
>> >like UML that don't define task_pt_regs.
>
>> #elif defined doesn't match #ifdef well, how about:
>>
>> #if defined (ELF_CORE_COPY_TASK_REGS)
>> ...
>> #elif defined (task_pt_regs)
>> ...
>> #endif
>
>Updated patch below -
>
>Fix UML build breakage due to commit
>a65e7bfcd74e4c0939f235d2bf9f48ddb3a57991.
>
>Signed-off-by: Parag Warudkar <parag.lkml@gmail.com>
>
ACK. Thank you!
It looks like Linus already merged this...
>diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h
>index 03ec167..00d6a68 100644
>--- a/include/linux/elfcore.h
>+++ b/include/linux/elfcore.h
>@@ -122,10 +122,9 @@ static inline void elf_core_copy_kernel_regs(elf_gregset_t *elfregs, struct pt_r
>
> static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs)
> {
>-#ifdef ELF_CORE_COPY_TASK_REGS
>-
>+#if defined (ELF_CORE_COPY_TASK_REGS)
> return ELF_CORE_COPY_TASK_REGS(t, elfregs);
>-#else
>+#elif defined (task_pt_regs)
> elf_core_copy_regs(elfregs, task_pt_regs(t));
> #endif
> return 0;
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-09 5:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-08 2:41 [PATCH] elfcore.h : Fix UML build breakage Parag Warudkar
2009-07-08 4:30 ` Amerigo Wang
2009-07-08 15:46 ` Parag Warudkar
2009-07-09 5:58 ` Amerigo Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®