diff mbox series

[v2,3/5] mips: remove syscall table entries

Message ID 1542262461-29024-4-git-send-email-firoz.khan@linaro.org
State Superseded
Headers show
Series mips: system call table generation support | expand

Commit Message

Firoz Khan Nov. 15, 2018, 6:14 a.m. UTC
The config flag - CONFIG_MIPS_MT_FPAFF uses to check whether which
syscall entries need to be used in scall32-o32.S file.

One of the patch in this patch series will generate syscall table
file. But CONFIG_MIPS_MT_FPAFF flag will add more complexity in the
script to generate the syscall table file.

In order to come up with a common implementation across all archit-
ecture, we need to remove mipsmt_sys_sched_setaffinity and mipsmt-
_sys_sched_getaffinity from the table and define it in other way.

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>

---
 arch/mips/kernel/scall32-o32.S | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

-- 
1.9.1

Comments

Paul Burton Nov. 19, 2018, 10:29 p.m. UTC | #1
Hi Firoz,

On Thu, Nov 15, 2018 at 11:44:19AM +0530, Firoz Khan wrote:
> diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S

> index a9b895f..4eee437 100644

> --- a/arch/mips/kernel/scall32-o32.S

> +++ b/arch/mips/kernel/scall32-o32.S

> @@ -208,6 +208,18 @@ einval: li	v0, -ENOSYS

>  	jr	ra

>  	END(sys_syscall)

>  

> +#ifdef CONFIG_MIPS_MT_FPAFF

> +	/*

> +	 * For FPU affinity scheduling on MIPS MT processors, we need to

> +	 * intercept sys_sched_xxxaffinity() calls until we get a proper hook

> +	 * in kernel/sched/core.c.  Considered only temporary we only support

> +	 * these hooks for the 32-bit kernel - there is no MIPS64 MT processor

> +	 * atm.

> +	 */

> +#define mipsmt_sys_sched_setaffinity sys_sched_setaffinity

> +#define mipsmt_sys_sched_getaffinity sys_sched_getaffinity


Is this backwards? ie. should it be:

    #define sys_sched_setaffinity mipsmt_sys_sched_setaffinity
    #define sys_sched_getaffinity mipsmt_sys_sched_getaffinity

?

I don't see how the mipsmt_* functions will ever be used after this
patch.

Thanks,
    Paul

> +#endif /* CONFIG_MIPS_MT_FPAFF */

> +

>  	.align	2

>  	.type	sys_call_table, @object

>  EXPORT(sys_call_table)

> @@ -450,20 +462,8 @@ EXPORT(sys_call_table)

>  	PTR	sys_tkill

>  	PTR	sys_sendfile64

>  	PTR	sys_futex

> -#ifdef CONFIG_MIPS_MT_FPAFF

> -	/*

> -	 * For FPU affinity scheduling on MIPS MT processors, we need to

> -	 * intercept sys_sched_xxxaffinity() calls until we get a proper hook

> -	 * in kernel/sched/core.c.  Considered only temporary we only support

> -	 * these hooks for the 32-bit kernel - there is no MIPS64 MT processor

> -	 * atm.

> -	 */

> -	PTR	mipsmt_sys_sched_setaffinity

> -	PTR	mipsmt_sys_sched_getaffinity

> -#else

>  	PTR	sys_sched_setaffinity

>  	PTR	sys_sched_getaffinity		/* 4240 */

> -#endif /* CONFIG_MIPS_MT_FPAFF */

>  	PTR	sys_io_setup

>  	PTR	sys_io_destroy

>  	PTR	sys_io_getevents

> -- 

> 1.9.1

>
Arnd Bergmann Nov. 20, 2018, 10:54 a.m. UTC | #2
On Mon, Nov 19, 2018 at 11:29 PM Paul Burton <paul.burton@mips.com> wrote:
>

> Hi Firoz,

>

> On Thu, Nov 15, 2018 at 11:44:19AM +0530, Firoz Khan wrote:

> > diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S

> > index a9b895f..4eee437 100644

> > --- a/arch/mips/kernel/scall32-o32.S

> > +++ b/arch/mips/kernel/scall32-o32.S

> > @@ -208,6 +208,18 @@ einval: li       v0, -ENOSYS

> >       jr      ra

> >       END(sys_syscall)

> >

> > +#ifdef CONFIG_MIPS_MT_FPAFF

> > +     /*

> > +      * For FPU affinity scheduling on MIPS MT processors, we need to

> > +      * intercept sys_sched_xxxaffinity() calls until we get a proper hook

> > +      * in kernel/sched/core.c.  Considered only temporary we only support

> > +      * these hooks for the 32-bit kernel - there is no MIPS64 MT processor

> > +      * atm.

> > +      */

> > +#define mipsmt_sys_sched_setaffinity sys_sched_setaffinity

> > +#define mipsmt_sys_sched_getaffinity sys_sched_getaffinity

>

> Is this backwards? ie. should it be:

>

>     #define sys_sched_setaffinity mipsmt_sys_sched_setaffinity

>     #define sys_sched_getaffinity mipsmt_sys_sched_getaffinity

>

> ?

>

> I don't see how the mipsmt_* functions will ever be used after this

> patch.


Good catch!

> > -      * atm.

> > -      */

> > -     PTR     mipsmt_sys_sched_setaffinity

> > -     PTR     mipsmt_sys_sched_getaffinity

> > -#else

> >       PTR     sys_sched_setaffinity

> >       PTR     sys_sched_getaffinity           /* 4240 */

> > -#endif /* CONFIG_MIPS_MT_FPAFF */

> >       PTR     sys_io_setup


My guess would be that he removed the wrong lines here instead,
and the first half was intentional.

       Arnd
diff mbox series

Patch

diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index a9b895f..4eee437 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -208,6 +208,18 @@  einval: li	v0, -ENOSYS
 	jr	ra
 	END(sys_syscall)
 
+#ifdef CONFIG_MIPS_MT_FPAFF
+	/*
+	 * For FPU affinity scheduling on MIPS MT processors, we need to
+	 * intercept sys_sched_xxxaffinity() calls until we get a proper hook
+	 * in kernel/sched/core.c.  Considered only temporary we only support
+	 * these hooks for the 32-bit kernel - there is no MIPS64 MT processor
+	 * atm.
+	 */
+#define mipsmt_sys_sched_setaffinity sys_sched_setaffinity
+#define mipsmt_sys_sched_getaffinity sys_sched_getaffinity
+#endif /* CONFIG_MIPS_MT_FPAFF */
+
 	.align	2
 	.type	sys_call_table, @object
 EXPORT(sys_call_table)
@@ -450,20 +462,8 @@  EXPORT(sys_call_table)
 	PTR	sys_tkill
 	PTR	sys_sendfile64
 	PTR	sys_futex
-#ifdef CONFIG_MIPS_MT_FPAFF
-	/*
-	 * For FPU affinity scheduling on MIPS MT processors, we need to
-	 * intercept sys_sched_xxxaffinity() calls until we get a proper hook
-	 * in kernel/sched/core.c.  Considered only temporary we only support
-	 * these hooks for the 32-bit kernel - there is no MIPS64 MT processor
-	 * atm.
-	 */
-	PTR	mipsmt_sys_sched_setaffinity
-	PTR	mipsmt_sys_sched_getaffinity
-#else
 	PTR	sys_sched_setaffinity
 	PTR	sys_sched_getaffinity		/* 4240 */
-#endif /* CONFIG_MIPS_MT_FPAFF */
 	PTR	sys_io_setup
 	PTR	sys_io_destroy
 	PTR	sys_io_getevents