From a8f13481f7b5614b63721732ff3454f2d004cf00 Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Jan 05 2018 22:19:57 +0000 Subject: Initial import (1523909) --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b099b94 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/linux-4.14.tar.xz +/patch-4.15-rc6.xz +/perf-man-4.14.tar.gz diff --git a/0001-cpupower-Remove-FSF-address.patch b/0001-cpupower-Remove-FSF-address.patch new file mode 100644 index 0000000..0d41a7f --- /dev/null +++ b/0001-cpupower-Remove-FSF-address.patch @@ -0,0 +1,40 @@ +From 3766ef6d79da0f2219f8f052085da4102de2890e Mon Sep 17 00:00:00 2001 +From: Laura Abbott +Date: Thu, 14 Dec 2017 17:14:04 -0800 +Subject: [PATCH] cpupower: Remove FSF address +To: Thomas Renninger +To: Shuah Khan +Cc: linux-pm@vger.kernel.org +Cc: linux-kernel@vger.kernel.org + + +Checkpatch in the kernel now complains about having the FSF address +in comments. Other tools such as rpmlint are now starting to do the +same thing. Remove the FSF address to reduce warnings on multiple tools. + +Signed-off-by: Laura Abbott +--- +For context, I'm updating the packaging for the cpupower tools in Fedora which +requires a code/output review. This got flagged during that review. +--- + tools/power/cpupower/lib/cpufreq.h | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/tools/power/cpupower/lib/cpufreq.h b/tools/power/cpupower/lib/cpufreq.h +index 3b005c39f068..60beaf5ed2ea 100644 +--- a/tools/power/cpupower/lib/cpufreq.h ++++ b/tools/power/cpupower/lib/cpufreq.h +@@ -11,10 +11,6 @@ + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + #ifndef __CPUPOWER_CPUFREQ_H__ +-- +2.14.3 + diff --git a/0001-iio-Use-event-header-from-kernel-tree.patch b/0001-iio-Use-event-header-from-kernel-tree.patch new file mode 100644 index 0000000..1724db3 --- /dev/null +++ b/0001-iio-Use-event-header-from-kernel-tree.patch @@ -0,0 +1,64 @@ +From 0eadbb65c0026fb4eec89c54f6b48a0febd87f92 Mon Sep 17 00:00:00 2001 +From: Laura Abbott +Date: Fri, 9 Sep 2016 08:19:17 -0700 +Subject: [PATCH] iio: Use type header from kernel tree +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +To: Jonathan Cameron +To: Hartmut Knaack +To: Lars-Peter Clausen +To: Peter Meerwald-Stadler +Cc: linux-iio@vger.kernel.org +Cc: linux-kernel@vger.kernel.org + + +The iio tools have been updated as new event types have been added to +the kernel. The tools currently use the standard system headers which +means that the system may not have the newest defintitions. This leads +to build failures when building newer tools on older hosts: + +gcc -Wall -g -D_GNU_SOURCE -c -o iio_event_monitor.o +iio_event_monitor.c +iio_event_monitor.c:59:3: error: ‘IIO_UVINDEX’ undeclared here (not in a +function) + [IIO_UVINDEX] = "uvindex", + ^~~~~~~~~~~ +iio_event_monitor.c:59:3: error: array index in initializer not of +integer type +iio_event_monitor.c:59:3: note: (near initialization for +‘iio_chan_type_name_spec’) +iio_event_monitor.c:97:3: error: ‘IIO_MOD_LIGHT_UV’ undeclared here (not +in a function) + [IIO_MOD_LIGHT_UV] = "uv", + ^~~~~~~~~~~~~~~~ +iio_event_monitor.c:97:3: error: array index in initializer not of +integer type +iio_event_monitor.c:97:3: note: (near initialization for +‘iio_modifier_names’) +: recipe for target 'iio_event_monitor.o' failed + +Switch to using the header from the kernel tree to ensure the newest +defintions are always picked up. + +Signed-off-by: Laura Abbott +--- + tools/iio/iio_event_monitor.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c +index d9b7e0f..f02523d 100644 +--- a/tools/iio/iio_event_monitor.c ++++ b/tools/iio/iio_event_monitor.c +@@ -26,7 +26,7 @@ + #include + #include "iio_utils.h" + #include +-#include ++#include "../../include/uapi/linux/iio/types.h" + + static const char * const iio_chan_type_name_spec[] = { + [IIO_VOLTAGE] = "voltage", +-- +2.7.4 + diff --git a/0001-perf-Remove-FSF-address.patch b/0001-perf-Remove-FSF-address.patch new file mode 100644 index 0000000..e609673 --- /dev/null +++ b/0001-perf-Remove-FSF-address.patch @@ -0,0 +1,371 @@ +From d4d39a6a8f9b7d4ffe08d031d3eedb42e449667e Mon Sep 17 00:00:00 2001 +From: Laura Abbott +Date: Thu, 14 Dec 2017 14:50:52 -0800 +Subject: [PATCH] perf: Remove FSF address +To: Peter Zijlstra +To: Ingo Molnar +To: Arnaldo Carvalho de Melo +Cc: Alexander Shishkin +Cc: Jiri Olsa +Cc: Namhyung Kim +Cc: linux-kernel@vger.kernel.org + +Checkpatch in the kernel now complains about having the FSF address +in comments. Other tools such as rpmlint are now starting to do the +same thing. Remove the FSF address to reduce warnings on multiple tools. + +Signed-off-by: Laura Abbott +--- +For context, I'm updating the packaging for perf in Fedora which +requires a code/output review. This got flagged during that review. +--- + tools/perf/arch/sh/util/dwarf-regs.c | 5 ----- + tools/perf/arch/x86/util/dwarf-regs.c | 5 ----- + tools/perf/builtin-probe.c | 5 ----- + tools/perf/jvmti/jvmti_agent.c | 4 ---- + tools/perf/scripts/perl/Perf-Trace-Util/Context.xs | 5 ----- + tools/perf/scripts/python/Perf-Trace-Util/Context.c | 5 ----- + tools/perf/util/dwarf-aux.c | 5 ----- + tools/perf/util/dwarf-aux.h | 5 ----- + tools/perf/util/intel-pt-decoder/inat.c | 5 ----- + tools/perf/util/intel-pt-decoder/inat.h | 5 ----- + tools/perf/util/intel-pt-decoder/inat_types.h | 4 ---- + tools/perf/util/intel-pt-decoder/insn.c | 4 ---- + tools/perf/util/intel-pt-decoder/insn.h | 4 ---- + tools/perf/util/probe-event.c | 4 ---- + tools/perf/util/probe-finder.c | 4 ---- + tools/perf/util/scripting-engines/trace-event-perl.c | 4 ---- + tools/perf/util/scripting-engines/trace-event-python.c | 4 ---- + tools/perf/util/trace-event-info.c | 4 ---- + tools/perf/util/trace-event-parse.c | 4 ---- + tools/perf/util/trace-event-read.c | 4 ---- + tools/perf/util/trace-event-scripting.c | 4 ---- + 21 files changed, 93 deletions(-) + +diff --git a/tools/perf/arch/sh/util/dwarf-regs.c b/tools/perf/arch/sh/util/dwarf-regs.c +index f8dfa89696f4..e0eec911f099 100644 +--- a/tools/perf/arch/sh/util/dwarf-regs.c ++++ b/tools/perf/arch/sh/util/dwarf-regs.c +@@ -12,11 +12,6 @@ + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +- * + */ + + #include +diff --git a/tools/perf/arch/x86/util/dwarf-regs.c b/tools/perf/arch/x86/util/dwarf-regs.c +index 1f86ee8fb831..c8e233f81324 100644 +--- a/tools/perf/arch/x86/util/dwarf-regs.c ++++ b/tools/perf/arch/x86/util/dwarf-regs.c +@@ -13,11 +13,6 @@ + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +- * + */ + + #include +diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c +index c0065923a525..6f50f49b1383 100644 +--- a/tools/perf/builtin-probe.c ++++ b/tools/perf/builtin-probe.c +@@ -14,11 +14,6 @@ + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +- * + */ + #include + #include +diff --git a/tools/perf/jvmti/jvmti_agent.c b/tools/perf/jvmti/jvmti_agent.c +index cf36de7ea255..b68a64c3c34c 100644 +--- a/tools/perf/jvmti/jvmti_agent.c ++++ b/tools/perf/jvmti/jvmti_agent.c +@@ -12,10 +12,6 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * +- * You should have received a copy of the GNU Lesser General Public +- * License along with this library; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- * + * Copyright 2007 OProfile authors + * Jens Wilke + * Daniel Hansel +diff --git a/tools/perf/scripts/perl/Perf-Trace-Util/Context.xs b/tools/perf/scripts/perl/Perf-Trace-Util/Context.xs +index 8c7ea42444d1..f74f79dbdc55 100644 +--- a/tools/perf/scripts/perl/Perf-Trace-Util/Context.xs ++++ b/tools/perf/scripts/perl/Perf-Trace-Util/Context.xs +@@ -12,11 +12,6 @@ + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- * + */ + + #include "EXTERN.h" +diff --git a/tools/perf/scripts/python/Perf-Trace-Util/Context.c b/tools/perf/scripts/python/Perf-Trace-Util/Context.c +index fcd1dd667906..7b503f677d1f 100644 +--- a/tools/perf/scripts/python/Perf-Trace-Util/Context.c ++++ b/tools/perf/scripts/python/Perf-Trace-Util/Context.c +@@ -12,11 +12,6 @@ + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- * + */ + + #include +diff --git a/tools/perf/util/dwarf-aux.c b/tools/perf/util/dwarf-aux.c +index f5acda13dcfa..4e186c31b072 100644 +--- a/tools/perf/util/dwarf-aux.c ++++ b/tools/perf/util/dwarf-aux.c +@@ -10,11 +10,6 @@ + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +- * + */ + + #include +diff --git a/tools/perf/util/dwarf-aux.h b/tools/perf/util/dwarf-aux.h +index 8ac53bf1ec4e..0bc9107710b7 100644 +--- a/tools/perf/util/dwarf-aux.h ++++ b/tools/perf/util/dwarf-aux.h +@@ -12,11 +12,6 @@ + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +- * + */ + + #include +diff --git a/tools/perf/util/intel-pt-decoder/inat.c b/tools/perf/util/intel-pt-decoder/inat.c +index 906d94aa0a24..026bfb2f2ec7 100644 +--- a/tools/perf/util/intel-pt-decoder/inat.c ++++ b/tools/perf/util/intel-pt-decoder/inat.c +@@ -12,11 +12,6 @@ + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +- * + */ + #include "insn.h" + +diff --git a/tools/perf/util/intel-pt-decoder/inat.h b/tools/perf/util/intel-pt-decoder/inat.h +index 52dc8d911173..c23120fc20f8 100644 +--- a/tools/perf/util/intel-pt-decoder/inat.h ++++ b/tools/perf/util/intel-pt-decoder/inat.h +@@ -14,11 +14,6 @@ + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +- * + */ + #include "inat_types.h" + +diff --git a/tools/perf/util/intel-pt-decoder/inat_types.h b/tools/perf/util/intel-pt-decoder/inat_types.h +index cb3c20ce39cf..bba552825512 100644 +--- a/tools/perf/util/intel-pt-decoder/inat_types.h ++++ b/tools/perf/util/intel-pt-decoder/inat_types.h +@@ -15,10 +15,6 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +- * + */ + + /* Instruction attributes */ +diff --git a/tools/perf/util/intel-pt-decoder/insn.c b/tools/perf/util/intel-pt-decoder/insn.c +index ca983e2bea8b..d34b5a04ca57 100644 +--- a/tools/perf/util/intel-pt-decoder/insn.c ++++ b/tools/perf/util/intel-pt-decoder/insn.c +@@ -11,10 +11,6 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +- * + * Copyright (C) IBM Corporation, 2002, 2004, 2009 + */ + +diff --git a/tools/perf/util/intel-pt-decoder/insn.h b/tools/perf/util/intel-pt-decoder/insn.h +index e23578c7b1be..3bbd145e7862 100644 +--- a/tools/perf/util/intel-pt-decoder/insn.h ++++ b/tools/perf/util/intel-pt-decoder/insn.h +@@ -13,10 +13,6 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +- * + * Copyright (C) IBM Corporation, 2009 + */ + +diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c +index b7aaf9b2294d..1b3d4dc9961d 100644 +--- a/tools/perf/util/probe-event.c ++++ b/tools/perf/util/probe-event.c +@@ -13,10 +13,6 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +- * + */ + + #include +diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c +index a5731de0e5eb..6877db93709b 100644 +--- a/tools/perf/util/probe-finder.c ++++ b/tools/perf/util/probe-finder.c +@@ -13,10 +13,6 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +- * + */ + + #include +diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c +index 7b79c413486b..38f0caf588d9 100644 +--- a/tools/perf/util/scripting-engines/trace-event-perl.c ++++ b/tools/perf/util/scripting-engines/trace-event-perl.c +@@ -13,10 +13,6 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- * + */ + + #include +diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c +index c7187f067d31..e4b78629c3b3 100644 +--- a/tools/perf/util/scripting-engines/trace-event-python.c ++++ b/tools/perf/util/scripting-engines/trace-event-python.c +@@ -13,10 +13,6 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- * + */ + + #include +diff --git a/tools/perf/util/trace-event-info.c b/tools/perf/util/trace-event-info.c +index d7f2113462fb..098c684b11a4 100644 +--- a/tools/perf/util/trace-event-info.c ++++ b/tools/perf/util/trace-event-info.c +@@ -12,10 +12,6 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + #include "util.h" +diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c +index e0a6e9a6a053..216a1f9d9f6c 100644 +--- a/tools/perf/util/trace-event-parse.c ++++ b/tools/perf/util/trace-event-parse.c +@@ -12,10 +12,6 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + #include +diff --git a/tools/perf/util/trace-event-read.c b/tools/perf/util/trace-event-read.c +index 40b425949aa3..f7b6d2a2704f 100644 +--- a/tools/perf/util/trace-event-read.c ++++ b/tools/perf/util/trace-event-read.c +@@ -12,10 +12,6 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + #include +diff --git a/tools/perf/util/trace-event-scripting.c b/tools/perf/util/trace-event-scripting.c +index 0ac9077f62a2..2d7d0ae9620d 100644 +--- a/tools/perf/util/trace-event-scripting.c ++++ b/tools/perf/util/trace-event-scripting.c +@@ -13,10 +13,6 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- * + */ + + #include +-- +2.14.3 + diff --git a/0001-tools-include-Sync-vmx.h-header-for-FSF-removal.patch b/0001-tools-include-Sync-vmx.h-header-for-FSF-removal.patch new file mode 100644 index 0000000..af48ee5 --- /dev/null +++ b/0001-tools-include-Sync-vmx.h-header-for-FSF-removal.patch @@ -0,0 +1,28 @@ +From 0fa9b337b3038f31e5a882d5e1e397ea3a2dce83 Mon Sep 17 00:00:00 2001 +From: Laura Abbott +Date: Thu, 14 Dec 2017 17:03:17 -0800 +Subject: [PATCH] tools/include: Sync vmx.h header for FSF removal + +Signed-off-by: Laura Abbott +--- + tools/arch/x86/include/uapi/asm/vmx.h | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/tools/arch/x86/include/uapi/asm/vmx.h b/tools/arch/x86/include/uapi/asm/vmx.h +index f0b0c90dd398..e0980a468e9c 100644 +--- a/tools/arch/x86/include/uapi/asm/vmx.h ++++ b/tools/arch/x86/include/uapi/asm/vmx.h +@@ -12,10 +12,6 @@ + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * +- * You should have received a copy of the GNU General Public License along with +- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple +- * Place - Suite 330, Boston, MA 02111-1307 USA. +- * + * A few random additions are: + * Copyright (C) 2006 Qumranet + * Avi Kivity +-- +2.14.3 + diff --git a/0001-tools-lib-Remove-FSF-address.patch b/0001-tools-lib-Remove-FSF-address.patch new file mode 100644 index 0000000..2281acc --- /dev/null +++ b/0001-tools-lib-Remove-FSF-address.patch @@ -0,0 +1,74 @@ +From 464c6dc10f4bb3a7f93ad92fb44a9568e9da6b4f Mon Sep 17 00:00:00 2001 +From: Laura Abbott +Date: Thu, 14 Dec 2017 17:06:21 -0800 +Subject: [PATCH] tools/lib: Remove FSF address +To: Ingo Molnar +To: Arnaldo Carvalho de Melo +Cc: linux-kernel@vger.kernel.org + +Checkpatch in the kernel now complains about having the FSF address +in comments. Other tools such as rpmlint are now starting to do the +same thing. Remove the FSF address to reduce warnings on multiple tools. + +Signed-off-by: Laura Abbott +--- +For context, I'm updating the packaging for perf in Fedora which +requires a code/output review. This got flagged during that review. + +This part of tools doesn't seem to have a clear owner and I don't think +it's kept in sync with the kernel which is why I split this out. I don't +particularly care which tree it goes through (perf?) +--- + tools/include/linux/rbtree.h | 4 ---- + tools/include/linux/rbtree_augmented.h | 4 ---- + tools/lib/rbtree.c | 4 ---- + 3 files changed, 12 deletions(-) + +diff --git a/tools/include/linux/rbtree.h b/tools/include/linux/rbtree.h +index 112582253dd0..b71ec73831bb 100644 +--- a/tools/include/linux/rbtree.h ++++ b/tools/include/linux/rbtree.h +@@ -12,10 +12,6 @@ + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + +- You should have received a copy of the GNU General Public License +- along with this program; if not, write to the Free Software +- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- + linux/include/linux/rbtree.h + + To use rbtrees you'll have to implement your own insert and search cores. +diff --git a/tools/include/linux/rbtree_augmented.h b/tools/include/linux/rbtree_augmented.h +index 43be941db695..db08eb26eb15 100644 +--- a/tools/include/linux/rbtree_augmented.h ++++ b/tools/include/linux/rbtree_augmented.h +@@ -14,10 +14,6 @@ + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + +- You should have received a copy of the GNU General Public License +- along with this program; if not, write to the Free Software +- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- + tools/linux/include/linux/rbtree_augmented.h + + Copied from: +diff --git a/tools/lib/rbtree.c b/tools/lib/rbtree.c +index 17c2b596f043..df538c4139ce 100644 +--- a/tools/lib/rbtree.c ++++ b/tools/lib/rbtree.c +@@ -14,10 +14,6 @@ + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + +- You should have received a copy of the GNU General Public License +- along with this program; if not, write to the Free Software +- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- + linux/lib/rbtree.c + */ + +-- +2.14.3 + diff --git a/0001-tools-power-Don-t-make-man-pages-executable.patch b/0001-tools-power-Don-t-make-man-pages-executable.patch new file mode 100644 index 0000000..16cb72e --- /dev/null +++ b/0001-tools-power-Don-t-make-man-pages-executable.patch @@ -0,0 +1,42 @@ +From 2c54dcb09fd790cb75535f01c466725f813b8d6b Mon Sep 17 00:00:00 2001 +From: Laura Abbott +Date: Tue, 19 Dec 2017 11:43:53 -0800 +Subject: [PATCH 1/2] tools/power: Don't make man pages executable + +rpm-lint flagged these as being executable: + +kernel-tools.x86_64: W: spurious-executable-perm /usr/share/man/man8/turbostat.8.gz +kernel-tools.x86_64: W: spurious-executable-perm /usr/share/man/man8/x86_energy_perf_policy.8.gz + +Fix this + +Signed-off-by: Laura Abbott +--- + tools/power/x86/turbostat/Makefile | 2 +- + tools/power/x86/x86_energy_perf_policy/Makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/power/x86/turbostat/Makefile b/tools/power/x86/turbostat/Makefile +index a9bc914a8fe8..2ab25aa38263 100644 +--- a/tools/power/x86/turbostat/Makefile ++++ b/tools/power/x86/turbostat/Makefile +@@ -25,4 +25,4 @@ install : turbostat + install -d $(DESTDIR)$(PREFIX)/bin + install $(BUILD_OUTPUT)/turbostat $(DESTDIR)$(PREFIX)/bin/turbostat + install -d $(DESTDIR)$(PREFIX)/share/man/man8 +- install turbostat.8 $(DESTDIR)$(PREFIX)/share/man/man8 ++ install -m 644 turbostat.8 $(DESTDIR)$(PREFIX)/share/man/man8 +diff --git a/tools/power/x86/x86_energy_perf_policy/Makefile b/tools/power/x86/x86_energy_perf_policy/Makefile +index 2447b1bbaacf..f4534fb8b951 100644 +--- a/tools/power/x86/x86_energy_perf_policy/Makefile ++++ b/tools/power/x86/x86_energy_perf_policy/Makefile +@@ -24,5 +24,5 @@ install : x86_energy_perf_policy + install -d $(DESTDIR)$(PREFIX)/bin + install $(BUILD_OUTPUT)/x86_energy_perf_policy $(DESTDIR)$(PREFIX)/bin/x86_energy_perf_policy + install -d $(DESTDIR)$(PREFIX)/share/man/man8 +- install x86_energy_perf_policy.8 $(DESTDIR)$(PREFIX)/share/man/man8 ++ install -m 644 x86_energy_perf_policy.8 $(DESTDIR)$(PREFIX)/share/man/man8 + +-- +2.14.3 + diff --git a/0002-perf-Don-t-make-sourced-script-executable.patch b/0002-perf-Don-t-make-sourced-script-executable.patch new file mode 100644 index 0000000..7ff06b6 --- /dev/null +++ b/0002-perf-Don-t-make-sourced-script-executable.patch @@ -0,0 +1,32 @@ +From a6e7db4598211d4022c97d699142cd02740faa4e Mon Sep 17 00:00:00 2001 +From: Laura Abbott +Date: Tue, 19 Dec 2017 11:45:52 -0800 +Subject: [PATCH 2/2] perf: Don't make sourced script executable + +rpm lint flagged this: + +perf.x86_64: E: executable-sourced-script /etc/bash_completion.d/perf 755 + +Make this not be executable + +Signed-off-by: Laura Abbott +--- + tools/perf/Makefile.perf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf +index 68cf1360a3f3..a072790f5fad 100644 +--- a/tools/perf/Makefile.perf ++++ b/tools/perf/Makefile.perf +@@ -789,7 +789,7 @@ ifndef NO_LIBPYTHON + endif + $(call QUIET_INSTALL, perf_completion-script) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d'; \ +- $(INSTALL) perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' ++ $(INSTALL) -m 644 perf-completion.sh '$(DESTDIR_SQ)$(sysconfdir_SQ)/bash_completion.d/perf' + $(call QUIET_INSTALL, perf-tip) \ + $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(tip_instdir_SQ)'; \ + $(INSTALL) Documentation/tips.txt -t '$(DESTDIR_SQ)$(tip_instdir_SQ)' +-- +2.14.3 + diff --git a/README.md b/README.md deleted file mode 100644 index 595ac8b..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# kernel-tools - -The kernel-tools package \ No newline at end of file diff --git a/cpupower.config b/cpupower.config new file mode 100644 index 0000000..8629a4a --- /dev/null +++ b/cpupower.config @@ -0,0 +1,3 @@ +# See 'cpupower help' and cpupower(1) for more info +CPUPOWER_START_OPTS="frequency-set -g performance" +CPUPOWER_STOP_OPTS="frequency-set -g ondemand" diff --git a/cpupower.service b/cpupower.service new file mode 100644 index 0000000..5f10ab7 --- /dev/null +++ b/cpupower.service @@ -0,0 +1,13 @@ +[Unit] +Description=Configure CPU power related settings +After=syslog.target + +[Service] +Type=oneshot +RemainAfterExit=yes +EnvironmentFile=/etc/sysconfig/cpupower +ExecStart=/usr/bin/cpupower $CPUPOWER_START_OPTS +ExecStop=/usr/bin/cpupower $CPUPOWER_STOP_OPTS + +[Install] +WantedBy=multi-user.target diff --git a/kernel-tools.spec b/kernel-tools.spec new file mode 100644 index 0000000..c3d32e0 --- /dev/null +++ b/kernel-tools.spec @@ -0,0 +1,370 @@ +# Much of this is borrowed from the original kernel.spec +# It needs a bunch of the macros for rawhide vs. not-rawhide builds. + +# For a stable, released kernel, released_kernel should be 1. For rawhide +# and/or a kernel built from an rc or git snapshot, released_kernel should +# be 0. +%global released_kernel 0 +%global baserelease 1 +%global fedora_build %{baserelease} + +# base_sublevel is the kernel version we're starting with and patching +# on top of -- for example, 3.1-rc7-git1 starts with a 3.0 base, +# which yields a base_sublevel of 0. +%global base_sublevel 14 + +## If this is a released kernel ## +%if 0%{?released_kernel} + +# Do we have a -stable update to apply? +%global stable_update 0 +# Set rpm version accordingly +%if 0%{?stable_update} +%global stablerev %{stable_update} +%global stable_base %{stable_update} +%endif +%global rpmversion 4.%{base_sublevel}.%{stable_update} + +## The not-released-kernel case ## +%else +# The next upstream release sublevel (base_sublevel+1) +%global upstream_sublevel %(echo $((%{base_sublevel} + 1))) +# The rc snapshot level +%global rcrev 6 +# Set rpm version accordingly +%global rpmversion 4.%{upstream_sublevel}.0 +%endif +# Nb: The above rcrev values automagically define Patch00 and Patch01 below. + +# pkg_release is what we'll fill in for the rpm Release: field +%if 0%{?released_kernel} + +%global pkg_release %{fedora_build}%{?buildid}%{?dist} + +%else + +# non-released_kernel +%if 0%{?rcrev} +%global rctag .rc%rcrev +%else +%global rctag .rc0 +%endif +%global gittag .git0 +%global pkg_release 0%{?rctag}%{?gittag}.%{fedora_build}%{?buildid}%{?dist} + +%endif + +# The kernel tarball/base version +%global kversion 4.%{base_sublevel} +%global KVERREL %{version}-%{release}.%{_target_cpu} + +%global _debuginfo_subpackages 1 +%undefine _include_gdb_index +%undefine _include_minidebuginfo + +BuildRequires: kmod, patch, bash, tar, git +BuildRequires: bzip2, xz, findutils, gzip, m4, perl-interpreter, perl(Carp), perl-devel, perl-generators, make, diffutils, gawk +BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc +BuildRequires: net-tools, hostname, bc, elfutils-devel +BuildRequires: zlib-devel binutils-devel newt-devel python2-devel perl(ExtUtils::Embed) bison flex xz-devel +BuildRequires: audit-libs-devel +%ifnarch s390x %{arm} +BuildRequires: numactl-devel +%endif +BuildRequires: pciutils-devel gettext ncurses-devel +BuildConflicts: rhbuildsys(DiskFree) < 500Mb +BuildRequires: rpm-build, elfutils +%{?systemd_requires} +BuildRequires: systemd + +Source0: https://www.kernel.org/pub/linux/kernel/v4.x/linux-%{kversion}.tar.xz +Source10: perf-man-%{kversion}.tar.gz + +# Sources for kernel-tools +Source2000: cpupower.service +Source2001: cpupower.config + +# Here should be only the patches up to the upstream canonical Linus tree. + +# For a stable release kernel +%if 0%{?stable_base} +Source5000: patch-4.%{base_sublevel}.%{stable_base}.xz +%else +# non-released_kernel case +# These are automagically defined by the rcrev value set up +# near the top of this spec file. +%if 0%{?rcrev} +Source5000: patch-4.%{upstream_sublevel}-rc%{rcrev}.xz +%endif +%endif + +# ongoing complaint, full discussion delayed until ksummit/plumbers +Patch0: 0001-iio-Use-event-header-from-kernel-tree.patch + +# rpmlint cleanup +Patch1: 0001-perf-Remove-FSF-address.patch +Patch2: 0001-cpupower-Remove-FSF-address.patch +Patch3: 0001-tools-include-Sync-vmx.h-header-for-FSF-removal.patch +Patch4: 0001-tools-lib-Remove-FSF-address.patch +Patch5: 0001-tools-power-Don-t-make-man-pages-executable.patch +Patch6: 0002-perf-Don-t-make-sourced-script-executable.patch +Name: kernel-tools +Summary: Assortment of tools for the Linux kernel +License: GPLv2 +URL: http://www.kernel.org/ +Version: %{rpmversion} +Release: %{pkg_release} +Provides: cpupowerutils = 1:009-0.6.p1 +Obsoletes: cpupowerutils < 1:009-0.6.p1 +Provides: cpufreq-utils = 1:009-0.6.p1 +Provides: cpufrequtils = 1:009-0.6.p1 +Obsoletes: cpufreq-utils < 1:009-0.6.p1 +Obsoletes: cpufrequtils < 1:009-0.6.p1 +Obsoletes: cpuspeed < 1:1.5-16 +Requires: kernel-tools-libs = %{version}-%{release} +%global __requires_exclude ^%{_bindir}/python +%description -n kernel-tools +This package contains the tools/ directory from the kernel source +and the supporting documentation. + + +%package -n perf +Summary: Performance monitoring for the Linux kernel +License: GPLv2 +%description -n perf +This package contains the perf tool, which enables performance monitoring +of the Linux kernel. + +%package -n python-perf +Summary: Python bindings for apps which will manipulate perf events +%description -n python-perf +The python-perf package contains a module that permits applications +written in the Python programming language to use the interface +to manipulate perf events. + +%package -n kernel-tools-libs +Summary: Libraries for the kernels-tools +License: GPLv2 +%description -n kernel-tools-libs +This package contains the libraries built from the tools/ directory +from the kernel source. + +%package -n kernel-tools-libs-devel +Summary: Assortment of tools for the Linux kernel +License: GPLv2 +Requires: kernel-tools = %{version}-%{release} +Provides: cpupowerutils-devel = 1:009-0.6.p1 +Obsoletes: cpupowerutils-devel < 1:009-0.6.p1 +Requires: kernel-tools-libs = %{version}-%{release} +Provides: kernel-tools-devel +%description -n kernel-tools-libs-devel +This package contains the development files for the tools/ directory from +the kernel source. + +%prep +%setup -q -n kernel-%{kversion}%{?dist} -c + +cd linux-%{kversion} + +# This is for patching either an -rc or stable +%if 0%{?rcrev} + xzcat %{SOURCE5000} | patch -p1 -F1 -s +%endif + +%if 0%{?stable_base} + xzcat %{SOURCE5000} | patch -p1 -F1 -s +%endif + +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 + +# END OF PATCH APPLICATIONS + +### +### build +### +%build + +cd linux-%{kversion} + +%global perf_make \ + make -s EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{?cross_opts} -C tools/perf V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 NO_JVMTI=1 prefix=%{_prefix} +# perf +# make sure check-headers.sh is executable +chmod +x tools/perf/check-headers.sh +%{perf_make} all + +# cpupower +# make sure version-gen.sh is executable. +chmod +x tools/power/cpupower/utils/version-gen.sh +make %{?_smp_mflags} -C tools/power/cpupower CPUFREQ_BENCH=false +%ifarch %{ix86} + pushd tools/power/cpupower/debug/i386 + make %{?_smp_mflags} centrino-decode powernow-k8-decode + popd +%endif +%ifarch x86_64 + pushd tools/power/cpupower/debug/x86_64 + make %{?_smp_mflags} centrino-decode powernow-k8-decode + popd +%endif +%ifarch %{ix86} x86_64 + pushd tools/power/x86/x86_energy_perf_policy/ + make + popd + pushd tools/power/x86/turbostat + make + popd +%endif #turbostat/x86_energy_perf_policy +pushd tools/thermal/tmon/ +make +popd +pushd tools/iio/ +make +popd +pushd tools/gpio/ +make +popd + +### +### install +### + +%install + +cd linux-%{kversion} + +# perf tool binary and supporting scripts/binaries +%{perf_make} DESTDIR=%{buildroot} lib=%{_lib} install-bin install-traceevent-plugins +# remove the 'trace' symlink. +rm -f %{buildroot}%{_bindir}/trace +# remove the perf-tips +rm -rf %{buildroot}%{_docdir}/perf-tip + +# python-perf extension +%{perf_make} DESTDIR=%{buildroot} install-python_ext + +# perf man pages (note: implicit rpm magic compresses them later) +mkdir -p %{buildroot}/%{_mandir}/man1 +pushd %{buildroot}/%{_mandir}/man1 +tar -xf %{SOURCE10} +popd + +make -C tools/power/cpupower DESTDIR=%{buildroot} libdir=%{_libdir} mandir=%{_mandir} CPUFREQ_BENCH=false install +rm -f %{buildroot}%{_libdir}/*.{a,la} +%find_lang cpupower +mv cpupower.lang ../ +%ifarch %{ix86} + pushd tools/power/cpupower/debug/i386 + install -m755 centrino-decode %{buildroot}%{_bindir}/centrino-decode + install -m755 powernow-k8-decode %{buildroot}%{_bindir}/powernow-k8-decode + popd +%endif +%ifarch x86_64 + pushd tools/power/cpupower/debug/x86_64 + install -m755 centrino-decode %{buildroot}%{_bindir}/centrino-decode + install -m755 powernow-k8-decode %{buildroot}%{_bindir}/powernow-k8-decode + popd +%endif +chmod 0755 %{buildroot}%{_libdir}/libcpupower.so* +mkdir -p %{buildroot}%{_unitdir} %{buildroot}%{_sysconfdir}/sysconfig +install -m644 %{SOURCE2000} %{buildroot}%{_unitdir}/cpupower.service +install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower +%ifarch %{ix86} x86_64 + mkdir -p %{buildroot}%{_mandir}/man8 + pushd tools/power/x86/x86_energy_perf_policy + make DESTDIR=%{buildroot} install + popd + pushd tools/power/x86/turbostat + make DESTDIR=%{buildroot} install + popd +%endif #turbostat/x86_energy_perf_policy +pushd tools/thermal/tmon +make INSTALL_ROOT=%{buildroot} install +popd +pushd tools/iio +make DESTDIR=%{buildroot} install +popd +pushd tools/gpio +make DESTDIR=%{buildroot} install +popd +pushd tools/kvm/kvm_stat +make INSTALL_ROOT=%{buildroot} install-tools +popd + +### +### scripts +### + +%post -n kernel-tools-libs -p /sbin/ldconfig + +%postun -n kernel-tools-libs -p /sbin/ldconfig + +%post -n kernel-tools +%systemd_post cpupower.service + +%preun -n kernel-tools +%systemd_preun cpupower.service + +%postun +%systemd_postun cpupower.service + +%files -n perf +%{_bindir}/perf +%dir %{_libdir}/traceevent +%{_libdir}/traceevent/plugins/ +%{_libexecdir}/perf-core +%{_datadir}/perf-core/ +%{_mandir}/man[1-8]/perf* +%{_sysconfdir}/bash_completion.d/perf +%doc linux-%{kversion}/tools/perf/Documentation/examples.txt +%license linux-%{kversion}/COPYING + +%files -n python-perf +%license linux-%{kversion}/COPYING +%{python_sitearch} + +%files -n kernel-tools -f cpupower.lang +%{_bindir}/cpupower +%ifarch %{ix86} x86_64 +%{_bindir}/centrino-decode +%{_bindir}/powernow-k8-decode +%endif +%{_unitdir}/cpupower.service +%{_mandir}/man[1-8]/cpupower* +%config(noreplace) %{_sysconfdir}/sysconfig/cpupower +%ifarch %{ix86} x86_64 +%{_bindir}/x86_energy_perf_policy +%{_mandir}/man8/x86_energy_perf_policy* +%{_bindir}/turbostat +%{_mandir}/man8/turbostat* +%endif +%{_bindir}/tmon +%{_bindir}/iio_event_monitor +%{_bindir}/iio_generic_buffer +%{_bindir}/lsiio +%{_bindir}/lsgpio +%{_bindir}/gpio-hammer +%{_bindir}/gpio-event-mon +%{_mandir}/man1/kvm_stat* +%{_bindir}/kvm_stat +%license linux-%{kversion}/COPYING + +%files -n kernel-tools-libs +%{_libdir}/libcpupower.so.0 +%{_libdir}/libcpupower.so.0.0.1 +%license linux-%{kversion}/COPYING + +%files -n kernel-tools-libs-devel +%{_libdir}/libcpupower.so +%{_includedir}/cpufreq.h +%{_includedir}/cpuidle.h + +%changelog +* Fri Jan 05 2018 Laura Abbott - 4.15.0-0.rc6.git0.1 +- Fork from the kernel package diff --git a/sources b/sources new file mode 100644 index 0000000..06a528a --- /dev/null +++ b/sources @@ -0,0 +1,3 @@ +SHA512 (linux-4.14.tar.xz) = 77e43a02d766c3d73b7e25c4aafb2e931d6b16e870510c22cef0cdb05c3acb7952b8908ebad12b10ef982c6efbe286364b1544586e715cf38390e483927904d8 +SHA512 (patch-4.15-rc6.xz) = 45f97ae4216403ee3b3a7e9575610ff422b39650494e82cb194c996511911f2d5a4fdc42456841a083a0d450821648b611d7fd3538cbc3d5c1b2bcbd9486f884 +SHA512 (perf-man-4.14.tar.gz) = 76a9d8adc284cdffd4b3fbb060e7f9a14109267707ce1d03f4c3239cd70d8d164f697da3a0f90a363fbcac42a61d3c378afbcc2a86f112c501b9cb5ce74ef9f8