2017-06-12 17:14:45

by Jérémy Lefaure

[permalink] [raw]
Subject: [PATCH 1/2] arm: nommu: remove unused KTHREAD_SIZE definition

I didn't find any use of this macro in the current kernel tree (with git
grep). KTHREAD_SIZE is no longer used for a very very long time. So
let's remove this definition.

Signed-off-by: Jérémy Lefaure <[email protected]>
---
arch/arm/include/asm/page-nommu.h | 6 ------
1 file changed, 6 deletions(-)

diff --git a/arch/arm/include/asm/page-nommu.h b/arch/arm/include/asm/page-nommu.h
index 503f488053de..8f2c47bec375 100644
--- a/arch/arm/include/asm/page-nommu.h
+++ b/arch/arm/include/asm/page-nommu.h
@@ -11,12 +11,6 @@
#ifndef _ASMARM_PAGE_NOMMU_H
#define _ASMARM_PAGE_NOMMU_H

-#if !defined(CONFIG_SMALL_TASKS) && PAGE_SHIFT < 13
-#define KTHREAD_SIZE (8192)
-#else
-#define KTHREAD_SIZE PAGE_SIZE
-#endif
-
#define clear_page(page) memset((page), 0, PAGE_SIZE)
#define copy_page(to,from) memcpy((to), (from), PAGE_SIZE)

--
2.13.1


2017-06-12 17:14:55

by Jérémy Lefaure

[permalink] [raw]
Subject: [PATCH 2/2] c6x: remove unused KTHREAD_SIZE definition

KTHREAD_SIZE has never been used since it has been defined for c6x arch.
Let's remove this useless definition.

Signed-off-by: Jérémy Lefaure <[email protected]>
---
arch/c6x/kernel/asm-offsets.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/c6x/kernel/asm-offsets.c b/arch/c6x/kernel/asm-offsets.c
index 60f1e437745d..f8ededbfb63f 100644
--- a/arch/c6x/kernel/asm-offsets.c
+++ b/arch/c6x/kernel/asm-offsets.c
@@ -106,7 +106,6 @@ void foo(void)
/* These would be unneccessary if we ran asm files
* through the preprocessor.
*/
- DEFINE(KTHREAD_SIZE, THREAD_SIZE);
DEFINE(KTHREAD_SHIFT, THREAD_SHIFT);
DEFINE(KTHREAD_START_SP, THREAD_START_SP);
DEFINE(ENOSYS_, ENOSYS);
--
2.13.1

2017-06-13 07:37:30

by Vladimir Murzin

[permalink] [raw]
Subject: Re: [PATCH 1/2] arm: nommu: remove unused KTHREAD_SIZE definition

On 12/06/17 18:09, Jérémy Lefaure wrote:
> I didn't find any use of this macro in the current kernel tree (with git
> grep). KTHREAD_SIZE is no longer used for a very very long time. So
> let's remove this definition.
>
> Signed-off-by: Jérémy Lefaure <[email protected]>
> ---
> arch/arm/include/asm/page-nommu.h | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/arch/arm/include/asm/page-nommu.h b/arch/arm/include/asm/page-nommu.h
> index 503f488053de..8f2c47bec375 100644
> --- a/arch/arm/include/asm/page-nommu.h
> +++ b/arch/arm/include/asm/page-nommu.h
> @@ -11,12 +11,6 @@
> #ifndef _ASMARM_PAGE_NOMMU_H
> #define _ASMARM_PAGE_NOMMU_H
>
> -#if !defined(CONFIG_SMALL_TASKS) && PAGE_SHIFT < 13
> -#define KTHREAD_SIZE (8192)
> -#else
> -#define KTHREAD_SIZE PAGE_SIZE
> -#endif
> -
> #define clear_page(page) memset((page), 0, PAGE_SIZE)
> #define copy_page(to,from) memcpy((to), (from), PAGE_SIZE)
>
>

Even more, CONFIG_SMALL_TASKS has gone and only page size we support is 4K.

It looks like that similar patch has been submitted several times by different
people but never got merged, so if it helps:

Reviewed-by: Vladimir Murzin <[email protected]>

Cheers
Vladimir

2017-06-15 20:53:51

by Mark Salter

[permalink] [raw]
Subject: Re: [PATCH 2/2] c6x: remove unused KTHREAD_SIZE definition

On Mon, 2017-06-12 at 13:09 -0400, Jérémy Lefaure wrote:
> KTHREAD_SIZE has never been used since it has been defined for c6x arch.
> Let's remove this useless definition.
>
> Signed-off-by: Jérémy Lefaure <[email protected]>
> ---
>  arch/c6x/kernel/asm-offsets.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/c6x/kernel/asm-offsets.c b/arch/c6x/kernel/asm-offsets.c
> index 60f1e437745d..f8ededbfb63f 100644
> --- a/arch/c6x/kernel/asm-offsets.c
> +++ b/arch/c6x/kernel/asm-offsets.c
> @@ -106,7 +106,6 @@ void foo(void)
>   /* These would be unneccessary if we ran asm files
>    * through the preprocessor.
>    */
> - DEFINE(KTHREAD_SIZE, THREAD_SIZE);
>   DEFINE(KTHREAD_SHIFT, THREAD_SHIFT);
>   DEFINE(KTHREAD_START_SP, THREAD_START_SP);
>   DEFINE(ENOSYS_, ENOSYS);

Acked-by: Mark Salter <[email protected]>