On 02/05/2025 09:31, Tiwei Bie wrote:
Most of the drivers are stored in drivers/, with only two drivers
kept in os-Linux/drivers/. Merge os-Linux/drivers/ into drivers/
to simplify and unify the code organization.

Signed-off-by: Tiwei Bie <tiwei....@antgroup.com>
---
  arch/um/drivers/Makefile                       |  4 ++++
  arch/um/{os-Linux => }/drivers/etap.h          |  0
  arch/um/{os-Linux => }/drivers/ethertap_kern.c |  0
  arch/um/{os-Linux => }/drivers/ethertap_user.c |  0
  arch/um/{os-Linux => }/drivers/tuntap.h        |  0
  arch/um/{os-Linux => }/drivers/tuntap_kern.c   |  0
  arch/um/{os-Linux => }/drivers/tuntap_user.c   |  0
  arch/um/os-Linux/Makefile                      |  2 +-
  arch/um/os-Linux/drivers/Makefile              | 13 -------------
  9 files changed, 5 insertions(+), 14 deletions(-)
  rename arch/um/{os-Linux => }/drivers/etap.h (100%)
  rename arch/um/{os-Linux => }/drivers/ethertap_kern.c (100%)
  rename arch/um/{os-Linux => }/drivers/ethertap_user.c (100%)
  rename arch/um/{os-Linux => }/drivers/tuntap.h (100%)
  rename arch/um/{os-Linux => }/drivers/tuntap_kern.c (100%)
  rename arch/um/{os-Linux => }/drivers/tuntap_user.c (100%)
  delete mode 100644 arch/um/os-Linux/drivers/Makefile

diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile
index 0a5820343ad3..4180a59df929 100644
--- a/arch/um/drivers/Makefile
+++ b/arch/um/drivers/Makefile
@@ -6,6 +6,8 @@
  # pcap is broken in 2.5 because kbuild doesn't allow pcap.a to be linked
  # in to pcap.o
+ethertap-objs := ethertap_kern.o ethertap_user.o
+tuntap-objs := tuntap_kern.o tuntap_user.o
  slip-objs := slip_kern.o slip_user.o
  slirp-objs := slirp_kern.o slirp_user.o
  daemon-objs := daemon_kern.o daemon_user.o
@@ -38,6 +40,8 @@ obj-y := stdio_console.o fd.o chan_kern.o chan_user.o line.o
  obj-$(CONFIG_SSL) += ssl.o
  obj-$(CONFIG_STDERR_CONSOLE) += stderr_console.o
+obj-$(CONFIG_UML_NET_ETHERTAP) += ethertap.o
+obj-$(CONFIG_UML_NET_TUNTAP) += tuntap.o
  obj-$(CONFIG_UML_NET_SLIP) += slip.o slip_common.o
  obj-$(CONFIG_UML_NET_SLIRP) += slirp.o slip_common.o
  obj-$(CONFIG_UML_NET_DAEMON) += daemon.o
diff --git a/arch/um/os-Linux/drivers/etap.h b/arch/um/drivers/etap.h
similarity index 100%
rename from arch/um/os-Linux/drivers/etap.h
rename to arch/um/drivers/etap.h
diff --git a/arch/um/os-Linux/drivers/ethertap_kern.c 
b/arch/um/drivers/ethertap_kern.c
similarity index 100%
rename from arch/um/os-Linux/drivers/ethertap_kern.c
rename to arch/um/drivers/ethertap_kern.c
diff --git a/arch/um/os-Linux/drivers/ethertap_user.c 
b/arch/um/drivers/ethertap_user.c
similarity index 100%
rename from arch/um/os-Linux/drivers/ethertap_user.c
rename to arch/um/drivers/ethertap_user.c
diff --git a/arch/um/os-Linux/drivers/tuntap.h b/arch/um/drivers/tuntap.h
similarity index 100%
rename from arch/um/os-Linux/drivers/tuntap.h
rename to arch/um/drivers/tuntap.h
diff --git a/arch/um/os-Linux/drivers/tuntap_kern.c 
b/arch/um/drivers/tuntap_kern.c
similarity index 100%
rename from arch/um/os-Linux/drivers/tuntap_kern.c
rename to arch/um/drivers/tuntap_kern.c
diff --git a/arch/um/os-Linux/drivers/tuntap_user.c 
b/arch/um/drivers/tuntap_user.c
similarity index 100%
rename from arch/um/os-Linux/drivers/tuntap_user.c
rename to arch/um/drivers/tuntap_user.c
diff --git a/arch/um/os-Linux/Makefile b/arch/um/os-Linux/Makefile
index 049dfa5bc9c6..fae836713487 100644
--- a/arch/um/os-Linux/Makefile
+++ b/arch/um/os-Linux/Makefile
@@ -8,7 +8,7 @@ KCOV_INSTRUMENT                := n
obj-y = execvp.o file.o helper.o irq.o main.o mem.o process.o \
        registers.o sigio.o signal.o start_up.o time.o tty.o \
-       umid.o user_syms.o util.o drivers/ skas/
+       umid.o user_syms.o util.o skas/
CFLAGS_signal.o += -Wframe-larger-than=4096 diff --git a/arch/um/os-Linux/drivers/Makefile b/arch/um/os-Linux/drivers/Makefile
deleted file mode 100644
index cf2d75bb1884..000000000000
--- a/arch/um/os-Linux/drivers/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# Copyright (C) 2000, 2002 Jeff Dike (jd...@karaya.com)
-#
-
-ethertap-objs := ethertap_kern.o ethertap_user.o
-tuntap-objs := tuntap_kern.o tuntap_user.o
-
-obj-y =
-obj-$(CONFIG_UML_NET_ETHERTAP) += ethertap.o
-obj-$(CONFIG_UML_NET_TUNTAP) += tuntap.o
-
-include $(srctree)/arch/um/scripts/Makefile.rules

They are both marked as obsolete since 5.6.

40814b98a57089463eb4be09c72205f551481f39 2019-12-10 22:34:03
um: Mark non-vector net transports as obsolete

We should probably consider removing them.

--
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/


Reply via email to