From 0c911ffe90b2c81881cde4a37ca36d6c58d93581 Mon Sep 17 00:00:00 2001 From: Johnny Hughes Date: Jan 05 2016 14:44:02 +0000 Subject: Roll in i686 Mods --- 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/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/otherfixes.patch b/SOURCES/otherfixes.patch new file mode 100644 index 0000000..068d8ad --- /dev/null +++ b/SOURCES/otherfixes.patch @@ -0,0 +1,51 @@ +diff -up linux-3.10.0-327.sdl7.x86_64/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c.otherfixes linux-3.10.0-327.sdl7.x86_64/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +--- linux-3.10.0-327.sdl7.x86_64/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c.otherfixes 2015-10-29 16:56:51.000000000 -0400 ++++ linux-3.10.0-327.sdl7.x86_64/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 2015-11-22 00:24:06.753025997 -0500 +@@ -13314,7 +13314,7 @@ static int bnx2x_ptp_adjtime(struct ptp_ + return 0; + } + +-static int bnx2x_ptp_gettime(struct ptp_clock_info *ptp, struct timespec *ts) ++static int bnx2x_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) + { + struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info); + u64 ns; +@@ -13329,7 +13329,7 @@ static int bnx2x_ptp_gettime(struct ptp_ + } + + static int bnx2x_ptp_settime(struct ptp_clock_info *ptp, +- const struct timespec *ts) ++ const struct timespec64 *ts) + { + struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info); + u64 ns; +diff -up linux-3.10.0-327.sdl7.x86_64/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c.otherfixes linux-3.10.0-327.sdl7.x86_64/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c +--- linux-3.10.0-327.sdl7.x86_64/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c.otherfixes 2015-10-29 16:56:51.000000000 -0400 ++++ linux-3.10.0-327.sdl7.x86_64/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c 2015-11-22 00:35:15.639038546 -0500 +@@ -279,7 +279,7 @@ static int ixgbe_ptp_adjtime(struct ptp_ + * read the timecounter and return the correct value on ns, + * after converting it into a struct timespec. + */ +-static int ixgbe_ptp_gettime(struct ptp_clock_info *ptp, struct timespec *ts) ++static int ixgbe_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) + { + struct ixgbe_adapter *adapter = + container_of(ptp, struct ixgbe_adapter, ptp_caps); +@@ -304,7 +304,7 @@ static int ixgbe_ptp_gettime(struct ptp_ + * wall timer value. + */ + static int ixgbe_ptp_settime(struct ptp_clock_info *ptp, +- const struct timespec *ts) ++ const struct timespec64 *ts) + { + struct ixgbe_adapter *adapter = + container_of(ptp, struct ixgbe_adapter, ptp_caps); +@@ -404,7 +404,7 @@ void ixgbe_ptp_overflow_check(struct ixg + { + bool timeout = time_is_before_jiffies(adapter->last_overflow_check + + IXGBE_OVERFLOW_PERIOD); +- struct timespec ts; ++ struct timespec64 ts; + + if (timeout) { + ixgbe_ptp_gettime(&adapter->ptp_caps, &ts); 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/SPECS/kernel.spec b/SPECS/kernel.spec index 4dcca0f..9aee63c 100644 --- a/SPECS/kernel.spec +++ b/SPECS/kernel.spec @@ -148,6 +148,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 @@ -203,7 +206,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 @@ -215,7 +218,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: @@ -370,6 +373,8 @@ Source63: kernel-%{version}-ppc64le-debug.config 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 @@ -380,6 +385,13 @@ Patch999999: linux-kernel-test.patch Patch1000: debrand-single-cpu.patch Patch1001: debrand-rh_taint.patch Patch1002: debrand-rh-i686-cpu.patch +Patch1003: i386-audit-stop-scri-stack-frame.patch +Patch1004: ignorewarnings.patch +Patch1005: removejiffies.patch +Patch1006: cpufreq.patch +Patch1007: addmissing.patch +Patch1008: undorhirqstat.patch +Patch1009: otherfixes.patch BuildRoot: %{_tmppath}/kernel-%{KVRA}-root @@ -691,6 +703,13 @@ ApplyOptionalPatch linux-kernel-test.patch ApplyOptionalPatch debrand-single-cpu.patch ApplyOptionalPatch debrand-rh_taint.patch ApplyOptionalPatch debrand-rh-i686-cpu.patch +ApplyOptionalPatch i386-audit-stop-scri-stack-frame.patch +ApplyOptionalPatch ignorewarnings.patch +ApplyOptionalPatch removejiffies.patch +ApplyOptionalPatch cpufreq.patch +ApplyOptionalPatch addmissing.patch +ApplyOptionalPatch undorhirqstat.patch +ApplyOptionalPatch otherfixes.patch # Any further pre-build tree manipulations happen here. @@ -1071,7 +1090,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 @@ -1536,6 +1555,9 @@ fi %kernel_variant_files %{with_kdump} kdump %changelog +* Tue Jan 05 2016 Johnny Hughes - 3.10.0-327.4.4.el7 +- Roll in i686 Mods + * Tue Jan 05 2016 CentOS Sources - 3.10.0-327.4.4.el7 - Apply debranding changes