* [PATCH] LoongArch: Remove posix_types.h include from sigcontext.h
@ 2024-08-28 3:14 Xi Ruoyao
2024-08-28 4:11 ` Huacai Chen
0 siblings, 1 reply; 5+ messages in thread
From: Xi Ruoyao @ 2024-08-28 3:14 UTC (permalink / raw)
To: Huacai Chen, WANG Xuerui; +Cc: loongarch, linux-kernel, Xi Ruoyao
Nothing in sigcontext.h seems to require anything from
linux/posix_types.h. This include seems a MIPS relic originated from
an error in Linux 2.6.11-rc2 (in 2005).
The unneeded include was found debugging some vDSO self test build
failure (it's not the root cause though).
Link: https://lore.kernel.org/linux-mips/20240828030413.143930-2-xry111@xry111.site/
Link: https://lore.kernel.org/loongarch/0b540679ec8cfccec75aeb3463810924f6ff71e6.camel@xry111.site/
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
---
arch/loongarch/include/uapi/asm/sigcontext.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/loongarch/include/uapi/asm/sigcontext.h b/arch/loongarch/include/uapi/asm/sigcontext.h
index 6c22f616b8f1..5cd121275bac 100644
--- a/arch/loongarch/include/uapi/asm/sigcontext.h
+++ b/arch/loongarch/include/uapi/asm/sigcontext.h
@@ -9,7 +9,6 @@
#define _UAPI_ASM_SIGCONTEXT_H
#include <linux/types.h>
-#include <linux/posix_types.h>
/* FP context was used */
#define SC_USED_FP (1 << 0)
--
2.46.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] LoongArch: Remove posix_types.h include from sigcontext.h
2024-08-28 3:14 [PATCH] LoongArch: Remove posix_types.h include from sigcontext.h Xi Ruoyao
@ 2024-08-28 4:11 ` Huacai Chen
2024-08-28 4:27 ` Xi Ruoyao
0 siblings, 1 reply; 5+ messages in thread
From: Huacai Chen @ 2024-08-28 4:11 UTC (permalink / raw)
To: Xi Ruoyao; +Cc: WANG Xuerui, loongarch, linux-kernel
Hi, Ruoyao,
Just some questions:
1, Changing UAPI is not a good idea.
2. In another thread you said that "paper over" is not enough for some cases.
3. include/uapi/linux/types.h still include linux/posix_types.h, why
your "paper over" works?
Huacai
On Wed, Aug 28, 2024 at 11:14 AM Xi Ruoyao <xry111@xry111.site> wrote:
>
> Nothing in sigcontext.h seems to require anything from
> linux/posix_types.h. This include seems a MIPS relic originated from
> an error in Linux 2.6.11-rc2 (in 2005).
>
> The unneeded include was found debugging some vDSO self test build
> failure (it's not the root cause though).
>
> Link: https://lore.kernel.org/linux-mips/20240828030413.143930-2-xry111@xry111.site/
> Link: https://lore.kernel.org/loongarch/0b540679ec8cfccec75aeb3463810924f6ff71e6.camel@xry111.site/
> Signed-off-by: Xi Ruoyao <xry111@xry111.site>
> ---
> arch/loongarch/include/uapi/asm/sigcontext.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/loongarch/include/uapi/asm/sigcontext.h b/arch/loongarch/include/uapi/asm/sigcontext.h
> index 6c22f616b8f1..5cd121275bac 100644
> --- a/arch/loongarch/include/uapi/asm/sigcontext.h
> +++ b/arch/loongarch/include/uapi/asm/sigcontext.h
> @@ -9,7 +9,6 @@
> #define _UAPI_ASM_SIGCONTEXT_H
>
> #include <linux/types.h>
> -#include <linux/posix_types.h>
>
> /* FP context was used */
> #define SC_USED_FP (1 << 0)
> --
> 2.46.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] LoongArch: Remove posix_types.h include from sigcontext.h
2024-08-28 4:11 ` Huacai Chen
@ 2024-08-28 4:27 ` Xi Ruoyao
2024-08-28 4:43 ` Huacai Chen
0 siblings, 1 reply; 5+ messages in thread
From: Xi Ruoyao @ 2024-08-28 4:27 UTC (permalink / raw)
To: Huacai Chen; +Cc: WANG Xuerui, loongarch, linux-kernel
On Wed, 2024-08-28 at 12:11 +0800, Huacai Chen wrote:
> Hi, Ruoyao,
>
> Just some questions:
> 1, Changing UAPI is not a good idea.
But removing unneeded includes from UAPI is fine. For example, the
commit 44e0b165b6c078b84767da4ba06ffa27af562c96 has removed
linux/posix_types.h from termbits.h for all ports.
> 2. In another thread you said that "paper over" is not enough for some
> cases.
> 3. include/uapi/linux/types.h still include linux/posix_types.h, why
> your "paper over" works?
Well maybe it does not work (I've not seriously tested as it's just a
paper over). But removing unneeded include is correct on its own
anyway. And ...
> > The unneeded include was found debugging some vDSO self test build
> > failure (it's not the root cause though).
So it's just "found" debugging the issue. Maybe I should change "it's
not the root cause" to "it's not really related to that issue"?
>
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] LoongArch: Remove posix_types.h include from sigcontext.h
2024-08-28 4:27 ` Xi Ruoyao
@ 2024-08-28 4:43 ` Huacai Chen
2024-08-29 7:30 ` Xi Ruoyao
0 siblings, 1 reply; 5+ messages in thread
From: Huacai Chen @ 2024-08-28 4:43 UTC (permalink / raw)
To: Xi Ruoyao; +Cc: WANG Xuerui, loongarch, linux-kernel
On Wed, Aug 28, 2024 at 12:27 PM Xi Ruoyao <xry111@xry111.site> wrote:
>
> On Wed, 2024-08-28 at 12:11 +0800, Huacai Chen wrote:
> > Hi, Ruoyao,
> >
> > Just some questions:
> > 1, Changing UAPI is not a good idea.
>
> But removing unneeded includes from UAPI is fine. For example, the
> commit 44e0b165b6c078b84767da4ba06ffa27af562c96 has removed
> linux/posix_types.h from termbits.h for all ports.
Need more tests, not just kselftests.
Huacai
>
> > 2. In another thread you said that "paper over" is not enough for some
> > cases.
> > 3. include/uapi/linux/types.h still include linux/posix_types.h, why
> > your "paper over" works?
>
> Well maybe it does not work (I've not seriously tested as it's just a
> paper over). But removing unneeded include is correct on its own
> anyway. And ...
>
> > > The unneeded include was found debugging some vDSO self test build
> > > failure (it's not the root cause though).
>
> So it's just "found" debugging the issue. Maybe I should change "it's
> not the root cause" to "it's not really related to that issue"?
> >
>
> --
> Xi Ruoyao <xry111@xry111.site>
> School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] LoongArch: Remove posix_types.h include from sigcontext.h
2024-08-28 4:43 ` Huacai Chen
@ 2024-08-29 7:30 ` Xi Ruoyao
0 siblings, 0 replies; 5+ messages in thread
From: Xi Ruoyao @ 2024-08-29 7:30 UTC (permalink / raw)
To: Huacai Chen; +Cc: WANG Xuerui, loongarch, linux-kernel
On Wed, 2024-08-28 at 12:43 +0800, Huacai Chen wrote:
> On Wed, Aug 28, 2024 at 12:27 PM Xi Ruoyao <xry111@xry111.site> wrote:
> >
> > On Wed, 2024-08-28 at 12:11 +0800, Huacai Chen wrote:
> > > Hi, Ruoyao,
> > >
> > > Just some questions:
> > > 1, Changing UAPI is not a good idea.
> >
> > But removing unneeded includes from UAPI is fine. For example, the
> > commit 44e0b165b6c078b84767da4ba06ffa27af562c96 has removed
> > linux/posix_types.h from termbits.h for all ports.
> Need more tests, not just kselftests.
I've built and tested Glibc with this change. But if you want a full
system rebuild it won't happen in the next few months, and I can resend
the patch after the next time I rebuild the system.
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-29 7:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-28 3:14 [PATCH] LoongArch: Remove posix_types.h include from sigcontext.h Xi Ruoyao
2024-08-28 4:11 ` Huacai Chen
2024-08-28 4:27 ` Xi Ruoyao
2024-08-28 4:43 ` Huacai Chen
2024-08-29 7:30 ` Xi Ruoyao
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®