Prev: [PATCH 2/2] ehea: fix possible DLPAR/mem deadlock
Next: uml: i386: Avoid redefinition of NR_syscalls
From: Amerigo Wang on 20 Apr 2010 06:10 On Mon, Apr 19, 2010 at 11:53:06PM +0200, Jan Kiszka wrote: >We can't pull in linux/sched.h, so just declare the struct. > Did you meet any build error? If yes, please include it. Thanks. >Signed-off-by: Jan Kiszka <jan.kiszka(a)web.de> >--- > arch/um/sys-i386/asm/elf.h | 2 ++ > arch/um/sys-x86_64/asm/elf.h | 2 ++ > 2 files changed, 4 insertions(+), 0 deletions(-) > >diff --git a/arch/um/sys-i386/asm/elf.h b/arch/um/sys-i386/asm/elf.h >index e64cd41..a979a22 100644 >--- a/arch/um/sys-i386/asm/elf.h >+++ b/arch/um/sys-i386/asm/elf.h >@@ -75,6 +75,8 @@ typedef struct user_i387_struct elf_fpregset_t; > pr_reg[16] = PT_REGS_SS(regs); \ > } while (0); > >+struct task_struct; >+ > extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu); > > #define ELF_CORE_COPY_FPREGS(t, fpu) elf_core_copy_fpregs(t, fpu) >diff --git a/arch/um/sys-x86_64/asm/elf.h b/arch/um/sys-x86_64/asm/elf.h >index 49655c8..d760967 100644 >--- a/arch/um/sys-x86_64/asm/elf.h >+++ b/arch/um/sys-x86_64/asm/elf.h >@@ -95,6 +95,8 @@ typedef struct user_i387_struct elf_fpregset_t; > (pr_reg)[25] = 0; \ > (pr_reg)[26] = 0; > >+struct task_struct; >+ > extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu); > > #define ELF_CORE_COPY_FPREGS(t, fpu) elf_core_copy_fpregs(t, fpu) >-- >1.6.0.2 > >-- >To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >the body of a message to majordomo(a)vger.kernel.org >More majordomo info at http://vger.kernel.org/majordomo-info.html >Please read the FAQ at http://www.tux.org/lkml/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Jiri Kosina on 20 Apr 2010 19:50 On Tue, 20 Apr 2010, Jan Kiszka wrote: > >>> We can't pull in linux/sched.h, so just declare the struct. > >>> > >> Did you meet any build error? If yes, please include it. > > > > What does this patch fix, aside from being a bit cleaner? > > CC arch/um/sys-i386/elfcore.o > In file included from /data/linux-2.6/include/linux/elf.h:8, > from /data/linux-2.6/arch/um/sys-i386/elfcore.c:2: > /data/linux-2.6/arch/um/sys-i386/asm/elf.h:78: warning: 'struct task_struct' declared inside parameter list > /data/linux-2.6/arch/um/sys-i386/asm/elf.h:78: warning: its scope is only this definition or declaration, which is probably not what you want > > I guess not many people build against i386 hosts anymore, so this > remained widely unnoticed. > > > > > If it built before, without having a task_struct declaration, I think > > that means that the elf_core_copy_fpregs was never used. The > > task_struct * in the declaration would become a private task_struct, > > known only to the declaration. If the implementation or callers have > > the regular task_struct, it will be a different one, and the > > prototypes will conflict due to the different types of the first > > parameter. > > This is just a forward declaration (that many arch elf header include), > so no such problem exists. > > BTW, to answer the other question in this thread: We have a circular > dependency that prevents including sched.h. > > I can add all these information to some v2 of this patch if it is > required to get this merged. Please let me know. I have updated the explanation in the changelog and applied the patch. If anyone has any objections still, please let me know. Thanks, -- Jiri Kosina SUSE Labs, Novell Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Amerigo Wang on 21 Apr 2010 02:10 On Tue, Apr 20, 2010 at 07:09:15PM +0200, Jan Kiszka wrote: >Jeff Dike wrote: >> On Tue, Apr 20, 2010 at 06:09:49PM +0800, Amerigo Wang wrote: >>> On Mon, Apr 19, 2010 at 11:53:06PM +0200, Jan Kiszka wrote: >>>> We can't pull in linux/sched.h, so just declare the struct. >>>> >>> Did you meet any build error? If yes, please include it. >> >> What does this patch fix, aside from being a bit cleaner? > > CC arch/um/sys-i386/elfcore.o >In file included from /data/linux-2.6/include/linux/elf.h:8, > from /data/linux-2.6/arch/um/sys-i386/elfcore.c:2: >/data/linux-2.6/arch/um/sys-i386/asm/elf.h:78: warning: 'struct task_struct' declared inside parameter list >/data/linux-2.6/arch/um/sys-i386/asm/elf.h:78: warning: its scope is only this definition or declaration, which is probably not what you want > >I guess not many people build against i386 hosts anymore, so this >remained widely unnoticed. > >> >> If it built before, without having a task_struct declaration, I think >> that means that the elf_core_copy_fpregs was never used. The >> task_struct * in the declaration would become a private task_struct, >> known only to the declaration. If the implementation or callers have >> the regular task_struct, it will be a different one, and the >> prototypes will conflict due to the different types of the first >> parameter. > >This is just a forward declaration (that many arch elf header include), >so no such problem exists. > >BTW, to answer the other question in this thread: We have a circular >dependency that prevents including sched.h. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is the right reason to do this. Ok then, thanks. But it looks like x86_64 needs this too. BTW, I don't think compile warning fixes are trivial enough to go to trivial(a)kernel.org. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Jiri Kosina on 21 Apr 2010 05:40 On Wed, 21 Apr 2010, Amerigo Wang wrote: > > CC arch/um/sys-i386/elfcore.o > >In file included from /data/linux-2.6/include/linux/elf.h:8, > > from /data/linux-2.6/arch/um/sys-i386/elfcore.c:2: > >/data/linux-2.6/arch/um/sys-i386/asm/elf.h:78: warning: 'struct task_struct' declared inside parameter list > >/data/linux-2.6/arch/um/sys-i386/asm/elf.h:78: warning: its scope is only this definition or declaration, which is probably not what you want > > > >I guess not many people build against i386 hosts anymore, so this > >remained widely unnoticed. > > > >> > >> If it built before, without having a task_struct declaration, I think > >> that means that the elf_core_copy_fpregs was never used. The > >> task_struct * in the declaration would become a private task_struct, > >> known only to the declaration. If the implementation or callers have > >> the regular task_struct, it will be a different one, and the > >> prototypes will conflict due to the different types of the first > >> parameter. > > > >This is just a forward declaration (that many arch elf header include), > >so no such problem exists. > > > >BTW, to answer the other question in this thread: We have a circular > >dependency that prevents including sched.h. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > This is the right reason to do this. Ok then, thanks. > > But it looks like x86_64 needs this too. > > > BTW, I don't think compile warning fixes are trivial enough to go > to trivial(a)kernel.org. Why? -- Jiri Kosina SUSE Labs, Novell Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Amerigo Wang on 21 Apr 2010 06:50 On Wed, Apr 21, 2010 at 11:38:53AM +0200, Jiri Kosina wrote: >On Wed, 21 Apr 2010, Amerigo Wang wrote: >> >> BTW, I don't think compile warning fixes are trivial enough to go >> to trivial(a)kernel.org. > >Why? > Usually compile warnings fixes go into -mm, some coding style fixes too. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|
Next
|
Last
Pages: 1 2 Prev: [PATCH 2/2] ehea: fix possible DLPAR/mem deadlock Next: uml: i386: Avoid redefinition of NR_syscalls |