diff --git a/SOURCES/addmissing.patch b/SOURCES/addmissing.patch
new file mode 100644
index 0000000..95ad87a
--- /dev/null
+++ b/SOURCES/addmissing.patch
@@ -0,0 +1,27 @@
+diff -up linux-3.10.0-327.sdl7.x86_64/arch/x86/include/asm/ptrace.h.addmissing linux-3.10.0-327.sdl7.x86_64/arch/x86/include/asm/ptrace.h
+--- linux-3.10.0-327.sdl7.x86_64/arch/x86/include/asm/ptrace.h.addmissing	2015-10-29 16:56:51.000000000 -0400
++++ linux-3.10.0-327.sdl7.x86_64/arch/x86/include/asm/ptrace.h	2015-11-21 23:33:16.430036291 -0500
+@@ -109,6 +109,23 @@ static inline int user_mode_vm(struct pt
+ #endif
+ }
+ 
++/*
++ * This is the fastest way to check whether regs come from user space.
++ * It is unsafe if regs might come from vm86 mode, though -- in vm86
++ * mode, all bits of CS and SS are completely under the user's control.
++ * The CPU considers vm86 mode to be CPL 3 regardless of CS and SS.
++ *
++ * Do NOT use this function unless you have already ruled out the
++ * possibility that regs came from vm86 mode.
++ *
++ * We check for RPL != 0 instead of RPL == 3 because we don't use rings
++ * 1 or 2 and this is more efficient.
++ */
++static inline int user_mode_ignore_vm86(struct pt_regs *regs)
++{
++	return (regs->cs & SEGMENT_RPL_MASK) != 0;
++}
++
+ static inline int v8086_mode(struct pt_regs *regs)
+ {
+ #ifdef CONFIG_X86_32
diff --git a/SOURCES/clear-32bit-Werror-warnings.patch b/SOURCES/clear-32bit-Werror-warnings.patch
new file mode 100644
index 0000000..2086de6
--- /dev/null
+++ b/SOURCES/clear-32bit-Werror-warnings.patch
@@ -0,0 +1,134 @@
+From 15ba2cfbba429fae30b2556cd7d97b5e92d4e656 Mon Sep 17 00:00:00 2001
+From: Marcus Sundberg <marcus.sundberg@aptilo.com>
+Date: Mon, 8 Feb 2016 15:16:03 +0100
+Subject: [PATCH] i40e: Do not cast directly from pointer to u64.
+
+Causes warnings on 32 bit systems.
+---
+ drivers/net/ethernet/intel/i40evf/i40e_common.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/net/ethernet/intel/i40evf/i40e_common.c b/drivers/net/ethernet/intel/i40evf/i40e_common.c
+index 1950db1..376aab2 100644
+--- a/drivers/net/ethernet/intel/i40evf/i40e_common.c
++++ b/drivers/net/ethernet/intel/i40evf/i40e_common.c
+@@ -442,8 +442,10 @@ static i40e_status i40e_aq_get_set_rss_lut(struct i40e_hw *hw,
+ 					I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT) &
+ 					I40E_AQC_SET_RSS_LUT_TABLE_TYPE_MASK));
+ 
+-	cmd_resp->addr_high = cpu_to_le32(high_16_bits((u64)lut));
+-	cmd_resp->addr_low = cpu_to_le32(lower_32_bits((u64)lut));
++	cmd_resp->addr_high = cpu_to_le32(
++		high_16_bits((u64)(unsigned long)lut));
++	cmd_resp->addr_low = cpu_to_le32(
++		lower_32_bits((u64)(unsigned long)lut));
+ 
+ 	status = i40evf_asq_send_command(hw, &desc, lut, lut_size, NULL);
+ 
+@@ -519,8 +521,10 @@ static i40e_status i40e_aq_get_set_rss_key(struct i40e_hw *hw,
+ 					  I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT) &
+ 					  I40E_AQC_SET_RSS_KEY_VSI_ID_MASK));
+ 	cmd_resp->vsi_id |= cpu_to_le16((u16)I40E_AQC_SET_RSS_KEY_VSI_VALID);
+-	cmd_resp->addr_high = cpu_to_le32(high_16_bits((u64)key));
+-	cmd_resp->addr_low = cpu_to_le32(lower_32_bits((u64)key));
++	cmd_resp->addr_high = cpu_to_le32(
++		high_16_bits((u64)(unsigned long)key));
++	cmd_resp->addr_low = cpu_to_le32(
++		lower_32_bits((u64)(unsigned long)key));
+ 
+ 	status = i40evf_asq_send_command(hw, &desc, key, key_size, NULL);
+ 
+-- 
+1.8.3.1
+
+From f11d529aa8ebd81218d8a0a2a8c04c4f41f3718f Mon Sep 17 00:00:00 2001
+From: Marcus Sundberg <marcus.sundberg@aptilo.com>
+Date: Mon, 8 Feb 2016 18:34:39 +0100
+Subject: [PATCH] iw_cxgb4: 32b platform fix
+
+Casting pci_resource_start() return value directly to void * causes
+a warning.
+---
+ drivers/infiniband/hw/cxgb4/device.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
+index 11d55c9..94c2391 100644
+--- a/drivers/infiniband/hw/cxgb4/device.c
++++ b/drivers/infiniband/hw/cxgb4/device.c
+@@ -830,7 +830,7 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev)
+ 	PDBG("udb len 0x%x udb base %p db_reg %p gts_reg %p qpshift %lu "
+ 	     "qpmask 0x%x cqshift %lu cqmask 0x%x\n",
+ 	     (unsigned)pci_resource_len(rdev->lldi.pdev, 2),
+-	     (void *)pci_resource_start(rdev->lldi.pdev, 2),
++	     (void *)(unsigned long)pci_resource_start(rdev->lldi.pdev, 2),
+ 	     rdev->lldi.db_reg,
+ 	     rdev->lldi.gts_reg,
+ 	     rdev->qpshift, rdev->qpmask,
+-- 
+1.8.3.1
+
+From 39f3f2d7be077d4a067d95ea2b3f02e51f7a05f3 Mon Sep 17 00:00:00 2001
+From: Marcus Sundberg <marcus.sundberg@aptilo.com>
+Date: Mon, 8 Feb 2016 18:18:10 +0100
+Subject: [PATCH] nvme: fix pointer cast warnings on 32 bit
+
+---
+ drivers/block/nvme-core.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
+index 711d96a..eafb721 100644
+--- a/drivers/block/nvme-core.c
++++ b/drivers/block/nvme-core.c
+@@ -1693,8 +1693,9 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
+ 			goto unmap;
+ 		}
+ 		if (write) {
+-			if (copy_from_user(meta, (void __user *)io.metadata,
+-					   meta_len)) {
++			if (copy_from_user(meta,
++					(void __user *)(uintptr_t)io.metadata,
++					meta_len)) {
+ 				status = -EFAULT;
+ 				goto unmap;
+ 			}
+@@ -1722,8 +1723,8 @@ static int nvme_submit_io(struct nvme_ns *ns, struct nvme_user_io __user *uio)
+ 
+ 	if (meta) {
+ 		if (status == NVME_SC_SUCCESS && !write) {
+-			if (copy_to_user((void __user *)io.metadata, meta,
+-					 meta_len))
++			if (copy_to_user((void __user *)(uintptr_t)io.metadata,
++					 meta, meta_len))
+ 				status = -EFAULT;
+ 		}
+ 		dma_free_coherent(&dev->pci_dev->dev, meta_len, meta, meta_dma);
+-- 
+1.8.3.1
+
+From d719f2b11f08861d97992f5973b7465fdb150a42 Mon Sep 17 00:00:00 2001
+From: Marcus Sundberg <marcus.sundberg@aptilo.com>
+Date: Mon, 8 Feb 2016 14:46:16 +0100
+Subject: [PATCH] (queue_store_unpriv_sgio): Check return from queue_var_store
+
+---
+ block/blk-sysfs.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
+index 13c5338..1f168c0 100644
+--- a/block/blk-sysfs.c
++++ b/block/blk-sysfs.c
+@@ -207,6 +207,8 @@ queue_store_unpriv_sgio(struct request_queue *q, const char *page, size_t count)
+ 		return -EPERM;
+ 
+ 	ret = queue_var_store(&val, page, count);
++	if (ret < 0)
++		return ret;
+ 	spin_lock_irq(q->queue_lock);
+ 	if (val)
+ 		queue_flag_set(QUEUE_FLAG_UNPRIV_SGIO, q);
+-- 
+1.8.3.1
+
diff --git a/SOURCES/cpufreq.patch b/SOURCES/cpufreq.patch
new file mode 100644
index 0000000..beabf01
--- /dev/null
+++ b/SOURCES/cpufreq.patch
@@ -0,0 +1,394 @@
+diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/cpufreq-nforce2.c linux-3.10.0-229.el7/drivers/cpufreq/cpufreq-nforce2.c
+--- linux-3.10.0-229.el7.original/drivers/cpufreq/cpufreq-nforce2.c	2015-01-29 18:15:53.000000000 -0500
++++ linux-3.10.0-229.el7/drivers/cpufreq/cpufreq-nforce2.c	2015-03-09 09:22:18.376023945 -0400
+@@ -270,7 +270,7 @@
+ 	pr_debug("Old CPU frequency %d kHz, new %d kHz\n",
+ 	       freqs.old, freqs.new);
+ 
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
++	cpufreq_freq_transition_begin(policy, &freqs);
+ 
+ 	/* Disable IRQs */
+ 	/* local_irq_save(flags); */
+@@ -285,7 +285,7 @@
+ 	/* Enable IRQs */
+ 	/* local_irq_restore(flags); */
+ 
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
++	cpufreq_freq_transition_end(policy, &freqs, 0);
+ 
+ 	return 0;
+ }
+Binary files linux-3.10.0-229.el7.original/drivers/cpufreq/.cpufreq-nforce2.c.swp and linux-3.10.0-229.el7/drivers/cpufreq/.cpufreq-nforce2.c.swp differ
+diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/exynos5440-cpufreq.c linux-3.10.0-229.el7/drivers/cpufreq/exynos5440-cpufreq.c
+--- linux-3.10.0-229.el7.original/drivers/cpufreq/exynos5440-cpufreq.c	2015-01-29 18:15:53.000000000 -0500
++++ linux-3.10.0-229.el7/drivers/cpufreq/exynos5440-cpufreq.c	2015-03-09 09:22:18.377023945 -0400
+@@ -238,7 +238,7 @@
+ 	freqs.old = dvfs_info->cur_frequency;
+ 	freqs.new = freq_table[index].frequency;
+ 
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
++	cpufreq_freq_transition_begin(policy, &freqs);
+ 
+ 	/* Set the target frequency in all C0_3_PSTATE register */
+ 	for_each_cpu(i, policy->cpus) {
+@@ -279,7 +279,7 @@
+ 		dev_crit(dvfs_info->dev, "New frequency out of range\n");
+ 		freqs.new = dvfs_info->cur_frequency;
+ 	}
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
++	cpufreq_freq_transition_end(policy, &freqs, 0);
+ 
+ 	cpufreq_cpu_put(policy);
+ 	mutex_unlock(&cpufreq_lock);
+diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/gx-suspmod.c linux-3.10.0-229.el7/drivers/cpufreq/gx-suspmod.c
+--- linux-3.10.0-229.el7.original/drivers/cpufreq/gx-suspmod.c	2015-01-29 18:15:53.000000000 -0500
++++ linux-3.10.0-229.el7/drivers/cpufreq/gx-suspmod.c	2015-03-09 09:22:18.377023945 -0400
+@@ -265,7 +265,7 @@
+ 
+ 	freqs.new = new_khz;
+ 
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
++	cpufreq_freq_transition_begin(policy, &freqs);
+ 	local_irq_save(flags);
+ 
+ 	if (new_khz != stock_freq) {
+@@ -314,7 +314,7 @@
+ 
+ 	gx_params->pci_suscfg = suscfg;
+ 
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
++	cpufreq_freq_transition_end(policy, &freqs, 0);
+ 
+ 	pr_debug("suspend modulation w/ duration of ON:%d us, OFF:%d us\n",
+ 		gx_params->on_duration * 32, gx_params->off_duration * 32);
+diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/integrator-cpufreq.c linux-3.10.0-229.el7/drivers/cpufreq/integrator-cpufreq.c
+--- linux-3.10.0-229.el7.original/drivers/cpufreq/integrator-cpufreq.c	2015-01-29 18:15:53.000000000 -0500
++++ linux-3.10.0-229.el7/drivers/cpufreq/integrator-cpufreq.c	2015-03-09 09:22:18.377023945 -0400
+@@ -121,7 +121,7 @@
+ 		return 0;
+ 	}
+ 
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
++	cpufreq_freq_transition_begin(policy, &freqs);
+ 
+ 	cm_osc = __raw_readl(CM_OSC);
+ 
+@@ -142,7 +142,7 @@
+ 	 */
+ 	set_cpus_allowed(current, cpus_allowed);
+ 
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
++	cpufreq_freq_transition_end(policy, &freqs, 0);
+ 
+ 	return 0;
+ }
+diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/longhaul.c linux-3.10.0-229.el7/drivers/cpufreq/longhaul.c
+--- linux-3.10.0-229.el7.original/drivers/cpufreq/longhaul.c	2015-01-29 18:15:53.000000000 -0500
++++ linux-3.10.0-229.el7/drivers/cpufreq/longhaul.c	2015-03-09 09:22:18.377023945 -0400
+@@ -269,7 +269,7 @@
+ 	freqs.old = calc_speed(longhaul_get_cpu_mult());
+ 	freqs.new = speed;
+ 
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
++	cpufreq_freq_transition_begin(policy, &freqs);
+ 
+ 	pr_debug("Setting to FSB:%dMHz Mult:%d.%dx (%s)\n",
+ 			fsb, mult/10, mult%10, print_speed(speed/1000));
+@@ -386,7 +386,7 @@
+ 		}
+ 	}
+ 	/* Report true CPU frequency */
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
++	cpufreq_freq_transition_end(policy, &freqs, 0);
+ 
+ 	if (!bm_timeout)
+ 		printk(KERN_INFO PFX "Warning: Timeout while waiting for "
+diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/powernow-k6.c linux-3.10.0-229.el7/drivers/cpufreq/powernow-k6.c
+--- linux-3.10.0-229.el7.original/drivers/cpufreq/powernow-k6.c	2015-01-29 18:15:53.000000000 -0500
++++ linux-3.10.0-229.el7/drivers/cpufreq/powernow-k6.c	2015-03-09 09:23:09.182024898 -0400
+@@ -83,7 +83,7 @@
+ 	freqs.old = busfreq * powernow_k6_get_cpu_multiplier();
+ 	freqs.new = busfreq * clock_ratio[best_i].driver_data;
+ 
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
++	cpufreq_freq_transition_begin(policy, &freqs);
+ 
+ 	/* we now need to transform best_i to the BVC format, see AMD#23446 */
+ 
+@@ -98,7 +98,7 @@
+ 	msrval = POWERNOW_IOPORT + 0x0;
+ 	wrmsr(MSR_K6_EPMR, msrval, 0); /* disable it again */
+ 
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
++	cpufreq_freq_transition_end(policy, &freqs, 0);
+ 
+ 	return;
+ }
+diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/powernow-k7.c linux-3.10.0-229.el7/drivers/cpufreq/powernow-k7.c
+--- linux-3.10.0-229.el7.original/drivers/cpufreq/powernow-k7.c	2015-01-29 18:15:53.000000000 -0500
++++ linux-3.10.0-229.el7/drivers/cpufreq/powernow-k7.c	2015-03-09 09:23:52.126025704 -0400
+@@ -269,7 +269,7 @@
+ 
+ 	freqs.new = powernow_table[index].frequency;
+ 
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
++	cpufreq_freq_transition_begin(policy, &freqs);
+ 
+ 	/* Now do the magic poking into the MSRs.  */
+ 
+@@ -290,7 +290,7 @@
+ 	if (have_a0 == 1)
+ 		local_irq_enable();
+ 
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
++	cpufreq_freq_transition_end(policy, &freqs, 0);
+ }
+ 
+ 
+diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/sh-cpufreq.c linux-3.10.0-229.el7/drivers/cpufreq/sh-cpufreq.c
+--- linux-3.10.0-229.el7.original/drivers/cpufreq/sh-cpufreq.c	2015-01-29 18:15:53.000000000 -0500
++++ linux-3.10.0-229.el7/drivers/cpufreq/sh-cpufreq.c	2015-03-09 09:22:18.378023945 -0400
+@@ -68,10 +68,10 @@
+ 	freqs.new	= (freq + 500) / 1000;
+ 	freqs.flags	= 0;
+ 
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
++	cpufreq_freq_transition_begin(policy, &freqs);
+ 	set_cpus_allowed_ptr(current, &cpus_allowed);
+ 	clk_set_rate(cpuclk, freq);
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
++	cpufreq_freq_transition_end(policy, &freqs, 0);
+ 
+ 	dev_dbg(dev, "set frequency %lu Hz\n", freq);
+ 
+diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-centrino.c linux-3.10.0-229.el7/drivers/cpufreq/speedstep-centrino.c
+--- linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-centrino.c	2015-01-29 18:15:53.000000000 -0500
++++ linux-3.10.0-229.el7/drivers/cpufreq/speedstep-centrino.c	2015-03-09 09:58:30.112064688 -0400
+@@ -345,7 +345,6 @@
+ 	struct cpuinfo_x86 *cpu = &cpu_data(policy->cpu);
+ 	unsigned freq;
+ 	unsigned l, h;
+-	int ret;
+ 	int i;
+ 
+ 	/* Only Intel makes Enhanced Speedstep-capable CPUs */
+@@ -402,15 +401,8 @@
+ 
+ 	pr_debug("centrino_cpu_init: cur=%dkHz\n", policy->cur);
+ 
+-	ret = cpufreq_frequency_table_cpuinfo(policy,
++	return cpufreq_table_validate_and_show(policy,
+ 		per_cpu(centrino_model, policy->cpu)->op_points);
+-	if (ret)
+-		return (ret);
+-
+-	cpufreq_frequency_table_get_attr(
+-		per_cpu(centrino_model, policy->cpu)->op_points, policy->cpu);
+-
+-	return 0;
+ }
+ 
+ static int centrino_cpu_exit(struct cpufreq_policy *policy)
+@@ -428,19 +420,6 @@
+ }
+ 
+ /**
+- * centrino_verify - verifies a new CPUFreq policy
+- * @policy: new policy
+- *
+- * Limit must be within this model's frequency range at least one
+- * border included.
+- */
+-static int centrino_verify (struct cpufreq_policy *policy)
+-{
+-	return cpufreq_frequency_table_verify(policy,
+-			per_cpu(centrino_model, policy->cpu)->op_points);
+-}
+-
+-/**
+  * centrino_setpolicy - set a new CPUFreq policy
+  * @policy: new policy
+  * @target_freq: the target frequency
+@@ -561,20 +540,15 @@
+ 	return retval;
+ }
+ 
+-static struct freq_attr* centrino_attr[] = {
+-	&cpufreq_freq_attr_scaling_available_freqs,
+-	NULL,
+-};
+-
+ static struct cpufreq_driver centrino_driver = {
+ 	.name		= "centrino", /* should be speedstep-centrino,
+ 					 but there's a 16 char limit */
+ 	.init		= centrino_cpu_init,
+ 	.exit		= centrino_cpu_exit,
+-	.verify		= centrino_verify,
++	.verify		= cpufreq_generic_frequency_table_verify,
+ 	.target		= centrino_target,
+ 	.get		= get_cur_freq,
+-	.attr           = centrino_attr,
++	.attr		= cpufreq_generic_attr,
+ };
+ 
+ /*
+diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-ich.c linux-3.10.0-229.el7/drivers/cpufreq/speedstep-ich.c
+--- linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-ich.c	2015-01-29 18:15:53.000000000 -0500
++++ linux-3.10.0-229.el7/drivers/cpufreq/speedstep-ich.c	2015-03-09 09:58:30.113064688 -0400
+@@ -289,18 +289,6 @@
+ }
+ 
+ 
+-/**
+- * speedstep_verify - verifies a new CPUFreq policy
+- * @policy: new policy
+- *
+- * Limit must be within speedstep_low_freq and speedstep_high_freq, with
+- * at least one border included.
+- */
+-static int speedstep_verify(struct cpufreq_policy *policy)
+-{
+-	return cpufreq_frequency_table_verify(policy, &speedstep_freqs[0]);
+-}
+-
+ struct get_freqs {
+ 	struct cpufreq_policy *policy;
+ 	int ret;
+@@ -320,7 +308,6 @@
+ 
+ static int speedstep_cpu_init(struct cpufreq_policy *policy)
+ {
+-	int result;
+ 	unsigned int policy_cpu, speed;
+ 	struct get_freqs gf;
+ 
+@@ -349,36 +336,18 @@
+ 	/* cpuinfo and default policy values */
+ 	policy->cur = speed;
+ 
+-	result = cpufreq_frequency_table_cpuinfo(policy, speedstep_freqs);
+-	if (result)
+-		return result;
+-
+-	cpufreq_frequency_table_get_attr(speedstep_freqs, policy->cpu);
+-
+-	return 0;
++	return cpufreq_table_validate_and_show(policy, speedstep_freqs);
+ }
+ 
+ 
+-static int speedstep_cpu_exit(struct cpufreq_policy *policy)
+-{
+-	cpufreq_frequency_table_put_attr(policy->cpu);
+-	return 0;
+-}
+-
+-static struct freq_attr *speedstep_attr[] = {
+-	&cpufreq_freq_attr_scaling_available_freqs,
+-	NULL,
+-};
+-
+-
+ static struct cpufreq_driver speedstep_driver = {
+ 	.name	= "speedstep-ich",
+-	.verify	= speedstep_verify,
++	.verify	= cpufreq_generic_frequency_table_verify,
+ 	.target	= speedstep_target,
+ 	.init	= speedstep_cpu_init,
+-	.exit	= speedstep_cpu_exit,
++	.exit	= cpufreq_generic_exit,
+ 	.get	= speedstep_get,
+-	.attr	= speedstep_attr,
++	.attr	= cpufreq_generic_attr,
+ };
+ 
+ static const struct x86_cpu_id ss_smi_ids[] = {
+diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-smi.c linux-3.10.0-229.el7/drivers/cpufreq/speedstep-smi.c
+--- linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-smi.c	2015-01-29 18:15:53.000000000 -0500
++++ linux-3.10.0-229.el7/drivers/cpufreq/speedstep-smi.c	2015-03-09 09:58:30.113064688 -0400
+@@ -264,19 +264,6 @@
+ }
+ 
+ 
+-/**
+- * speedstep_verify - verifies a new CPUFreq policy
+- * @policy: new policy
+- *
+- * Limit must be within speedstep_low_freq and speedstep_high_freq, with
+- * at least one border included.
+- */
+-static int speedstep_verify(struct cpufreq_policy *policy)
+-{
+-	return cpufreq_frequency_table_verify(policy, &speedstep_freqs[0]);
+-}
+-
+-
+ static int speedstep_cpu_init(struct cpufreq_policy *policy)
+ {
+ 	int result;
+@@ -329,19 +316,7 @@
+ 	policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
+ 	policy->cur = speed;
+ 
+-	result = cpufreq_frequency_table_cpuinfo(policy, speedstep_freqs);
+-	if (result)
+-		return result;
+-
+-	cpufreq_frequency_table_get_attr(speedstep_freqs, policy->cpu);
+-
+-	return 0;
+-}
+-
+-static int speedstep_cpu_exit(struct cpufreq_policy *policy)
+-{
+-	cpufreq_frequency_table_put_attr(policy->cpu);
+-	return 0;
++	return cpufreq_table_validate_and_show(policy, speedstep_freqs);
+ }
+ 
+ static unsigned int speedstep_get(unsigned int cpu)
+@@ -362,20 +337,15 @@
+ 	return result;
+ }
+ 
+-static struct freq_attr *speedstep_attr[] = {
+-	&cpufreq_freq_attr_scaling_available_freqs,
+-	NULL,
+-};
+-
+ static struct cpufreq_driver speedstep_driver = {
+ 	.name		= "speedstep-smi",
+-	.verify		= speedstep_verify,
++	.verify		= cpufreq_generic_frequency_table_verify,
+ 	.target		= speedstep_target,
+ 	.init		= speedstep_cpu_init,
+-	.exit		= speedstep_cpu_exit,
++	.exit		= cpufreq_generic_exit,
+ 	.get		= speedstep_get,
+ 	.resume		= speedstep_resume,
+-	.attr		= speedstep_attr,
++	.attr		= cpufreq_generic_attr,
+ };
+ 
+ static const struct x86_cpu_id ss_smi_ids[] = {
+diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/unicore2-cpufreq.c linux-3.10.0-229.el7/drivers/cpufreq/unicore2-cpufreq.c
+--- linux-3.10.0-229.el7.original/drivers/cpufreq/unicore2-cpufreq.c	2015-01-29 18:15:53.000000000 -0500
++++ linux-3.10.0-229.el7/drivers/cpufreq/unicore2-cpufreq.c	2015-03-09 09:24:33.053026472 -0400
+@@ -50,14 +50,14 @@
+ 	struct cpufreq_freqs freqs;
+ 	struct clk *mclk = clk_get(NULL, "MAIN_CLK");
+ 
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
++	cpufreq_freq_transition_begin(policy, &freqs);
+ 
+ 	if (!clk_set_rate(mclk, target_freq * 1000)) {
+ 		freqs.old = cur;
+ 		freqs.new = target_freq;
+ 	}
+ 
+-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
++	cpufreq_freq_transition_end(policy, &freqs, ret);
+ 
+ 	return 0;
+ }
diff --git a/SOURCES/i386-audit-stop-scri-stack-frame.patch b/SOURCES/i386-audit-stop-scri-stack-frame.patch
new file mode 100644
index 0000000..48393aa
--- /dev/null
+++ b/SOURCES/i386-audit-stop-scri-stack-frame.patch
@@ -0,0 +1,31 @@
+Note:  this bug was taken from Commit-ID: 26c2d2b39128adba276d140eefa2745591b88536
+and corrected for white space differences between the RHEL-7.1 3.10.0-229 upstream 
+kernel.
+---
+diff -uNrp a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
+--- a/arch/x86/kernel/entry_32.S	2015-05-17 07:39:14.371778177 -0500
++++ b/arch/x86/kernel/entry_32.S	2015-05-17 07:36:13.654610869 -0500
+@@ -457,15 +457,14 @@ sysenter_exit:
+ sysenter_audit:
+ 	testl $(_TIF_WORK_SYSCALL_ENTRY & ~_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
+ 	jnz syscall_trace_entry
+-	addl $4,%esp
+-	CFI_ADJUST_CFA_OFFSET -4
+-	movl %esi,4(%esp)		/* 5th arg: 4th syscall arg */
+-	movl %edx,(%esp)		/* 4th arg: 3rd syscall arg */
+-	/* %ecx already in %ecx		   3rd arg: 2nd syscall arg */
+-	movl %ebx,%edx			/* 2nd arg: 1st syscall arg */
+-	/* %eax already in %eax		   1st arg: syscall number */
++	/* movl PT_EAX(%esp), %eax        already set, syscall number: 1st arg to audit */
++	movl PT_EBX(%esp), %edx                /* ebx/a0: 2nd arg to audit */
++ 	/* movl PT_ECX(%esp), %ecx        already set, a1: 3nd arg to audit */
++	pushl_cfi PT_ESI(%esp)                /* a3: 5th arg */
++	pushl_cfi PT_EDX+4(%esp)        /* a2: 4th arg */
+ 	call __audit_syscall_entry
+-	pushl_cfi %ebx
++	popl_cfi %ecx /* get that remapped edx off the stack */
++	popl_cfi %ecx /* get that remapped esi off the stack */
+ 	movl PT_EAX(%esp),%eax		/* reload syscall number */
+ 	jmp sysenter_do_call
+ 
+---
diff --git a/SOURCES/ignorewarnings.patch b/SOURCES/ignorewarnings.patch
new file mode 100644
index 0000000..8755b61
--- /dev/null
+++ b/SOURCES/ignorewarnings.patch
@@ -0,0 +1,12 @@
+diff -up linux-3.10.0-327.el7.i686/Makefile.orig linux-3.10.0-327.el7.i686/Makefile
+--- linux-3.10.0-327.el7.i686/Makefile.orig	2015-11-21 22:47:53.504052764 -0500
++++ linux-3.10.0-327.el7.i686/Makefile	2015-11-21 22:51:28.459056797 -0500
+@@ -383,7 +383,7 @@ KBUILD_CFLAGS   := -Wall -Wundef -Wstric
+ 
+ ifneq ($(WITH_GCOV),1)
+ ifeq ($(KBUILD_EXTMOD),)
+-ifneq (,$(filter $(ARCH), x86 x86_64 powerpc))
++ifneq (,$(filter $(ARCH), x86_64 powerpc))
+ KBUILD_CFLAGS   += $(call cc-ifversion, -eq, 0408, -Werror)
+ endif
+ # powerpc is compiled with -O3 and gcc 4.8 has some known problems
diff --git a/SOURCES/morefixes.patch b/SOURCES/morefixes.patch
new file mode 100644
index 0000000..e2aad2c
--- /dev/null
+++ b/SOURCES/morefixes.patch
@@ -0,0 +1,84 @@
+diff -up linux-3.10.0-514.sdl7.i686/arch/x86/include/asm/cpufeature.h.morefixes linux-3.10.0-514.sdl7.i686/arch/x86/include/asm/cpufeature.h
+--- linux-3.10.0-514.sdl7.i686/arch/x86/include/asm/cpufeature.h.morefixes	2016-10-19 10:16:25.000000000 -0400
++++ linux-3.10.0-514.sdl7.i686/arch/x86/include/asm/cpufeature.h	2016-11-05 08:30:46.276033474 -0400
+@@ -354,6 +354,7 @@ extern const char * const x86_power_flag
+ #define cpu_has_avx		boot_cpu_has(X86_FEATURE_AVX)
+ #define cpu_has_avx2		boot_cpu_has(X86_FEATURE_AVX2)
+ #define cpu_has_ht		boot_cpu_has(X86_FEATURE_HT)
++#define cpu_has_mp		boot_cpu_has(X86_FEATURE_MP)
+ #define cpu_has_nx		boot_cpu_has(X86_FEATURE_NX)
+ #define cpu_has_xstore		boot_cpu_has(X86_FEATURE_XSTORE)
+ #define cpu_has_xstore_enabled	boot_cpu_has(X86_FEATURE_XSTORE_EN)
+diff -up linux-3.10.0-514.sdl7.i686/arch/x86/include/asm/irq_remapping.h.morefixes linux-3.10.0-514.sdl7.i686/arch/x86/include/asm/irq_remapping.h
+--- linux-3.10.0-514.sdl7.i686/arch/x86/include/asm/irq_remapping.h.morefixes	2016-10-19 10:16:25.000000000 -0400
++++ linux-3.10.0-514.sdl7.i686/arch/x86/include/asm/irq_remapping.h	2016-11-05 09:39:38.425043476 -0400
+@@ -110,7 +110,7 @@ static inline bool setup_remapped_irq(in
+ 	return false;
+ }
+ 
+-int irq_set_vcpu_affinity(unsigned int irq, void *vcpu_info)
++static int irq_set_vcpu_affinity(unsigned int irq, void *vcpu_info)
+ {
+ 	return -ENOSYS;
+ }
+diff -up linux-3.10.0-514.sdl7.i686/arch/x86/kernel/irq_32.c.morefixes linux-3.10.0-514.sdl7.i686/arch/x86/kernel/irq_32.c
+--- linux-3.10.0-514.sdl7.i686/arch/x86/kernel/irq_32.c.morefixes	2016-10-19 10:16:25.000000000 -0400
++++ linux-3.10.0-514.sdl7.i686/arch/x86/kernel/irq_32.c	2016-11-05 09:49:59.371055125 -0400
+@@ -24,9 +24,12 @@
+ DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
+ EXPORT_PER_CPU_SYMBOL(irq_stat);
+ 
++DEFINE_PER_CPU_SHARED_ALIGNED(rh_irq_cpustat_t, rh_irq_stat);
++
+ DEFINE_PER_CPU(struct pt_regs *, irq_regs);
+ EXPORT_PER_CPU_SYMBOL(irq_regs);
+ 
++
+ #ifdef CONFIG_DEBUG_STACKOVERFLOW
+ 
+ int sysctl_panic_on_stackoverflow __read_mostly;
+diff -up linux-3.10.0-514.sdl7.i686/include/linux/pps_kernel.h.morefixes linux-3.10.0-514.sdl7.i686/include/linux/pps_kernel.h
+--- linux-3.10.0-514.sdl7.i686/include/linux/pps_kernel.h.morefixes	2016-10-19 10:16:25.000000000 -0400
++++ linux-3.10.0-514.sdl7.i686/include/linux/pps_kernel.h	2016-11-05 10:44:41.492049162 -0400
+@@ -115,10 +115,17 @@ static inline void pps_get_ts(struct pps
+ {
+ 	struct system_time_snapshot snap;
+ 	ktime_get_snapshot(&snap);
++#if defined CONFIG_X86_64
+ 	ts->ts_real = ktime_to_timespec64(snap.real);
+ #ifdef CONFIG_NTP_PPS
+ 	ts->ts_raw = ktime_to_timespec64(snap.raw);
+ #endif
++#else
++	ts->ts_real = ktime_to_timespec(snap.real);
++#ifdef CONFIG_NTP_PPS
++	ts->ts_raw = ktime_to_timespec(snap.raw);
++#endif
++#endif
+ }
+ 
+ /* Subtract known time delay from PPS event time(s) */
+diff -up linux-3.10.0-514.sdl7.i686/kernel/hrtimer.c.morefixes linux-3.10.0-514.sdl7.i686/kernel/hrtimer.c
+--- linux-3.10.0-514.sdl7.i686/kernel/hrtimer.c.morefixes	2016-10-19 10:16:25.000000000 -0400
++++ linux-3.10.0-514.sdl7.i686/kernel/hrtimer.c	2016-11-05 10:58:56.726065206 -0400
+@@ -328,6 +328,7 @@ u64 ktime_divns(const ktime_t kt, s64 di
+ 
+ 	return dclc;
+ }
++EXPORT_SYMBOL_GPL(ktime_divns);
+ #endif /* BITS_PER_LONG >= 64 */
+ 
+ /*
+diff -up linux-3.10.0-514.sdl7.i686/mm/swap.c.morefixes linux-3.10.0-514.sdl7.i686/mm/swap.c
+--- linux-3.10.0-514.sdl7.i686/mm/swap.c.morefixes	2016-10-19 10:16:25.000000000 -0400
++++ linux-3.10.0-514.sdl7.i686/mm/swap.c	2016-11-05 08:55:41.521061525 -0400
+@@ -972,9 +972,6 @@ void release_pages(struct page **pages,
+ 		if (!put_page_testzero(page))
+ 			continue;
+ 
+-		VM_BUG_ON_PAGE(check_mmu_gather &&
+-			       trans_huge_mmu_gather_count(page), page);
+-
+ 		if (PageLRU(page)) {
+ 			if (!was_thp)
+ 				zone = zone_lru_lock(zone, page, &lock_batch,
diff --git a/SOURCES/removejiffies.patch b/SOURCES/removejiffies.patch
new file mode 100644
index 0000000..71da335
--- /dev/null
+++ b/SOURCES/removejiffies.patch
@@ -0,0 +1,12 @@
+diff -up linux-3.10.0-123.6.3.el7.x86_64/include/asm-generic/cputime_jiffies.h.removejiffies linux-3.10.0-123.6.3.el7.x86_64/include/asm-generic/cputime_jiffies.h
+--- linux-3.10.0-123.6.3.el7.x86_64/include/asm-generic/cputime_jiffies.h.removejiffies	2014-07-16 14:25:31.000000000 -0400
++++ linux-3.10.0-123.6.3.el7.x86_64/include/asm-generic/cputime_jiffies.h	2014-08-07 10:57:42.702063799 -0400
+@@ -17,8 +17,6 @@ typedef u64 __nocast cputime64_t;
+ /*
+  * Convert nanoseconds <-> cputime
+  */
+-#define cputime_to_nsecs(__ct)		\
+-	jiffies_to_nsecs(cputime_to_jiffies(__ct))
+ #define nsecs_to_cputime64(__nsec)	\
+ 	jiffies64_to_cputime64(nsecs_to_jiffies64(__nsec))
+ #define nsecs_to_cputime(__nsec)	\
diff --git a/SOURCES/undorhirqstat.patch b/SOURCES/undorhirqstat.patch
new file mode 100644
index 0000000..f8340fc
--- /dev/null
+++ b/SOURCES/undorhirqstat.patch
@@ -0,0 +1,84 @@
+diff -up linux-3.10.0-327.sdl7.x86_64/arch/x86/include/asm/hardirq.h.undorhirqstat linux-3.10.0-327.sdl7.x86_64/arch/x86/include/asm/hardirq.h
+--- linux-3.10.0-327.sdl7.x86_64/arch/x86/include/asm/hardirq.h.undorhirqstat	2015-10-29 16:56:51.000000000 -0400
++++ linux-3.10.0-327.sdl7.x86_64/arch/x86/include/asm/hardirq.h	2015-11-21 23:57:10.330063191 -0500
+@@ -37,18 +37,13 @@ typedef struct {
+ 
+ DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
+ 
+-typedef struct {
+-	unsigned int irq_hv_callback_count;
+-} ____cacheline_aligned rh_irq_cpustat_t;
+-
+-DECLARE_PER_CPU_SHARED_ALIGNED(rh_irq_cpustat_t, rh_irq_stat);
++/* We can have at most NR_VECTORS irqs routed to a cpu at a time */
++#define MAX_HARDIRQS_PER_CPU NR_VECTORS
+ 
+ #define __ARCH_IRQ_STAT
+ 
+ #define inc_irq_stat(member)	this_cpu_inc(irq_stat.member)
+ 
+-#define rh_inc_irq_stat(member)	this_cpu_inc(rh_irq_stat.member)
+-
+ #define local_softirq_pending()	this_cpu_read(irq_stat.__softirq_pending)
+ 
+ #define __ARCH_SET_SOFTIRQ_PENDING
+diff -up linux-3.10.0-327.sdl7.x86_64/arch/x86/kernel/cpu/mshyperv.c.undorhirqstat linux-3.10.0-327.sdl7.x86_64/arch/x86/kernel/cpu/mshyperv.c
+--- linux-3.10.0-327.sdl7.x86_64/arch/x86/kernel/cpu/mshyperv.c.undorhirqstat	2015-10-29 16:56:51.000000000 -0400
++++ linux-3.10.0-327.sdl7.x86_64/arch/x86/kernel/cpu/mshyperv.c	2015-11-22 00:03:55.131003266 -0500
+@@ -46,7 +46,6 @@ void hyperv_vector_handler(struct pt_reg
+ 	irq_enter();
+ 	exit_idle();
+ 
+-	rh_inc_irq_stat(irq_hv_callback_count);
+ 	if (vmbus_handler)
+ 		vmbus_handler();
+ 
+diff -up linux-3.10.0-327.sdl7.x86_64/arch/x86/kernel/irq.c.undorhirqstat linux-3.10.0-327.sdl7.x86_64/arch/x86/kernel/irq.c
+--- linux-3.10.0-327.sdl7.x86_64/arch/x86/kernel/irq.c.undorhirqstat	2015-10-29 16:56:51.000000000 -0400
++++ linux-3.10.0-327.sdl7.x86_64/arch/x86/kernel/irq.c	2015-11-21 23:58:02.526064171 -0500
+@@ -48,7 +48,6 @@ void ack_bad_irq(unsigned int irq)
+ }
+ 
+ #define irq_stats(x)		(&per_cpu(irq_stat, x))
+-#define rh_irq_stats(x)		(&per_cpu(rh_irq_stat, x))
+ /*
+  * /proc/interrupts printing for arch specific interrupts
+  */
+@@ -126,13 +125,6 @@ int arch_show_interrupts(struct seq_file
+ 		seq_printf(p, "%10u ", per_cpu(mce_poll_count, j));
+ 	seq_printf(p, "  Machine check polls\n");
+ #endif
+-	if (test_bit(HYPERVISOR_CALLBACK_VECTOR, used_vectors)) {
+-		seq_printf(p, "%*s: ", prec, "HYP");
+-		for_each_online_cpu(j)
+-			seq_printf(p, "%10u ",
+-				   rh_irq_stats(j)->irq_hv_callback_count);
+-		seq_printf(p, "  Hypervisor callback interrupts\n");
+-	}
+ 	seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
+ #if defined(CONFIG_X86_IO_APIC)
+ 	seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read(&irq_mis_count));
+diff -up linux-3.10.0-327.sdl7.x86_64/arch/x86/kernel/irq_64.c.undorhirqstat linux-3.10.0-327.sdl7.x86_64/arch/x86/kernel/irq_64.c
+--- linux-3.10.0-327.sdl7.x86_64/arch/x86/kernel/irq_64.c.undorhirqstat	2015-10-29 16:56:51.000000000 -0400
++++ linux-3.10.0-327.sdl7.x86_64/arch/x86/kernel/irq_64.c	2015-11-21 23:58:27.650064642 -0500
+@@ -23,8 +23,6 @@
+ DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
+ EXPORT_PER_CPU_SYMBOL(irq_stat);
+ 
+-DEFINE_PER_CPU_SHARED_ALIGNED(rh_irq_cpustat_t, rh_irq_stat);
+-
+ DEFINE_PER_CPU(struct pt_regs *, irq_regs);
+ EXPORT_PER_CPU_SYMBOL(irq_regs);
+ 
+diff -up linux-3.10.0-327.sdl7.x86_64/drivers/xen/events.c.undorhirqstat linux-3.10.0-327.sdl7.x86_64/drivers/xen/events.c
+--- linux-3.10.0-327.sdl7.x86_64/drivers/xen/events.c.undorhirqstat	2015-10-29 16:56:51.000000000 -0400
++++ linux-3.10.0-327.sdl7.x86_64/drivers/xen/events.c	2015-11-22 00:04:18.032003696 -0500
+@@ -1446,8 +1446,6 @@ void xen_evtchn_do_upcall(struct pt_regs
+ #ifdef CONFIG_X86
+ 	exit_idle();
+ #endif
+-	rh_inc_irq_stat(irq_hv_callback_count);
+-
+ 	__xen_evtchn_do_upcall();
+ 
+ 	irq_exit();
diff --git a/SOURCES/upstream-32bit-fixes.patch b/SOURCES/upstream-32bit-fixes.patch
new file mode 100644
index 0000000..aa2457c
--- /dev/null
+++ b/SOURCES/upstream-32bit-fixes.patch
@@ -0,0 +1,380 @@
+From ee2efd8e1b4cae38cb8264ce1b8e110d937e8061 Mon Sep 17 00:00:00 2001
+From: Chad Dupuis <chad.dupuis@qlogic.com>
+Date: Thu, 13 Mar 2014 14:16:40 -0400
+Subject: [PATCH] [SCSI] qla2xxx: Fix build errors related to invalid print
+ fields on some architectures.
+
+Fixes some build warnings such as:
+drivers/scsi/qla2xxx/qla_attr.c:162:6: warning: format '%lx' expects argument of
+type 'long unsigned int', but argument 6 has type 'size_t'"
+and
+drivers/scsi/qla2xxx/qla_init.c:5198:7: warning: format '%lx' expects argument
+of type 'long unsigned int', but argument 5 has type 'uint32_t' [-Wformat]
+
+Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
+Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
+Signed-off-by: James Bottomley <JBottomley@Parallels.com>
+---
+ drivers/scsi/qla2xxx/qla_attr.c |  6 +++---
+ drivers/scsi/qla2xxx/qla_init.c | 12 ++++++------
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
+index deca736..ecadd80 100644
+--- a/drivers/scsi/qla2xxx/qla_attr.c
++++ b/drivers/scsi/qla2xxx/qla_attr.c
+@@ -159,7 +159,7 @@ qla2x00_sysfs_read_fw_dump_template(struct file *filp, struct kobject *kobj,
+ 		return 0;
+ 
+ 	ql_dbg(ql_dbg_user, vha, 0x70e2,
+-	    "chunk <- off=%llx count=%lx\n", off, count);
++	    "chunk <- off=%llx count=%zx\n", off, count);
+ 	return memory_read_from_buffer(buf, count, &off,
+ 	    ha->fw_dump_template, ha->fw_dump_template_len);
+ }
+@@ -200,11 +200,11 @@ qla2x00_sysfs_write_fw_dump_template(struct file *filp, struct kobject *kobj,
+ 	if (off + count > ha->fw_dump_template_len) {
+ 		count = ha->fw_dump_template_len - off;
+ 		ql_dbg(ql_dbg_user, vha, 0x70d3,
+-		    "chunk -> truncating to %lx bytes.\n", count);
++		    "chunk -> truncating to %zx bytes.\n", count);
+ 	}
+ 
+ 	ql_dbg(ql_dbg_user, vha, 0x70d4,
+-	    "chunk -> off=%llx count=%lx\n", off, count);
++	    "chunk -> off=%llx count=%zx\n", off, count);
+ 	memcpy(ha->fw_dump_template + off, buf, count);
+ 
+ 	if (off + count == ha->fw_dump_template_len) {
+diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
+index 8e36bb5..e6cc187 100644
+--- a/drivers/scsi/qla2xxx/qla_init.c
++++ b/drivers/scsi/qla2xxx/qla_init.c
+@@ -5343,8 +5343,8 @@ qla24xx_load_risc_flash(scsi_qla_host_t *vha, uint32_t *srisc_addr,
+ 	    "-> template size %x bytes\n", dlen);
+ 	if (dlen > risc_size * sizeof(*dcode)) {
+ 		ql_log(ql_log_warn, vha, 0x0167,
+-		    "Failed fwdump template exceeds array by %lx bytes\n",
+-		    dlen - risc_size * sizeof(*dcode));
++		    "Failed fwdump template exceeds array by %x bytes\n",
++		    (uint32_t)(dlen - risc_size * sizeof(*dcode)));
+ 		goto default_template;
+ 	}
+ 	ha->fw_dump_template_len = dlen;
+@@ -5610,8 +5610,8 @@ qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr)
+ 	ha->fw_dump_template_len = 0;
+ 
+ 	ql_dbg(ql_dbg_init, vha, 0x171,
+-	    "Loading fwdump template from %lx\n",
+-	    (void *)fwcode - (void *)blob->fw->data);
++	    "Loading fwdump template from %x\n",
++	    (uint32_t)((void *)fwcode - (void *)blob->fw->data));
+ 	risc_size = be32_to_cpu(fwcode[2]);
+ 	ql_dbg(ql_dbg_init, vha, 0x172,
+ 	    "-> array size %x dwords\n", risc_size);
+@@ -5645,8 +5645,8 @@ qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr)
+ 	    "-> template size %x bytes\n", dlen);
+ 	if (dlen > risc_size * sizeof(*fwcode)) {
+ 		ql_log(ql_log_warn, vha, 0x0177,
+-		    "Failed fwdump template exceeds array by %lx bytes\n",
+-		    dlen - risc_size * sizeof(*fwcode));
++		    "Failed fwdump template exceeds array by %x bytes\n",
++		    (uint32_t)(dlen - risc_size * sizeof(*fwcode)));
+ 		goto default_template;
+ 	}
+ 	ha->fw_dump_template_len = dlen;
+-- 
+1.8.3.1
+
+From 7a21a71e1c702b523676267fa09048f21918636f Mon Sep 17 00:00:00 2001
+From: Paul Bolle <pebolle@tiscali.nl>
+Date: Mon, 30 Jun 2014 16:32:29 +0200
+Subject: [PATCH] x86: Remove unused variable "polling"
+
+Compile tested. "polling" is unused since commit f80c5b39b80a
+("sched/idle, x86: Switch from TS_POLLING to TIF_POLLING_NRFLAG").
+
+Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
+Signed-off-by: Peter Zijlstra <peterz@infradead.org>
+Cc: Jiri Kosina <jkosina@suse.cz>
+Link: http://lkml.kernel.org/r/1404138749.2978.6.camel@x41
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+---
+ arch/x86/kernel/apm_32.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
+index 8fdcec6..66d3b1f 100644
+--- a/arch/x86/kernel/apm_32.c
++++ b/arch/x86/kernel/apm_32.c
+@@ -841,7 +841,6 @@ static int apm_do_idle(void)
+ 	u32 eax;
+ 	u8 ret = 0;
+ 	int idled = 0;
+-	int polling;
+ 	int err = 0;
+ 
+ 	if (!need_resched()) {
+-- 
+1.8.3.1
+
+From f9cfccee5ef4d923e21394c852b7f75d9c5c4a61 Mon Sep 17 00:00:00 2001
+From: John Stultz <john.stultz@linaro.org>
+Date: Wed, 16 Jul 2014 21:03:56 +0000
+Subject: [PATCH] ktime: Change ktime_set() to take 64bit seconds value
+
+In order to support dates past 2038 on 32bit systems, ktime_set()
+needs to handle 64bit second values.
+
+[ tglx: Removed the BITS_PER_LONG check ]
+
+Signed-off-by: John Stultz <john.stultz@linaro.org>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: John Stultz <john.stultz@linaro.org>
+---
+ include/linux/ktime.h | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/include/linux/ktime.h b/include/linux/ktime.h
+index 320f5da..5fa1494 100644
+--- a/include/linux/ktime.h
++++ b/include/linux/ktime.h
+@@ -71,13 +71,12 @@ typedef union ktime ktime_t;		/* Kill this */
+  *
+  * Return the ktime_t representation of the value
+  */
+-static inline ktime_t ktime_set(const long secs, const unsigned long nsecs)
++static inline ktime_t ktime_set(const s64 secs, const unsigned long nsecs)
+ {
+-#if (BITS_PER_LONG == 64)
+ 	if (unlikely(secs >= KTIME_SEC_MAX))
+ 		return (ktime_t){ .tv64 = KTIME_MAX };
+-#endif
+-	return (ktime_t) { .tv64 = (s64)secs * NSEC_PER_SEC + (s64)nsecs };
++
++	return (ktime_t) { .tv64 = secs * NSEC_PER_SEC + (s64)nsecs };
+ }
+ 
+ /* Subtract two ktime_t variables. rem = lhs -rhs: */
+-- 
+1.8.3.1
+
+From af80f3a91846c33852e97c18fd986d0db774d7f1 Mon Sep 17 00:00:00 2001
+From: Richard Cochran <richardcochran@gmail.com>
+Date: Sun, 29 Mar 2015 23:11:56 +0200
+Subject: [PATCH] ptp: bnx2x: convert to the 64 bit get/set time methods.
+
+This driver's clock is implemented using a timecounter, and so with
+this patch the driver is ready for the year 2038.
+
+Compile tested only.
+
+Signed-off-by: Richard Cochran <richardcochran@gmail.com>
+Acked-by: Sony Chacko <sony.chacko@qlogic.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+index dc20474..fb0ebc9 100644
+--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
++++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+@@ -13366,8 +13366,8 @@ static void bnx2x_register_phc(struct bnx2x *bp)
+ 	bp->ptp_clock_info.pps = 0;
+ 	bp->ptp_clock_info.adjfreq = bnx2x_ptp_adjfreq;
+ 	bp->ptp_clock_info.adjtime = bnx2x_ptp_adjtime;
+-	bp->ptp_clock_info.gettime = bnx2x_ptp_gettime;
+-	bp->ptp_clock_info.settime = bnx2x_ptp_settime;
++	bp->ptp_clock_info.gettime64 = bnx2x_ptp_gettime;
++	bp->ptp_clock_info.settime64 = bnx2x_ptp_settime;
+ 	bp->ptp_clock_info.enable = bnx2x_ptp_enable;
+ 
+ 	bp->ptp_clock = ptp_clock_register(&bp->ptp_clock_info, &bp->pdev->dev);
+-- 
+1.8.3.1
+
+From 23e58ec4890fa12e6965fb79e4924a151c6072fd Mon Sep 17 00:00:00 2001
+From: Richard Cochran <richardcochran@gmail.com>
+Date: Sun, 29 Mar 2015 23:12:04 +0200
+Subject: [PATCH] ptp: ixgbe: convert to the 64 bit get/set time methods.
+
+This driver's clock is implemented using a timecounter, and so with
+this patch the driver is ready for the year 2038.
+
+Compile tested only.
+
+Signed-off-by: Richard Cochran <richardcochran@gmail.com>
+Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+index e70158c..e5ba040 100644
+--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
++++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+@@ -871,8 +871,8 @@ static int ixgbe_ptp_create_clock(struct ixgbe_adapter *adapter)
+ 		adapter->ptp_caps.pps = 1;
+ 		adapter->ptp_caps.adjfreq = ixgbe_ptp_adjfreq;
+ 		adapter->ptp_caps.adjtime = ixgbe_ptp_adjtime;
+-		adapter->ptp_caps.gettime = ixgbe_ptp_gettime;
+-		adapter->ptp_caps.settime = ixgbe_ptp_settime;
++		adapter->ptp_caps.gettime64 = ixgbe_ptp_gettime;
++		adapter->ptp_caps.settime64 = ixgbe_ptp_settime;
+ 		adapter->ptp_caps.enable = ixgbe_ptp_feature_enable;
+ 		break;
+ 	case ixgbe_mac_82599EB:
+@@ -887,8 +887,8 @@ static int ixgbe_ptp_create_clock(struct ixgbe_adapter *adapter)
+ 		adapter->ptp_caps.pps = 0;
+ 		adapter->ptp_caps.adjfreq = ixgbe_ptp_adjfreq;
+ 		adapter->ptp_caps.adjtime = ixgbe_ptp_adjtime;
+-		adapter->ptp_caps.gettime = ixgbe_ptp_gettime;
+-		adapter->ptp_caps.settime = ixgbe_ptp_settime;
++		adapter->ptp_caps.gettime64 = ixgbe_ptp_gettime;
++		adapter->ptp_caps.settime64 = ixgbe_ptp_settime;
+ 		adapter->ptp_caps.enable = ixgbe_ptp_feature_enable;
+ 		break;
+ 	default:
+-- 
+1.8.3.1
+
+From 51c2e67006049959ad5f983caf0e00ccef973b55 Mon Sep 17 00:00:00 2001
+From: Florian Westphal <fw@strlen.de>
+Date: Wed, 17 Jun 2015 23:58:28 +0200
+Subject: [PATCH] netfilter: xtables: fix warnings on 32bit platforms
+
+On 32bit archs gcc complains due to cast from void* to u64.
+Add intermediate casts to long to silence these warnings.
+
+include/linux/netfilter/x_tables.h:376:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
+include/linux/netfilter/x_tables.h:384:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+include/linux/netfilter/x_tables.h:391:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+include/linux/netfilter/x_tables.h:400:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+
+Fixes: 71ae0dff02d756e ("netfilter: xtables: use percpu rule counters")
+Reported-by: kbuild test robot <fengguang.wu@intel.com>
+Signed-off-by: Florian Westphal <fw@strlen.de>
+Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
+---
+ include/linux/netfilter/x_tables.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
+index 88a9b35..1b6a065 100644
+--- a/include/linux/netfilter/x_tables.h
++++ b/include/linux/netfilter/x_tables.h
+@@ -377,7 +377,7 @@ static inline u64 xt_percpu_counter_alloc(void)
+ 		if (res == NULL)
+ 			return (u64) -ENOMEM;
+ 
+-		return (__force u64) res;
++		return (u64) (__force unsigned long) res;
+ 	}
+ 
+ 	return 0;
+@@ -385,14 +385,14 @@ static inline u64 xt_percpu_counter_alloc(void)
+ static inline void xt_percpu_counter_free(u64 pcnt)
+ {
+ 	if (nr_cpu_ids > 1)
+-		free_percpu((void __percpu *) pcnt);
++		free_percpu((void __percpu *) (unsigned long) pcnt);
+ }
+ 
+ static inline struct xt_counters *
+ xt_get_this_cpu_counter(struct xt_counters *cnt)
+ {
+ 	if (nr_cpu_ids > 1)
+-		return this_cpu_ptr((void __percpu *) cnt->pcnt);
++		return this_cpu_ptr((void __percpu *) (unsigned long) cnt->pcnt);
+ 
+ 	return cnt;
+ }
+@@ -401,7 +401,7 @@ static inline struct xt_counters *
+ xt_get_per_cpu_counter(struct xt_counters *cnt, unsigned int cpu)
+ {
+ 	if (nr_cpu_ids > 1)
+-		return per_cpu_ptr((void __percpu *) cnt->pcnt, cpu);
++		return per_cpu_ptr((void __percpu *) (unsigned long) cnt->pcnt, cpu);
+ 
+ 	return cnt;
+ }
+-- 
+1.8.3.1
+
+From 1c0e600bbb7566eba7f3e29d3797de32d211330e Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Wed, 7 Oct 2015 14:10:04 +0200
+Subject: [PATCH] RDMA/cxgb4: re-fix 32-bit build warning
+
+Casting a pointer to __be64 produces a warning on 32-bit architectures:
+
+drivers/infiniband/hw/cxgb4/mem.c:147:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
+    req->wr.wr_lo = (__force __be64)&wr_wait;
+
+This was fixed at least twice for this driver in different places,
+and accidentally reverted once more. This puts the correct version
+back in place.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Fixes: 6198dd8d7a6a7 ("iw_cxgb4: 32b platform fixes")
+Signed-off-by: Doug Ledford <dledford@redhat.com>
+---
+ drivers/infiniband/hw/cxgb4/mem.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c
+index 30f0720..65b2474 100644
+--- a/drivers/infiniband/hw/cxgb4/mem.c
++++ b/drivers/infiniband/hw/cxgb4/mem.c
+@@ -137,7 +137,7 @@ static int _c4iw_write_mem_inline(struct c4iw_rdev *rdev, u32 addr, u32 len,
+ 		if (i == (num_wqe-1)) {
+ 			req->wr.wr_hi = cpu_to_be32(FW_WR_OP_V(FW_ULPTX_WR) |
+ 						    FW_WR_COMPL_F);
+-			req->wr.wr_lo = (__force __be64)&wr_wait;
++			req->wr.wr_lo = (__force __be64)(unsigned long)&wr_wait;
+ 		} else
+ 			req->wr.wr_hi = cpu_to_be32(FW_WR_OP_V(FW_ULPTX_WR));
+ 		req->wr.wr_mid = cpu_to_be32(
+-- 
+1.8.3.1
+
+From 11eee7bee939b945f9daca56c2347c1d8d680a95 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Wed, 7 Oct 2015 14:29:51 +0200
+Subject: [PATCH] IB/core: avoid 32-bit warning
+
+The INIT_UDATA() macro requires a pointer or unsigned long argument for
+both input and output buffer, and all callers had a cast from when
+the code was merged until a recent restructuring, so now we get
+
+core/uverbs_cmd.c: In function 'ib_uverbs_create_cq':
+core/uverbs_cmd.c:1481:66: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
+
+This makes the code behave as before by adding back the cast to
+unsigned long.
+
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Fixes: 565197dd8fb1 ("IB/core: Extend ib_uverbs_create_cq")
+Reviewed-by: Yann Droneaud <ydroneaud@opteya.com>
+Signed-off-by: Doug Ledford <dledford@redhat.com>
+---
+ drivers/infiniband/core/uverbs_cmd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
+index bbb02ff..30f3011 100644
+--- a/drivers/infiniband/core/uverbs_cmd.c
++++ b/drivers/infiniband/core/uverbs_cmd.c
+@@ -1463,7 +1463,7 @@ ssize_t ib_uverbs_create_cq(struct ib_uverbs_file *file,
+ 	if (copy_from_user(&cmd, buf, sizeof(cmd)))
+ 		return -EFAULT;
+ 
+-	INIT_UDATA(&ucore, buf, cmd.response, sizeof(cmd), sizeof(resp));
++	INIT_UDATA(&ucore, buf, (unsigned long)cmd.response, sizeof(cmd), sizeof(resp));
+ 
+ 	INIT_UDATA(&uhw, buf + sizeof(cmd),
+ 		   (unsigned long)cmd.response + sizeof(resp),
+-- 
+1.8.3.1
diff --git a/SPECS/kernel.spec b/SPECS/kernel.spec
index f7b75ac..b689092 100644
--- a/SPECS/kernel.spec
+++ b/SPECS/kernel.spec
@@ -151,6 +151,9 @@ Summary: The Linux kernel
 %ifarch i686
 %define asmarch x86
 %define hdrarch i386
+%define all_arch_configs kernel-%{version}-i?86*.config
+%define image_install_path boot
+%define kernel_image arch/x86/boot/bzImage
 %endif
 
 %ifarch x86_64
@@ -206,7 +209,7 @@ Summary: The Linux kernel
 # Which is a BadThing(tm).
 
 # We only build kernel-headers on the following...
-%define nobuildarches i686 s390 ppc
+%define nobuildarches s390 ppc
 
 %ifarch %nobuildarches
 %define with_default 0
@@ -218,7 +221,7 @@ Summary: The Linux kernel
 %endif
 
 # Architectures we build tools/cpupower on
-%define cpupowerarchs x86_64 ppc64 ppc64le
+%define cpupowerarchs i686 x86_64 ppc64 ppc64le
 
 #
 # Three sets of minimum package version requirements in the form of Conflicts:
@@ -375,6 +378,9 @@ Source70: kernel-%{version}-s390x.config
 Source71: kernel-%{version}-s390x-debug.config
 Source72: kernel-%{version}-s390x-kdump.config
 
+Source80: kernel-%{version}-i686.config
+Source81: kernel-%{version}-i686-debug.config
+
 # Sources for kernel-tools
 Source2000: cpupower.service
 Source2001: cpupower.config
@@ -384,6 +390,15 @@ Patch999999: linux-kernel-test.patch
 Patch1000: debrand-single-cpu.patch
 Patch1001: debrand-rh_taint.patch
 Patch1002: debrand-rh-i686-cpu.patch
+Patch1003: ignorewarnings.patch
+Patch1004: removejiffies.patch
+Patch1005: cpufreq.patch
+Patch1006: i386-audit-stop-scri-stack-frame.patch
+Patch1007: addmissing.patch
+Patch1008: undorhirqstat.patch
+Patch1009: clear-32bit-Werror-warnings.patch
+Patch1010: upstream-32bit-fixes.patch
+Patch1011: morefixes.patch
 
 BuildRoot: %{_tmppath}/kernel-%{KVRA}-root
 
@@ -696,6 +711,18 @@ ApplyOptionalPatch debrand-single-cpu.patch
 ApplyOptionalPatch debrand-rh_taint.patch
 ApplyOptionalPatch debrand-rh-i686-cpu.patch
 
+%ifarch %{ix86}
+ApplyOptionalPatch ignorewarnings.patch
+ApplyOptionalPatch removejiffies.patch
+ApplyOptionalPatch cpufreq.patch
+ApplyOptionalPatch i386-audit-stop-scri-stack-frame.patch
+ApplyOptionalPatch addmissing.patch
+ApplyOptionalPatch morefixes.patch
+#ApplyOptionalPatch undorhirqstat.patch
+#ApplyOptionalPatch clear-32bit-Werror-warnings.patch
+#ApplyOptionalPatch upstream-32bit-fixes.patch
+%endif
+
 # Any further pre-build tree manipulations happen here.
 
 chmod +x scripts/checkpatch.pl
@@ -1081,7 +1108,7 @@ make %{?cross_opts} %{?_smp_mflags} -C tools/power/cpupower CPUFREQ_BENCH=false
     make %{?_smp_mflags} centrino-decode powernow-k8-decode
     popd
 %endif
-%ifarch x86_64
+%ifarch x86_64 i686
    pushd tools/power/x86/x86_energy_perf_policy/
    make
    popd
@@ -1548,6 +1575,9 @@ fi
 %kernel_variant_files %{with_kdump} kdump
 
 %changelog
+* Tue Dec 06 2016 Johnny Hughes <johnny@centos.org> - 3.10.0-514.el7.centos
+- Apply i686 Mods
+
 * Thu Nov 03 2016 CentOS Sources <bugs@centos.org> - 3.10.0-514.el7.centos
 - Apply debranding changes