Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3)  * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) #include <asm/errno.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) #include <init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #include <kern.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #include <os.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) /* Changed by set_umid_arg */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) static int umid_inited = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) static int __init set_umid_arg(char *name, int *add)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 	int err;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 	if (umid_inited) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 		os_warn("umid already set\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 		return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 	*add = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	err = set_umid(name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 	if (err == -EEXIST)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 		os_warn("umid '%s' already in use\n", name);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	else if (!err)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 		umid_inited = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) __uml_setup("umid=", set_umid_arg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) "umid=<name>\n"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) "    This is used to assign a unique identity to this UML machine and\n"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) "    is used for naming the pid file and management console socket.\n\n"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) );
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)