<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/arch/um/drivers/mconsole_user.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-07-28T22:49:18+00:00</updated>
<entry>
<title>minmax: make generic MIN() and MAX() macros available everywhere</title>
<updated>2024-07-28T22:49:18+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-07-28T22:49:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a251f52cfdc417c84411a056bc142cbd77baef4'/>
<id>urn:sha1:1a251f52cfdc417c84411a056bc142cbd77baef4</id>
<content type='text'>
This just standardizes the use of MIN() and MAX() macros, with the very
traditional semantics.  The goal is to use these for C constant
expressions and for top-level / static initializers, and so be able to
simplify the min()/max() macros.

These macro names were used by various kernel code - they are very
traditional, after all - and all such users have been fixed up, with a
few different approaches:

 - trivial duplicated macro definitions have been removed

   Note that 'trivial' here means that it's obviously kernel code that
   already included all the major kernel headers, and thus gets the new
   generic MIN/MAX macros automatically.

 - non-trivial duplicated macro definitions are guarded with #ifndef

   This is the "yes, they define their own versions, but no, the include
   situation is not entirely obvious, and maybe they don't get the
   generic version automatically" case.

 - strange use case #1

   A couple of drivers decided that the way they want to describe their
   versioning is with

	#define MAJ 1
	#define MIN 2
	#define DRV_VERSION __stringify(MAJ) "." __stringify(MIN)

   which adds zero value and I just did my Alexander the Great
   impersonation, and rewrote that pointless Gordian knot as

	#define DRV_VERSION "1.2"

   instead.

 - strange use case #2

   A couple of drivers thought that it's a good idea to have a random
   'MIN' or 'MAX' define for a value or index into a table, rather than
   the traditional macro that takes arguments.

   These values were re-written as C enum's instead. The new
   function-line macros only expand when followed by an open
   parenthesis, and thus don't clash with enum use.

Happily, there weren't really all that many of these cases, and a lot of
users already had the pattern of using '#ifndef' guarding (or in one
case just using '#undef MIN') before defining their own private version
that does the same thing. I left such cases alone.

Cc: David Laight &lt;David.Laight@aculab.com&gt;
Cc: Lorenzo Stoakes &lt;lorenzo.stoakes@oracle.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>um: Add SPDX headers for files in arch/um/drivers</title>
<updated>2019-09-15T19:37:16+00:00</updated>
<author>
<name>Alex Dewar</name>
<email>alex.dewar@gmx.co.uk</email>
</author>
<published>2019-08-25T09:49:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dbddf429dc514257170d4c5e116cbd95a86408ab'/>
<id>urn:sha1:dbddf429dc514257170d4c5e116cbd95a86408ab</id>
<content type='text'>
Convert files to use SPDX header. All files are licensed under the GPLv2.

Signed-off-by: Alex Dewar &lt;alex.dewar@gmx.co.uk&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>um: -include user.h for USER_OBJ, trim includes</title>
<updated>2011-11-02T13:14:44+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2011-08-18T19:01:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=078073a3d48ce7c140f1538d249da3ac545065a6'/>
<id>urn:sha1:078073a3d48ce7c140f1538d249da3ac545065a6</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>uml: make three functions static</title>
<updated>2008-04-28T15:58:28+00:00</updated>
<author>
<name>WANG Cong</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2008-04-28T09:13:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1605ec044300d0fd5d27fd0b6879ee14b104aebd'/>
<id>urn:sha1:1605ec044300d0fd5d27fd0b6879ee14b104aebd</id>
<content type='text'>
Make the following three functions static, since they don't need to be global.

arch/um/drivers/mcast_kern.c::mcast_setup()
arch/um/drivers/mconsole_user.c::mconsole_reply_v0()
arch/um/drivers/port_user.c::port_pre_exec()

Acked-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: WANG Cong &lt;wangcong@zeuux.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: fix mconsole stop</title>
<updated>2008-02-05T17:44:29+00:00</updated>
<author>
<name>Karol Swietlicki</name>
<email>magotari@gmail.com</email>
</author>
<published>2008-02-05T06:31:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7b5cc6ee6cf9001775c348bac09814a45f1276b7'/>
<id>urn:sha1:7b5cc6ee6cf9001775c348bac09814a45f1276b7</id>
<content type='text'>
Bring back the functionality of stopping user mode linux with the help of
mconsole.

[jdike - the bug being fixed is that the mconsole file descriptor is already
set O_NONBLOCK or not, depending on whether we want no blocking (the normal
case) or we want blocking (when an mconsole stop is in effect), so the
MSG_DONTWAIT is redundant in the normal case, and wrong when we want to
block.]

Signed-off-by: Karol Swietlicki &lt;magotari@gmail.com&gt;
Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: arch/um/drivers formatting</title>
<updated>2007-10-16T16:43:09+00:00</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2007-10-16T08:27:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cb8fa61c2b8b29d422d7310f064d60022f18f89b'/>
<id>urn:sha1:cb8fa61c2b8b29d422d7310f064d60022f18f89b</id>
<content type='text'>
Style fixes for the rest of the drivers.  arch/um/drivers should be pretty
CodingStyle-compliant now.

Except for the ubd driver, which will have to be treated separately.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: DEBUG_SHIRQ fixes</title>
<updated>2007-07-16T16:05:38+00:00</updated>
<author>
<name>Eduard-Gabriel Munteanu</name>
<email>maxdamage@aladin.ro</email>
</author>
<published>2007-07-16T06:38:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=89df6bfc04059716de2eb2fe529f05b3e124fafd'/>
<id>urn:sha1:89df6bfc04059716de2eb2fe529f05b3e124fafd</id>
<content type='text'>
DEBUG_SHIRQ generates spurious interrupts, triggering handlers such as
mconsole_interrupt() or line_interrupt().  They expect data to be available to
be read from their sockets/pipes, but in the case of spurious interrupts, the
host didn't actually send anything, so UML hangs in read() and friends.
Setting those fd's as O_NONBLOCK makes DEBUG_SHIRQ-enabled UML kernels boot
and run correctly.

Signed-off-by: Eduard-Gabriel Munteanu &lt;maxdamage@aladin.ro&gt;
Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>uml: remove user_util.h</title>
<updated>2007-05-07T19:13:01+00:00</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2007-05-06T21:51:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9218b1714949095bff9d9739d80f431d58e561d6'/>
<id>urn:sha1:9218b1714949095bff9d9739d80f431d58e561d6</id>
<content type='text'>
user_util.h isn't needed any more, so delete it and remove all includes of it.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Cc: Paolo 'Blaisorblade' Giarrusso &lt;blaisorblade@yahoo.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] uml: umid tidying</title>
<updated>2007-02-11T18:51:24+00:00</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2007-02-10T09:44:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de5fe76e436d9e98f8af8005ff23a2e6066aea10'/>
<id>urn:sha1:de5fe76e436d9e98f8af8005ff23a2e6066aea10</id>
<content type='text'>
Add an error message when two umids are put on the command line.

umid.h is kind of pointless since it only declares one thing, and that
is already declared in os.h.

Commented the lack of locking of some data in os-Linux/umid.h.

Signed-off-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Cc: Paolo 'Blaisorblade' Giarrusso &lt;blaisorblade@yahoo.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] uml: mconsole fixes</title>
<updated>2006-10-25T05:01:10+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@ftp.linux.org.uk</email>
</author>
<published>2006-10-24T10:15:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3a51237dc11efe283b40ea0248f4e26ab935dbd1'/>
<id>urn:sha1:3a51237dc11efe283b40ea0248f4e26ab935dbd1</id>
<content type='text'>
 * when we have stop/sysrq/go, we get pt_regs of whatever executes
   mc_work_proc().  Would be better to see what we had at the time of
   interrupt that got us stop.

 * stop/stop/stop.....  will give stack overflow.  Shouldn't allow stop
   from mconsole_stop().

 * stop/stop/go leaves us inside mconsole_stop() with
	os_set_fd_block(req-&gt;originating_fd, 0);
	reactivate_fd(req-&gt;originating_fd, MCONSOLE_IRQ);
   just done by nested mconsole_stop().  Ditto.

 * once we'd seen stop, there's a period when INTR commands are executed
   out of order (as they should; we might have the things stuck badly
   enough to never reach mconsole_stop(), but still not badly enough to
   block mconsole_interrupt(); in that situation we _want_ things like
   "cad" to be executed immediately).  Once we enter monsole_stop(), all
   INTR commands will be executed in order, mixed with PROC ones.  We'd
   better let user see that such change of behaviour has happened.
   (Suggested by lennert).

 * stack footprint of monsole_interrupt() is an atrocity; AFAICS we can
   safely make struct mc_request req; static in function there.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Acked-by: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
