diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/arch/nios2/include/asm/thread_info.h linux-libre-4.0-gnu/arch/nios2/include/asm/thread_info.h
--- linux-libre-4.0-rc7-gnu/arch/nios2/include/asm/thread_info.h	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/arch/nios2/include/asm/thread_info.h	2015-04-12 18:12:50.000000000 -0400
@@ -47,7 +47,6 @@ struct thread_info {
 						  0-0x7FFFFFFF for user-thead
 						  0-0xFFFFFFFF for kernel-thread
 						*/
-	struct restart_block	restart_block;
 	struct pt_regs		*regs;
 };
 
@@ -64,9 +63,6 @@ struct thread_info {
 	.cpu		= 0,			\
 	.preempt_count	= INIT_PREEMPT_COUNT,	\
 	.addr_limit	= KERNEL_DS,		\
-	.restart_block	= {			\
-		.fn = do_no_restart_syscall,	\
-	},					\
 }
 
 #define init_thread_info	(init_thread_union.thread_info)
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/arch/nios2/include/uapi/asm/ptrace.h linux-libre-4.0-gnu/arch/nios2/include/uapi/asm/ptrace.h
--- linux-libre-4.0-rc7-gnu/arch/nios2/include/uapi/asm/ptrace.h	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/arch/nios2/include/uapi/asm/ptrace.h	2015-04-12 18:12:50.000000000 -0400
@@ -60,12 +60,17 @@
 #define PTR_IPENDING	37
 #define PTR_CPUID	38
 #define PTR_CTL6	39
-#define PTR_CTL7	40
+#define PTR_EXCEPTION	40
 #define PTR_PTEADDR	41
 #define PTR_TLBACC	42
 #define PTR_TLBMISC	43
+#define PTR_ECCINJ	44
+#define PTR_BADADDR	45
+#define PTR_CONFIG	46
+#define PTR_MPUBASE	47
+#define PTR_MPUACC	48
 
-#define NUM_PTRACE_REG (PTR_TLBMISC + 1)
+#define NUM_PTRACE_REG (PTR_MPUACC + 1)
 
 /* User structures for general purpose registers.  */
 struct user_pt_regs {
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/arch/nios2/kernel/entry.S linux-libre-4.0-gnu/arch/nios2/kernel/entry.S
--- linux-libre-4.0-rc7-gnu/arch/nios2/kernel/entry.S	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/arch/nios2/kernel/entry.S	2015-04-12 18:12:50.000000000 -0400
@@ -161,7 +161,7 @@ ENTRY(inthandler)
  ***********************************************************************
  */
 ENTRY(handle_trap)
-	ldw	r24, -4(ea)	/* instruction that caused the exception */
+	ldwio	r24, -4(ea)	/* instruction that caused the exception */
 	srli	r24, r24, 4
 	andi	r24, r24, 0x7c
 	movia	r9,trap_table
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/arch/nios2/kernel/signal.c linux-libre-4.0-gnu/arch/nios2/kernel/signal.c
--- linux-libre-4.0-rc7-gnu/arch/nios2/kernel/signal.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/arch/nios2/kernel/signal.c	2015-04-12 18:12:50.000000000 -0400
@@ -43,7 +43,7 @@ static inline int rt_restore_ucontext(st
 	int err;
 
 	/* Always make any pending restarted system calls return -EINTR */
-	current_thread_info()->restart_block.fn = do_no_restart_syscall;
+	current->restart_block.fn = do_no_restart_syscall;
 
 	err = __get_user(temp, &uc->uc_mcontext.version);
 	if (temp != MCONTEXT_VERSION)
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/arch/nios2/mm/cacheflush.c linux-libre-4.0-gnu/arch/nios2/mm/cacheflush.c
--- linux-libre-4.0-rc7-gnu/arch/nios2/mm/cacheflush.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/arch/nios2/mm/cacheflush.c	2015-04-12 18:12:50.000000000 -0400
@@ -23,9 +23,6 @@ static void __flush_dcache(unsigned long
 	end += (cpuinfo.dcache_line_size - 1);
 	end &= ~(cpuinfo.dcache_line_size - 1);
 
-	if (end > start + cpuinfo.dcache_size)
-		end = start + cpuinfo.dcache_size;
-
 	for (addr = start; addr < end; addr += cpuinfo.dcache_line_size) {
 		__asm__ __volatile__ ("   flushda 0(%0)\n"
 					: /* Outputs */
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/arch/sparc/kernel/pci.c linux-libre-4.0-gnu/arch/sparc/kernel/pci.c
--- linux-libre-4.0-rc7-gnu/arch/sparc/kernel/pci.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/arch/sparc/kernel/pci.c	2015-04-12 18:12:50.000000000 -0400
@@ -639,10 +639,7 @@ static void pci_claim_bus_resources(stru
 				       (unsigned long long)r->end,
 				       (unsigned int)r->flags);
 
-			if (pci_claim_resource(dev, i) == 0)
-				continue;
-
-			pci_claim_bridge_resource(dev, i);
+			pci_claim_resource(dev, i);
 		}
 	}
 
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/arch/x86/include/asm/uaccess_64.h linux-libre-4.0-gnu/arch/x86/include/asm/uaccess_64.h
--- linux-libre-4.0-rc7-gnu/arch/x86/include/asm/uaccess_64.h	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/arch/x86/include/asm/uaccess_64.h	2015-04-12 18:12:50.000000000 -0400
@@ -231,6 +231,6 @@ __copy_from_user_inatomic_nocache(void *
 }
 
 unsigned long
-copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest);
+copy_user_handle_tail(char *to, char *from, unsigned len);
 
 #endif /* _ASM_X86_UACCESS_64_H */
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/arch/x86/lib/usercopy_64.c linux-libre-4.0-gnu/arch/x86/lib/usercopy_64.c
--- linux-libre-4.0-rc7-gnu/arch/x86/lib/usercopy_64.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/arch/x86/lib/usercopy_64.c	2015-04-12 18:12:50.000000000 -0400
@@ -69,21 +69,20 @@ EXPORT_SYMBOL(copy_in_user);
  * it is not necessary to optimize tail handling.
  */
 __visible unsigned long
-copy_user_handle_tail(char *to, char *from, unsigned len, unsigned zerorest)
+copy_user_handle_tail(char *to, char *from, unsigned len)
 {
-	char c;
-	unsigned zero_len;
-
 	for (; len; --len, to++) {
+		char c;
+
 		if (__get_user_nocheck(c, from++, sizeof(char)))
 			break;
 		if (__put_user_nocheck(c, to, sizeof(char)))
 			break;
 	}
-
-	for (c = 0, zero_len = len; zerorest && zero_len; --zero_len)
-		if (__put_user_nocheck(c, to++, sizeof(char)))
-			break;
 	clac();
+
+	/* If the destination is a kernel buffer, we always clear the end */
+	if ((unsigned long)to >= TASK_SIZE_MAX)
+		memset(to, 0, len);
 	return len;
 }
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/block/blk-mq.c linux-libre-4.0-gnu/block/blk-mq.c
--- linux-libre-4.0-rc7-gnu/block/blk-mq.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/block/blk-mq.c	2015-04-12 18:12:50.000000000 -0400
@@ -1457,7 +1457,7 @@ static struct blk_mq_tags *blk_mq_init_r
 
 		do {
 			page = alloc_pages_node(set->numa_node,
-				GFP_KERNEL | __GFP_NOWARN | __GFP_NORETRY,
+				GFP_KERNEL | __GFP_NOWARN | __GFP_NORETRY | __GFP_ZERO,
 				this_order);
 			if (page)
 				break;
@@ -1479,8 +1479,6 @@ static struct blk_mq_tags *blk_mq_init_r
 		left -= to_do * rq_size;
 		for (j = 0; j < to_do; j++) {
 			tags->rqs[i] = p;
-			tags->rqs[i]->atomic_flags = 0;
-			tags->rqs[i]->cmd_flags = 0;
 			if (set->ops->init_request) {
 				if (set->ops->init_request(set->driver_data,
 						tags->rqs[i], hctx_idx, i,
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/Documentation/devicetree/bindings/thermal/rcar-thermal.txt linux-libre-4.0-gnu/Documentation/devicetree/bindings/thermal/rcar-thermal.txt
--- linux-libre-4.0-rc7-gnu/Documentation/devicetree/bindings/thermal/rcar-thermal.txt	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/Documentation/devicetree/bindings/thermal/rcar-thermal.txt	2015-04-12 18:12:50.000000000 -0400
@@ -4,7 +4,7 @@ Required properties:
 - compatible		: "renesas,thermal-<soctype>", "renesas,rcar-thermal"
 			  as fallback.
 			  Examples with soctypes are:
-			    - "renesas,thermal-r8a73a4" (R-Mobile AP6)
+			    - "renesas,thermal-r8a73a4" (R-Mobile APE6)
 			    - "renesas,thermal-r8a7779" (R-Car H1)
 			    - "renesas,thermal-r8a7790" (R-Car H2)
 			    - "renesas,thermal-r8a7791" (R-Car M2-W)
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/acpi/processor_idle.c linux-libre-4.0-gnu/drivers/acpi/processor_idle.c
--- linux-libre-4.0-rc7-gnu/drivers/acpi/processor_idle.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/acpi/processor_idle.c	2015-04-12 18:12:50.000000000 -0400
@@ -922,7 +922,7 @@ static int acpi_processor_setup_cpuidle_
 		return -EINVAL;
 
 	drv->safe_state_index = -1;
-	for (i = 0; i < CPUIDLE_STATE_MAX; i++) {
+	for (i = CPUIDLE_DRIVER_STATE_START; i < CPUIDLE_STATE_MAX; i++) {
 		drv->states[i].name[0] = '\0';
 		drv->states[i].desc[0] = '\0';
 	}
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/char/ipmi/ipmi_powernv.c linux-libre-4.0-gnu/drivers/char/ipmi/ipmi_powernv.c
--- linux-libre-4.0-rc7-gnu/drivers/char/ipmi/ipmi_powernv.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/char/ipmi/ipmi_powernv.c	2015-04-12 18:12:50.000000000 -0400
@@ -125,6 +125,7 @@ static int ipmi_powernv_recv(struct ipmi
 	spin_lock_irqsave(&smi->msg_lock, flags);
 
 	if (!smi->cur_msg) {
+		spin_unlock_irqrestore(&smi->msg_lock, flags);
 		pr_warn("no current message?\n");
 		return 0;
 	}
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/char/ipmi/ipmi_si_intf.c linux-libre-4.0-gnu/drivers/char/ipmi/ipmi_si_intf.c
--- linux-libre-4.0-rc7-gnu/drivers/char/ipmi/ipmi_si_intf.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/char/ipmi/ipmi_si_intf.c	2015-04-12 18:12:50.000000000 -0400
@@ -263,6 +263,11 @@ struct smi_info {
 	bool supports_event_msg_buff;
 
 	/*
+	 * Can we clear the global enables receive irq bit?
+	 */
+	bool cannot_clear_recv_irq_bit;
+
+	/*
 	 * Did we get an attention that we did not handle?
 	 */
 	bool got_attn;
@@ -461,6 +466,9 @@ static void smi_mod_timer(struct smi_inf
  * allocate messages, we just leave them in the BMC and run the system
  * polled until we can allocate some memory.  Once we have some
  * memory, we will re-enable the interrupt.
+ *
+ * Note that we cannot just use disable_irq(), since the interrupt may
+ * be shared.
  */
 static inline bool disable_si_irq(struct smi_info *smi_info)
 {
@@ -549,20 +557,15 @@ static u8 current_global_enables(struct
 
 	if (smi_info->supports_event_msg_buff)
 		enables |= IPMI_BMC_EVT_MSG_BUFF;
-	else
-		enables &= ~IPMI_BMC_EVT_MSG_BUFF;
 
-	if (smi_info->irq && !smi_info->interrupt_disabled)
+	if ((smi_info->irq && !smi_info->interrupt_disabled) ||
+	    smi_info->cannot_clear_recv_irq_bit)
 		enables |= IPMI_BMC_RCV_MSG_INTR;
-	else
-		enables &= ~IPMI_BMC_RCV_MSG_INTR;
 
 	if (smi_info->supports_event_msg_buff &&
 	    smi_info->irq && !smi_info->interrupt_disabled)
 
 		enables |= IPMI_BMC_EVT_MSG_INTR;
-	else
-		enables &= ~IPMI_BMC_EVT_MSG_INTR;
 
 	*irq_on = enables & (IPMI_BMC_EVT_MSG_INTR | IPMI_BMC_RCV_MSG_INTR);
 
@@ -2900,6 +2903,96 @@ static int try_get_dev_id(struct smi_inf
 	return rv;
 }
 
+/*
+ * Some BMCs do not support clearing the receive irq bit in the global
+ * enables (even if they don't support interrupts on the BMC).  Check
+ * for this and handle it properly.
+ */
+static void check_clr_rcv_irq(struct smi_info *smi_info)
+{
+	unsigned char         msg[3];
+	unsigned char         *resp;
+	unsigned long         resp_len;
+	int                   rv;
+
+	resp = kmalloc(IPMI_MAX_MSG_LENGTH, GFP_KERNEL);
+	if (!resp) {
+		printk(KERN_WARNING PFX "Out of memory allocating response for"
+		       " global enables command, cannot check recv irq bit"
+		       " handling.\n");
+		return;
+	}
+
+	msg[0] = IPMI_NETFN_APP_REQUEST << 2;
+	msg[1] = IPMI_GET_BMC_GLOBAL_ENABLES_CMD;
+	smi_info->handlers->start_transaction(smi_info->si_sm, msg, 2);
+
+	rv = wait_for_msg_done(smi_info);
+	if (rv) {
+		printk(KERN_WARNING PFX "Error getting response from get"
+		       " global enables command, cannot check recv irq bit"
+		       " handling.\n");
+		goto out;
+	}
+
+	resp_len = smi_info->handlers->get_result(smi_info->si_sm,
+						  resp, IPMI_MAX_MSG_LENGTH);
+
+	if (resp_len < 4 ||
+			resp[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2 ||
+			resp[1] != IPMI_GET_BMC_GLOBAL_ENABLES_CMD   ||
+			resp[2] != 0) {
+		printk(KERN_WARNING PFX "Invalid return from get global"
+		       " enables command, cannot check recv irq bit"
+		       " handling.\n");
+		rv = -EINVAL;
+		goto out;
+	}
+
+	if ((resp[3] & IPMI_BMC_RCV_MSG_INTR) == 0)
+		/* Already clear, should work ok. */
+		goto out;
+
+	msg[0] = IPMI_NETFN_APP_REQUEST << 2;
+	msg[1] = IPMI_SET_BMC_GLOBAL_ENABLES_CMD;
+	msg[2] = resp[3] & ~IPMI_BMC_RCV_MSG_INTR;
+	smi_info->handlers->start_transaction(smi_info->si_sm, msg, 3);
+
+	rv = wait_for_msg_done(smi_info);
+	if (rv) {
+		printk(KERN_WARNING PFX "Error getting response from set"
+		       " global enables command, cannot check recv irq bit"
+		       " handling.\n");
+		goto out;
+	}
+
+	resp_len = smi_info->handlers->get_result(smi_info->si_sm,
+						  resp, IPMI_MAX_MSG_LENGTH);
+
+	if (resp_len < 3 ||
+			resp[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2 ||
+			resp[1] != IPMI_SET_BMC_GLOBAL_ENABLES_CMD) {
+		printk(KERN_WARNING PFX "Invalid return from get global"
+		       " enables command, cannot check recv irq bit"
+		       " handling.\n");
+		rv = -EINVAL;
+		goto out;
+	}
+
+	if (resp[2] != 0) {
+		/*
+		 * An error when setting the event buffer bit means
+		 * clearing the bit is not supported.
+		 */
+		printk(KERN_WARNING PFX "The BMC does not support clearing"
+		       " the recv irq bit, compensating, but the BMC needs to"
+		       " be fixed.\n");
+		smi_info->cannot_clear_recv_irq_bit = true;
+	}
+ out:
+	kfree(resp);
+}
+
 static int try_enable_event_buffer(struct smi_info *smi_info)
 {
 	unsigned char         msg[3];
@@ -3395,6 +3488,8 @@ static int try_smi_init(struct smi_info
 		goto out_err;
 	}
 
+	check_clr_rcv_irq(new_smi);
+
 	setup_oem_data_handler(new_smi);
 	setup_xaction_handlers(new_smi);
 
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/char/ipmi/ipmi_ssif.c linux-libre-4.0-gnu/drivers/char/ipmi/ipmi_ssif.c
--- linux-libre-4.0-rc7-gnu/drivers/char/ipmi/ipmi_ssif.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/char/ipmi/ipmi_ssif.c	2015-04-12 18:12:50.000000000 -0400
@@ -468,11 +468,13 @@ static int ipmi_ssif_thread(void *data)
 		int result;
 
 		/* Wait for something to do */
-		wait_for_completion(&ssif_info->wake_thread);
-		init_completion(&ssif_info->wake_thread);
-
+		result = wait_for_completion_interruptible(
+						&ssif_info->wake_thread);
 		if (ssif_info->stopping)
 			break;
+		if (result == -ERESTARTSYS)
+			continue;
+		init_completion(&ssif_info->wake_thread);
 
 		if (ssif_info->i2c_read_write == I2C_SMBUS_WRITE) {
 			result = i2c_smbus_write_block_data(
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/cpufreq/cpufreq.c linux-libre-4.0-gnu/drivers/cpufreq/cpufreq.c
--- linux-libre-4.0-rc7-gnu/drivers/cpufreq/cpufreq.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/cpufreq/cpufreq.c	2015-04-12 18:12:50.000000000 -0400
@@ -1698,15 +1698,18 @@ void cpufreq_resume(void)
 		    || __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS))
 			pr_err("%s: Failed to start governor for policy: %p\n",
 				__func__, policy);
-
-		/*
-		 * schedule call cpufreq_update_policy() for boot CPU, i.e. last
-		 * policy in list. It will verify that the current freq is in
-		 * sync with what we believe it to be.
-		 */
-		if (list_is_last(&policy->policy_list, &cpufreq_policy_list))
-			schedule_work(&policy->update);
 	}
+
+	/*
+	 * schedule call cpufreq_update_policy() for first-online CPU, as that
+	 * wouldn't be hotplugged-out on suspend. It will verify that the
+	 * current freq is in sync with what we believe it to be.
+	 */
+	policy = cpufreq_cpu_get_raw(cpumask_first(cpu_online_mask));
+	if (WARN_ON(!policy))
+		return;
+
+	schedule_work(&policy->update);
 }
 
 /**
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/cpuidle/cpuidle.c linux-libre-4.0-gnu/drivers/cpuidle/cpuidle.c
--- linux-libre-4.0-rc7-gnu/drivers/cpuidle/cpuidle.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/cpuidle/cpuidle.c	2015-04-12 18:12:50.000000000 -0400
@@ -330,9 +330,6 @@ int cpuidle_enable_device(struct cpuidle
 	if (!dev->registered)
 		return -EINVAL;
 
-	if (!dev->state_count)
-		dev->state_count = drv->state_count;
-
 	ret = cpuidle_add_device_sysfs(dev);
 	if (ret)
 		return ret;
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/cpuidle/sysfs.c linux-libre-4.0-gnu/drivers/cpuidle/sysfs.c
--- linux-libre-4.0-rc7-gnu/drivers/cpuidle/sysfs.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/cpuidle/sysfs.c	2015-04-12 18:12:50.000000000 -0400
@@ -401,7 +401,7 @@ static int cpuidle_add_state_sysfs(struc
 	struct cpuidle_driver *drv = cpuidle_get_cpu_driver(device);
 
 	/* state statistics */
-	for (i = 0; i < device->state_count; i++) {
+	for (i = 0; i < drv->state_count; i++) {
 		kobj = kzalloc(sizeof(struct cpuidle_state_kobj), GFP_KERNEL);
 		if (!kobj)
 			goto error_state;
@@ -433,9 +433,10 @@ error_state:
  */
 static void cpuidle_remove_state_sysfs(struct cpuidle_device *device)
 {
+	struct cpuidle_driver *drv = cpuidle_get_cpu_driver(device);
 	int i;
 
-	for (i = 0; i < device->state_count; i++)
+	for (i = 0; i < drv->state_count; i++)
 		cpuidle_free_state_kobj(device, i);
 }
 
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/dma/cppi41.c linux-libre-4.0-gnu/drivers/dma/cppi41.c
--- linux-libre-4.0-rc7-gnu/drivers/dma/cppi41.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/dma/cppi41.c	2015-04-12 18:12:50.000000000 -0400
@@ -903,6 +903,11 @@ static const struct cppi_glue_infos *get
 	return of_id->data;
 }
 
+#define CPPI41_DMA_BUSWIDTHS	(BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | \
+				BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | \
+				BIT(DMA_SLAVE_BUSWIDTH_3_BYTES) | \
+				BIT(DMA_SLAVE_BUSWIDTH_4_BYTES))
+
 static int cppi41_dma_probe(struct platform_device *pdev)
 {
 	struct cppi41_dd *cdd;
@@ -926,6 +931,10 @@ static int cppi41_dma_probe(struct platf
 	cdd->ddev.device_issue_pending = cppi41_dma_issue_pending;
 	cdd->ddev.device_prep_slave_sg = cppi41_dma_prep_slave_sg;
 	cdd->ddev.device_terminate_all = cppi41_stop_chan;
+	cdd->ddev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
+	cdd->ddev.src_addr_widths = CPPI41_DMA_BUSWIDTHS;
+	cdd->ddev.dst_addr_widths = CPPI41_DMA_BUSWIDTHS;
+	cdd->ddev.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
 	cdd->ddev.dev = dev;
 	INIT_LIST_HEAD(&cdd->ddev.channels);
 	cpp41_dma_info.dma_cap = cdd->ddev.cap_mask;
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/dma/dmaengine.c linux-libre-4.0-gnu/drivers/dma/dmaengine.c
--- linux-libre-4.0-rc7-gnu/drivers/dma/dmaengine.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/dma/dmaengine.c	2015-04-12 18:12:50.000000000 -0400
@@ -859,9 +859,6 @@ int dma_async_device_register(struct dma
 	BUG_ON(!device->device_issue_pending);
 	BUG_ON(!device->dev);
 
-	WARN(dma_has_cap(DMA_SLAVE, device->cap_mask) && !device->directions,
-	     "this driver doesn't support generic slave capabilities reporting\n");
-
 	/* note: this only matters in the
 	 * CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=n case
 	 */
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/gpu/drm/drm_crtc.c linux-libre-4.0-gnu/drivers/gpu/drm/drm_crtc.c
--- linux-libre-4.0-rc7-gnu/drivers/gpu/drm/drm_crtc.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/gpu/drm/drm_crtc.c	2015-04-12 18:12:50.000000000 -0400
@@ -2121,7 +2121,7 @@ int drm_mode_getconnector(struct drm_dev
 	connector = drm_connector_find(dev, out_resp->connector_id);
 	if (!connector) {
 		ret = -ENOENT;
-		goto out;
+		goto out_unlock;
 	}
 
 	for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++)
@@ -2201,6 +2201,8 @@ int drm_mode_getconnector(struct drm_dev
 
 out:
 	drm_modeset_unlock(&dev->mode_config.connection_mutex);
+
+out_unlock:
 	mutex_unlock(&dev->mode_config.mutex);
 
 	return ret;
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/gpu/drm/i915/i915_drv.c linux-libre-4.0-gnu/drivers/gpu/drm/i915/i915_drv.c
--- linux-libre-4.0-rc7-gnu/drivers/gpu/drm/i915/i915_drv.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/gpu/drm/i915/i915_drv.c	2015-04-12 18:12:50.000000000 -0400
@@ -1095,6 +1095,7 @@ static void vlv_save_gunit_s0ix_state(st
 	/* Gunit-Display CZ domain, 0x182028-0x1821CF */
 	s->gu_ctl0		= I915_READ(VLV_GU_CTL0);
 	s->gu_ctl1		= I915_READ(VLV_GU_CTL1);
+	s->pcbr			= I915_READ(VLV_PCBR);
 	s->clock_gate_dis2	= I915_READ(VLV_GUNIT_CLOCK_GATE2);
 
 	/*
@@ -1189,6 +1190,7 @@ static void vlv_restore_gunit_s0ix_state
 	/* Gunit-Display CZ domain, 0x182028-0x1821CF */
 	I915_WRITE(VLV_GU_CTL0,			s->gu_ctl0);
 	I915_WRITE(VLV_GU_CTL1,			s->gu_ctl1);
+	I915_WRITE(VLV_PCBR,			s->pcbr);
 	I915_WRITE(VLV_GUNIT_CLOCK_GATE2,	s->clock_gate_dis2);
 }
 
@@ -1197,19 +1199,7 @@ int vlv_force_gfx_clock(struct drm_i915_
 	u32 val;
 	int err;
 
-	val = I915_READ(VLV_GTLC_SURVIVABILITY_REG);
-	WARN_ON(!!(val & VLV_GFX_CLK_FORCE_ON_BIT) == force_on);
-
 #define COND (I915_READ(VLV_GTLC_SURVIVABILITY_REG) & VLV_GFX_CLK_STATUS_BIT)
-	/* Wait for a previous force-off to settle */
-	if (force_on) {
-		err = wait_for(!COND, 20);
-		if (err) {
-			DRM_ERROR("timeout waiting for GFX clock force-off (%08x)\n",
-				  I915_READ(VLV_GTLC_SURVIVABILITY_REG));
-			return err;
-		}
-	}
 
 	val = I915_READ(VLV_GTLC_SURVIVABILITY_REG);
 	val &= ~VLV_GFX_CLK_FORCE_ON_BIT;
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/gpu/drm/i915/i915_drv.h linux-libre-4.0-gnu/drivers/gpu/drm/i915/i915_drv.h
--- linux-libre-4.0-rc7-gnu/drivers/gpu/drm/i915/i915_drv.h	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/gpu/drm/i915/i915_drv.h	2015-04-12 18:12:50.000000000 -0400
@@ -1094,6 +1094,7 @@ struct vlv_s0ix_state {
 	/* Display 2 CZ domain */
 	u32 gu_ctl0;
 	u32 gu_ctl1;
+	u32 pcbr;
 	u32 clock_gate_dis2;
 };
 
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/dvb-frontends/rtl2832.c linux-libre-4.0-gnu/drivers/media/dvb-frontends/rtl2832.c
--- linux-libre-4.0-rc7-gnu/drivers/media/dvb-frontends/rtl2832.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/dvb-frontends/rtl2832.c	2015-04-12 18:12:50.000000000 -0400
@@ -1240,7 +1240,7 @@ static int rtl2832_probe(struct i2c_clie
 	dev->regmap_config.max_register = 5 * 0x100,
 	dev->regmap_config.ranges = regmap_range_cfg,
 	dev->regmap_config.num_ranges = ARRAY_SIZE(regmap_range_cfg),
-	dev->regmap_config.cache_type = REGCACHE_RBTREE,
+	dev->regmap_config.cache_type = REGCACHE_NONE,
 	dev->regmap = regmap_init(&client->dev, &regmap_bus, client,
 				  &dev->regmap_config);
 	if (IS_ERR(dev->regmap)) {
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/pci/cx23885/cx23885-417.c linux-libre-4.0-gnu/drivers/media/pci/cx23885/cx23885-417.c
--- linux-libre-4.0-rc7-gnu/drivers/media/pci/cx23885/cx23885-417.c	2015-04-09 12:23:48.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/pci/cx23885/cx23885-417.c	2015-04-12 20:42:37.000000000 -0400
@@ -1339,14 +1339,13 @@ static int vidioc_querycap(struct file *
 	strlcpy(cap->driver, dev->name, sizeof(cap->driver));
 	strlcpy(cap->card, cx23885_boards[tsport->dev->board].name,
 		sizeof(cap->card));
-	sprintf(cap->bus_info, "PCI:%s", pci_name(dev->pci));
-	cap->capabilities =
-		V4L2_CAP_VIDEO_CAPTURE |
-		V4L2_CAP_READWRITE     |
-		V4L2_CAP_STREAMING     |
-		0;
+	sprintf(cap->bus_info, "PCIe:%s", pci_name(dev->pci));
+	cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE |
+			   V4L2_CAP_STREAMING;
 	if (dev->tuner_type != TUNER_ABSENT)
-		cap->capabilities |= V4L2_CAP_TUNER;
+		cap->device_caps |= V4L2_CAP_TUNER;
+	cap->capabilities = cap->device_caps | V4L2_CAP_VBI_CAPTURE |
+		V4L2_CAP_AUDIO | V4L2_CAP_DEVICE_CAPS;
 
 	return 0;
 }
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-jpeg/jpeg-core.c linux-libre-4.0-gnu/drivers/media/platform/s5p-jpeg/jpeg-core.c
--- linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-jpeg/jpeg-core.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/platform/s5p-jpeg/jpeg-core.c	2015-04-12 18:12:50.000000000 -0400
@@ -1845,6 +1845,9 @@ static void exynos4_jpeg_set_img_addr(st
 	struct s5p_jpeg_addr jpeg_addr;
 	u32 pix_size, padding_bytes = 0;
 
+	jpeg_addr.cb = 0;
+	jpeg_addr.cr = 0;
+
 	pix_size = ctx->cap_q.w * ctx->cap_q.h;
 
 	if (ctx->mode == S5P_JPEG_ENCODE) {
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos3250.c linux-libre-4.0-gnu/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos3250.c
--- linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos3250.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos3250.c	2015-04-12 18:12:50.000000000 -0400
@@ -20,7 +20,7 @@
 
 void exynos3250_jpeg_reset(void __iomem *regs)
 {
-	u32 reg = 0;
+	u32 reg = 1;
 	int count = 1000;
 
 	writel(1, regs + EXYNOS3250_SW_RESET);
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-mfc/s5p_mfc.c linux-libre-4.0-gnu/drivers/media/platform/s5p-mfc/s5p_mfc.c
--- linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-mfc/s5p_mfc.c	2015-04-09 12:24:34.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/platform/s5p-mfc/s5p_mfc.c	2015-04-12 20:43:23.000000000 -0400
@@ -833,6 +833,7 @@ static int s5p_mfc_open(struct file *fil
 	q->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
 	q->io_modes = VB2_MMAP;
 	q->drv_priv = &ctx->fh;
+	q->lock = &dev->mfc_mutex;
 	if (vdev == dev->vfd_dec) {
 		q->io_modes = VB2_MMAP;
 		q->ops = get_dec_queue_ops();
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_common.h linux-libre-4.0-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
--- linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_common.h	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_common.h	2015-04-12 18:12:50.000000000 -0400
@@ -29,7 +29,7 @@
 
 /* Offset base used to differentiate between CAPTURE and OUTPUT
 *  while mmaping */
-#define DST_QUEUE_OFF_BASE      (TASK_SIZE / 2)
+#define DST_QUEUE_OFF_BASE	(1 << 30)
 
 #define MFC_BANK1_ALLOC_CTX	0
 #define MFC_BANK2_ALLOC_CTX	1
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_opr.h linux-libre-4.0-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_opr.h
--- linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_opr.h	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_opr.h	2015-04-12 18:12:50.000000000 -0400
@@ -302,7 +302,7 @@ struct s5p_mfc_hw_ops {
 	void (*write_info)(struct s5p_mfc_ctx *ctx, unsigned int data,
 			unsigned int ofs);
 	unsigned int (*read_info)(struct s5p_mfc_ctx *ctx,
-			unsigned int ofs);
+			unsigned long ofs);
 	int (*get_dspl_y_adr)(struct s5p_mfc_dev *dev);
 	int (*get_dec_y_adr)(struct s5p_mfc_dev *dev);
 	int (*get_dspl_status)(struct s5p_mfc_dev *dev);
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c linux-libre-4.0-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
--- linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c	2015-04-12 18:12:50.000000000 -0400
@@ -263,15 +263,15 @@ static void s5p_mfc_release_dev_context_
 static void s5p_mfc_write_info_v5(struct s5p_mfc_ctx *ctx, unsigned int data,
 			unsigned int ofs)
 {
-	writel(data, (volatile void __iomem *)(ctx->shm.virt + ofs));
+	writel(data, (void *)(ctx->shm.virt + ofs));
 	wmb();
 }
 
 static unsigned int s5p_mfc_read_info_v5(struct s5p_mfc_ctx *ctx,
-				unsigned int ofs)
+				unsigned long ofs)
 {
 	rmb();
-	return readl((volatile void __iomem *)(ctx->shm.virt + ofs));
+	return readl((void *)(ctx->shm.virt + ofs));
 }
 
 static void s5p_mfc_dec_calc_dpb_size_v5(struct s5p_mfc_ctx *ctx)
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c linux-libre-4.0-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
--- linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c	2015-04-12 18:12:50.000000000 -0400
@@ -1852,17 +1852,17 @@ static void s5p_mfc_write_info_v6(struct
 		unsigned int ofs)
 {
 	s5p_mfc_clock_on();
-	writel(data, (volatile void __iomem *)((unsigned long)ofs));
+	writel(data, (void *)((unsigned long)ofs));
 	s5p_mfc_clock_off();
 }
 
 static unsigned int
-s5p_mfc_read_info_v6(struct s5p_mfc_ctx *ctx, unsigned int ofs)
+s5p_mfc_read_info_v6(struct s5p_mfc_ctx *ctx, unsigned long ofs)
 {
 	int ret;
 
 	s5p_mfc_clock_on();
-	ret = readl((volatile void __iomem *)((unsigned long)ofs));
+	ret = readl((void *)ofs);
 	s5p_mfc_clock_off();
 
 	return ret;
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-tv/Kconfig linux-libre-4.0-gnu/drivers/media/platform/s5p-tv/Kconfig
--- linux-libre-4.0-rc7-gnu/drivers/media/platform/s5p-tv/Kconfig	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/platform/s5p-tv/Kconfig	2015-04-12 18:12:50.000000000 -0400
@@ -20,6 +20,7 @@ if VIDEO_SAMSUNG_S5P_TV
 config VIDEO_SAMSUNG_S5P_HDMI
 	tristate "Samsung HDMI Driver"
 	depends on VIDEO_V4L2
+	depends on I2C
 	depends on VIDEO_SAMSUNG_S5P_TV
 	select VIDEO_SAMSUNG_S5P_HDMIPHY
 	help
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/platform/sh_veu.c linux-libre-4.0-gnu/drivers/media/platform/sh_veu.c
--- linux-libre-4.0-rc7-gnu/drivers/media/platform/sh_veu.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/platform/sh_veu.c	2015-04-12 18:12:50.000000000 -0400
@@ -1158,6 +1158,7 @@ static int sh_veu_probe(struct platform_
 	}
 
 	*vdev = sh_veu_videodev;
+	vdev->v4l2_dev = &veu->v4l2_dev;
 	spin_lock_init(&veu->lock);
 	mutex_init(&veu->fop_lock);
 	vdev->lock = &veu->fop_lock;
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/platform/soc_camera/atmel-isi.c linux-libre-4.0-gnu/drivers/media/platform/soc_camera/atmel-isi.c
--- linux-libre-4.0-rc7-gnu/drivers/media/platform/soc_camera/atmel-isi.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/platform/soc_camera/atmel-isi.c	2015-04-12 18:12:50.000000000 -0400
@@ -843,6 +843,8 @@ static int isi_camera_set_bus_param(stru
 	if (isi->pdata.full_mode)
 		cfg1 |= ISI_CFG1_FULL_MODE;
 
+	cfg1 |= ISI_CFG1_THMASK_BEATS_16;
+
 	isi_writel(isi, ISI_CTRL, ISI_CTRL_DIS);
 	isi_writel(isi, ISI_CFG1, cfg1);
 
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/platform/soc_camera/soc_camera.c linux-libre-4.0-gnu/drivers/media/platform/soc_camera/soc_camera.c
--- linux-libre-4.0-rc7-gnu/drivers/media/platform/soc_camera/soc_camera.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/platform/soc_camera/soc_camera.c	2015-04-12 18:12:50.000000000 -0400
@@ -1665,7 +1665,7 @@ eclkreg:
 eaddpdev:
 	platform_device_put(sasc->pdev);
 eallocpdev:
-	devm_kfree(ici->v4l2_dev.dev, sasc);
+	devm_kfree(ici->v4l2_dev.dev, info);
 	dev_err(ici->v4l2_dev.dev, "group probe failed: %d\n", ret);
 
 	return ret;
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/usb/dvb-usb-v2/rtl28xxu.c linux-libre-4.0-gnu/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
--- linux-libre-4.0-rc7-gnu/drivers/media/usb/dvb-usb-v2/rtl28xxu.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/usb/dvb-usb-v2/rtl28xxu.c	2015-04-12 18:12:50.000000000 -0400
@@ -780,8 +780,6 @@ static int rtl2832u_frontend_callback(vo
 		case TUNER_RTL2832_TUA9001:
 			return rtl2832u_tua9001_tuner_callback(d, cmd, arg);
 		}
-	default:
-		return -EINVAL;
 	}
 
 	return 0;
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/usb/gspca/Kconfig linux-libre-4.0-gnu/drivers/media/usb/gspca/Kconfig
--- linux-libre-4.0-rc7-gnu/drivers/media/usb/gspca/Kconfig	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/usb/gspca/Kconfig	2015-04-12 18:12:50.000000000 -0400
@@ -1,6 +1,7 @@
 menuconfig USB_GSPCA
 	tristate "GSPCA based webcams"
 	depends on VIDEO_V4L2
+	depends on INPUT || INPUT=n
 	default m
 	---help---
 	  Say Y here if you want to enable selecting webcams based
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/v4l2-core/videobuf2-core.c linux-libre-4.0-gnu/drivers/media/v4l2-core/videobuf2-core.c
--- linux-libre-4.0-rc7-gnu/drivers/media/v4l2-core/videobuf2-core.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/v4l2-core/videobuf2-core.c	2015-04-12 18:12:50.000000000 -0400
@@ -3230,18 +3230,13 @@ int vb2_thread_stop(struct vb2_queue *q)
 
 	if (threadio == NULL)
 		return 0;
-	call_void_qop(q, wait_finish, q);
 	threadio->stop = true;
-	vb2_internal_streamoff(q, q->type);
-	call_void_qop(q, wait_prepare, q);
+	/* Wake up all pending sleeps in the thread */
+	vb2_queue_error(q);
 	err = kthread_stop(threadio->thread);
-	q->fileio = NULL;
-	fileio->req.count = 0;
-	vb2_reqbufs(q, &fileio->req);
-	kfree(fileio);
+	__vb2_cleanup_fileio(q);
 	threadio->thread = NULL;
 	kfree(threadio);
-	q->fileio = NULL;
 	q->threadio = NULL;
 	return err;
 }
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/media/v4l2-core/videobuf2-dma-contig.c linux-libre-4.0-gnu/drivers/media/v4l2-core/videobuf2-dma-contig.c
--- linux-libre-4.0-rc7-gnu/drivers/media/v4l2-core/videobuf2-dma-contig.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/media/v4l2-core/videobuf2-dma-contig.c	2015-04-12 18:12:50.000000000 -0400
@@ -632,8 +632,7 @@ static void *vb2_dc_get_userptr(void *al
 	}
 
 	/* extract page list from userspace mapping */
-	ret = vb2_dc_get_user_pages(start, pages, n_pages, vma,
-				    dma_dir == DMA_FROM_DEVICE);
+	ret = vb2_dc_get_user_pages(start, pages, n_pages, vma, dma_dir);
 	if (ret) {
 		unsigned long pfn;
 		if (vb2_dc_get_user_pfn(start, n_pages, vma, &pfn) == 0) {
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/misc/enclosure.c linux-libre-4.0-gnu/drivers/misc/enclosure.c
--- linux-libre-4.0-rc7-gnu/drivers/misc/enclosure.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/misc/enclosure.c	2015-04-12 18:12:50.000000000 -0400
@@ -202,16 +202,17 @@ static void enclosure_remove_links(struc
 {
 	char name[ENCLOSURE_NAME_SIZE];
 
+	enclosure_link_name(cdev, name);
+
 	/*
 	 * In odd circumstances, like multipath devices, something else may
 	 * already have removed the links, so check for this condition first.
 	 */
-	if (!cdev->dev->kobj.sd)
-		return;
+	if (cdev->dev->kobj.sd)
+		sysfs_remove_link(&cdev->dev->kobj, name);
 
-	enclosure_link_name(cdev, name);
-	sysfs_remove_link(&cdev->dev->kobj, name);
-	sysfs_remove_link(&cdev->cdev.kobj, "device");
+	if (cdev->cdev.kobj.sd)
+		sysfs_remove_link(&cdev->cdev.kobj, "device");
 }
 
 static int enclosure_add_links(struct enclosure_component *cdev)
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/pci/host/pcie-designware.c linux-libre-4.0-gnu/drivers/pci/host/pcie-designware.c
--- linux-libre-4.0-rc7-gnu/drivers/pci/host/pcie-designware.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/pci/host/pcie-designware.c	2015-04-12 18:12:50.000000000 -0400
@@ -342,7 +342,7 @@ static const struct irq_domain_ops msi_d
 	.map = dw_pcie_msi_map,
 };
 
-int __init dw_pcie_host_init(struct pcie_port *pp)
+int dw_pcie_host_init(struct pcie_port *pp)
 {
 	struct device_node *np = pp->dev->of_node;
 	struct platform_device *pdev = to_platform_device(pp->dev);
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/pci/host/pcie-spear13xx.c linux-libre-4.0-gnu/drivers/pci/host/pcie-spear13xx.c
--- linux-libre-4.0-rc7-gnu/drivers/pci/host/pcie-spear13xx.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/pci/host/pcie-spear13xx.c	2015-04-12 18:12:50.000000000 -0400
@@ -269,7 +269,7 @@ static struct pcie_host_ops spear13xx_pc
 	.host_init = spear13xx_pcie_host_init,
 };
 
-static int __init spear13xx_add_pcie_port(struct pcie_port *pp,
+static int spear13xx_add_pcie_port(struct pcie_port *pp,
 					 struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -299,7 +299,7 @@ static int __init spear13xx_add_pcie_por
 	return 0;
 }
 
-static int __init spear13xx_pcie_probe(struct platform_device *pdev)
+static int spear13xx_pcie_probe(struct platform_device *pdev)
 {
 	struct spear13xx_pcie *spear13xx_pcie;
 	struct pcie_port *pp;
@@ -370,7 +370,7 @@ static const struct of_device_id spear13
 };
 MODULE_DEVICE_TABLE(of, spear13xx_pcie_of_match);
 
-static struct platform_driver spear13xx_pcie_driver __initdata = {
+static struct platform_driver spear13xx_pcie_driver = {
 	.probe		= spear13xx_pcie_probe,
 	.driver = {
 		.name	= "spear-pcie",
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/pci/hotplug/cpci_hotplug_pci.c linux-libre-4.0-gnu/drivers/pci/hotplug/cpci_hotplug_pci.c
--- linux-libre-4.0-rc7-gnu/drivers/pci/hotplug/cpci_hotplug_pci.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/pci/hotplug/cpci_hotplug_pci.c	2015-04-12 18:12:50.000000000 -0400
@@ -286,11 +286,12 @@ int cpci_configure_slot(struct slot *slo
 	}
 	parent = slot->dev->bus;
 
-	list_for_each_entry(dev, &parent->devices, bus_list)
+	list_for_each_entry(dev, &parent->devices, bus_list) {
 		if (PCI_SLOT(dev->devfn) != PCI_SLOT(slot->devfn))
 			continue;
 		if (pci_is_bridge(dev))
 			pci_hp_add_bridge(dev);
+	}
 
 
 	pci_assign_unassigned_bridge_resources(parent->self);
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/pci/pci-acpi.c linux-libre-4.0-gnu/drivers/pci/pci-acpi.c
--- linux-libre-4.0-rc7-gnu/drivers/pci/pci-acpi.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/pci/pci-acpi.c	2015-04-12 18:12:50.000000000 -0400
@@ -248,6 +248,9 @@ int pci_get_hp_params(struct pci_dev *de
 	acpi_handle handle, phandle;
 	struct pci_bus *pbus;
 
+	if (acpi_pci_disabled)
+		return -ENODEV;
+
 	handle = NULL;
 	for (pbus = dev->bus; pbus; pbus = pbus->parent) {
 		handle = acpi_pci_get_bridge_handle(pbus);
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/pci/pcie/aer/aerdrv_errprint.c linux-libre-4.0-gnu/drivers/pci/pcie/aer/aerdrv_errprint.c
--- linux-libre-4.0-rc7-gnu/drivers/pci/pcie/aer/aerdrv_errprint.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/pci/pcie/aer/aerdrv_errprint.c	2015-04-12 18:12:50.000000000 -0400
@@ -132,16 +132,8 @@ static const char *aer_agent_string[] =
 static void __print_tlp_header(struct pci_dev *dev,
 			       struct aer_header_log_regs *t)
 {
-	unsigned char *tlp = (unsigned char *)&t;
-
-	dev_err(&dev->dev, "  TLP Header:"
-		" %02x%02x%02x%02x %02x%02x%02x%02x"
-		" %02x%02x%02x%02x %02x%02x%02x%02x\n",
-		*(tlp + 3), *(tlp + 2), *(tlp + 1), *tlp,
-		*(tlp + 7), *(tlp + 6), *(tlp + 5), *(tlp + 4),
-		*(tlp + 11), *(tlp + 10), *(tlp + 9),
-		*(tlp + 8), *(tlp + 15), *(tlp + 14),
-		*(tlp + 13), *(tlp + 12));
+	dev_err(&dev->dev, "  TLP Header: %08x %08x %08x %08x\n",
+		t->dw0, t->dw1, t->dw2, t->dw3);
 }
 
 static void __aer_print_error(struct pci_dev *dev,
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/scsi/be2iscsi/be_main.c linux-libre-4.0-gnu/drivers/scsi/be2iscsi/be_main.c
--- linux-libre-4.0-rc7-gnu/drivers/scsi/be2iscsi/be_main.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/scsi/be2iscsi/be_main.c	2015-04-12 18:12:50.000000000 -0400
@@ -5734,9 +5734,9 @@ free_port:
 hba_free:
 	if (phba->msix_enabled)
 		pci_disable_msix(phba->pcidev);
-	iscsi_host_remove(phba->shost);
 	pci_dev_put(phba->pcidev);
 	iscsi_host_free(phba->shost);
+	pci_set_drvdata(pcidev, NULL);
 disable_pci:
 	pci_disable_device(pcidev);
 	return ret;
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/scsi/scsi_lib.c linux-libre-4.0-gnu/drivers/scsi/scsi_lib.c
--- linux-libre-4.0-rc7-gnu/drivers/scsi/scsi_lib.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/scsi/scsi_lib.c	2015-04-12 18:12:50.000000000 -0400
@@ -1311,9 +1311,11 @@ scsi_prep_state_check(struct scsi_device
 				    "rejecting I/O to dead device\n");
 			ret = BLKPREP_KILL;
 			break;
-		case SDEV_QUIESCE:
 		case SDEV_BLOCK:
 		case SDEV_CREATED_BLOCK:
+			ret = BLKPREP_DEFER;
+			break;
+		case SDEV_QUIESCE:
 			/*
 			 * If the devices is blocked we defer normal commands.
 			 */
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/target/iscsi/iscsi_target.c linux-libre-4.0-gnu/drivers/target/iscsi/iscsi_target.c
--- linux-libre-4.0-rc7-gnu/drivers/target/iscsi/iscsi_target.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/target/iscsi/iscsi_target.c	2015-04-12 18:12:50.000000000 -0400
@@ -1181,7 +1181,7 @@ iscsit_handle_scsi_cmd(struct iscsi_conn
 	 * traditional iSCSI block I/O.
 	 */
 	if (iscsit_allocate_iovecs(cmd) < 0) {
-		return iscsit_add_reject_cmd(cmd,
+		return iscsit_reject_cmd(cmd,
 				ISCSI_REASON_BOOKMARK_NO_RESOURCES, buf);
 	}
 	immed_data = cmd->immediate_data;
@@ -3468,6 +3468,7 @@ iscsit_build_sendtargets_response(struct
 						tpg_np_list) {
 				struct iscsi_np *np = tpg_np->tpg_np;
 				bool inaddr_any = iscsit_check_inaddr_any(np);
+				char *fmt_str;
 
 				if (np->np_network_transport != network_transport)
 					continue;
@@ -3495,8 +3496,12 @@ iscsit_build_sendtargets_response(struct
 					}
 				}
 
-				len = sprintf(buf, "TargetAddress="
-					"%s:%hu,%hu",
+				if (np->np_sockaddr.ss_family == AF_INET6)
+					fmt_str = "TargetAddress=[%s]:%hu,%hu";
+				else
+					fmt_str = "TargetAddress=%s:%hu,%hu";
+
+				len = sprintf(buf, fmt_str,
 					inaddr_any ? conn->local_ip : np->np_ip,
 					np->np_port,
 					tpg->tpgt);
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/target/target_core_device.c linux-libre-4.0-gnu/drivers/target/target_core_device.c
--- linux-libre-4.0-rc7-gnu/drivers/target/target_core_device.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/target/target_core_device.c	2015-04-12 18:12:50.000000000 -0400
@@ -781,8 +781,8 @@ int se_dev_set_emulate_fua_write(struct
 	}
 	if (flag &&
 	    dev->transport->get_write_cache) {
-		pr_err("emulate_fua_write not supported for this device\n");
-		return -EINVAL;
+		pr_warn("emulate_fua_write not supported for this device, ignoring\n");
+		return 0;
 	}
 	if (dev->export_count) {
 		pr_err("emulate_fua_write cannot be changed with active"
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/thermal/st/st_thermal.c linux-libre-4.0-gnu/drivers/thermal/st/st_thermal.c
--- linux-libre-4.0-rc7-gnu/drivers/thermal/st/st_thermal.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/thermal/st/st_thermal.c	2015-04-12 18:12:50.000000000 -0400
@@ -25,7 +25,7 @@
  * Function to allocate regfields which are common
  * between syscfg and memory mapped based sensors
  */
-int st_thermal_alloc_regfields(struct st_thermal_sensor *sensor)
+static int st_thermal_alloc_regfields(struct st_thermal_sensor *sensor)
 {
 	struct device *dev = sensor->dev;
 	struct regmap *regmap = sensor->regmap;
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/thermal/st/st_thermal_memmap.c linux-libre-4.0-gnu/drivers/thermal/st/st_thermal_memmap.c
--- linux-libre-4.0-rc7-gnu/drivers/thermal/st/st_thermal_memmap.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/thermal/st/st_thermal_memmap.c	2015-04-12 18:12:50.000000000 -0400
@@ -157,7 +157,7 @@ static const struct st_thermal_sensor_op
 };
 
 /* Compatible device data stih416 mpe thermal sensor */
-const struct st_thermal_compat_data st_416mpe_cdata = {
+static const struct st_thermal_compat_data st_416mpe_cdata = {
 	.reg_fields		= st_mmap_thermal_regfields,
 	.ops			= &st_mmap_sensor_ops,
 	.calibration_val	= 14,
@@ -166,7 +166,7 @@ const struct st_thermal_compat_data st_4
 };
 
 /* Compatible device data stih407 thermal sensor */
-const struct st_thermal_compat_data st_407_cdata = {
+static const struct st_thermal_compat_data st_407_cdata = {
 	.reg_fields		= st_mmap_thermal_regfields,
 	.ops			= &st_mmap_sensor_ops,
 	.calibration_val	= 16,
@@ -174,19 +174,19 @@ const struct st_thermal_compat_data st_4
 	.crit_temp		= 120,
 };
 
-static struct of_device_id st_mmap_thermal_of_match[] = {
+static const struct of_device_id st_mmap_thermal_of_match[] = {
 	{ .compatible = "st,stih416-mpe-thermal", .data = &st_416mpe_cdata },
 	{ .compatible = "st,stih407-thermal",     .data = &st_407_cdata },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, st_mmap_thermal_of_match);
 
-int st_mmap_probe(struct platform_device *pdev)
+static int st_mmap_probe(struct platform_device *pdev)
 {
 	return st_thermal_register(pdev,  st_mmap_thermal_of_match);
 }
 
-int st_mmap_remove(struct platform_device *pdev)
+static int st_mmap_remove(struct platform_device *pdev)
 {
 	return st_thermal_unregister(pdev);
 }
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/thermal/st/st_thermal_syscfg.c linux-libre-4.0-gnu/drivers/thermal/st/st_thermal_syscfg.c
--- linux-libre-4.0-rc7-gnu/drivers/thermal/st/st_thermal_syscfg.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/thermal/st/st_thermal_syscfg.c	2015-04-12 18:12:50.000000000 -0400
@@ -104,7 +104,7 @@ static const struct st_thermal_sensor_op
 };
 
 /* Compatible device data for stih415 sas thermal sensor */
-const struct st_thermal_compat_data st_415sas_cdata = {
+static const struct st_thermal_compat_data st_415sas_cdata = {
 	.sys_compat		= "st,stih415-front-syscfg",
 	.reg_fields		= st_415sas_regfields,
 	.ops			= &st_syscfg_sensor_ops,
@@ -114,7 +114,7 @@ const struct st_thermal_compat_data st_4
 };
 
 /* Compatible device data for stih415 mpe thermal sensor */
-const struct st_thermal_compat_data st_415mpe_cdata = {
+static const struct st_thermal_compat_data st_415mpe_cdata = {
 	.sys_compat		= "st,stih415-system-syscfg",
 	.reg_fields		= st_415mpe_regfields,
 	.ops			= &st_syscfg_sensor_ops,
@@ -124,7 +124,7 @@ const struct st_thermal_compat_data st_4
 };
 
 /* Compatible device data for stih416 sas thermal sensor */
-const struct st_thermal_compat_data st_416sas_cdata = {
+static const struct st_thermal_compat_data st_416sas_cdata = {
 	.sys_compat		= "st,stih416-front-syscfg",
 	.reg_fields		= st_416sas_regfields,
 	.ops			= &st_syscfg_sensor_ops,
@@ -134,7 +134,7 @@ const struct st_thermal_compat_data st_4
 };
 
 /* Compatible device data for stid127 thermal sensor */
-const struct st_thermal_compat_data st_127_cdata = {
+static const struct st_thermal_compat_data st_127_cdata = {
 	.sys_compat		= "st,stid127-cpu-syscfg",
 	.reg_fields		= st_127_regfields,
 	.ops			= &st_syscfg_sensor_ops,
@@ -143,7 +143,7 @@ const struct st_thermal_compat_data st_1
 	.crit_temp		= 120,
 };
 
-static struct of_device_id st_syscfg_thermal_of_match[] = {
+static const struct of_device_id st_syscfg_thermal_of_match[] = {
 	{ .compatible = "st,stih415-sas-thermal", .data = &st_415sas_cdata },
 	{ .compatible = "st,stih415-mpe-thermal", .data = &st_415mpe_cdata },
 	{ .compatible = "st,stih416-sas-thermal", .data = &st_416sas_cdata },
@@ -152,12 +152,12 @@ static struct of_device_id st_syscfg_the
 };
 MODULE_DEVICE_TABLE(of, st_syscfg_thermal_of_match);
 
-int st_syscfg_probe(struct platform_device *pdev)
+static int st_syscfg_probe(struct platform_device *pdev)
 {
 	return st_thermal_register(pdev, st_syscfg_thermal_of_match);
 }
 
-int st_syscfg_remove(struct platform_device *pdev)
+static int st_syscfg_remove(struct platform_device *pdev)
 {
 	return st_thermal_unregister(pdev);
 }
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/drivers/thermal/thermal_core.c linux-libre-4.0-gnu/drivers/thermal/thermal_core.c
--- linux-libre-4.0-rc7-gnu/drivers/thermal/thermal_core.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/drivers/thermal/thermal_core.c	2015-04-12 18:12:50.000000000 -0400
@@ -458,8 +458,10 @@ static void update_temperature(struct th
 
 	ret = thermal_zone_get_temp(tz, &temp);
 	if (ret) {
-		dev_warn(&tz->device, "failed to read out thermal zone %d\n",
-			 tz->id);
+		if (ret != -EAGAIN)
+			dev_warn(&tz->device,
+				 "failed to read out thermal zone (%d)\n",
+				 ret);
 		return;
 	}
 
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/fs/aio.c linux-libre-4.0-gnu/fs/aio.c
--- linux-libre-4.0-rc7-gnu/fs/aio.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/fs/aio.c	2015-04-12 18:12:50.000000000 -0400
@@ -278,11 +278,11 @@ static int aio_ring_mmap(struct file *fi
 	return 0;
 }
 
-static void aio_ring_remap(struct file *file, struct vm_area_struct *vma)
+static int aio_ring_remap(struct file *file, struct vm_area_struct *vma)
 {
 	struct mm_struct *mm = vma->vm_mm;
 	struct kioctx_table *table;
-	int i;
+	int i, res = -EINVAL;
 
 	spin_lock(&mm->ioctx_lock);
 	rcu_read_lock();
@@ -292,13 +292,17 @@ static void aio_ring_remap(struct file *
 
 		ctx = table->table[i];
 		if (ctx && ctx->aio_ring_file == file) {
-			ctx->user_id = ctx->mmap_base = vma->vm_start;
+			if (!atomic_read(&ctx->dead)) {
+				ctx->user_id = ctx->mmap_base = vma->vm_start;
+				res = 0;
+			}
 			break;
 		}
 	}
 
 	rcu_read_unlock();
 	spin_unlock(&mm->ioctx_lock);
+	return res;
 }
 
 static const struct file_operations aio_ring_fops = {
@@ -727,6 +731,9 @@ static struct kioctx *ioctx_alloc(unsign
 err_cleanup:
 	aio_nr_sub(ctx->max_reqs);
 err_ctx:
+	atomic_set(&ctx->dead, 1);
+	if (ctx->mmap_size)
+		vm_munmap(ctx->mmap_base, ctx->mmap_size);
 	aio_free_ring(ctx);
 err:
 	mutex_unlock(&ctx->ring_lock);
@@ -748,11 +755,12 @@ static int kill_ioctx(struct mm_struct *
 {
 	struct kioctx_table *table;
 
-	if (atomic_xchg(&ctx->dead, 1))
+	spin_lock(&mm->ioctx_lock);
+	if (atomic_xchg(&ctx->dead, 1)) {
+		spin_unlock(&mm->ioctx_lock);
 		return -EINVAL;
+	}
 
-
-	spin_lock(&mm->ioctx_lock);
 	table = rcu_dereference_raw(mm->ioctx_table);
 	WARN_ON(ctx != table->table[ctx->id]);
 	table->table[ctx->id] = NULL;
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/fs/ocfs2/file.c linux-libre-4.0-gnu/fs/ocfs2/file.c
--- linux-libre-4.0-rc7-gnu/fs/ocfs2/file.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/fs/ocfs2/file.c	2015-04-12 18:12:50.000000000 -0400
@@ -2394,7 +2394,6 @@ relock:
 		/*
 		 * for completing the rest of the request.
 		 */
-		*ppos += written;
 		count -= written;
 		written_buffered = generic_perform_write(file, from, *ppos);
 		/*
@@ -2409,7 +2408,6 @@ relock:
 			goto out_dio;
 		}
 
-		iocb->ki_pos = *ppos + written_buffered;
 		/* We need to ensure that the page cache pages are written to
 		 * disk and invalidated to preserve the expected O_DIRECT
 		 * semantics.
@@ -2418,6 +2416,7 @@ relock:
 		ret = filemap_write_and_wait_range(file->f_mapping, *ppos,
 				endbyte);
 		if (ret == 0) {
+			iocb->ki_pos = *ppos + written_buffered;
 			written += written_buffered;
 			invalidate_mapping_pages(mapping,
 					*ppos >> PAGE_CACHE_SHIFT,
@@ -2440,10 +2439,14 @@ out_dio:
 	/* buffered aio wouldn't have proper lock coverage today */
 	BUG_ON(ret == -EIOCBQUEUED && !(file->f_flags & O_DIRECT));
 
+	if (unlikely(written <= 0))
+		goto no_sync;
+
 	if (((file->f_flags & O_DSYNC) && !direct_io) || IS_SYNC(inode) ||
 	    ((file->f_flags & O_DIRECT) && !direct_io)) {
-		ret = filemap_fdatawrite_range(file->f_mapping, *ppos,
-					       *ppos + count - 1);
+		ret = filemap_fdatawrite_range(file->f_mapping,
+					       iocb->ki_pos - written,
+					       iocb->ki_pos - 1);
 		if (ret < 0)
 			written = ret;
 
@@ -2454,10 +2457,12 @@ out_dio:
 		}
 
 		if (!ret)
-			ret = filemap_fdatawait_range(file->f_mapping, *ppos,
-						      *ppos + count - 1);
+			ret = filemap_fdatawait_range(file->f_mapping,
+						      iocb->ki_pos - written,
+						      iocb->ki_pos - 1);
 	}
 
+no_sync:
 	/*
 	 * deep in g_f_a_w_n()->ocfs2_direct_IO we pass in a ocfs2_dio_end_io
 	 * function pointer which is called when o_direct io completes so that
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/include/linux/blk_types.h linux-libre-4.0-gnu/include/linux/blk_types.h
--- linux-libre-4.0-rc7-gnu/include/linux/blk_types.h	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/include/linux/blk_types.h	2015-04-12 18:12:50.000000000 -0400
@@ -181,7 +181,9 @@ enum rq_flag_bits {
 	__REQ_ELVPRIV,		/* elevator private data attached */
 	__REQ_FAILED,		/* set if the request failed */
 	__REQ_QUIET,		/* don't worry about errors */
-	__REQ_PREEMPT,		/* set for "ide_preempt" requests */
+	__REQ_PREEMPT,		/* set for "ide_preempt" requests and also
+				   for requests for which the SCSI "quiesce"
+				   state must be ignored. */
 	__REQ_ALLOCED,		/* request came from our alloc pool */
 	__REQ_COPY_USER,	/* contains copies of user pages */
 	__REQ_FLUSH_SEQ,	/* request for flush sequence */
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/include/linux/cpuidle.h linux-libre-4.0-gnu/include/linux/cpuidle.h
--- linux-libre-4.0-rc7-gnu/include/linux/cpuidle.h	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/include/linux/cpuidle.h	2015-04-12 18:12:50.000000000 -0400
@@ -77,7 +77,6 @@ struct cpuidle_device {
 	unsigned int		cpu;
 
 	int			last_residency;
-	int			state_count;
 	struct cpuidle_state_usage	states_usage[CPUIDLE_STATE_MAX];
 	struct cpuidle_state_kobj *kobjs[CPUIDLE_STATE_MAX];
 	struct cpuidle_driver_kobj *kobj_driver;
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/include/linux/dmapool.h linux-libre-4.0-gnu/include/linux/dmapool.h
--- linux-libre-4.0-rc7-gnu/include/linux/dmapool.h	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/include/linux/dmapool.h	2015-04-12 18:12:50.000000000 -0400
@@ -14,6 +14,8 @@
 #include <asm/io.h>
 #include <asm/scatterlist.h>
 
+struct device;
+
 struct dma_pool *dma_pool_create(const char *name, struct device *dev, 
 			size_t size, size_t align, size_t allocation);
 
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/include/linux/fs.h linux-libre-4.0-gnu/include/linux/fs.h
--- linux-libre-4.0-rc7-gnu/include/linux/fs.h	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/include/linux/fs.h	2015-04-12 18:12:50.000000000 -0400
@@ -1549,7 +1549,7 @@ struct file_operations {
 	long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
 	long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
 	int (*mmap) (struct file *, struct vm_area_struct *);
-	void (*mremap)(struct file *, struct vm_area_struct *);
+	int (*mremap)(struct file *, struct vm_area_struct *);
 	int (*open) (struct inode *, struct file *);
 	int (*flush) (struct file *, fl_owner_t id);
 	int (*release) (struct inode *, struct file *);
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/include/linux/mmzone.h linux-libre-4.0-gnu/include/linux/mmzone.h
--- linux-libre-4.0-rc7-gnu/include/linux/mmzone.h	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/include/linux/mmzone.h	2015-04-12 18:12:50.000000000 -0400
@@ -474,16 +474,15 @@ struct zone {
 	unsigned long		wait_table_bits;
 
 	ZONE_PADDING(_pad1_)
-
-	/* Write-intensive fields used from the page allocator */
-	spinlock_t		lock;
-
 	/* free areas of different sizes */
 	struct free_area	free_area[MAX_ORDER];
 
 	/* zone flags, see below */
 	unsigned long		flags;
 
+	/* Write-intensive fields used from the page allocator */
+	spinlock_t		lock;
+
 	ZONE_PADDING(_pad2_)
 
 	/* Write-intensive fields used by page reclaim */
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/include/media/atmel-isi.h linux-libre-4.0-gnu/include/media/atmel-isi.h
--- linux-libre-4.0-rc7-gnu/include/media/atmel-isi.h	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/include/media/atmel-isi.h	2015-04-12 18:12:50.000000000 -0400
@@ -59,6 +59,10 @@
 #define		ISI_CFG1_FRATE_DIV_MASK		(7 << 8)
 #define ISI_CFG1_DISCR				(1 << 11)
 #define ISI_CFG1_FULL_MODE			(1 << 12)
+/* Definition for THMASK(ISI_V2) */
+#define		ISI_CFG1_THMASK_BEATS_4		(0 << 13)
+#define		ISI_CFG1_THMASK_BEATS_8		(1 << 13)
+#define		ISI_CFG1_THMASK_BEATS_16	(2 << 13)
 
 /* Bitfields in CFG2 */
 #define ISI_CFG2_GRAYSCALE			(1 << 13)
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/kernel/module.c linux-libre-4.0-gnu/kernel/module.c
--- linux-libre-4.0-rc7-gnu/kernel/module.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/kernel/module.c	2015-04-12 18:12:50.000000000 -0400
@@ -2479,6 +2479,23 @@ static int elf_header_check(struct load_
 	return 0;
 }
 
+#define COPY_CHUNK_SIZE (16*PAGE_SIZE)
+
+static int copy_chunked_from_user(void *dst, const void __user *usrc, unsigned long len)
+{
+	do {
+		unsigned long n = min(len, COPY_CHUNK_SIZE);
+
+		if (copy_from_user(dst, usrc, n) != 0)
+			return -EFAULT;
+		cond_resched();
+		dst += n;
+		usrc += n;
+		len -= n;
+	} while (len);
+	return 0;
+}
+
 /* Sets info->hdr and info->len. */
 static int copy_module_from_user(const void __user *umod, unsigned long len,
 				  struct load_info *info)
@@ -2498,7 +2515,7 @@ static int copy_module_from_user(const v
 	if (!info->hdr)
 		return -ENOMEM;
 
-	if (copy_from_user(info->hdr, umod, info->len) != 0) {
+	if (copy_chunked_from_user(info->hdr, umod, info->len) != 0) {
 		vfree(info->hdr);
 		return -EFAULT;
 	}
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/kernel/power/snapshot.c linux-libre-4.0-gnu/kernel/power/snapshot.c
--- linux-libre-4.0-rc7-gnu/kernel/power/snapshot.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/kernel/power/snapshot.c	2015-04-12 18:12:50.000000000 -0400
@@ -955,25 +955,6 @@ static void mark_nosave_pages(struct mem
 	}
 }
 
-static bool is_nosave_page(unsigned long pfn)
-{
-	struct nosave_region *region;
-
-	list_for_each_entry(region, &nosave_regions, list) {
-		if (pfn >= region->start_pfn && pfn < region->end_pfn) {
-			pr_err("PM: %#010llx in e820 nosave region: "
-			       "[mem %#010llx-%#010llx]\n",
-			       (unsigned long long) pfn << PAGE_SHIFT,
-			       (unsigned long long) region->start_pfn << PAGE_SHIFT,
-			       ((unsigned long long) region->end_pfn << PAGE_SHIFT)
-					- 1);
-			return true;
-		}
-	}
-
-	return false;
-}
-
 /**
  *	create_basic_memory_bitmaps - create bitmaps needed for marking page
  *	frames that should not be saved and free page frames.  The pointers
@@ -2042,7 +2023,7 @@ static int mark_unsafe_pages(struct memo
 	do {
 		pfn = memory_bm_next_pfn(bm);
 		if (likely(pfn != BM_END_OF_MAP)) {
-			if (likely(pfn_valid(pfn)) && !is_nosave_page(pfn))
+			if (likely(pfn_valid(pfn)))
 				swsusp_set_page_free(pfn_to_page(pfn));
 			else
 				return -EFAULT;
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/kernel/sched/fair.c linux-libre-4.0-gnu/kernel/sched/fair.c
--- linux-libre-4.0-rc7-gnu/kernel/sched/fair.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/kernel/sched/fair.c	2015-04-12 18:12:50.000000000 -0400
@@ -2165,8 +2165,10 @@ void task_numa_work(struct callback_head
 		vma = mm->mmap;
 	}
 	for (; vma; vma = vma->vm_next) {
-		if (!vma_migratable(vma) || !vma_policy_mof(vma))
+		if (!vma_migratable(vma) || !vma_policy_mof(vma) ||
+			is_vm_hugetlb_page(vma)) {
 			continue;
+		}
 
 		/*
 		 * Shared library pages mapped by multiple processes are not
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/Makefile linux-libre-4.0-gnu/Makefile
--- linux-libre-4.0-rc7-gnu/Makefile	2015-04-09 12:17:11.000000000 -0400
+++ linux-libre-4.0-gnu/Makefile	2015-04-12 20:35:50.000000000 -0400
@@ -1,7 +1,7 @@
 VERSION = 4
 PATCHLEVEL = 0
 SUBLEVEL = 0
-EXTRAVERSION = -rc7-gnu
+EXTRAVERSION = -gnu
 NAME = Hurr durr I'ma sheep
 
 # *DOCUMENTATION*
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/mm/mremap.c linux-libre-4.0-gnu/mm/mremap.c
--- linux-libre-4.0-rc7-gnu/mm/mremap.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/mm/mremap.c	2015-04-12 18:12:50.000000000 -0400
@@ -286,8 +286,14 @@ static unsigned long move_vma(struct vm_
 		old_len = new_len;
 		old_addr = new_addr;
 		new_addr = -ENOMEM;
-	} else if (vma->vm_file && vma->vm_file->f_op->mremap)
-		vma->vm_file->f_op->mremap(vma->vm_file, new_vma);
+	} else if (vma->vm_file && vma->vm_file->f_op->mremap) {
+		err = vma->vm_file->f_op->mremap(vma->vm_file, new_vma);
+		if (err < 0) {
+			move_page_tables(new_vma, new_addr, vma, old_addr,
+					 moved_len, true);
+			return err;
+		}
+	}
 
 	/* Conceal VM_ACCOUNT so old reservation is not undone */
 	if (vm_flags & VM_ACCOUNT) {
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/net/ceph/messenger.c linux-libre-4.0-gnu/net/ceph/messenger.c
--- linux-libre-4.0-rc7-gnu/net/ceph/messenger.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/net/ceph/messenger.c	2015-04-12 18:12:50.000000000 -0400
@@ -484,7 +484,7 @@ static int ceph_tcp_connect(struct ceph_
 			       IPPROTO_TCP, &sock);
 	if (ret)
 		return ret;
-	sock->sk->sk_allocation = GFP_NOFS | __GFP_MEMALLOC;
+	sock->sk->sk_allocation = GFP_NOFS;
 
 #ifdef CONFIG_LOCKDEP
 	lockdep_set_class(&sock->sk->sk_lock, &socket_class);
@@ -520,8 +520,6 @@ static int ceph_tcp_connect(struct ceph_
 			       ret);
 	}
 
-	sk_set_memalloc(sock->sk);
-
 	con->sock = sock;
 	return 0;
 }
@@ -2808,11 +2806,8 @@ static void con_work(struct work_struct
 {
 	struct ceph_connection *con = container_of(work, struct ceph_connection,
 						   work.work);
-	unsigned long pflags = current->flags;
 	bool fault;
 
-	current->flags |= PF_MEMALLOC;
-
 	mutex_lock(&con->mutex);
 	while (true) {
 		int ret;
@@ -2866,8 +2861,6 @@ static void con_work(struct work_struct
 		con_fault_finish(con);
 
 	con->ops->put(con);
-
-	tsk_restore_flags(current, pflags, PF_MEMALLOC);
 }
 
 /*
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/sound/firewire/bebob/bebob_maudio.c linux-libre-4.0-gnu/sound/firewire/bebob/bebob_maudio.c
--- linux-libre-4.0-rc7-gnu/sound/firewire/bebob/bebob_maudio.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/sound/firewire/bebob/bebob_maudio.c	2015-04-12 18:12:50.000000000 -0400
@@ -96,10 +96,10 @@ int snd_bebob_maudio_load_firmware(struc
 	struct fw_device *device = fw_parent_device(unit);
 	int err, rcode;
 	u64 date;
-	__be32 cues[3] = {
-		MAUDIO_BOOTLOADER_CUE1,
-		MAUDIO_BOOTLOADER_CUE2,
-		MAUDIO_BOOTLOADER_CUE3
+	__le32 cues[3] = {
+		cpu_to_le32(MAUDIO_BOOTLOADER_CUE1),
+		cpu_to_le32(MAUDIO_BOOTLOADER_CUE2),
+		cpu_to_le32(MAUDIO_BOOTLOADER_CUE3)
 	};
 
 	/* check date of software used to build */
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/sound/pci/hda/patch_realtek.c linux-libre-4.0-gnu/sound/pci/hda/patch_realtek.c
--- linux-libre-4.0-rc7-gnu/sound/pci/hda/patch_realtek.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/sound/pci/hda/patch_realtek.c	2015-04-12 18:12:50.000000000 -0400
@@ -2912,6 +2912,8 @@ static void alc283_init(struct hda_codec
 
 	if (!hp_pin)
 		return;
+
+	msleep(30);
 	hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
 
 	/* Index 0x43 Direct Drive HP AMP LPM Control 1 */
@@ -3607,6 +3609,7 @@ static void alc_headset_mode_unplugged(s
 
 	switch (codec->vendor_id) {
 	case 0x10ec0255:
+	case 0x10ec0256:
 		alc_process_coef_fw(codec, coef0255);
 		break;
 	case 0x10ec0233:
@@ -3662,6 +3665,7 @@ static void alc_headset_mode_mic_in(stru
 
 	switch (codec->vendor_id) {
 	case 0x10ec0255:
+	case 0x10ec0256:
 		alc_write_coef_idx(codec, 0x45, 0xc489);
 		snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
 		alc_process_coef_fw(codec, coef0255);
@@ -3731,6 +3735,7 @@ static void alc_headset_mode_default(str
 
 	switch (codec->vendor_id) {
 	case 0x10ec0255:
+	case 0x10ec0256:
 		alc_process_coef_fw(codec, coef0255);
 		break;
 	case 0x10ec0233:
@@ -3785,6 +3790,7 @@ static void alc_headset_mode_ctia(struct
 
 	switch (codec->vendor_id) {
 	case 0x10ec0255:
+	case 0x10ec0256:
 		alc_process_coef_fw(codec, coef0255);
 		break;
 	case 0x10ec0233:
@@ -3839,6 +3845,7 @@ static void alc_headset_mode_omtp(struct
 
 	switch (codec->vendor_id) {
 	case 0x10ec0255:
+	case 0x10ec0256:
 		alc_process_coef_fw(codec, coef0255);
 		break;
 	case 0x10ec0233:
@@ -3884,6 +3891,7 @@ static void alc_determine_headset_type(s
 
 	switch (codec->vendor_id) {
 	case 0x10ec0255:
+	case 0x10ec0256:
 		alc_process_coef_fw(codec, coef0255);
 		msleep(300);
 		val = alc_read_coef_idx(codec, 0x46);
@@ -4364,6 +4372,7 @@ enum {
 	ALC269_FIXUP_QUANTA_MUTE,
 	ALC269_FIXUP_LIFEBOOK,
 	ALC269_FIXUP_LIFEBOOK_EXTMIC,
+	ALC269_FIXUP_LIFEBOOK_HP_PIN,
 	ALC269_FIXUP_AMIC,
 	ALC269_FIXUP_DMIC,
 	ALC269VB_FIXUP_AMIC,
@@ -4517,6 +4526,13 @@ static const struct hda_fixup alc269_fix
 			{ }
 		},
 	},
+	[ALC269_FIXUP_LIFEBOOK_HP_PIN] = {
+		.type = HDA_FIXUP_PINS,
+		.v.pins = (const struct hda_pintbl[]) {
+			{ 0x21, 0x0221102f }, /* HP out */
+			{ }
+		},
+	},
 	[ALC269_FIXUP_AMIC] = {
 		.type = HDA_FIXUP_PINS,
 		.v.pins = (const struct hda_pintbl[]) {
@@ -5010,6 +5026,7 @@ static const struct snd_pci_quirk alc269
 	SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ),
 	SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX),
 	SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
+	SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
 	SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
 	SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
 	SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_BXBT2807_MIC),
@@ -5217,6 +5234,16 @@ static const struct snd_hda_pin_quirk al
 		{0x17, 0x40000000},
 		{0x1d, 0x40700001},
 		{0x21, 0x02211050}),
+	SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
+		{0x12, 0x90a60140},
+		{0x13, 0x40000000},
+		{0x14, 0x90170110},
+		{0x19, 0x411111f0},
+		{0x1a, 0x411111f0},
+		{0x1b, 0x411111f0},
+		{0x1d, 0x40700001},
+		{0x1e, 0x411111f0},
+		{0x21, 0x02211020}),
 	SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
 		{0x12, 0x90a60130},
 		{0x13, 0x40000000},
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/sound/soc/codecs/pcm512x.c linux-libre-4.0-gnu/sound/soc/codecs/pcm512x.c
--- linux-libre-4.0-rc7-gnu/sound/soc/codecs/pcm512x.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/sound/soc/codecs/pcm512x.c	2015-04-12 18:12:50.000000000 -0400
@@ -1156,25 +1156,6 @@ static int pcm512x_hw_params(struct snd_
 				ret, pcm512x->pll_out);
 			return ret;
 		}
-
-		gpio = PCM512x_G1OE << (4 - 1);
-		ret = regmap_update_bits(pcm512x->regmap, PCM512x_GPIO_EN,
-					 gpio, gpio);
-		if (ret != 0) {
-			dev_err(codec->dev, "Failed to enable gpio %d: %d\n",
-				4, ret);
-			return ret;
-		}
-
-		gpio = PCM512x_GPIO_OUTPUT_1 + 4 - 1;
-		ret = regmap_update_bits(pcm512x->regmap, gpio,
-					 PCM512x_GxSL, PCM512x_GxSL_PLLLK);
-		if (ret != 0) {
-			dev_err(codec->dev,
-				"Failed to output pll lock on %d: %d\n",
-				ret, 4);
-			return ret;
-		}
 	}
 
 	ret = regmap_update_bits(pcm512x->regmap, PCM512x_SYNCHRONIZE,
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/sound/usb/mixer_quirks.c linux-libre-4.0-gnu/sound/usb/mixer_quirks.c
--- linux-libre-4.0-rc7-gnu/sound/usb/mixer_quirks.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/sound/usb/mixer_quirks.c	2015-04-12 18:12:50.000000000 -0400
@@ -192,6 +192,7 @@ static const struct rc_config {
 	{ USB_ID(0x041e, 0x3040), 2, 2, 6, 6,  2,  0x6e91 }, /* Live! 24-bit */
 	{ USB_ID(0x041e, 0x3042), 0, 1, 1, 1,  1,  0x000d }, /* Usb X-Fi S51 */
 	{ USB_ID(0x041e, 0x30df), 0, 1, 1, 1,  1,  0x000d }, /* Usb X-Fi S51 Pro */
+	{ USB_ID(0x041e, 0x3237), 0, 1, 1, 1,  1,  0x000d }, /* Usb X-Fi S51 Pro */
 	{ USB_ID(0x041e, 0x3048), 2, 2, 6, 6,  2,  0x6e91 }, /* Toshiba SB0500 */
 };
 
diff -druNp --no-dereference linux-libre-4.0-rc7-gnu/sound/usb/quirks.c linux-libre-4.0-gnu/sound/usb/quirks.c
--- linux-libre-4.0-rc7-gnu/sound/usb/quirks.c	2015-04-06 18:39:45.000000000 -0400
+++ linux-libre-4.0-gnu/sound/usb/quirks.c	2015-04-12 18:12:50.000000000 -0400
@@ -1113,8 +1113,13 @@ void snd_usb_set_format_quirk(struct snd
 
 bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
 {
-	/* MS Lifecam HD-5000 doesn't support reading the sample rate. */
-	return chip->usb_id == USB_ID(0x045E, 0x076D);
+	/* devices which do not support reading the sample rate. */
+	switch (chip->usb_id) {
+	case USB_ID(0x045E, 0x076D): /* MS Lifecam HD-5000 */
+	case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */
+		return true;
+	}
+	return false;
 }
 
 /* Marantz/Denon USB DACs need a vendor cmd to switch
