Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'uml-for-linus-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux

Pull UML updates from Richard Weinberger:

- Drop 32-bit checksum implementation and re-use it from arch/x86

- String function cleanup

- Fixes for -Wmissing-variable-declarations and -Wmissing-prototypes
builds

* tag 'uml-for-linus-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux:
um: virt-pci: fix missing declaration warning
um: Refactor deprecated strncpy to memcpy
um: fix 3 instances of -Wmissing-prototypes
um: port_kern: fix -Wmissing-variable-declarations
uml: audio: fix -Wmissing-variable-declarations
um: vector: refactor deprecated strncpy
um: use obj-y to descend into arch/um/*/
um: Hard-code the result of 'uname -s'
um: Use the x86 checksum implementation on 32-bit
asm-generic: current: Don't include thread-info.h if building asm
um: Remove unsued extern declaration ldt_host_info()
um: Fix hostaudio build errors
um: Remove strlcpy usage

+23 -245
+2
arch/um/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 + 3 + obj-y += kernel/ drivers/ os-Linux/
+2 -7
arch/um/Makefile
··· 18 18 endif 19 19 20 20 ARCH_DIR := arch/um 21 - OS := $(shell uname -s) 22 21 # We require bash because the vmlinux link and loader script cpp use bash 23 22 # features. 24 23 SHELL := /bin/bash 25 - 26 - core-y += $(ARCH_DIR)/kernel/ \ 27 - $(ARCH_DIR)/drivers/ \ 28 - $(ARCH_DIR)/os-$(OS)/ 29 24 30 25 MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/shared/skas 31 26 ··· 73 78 -idirafter $(objtree)/include -D__KERNEL__ -D__UM_HOST__ 74 79 75 80 #This will adjust *FLAGS accordingly to the platform. 76 - include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) 81 + include $(srctree)/$(ARCH_DIR)/Makefile-os-Linux 77 82 78 83 KBUILD_CPPFLAGS += -I$(srctree)/$(HOST_DIR)/include \ 79 84 -I$(srctree)/$(HOST_DIR)/include/uapi \ ··· 150 155 @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ 151 156 -o -name '*.gcov' \) -type f -print | xargs rm -f 152 157 153 - export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS DEV_NULL_PATH 158 + export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING DEV_NULL_PATH
+1
arch/um/configs/i386_defconfig
··· 34 34 CONFIG_XTERM_CHAN=y 35 35 CONFIG_CON_CHAN="pts" 36 36 CONFIG_SSL_CHAN="pts" 37 + CONFIG_SOUND=m 37 38 CONFIG_UML_SOUND=m 38 39 CONFIG_DEVTMPFS=y 39 40 CONFIG_DEVTMPFS_MOUNT=y
+1
arch/um/configs/x86_64_defconfig
··· 32 32 CONFIG_XTERM_CHAN=y 33 33 CONFIG_CON_CHAN="pts" 34 34 CONFIG_SSL_CHAN="pts" 35 + CONFIG_SOUND=m 35 36 CONFIG_UML_SOUND=m 36 37 CONFIG_DEVTMPFS=y 37 38 CONFIG_DEVTMPFS_MOUNT=y
+3 -13
arch/um/drivers/Kconfig
··· 111 111 112 112 config UML_SOUND 113 113 tristate "Sound support" 114 + depends on SOUND 115 + select SOUND_OSS_CORE 114 116 help 115 117 This option enables UML sound support. If enabled, it will pull in 116 - soundcore and the UML hostaudio relay, which acts as a intermediary 118 + the UML hostaudio relay, which acts as a intermediary 117 119 between the host's dsp and mixer devices and the UML sound system. 118 120 It is safe to say 'Y' here. 119 - 120 - config SOUND 121 - tristate 122 - default UML_SOUND 123 - 124 - config SOUND_OSS_CORE 125 - bool 126 - default UML_SOUND 127 - 128 - config HOSTAUDIO 129 - tristate 130 - default UML_SOUND 131 121 132 122 endmenu 133 123
+1 -1
arch/um/drivers/Makefile
··· 54 54 obj-$(CONFIG_MCONSOLE) += mconsole.o 55 55 obj-$(CONFIG_MMAPPER) += mmapper_kern.o 56 56 obj-$(CONFIG_BLK_DEV_UBD) += ubd.o 57 - obj-$(CONFIG_HOSTAUDIO) += hostaudio.o 57 + obj-$(CONFIG_UML_SOUND) += hostaudio.o 58 58 obj-$(CONFIG_NULL_CHAN) += null.o 59 59 obj-$(CONFIG_PORT_CHAN) += port.o 60 60 obj-$(CONFIG_PTY_CHAN) += pty.o
+1 -1
arch/um/drivers/hostaudio_kern.c
··· 310 310 .release = hostmixer_release, 311 311 }; 312 312 313 - struct { 313 + static struct { 314 314 int dev_audio; 315 315 int dev_mixer; 316 316 } module_data;
+1 -1
arch/um/drivers/port_kern.c
··· 144 144 local_irq_restore(flags); 145 145 } 146 146 147 - DECLARE_WORK(port_work, port_work_proc); 147 + static DECLARE_WORK(port_work, port_work_proc); 148 148 149 149 static irqreturn_t port_interrupt(int irq, void *data) 150 150 {
+1 -1
arch/um/drivers/slirp_kern.c
··· 15 15 struct arg_list_dummy_wrapper argw; /* XXX should be simpler... */ 16 16 }; 17 17 18 - void slirp_init(struct net_device *dev, void *data) 18 + static void slirp_init(struct net_device *dev, void *data) 19 19 { 20 20 struct uml_net_private *private; 21 21 struct slirp_data *spri;
+2
arch/um/drivers/virt-pci.c
··· 544 544 } 545 545 } 546 546 547 + #ifdef CONFIG_OF 547 548 /* Copied from arch/x86/kernel/devicetree.c */ 548 549 struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus) 549 550 { ··· 563 562 } 564 563 return NULL; 565 564 } 565 + #endif 566 566 567 567 static int um_pci_init_vqs(struct um_pci_device *dev) 568 568 {
+1
arch/um/drivers/xterm_kern.c
··· 9 9 #include <asm/irq.h> 10 10 #include <irq_kern.h> 11 11 #include <os.h> 12 + #include "xterm.h" 12 13 13 14 struct xterm_wait { 14 15 struct completion ready;
+1
arch/um/include/shared/irq_kern.h
··· 76 76 } 77 77 78 78 void um_free_irq(int irq, void *dev_id); 79 + void free_irqs(void); 79 80 #endif
-2
arch/um/kernel/irq.c
··· 23 23 #include <linux/time-internal.h> 24 24 25 25 26 - extern void free_irqs(void); 27 - 28 26 /* When epoll triggers we do not know why it did so 29 27 * we can also have different IRQs for read and write. 30 28 * This is why we keep a small irq_reg array for each fd -
+3 -2
arch/x86/um/Makefile
··· 13 13 ptrace_$(BITS).o ptrace_user.o setjmp_$(BITS).o signal.o \ 14 14 stub_$(BITS).o stub_segv.o \ 15 15 sys_call_table_$(BITS).o sysrq_$(BITS).o tls_$(BITS).o \ 16 - mem_$(BITS).o subarch.o os-$(OS)/ 16 + mem_$(BITS).o subarch.o os-Linux/ 17 17 18 18 ifeq ($(CONFIG_X86_32),y) 19 19 20 - obj-y += checksum_32.o syscalls_32.o 20 + obj-y += syscalls_32.o 21 21 obj-$(CONFIG_ELF_CORE) += elfcore.o 22 22 23 23 subarch-y = ../lib/string_32.o ../lib/atomic64_32.o ../lib/atomic64_cx8_32.o 24 24 subarch-y += ../lib/cmpxchg8b_emu.o ../lib/atomic64_386_32.o 25 + subarch-y += ../lib/checksum_32.o 25 26 subarch-y += ../kernel/sys_ia32.o 26 27 27 28 else
-2
arch/x86/um/asm/mm_context.h
··· 11 11 #include <linux/mutex.h> 12 12 #include <asm/ldt.h> 13 13 14 - extern void ldt_host_info(void); 15 - 16 14 #define LDT_PAGES_MAX \ 17 15 ((LDT_ENTRIES * LDT_ENTRY_SIZE)/PAGE_SIZE) 18 16 #define LDT_ENTRIES_PER_PAGE \
-214
arch/x86/um/checksum_32.S
··· 1 - /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 - /* 3 - * INET An implementation of the TCP/IP protocol suite for the LINUX 4 - * operating system. INET is implemented using the BSD Socket 5 - * interface as the means of communication with the user level. 6 - * 7 - * IP/TCP/UDP checksumming routines 8 - * 9 - * Authors: Jorge Cwik, <jorge@laser.satlink.net> 10 - * Arnt Gulbrandsen, <agulbra@nvg.unit.no> 11 - * Tom May, <ftom@netcom.com> 12 - * Pentium Pro/II routines: 13 - * Alexander Kjeldaas <astor@guardian.no> 14 - * Finn Arne Gangstad <finnag@guardian.no> 15 - * Lots of code moved from tcp.c and ip.c; see those files 16 - * for more names. 17 - * 18 - * Changes: Ingo Molnar, converted csum_partial_copy() to 2.1 exception 19 - * handling. 20 - * Andi Kleen, add zeroing on error 21 - * converted to pure assembler 22 - */ 23 - 24 - #include <asm/errno.h> 25 - #include <asm/asm.h> 26 - #include <asm/export.h> 27 - 28 - /* 29 - * computes a partial checksum, e.g. for TCP/UDP fragments 30 - */ 31 - 32 - /* 33 - unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) 34 - */ 35 - 36 - .text 37 - .align 4 38 - .globl csum_partial 39 - 40 - #ifndef CONFIG_X86_USE_PPRO_CHECKSUM 41 - 42 - /* 43 - * Experiments with Ethernet and SLIP connections show that buff 44 - * is aligned on either a 2-byte or 4-byte boundary. We get at 45 - * least a twofold speedup on 486 and Pentium if it is 4-byte aligned. 46 - * Fortunately, it is easy to convert 2-byte alignment to 4-byte 47 - * alignment for the unrolled loop. 48 - */ 49 - csum_partial: 50 - pushl %esi 51 - pushl %ebx 52 - movl 20(%esp),%eax # Function arg: unsigned int sum 53 - movl 16(%esp),%ecx # Function arg: int len 54 - movl 12(%esp),%esi # Function arg: unsigned char *buff 55 - testl $2, %esi # Check alignment. 56 - jz 2f # Jump if alignment is ok. 57 - subl $2, %ecx # Alignment uses up two bytes. 58 - jae 1f # Jump if we had at least two bytes. 59 - addl $2, %ecx # ecx was < 2. Deal with it. 60 - jmp 4f 61 - 1: movw (%esi), %bx 62 - addl $2, %esi 63 - addw %bx, %ax 64 - adcl $0, %eax 65 - 2: 66 - movl %ecx, %edx 67 - shrl $5, %ecx 68 - jz 2f 69 - testl %esi, %esi 70 - 1: movl (%esi), %ebx 71 - adcl %ebx, %eax 72 - movl 4(%esi), %ebx 73 - adcl %ebx, %eax 74 - movl 8(%esi), %ebx 75 - adcl %ebx, %eax 76 - movl 12(%esi), %ebx 77 - adcl %ebx, %eax 78 - movl 16(%esi), %ebx 79 - adcl %ebx, %eax 80 - movl 20(%esi), %ebx 81 - adcl %ebx, %eax 82 - movl 24(%esi), %ebx 83 - adcl %ebx, %eax 84 - movl 28(%esi), %ebx 85 - adcl %ebx, %eax 86 - lea 32(%esi), %esi 87 - dec %ecx 88 - jne 1b 89 - adcl $0, %eax 90 - 2: movl %edx, %ecx 91 - andl $0x1c, %edx 92 - je 4f 93 - shrl $2, %edx # This clears CF 94 - 3: adcl (%esi), %eax 95 - lea 4(%esi), %esi 96 - dec %edx 97 - jne 3b 98 - adcl $0, %eax 99 - 4: andl $3, %ecx 100 - jz 7f 101 - cmpl $2, %ecx 102 - jb 5f 103 - movw (%esi),%cx 104 - leal 2(%esi),%esi 105 - je 6f 106 - shll $16,%ecx 107 - 5: movb (%esi),%cl 108 - 6: addl %ecx,%eax 109 - adcl $0, %eax 110 - 7: 111 - popl %ebx 112 - popl %esi 113 - RET 114 - 115 - #else 116 - 117 - /* Version for PentiumII/PPro */ 118 - 119 - csum_partial: 120 - pushl %esi 121 - pushl %ebx 122 - movl 20(%esp),%eax # Function arg: unsigned int sum 123 - movl 16(%esp),%ecx # Function arg: int len 124 - movl 12(%esp),%esi # Function arg: const unsigned char *buf 125 - 126 - testl $2, %esi 127 - jnz 30f 128 - 10: 129 - movl %ecx, %edx 130 - movl %ecx, %ebx 131 - andl $0x7c, %ebx 132 - shrl $7, %ecx 133 - addl %ebx,%esi 134 - shrl $2, %ebx 135 - negl %ebx 136 - lea 45f(%ebx,%ebx,2), %ebx 137 - testl %esi, %esi 138 - jmp *%ebx 139 - 140 - # Handle 2-byte-aligned regions 141 - 20: addw (%esi), %ax 142 - lea 2(%esi), %esi 143 - adcl $0, %eax 144 - jmp 10b 145 - 146 - 30: subl $2, %ecx 147 - ja 20b 148 - je 32f 149 - movzbl (%esi),%ebx # csumming 1 byte, 2-aligned 150 - addl %ebx, %eax 151 - adcl $0, %eax 152 - jmp 80f 153 - 32: 154 - addw (%esi), %ax # csumming 2 bytes, 2-aligned 155 - adcl $0, %eax 156 - jmp 80f 157 - 158 - 40: 159 - addl -128(%esi), %eax 160 - adcl -124(%esi), %eax 161 - adcl -120(%esi), %eax 162 - adcl -116(%esi), %eax 163 - adcl -112(%esi), %eax 164 - adcl -108(%esi), %eax 165 - adcl -104(%esi), %eax 166 - adcl -100(%esi), %eax 167 - adcl -96(%esi), %eax 168 - adcl -92(%esi), %eax 169 - adcl -88(%esi), %eax 170 - adcl -84(%esi), %eax 171 - adcl -80(%esi), %eax 172 - adcl -76(%esi), %eax 173 - adcl -72(%esi), %eax 174 - adcl -68(%esi), %eax 175 - adcl -64(%esi), %eax 176 - adcl -60(%esi), %eax 177 - adcl -56(%esi), %eax 178 - adcl -52(%esi), %eax 179 - adcl -48(%esi), %eax 180 - adcl -44(%esi), %eax 181 - adcl -40(%esi), %eax 182 - adcl -36(%esi), %eax 183 - adcl -32(%esi), %eax 184 - adcl -28(%esi), %eax 185 - adcl -24(%esi), %eax 186 - adcl -20(%esi), %eax 187 - adcl -16(%esi), %eax 188 - adcl -12(%esi), %eax 189 - adcl -8(%esi), %eax 190 - adcl -4(%esi), %eax 191 - 45: 192 - lea 128(%esi), %esi 193 - adcl $0, %eax 194 - dec %ecx 195 - jge 40b 196 - movl %edx, %ecx 197 - 50: andl $3, %ecx 198 - jz 80f 199 - 200 - # Handle the last 1-3 bytes without jumping 201 - notl %ecx # 1->2, 2->1, 3->0, higher bits are masked 202 - movl $0xffffff,%ebx # by the shll and shrl instructions 203 - shll $3,%ecx 204 - shrl %cl,%ebx 205 - andl -128(%esi),%ebx # esi is 4-aligned so should be ok 206 - addl %ebx,%eax 207 - adcl $0,%eax 208 - 80: 209 - popl %ebx 210 - popl %esi 211 - RET 212 - 213 - #endif 214 - EXPORT_SYMBOL(csum_partial)
+2
include/asm-generic/current.h
··· 2 2 #ifndef __ASM_GENERIC_CURRENT_H 3 3 #define __ASM_GENERIC_CURRENT_H 4 4 5 + #ifndef __ASSEMBLY__ 5 6 #include <linux/thread_info.h> 6 7 7 8 #define get_current() (current_thread_info()->task) 8 9 #define current get_current() 10 + #endif 9 11 10 12 #endif /* __ASM_GENERIC_CURRENT_H */
+1 -1
sound/Kconfig
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 menuconfig SOUND 3 3 tristate "Sound card support" 4 - depends on HAS_IOMEM 4 + depends on HAS_IOMEM || UML 5 5 help 6 6 If you have a sound card in your computer, i.e. if it can say more 7 7 than an occasional beep, say Y.