Commit 345b17ac authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

Pull UML updates from Richard Weinberger:

 - IRQ handling cleanups

 - Support for suspend

 - Various fixes for UML specific drivers: ubd, vector, xterm

* tag 'for-linus-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: (32 commits)
  um: Fix build w/o CONFIG_PM_SLEEP
  um: time-travel: Correct time event IRQ delivery
  um: irq/sigio: Support suspend/resume handling of workaround IRQs
  um: time-travel: Actually apply "free-until" optimisation
  um: chan_xterm: Fix fd leak
  um: tty: Fix handling of close in tty lines
  um: Monitor error events in IRQ controller
  um: allocate a guard page to helper threads
  um: support some of ARCH_HAS_SET_MEMORY
  um: time-travel: avoid multiple identical propagations
  um: Fetch registers only for signals which need them
  um: Support suspend to RAM
  um: Allow PM with suspend-to-idle
  um: time: Fix read_persistent_clock64() in time-travel
  um: Simplify os_idle_sleep() and sleep longer
  um: Simplify IRQ handling code
  um: Remove IRQ_NONE type
  um: irq: Reduce irq_reg allocation
  um: irq: Clean up and rename struct irq_fd
  um: Clean up alarm IRQ chip name
  ...
parents 787fec8a 1fb1abc8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ config UML
	select HAVE_DEBUG_KMEMLEAK
	select HAVE_DEBUG_BUGVERBOSE
	select NO_DMA
	select ARCH_HAS_SET_MEMORY
	select GENERIC_IRQ_SHOW
	select GENERIC_CPU_DEVICES
	select HAVE_GCC_PLUGINS
@@ -191,3 +192,8 @@ config UML_TIME_TRAVEL_SUPPORT
endmenu

source "arch/um/drivers/Kconfig"

config ARCH_SUSPEND_POSSIBLE
	def_bool y

source "kernel/power/Kconfig"
+2 −2
Original line number Diff line number Diff line
@@ -26,10 +26,10 @@ int generic_read(int fd, char *c_out, void *unused)
	n = read(fd, c_out, sizeof(*c_out));
	if (n > 0)
		return n;
	else if (errno == EAGAIN)
		return 0;
	else if (n == 0)
		return -EIO;
	else if (errno == EAGAIN)
		return 0;
	return -errno;
}

+20 −10
Original line number Diff line number Diff line
@@ -262,21 +262,27 @@ static irqreturn_t line_write_interrupt(int irq, void *data)
int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
{
	const struct line_driver *driver = line->driver;
	int err = 0;
	int err;

	if (input)
	if (input) {
		err = um_request_irq(driver->read_irq, fd, IRQ_READ,
				     line_interrupt, IRQF_SHARED,
				     driver->read_irq_name, data);
	if (err)
		if (err < 0)
			return err;
	if (output)
	}

	if (output) {
		err = um_request_irq(driver->write_irq, fd, IRQ_WRITE,
				     line_write_interrupt, IRQF_SHARED,
				     driver->write_irq_name, data);
		if (err < 0)
			return err;
	}

	return 0;
}

static int line_activate(struct tty_port *port, struct tty_struct *tty)
{
	int ret;
@@ -608,7 +614,6 @@ static void free_winch(struct winch *winch)
	winch->fd = -1;
	if (fd != -1)
		os_close_file(fd);
	list_del(&winch->list);
	__free_winch(&winch->work);
}

@@ -709,6 +714,8 @@ static void unregister_winch(struct tty_struct *tty)
		winch = list_entry(ele, struct winch, list);
		wtty = tty_port_tty_get(winch->port);
		if (wtty == tty) {
			list_del(&winch->list);
			spin_unlock(&winch_handler_lock);
			free_winch(winch);
			break;
		}
@@ -719,14 +726,17 @@ static void unregister_winch(struct tty_struct *tty)

static void winch_cleanup(void)
{
	struct list_head *ele, *next;
	struct winch *winch;

	spin_lock(&winch_handler_lock);
	while ((winch = list_first_entry_or_null(&winch_handlers,
						 struct winch, list))) {
		list_del(&winch->list);
		spin_unlock(&winch_handler_lock);

	list_for_each_safe(ele, next, &winch_handlers) {
		winch = list_entry(ele, struct winch, list);
		free_winch(winch);

		spin_lock(&winch_handler_lock);
	}

	spin_unlock(&winch_handler_lock);
+1 −1
Original line number Diff line number Diff line
@@ -738,7 +738,7 @@ static int __init mconsole_init(void)

	err = um_request_irq(MCONSOLE_IRQ, sock, IRQ_READ, mconsole_interrupt,
			     IRQF_SHARED, "mconsole", (void *)sock);
	if (err) {
	if (err < 0) {
		printk(KERN_ERR "Failed to get IRQ for management console\n");
		goto out;
	}
+1 −1
Original line number Diff line number Diff line
@@ -160,7 +160,7 @@ static int uml_net_open(struct net_device *dev)

	err = um_request_irq(dev->irq, lp->fd, IRQ_READ, uml_net_interrupt,
			     IRQF_SHARED, dev->name, dev);
	if (err != 0) {
	if (err < 0) {
		printk(KERN_ERR "uml_net_open: failed to get irq(%d)\n", err);
		err = -ENETUNREACH;
		goto out_close;
Loading