diff --git a/drivers/Kconfig b/drivers/Kconfig
index 63baceb6c118..8b71ad9dab13 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -200,4 +200,6 @@ source "drivers/fpga/Kconfig"
 
 source "drivers/tee/Kconfig"
 
+source "drivers/corellium/Kconfig"
+
 endmenu
diff --git a/drivers/Makefile b/drivers/Makefile
index a8167ee6d865..23962611a983 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -176,3 +176,5 @@ obj-$(CONFIG_ANDROID)		+= android/
 obj-$(CONFIG_NVMEM)		+= nvmem/
 obj-$(CONFIG_FPGA)		+= fpga/
 obj-$(CONFIG_TEE)		+= tee/
+
+obj-y                           += corellium/
diff --git a/drivers/platform/goldfish/goldfish_pipe.h b/drivers/platform/goldfish/goldfish_pipe.h
index e24bef314468..3fb91c09f83f 100644
--- a/drivers/platform/goldfish/goldfish_pipe.h
+++ b/drivers/platform/goldfish/goldfish_pipe.h
@@ -49,11 +49,6 @@ struct goldfish_pipe_dev {
 	 * Global device spinlock. Protects the following members:
 	 *  - pipes, pipes_capacity
 	 *  - [*pipes, *pipes + pipes_capacity) - array data
-	 *  - first_signalled_pipe,
-	 *      goldfish_pipe::prev_signalled,
-	 *      goldfish_pipe::next_signalled,
-	 *      goldfish_pipe::signalled_flags - all singnalled-related fields,
-	 *                                       in all allocated pipes
 	 *  - open_command_params - PIPE_CMD_OPEN-related buffers
 	 *
 	 * It looks like a lot of different fields, but the trick is that the only
@@ -74,9 +69,6 @@ struct goldfish_pipe_dev {
 	/* Pointers to the buffers host uses for interaction with this driver */
 	struct goldfish_pipe_dev_buffers *buffers;
 
-	/* Head of a doubly linked list of signalled pipes */
-	struct goldfish_pipe *first_signalled_pipe;
-
 	/* Some device-specific data */
 	int irq;
 	int version;
diff --git a/drivers/platform/goldfish/goldfish_pipe_v2.c b/drivers/platform/goldfish/goldfish_pipe_v2.c
index f0b9b46047be..0a8dc6d648e1 100644
--- a/drivers/platform/goldfish/goldfish_pipe_v2.c
+++ b/drivers/platform/goldfish/goldfish_pipe_v2.c
@@ -151,10 +151,10 @@ struct goldfish_pipe_command;
 
 /* A per-pipe command structure, shared with the host */
 struct goldfish_pipe_command {
-	s32 cmd;	/* PipeCmdCode, guest -> host */
-	s32 id;		/* pipe id, guest -> host */
-	s32 status;	/* command execution status, host -> guest */
-	s32 reserved;	/* to pad to 64-bit boundary */
+	s32 cmd;		/* PipeCmdCode, guest -> host */
+	s32 id;			/* pipe id, guest -> host */
+	s32 status;		/* command execution status, host -> guest */
+	s32 container_id;
 	union {
 		/* Parameters for PIPE_CMD_{READ,WRITE} */
 		struct {
@@ -223,20 +223,9 @@ struct goldfish_pipe {
 	 */
 	unsigned long flags;
 
-	/* wake flags host have signalled,
-	 * protected by goldfish_pipe_dev::lock
-	 */
-	unsigned long signalled_flags;
-
 	/* A pointer to command buffer */
 	struct goldfish_pipe_command *command_buffer;
 
-	/* doubly linked list of signalled pipes,
-	 * protected by goldfish_pipe_dev::lock
-	 */
-	struct goldfish_pipe *prev_signalled;
-	struct goldfish_pipe *next_signalled;
-
 	/*
 	 * A pipe's own lock. Protects the following:
 	 *  - *command_buffer - makes sure a command can safely write its
@@ -513,14 +502,14 @@ static ssize_t goldfish_pipe_read_write(struct file *filp,
 	return ret;
 }
 
-static ssize_t goldfish_pipe_read(struct file *filp, char __user *buffer,
+ssize_t goldfish_pipe_read(struct file *filp, char __user *buffer,
 				size_t bufflen, loff_t *ppos)
 {
 	return goldfish_pipe_read_write(filp, buffer, bufflen,
 		/* is_write */ 0);
 }
 
-static ssize_t goldfish_pipe_write(struct file *filp,
+ssize_t goldfish_pipe_write(struct file *filp,
 				const char __user *buffer, size_t bufflen,
 				loff_t *ppos)
 {
@@ -529,7 +518,7 @@ static ssize_t goldfish_pipe_write(struct file *filp,
 			/* is_write */ 1);
 }
 
-static unsigned int goldfish_pipe_poll(struct file *filp, poll_table *wait)
+unsigned int goldfish_pipe_poll(struct file *filp, poll_table *wait)
 {
 	struct goldfish_pipe *pipe = filp->private_data;
 	unsigned int mask = 0;
@@ -553,96 +542,6 @@ static unsigned int goldfish_pipe_poll(struct file *filp, poll_table *wait)
 	return mask;
 }
 
-static int signalled_pipes_add_locked(struct goldfish_pipe_dev *dev,
-	u32 id, u32 flags)
-{
-	struct goldfish_pipe *pipe;
-
-	if (id >= dev->pipes_capacity)
-		return -EINVAL;
-
-	pipe = dev->pipes[id];
-	if (!pipe)
-		return -ENXIO;
-
-	pipe->signalled_flags |= flags;
-
-	if (pipe->prev_signalled || pipe->next_signalled
-		|| dev->first_signalled_pipe == pipe)
-		return 0;  /* already in the list */
-
-	pipe->next_signalled = dev->first_signalled_pipe;
-	if (dev->first_signalled_pipe)
-		dev->first_signalled_pipe->prev_signalled = pipe;
-	dev->first_signalled_pipe = pipe;
-
-	return 0;
-}
-
-static void signalled_pipes_remove_locked(struct goldfish_pipe_dev *dev,
-	struct goldfish_pipe *pipe) {
-	if (pipe->prev_signalled)
-		pipe->prev_signalled->next_signalled = pipe->next_signalled;
-	if (pipe->next_signalled)
-		pipe->next_signalled->prev_signalled = pipe->prev_signalled;
-	if (pipe == dev->first_signalled_pipe)
-		dev->first_signalled_pipe = pipe->next_signalled;
-	pipe->prev_signalled = NULL;
-	pipe->next_signalled = NULL;
-}
-
-static struct goldfish_pipe *signalled_pipes_pop_front(
-		struct goldfish_pipe_dev *dev,
-		int *wakes)
-{
-	struct goldfish_pipe *pipe;
-	unsigned long flags;
-
-	spin_lock_irqsave(&dev->lock, flags);
-
-	pipe = dev->first_signalled_pipe;
-	if (pipe) {
-		*wakes = pipe->signalled_flags;
-		pipe->signalled_flags = 0;
-		/* This is an optimized version of
-		 * signalled_pipes_remove_locked() - we want to make it as fast
-		 * as possible to wake the sleeping pipe operations faster.
-		 */
-		dev->first_signalled_pipe = pipe->next_signalled;
-		if (dev->first_signalled_pipe)
-			dev->first_signalled_pipe->prev_signalled = NULL;
-		pipe->next_signalled = NULL;
-	}
-
-	spin_unlock_irqrestore(&dev->lock, flags);
-	return pipe;
-}
-
-static void goldfish_interrupt_task(unsigned long unused)
-{
-	/* Iterate over the signalled pipes and wake them one by one */
-	struct goldfish_pipe *pipe;
-	int wakes;
-
-	while ((pipe = signalled_pipes_pop_front(&goldfish_pipe_dev, &wakes)) !=
-			NULL) {
-		if (wakes & PIPE_WAKE_CLOSED) {
-			pipe->flags = 1 << BIT_CLOSED_ON_HOST;
-		} else {
-			if (wakes & PIPE_WAKE_READ)
-				clear_bit(BIT_WAKE_ON_READ, &pipe->flags);
-			if (wakes & PIPE_WAKE_WRITE)
-				clear_bit(BIT_WAKE_ON_WRITE, &pipe->flags);
-		}
-		/*
-		 * wake_up_interruptible() implies a write barrier, so don't
-		 * explicitly add another one here.
-		 */
-		wake_up_interruptible(&pipe->wake_queue);
-	}
-}
-DECLARE_TASKLET(goldfish_interrupt_tasklet, goldfish_interrupt_task, 0);
-
 /*
  * The general idea of the interrupt handling:
  *
@@ -677,14 +576,35 @@ static irqreturn_t goldfish_pipe_interrupt(int irq, void *dev_id)
 	if (count > MAX_SIGNALLED_PIPES)
 		count = MAX_SIGNALLED_PIPES;
 
-	for (i = 0; i < count; ++i)
-		signalled_pipes_add_locked(dev,
-			dev->buffers->signalled_pipe_buffers[i].id,
-			dev->buffers->signalled_pipe_buffers[i].flags);
+	for (i = 0; i < count; ++i) {
+		struct goldfish_pipe *pipe;
+		u32 wakes = dev->buffers->signalled_pipe_buffers[i].flags;
+		u32 id = dev->buffers->signalled_pipe_buffers[i].id;
+
+		if (id >= dev->pipes_capacity)
+			continue;
+		pipe = dev->pipes[id];
+		if (!pipe)
+		        continue;
+
+		if (wakes & PIPE_WAKE_CLOSED) {
+			pipe->flags = 1 << BIT_CLOSED_ON_HOST;
+		} else {
+			if (wakes & PIPE_WAKE_READ)
+				clear_bit(BIT_WAKE_ON_READ, &pipe->flags);
+			if (wakes & PIPE_WAKE_WRITE)
+				clear_bit(BIT_WAKE_ON_WRITE, &pipe->flags);
+		}
+
+		/*
+		 * wake_up_interruptible() implies a write barrier, so don't
+		 * explicitly add another one here.
+		 */
+		wake_up_interruptible(&pipe->wake_queue);
+	}
 
 	spin_unlock_irqrestore(&dev->lock, flags);
 
-	tasklet_schedule(&goldfish_interrupt_tasklet);
 	return IRQ_HANDLED;
 }
 
@@ -727,7 +647,7 @@ static int get_free_pipe_id_locked(struct goldfish_pipe_dev *dev)
  *	Note: we use the pipe ID as a mux. All goldfish emulations are 32bit
  *	right now so this is fine. A move to 64bit will need this addressing
  */
-static int goldfish_pipe_open(struct inode *inode, struct file *file)
+int goldfish_pipe_open_int(size_t container_id, struct inode *inode, struct file *file)
 {
 	struct goldfish_pipe_dev *dev = &goldfish_pipe_dev;
 	struct device *pdev_dev;
@@ -770,6 +690,7 @@ static int goldfish_pipe_open(struct inode *inode, struct file *file)
 
 	dev->pipes[id] = pipe;
 	pipe->id = id;
+	pipe->command_buffer->container_id = container_id;
 	pipe->command_buffer->id = id;
 
 	/* Now tell the emulator we're opening a new pipe. */
@@ -803,6 +724,11 @@ err_pipe:
 	return status;
 }
 
+static int goldfish_pipe_open(struct inode *inode, struct file *file)
+{
+	return goldfish_pipe_open_int(0, inode, file);
+}
+
 static void goldfish_pipe_dma_release_host(struct goldfish_pipe *pipe)
 {
 	struct goldfish_dma_context *dma = pipe->dma;
@@ -852,7 +778,7 @@ static void goldfish_pipe_dma_release_guest(struct goldfish_pipe *pipe)
 	}
 }
 
-static int goldfish_pipe_release(struct inode *inode, struct file *filp)
+int goldfish_pipe_release(struct inode *inode, struct file *filp)
 {
 	unsigned long flags;
 	struct goldfish_pipe *pipe = filp->private_data;
@@ -864,7 +790,6 @@ static int goldfish_pipe_release(struct inode *inode, struct file *filp)
 
 	spin_lock_irqsave(&dev->lock, flags);
 	dev->pipes[pipe->id] = NULL;
-	signalled_pipes_remove_locked(dev, pipe);
 	spin_unlock_irqrestore(&dev->lock, flags);
 
 	filp->private_data = NULL;
@@ -1013,7 +938,7 @@ static int goldfish_dma_mmap_locked(
  * the physically contiguous DMA region of the pipe device
  * (Goldfish DMA).
  */
-static int goldfish_dma_mmap(struct file *filp, struct vm_area_struct *vma)
+int goldfish_dma_mmap(struct file *filp, struct vm_area_struct *vma)
 {
 	struct goldfish_pipe *pipe =
 		(struct goldfish_pipe *)(filp->private_data);
@@ -1114,7 +1039,7 @@ static long goldfish_dma_ioctl_create_region(struct goldfish_pipe *pipe,
 	return goldfish_pipe_dma_create_region(pipe, ioctl_data.size);
 }
 
-static long goldfish_dma_ioctl(
+long goldfish_dma_ioctl(
 	struct file *file, unsigned int cmd, unsigned long arg)
 {
 	struct goldfish_pipe *pipe =
@@ -1183,7 +1108,6 @@ static int goldfish_pipe_device_init_v2(struct platform_device *pdev)
 	}
 
 	dev->pdev_dev = pdev_dev;
-	dev->first_signalled_pipe = NULL;
 	dev->pipes_capacity = INITIAL_PIPES_CAPACITY;
 	dev->pipes = kcalloc(dev->pipes_capacity, sizeof(*dev->pipes),
 		GFP_KERNEL);
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 4816a6a0c613..7c24074d3d9e 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1630,7 +1630,7 @@ config RTC_DRV_HID_SENSOR_TIME
 
 config RTC_DRV_GOLDFISH
 	tristate "Goldfish Real Time Clock"
-	depends on MIPS && (GOLDFISH || COMPILE_TEST)
+	depends on GOLDFISH || COMPILE_TEST
 	help
 	  Say yes to enable RTC driver for the Goldfish based virtual platform.
 
