* [PATCH 0/4] um: Minor fixes and cleanups
@ 2025-07-08 9:03 Tiwei Bie
2025-07-08 9:04 ` [PATCH 1/4] um: Make unscheduled_userspace_iterations static Tiwei Bie
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Tiwei Bie @ 2025-07-08 9:03 UTC (permalink / raw)
To: richard, anton.ivanov, johannes; +Cc: linux-um, tiwei.btw, tiwei.bie
From: Tiwei Bie <tiwei.btw@antgroup.com>
Tiwei Bie (4):
um: Make unscheduled_userspace_iterations static
um: Make mm_list and mm_list_lock static
um: Avoid redefining ARCH_HAS_CACHE_LINE_SIZE
um: rtc: Avoid shadowing err in uml_rtc_start()
arch/um/Kconfig | 4 +---
arch/um/drivers/rtc_user.c | 2 +-
arch/um/kernel/skas/mmu.c | 4 ++--
arch/um/os-Linux/skas/process.c | 2 +-
4 files changed, 5 insertions(+), 7 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] um: Make unscheduled_userspace_iterations static
2025-07-08 9:03 [PATCH 0/4] um: Minor fixes and cleanups Tiwei Bie
@ 2025-07-08 9:04 ` Tiwei Bie
2025-07-08 9:04 ` [PATCH 2/4] um: Make mm_list and mm_list_lock static Tiwei Bie
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Tiwei Bie @ 2025-07-08 9:04 UTC (permalink / raw)
To: richard, anton.ivanov, johannes; +Cc: linux-um, tiwei.btw, tiwei.bie
From: Tiwei Bie <tiwei.btw@antgroup.com>
It's only used within process.c. Make it static.
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
arch/um/os-Linux/skas/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index e42ffac23e3c..d3dd4fb559cf 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -548,7 +548,7 @@ int start_userspace(struct mm_id *mm_id)
return err;
}
-int unscheduled_userspace_iterations;
+static int unscheduled_userspace_iterations;
extern unsigned long tt_extra_sched_jiffies;
void userspace(struct uml_pt_regs *regs)
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/4] um: Make mm_list and mm_list_lock static
2025-07-08 9:03 [PATCH 0/4] um: Minor fixes and cleanups Tiwei Bie
2025-07-08 9:04 ` [PATCH 1/4] um: Make unscheduled_userspace_iterations static Tiwei Bie
@ 2025-07-08 9:04 ` Tiwei Bie
2025-07-08 9:04 ` [PATCH 3/4] um: Avoid redefining ARCH_HAS_CACHE_LINE_SIZE Tiwei Bie
2025-07-08 9:04 ` [PATCH 4/4] um: rtc: Avoid shadowing err in uml_rtc_start() Tiwei Bie
3 siblings, 0 replies; 5+ messages in thread
From: Tiwei Bie @ 2025-07-08 9:04 UTC (permalink / raw)
To: richard, anton.ivanov, johannes; +Cc: linux-um, tiwei.btw, tiwei.bie
From: Tiwei Bie <tiwei.btw@antgroup.com>
They are only used within mmu.c. Make them static.
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
arch/um/kernel/skas/mmu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c
index 849fafa4b54f..afe9a2f251ef 100644
--- a/arch/um/kernel/skas/mmu.c
+++ b/arch/um/kernel/skas/mmu.c
@@ -20,8 +20,8 @@
/* Ensure the stub_data struct covers the allocated area */
static_assert(sizeof(struct stub_data) == STUB_DATA_PAGES * UM_KERN_PAGE_SIZE);
-spinlock_t mm_list_lock;
-struct list_head mm_list;
+static spinlock_t mm_list_lock;
+static struct list_head mm_list;
int init_new_context(struct task_struct *task, struct mm_struct *mm)
{
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] um: Avoid redefining ARCH_HAS_CACHE_LINE_SIZE
2025-07-08 9:03 [PATCH 0/4] um: Minor fixes and cleanups Tiwei Bie
2025-07-08 9:04 ` [PATCH 1/4] um: Make unscheduled_userspace_iterations static Tiwei Bie
2025-07-08 9:04 ` [PATCH 2/4] um: Make mm_list and mm_list_lock static Tiwei Bie
@ 2025-07-08 9:04 ` Tiwei Bie
2025-07-08 9:04 ` [PATCH 4/4] um: rtc: Avoid shadowing err in uml_rtc_start() Tiwei Bie
3 siblings, 0 replies; 5+ messages in thread
From: Tiwei Bie @ 2025-07-08 9:04 UTC (permalink / raw)
To: richard, anton.ivanov, johannes; +Cc: linux-um, tiwei.btw, tiwei.bie
From: Tiwei Bie <tiwei.btw@antgroup.com>
There is a generic ARCH_HAS_CACHE_LINE_SIZE option introduced by
commit c2280be81de4 ("mm: generalize ARCH_HAS_CACHE_LINE_SIZE")
in mm/Kconfig. Select that instead.
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
arch/um/Kconfig | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index c2d2d2d99bbe..9083bfdb7735 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -6,6 +6,7 @@ config UML
bool
default y
select ARCH_WANTS_DYNAMIC_TASK_STRUCT
+ select ARCH_HAS_CACHE_LINE_SIZE
select ARCH_HAS_CPU_FINALIZE_INIT
select ARCH_HAS_FORTIFY_SOURCE
select ARCH_HAS_GCOV_PROFILE_ALL
@@ -83,9 +84,6 @@ config NR_CPUS
range 1 1
default 1
-config ARCH_HAS_CACHE_LINE_SIZE
- def_bool y
-
source "arch/$(HEADER_ARCH)/um/Kconfig"
config MAY_HAVE_RUNTIME_DEPS
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] um: rtc: Avoid shadowing err in uml_rtc_start()
2025-07-08 9:03 [PATCH 0/4] um: Minor fixes and cleanups Tiwei Bie
` (2 preceding siblings ...)
2025-07-08 9:04 ` [PATCH 3/4] um: Avoid redefining ARCH_HAS_CACHE_LINE_SIZE Tiwei Bie
@ 2025-07-08 9:04 ` Tiwei Bie
3 siblings, 0 replies; 5+ messages in thread
From: Tiwei Bie @ 2025-07-08 9:04 UTC (permalink / raw)
To: richard, anton.ivanov, johannes; +Cc: linux-um, tiwei.btw, tiwei.bie
From: Tiwei Bie <tiwei.btw@antgroup.com>
Remove the declaration of 'err' inside the 'if (timetravel)' block,
as it would otherwise be unavailable outside that block, potentially
leading to uml_rtc_start() returning an uninitialized value.
Fixes: dde8b58d5127 ("um: add a pseudo RTC")
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
---
arch/um/drivers/rtc_user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/um/drivers/rtc_user.c b/arch/um/drivers/rtc_user.c
index 51e79f3148cd..67912fcf7b28 100644
--- a/arch/um/drivers/rtc_user.c
+++ b/arch/um/drivers/rtc_user.c
@@ -28,7 +28,7 @@ int uml_rtc_start(bool timetravel)
int err;
if (timetravel) {
- int err = os_pipe(uml_rtc_irq_fds, 1, 1);
+ err = os_pipe(uml_rtc_irq_fds, 1, 1);
if (err)
goto fail;
} else {
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-07-08 9:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-08 9:03 [PATCH 0/4] um: Minor fixes and cleanups Tiwei Bie
2025-07-08 9:04 ` [PATCH 1/4] um: Make unscheduled_userspace_iterations static Tiwei Bie
2025-07-08 9:04 ` [PATCH 2/4] um: Make mm_list and mm_list_lock static Tiwei Bie
2025-07-08 9:04 ` [PATCH 3/4] um: Avoid redefining ARCH_HAS_CACHE_LINE_SIZE Tiwei Bie
2025-07-08 9:04 ` [PATCH 4/4] um: rtc: Avoid shadowing err in uml_rtc_start() Tiwei Bie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).