From: Hajime Tazaki <thehajime@gmail.com>
To: benjamin@sipsolutions.net
Cc: linux-um@lists.infradead.org, benjamin.berg@intel.com
Subject: Re: [PATCH] um: move thread info into task
Date: Sat, 09 Nov 2024 10:03:46 +0900 [thread overview]
Message-ID: <m2ses1fcb1.wl-thehajime@gmail.com> (raw)
In-Reply-To: <20241108090826.1898802-1-benjamin@sipsolutions.net>
On Fri, 08 Nov 2024 18:08:26 +0900,
Benjamin Berg wrote:
> diff --git a/arch/um/include/asm/current.h b/arch/um/include/asm/current.h
> new file mode 100644
> index 000000000000..51b9c4d097e7
> --- /dev/null
> +++ b/arch/um/include/asm/current.h
> @@ -0,0 +1,24 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef __ASM_CURRENT_H
> +#define __ASM_CURRENT_H
> +
> +#include <linux/compiler.h>
> +#include <linux/threads.h>
> +
> +#ifndef __ASSEMBLY__
> +
> +struct task_struct;
> +extern struct task_struct * cpu_tasks[NR_CPUS];
might be
extern struct task_struct *cpu_tasks[NR_CPUS];
# no space before the variable.
> +static __always_inline struct task_struct *get_current(void)
> +{
> + return cpu_tasks[0];
> +}
> +
(snip)
> diff --git a/arch/um/include/shared/as-layout.h b/arch/um/include/shared/as-layout.h
> index d9679c911e54..0d3f5d022d24 100644
> --- a/arch/um/include/shared/as-layout.h
> +++ b/arch/um/include/shared/as-layout.h
> @@ -30,11 +30,8 @@
>
> #include <sysdep/ptrace.h>
>
> -struct cpu_task {
> - void *task;
> -};
> -
> -extern struct cpu_task cpu_tasks[];
> +struct task_struct;
> +extern struct task_struct * cpu_tasks[];
ditto.
> extern unsigned long long physmem_size;
>
> diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S
(snip)
> diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
> index 56e7e525fc91..5283035fb655 100644
> --- a/arch/um/kernel/process.c
> +++ b/arch/um/kernel/process.c
> @@ -43,7 +43,8 @@
> * cares about its entry, so it's OK if another processor is modifying its
> * entry.
> */
> -struct cpu_task cpu_tasks[NR_CPUS] = { [0 ... NR_CPUS - 1] = { NULL } };
> +struct task_struct * cpu_tasks[NR_CPUS];
ditto.
The other part is looking good to me.
Reviewed-by: Hajime Tazaki <thehajime@gmail.com>
-- Hajime
next prev parent reply other threads:[~2024-11-09 1:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 9:08 [PATCH] um: move thread info into task Benjamin Berg
2024-11-09 1:03 ` Hajime Tazaki [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-03 15:05 Benjamin Berg
2024-11-04 8:08 ` Hajime Tazaki
2024-11-04 8:17 ` Berg, Benjamin
2024-11-05 1:33 ` Hajime Tazaki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2ses1fcb1.wl-thehajime@gmail.com \
--to=thehajime@gmail.com \
--cc=benjamin.berg@intel.com \
--cc=benjamin@sipsolutions.net \
--cc=linux-um@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.