From nobody Fri Jul 10 12:56:58 2026 Received: from out0-198.mail.aliyun.com (out0-198.mail.aliyun.com [140.205.0.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF46513BAC2 for ; Mon, 27 May 2024 13:40:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.198 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716817251; cv=none; b=StR/bDcBuRedcvxM2FDGQb4rvj4cc7/rpUMcLLn6HBDyKcIYBZnZ6Sqr9OnNogcTNzvVxs20acsCbcXBgbdQvd2U0mXsSAtlwzevTQohqyI4225GRka99fzMdsoUo/91ssyu0Vof0eNiSM7US9OGfTfZXtHzOvEZuW7cS8Moc7k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716817251; c=relaxed/simple; bh=QKpX0bSGLsdAjVTG0scQJ+FLSyArjYLDTHJbZunjSH0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ILQaTyOtjfKxXgseSADtWy2bVm/iH6437QavbTnCUieqZtWAEkIKxIInJtTjZGN7ya3XZmw0/nzHP+ljhtnFg5leWhy9HqK1B+WiischNAngCNHleZqXRrXwQR7DIkKqboLYCN7MYml1T3lEUzYZyxE0vbiafhz3rBV1gataTo8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=0PU3lNHz; arc=none smtp.client-ip=140.205.0.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="0PU3lNHz" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1716817238; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=98TUkS0b+gRj1ZLjZVnojSNV/GxHrgmcGS9QODi+eTo=; b=0PU3lNHzuYsVyQkGbjR2E9UsdBnYcy103Qnc0YVkbacLCQavUKKRhad6WbQ0K2b+YcE3hP1W+vVn6nHw84+DEbFY5m5ACqQd1OS6avG1AIdxmkdrZIqqWZfkbdKGvkPKoOP930xfUqghDO56vysxvFzHOWV1ZSbr9kvFCdCzPmw= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033070043001;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.XofsrHJ_1716817237; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.XofsrHJ_1716817237) by smtp.aliyun-inc.com; Mon, 27 May 2024 21:40:37 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH 1/2] um: Remove unused ncpus variable Date: Mon, 27 May 2024 21:40:23 +0800 Message-Id: <20240527134024.1539848-2-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240527134024.1539848-1-tiwei.btw@antgroup.com> References: <20240527134024.1539848-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" It's no longer used. And uml_ncpus_setup doesn't exist anymore. Signed-off-by: Tiwei Bie --- arch/um/include/shared/kern_util.h | 1 - arch/um/kernel/um_arch.c | 3 --- 2 files changed, 4 deletions(-) diff --git a/arch/um/include/shared/kern_util.h b/arch/um/include/shared/ke= rn_util.h index 95521b1f5b20..d8ffd2db168e 100644 --- a/arch/um/include/shared/kern_util.h +++ b/arch/um/include/shared/kern_util.h @@ -13,7 +13,6 @@ struct siginfo; =20 extern int uml_exitcode; =20 -extern int ncpus; extern int kmalloc_ok; =20 #define UML_ROUND_UP(addr) \ diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index e95f805e5004..8e594cda6d77 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c @@ -126,9 +126,6 @@ unsigned long uml_reserved; /* Also modified in mem_ini= t */ unsigned long start_vm; unsigned long end_vm; =20 -/* Set in uml_ncpus_setup */ -int ncpus =3D 1; - /* Set in early boot */ static int have_root __initdata; static int have_console __initdata; --=20 2.34.1 From nobody Fri Jul 10 12:56:58 2026 Received: from out187-21.us.a.mail.aliyun.com (out187-21.us.a.mail.aliyun.com [47.90.187.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E3EA15F402 for ; Mon, 27 May 2024 13:40:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=47.90.187.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716817259; cv=none; b=KjIxbJ7QFVFPDVmBRqShSdknzTRUtdXFAzPZkDakOPYydUbII8txA0AG5zpIyZfdMUHEgXPq6pG66Fg5Qi5Ct6oVhwJ4TRxzI7uMZ5PV6ZeH15uJpHouikxkCNcH72Telj08t2e9cumzhf7R7TUXJ+XWhjW0PT5ZITJwXUxaLHA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716817259; c=relaxed/simple; bh=BBlh1DPns5C2oAF8vnyB3bE/HFKCbRe/Qz+OCUEIZe4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ealgT3l5RLvv/DjHlNB6WH5g+LmLmB0BM3gmRh4Ao6rsL6B7zAuYRUb+HCZGUE+7LLilChpMvVPBZdEtbFJQNRzJtTwHufmexMe5mYJnVonIsjY3QCEOouE2wUqMo1I2pE6uClIjWiK4AR1s6FLUIVtD47tv05OLbM1tlK6NFmA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=E+YWuJqJ; arc=none smtp.client-ip=47.90.187.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="E+YWuJqJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1716817239; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=aPhgJtNbevvD4n484o242Ca+ulgY/TKUr1VEB8WBEMY=; b=E+YWuJqJOgnlDsb5yAqrhFikW4MPZtR/A5qpE4Ns+YZ2jeMjMqrbsVJEhfSqGBO0ppb0lvPmxTk79Celpw9sy+gbIn68i0ccBrbO0uAwmIL59d4YeWfZhtrN+ji/nB1bBFB8gqoyZhj7j+4un+rFHxLMbeJQ+ok85w/0YaMmhJY= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033070021168;MF=tiwei.btw@antgroup.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---.XofsrHN_1716817238; Received: from ubuntu..(mailfrom:tiwei.btw@antgroup.com fp:SMTPD_---.XofsrHN_1716817238) by smtp.aliyun-inc.com; Mon, 27 May 2024 21:40:38 +0800 From: "Tiwei Bie" To: richard@nod.at, anton.ivanov@cambridgegreys.com, johannes@sipsolutions.net Cc: , , "Tiwei Bie" Subject: [PATCH 2/2] um: Remove /proc/sysemu support code Date: Mon, 27 May 2024 21:40:24 +0800 Message-Id: <20240527134024.1539848-3-tiwei.btw@antgroup.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240527134024.1539848-1-tiwei.btw@antgroup.com> References: <20240527134024.1539848-1-tiwei.btw@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Currently /proc/sysemu will never be registered, as sysemu_supported is initialized to zero implicitly and no code updates it. And there is also nothing to configure via sysemu in UML anymore. Signed-off-by: Tiwei Bie --- arch/um/kernel/process.c | 67 ---------------------------------------- 1 file changed, 67 deletions(-) diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index d2134802f6a8..79f41f06a98f 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c @@ -237,73 +237,6 @@ int copy_from_user_proc(void *to, void __user *from, i= nt size) return copy_from_user(to, from, size); } =20 -static atomic_t using_sysemu =3D ATOMIC_INIT(0); -int sysemu_supported; - -static void set_using_sysemu(int value) -{ - if (value > sysemu_supported) - return; - atomic_set(&using_sysemu, value); -} - -static int get_using_sysemu(void) -{ - return atomic_read(&using_sysemu); -} - -static int sysemu_proc_show(struct seq_file *m, void *v) -{ - seq_printf(m, "%d\n", get_using_sysemu()); - return 0; -} - -static int sysemu_proc_open(struct inode *inode, struct file *file) -{ - return single_open(file, sysemu_proc_show, NULL); -} - -static ssize_t sysemu_proc_write(struct file *file, const char __user *buf, - size_t count, loff_t *pos) -{ - char tmp[2]; - - if (copy_from_user(tmp, buf, 1)) - return -EFAULT; - - if (tmp[0] >=3D '0' && tmp[0] <=3D '2') - set_using_sysemu(tmp[0] - '0'); - /* We use the first char, but pretend to write everything */ - return count; -} - -static const struct proc_ops sysemu_proc_ops =3D { - .proc_open =3D sysemu_proc_open, - .proc_read =3D seq_read, - .proc_lseek =3D seq_lseek, - .proc_release =3D single_release, - .proc_write =3D sysemu_proc_write, -}; - -static int __init make_proc_sysemu(void) -{ - struct proc_dir_entry *ent; - if (!sysemu_supported) - return 0; - - ent =3D proc_create("sysemu", 0600, NULL, &sysemu_proc_ops); - - if (ent =3D=3D NULL) - { - printk(KERN_WARNING "Failed to register /proc/sysemu\n"); - return 0; - } - - return 0; -} - -late_initcall(make_proc_sysemu); - int singlestepping(void) { return test_thread_flag(TIF_SINGLESTEP); --=20 2.34.1