Home Home > GIT Browse > vanilla
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKernel Build Daemon <kbuild@suse.de>2018-04-07 07:22:50 +0200
committerKernel Build Daemon <kbuild@suse.de>2018-04-07 07:22:50 +0200
commitf24992c655d624ca91282d28bfa526249afe6199 (patch)
treee279b27b3ea922b13ba0f103f69e0f73afd5f173
parent8c6ffec2d0eec5ae79840c2b55ac5209b59ef34b (diff)
parent97000937ddf9a4dc3542b8cfcaa70ca2bde7c95e (diff)
Merge branch 'SLE12-SP3' into openSUSE-42.3rpm-4.4.126-48
-rw-r--r--patches.arch/s390-sles12sp3-12-02-01-s390-mm-no-local-TLB-flush-for-clearing-by-ASCE-IDTE.patch111
-rw-r--r--patches.arch/s390-sles12sp3-12-02-02-s390-mm-fix-local-TLB-flushing-vs.-detach-of-an-mm-a.patch139
-rw-r--r--patches.arch/s390-sles12sp3-12-02-03-s390-mm-fix-race-on-mm-context.flush_mm.patch99
-rw-r--r--patches.drivers/ibmvnic-Account-for-VLAN-header-length-in-TX-buffers.patch3
-rw-r--r--patches.drivers/ibmvnic-Account-for-VLAN-tag-in-L2-Header-descriptor.patch3
-rw-r--r--patches.drivers/ibmvnic-Allocate-max-queues-stats-buffers.patch3
-rw-r--r--patches.drivers/ibmvnic-Allocate-statistics-buffers-during-probe.patch3
-rw-r--r--patches.drivers/ibmvnic-Clean-up-device-close.patch3
-rw-r--r--patches.drivers/ibmvnic-Correct-goto-target-for-tx-irq-initializatio.patch3
-rw-r--r--patches.drivers/ibmvnic-Do-not-attempt-to-login-if-RX-or-TX-queues-a.patch3
-rw-r--r--patches.drivers/ibmvnic-Do-not-disable-device-during-failover-or-par.patch3
-rw-r--r--patches.drivers/ibmvnic-Fix-TX-descriptor-tracking-again.patch3
-rw-r--r--patches.drivers/ibmvnic-Fix-TX-descriptor-tracking.patch3
-rw-r--r--patches.drivers/ibmvnic-Fix-recent-errata-commit.patch3
-rw-r--r--patches.drivers/ibmvnic-Fix-reset-return-from-closed-state.patch3
-rw-r--r--patches.drivers/ibmvnic-Free-and-re-allocate-scrqs-when-tx-rx-scrqs-.patch3
-rw-r--r--patches.drivers/ibmvnic-Generalize-TX-pool-structure.patch3
-rw-r--r--patches.drivers/ibmvnic-Handle-TSO-backing-device-errata.patch3
-rw-r--r--patches.drivers/ibmvnic-Harden-TX-RX-pool-cleaning.patch3
-rw-r--r--patches.drivers/ibmvnic-Improve-TX-buffer-accounting.patch3
-rw-r--r--patches.drivers/ibmvnic-Keep-track-of-supplementary-TX-descriptors.patch3
-rw-r--r--patches.drivers/ibmvnic-Make-napi-usage-dynamic.patch3
-rw-r--r--patches.drivers/ibmvnic-Move-active-sub-crq-count-settings.patch3
-rw-r--r--patches.drivers/ibmvnic-Pad-small-packets-to-minimum-MTU-size.patch3
-rw-r--r--patches.drivers/ibmvnic-Potential-NULL-dereference-in-clean_one_tx_p.patch3
-rw-r--r--patches.drivers/ibmvnic-Remove-unused-TSO-resources-in-TX-pool-struc.patch3
-rw-r--r--patches.drivers/ibmvnic-Rename-active-queue-count-variables.patch3
-rw-r--r--patches.drivers/ibmvnic-Reorganize-device-close.patch3
-rw-r--r--patches.drivers/ibmvnic-Report-queue-stops-and-restarts-as-debug-out.patch3
-rw-r--r--patches.drivers/ibmvnic-Split-counters-for-scrq-pools-napi.patch3
-rw-r--r--patches.drivers/ibmvnic-Update-TX-and-TX-completion-routines.patch3
-rw-r--r--patches.drivers/ibmvnic-Update-TX-pool-cleaning-routine.patch3
-rw-r--r--patches.drivers/ibmvnic-Update-TX-pool-initialization-routine.patch3
-rw-r--r--patches.drivers/ibmvnic-Update-and-clean-up-reset-TX-pool-routine.patch3
-rw-r--r--patches.drivers/ibmvnic-Update-release-TX-pool-routine.patch3
-rw-r--r--patches.suse/22-x86-cpu-amd-add-speculative-control-support-for-amd.patch15
-rw-r--r--patches.suse/23-x86-spec-check-cpuid-direclty-post-microcode-reload-to-support-ibpb-feature.patch16
-rw-r--r--patches.suse/32-x86-nospec-fix-ordering-of-earlyparam-vs-cap-clearing.patch23
-rw-r--r--patches.suse/suse-hv-hv_balloon-fix-bugs-in-num_pages_onlined-accounting.patch144
-rw-r--r--patches.suse/suse-hv-hv_balloon-fix-printk-loglevel.patch77
-rw-r--r--patches.suse/suse-hv-hv_balloon-simplify-hv_online_page-hv_page_online_on.patch74
-rwxr-xr-xscripts/bs-upload-kernel2
-rwxr-xr-xscripts/git-pre-commit16
-rw-r--r--scripts/git_sort/exc.py14
-rwxr-xr-xscripts/git_sort/git_sort.py41
-rw-r--r--scripts/git_sort/lib.py126
-rwxr-xr-xscripts/git_sort/merge_tool.py22
-rwxr-xr-xscripts/git_sort/pre-commit.sh38
-rwxr-xr-xscripts/git_sort/qcp.py3
-rwxr-xr-xscripts/git_sort/qdupcheck.py3
-rwxr-xr-xscripts/git_sort/qgoto.py3
-rwxr-xr-xscripts/git_sort/sequence-insert.py3
-rwxr-xr-xscripts/git_sort/series_conf.py93
-rwxr-xr-xscripts/git_sort/series_insert.py12
-rwxr-xr-xscripts/git_sort/series_sort.py12
-rw-r--r--scripts/git_sort/tests/support.py96
-rwxr-xr-xscripts/git_sort/tests/test_quilt_mode.py96
-rw-r--r--scripts/git_sort/tests/test_series_insert.py135
-rwxr-xr-xscripts/git_sort/tests/test_series_sort.py78
-rwxr-xr-xscripts/gitlog2changes17
-rwxr-xr-xscripts/osc_wrapper2
-rwxr-xr-xscripts/tar-up.sh3
-rw-r--r--series.conf10
63 files changed, 1251 insertions, 368 deletions
diff --git a/patches.arch/s390-sles12sp3-12-02-01-s390-mm-no-local-TLB-flush-for-clearing-by-ASCE-IDTE.patch b/patches.arch/s390-sles12sp3-12-02-01-s390-mm-no-local-TLB-flush-for-clearing-by-ASCE-IDTE.patch
new file mode 100644
index 0000000000..f643cfb073
--- /dev/null
+++ b/patches.arch/s390-sles12sp3-12-02-01-s390-mm-no-local-TLB-flush-for-clearing-by-ASCE-IDTE.patch
@@ -0,0 +1,111 @@
+From: Gerald Schaefer <gerald.schaefer@de.ibm.com>
+Subject: s390/mm: no local TLB flush for clearing-by-ASCE IDTE
+Patch-mainline: v4.9-rc1
+Git-commit: d5dcafee5f183e9aedddb147a89cb46ab038f26b
+References: bnc#1088324, LTC#166470
+
+Description: s390/mm: fix races in TLB flushing code
+Symptom: Kernel panic (e.g. "Low-address protection") or possible data
+ corruption.
+Problem: There are two race conditions in the TLB flushing code,
+ related to mm_cpumask reset vs. mm detach, and unserialized
+ setting of the mm->context.flush_mm bit.
+Solution: Add a spinlock to serialize __tlb_flush_mm_lazy, and fix
+ the ordering of mm_cpumask reset.
+Reproduction: TLB flushing bugs are hard to hit, there are no known steps
+ to reproduce.
+
+Upstream-Description:
+
+ s390/mm: no local TLB flush for clearing-by-ASCE IDTE
+
+ The local-clearing control of the IDTE instruction does not have any effect
+ for the clearing-by-ASCE operation. Only the invalidation-and-clearing
+ operation respects the local-clearing bit.
+
+ Remove __tlb_flush_idte_local and simplify the batched TLB flushing code.
+
+ Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+ Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+
+Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
+Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
+---
+ arch/s390/include/asm/tlbflush.h | 46 ++++++++-------------------------------
+ 1 file changed, 10 insertions(+), 36 deletions(-)
+
+--- a/arch/s390/include/asm/tlbflush.h
++++ b/arch/s390/include/asm/tlbflush.h
+@@ -26,17 +26,6 @@ static inline void __tlb_flush_idte(unsi
+ : : "a" (2048), "a" (asce) : "cc");
+ }
+
+-/*
+- * Flush TLB entries for a specific ASCE on the local CPU
+- */
+-static inline void __tlb_flush_idte_local(unsigned long asce)
+-{
+- /* Local TLB flush for the mm */
+- asm volatile(
+- " .insn rrf,0xb98e0000,0,%0,%1,1"
+- : : "a" (2048), "a" (asce) : "cc");
+-}
+-
+ #ifdef CONFIG_SMP
+ void smp_ptlb_all(void);
+
+@@ -79,24 +68,15 @@ static inline void __tlb_flush_full(stru
+ */
+ static inline void __tlb_flush_asce(struct mm_struct *mm, unsigned long asce)
+ {
+- int active, count;
+-
+ preempt_disable();
+- active = (mm == current->active_mm) ? 1 : 0;
+- count = atomic_add_return(0x10000, &mm->context.attach_count);
+- if (MACHINE_HAS_TLB_LC && (count & 0xffff) <= active &&
+- cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) {
+- __tlb_flush_idte_local(asce);
+- } else {
+- if (MACHINE_HAS_IDTE)
+- __tlb_flush_idte(asce);
+- else
+- __tlb_flush_global();
+- /* Reset TLB flush mask */
+- if (MACHINE_HAS_TLB_LC)
+- cpumask_copy(mm_cpumask(mm),
+- &mm->context.cpu_attach_mask);
+- }
++ atomic_add(0x10000, &mm->context.attach_count);
++ if (MACHINE_HAS_IDTE)
++ __tlb_flush_idte(asce);
++ else
++ __tlb_flush_global();
++ /* Reset TLB flush mask */
++ if (MACHINE_HAS_TLB_LC)
++ cpumask_copy(mm_cpumask(mm), &mm->context.cpu_attach_mask);
+ atomic_sub(0x10000, &mm->context.attach_count);
+ preempt_enable();
+ }
+@@ -117,18 +97,12 @@ static inline void __tlb_flush_kernel(vo
+ */
+ static inline void __tlb_flush_asce(struct mm_struct *mm, unsigned long asce)
+ {
+- if (MACHINE_HAS_TLB_LC)
+- __tlb_flush_idte_local(asce);
+- else
+- __tlb_flush_local();
++ __tlb_flush_local();
+ }
+
+ static inline void __tlb_flush_kernel(void)
+ {
+- if (MACHINE_HAS_TLB_LC)
+- __tlb_flush_idte_local(init_mm.context.asce);
+- else
+- __tlb_flush_local();
++ __tlb_flush_local();
+ }
+ #endif
+
diff --git a/patches.arch/s390-sles12sp3-12-02-02-s390-mm-fix-local-TLB-flushing-vs.-detach-of-an-mm-a.patch b/patches.arch/s390-sles12sp3-12-02-02-s390-mm-fix-local-TLB-flushing-vs.-detach-of-an-mm-a.patch
new file mode 100644
index 0000000000..48572f4236
--- /dev/null
+++ b/patches.arch/s390-sles12sp3-12-02-02-s390-mm-fix-local-TLB-flushing-vs.-detach-of-an-mm-a.patch
@@ -0,0 +1,139 @@
+From: Gerald Schaefer <gerald.schaefer@de.ibm.com>
+Subject: s390/mm: fix local TLB flushing vs. detach of an mm address space
+Patch-mainline: v4.14-rc1
+Git-commit: b3e5dc45fd1ec2aa1de6b80008f9295eb17e0659
+References: bnc#1088324, LTC#166470
+
+Description: s390/mm: fix races in TLB flushing code
+Symptom: Kernel panic (e.g. "Low-address protection") or possible data
+ corruption.
+Problem: There are two race conditions in the TLB flushing code,
+ related to mm_cpumask reset vs. mm detach, and unserialized
+ setting of the mm->context.flush_mm bit.
+Solution: Add a spinlock to serialize __tlb_flush_mm_lazy, and fix
+ the ordering of mm_cpumask reset.
+Reproduction: TLB flushing bugs are hard to hit, there are no known steps
+ to reproduce.
+
+Upstream-Description:
+
+ s390/mm: fix local TLB flushing vs. detach of an mm address space
+
+ The local TLB flushing code keeps an additional mask in the mm.context,
+ the cpu_attach_mask. At the time a global flush of an address space is
+ done the cpu_attach_mask is copied to the mm_cpumask in order to avoid
+ future global flushes in case the mm is used by a single CPU only after
+ the flush.
+
+ Trouble is that the reset of the mm_cpumask is racy against the detach
+ of an mm address space by switch_mm. The current order is first the
+ global TLB flush and then the copy of the cpu_attach_mask to the
+ mm_cpumask. The order needs to be the other way around.
+
+ Cc: <stable@vger.kernel.org>
+ Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+ Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+
+Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
+Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
+---
+ arch/s390/include/asm/tlbflush.h | 56 +++++++++++----------------------------
+ 1 file changed, 16 insertions(+), 40 deletions(-)
+
+--- a/arch/s390/include/asm/tlbflush.h
++++ b/arch/s390/include/asm/tlbflush.h
+@@ -40,47 +40,31 @@ static inline void __tlb_flush_global(vo
+ }
+
+ /*
+- * Flush TLB entries for a specific mm on all CPUs (in case gmap is used
+- * this implicates multiple ASCEs!).
++ * Flush TLB entries for a specific ASCE on all CPUs.
+ */
+-static inline void __tlb_flush_full(struct mm_struct *mm)
++static inline void __tlb_flush_mm(struct mm_struct * mm)
+ {
++ /*
++ * If the machine has IDTE we prefer to do a per mm flush
++ * on all cpus instead of doing a local flush if the mm
++ * only ran on the local cpu.
++ */
+ preempt_disable();
+ atomic_add(0x10000, &mm->context.attach_count);
+- if (cpumask_equal(mm_cpumask(mm), cpumask_of(smp_processor_id()))) {
+- /* Local TLB flush */
+- __tlb_flush_local();
++ /* Reset TLB flush mask */
++ if (MACHINE_HAS_TLB_LC)
++ cpumask_copy(mm_cpumask(mm), &mm->context.cpu_attach_mask);
++ barrier();
++ if (MACHINE_HAS_IDTE && list_empty(&mm->context.gmap_list)) {
++ __tlb_flush_idte(mm->context.asce);
+ } else {
+ /* Global TLB flush */
+ __tlb_flush_global();
+- /* Reset TLB flush mask */
+- if (MACHINE_HAS_TLB_LC)
+- cpumask_copy(mm_cpumask(mm),
+- &mm->context.cpu_attach_mask);
+ }
+ atomic_sub(0x10000, &mm->context.attach_count);
+ preempt_enable();
+ }
+
+-/*
+- * Flush TLB entries for a specific ASCE on all CPUs. Should never be used
+- * when more than one asce (e.g. gmap) ran on this mm.
+- */
+-static inline void __tlb_flush_asce(struct mm_struct *mm, unsigned long asce)
+-{
+- preempt_disable();
+- atomic_add(0x10000, &mm->context.attach_count);
+- if (MACHINE_HAS_IDTE)
+- __tlb_flush_idte(asce);
+- else
+- __tlb_flush_global();
+- /* Reset TLB flush mask */
+- if (MACHINE_HAS_TLB_LC)
+- cpumask_copy(mm_cpumask(mm), &mm->context.cpu_attach_mask);
+- atomic_sub(0x10000, &mm->context.attach_count);
+- preempt_enable();
+-}
+-
+ static inline void __tlb_flush_kernel(void)
+ {
+ if (MACHINE_HAS_IDTE)
+@@ -90,7 +74,6 @@ static inline void __tlb_flush_kernel(vo
+ }
+ #else
+ #define __tlb_flush_global() __tlb_flush_local()
+-#define __tlb_flush_full(mm) __tlb_flush_local()
+
+ /*
+ * Flush TLB entries for a specific ASCE on all CPUs.
+@@ -104,21 +87,14 @@ static inline void __tlb_flush_kernel(vo
+ {
+ __tlb_flush_local();
+ }
+-#endif
+
+ static inline void __tlb_flush_mm(struct mm_struct * mm)
+ {
+- /*
+- * If the machine has IDTE we prefer to do a per mm flush
+- * on all cpus instead of doing a local flush if the mm
+- * only ran on the local cpu.
+- */
+- if (MACHINE_HAS_IDTE && list_empty(&mm->context.gmap_list))
+- __tlb_flush_asce(mm, mm->context.asce);
+- else
+- __tlb_flush_full(mm);
++ __tlb_flush_local();
+ }
+
++#endif
++
+ static inline void __tlb_flush_mm_lazy(struct mm_struct * mm)
+ {
+ if (mm->context.flush_mm) {
diff --git a/patches.arch/s390-sles12sp3-12-02-03-s390-mm-fix-race-on-mm-context.flush_mm.patch b/patches.arch/s390-sles12sp3-12-02-03-s390-mm-fix-race-on-mm-context.flush_mm.patch
new file mode 100644
index 0000000000..0f3e924ba0
--- /dev/null
+++ b/patches.arch/s390-sles12sp3-12-02-03-s390-mm-fix-race-on-mm-context.flush_mm.patch
@@ -0,0 +1,99 @@
+From: Gerald Schaefer <gerald.schaefer@de.ibm.com>
+Subject: s390/mm: fix race on mm->context.flush_mm
+Patch-mainline: v4.14-rc1
+Git-commit: 60f07c8ec5fae06c23e9fd7bab67dabce92b3414
+References: bnc#1088324, LTC#166470
+
+Description: s390/mm: fix races in TLB flushing code
+Symptom: Kernel panic (e.g. "Low-address protection") or possible data
+ corruption.
+Problem: There are two race conditions in the TLB flushing code,
+ related to mm_cpumask reset vs. mm detach, and unserialized
+ setting of the mm->context.flush_mm bit.
+Solution: Add a spinlock to serialize __tlb_flush_mm_lazy, and fix
+ the ordering of mm_cpumask reset.
+Reproduction: TLB flushing bugs are hard to hit, there are no known steps
+ to reproduce.
+
+Upstream-Description:
+
+ s390/mm: fix race on mm->context.flush_mm
+
+ The order in __tlb_flush_mm_lazy is to flush TLB first and then clear
+ the mm->context.flush_mm bit. This can lead to missed flushes as the
+ bit can be set anytime, the order needs to be the other way aronud.
+
+ But this leads to a different race, __tlb_flush_mm_lazy may be called
+ on two CPUs concurrently. If mm->context.flush_mm is cleared first then
+ another CPU can bypass __tlb_flush_mm_lazy although the first CPU has
+ not done the flush yet. In a virtualized environment the time until the
+ flush is finally completed can be arbitrarily long.
+
+ Add a spinlock to serialize __tlb_flush_mm_lazy and use the function
+ in finish_arch_post_lock_switch as well.
+
+ Cc: <stable@vger.kernel.org>
+ Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+ Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+
+Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
+Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
+---
+ arch/s390/include/asm/mmu.h | 4 ++++
+ arch/s390/include/asm/mmu_context.h | 4 ++--
+ arch/s390/include/asm/tlbflush.h | 4 +++-
+ 3 files changed, 9 insertions(+), 3 deletions(-)
+
+--- a/arch/s390/include/asm/mmu.h
++++ b/arch/s390/include/asm/mmu.h
+@@ -20,9 +20,13 @@ typedef struct {
+ unsigned int has_pgste:1;
+ /* The mmu context uses storage keys. */
+ unsigned int use_skey:1;
++#ifndef __GENKSYMS__
++ spinlock_t lock;
++#endif
+ } mm_context_t;
+
+ #define INIT_MM_CONTEXT(name) \
++ .context.lock = __SPIN_LOCK_UNLOCKED(name.context.lock), \
+ .context.list_lock = __SPIN_LOCK_UNLOCKED(name.context.list_lock), \
+ .context.pgtable_list = LIST_HEAD_INIT(name.context.pgtable_list), \
+ .context.gmap_list = LIST_HEAD_INIT(name.context.gmap_list),
+--- a/arch/s390/include/asm/mmu_context.h
++++ b/arch/s390/include/asm/mmu_context.h
+@@ -15,6 +15,7 @@
+ static inline int init_new_context(struct task_struct *tsk,
+ struct mm_struct *mm)
+ {
++ spin_lock_init(&mm->context.lock);
+ spin_lock_init(&mm->context.list_lock);
+ INIT_LIST_HEAD(&mm->context.pgtable_list);
+ INIT_LIST_HEAD(&mm->context.gmap_list);
+@@ -114,8 +115,7 @@ static inline void finish_arch_post_lock
+ cpu_relax();
+
+ cpumask_set_cpu(smp_processor_id(), mm_cpumask(mm));
+- if (mm->context.flush_mm)
+- __tlb_flush_mm(mm);
++ __tlb_flush_mm_lazy(mm);
+ preempt_enable();
+ }
+ set_fs(current->thread.mm_segment);
+--- a/arch/s390/include/asm/tlbflush.h
++++ b/arch/s390/include/asm/tlbflush.h
+@@ -97,10 +97,12 @@ static inline void __tlb_flush_mm(struct
+
+ static inline void __tlb_flush_mm_lazy(struct mm_struct * mm)
+ {
++ spin_lock(&mm->context.lock);
+ if (mm->context.flush_mm) {
+- __tlb_flush_mm(mm);
+ mm->context.flush_mm = 0;
++ __tlb_flush_mm(mm);
+ }
++ spin_unlock(&mm->context.lock);
+ }
+
+ /*
diff --git a/patches.drivers/ibmvnic-Account-for-VLAN-header-length-in-TX-buffers.patch b/patches.drivers/ibmvnic-Account-for-VLAN-header-length-in-TX-buffers.patch
index 552ec1d360..f31281859a 100644
--- a/patches.drivers/ibmvnic-Account-for-VLAN-header-length-in-TX-buffers.patch
+++ b/patches.drivers/ibmvnic-Account-for-VLAN-header-length-in-TX-buffers.patch
@@ -4,8 +4,7 @@ Date: Mon, 12 Mar 2018 11:51:03 -0500
Subject: [PATCH 097/115] ibmvnic: Account for VLAN header length in TX buffers
References: bsc#1085239
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: 8dff66cc4195bfaeb8764e7e1b62f2d13f311773
The extra four bytes of a VLAN packet was throwing off
diff --git a/patches.drivers/ibmvnic-Account-for-VLAN-tag-in-L2-Header-descriptor.patch b/patches.drivers/ibmvnic-Account-for-VLAN-tag-in-L2-Header-descriptor.patch
index 7f51d08881..df5b514560 100644
--- a/patches.drivers/ibmvnic-Account-for-VLAN-tag-in-L2-Header-descriptor.patch
+++ b/patches.drivers/ibmvnic-Account-for-VLAN-tag-in-L2-Header-descriptor.patch
@@ -4,8 +4,7 @@ Date: Mon, 12 Mar 2018 11:51:02 -0500
Subject: [PATCH 096/115] ibmvnic: Account for VLAN tag in L2 Header descriptor
References: bsc#1085239
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: da75e3b6a0292fc926f4773f58c5ff6b8db5a179
If a VLAN tag is present in the Ethernet header, account
diff --git a/patches.drivers/ibmvnic-Allocate-max-queues-stats-buffers.patch b/patches.drivers/ibmvnic-Allocate-max-queues-stats-buffers.patch
index 0ea9ff6bb1..ebf192a8c2 100644
--- a/patches.drivers/ibmvnic-Allocate-max-queues-stats-buffers.patch
+++ b/patches.drivers/ibmvnic-Allocate-max-queues-stats-buffers.patch
@@ -4,8 +4,7 @@ Date: Mon, 19 Feb 2018 13:30:47 -0600
Subject: [PATCH] ibmvnic: Allocate max queues stats buffers
References: bsc#1081498
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: abcae546f7b49f02f4b73d6cc8b33c2fc5f2f8a4
To avoid losing any stats when the number of sub-crqs change, allocate
diff --git a/patches.drivers/ibmvnic-Allocate-statistics-buffers-during-probe.patch b/patches.drivers/ibmvnic-Allocate-statistics-buffers-during-probe.patch
index 18227637c4..75dd3c4174 100644
--- a/patches.drivers/ibmvnic-Allocate-statistics-buffers-during-probe.patch
+++ b/patches.drivers/ibmvnic-Allocate-statistics-buffers-during-probe.patch
@@ -4,8 +4,7 @@ Date: Mon, 26 Feb 2018 18:10:56 -0600
Subject: [PATCH] ibmvnic: Allocate statistics buffers during probe
References: bsc#1082993
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: 53cc7721fdf12e649994cfb7d8f562acb0e4510b
Currently, buffers holding individual queue statistics are allocated
diff --git a/patches.drivers/ibmvnic-Clean-up-device-close.patch b/patches.drivers/ibmvnic-Clean-up-device-close.patch
index a71ae3bb27..02c3ae06ab 100644
--- a/patches.drivers/ibmvnic-Clean-up-device-close.patch
+++ b/patches.drivers/ibmvnic-Clean-up-device-close.patch
@@ -4,8 +4,7 @@ Date: Wed, 7 Mar 2018 17:51:45 -0600
Subject: [PATCH] ibmvnic: Clean up device close
References: bsc#1084610
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: f873866a05cc4ca718e4f2fb6f2601a7869f3e12
Remove some dead code now that RX pools are being cleaned. This
diff --git a/patches.drivers/ibmvnic-Correct-goto-target-for-tx-irq-initializatio.patch b/patches.drivers/ibmvnic-Correct-goto-target-for-tx-irq-initializatio.patch
index 9a5ff40e7b..02dd7f53f4 100644
--- a/patches.drivers/ibmvnic-Correct-goto-target-for-tx-irq-initializatio.patch
+++ b/patches.drivers/ibmvnic-Correct-goto-target-for-tx-irq-initializatio.patch
@@ -5,8 +5,7 @@ Subject: [PATCH] ibmvnic: Correct goto target for tx irq initialization
failure
References: bsc#1082223
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: af9090c2375e6a4a7b3059c9a3d36cb363c35d42
When a failure occurs during initialization of the tx sub crq
diff --git a/patches.drivers/ibmvnic-Do-not-attempt-to-login-if-RX-or-TX-queues-a.patch b/patches.drivers/ibmvnic-Do-not-attempt-to-login-if-RX-or-TX-queues-a.patch
index bf89f8a484..ad90cca407 100644
--- a/patches.drivers/ibmvnic-Do-not-attempt-to-login-if-RX-or-TX-queues-a.patch
+++ b/patches.drivers/ibmvnic-Do-not-attempt-to-login-if-RX-or-TX-queues-a.patch
@@ -5,8 +5,7 @@ Subject: [PATCH] ibmvnic: Do not attempt to login if RX or TX queues are not
allocated
References: bsc#1082993
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: 20a8ab744ff799ccedd35aba0d3139782f341bed
If a device reset fails for some reason, TX and RX queue resources
diff --git a/patches.drivers/ibmvnic-Do-not-disable-device-during-failover-or-par.patch b/patches.drivers/ibmvnic-Do-not-disable-device-during-failover-or-par.patch
index 3ba0ac5a0c..49c65b14b8 100644
--- a/patches.drivers/ibmvnic-Do-not-disable-device-during-failover-or-par.patch
+++ b/patches.drivers/ibmvnic-Do-not-disable-device-during-failover-or-par.patch
@@ -5,8 +5,7 @@ Subject: [PATCH] ibmvnic: Do not disable device during failover or partition
migration
References: bsc#1084610
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: 18b8d6bbad47efd9bd1595c57271fbacc5eb0d46
During a device failover or partition migration reset, it is not
diff --git a/patches.drivers/ibmvnic-Fix-TX-descriptor-tracking-again.patch b/patches.drivers/ibmvnic-Fix-TX-descriptor-tracking-again.patch
index 86fe7b2c62..9acac23320 100644
--- a/patches.drivers/ibmvnic-Fix-TX-descriptor-tracking-again.patch
+++ b/patches.drivers/ibmvnic-Fix-TX-descriptor-tracking-again.patch
@@ -4,8 +4,7 @@ Date: Mon, 26 Feb 2018 18:10:55 -0600
Subject: [PATCH] ibmvnic: Fix TX descriptor tracking again
References: bsc#1082993
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: ecba616e041e64840d14e294b089ca355614b7fb
Sorry, the previous change introduced a race condition between
diff --git a/patches.drivers/ibmvnic-Fix-TX-descriptor-tracking.patch b/patches.drivers/ibmvnic-Fix-TX-descriptor-tracking.patch
index ca2b19e13d..2bc9d86e42 100644
--- a/patches.drivers/ibmvnic-Fix-TX-descriptor-tracking.patch
+++ b/patches.drivers/ibmvnic-Fix-TX-descriptor-tracking.patch
@@ -4,8 +4,7 @@ Date: Wed, 21 Feb 2018 18:21:10 -0600
Subject: [PATCH] ibmvnic: Fix TX descriptor tracking
References: bsc#1081491
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: aa9029479ef3fb88145cad3220e24a110c6ae723
With the recent change, transmissions that only needed
diff --git a/patches.drivers/ibmvnic-Fix-recent-errata-commit.patch b/patches.drivers/ibmvnic-Fix-recent-errata-commit.patch
index 6b82a71e7c..a0b177eae1 100644
--- a/patches.drivers/ibmvnic-Fix-recent-errata-commit.patch
+++ b/patches.drivers/ibmvnic-Fix-recent-errata-commit.patch
@@ -4,8 +4,7 @@ Date: Mon, 12 Mar 2018 21:05:26 -0500
Subject: [PATCH 100/115] ibmvnic: Fix recent errata commit
References: bsc#1085239
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: 7083a45ad0df78546b3a735f0090b075efdf44e3
Sorry, one of the patches I sent in an earlier series
diff --git a/patches.drivers/ibmvnic-Fix-reset-return-from-closed-state.patch b/patches.drivers/ibmvnic-Fix-reset-return-from-closed-state.patch
index 507d4e8cc8..4cfc4062a8 100644
--- a/patches.drivers/ibmvnic-Fix-reset-return-from-closed-state.patch
+++ b/patches.drivers/ibmvnic-Fix-reset-return-from-closed-state.patch
@@ -4,8 +4,7 @@ Date: Wed, 14 Mar 2018 10:41:29 -0500
Subject: [PATCH] ibmvnic: Fix reset return from closed state
References: bsc#1084610
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: e676d81c8990f511d60698a1a8abaa438b3f9d3d
The case in which we handle a reset from the state where the device is
diff --git a/patches.drivers/ibmvnic-Free-and-re-allocate-scrqs-when-tx-rx-scrqs-.patch b/patches.drivers/ibmvnic-Free-and-re-allocate-scrqs-when-tx-rx-scrqs-.patch
index c4ff13e6e5..7bc1b6c340 100644
--- a/patches.drivers/ibmvnic-Free-and-re-allocate-scrqs-when-tx-rx-scrqs-.patch
+++ b/patches.drivers/ibmvnic-Free-and-re-allocate-scrqs-when-tx-rx-scrqs-.patch
@@ -4,8 +4,7 @@ Date: Mon, 19 Feb 2018 13:30:31 -0600
Subject: [PATCH] ibmvnic: Free and re-allocate scrqs when tx/rx scrqs change
References: bsc#1081498
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: d7c0ef36bde03af0d119d895bba4cc0362e79dbb
When the driver resets it is possible that the number of tx/rx
diff --git a/patches.drivers/ibmvnic-Generalize-TX-pool-structure.patch b/patches.drivers/ibmvnic-Generalize-TX-pool-structure.patch
index 55fbc61157..80e7c7a298 100644
--- a/patches.drivers/ibmvnic-Generalize-TX-pool-structure.patch
+++ b/patches.drivers/ibmvnic-Generalize-TX-pool-structure.patch
@@ -4,8 +4,7 @@ Date: Fri, 16 Mar 2018 20:00:24 -0500
Subject: [PATCH] ibmvnic: Generalize TX pool structure
References: bsc#1085224
-patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+patch-mainline: v4.17-rc1
Git-commit: 4bd95a51b6e32c3267b8beb097bd719380147d36
Remove some unused fields in the structure and include values
diff --git a/patches.drivers/ibmvnic-Handle-TSO-backing-device-errata.patch b/patches.drivers/ibmvnic-Handle-TSO-backing-device-errata.patch
index 4e82b85bad..3a39a9ff2c 100644
--- a/patches.drivers/ibmvnic-Handle-TSO-backing-device-errata.patch
+++ b/patches.drivers/ibmvnic-Handle-TSO-backing-device-errata.patch
@@ -4,8 +4,7 @@ Date: Mon, 12 Mar 2018 11:51:05 -0500
Subject: [PATCH 099/115] ibmvnic: Handle TSO backing device errata
References: bsc#1085239
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: f10b09ef687f3134c26027d2a38a9d4cd3bb9cb7
TSO packets with one segment or with an MSS less than 224 can
diff --git a/patches.drivers/ibmvnic-Harden-TX-RX-pool-cleaning.patch b/patches.drivers/ibmvnic-Harden-TX-RX-pool-cleaning.patch
index f2f22409ae..cba0aa376b 100644
--- a/patches.drivers/ibmvnic-Harden-TX-RX-pool-cleaning.patch
+++ b/patches.drivers/ibmvnic-Harden-TX-RX-pool-cleaning.patch
@@ -4,8 +4,7 @@ Date: Mon, 26 Feb 2018 18:10:57 -0600
Subject: [PATCH] ibmvnic: Harden TX/RX pool cleaning
References: bsc#1082993
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: 637f81d164a5347ee3325f106f815c7969c032b5
If the driver releases resources after a failed reset or some other
diff --git a/patches.drivers/ibmvnic-Improve-TX-buffer-accounting.patch b/patches.drivers/ibmvnic-Improve-TX-buffer-accounting.patch
index 32c74b5efa..6e51f7cd06 100644
--- a/patches.drivers/ibmvnic-Improve-TX-buffer-accounting.patch
+++ b/patches.drivers/ibmvnic-Improve-TX-buffer-accounting.patch
@@ -4,8 +4,7 @@ Date: Fri, 16 Mar 2018 20:00:29 -0500
Subject: [PATCH] ibmvnic: Improve TX buffer accounting
References: bsc#1085224
-patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+patch-mainline: v4.17-rc1
Git-commit: 86b61a5f2e39bbee254aa4d2c5445059c7656f98
Improve TX pool buffer accounting to prevent the producer
diff --git a/patches.drivers/ibmvnic-Keep-track-of-supplementary-TX-descriptors.patch b/patches.drivers/ibmvnic-Keep-track-of-supplementary-TX-descriptors.patch
index 09d0136f04..52f3a1413b 100644
--- a/patches.drivers/ibmvnic-Keep-track-of-supplementary-TX-descriptors.patch
+++ b/patches.drivers/ibmvnic-Keep-track-of-supplementary-TX-descriptors.patch
@@ -4,8 +4,7 @@ Date: Sun, 18 Feb 2018 10:08:41 -0600
Subject: [PATCH] ibmvnic: Keep track of supplementary TX descriptors
References: bsc#1081491
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: ffc385b95adb0e601f6858b06401adabedf59f81
Supplementary TX descriptors were not being accounted for, which
diff --git a/patches.drivers/ibmvnic-Make-napi-usage-dynamic.patch b/patches.drivers/ibmvnic-Make-napi-usage-dynamic.patch
index 0e8d7ac25b..3a3e6dc6a2 100644
--- a/patches.drivers/ibmvnic-Make-napi-usage-dynamic.patch
+++ b/patches.drivers/ibmvnic-Make-napi-usage-dynamic.patch
@@ -4,8 +4,7 @@ Date: Mon, 19 Feb 2018 13:30:39 -0600
Subject: [PATCH] ibmvnic: Make napi usage dynamic
References: bsc#1081498
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: 86f669b2b7491b5697d9e63538c960ad7e94c6cc
In order to handle the number of rx sub crqs changing during a driver
diff --git a/patches.drivers/ibmvnic-Move-active-sub-crq-count-settings.patch b/patches.drivers/ibmvnic-Move-active-sub-crq-count-settings.patch
index 6f2c83c771..a106d601a7 100644
--- a/patches.drivers/ibmvnic-Move-active-sub-crq-count-settings.patch
+++ b/patches.drivers/ibmvnic-Move-active-sub-crq-count-settings.patch
@@ -4,8 +4,7 @@ Date: Mon, 19 Feb 2018 13:30:14 -0600
Subject: [PATCH] ibmvnic: Move active sub-crq count settings
References: bsc#1081498
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: d9043c102e73b9abc01f2120d47ba8195823172a
Inpreparation for using the active scrq count to track more active
diff --git a/patches.drivers/ibmvnic-Pad-small-packets-to-minimum-MTU-size.patch b/patches.drivers/ibmvnic-Pad-small-packets-to-minimum-MTU-size.patch
index 1403e221fc..d3d28a8c81 100644
--- a/patches.drivers/ibmvnic-Pad-small-packets-to-minimum-MTU-size.patch
+++ b/patches.drivers/ibmvnic-Pad-small-packets-to-minimum-MTU-size.patch
@@ -4,8 +4,7 @@ Date: Mon, 12 Mar 2018 11:51:04 -0500
Subject: [PATCH 098/115] ibmvnic: Pad small packets to minimum MTU size
References: bsc#1085239
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: 1f247a6f9e5d1b5a1e57d66829ee52dbafac256f
Some backing devices cannot handle small packets well,
diff --git a/patches.drivers/ibmvnic-Potential-NULL-dereference-in-clean_one_tx_p.patch b/patches.drivers/ibmvnic-Potential-NULL-dereference-in-clean_one_tx_p.patch
index ed4fbc1b78..f8b6ef6c91 100644
--- a/patches.drivers/ibmvnic-Potential-NULL-dereference-in-clean_one_tx_p.patch
+++ b/patches.drivers/ibmvnic-Potential-NULL-dereference-in-clean_one_tx_p.patch
@@ -4,8 +4,7 @@ Date: Fri, 23 Mar 2018 14:36:15 +0300
Subject: [PATCH] ibmvnic: Potential NULL dereference in clean_one_tx_pool()
References: bsc#1085224, git-fixes
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: 050e85c97f6151be1689a22810a7240fa7457557
There is an && vs || typo here, which potentially leads to a NULL
diff --git a/patches.drivers/ibmvnic-Remove-unused-TSO-resources-in-TX-pool-struc.patch b/patches.drivers/ibmvnic-Remove-unused-TSO-resources-in-TX-pool-struc.patch
index c7b0df6ece..328f187a58 100644
--- a/patches.drivers/ibmvnic-Remove-unused-TSO-resources-in-TX-pool-struc.patch
+++ b/patches.drivers/ibmvnic-Remove-unused-TSO-resources-in-TX-pool-struc.patch
@@ -4,8 +4,7 @@ Date: Fri, 16 Mar 2018 20:00:31 -0500
Subject: [PATCH] ibmvnic: Remove unused TSO resources in TX pool structure
References: bsc#1085224
-patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+patch-mainline: v4.17-rc1
Git-commit: 76c15c911b8115e565bfe3a5161a8d58b0be2d28
Finally, remove the TSO-specific fields in the TX pool
diff --git a/patches.drivers/ibmvnic-Rename-active-queue-count-variables.patch b/patches.drivers/ibmvnic-Rename-active-queue-count-variables.patch
index c6f70f2f08..d5114f8583 100644
--- a/patches.drivers/ibmvnic-Rename-active-queue-count-variables.patch
+++ b/patches.drivers/ibmvnic-Rename-active-queue-count-variables.patch
@@ -4,8 +4,7 @@ Date: Mon, 19 Feb 2018 13:30:05 -0600
Subject: [PATCH] ibmvnic: Rename active queue count variables
References: bsc#1081498
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: 8862541de781329b3e1e553bd936cecf998dc565
Rename the tx/rx active pool variables to be tx/rx active scrq
diff --git a/patches.drivers/ibmvnic-Reorganize-device-close.patch b/patches.drivers/ibmvnic-Reorganize-device-close.patch
index da52807389..feb82a74ba 100644
--- a/patches.drivers/ibmvnic-Reorganize-device-close.patch
+++ b/patches.drivers/ibmvnic-Reorganize-device-close.patch
@@ -4,8 +4,7 @@ Date: Wed, 7 Mar 2018 17:51:46 -0600
Subject: [PATCH] ibmvnic: Reorganize device close
References: bsc#1084610
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: 01d9bd792d1603761dcc2644ccf4cc35a4658ab6
Introduce a function to halt network operations and clean up any
diff --git a/patches.drivers/ibmvnic-Report-queue-stops-and-restarts-as-debug-out.patch b/patches.drivers/ibmvnic-Report-queue-stops-and-restarts-as-debug-out.patch
index 8c8bbb8e50..bd324034de 100644
--- a/patches.drivers/ibmvnic-Report-queue-stops-and-restarts-as-debug-out.patch
+++ b/patches.drivers/ibmvnic-Report-queue-stops-and-restarts-as-debug-out.patch
@@ -4,8 +4,7 @@ Date: Mon, 26 Feb 2018 18:10:58 -0600
Subject: [PATCH] ibmvnic: Report queue stops and restarts as debug output
References: bsc#1082993
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: 0aecb13ce3abe1372c7306c7d1b86ff748296abb
It's not necessary to report each time a queue is stopped and restarted
diff --git a/patches.drivers/ibmvnic-Split-counters-for-scrq-pools-napi.patch b/patches.drivers/ibmvnic-Split-counters-for-scrq-pools-napi.patch
index 8416e9d60e..8d2429f7a1 100644
--- a/patches.drivers/ibmvnic-Split-counters-for-scrq-pools-napi.patch
+++ b/patches.drivers/ibmvnic-Split-counters-for-scrq-pools-napi.patch
@@ -4,8 +4,7 @@ Date: Wed, 21 Feb 2018 21:33:56 -0600
Subject: [PATCH] ibmvnic: Split counters for scrq/pools/napi
References: bsc#1082223
-Patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+Patch-mainline: v4.17-rc1
Git-commit: 82e3be320d1e38a5e91a79d0eb451954c87ab7fe
The approach of one counter to rule them all when tracking the number
diff --git a/patches.drivers/ibmvnic-Update-TX-and-TX-completion-routines.patch b/patches.drivers/ibmvnic-Update-TX-and-TX-completion-routines.patch
index c8e25f2a7e..52bc4ea248 100644
--- a/patches.drivers/ibmvnic-Update-TX-and-TX-completion-routines.patch
+++ b/patches.drivers/ibmvnic-Update-TX-and-TX-completion-routines.patch
@@ -4,8 +4,7 @@ Date: Fri, 16 Mar 2018 20:00:28 -0500
Subject: [PATCH] ibmvnic: Update TX and TX completion routines
References: bsc#1085224
-patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+patch-mainline: v4.17-rc1
Git-commit: 06b3e35788a4c6f0afa931b6251ecfe20ce4787b
Update TX and TX completion routines to account for TX pool
diff --git a/patches.drivers/ibmvnic-Update-TX-pool-cleaning-routine.patch b/patches.drivers/ibmvnic-Update-TX-pool-cleaning-routine.patch
index 32b0a15f85..01d3979017 100644
--- a/patches.drivers/ibmvnic-Update-TX-pool-cleaning-routine.patch
+++ b/patches.drivers/ibmvnic-Update-TX-pool-cleaning-routine.patch
@@ -4,8 +4,7 @@ Date: Fri, 16 Mar 2018 20:00:30 -0500
Subject: [PATCH] ibmvnic: Update TX pool cleaning routine
References: bsc#1085224
-patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+patch-mainline: v4.17-rc1
Git-commit: e9e1e97884b7b65e5ab0666e549e54035238fd4e
Update routine that cleans up any outstanding transmits that
diff --git a/patches.drivers/ibmvnic-Update-TX-pool-initialization-routine.patch b/patches.drivers/ibmvnic-Update-TX-pool-initialization-routine.patch
index 4e5b032c96..61ad55ff49 100644
--- a/patches.drivers/ibmvnic-Update-TX-pool-initialization-routine.patch
+++ b/patches.drivers/ibmvnic-Update-TX-pool-initialization-routine.patch
@@ -4,8 +4,7 @@ Date: Fri, 16 Mar 2018 20:00:27 -0500
Subject: [PATCH] ibmvnic: Update TX pool initialization routine
References: bsc#1085224
-patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+patch-mainline: v4.17-rc1
Git-commit: 3205306c6b8d5a8ede1d8222c9db6009b399299a
Introduce function that initializes one TX pool. Use that to
diff --git a/patches.drivers/ibmvnic-Update-and-clean-up-reset-TX-pool-routine.patch b/patches.drivers/ibmvnic-Update-and-clean-up-reset-TX-pool-routine.patch
index f568ef2dc6..863b8764dd 100644
--- a/patches.drivers/ibmvnic-Update-and-clean-up-reset-TX-pool-routine.patch
+++ b/patches.drivers/ibmvnic-Update-and-clean-up-reset-TX-pool-routine.patch
@@ -4,8 +4,7 @@ Date: Fri, 16 Mar 2018 20:00:25 -0500
Subject: [PATCH] ibmvnic: Update and clean up reset TX pool routine
References: bsc#1085224
-patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+patch-mainline: v4.17-rc1
Git-commit: e26dc25bc0b6f66b51d740af03962a30ee33ca7e
Update TX pool reset routine to accommodate new TSO pool array. Introduce
diff --git a/patches.drivers/ibmvnic-Update-release-TX-pool-routine.patch b/patches.drivers/ibmvnic-Update-release-TX-pool-routine.patch
index 8d6312d7b5..ec8fe6dc8a 100644
--- a/patches.drivers/ibmvnic-Update-release-TX-pool-routine.patch
+++ b/patches.drivers/ibmvnic-Update-release-TX-pool-routine.patch
@@ -4,8 +4,7 @@ Date: Fri, 16 Mar 2018 20:00:26 -0500
Subject: [PATCH] ibmvnic: Update release TX pool routine
References: bsc#1085224
-patch-mainline: queued
-Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
+patch-mainline: v4.17-rc1
Git-commit: fb79421c3c37f391efbe98258c930111e53590a1
Introduce function that frees one TX pool. Use that to release
diff --git a/patches.suse/22-x86-cpu-amd-add-speculative-control-support-for-amd.patch b/patches.suse/22-x86-cpu-amd-add-speculative-control-support-for-amd.patch
index 14fd0a4789..6d311a6077 100644
--- a/patches.suse/22-x86-cpu-amd-add-speculative-control-support-for-amd.patch
+++ b/patches.suse/22-x86-cpu-amd-add-speculative-control-support-for-amd.patch
@@ -24,8 +24,8 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
arch/x86/include/asm/cpufeature.h | 2 +-
arch/x86/include/asm/msr-index.h | 1 +
arch/x86/kernel/cpu/amd.c | 3 +++
- arch/x86/kernel/cpu/spec_ctrl.c | 16 ++++++++++++++++
- 4 files changed, 21 insertions(+), 1 deletion(-)
+ arch/x86/kernel/cpu/spec_ctrl.c | 7 +++++++
+ 4 files changed, 12 insertions(+), 1 deletion(-)
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -69,7 +69,7 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
#ifdef CONFIG_X86_32
--- a/arch/x86/kernel/cpu/spec_ctrl.c
+++ b/arch/x86/kernel/cpu/spec_ctrl.c
-@@ -51,6 +51,22 @@ void x86_spec_check(void)
+@@ -51,6 +51,13 @@ void x86_spec_check(void)
setup_force_cpu_cap(X86_FEATURE_SPEC_CTRL);
}
@@ -79,15 +79,6 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
+
+ if (boot_cpu_has(X86_FEATURE_IBPB)) {
+ ibpb_state = 1;
-+ } else {
-+ switch (boot_cpu_data.x86) {
-+ case 0x10:
-+ case 0x12:
-+ case 0x16:
-+ pr_info_once("Disabling indirect branch predictor support\n");
-+ msr_set_bit(MSR_F15H_IC_CFG, 14);
-+ break;
-+ }
+ }
}
}
diff --git a/patches.suse/23-x86-spec-check-cpuid-direclty-post-microcode-reload-to-support-ibpb-feature.patch b/patches.suse/23-x86-spec-check-cpuid-direclty-post-microcode-reload-to-support-ibpb-feature.patch
index 63e4c306f8..878fe3e308 100644
--- a/patches.suse/23-x86-spec-check-cpuid-direclty-post-microcode-reload-to-support-ibpb-feature.patch
+++ b/patches.suse/23-x86-spec-check-cpuid-direclty-post-microcode-reload-to-support-ibpb-feature.patch
@@ -12,14 +12,12 @@ Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
[ Check CPUID directly. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
---
- arch/x86/kernel/cpu/spec_ctrl.c | 18 ++++++++----------
- 1 file changed, 8 insertions(+), 10 deletions(-)
+ arch/x86/kernel/cpu/spec_ctrl.c | 19 +++++++++----------
+ 1 file changed, 9 insertions(+), 10 deletions(-)
-diff --git a/arch/x86/kernel/cpu/spec_ctrl.c b/arch/x86/kernel/cpu/spec_ctrl.c
-index 9c1ef3795b5b..21dd82c74429 100644
--- a/arch/x86/kernel/cpu/spec_ctrl.c
+++ b/arch/x86/kernel/cpu/spec_ctrl.c
-@@ -55,18 +55,15 @@ EXPORT_SYMBOL_GPL(stuff_RSB);
+@@ -44,19 +44,18 @@ EXPORT_SYMBOL_GPL(x86_enable_ibrs);
*/
void x86_spec_check(void)
{
@@ -43,14 +41,8 @@ index 9c1ef3795b5b..21dd82c74429 100644
+ if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) {
+ if (cpuid_ebx(0x80000008) & BIT(12)) {
ibpb_state = 1;
- } else {
- switch (boot_cpu_data.x86) {
-@@ -77,6 +74,7 @@ void x86_spec_check(void)
- msr_set_bit(MSR_F15H_IC_CFG, 14);
- break;
- }
++ } else {
+ ibpb_state = 0;
}
}
}
-
diff --git a/patches.suse/32-x86-nospec-fix-ordering-of-earlyparam-vs-cap-clearing.patch b/patches.suse/32-x86-nospec-fix-ordering-of-earlyparam-vs-cap-clearing.patch
index 78db59fec6..1c68b51bc5 100644
--- a/patches.suse/32-x86-nospec-fix-ordering-of-earlyparam-vs-cap-clearing.patch
+++ b/patches.suse/32-x86-nospec-fix-ordering-of-earlyparam-vs-cap-clearing.patch
@@ -15,12 +15,12 @@ that they should be disabled, it will apply the settings properly.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
---
- arch/x86/kernel/cpu/spec_ctrl.c | 26 +++++++++++++++++++++-----
- 1 file changed, 21 insertions(+), 5 deletions(-)
+ arch/x86/kernel/cpu/spec_ctrl.c | 24 ++++++++++++++++++++----
+ 1 file changed, 20 insertions(+), 4 deletions(-)
--- a/arch/x86/kernel/cpu/spec_ctrl.c
+++ b/arch/x86/kernel/cpu/spec_ctrl.c
-@@ -10,19 +10,25 @@
+@@ -9,19 +9,25 @@
/*
* Keep it open for more flags in case needed.
@@ -50,7 +50,7 @@ Signed-off-by: Jiri Kosina <jkosina@suse.cz>
}
EXPORT_SYMBOL_GPL(x86_ibpb_enabled);
-@@ -55,22 +61,32 @@ EXPORT_SYMBOL_GPL(stuff_RSB);
+@@ -44,18 +50,28 @@ EXPORT_SYMBOL_GPL(x86_enable_ibrs);
*/
void x86_spec_check(void)
{
@@ -74,13 +74,8 @@ Signed-off-by: Jiri Kosina <jkosina@suse.cz>
ibpb_state = 1;
+ printk_once(KERN_INFO "IBPB: Initialized\n");
} else {
- switch (boot_cpu_data.x86) {
- case 0x10:
- case 0x12:
- case 0x16:
-- pr_info_once("Disabling indirect branch predictor support\n");
-+ printk_once(KERN_INFO
-+ "IBPB: Disabling indirect branch predictor support\n");
- msr_set_bit(MSR_F15H_IC_CFG, 14);
- break;
- }
+ ibpb_state = 0;
++ printk_once(KERN_INFO "IBPB: Disabling indirect branch predictor support\n");
+ }
+ }
+ }
diff --git a/patches.suse/suse-hv-hv_balloon-fix-bugs-in-num_pages_onlined-accounting.patch b/patches.suse/suse-hv-hv_balloon-fix-bugs-in-num_pages_onlined-accounting.patch
new file mode 100644
index 0000000000..eb1801d7db
--- /dev/null
+++ b/patches.suse/suse-hv-hv_balloon-fix-bugs-in-num_pages_onlined-accounting.patch
@@ -0,0 +1,144 @@
+From: Vitaly Kuznetsov <vkuznets@redhat.com>
+Date: Sun, 4 Mar 2018 22:17:21 -0700
+Patch-mainline: v4.17-rc1
+Subject: hv_balloon: fix bugs in num_pages_onlined accounting
+Git-commit: bba072d1627222325e79b7b8e6c0847e4a32d96c
+References: fate#323887
+
+Our num_pages_onlined accounting is buggy:
+1) In case we're offlining a memory block which was present at boot (e.g.
+ when there was no hotplug at all) we subtract 32k from 0 and as
+ num_pages_onlined is unsigned get a very big positive number.
+
+2) Commit 6df8d9aaf3af ("Drivers: hv: balloon: Correctly update onlined
+ page count") made num_pages_onlined counter accurate on onlining but
+ totally incorrect on offlining for partly populated regions: no matter
+ how many pages were onlined and what was actually added to
+ num_pages_onlined counter we always subtract the full region (32k) so
+ again, num_pages_onlined can wrap around zero. By onlining/offlining
+ the same partly populated region multiple times we can make the
+ situation worse.
+
+Solve these issues by doing accurate accounting on offlining: walk HAS
+list, check for covered range and gaps.
+
+Fixes: 6df8d9aaf3af ("Drivers: hv: balloon: Correctly update onlined page count")
+Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
+Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Acked-by: Olaf Hering <ohering@suse.de>
+---
+ drivers/hv/hv_balloon.c | 82 +++++++++++++++++++++++++++++++++++++++++--------
+ 1 file changed, 69 insertions(+), 13 deletions(-)
+
+--- a/drivers/hv/hv_balloon.c
++++ b/drivers/hv/hv_balloon.c
+@@ -576,11 +576,65 @@ static struct hv_dynmem_device dm_device;
+ static void post_status(struct hv_dynmem_device *dm);
+
+ #ifdef CONFIG_MEMORY_HOTPLUG
++static inline bool has_pfn_is_backed(struct hv_hotadd_state *has,
++ unsigned long pfn)
++{
++ struct hv_hotadd_gap *gap;
++
++ /* The page is not backed. */
++ if ((pfn < has->covered_start_pfn) || (pfn >= has->covered_end_pfn))
++ return false;
++
++ /* Check for gaps. */
++ list_for_each_entry(gap, &has->gap_list, list) {
++ if ((pfn >= gap->start_pfn) && (pfn < gap->end_pfn))
++ return false;
++ }
++
++ return true;
++}
++
++static unsigned long hv_page_offline_check(unsigned long start_pfn,
++ unsigned long nr_pages)
++{
++ unsigned long pfn = start_pfn, count = 0;
++ struct hv_hotadd_state *has;
++ bool found;
++
++ while (pfn < start_pfn + nr_pages) {
++ /*
++ * Search for HAS which covers the pfn and when we find one
++ * count how many consequitive PFNs are covered.
++ */
++ found = false;
++ list_for_each_entry(has, &dm_device.ha_region_list, list) {
++ while ((pfn >= has->start_pfn) &&
++ (pfn < has->end_pfn) &&
++ (pfn < start_pfn + nr_pages)) {
++ found = true;
++ if (has_pfn_is_backed(has, pfn))
++ count++;
++ pfn++;
++ }
++ }
++
++ /*
++ * This PFN is not in any HAS (e.g. we're offlining a region
++ * which was present at boot), no need to account for it. Go
++ * to the next one.
++ */
++ if (!found)
++ pfn++;
++ }
++
++ return count;
++}
++
+ static int hv_memory_notifier(struct notifier_block *nb, unsigned long val,
+ void *v)
+ {
+ struct memory_notify *mem = (struct memory_notify *)v;
+- unsigned long flags;
++ unsigned long flags, pfn_count;
+
+ switch (val) {
+ case MEM_ONLINE:
+@@ -593,7 +647,19 @@ static int hv_memory_notifier(struct notifier_block *nb, unsigned long val,
+
+ case MEM_OFFLINE:
+ spin_lock_irqsave(&dm_device.ha_lock, flags);
+- dm_device.num_pages_onlined -= mem->nr_pages;
++ pfn_count = hv_page_offline_check(mem->start_pfn,
++ mem->nr_pages);
++ if (pfn_count <= dm_device.num_pages_onlined) {
++ dm_device.num_pages_onlined -= pfn_count;
++ } else {
++ /*
++ * We're offlining more pages than we managed to online.
++ * This is unexpected. In any case don't let
++ * num_pages_onlined wrap around zero.
++ */
++ WARN_ON_ONCE(1);
++ dm_device.num_pages_onlined = 0;
++ }
+ spin_unlock_irqrestore(&dm_device.ha_lock, flags);
+ break;
+ case MEM_GOING_ONLINE:
+@@ -612,19 +678,9 @@ static struct notifier_block hv_memory_nb = {
+ /* Check if the particular page is backed and can be onlined and online it. */
+ static void hv_page_online_one(struct hv_hotadd_state *has, struct page *pg)
+ {
+- struct hv_hotadd_gap *gap;
+- unsigned long pfn = page_to_pfn(pg);
+-
+- /* The page is not backed. */
+- if ((pfn < has->covered_start_pfn) || (pfn >= has->covered_end_pfn))
++ if (!has_pfn_is_backed(has, page_to_pfn(pg)))
+ return;
+
+- /* Check for gaps. */
+- list_for_each_entry(gap, &has->gap_list, list) {
+- if ((pfn >= gap->start_pfn) && (pfn < gap->end_pfn))
+- return;
+- }
+-
+ /* This frame is currently backed; online the page. */
+ __online_page_set_limits(pg);
+ __online_page_increment_counters(pg);
diff --git a/patches.suse/suse-hv-hv_balloon-fix-printk-loglevel.patch b/patches.suse/suse-hv-hv_balloon-fix-printk-loglevel.patch
new file mode 100644
index 0000000000..3e591e705f
--- /dev/null
+++ b/patches.suse/suse-hv-hv_balloon-fix-printk-loglevel.patch
@@ -0,0 +1,77 @@
+From: Vitaly Kuznetsov <vkuznets@redhat.com>
+Date: Sun, 4 Mar 2018 22:17:19 -0700
+Patch-mainline: v4.17-rc1
+Subject: hv_balloon: fix printk loglevel
+Git-commit: 223e1e4d2c16fed4ce7d0a092316eff1ba706988
+References: fate#323887
+
+We have a mix of different ideas of which loglevel should be used. Unify
+on the following:
+- pr_info() for normal operation
+- pr_warn() for 'strange' host behavior
+- pr_err() for all errors.
+
+Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
+Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Acked-by: Olaf Hering <ohering@suse.de>
+---
+ drivers/hv/hv_balloon.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+--- a/drivers/hv/hv_balloon.c
++++ b/drivers/hv/hv_balloon.c
+@@ -691,7 +691,7 @@ static void hv_mem_hot_add(unsigned long start, unsigned long size,
+ (HA_CHUNK << PAGE_SHIFT));
+
+ if (ret) {
+- pr_warn("hot_add memory failed error is %d\n", ret);
++ pr_err("hot_add memory failed error is %d\n", ret);
+ if (ret == -EEXIST) {
+ /*
+ * This error indicates that the error
+@@ -1014,7 +1014,7 @@ static void hot_add_req(struct work_struct *dummy)
+ resp.result = 0;
+
+ if (!do_hot_add || (resp.page_count == 0))
+- pr_info("Memory hot add failed\n");
++ pr_err("Memory hot add failed\n");
+
+ dm->state = DM_INITIALIZED;
+ resp.hdr.trans_id = atomic_inc_return(&trans_id);
+@@ -1041,7 +1041,7 @@ static void process_info(struct hv_dynmem_device *dm, struct dm_info_msg *msg)
+
+ break;
+ default:
+- pr_info("Received Unknown type: %d\n", info_hdr->type);
++ pr_warn("Received Unknown type: %d\n", info_hdr->type);
+ }
+ }
+
+@@ -1290,7 +1290,7 @@ static void balloon_up(struct work_struct *dummy)
+ /*
+ * Free up the memory we allocatted.
+ */
+- pr_info("Balloon response failed\n");
++ pr_err("Balloon response failed\n");
+
+ for (i = 0; i < bl_resp->range_count; i++)
+ free_balloon_pages(&dm_device,
+@@ -1421,7 +1421,7 @@ static void cap_resp(struct hv_dynmem_device *dm,
+ struct dm_capabilities_resp_msg *cap_resp)
+ {
+ if (!cap_resp->is_accepted) {
+- pr_info("Capabilities not accepted by host\n");
++ pr_err("Capabilities not accepted by host\n");
+ dm->state = DM_INIT_ERROR;
+ }
+ complete(&dm->host_event);
+@@ -1508,7 +1508,7 @@ static void balloon_onchannelcallback(void *context)
+ break;
+
+ default:
+- pr_err("Unhandled message: type: %d\n", dm_hdr->type);
++ pr_warn("Unhandled message: type: %d\n", dm_hdr->type);
+
+ }
+ }
diff --git a/patches.suse/suse-hv-hv_balloon-simplify-hv_online_page-hv_page_online_on.patch b/patches.suse/suse-hv-hv_balloon-simplify-hv_online_page-hv_page_online_on.patch
new file mode 100644
index 0000000000..524a3152af
--- /dev/null
+++ b/patches.suse/suse-hv-hv_balloon-simplify-hv_online_page-hv_page_online_on.patch
@@ -0,0 +1,74 @@
+From: Vitaly Kuznetsov <vkuznets@redhat.com>
+Date: Sun, 4 Mar 2018 22:17:20 -0700
+Patch-mainline: v4.17-rc1
+Subject: hv_balloon: simplify hv_online_page()/hv_page_online_one()
+Git-commit: 4f098af514d2608b74025a27faecc24cce238b71
+References: fate#323887
+
+Instead of doing pfn_to_page() and continuosly casting page to unsigned
+long just cache the pfn of the page with page_to_pfn().
+
+Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
+Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Acked-by: Olaf Hering <ohering@suse.de>
+---
+ drivers/hv/hv_balloon.c | 27 +++++----------------------
+ 1 file changed, 5 insertions(+), 22 deletions(-)
+
+--- a/drivers/hv/hv_balloon.c
++++ b/drivers/hv/hv_balloon.c
+@@ -612,28 +612,17 @@ static struct notifier_block hv_memory_nb = {
+ /* Check if the particular page is backed and can be onlined and online it. */
+ static void hv_page_online_one(struct hv_hotadd_state *has, struct page *pg)
+ {
+- unsigned long cur_start_pgp;
+- unsigned long cur_end_pgp;
+ struct hv_hotadd_gap *gap;
+-
+- cur_start_pgp = (unsigned long)pfn_to_page(has->covered_start_pfn);
+- cur_end_pgp = (unsigned long)pfn_to_page(has->covered_end_pfn);
++ unsigned long pfn = page_to_pfn(pg);
+
+ /* The page is not backed. */
+- if (((unsigned long)pg < cur_start_pgp) ||
+- ((unsigned long)pg >= cur_end_pgp))
++ if ((pfn < has->covered_start_pfn) || (pfn >= has->covered_end_pfn))
+ return;
+
+ /* Check for gaps. */
+ list_for_each_entry(gap, &has->gap_list, list) {
+- cur_start_pgp = (unsigned long)
+- pfn_to_page(gap->start_pfn);
+- cur_end_pgp = (unsigned long)
+- pfn_to_page(gap->end_pfn);
+- if (((unsigned long)pg >= cur_start_pgp) &&
+- ((unsigned long)pg < cur_end_pgp)) {
++ if ((pfn >= gap->start_pfn) && (pfn < gap->end_pfn))
+ return;
+- }
+ }
+
+ /* This frame is currently backed; online the page. */
+@@ -726,19 +715,13 @@ static void hv_mem_hot_add(unsigned long start, unsigned long size,
+ static void hv_online_page(struct page *pg)
+ {
+ struct hv_hotadd_state *has;
+- unsigned long cur_start_pgp;
+- unsigned long cur_end_pgp;
+ unsigned long flags;
++ unsigned long pfn = page_to_pfn(pg);
+
+ spin_lock_irqsave(&dm_device.ha_lock, flags);
+ list_for_each_entry(has, &dm_device.ha_region_list, list) {
+- cur_start_pgp = (unsigned long)
+- pfn_to_page(has->start_pfn);
+- cur_end_pgp = (unsigned long)pfn_to_page(has->end_pfn);
+-
+ /* The page belongs to a different HAS. */
+- if (((unsigned long)pg < cur_start_pgp) ||
+- ((unsigned long)pg >= cur_end_pgp))
++ if ((pfn < has->start_pfn) || (pfn >= has->end_pfn))
+ continue;
+
+ hv_page_online_one(has, pg);
diff --git a/scripts/bs-upload-kernel b/scripts/bs-upload-kernel
index b1f8adcf2b..b592cc85a7 100755
--- a/scripts/bs-upload-kernel
+++ b/scripts/bs-upload-kernel
@@ -99,7 +99,7 @@ if (!@limit_packages && !$BS_SUFFIX) {
}
my @add_packages = ();
-my @macros = ("%opensuse_bs 1", "%is_kotd 1");
+my @macros = ("%is_kotd 1");
if ($ignore_kabi) {
push(@macros, "%ignore_kabi_badness 1");
}
diff --git a/scripts/git-pre-commit b/scripts/git-pre-commit
index a5db44550e..60b211c327 100755
--- a/scripts/git-pre-commit
+++ b/scripts/git-pre-commit
@@ -51,15 +51,13 @@ done
config_sh="$dir/../rpm/config.sh"
series_conf="$dir/../series.conf"
-if [ -r "$config_sh" -a -r "$series_conf" ];then
- . "$config_sh"
- if [ "$SORT_SERIES" = "yes" ] &&
- (cd "$dir/.." && git diff --cached --name-only --diff-filter=AMT \
- HEAD -- "series.conf" patches.* | grep -q .) &&
- ! "$dir"/series_sort.py --check "$series_conf"; then
- echo "\"sorted patches\" section of series.conf failed check. Please read \"scripts/git_sort/README.md\", in particular the section \"Refreshing the order of patches in series.conf\"."
- err=1
- fi
+if [ -r "$config_sh" ]; then
+ . "$config_sh"
+fi
+
+if [ "$SORT_SERIES" = "yes" -a -r "$series_conf" ] && \
+ ! "$dir/git_sort/pre-commit.sh"; then
+ err=1
fi
if test "$err" != 0; then
diff --git a/scripts/git_sort/exc.py b/scripts/git_sort/exc.py
new file mode 100644
index 0000000000..0258eeac4a
--- /dev/null
+++ b/scripts/git_sort/exc.py
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+
+class KSException(BaseException):
+ pass
+
+
+class KSError(KSException):
+ pass
+
+
+class KSNotFound(KSError):
+ pass
diff --git a/scripts/git_sort/git_sort.py b/scripts/git_sort/git_sort.py
index 8124071662..c3950069ea 100755
--- a/scripts/git_sort/git_sort.py
+++ b/scripts/git_sort/git_sort.py
@@ -342,8 +342,23 @@ class Cache(object):
else:
raise
+ if write_enable:
+ # In case there is already a database file of an unsupported format,
+ # one would hope that with flag="n" a new database would be created
+ # to overwrite the current one. Alas, that is not the case... :'(
+ try:
+ os.unlink(cache_path)
+ except OSError as e:
+ if e.errno != 2:
+ raise
+
flag_map = {False : "r", True : "n"}
- self.cache = shelve.open(cache_path, flag=flag_map[write_enable])
+ try:
+ self.cache = shelve.open(cache_path, flag=flag_map[write_enable])
+ except ImportError as err:
+ raise CUnsupported("Unsupported cache database format:\n" +
+ str(err))
+
self.closed = False
if write_enable:
self.cache["version"] = Cache.version
@@ -378,16 +393,22 @@ class Cache(object):
if self.closed:
raise ValueError
+ try:
+ version = self.cache["version"]
+ except KeyError:
+ key_error = True
+ except ValueError as err:
+ raise CUnsupported(str(err))
+ else:
+ key_error = False
+
if key == "version":
- try:
- return self.cache["version"]
- except KeyError:
+ if key_error:
raise CKeyError
+ else:
+ return version
elif key == "history":
- try:
- if self.cache["version"] != Cache.version:
- raise CUnsupported
- except KeyError:
+ if key_error or version != Cache.version:
raise CUnsupported
try:
@@ -442,7 +463,7 @@ class SortIndex(object):
history = cache["history"]
except CNeedsRebuild:
needs_rebuild = True
- except CAbsent:
+ except CNeedsRebuild:
needs_rebuild = True
except CError as err:
print("Error: %s" % (err,), file=sys.stderr)
@@ -586,7 +607,7 @@ if __name__ == "__main__":
needs_rebuild = True
else:
pprint.pprint(history.keys())
- except CAbsent:
+ except CNeedsRebuild:
print("No usable cache")
needs_rebuild = True
except CError as err:
diff --git a/scripts/git_sort/lib.py b/scripts/git_sort/lib.py
index 62ac998849..cb9caf2d24 100644
--- a/scripts/git_sort/lib.py
+++ b/scripts/git_sort/lib.py
@@ -14,22 +14,12 @@ import signal
import subprocess
import sys
+import exc
import git_sort
+import series_conf
import tag
-class KSException(BaseException):
- pass
-
-
-class KSError(KSException):
- pass
-
-
-class KSNotFound(KSError):
- pass
-
-
# https://stackoverflow.com/a/952952
flatten = lambda l: [item for sublist in l for item in sublist]
@@ -100,11 +90,6 @@ def repo_path():
return pygit2.discover_repository(search_path)
-start_text = "sorted patches"
-end_text = "end of sorted patches"
-oot_text = git_sort.oot.rev
-
-
def filter_patches(line):
line = line.strip()
@@ -128,59 +113,7 @@ def find_commit_in_series(commit, series):
patch.close()
if found:
return
- raise KSNotFound()
-
-
-def split_series(series):
- before = []
- inside = []
- after = []
-
- whitespace = []
- comments = []
-
- current = before
- for line in series:
- l = line.strip()
-
- if l == "":
- if comments:
- current.extend(comments)
- comments = []
- whitespace.append(line)
- continue
- elif l.startswith("#"):
- if whitespace:
- current.extend(whitespace)
- whitespace = []
- comments.append(line)
-
- if current == before and l.lower() == "# %s" % (start_text,):
- current = inside
- elif current == inside and l.lower() == "# %s" % (end_text,):
- current = after
- else:
- if comments:
- current.extend(comments)
- comments = []
- if whitespace:
- current.extend(whitespace)
- whitespace = []
- current.append(line)
- if comments:
- current.extend(comments)
- comments = []
- if whitespace:
- current.extend(whitespace)
- whitespace = []
-
- if current is before:
- raise KSNotFound("Sorted subseries not found.")
-
- current.extend(comments)
- current.extend(whitespace)
-
- return (before, inside, after,)
+ raise exc.KSNotFound()
def series_header(series):
@@ -192,7 +125,7 @@ def series_header(series):
try:
parse_section_header(line)
- except KSNotFound:
+ except exc.KSNotFound:
pass
else:
break
@@ -207,19 +140,20 @@ def series_footer(series):
def parse_section_header(line):
+ oot_text = git_sort.oot.rev
line = line.strip()
if not line.startswith("# "):
- raise KSNotFound()
+ raise exc.KSNotFound()
line = line[2:]
if line == oot_text:
return git_sort.oot
- elif line.lower() == start_text:
- raise KSNotFound()
+ elif line.lower() == series_conf.start_text:
+ raise exc.KSNotFound()
words = line.split(None, 3)
if len(words) > 2:
- raise KSError(
+ raise exc.KSError(
"Section comment \"%s\" in series.conf could not be parsed. "
"series.conf is invalid." % (line,))
args = [git_sort.RepoURL(words[0])]
@@ -229,7 +163,7 @@ def parse_section_header(line):
head = git_sort.Head(*args)
if head not in git_sort.remotes:
- raise KSError(
+ raise exc.KSError(
"Section comment \"%s\" in series.conf does not match any Head in "
"variable \"remotes\". series.conf is invalid." % (line,))
@@ -242,7 +176,7 @@ def parse_inside(index, inside):
for line in inside:
try:
current_head = parse_section_header(line)
- except KSNotFound:
+ except exc.KSNotFound:
pass
if not filter_patches(line):
@@ -269,7 +203,7 @@ class InputEntry(object):
def from_patch(self, index, name, current_head):
self.name = name
if not os.path.exists(name):
- raise KSError("Could not find patch \"%s\"" % (name,))
+ raise exc.KSError("Could not find patch \"%s\"" % (name,))
with tag.Patch(name) as patch:
commit_tags = patch.get("Git-commit")
@@ -282,12 +216,12 @@ class InputEntry(object):
self.revs = [firstword(ct) for ct in commit_tags]
for rev in self.revs:
if not self.commit_match.match(rev):
- raise KSError("Git-commit tag \"%s\" in patch \"%s\" is not a "
+ raise exc.KSError("Git-commit tag \"%s\" in patch \"%s\" is not a "
"valid revision." % (rev, name,))
rev = self.revs[0]
if len(repo_tags) > 1:
- raise KSError("Multiple Git-repo tags found. Patch \"%s\" is "
+ raise exc.KSError("Multiple Git-repo tags found. Patch \"%s\" is "
"tagged improperly." % (name,))
elif repo_tags:
repo = git_sort.RepoURL(repo_tags[0])
@@ -303,7 +237,7 @@ class InputEntry(object):
if repo == current_head.repo_url: # good tag
self.dest_head = current_head
else: # bad tag
- raise KSError(
+ raise exc.KSError(
"There is a problem with patch \"%s\". "
"The Git-repo tag is incorrect or the patch is in the "
"wrong section of series.conf and (the Git-commit tag "
@@ -315,7 +249,7 @@ class InputEntry(object):
"result. Manual intervention is required." % (name,))
else: # repo is indexed
if repo == current_head.repo_url: # good tag
- raise KSError(
+ raise exc.KSError(
"There is a problem with patch \"%s\". "
"Commit \"%s\" not found in git-sort index. "
"The remote fetching from \"%s\" needs to be fetched "
@@ -324,7 +258,7 @@ class InputEntry(object):
"intervention is required." % (
name, rev, current_head.repo_url,))
else: # bad tag
- raise KSError(
+ raise exc.KSError(
"There is a problem with patch \"%s\". "
"The Git-repo tag is incorrect or the patch is in the "
"wrong section of series.conf. Manual intervention is "
@@ -335,13 +269,13 @@ class InputEntry(object):
if repo == current_head.repo_url: # good tag
self.dest_head = current_head
else: # bad tag
- raise KSError(
+ raise exc.KSError(
"There is a problem with patch \"%s\". "
"The Git-repo tag is incorrect or the patch is in "
"the wrong section of series.conf. Manual "
"intervention is required." % (name,))
elif head == current_head: # patch didn't move
- raise KSException(
+ raise exc.KSException(
"Head \"%s\" is not available locally but commit "
"\"%s\" found in patch \"%s\" was found in that head." %
(head, rev, name,))
@@ -353,7 +287,7 @@ class InputEntry(object):
else: # repo is indexed
if head > current_head: # patch moved downstream
if repo == current_head.repo_url: # good tag
- raise KSError(
+ raise exc.KSError(
"There is a problem with patch \"%s\". "
"The patch is in the wrong section of series.conf "
"or the remote fetching from \"%s\" needs to be "
@@ -363,7 +297,7 @@ class InputEntry(object):
name, current_head.repo_url, head,
current_head,))
else: # bad tag
- raise KSError(
+ raise exc.KSError(
"There is a problem with patch \"%s\". "
"The patch is in the wrong section of series.conf "
"or the remote fetching from \"%s\" needs to be "
@@ -453,14 +387,14 @@ def update_tags(index, entries):
try:
patch.change(tag_name, index.describe(entry.cindex))
except KeyError:
- raise KSNotFound(message % (tag_name, entry.name,))
+ raise exc.KSNotFound(message % (tag_name, entry.name,))
patch.remove("Git-repo")
else:
tag_name = "Git-repo"
try:
patch.change(tag_name, repr(entry.new_url))
except KeyError:
- raise KSNotFound(message % (tag_name, entry.name,))
+ raise exc.KSNotFound(message % (tag_name, entry.name,))
def sequence_insert(series, rev, top):
@@ -480,9 +414,9 @@ def sequence_insert(series, rev, top):
try:
commit = str(repo.revparse_single(rev).id)
except ValueError:
- raise KSError("\"%s\" is not a valid revision." % (rev,))
+ raise exc.KSError("\"%s\" is not a valid revision." % (rev,))
except KeyError:
- raise KSError("Revision \"%s\" not found in \"%s\"." % (
+ raise exc.KSError("Revision \"%s\" not found in \"%s\"." % (
rev, git_dir,))
marker = "# new commit"
@@ -490,15 +424,15 @@ def sequence_insert(series, rev, top):
try:
new_entry.dest_head, new_entry.cindex = index.lookup(commit)
except git_sort.GSKeyError:
- raise KSError(
+ raise exc.KSError(
"Commit %s not found in git-sort index. If it is from a "
"repository and branch pair which is not listed in \"remotes\", "
"please add it and submit a patch." % (commit,))
try:
- before, inside, after = split_series(series)
- except KSNotFound as err:
- raise KSError(err)
+ before, inside, after = series_conf.split(series)
+ except exc.KSNotFound as err:
+ raise exc.KSError(err)
before, after = map(filter_series, (before, after,))
current_patches = flatten([before, filter_series(inside), after])
@@ -525,7 +459,7 @@ def sequence_insert(series, rev, top):
del new_patches[commit_pos]
if new_patches != current_patches:
- raise KSError("Subseries is not sorted. "
+ raise exc.KSError("Subseries is not sorted. "
"Please run scripts/series_sort.py.")
return (name, commit_pos - top_index,)
diff --git a/scripts/git_sort/merge_tool.py b/scripts/git_sort/merge_tool.py
index 8641f4dac6..615236dd62 100755
--- a/scripts/git_sort/merge_tool.py
+++ b/scripts/git_sort/merge_tool.py
@@ -23,7 +23,9 @@ import shutil
import subprocess
import sys
+import exc
import lib
+import series_conf
def splice(series, inside, output_path):
@@ -48,7 +50,7 @@ if __name__ == "__main__":
(s[0], s[1], s[2], set([lib.firstword(l) for l in s[1] if
lib.filter_patches(l)]),)
for s in [
- lib.split_series(open(s_path)) for s_path in (
+ series_conf.split(open(s_path)) for s_path in (
local_path, base_path, remote_path,)
]
)
@@ -73,7 +75,7 @@ if __name__ == "__main__":
inside = [line for line in local[1] if not line.strip() in removed]
try:
input_entries = lib.parse_inside(index, inside)
- except lib.KSError as err:
+ except exc.KSError as err:
print("Error: %s" % (err,), file=sys.stderr)
sys.exit(1)
for name in added - local[3]:
@@ -83,7 +85,7 @@ if __name__ == "__main__":
try:
sorted_entries = lib.series_sort(index, input_entries)
- except lib.KSError as err:
+ except exc.KSError as err:
print("Error: %s" % (err,), file=sys.stderr)
sys.exit(1)
output = lib.series_format(sorted_entries)
@@ -97,6 +99,7 @@ if __name__ == "__main__":
splice(base, output, base_path)
splice(remote, output, remote_path)
+ result = 0
try:
cmd = "merge"
retval = subprocess.call([cmd, merged_path, base_path, remote_path])
@@ -113,5 +116,16 @@ if __name__ == "__main__":
print("Warning: conflicts outside of sorted section, leaving merged "
"result in %s" % (name,))
shutil.copy(merged_path, name)
- sys.exit(1)
+ result = 1
+
+ to_update = filter(lib.tag_needs_update, input_entries)
+ try:
+ lib.update_tags(index, to_update)
+ except exc.KSError as err:
+ print("Error: %s" % (err,), file=sys.stderr)
+ result = 1
+ else:
+ for entry in to_update:
+ subprocess.check_call(["git", "add", entry.name])
+ sys.exit(result)
diff --git a/scripts/git_sort/pre-commit.sh b/scripts/git_sort/pre-commit.sh
new file mode 100755
index 0000000000..e0fb740a1b
--- /dev/null
+++ b/scripts/git_sort/pre-commit.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+_libdir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
+
+sorted_section_changed () {
+ status=$(git diff-index --cached --name-status --diff-filter=AM HEAD \
+ -- "$_libdir"/../../series.conf | awk '{print $1}')
+ case "$status" in
+ "")
+ return 1
+ ;;
+ A)
+ return 0
+ ;;
+ M)
+ diff -q <(
+ git cat-file blob HEAD:series.conf |
+ "$_libdir"/series_conf.py
+ ) <(
+ git cat-file blob :series.conf |
+ "$_libdir"/series_conf.py
+ ) > /dev/null
+ if [ $? -eq 1 ]; then
+ return 0
+ else
+ return 1
+ fi
+ ;;
+ esac
+
+ return 2
+}
+
+if sorted_section_changed && ! git cat-file blob :series.conf | \
+ "$_libdir"/series_sort.py --check; then
+ echo "\"sorted patches\" section of series.conf failed check. Please read \"scripts/git_sort/README.md\", in particular the section \"Refreshing the order of patches in series.conf\"."
+ exit 1
+fi
diff --git a/scripts/git_sort/qcp.py b/scripts/git_sort/qcp.py
index 38f549f79c..73545a7b78 100755
--- a/scripts/git_sort/qcp.py
+++ b/scripts/git_sort/qcp.py
@@ -12,6 +12,7 @@ import subprocess
import sys
import tempfile
+import exc
import lib
import tag
@@ -100,7 +101,7 @@ if __name__ == "__main__":
with lib.find_commit_in_series(fixes, series) as patch:
destination = os.path.dirname(patch.name)
references = " ".join(patch.get("References"))
- except lib.KSNotFound:
+ except exc.KSNotFound:
print("Error: no patch found which contains commit %s." %
(fixes[:12],), file=sys.stderr)
sys.exit(1)
diff --git a/scripts/git_sort/qdupcheck.py b/scripts/git_sort/qdupcheck.py
index b5f8f4c1a7..bc69e04d54 100755
--- a/scripts/git_sort/qdupcheck.py
+++ b/scripts/git_sort/qdupcheck.py
@@ -10,6 +10,7 @@ import pygit2
import subprocess
import sys
+import exc
import lib
@@ -56,5 +57,5 @@ if __name__ == "__main__":
if top == patch.name:
print("This is the top patch.")
sys.exit(1)
- except lib.KSNotFound:
+ except exc.KSNotFound:
pass
diff --git a/scripts/git_sort/qgoto.py b/scripts/git_sort/qgoto.py
index 07588bf1e2..5b8a14f23f 100755
--- a/scripts/git_sort/qgoto.py
+++ b/scripts/git_sort/qgoto.py
@@ -8,6 +8,7 @@ import os
import subprocess
import sys
+import exc
import lib
@@ -36,7 +37,7 @@ if __name__ == "__main__":
try:
(name, delta,) = lib.sequence_insert(series, args.rev, top)
- except lib.KSException as err:
+ except exc.KSException as err:
print("Error: %s" % (err,), file=sys.stderr)
sys.exit(1)
diff --git a/scripts/git_sort/sequence-insert.py b/scripts/git_sort/sequence-insert.py
index 04b65d4437..983fa1acdd 100755
--- a/scripts/git_sort/sequence-insert.py
+++ b/scripts/git_sort/sequence-insert.py
@@ -15,6 +15,7 @@ import argparse
import os
import sys
+import exc
import lib
@@ -28,7 +29,7 @@ if __name__ == "__main__":
try:
(name, delta,) = lib.sequence_insert(open("series.conf"), args.rev,
None)
- except lib.KSException as err:
+ except exc.KSException as err:
print("Error: %s" % (err,), file=sys.stderr)
sys.exit(1)
diff --git a/scripts/git_sort/series_conf.py b/scripts/git_sort/series_conf.py
new file mode 100755
index 0000000000..c3f4a02a68
--- /dev/null
+++ b/scripts/git_sort/series_conf.py
@@ -0,0 +1,93 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+from __future__ import print_function
+
+import argparse
+import errno
+import sys
+
+import exc
+
+
+start_text = "sorted patches"
+end_text = "end of sorted patches"
+
+
+def split(series):
+ before = []
+ inside = []
+ after = []
+
+ whitespace = []
+ comments = []
+
+ current = before
+ for line in series:
+ l = line.strip()
+
+ if l == "":
+ if comments:
+ current.extend(comments)
+ comments = []
+ whitespace.append(line)
+ continue
+ elif l.startswith("#"):
+ if whitespace:
+ current.extend(whitespace)
+ whitespace = []
+ comments.append(line)
+
+ if current == before and l.lower() == "# %s" % (start_text,):
+ current = inside
+ elif current == inside and l.lower() == "# %s" % (end_text,):
+ current = after
+ else:
+ if comments:
+ current.extend(comments)
+ comments = []
+ if whitespace:
+ current.extend(whitespace)
+ whitespace = []
+ current.append(line)
+ if comments:
+ current.extend(comments)
+ comments = []
+ if whitespace:
+ current.extend(whitespace)
+ whitespace = []
+
+ if current is before:
+ raise exc.KSNotFound("Sorted subseries not found.")
+
+ current.extend(comments)
+ current.extend(whitespace)
+
+ return (before, inside, after,)
+
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser(
+ description="Extract the sorted patches section of a series.conf file.")
+ parser.add_argument("series", nargs="?", metavar="series.conf",
+ help="series.conf file. Default: read input from stdin.")
+ args = parser.parse_args()
+
+ if args.series is not None:
+ f = open(args.series)
+ else:
+ f = sys.stdin
+ lines = f.readlines()
+
+ try:
+ before, inside, after = split(lines)
+ except exc.KSNotFound:
+ pass
+ else:
+ try:
+ sys.stdout.writelines(inside)
+ except IOError as err:
+ if err.errno == errno.EPIPE:
+ pass
+ else:
+ raise
diff --git a/scripts/git_sort/series_insert.py b/scripts/git_sort/series_insert.py
index 96ff80ed55..028f402fd7 100755
--- a/scripts/git_sort/series_insert.py
+++ b/scripts/git_sort/series_insert.py
@@ -14,7 +14,9 @@ import pygit2
import sys
import git_sort
+import exc
import lib
+import series_conf
import tag
@@ -38,9 +40,9 @@ if __name__ == "__main__":
sys.exit(1)
try:
- before, inside, after = lib.split_series(lines)
+ before, inside, after = series_conf.split(lines)
current_entries = lib.parse_inside(index, inside)
- except lib.KSError as err:
+ except exc.KSError as err:
print("Error: %s" % (err,), file=sys.stderr)
sys.exit(1)
@@ -66,7 +68,7 @@ if __name__ == "__main__":
new_lines.add(entry.value)
try:
entry.from_patch(index, name, git_sort.oot)
- except lib.KSError as err:
+ except exc.KSError as err:
print("Error: %s" % (err,), file=sys.stderr)
sys.exit(1)
if entry.dest_head != git_sort.oot:
@@ -83,7 +85,7 @@ if __name__ == "__main__":
try:
sorted_entries = lib.series_sort(index, current_entries + new_entries)
- except lib.KSError as err:
+ except exc.KSError as err:
print("Error: %s" % (err,), file=sys.stderr)
sys.exit(1)
@@ -122,6 +124,6 @@ if __name__ == "__main__":
try:
lib.update_tags(index, filter(lib.tag_needs_update, new_entries))
- except lib.KSError as err:
+ except exc.KSError as err:
print("Error: %s" % (err,), file=sys.stderr)
sys.exit(1)
diff --git a/scripts/git_sort/series_sort.py b/scripts/git_sort/series_sort.py
index 369f8b228f..30f3d8237d 100755
--- a/scripts/git_sort/series_sort.py
+++ b/scripts/git_sort/series_sort.py
@@ -31,8 +31,10 @@ except ImportError as err:
"\"scripts/git_sort/README.md\".", file=sys.stderr)
sys.exit(1)
+import exc
import git_sort
import lib
+import series_conf
import tag
@@ -66,8 +68,8 @@ if __name__ == "__main__":
os.chdir(args.prefix)
try:
- before, inside, after = lib.split_series(lines)
- except lib.KSNotFound as err:
+ before, inside, after = series_conf.split(lines)
+ except exc.KSNotFound as err:
if args.series is None:
before = []
inside = lines
@@ -81,13 +83,13 @@ if __name__ == "__main__":
try:
input_entries = lib.parse_inside(index, inside)
- except lib.KSError as err:
+ except exc.KSError as err:
print("Error: %s" % (err,), file=sys.stderr)
sys.exit(1)
try:
sorted_entries = lib.series_sort(index, input_entries)
- except lib.KSError as err:
+ except exc.KSError as err:
print("Error: %s" % (err,), file=sys.stderr)
sys.exit(1)
@@ -121,6 +123,6 @@ if __name__ == "__main__":
f.writelines(output)
try:
lib.update_tags(index, to_update)
- except lib.KSError as err:
+ except exc.KSError as err:
print("Error: %s" % (err,), file=sys.stderr)
sys.exit(1)
diff --git a/scripts/git_sort/tests/support.py b/scripts/git_sort/tests/support.py
new file mode 100644
index 0000000000..c4cb3d73b4
--- /dev/null
+++ b/scripts/git_sort/tests/support.py
@@ -0,0 +1,96 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+from __future__ import print_function
+
+import datetime
+import pygit2
+
+
+# from http://www.pygit2.org/recipes/git-show.html
+class FixedOffset(datetime.tzinfo):
+ """Fixed offset in minutes east from UTC."""
+
+ def __init__(self, offset):
+ self.__offset = datetime.timedelta(minutes = offset)
+
+ def utcoffset(self, dt):
+ return self.__offset
+
+ def tzname(self, dt):
+ return None # we don't know the time zone's name
+
+ def dst(self, dt):
+ return datetime.timedelta(0) # we don't know about DST
+
+
+def format_patch(commit, mainline=None, repo=None):
+ def format_sanitized_subject(message):
+ """
+ Reimplemented from the similarly named function in the git source.
+ """
+ def is_title_char(c):
+ if ((c >= 'a' and c <= 'z') or (c >= 'A' and c <= 'Z') or
+ (c >= '0' and c <= '9') or c == '.' or c == '_'):
+ return True
+ else:
+ return False
+
+ result = []
+ space = False
+ i = 0
+ end = message.find("\n")
+ if end == -1:
+ end = len(message)
+ while i < end:
+ c = message[i]
+ if is_title_char(c):
+ if space and result:
+ result.append("-")
+ result.append(c)
+ space = False
+ if c == ".":
+ while i + 1 < end and message[i + 1] == ".":
+ i = i + 1
+ else:
+ space = True
+ i = i + 1
+ return "".join(result[:52])
+ name = format_sanitized_subject(commit.message) + ".patch"
+
+ with open(name, mode="w") as f:
+ f.write("From: %s <%s>\n" % (commit.author.name, commit.author.email,))
+ tzinfo = FixedOffset(commit.author.offset)
+ dt = datetime.datetime.fromtimestamp(float(commit.author.time), tzinfo)
+ f.write("Date: %s\n" % (dt.strftime("%c %z"),))
+ if mainline and repo is None:
+ f.write("Patch-mainline: %s\n" % (mainline,))
+ f.write("Git-commit: %s\n" % (str(commit.id),))
+ elif mainline is None and repo:
+ f.write("Patch-mainline: Queued in subsystem maintainer repository\n")
+ f.write("Git-repo: %s\n" % (repo,))
+ f.write("Git-commit: %s\n" % (str(commit.id),))
+ else:
+ f.write("Patch-mainline: No\n")
+ f.write("Subject: %s" % (commit.message,))
+ if not commit.message.endswith("\n"):
+ f.write("\n")
+ if commit.message.find("\n") == -1:
+ f.write("\n")
+ else:
+ if commit.message.count("\n") == 1:
+ # ends with a newline but consists only of a subject.
+ f.write("\n")
+ f.write("---\n")
+ args = []
+ if len(commit.parents):
+ args.append(commit.parents[0].tree)
+ diff = commit.tree.diff_to_tree(*args, swap=True)
+ f.write(diff.stats.format(pygit2.GIT_DIFF_STATS_FULL, width=79))
+ f.write("\n")
+ patch = diff.patch
+ if patch is not None:
+ f.write(diff.patch)
+ f.write("--\ngs-tests\n")
+
+ return name
diff --git a/scripts/git_sort/tests/test_quilt_mode.py b/scripts/git_sort/tests/test_quilt_mode.py
index 070b93b2b5..266a608b3c 100755
--- a/scripts/git_sort/tests/test_quilt_mode.py
+++ b/scripts/git_sort/tests/test_quilt_mode.py
@@ -3,13 +3,9 @@
from __future__ import print_function
-import collections
-import datetime
import os
import os.path
import pygit2
-import re
-import shelve
import shutil
import subprocess
import sys
@@ -18,86 +14,7 @@ import unittest
import git_sort
import lib
-
-
-# from http://www.pygit2.org/recipes/git-show.html
-class FixedOffset(datetime.tzinfo):
- """Fixed offset in minutes east from UTC."""
-
- def __init__(self, offset):
- self.__offset = datetime.timedelta(minutes = offset)
-
- def utcoffset(self, dt):
- return self.__offset
-
- def tzname(self, dt):
- return None # we don't know the time zone's name
-
- def dst(self, dt):
- return datetime.timedelta(0) # we don't know about DST
-
-
-def format_patch(commit, tag):
- def format_sanitized_subject(message):
- """
- Reimplemented from the similarly named function in the git source.
- """
- def is_title_char(c):
- if ((c >= 'a' and c <= 'z') or (c >= 'A' and c <= 'Z') or
- (c >= '0' and c <= '9') or c == '.' or c == '_'):
- return True
- else:
- return False
-
- result = []
- space = False
- i = 0
- end = message.find("\n")
- if end == -1:
- end = len(message)
- while i < end:
- c = message[i]
- if is_title_char(c):
- if space and result:
- result.append("-")
- result.append(c)
- space = False
- if c == ".":
- while i + 1 < end and message[i + 1] == ".":
- i = i + 1
- else:
- space = True
- i = i + 1
- return "".join(result[:52])
- name = format_sanitized_subject(commit.message) + ".patch"
-
- with open(name, mode="w") as f:
- f.write("From: %s <%s>\n" % (commit.author.name, commit.author.email,))
- tzinfo = FixedOffset(commit.author.offset)
- dt = datetime.datetime.fromtimestamp(float(commit.author.time), tzinfo)
- f.write("Date: %s\n" % (dt.strftime("%c %z"),))
- f.write("Patch-mainline: %s\n" % (tag,))
- f.write("Git-commit: %s\n" % (str(commit.id),))
- f.write("Subject: %s" % (commit.message,))
- if not commit.message.endswith("\n"):
- f.write("\n")
- if commit.message.find("\n") == -1:
- f.write("\n")
- else:
- if commit.message.count("\n") == 1:
- # ends with a newline but consists only of a subject.
- f.write("\n")
- f.write("---\n")
- args = []
- if len(commit.parents):
- args.append(commit.parents[0].tree)
- diff = commit.tree.diff_to_tree(*args, swap=True)
- f.write(diff.stats.format(pygit2.GIT_DIFF_STATS_FULL, width=79))
- f.write("\n")
- f.write(diff.patch)
- f.write("--\ngs-tests\n")
-
- return name
+import tests.support
class TestQuiltMode(unittest.TestCase):
@@ -184,18 +101,19 @@ Signed-off-by: Christoffer Dall <cdall@linaro.org>
self.repo.create_tag("v4.10-rc6", m3, pygit2.GIT_REF_OID, committer,
"Linux 4.10-rc6")
- self.repo.remotes.create("origin",
- "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git")
+ self.repo.remotes.create(
+ "origin",
+ "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git")
self.repo.references.create("refs/remotes/origin/master", m3)
# setup stub kernel-source content
self.ks_dir = tempfile.mkdtemp(prefix="gs_ks")
- k_org_canon_prefix = "git://git.kernel.org/pub/scm/linux/kernel/git/"
patch_dir = os.path.join(self.ks_dir, "patches.suse")
os.mkdir(patch_dir)
os.chdir(patch_dir)
- m0_name = format_patch(self.repo.get(m0), "v4.9")
- m1_name = format_patch(self.repo.get(m1), "v4.10-rc5")
+ m0_name = tests.support.format_patch(self.repo.get(m0), mainline="v4.9")
+ m1_name = tests.support.format_patch(self.repo.get(m1),
+ mainline="v4.10-rc5")
open(os.path.join(self.ks_dir, "series.conf"), mode="w").write(
"""# Kernel patches configuration file
diff --git a/scripts/git_sort/tests/test_series_insert.py b/scripts/git_sort/tests/test_series_insert.py
new file mode 100644
index 0000000000..88af3b7d28
--- /dev/null
+++ b/scripts/git_sort/tests/test_series_insert.py
@@ -0,0 +1,135 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+from __future__ import print_function
+
+import os
+import pygit2
+import shutil
+import subprocess
+import tempfile
+import unittest
+import sys
+
+import git_sort
+import lib
+import tests.support
+
+
+class TestSeriesInsert(unittest.TestCase):
+ def setUp(self):
+ os.environ["XDG_CACHE_HOME"] = tempfile.mkdtemp(prefix="gs_cache")
+
+ # setup stub linux repository
+ os.environ["LINUX_GIT"] = tempfile.mkdtemp(prefix="gs_repo")
+ self.repo = pygit2.init_repository(os.environ["LINUX_GIT"])
+
+ author = pygit2.Signature('Alice Author', 'alice@authors.tld')
+ committer = pygit2.Signature('Cecil Committer', 'cecil@committers.tld')
+ tree = self.repo.TreeBuilder().write()
+
+ parent = []
+ commits = []
+ for i in range(3):
+ subject = "mainline %d" % (i,)
+ cid = self.repo.create_commit(
+ "refs/heads/master",
+ author,
+ committer,
+ "%s\n\nlog" % (subject,),
+ tree,
+ parent
+ )
+ parent = [cid]
+ commits.append(cid)
+ self.commits = commits
+
+ self.repo.remotes.create(
+ "origin",
+ "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git")
+ self.repo.references.create("refs/remotes/origin/master", commits[-1])
+
+ self.index = git_sort.SortIndex(self.repo)
+
+ # setup stub kernel-source content
+ self.ks_dir = tempfile.mkdtemp(prefix="gs_ks")
+ patch_dir = os.path.join(self.ks_dir, "patches.suse")
+ os.mkdir(patch_dir)
+ os.chdir(patch_dir)
+ for commit in commits:
+ tests.support.format_patch(self.repo.get(commit),
+ mainline="v3.45-rc6")
+
+ def tearDown(self):
+ shutil.rmtree(os.environ["XDG_CACHE_HOME"])
+ shutil.rmtree(os.environ["LINUX_GIT"])
+ shutil.rmtree(self.ks_dir)
+
+
+ def test_simple(self):
+ si_path = os.path.join(lib.libdir(), "series_insert.py")
+ os.chdir(self.ks_dir)
+
+ series = "series.conf"
+ open(series, mode="w").write(
+"""########################################################
+ # sorted patches
+ ########################################################
+ patches.suse/mainline-0.patch
+ patches.suse/mainline-2.patch
+ ########################################################
+ # end of sorted patches
+ ########################################################
+""")
+
+ subprocess.check_call([si_path, "patches.suse/mainline-1.patch"])
+ self.assertEqual(open(series).read(),
+"""########################################################
+ # sorted patches
+ ########################################################
+ patches.suse/mainline-0.patch
+ patches.suse/mainline-1.patch
+ patches.suse/mainline-2.patch
+ ########################################################
+ # end of sorted patches
+ ########################################################
+""")
+
+ content = []
+ with open("patches.suse/mainline-1.patch") as f:
+ for line in f:
+ if line.startswith("Git-commit: "):
+ line = "Git-commit: invalid\n"
+ content.append(line)
+ open("patches.suse/mainline-1.patch", mode="w+").writelines(content)
+
+ open(series, mode="w").write(
+"""########################################################
+ # sorted patches
+ ########################################################
+ patches.suse/mainline-0.patch
+ patches.suse/mainline-2.patch
+ ########################################################
+ # end of sorted patches
+ ########################################################
+""")
+
+ try:
+ subprocess.check_output([si_path, "patches.suse/mainline-1.patch"],
+ stderr=subprocess.STDOUT)
+ except subprocess.CalledProcessError as err:
+ self.assertEqual(err.returncode, 1)
+ self.assertEqual(
+ err.output,
+ "Error: Git-commit tag \"invalid\" in patch "
+ "\"patches.suse/mainline-1.patch\" is not a valid revision.\n")
+ else:
+ self.assertTrue(False)
+
+ os.unlink(series)
+
+
+if __name__ == '__main__':
+ # Run a single testcase
+ suite = unittest.TestLoader().loadTestsFromTestCase(TestSeriesInsert)
+ unittest.TextTestRunner(verbosity=2).run(suite)
diff --git a/scripts/git_sort/tests/test_series_sort.py b/scripts/git_sort/tests/test_series_sort.py
index 2f48310dd5..d14671e365 100755
--- a/scripts/git_sort/tests/test_series_sort.py
+++ b/scripts/git_sort/tests/test_series_sort.py
@@ -3,11 +3,9 @@
from __future__ import print_function
-import collections
import os
import os.path
import pygit2
-import shelve
import shutil
import subprocess
import sys
@@ -16,21 +14,7 @@ import unittest
import git_sort
import lib
-
-
-def write_patch(name, mainline=None, repo=None, commit=None):
- f = open(name, mode="w")
- if mainline and commit and repo is None:
- f.write("Patch-mainline: %s\n" % (mainline,))
- f.write("Git-commit: %s\n" % (commit,))
- elif mainline is None and repo and commit:
- f.write("Patch-mainline: Queued in subsystem maintainer repository\n")
- f.write("Git-repo: %s\n" % (repo,))
- f.write("Git-commit: %s\n" % (commit,))
- elif mainline and repo is None and commit is None:
- f.write("Patch-mainline: %s\n" % (mainline,))
- else:
- assert False
+import tests.support
class TestSeriesSort(unittest.TestCase):
@@ -100,32 +84,46 @@ class TestSeriesSort(unittest.TestCase):
[n1]
)
- self.repo.remotes.create("origin",
- "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git")
+ oot0 = self.repo.create_commit(
+ "refs/heads/oot",
+ author,
+ committer,
+ "oot 0\n\nlog",
+ tree,
+ [m0]
+ )
+
+ oot1 = self.repo.create_commit(
+ "refs/heads/oot",
+ author,
+ committer,
+ "oot 1\n\nlog",
+ tree,
+ [oot0]
+ )
+
+ k_org_canon_prefix = "git://git.kernel.org/pub/scm/linux/kernel/git/"
+ origin_repo = k_org_canon_prefix + "torvalds/linux.git"
+ self.repo.remotes.create("origin", origin_repo)
self.repo.references.create("refs/remotes/origin/master", m2)
- self.repo.remotes.create("net",
- "git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git")
+ net_repo = k_org_canon_prefix + "davem/net.git"
+ self.repo.remotes.create("net", net_repo)
self.repo.references.create("refs/remotes/net/master", n2)
self.index = git_sort.SortIndex(self.repo)
# setup stub kernel-source content
self.ks_dir = tempfile.mkdtemp(prefix="gs_ks")
- k_org_canon_prefix = "git://git.kernel.org/pub/scm/linux/kernel/git/"
patch_dir = os.path.join(self.ks_dir, "patches.suse")
os.mkdir(patch_dir)
os.chdir(patch_dir)
- write_patch("mainline0.patch", mainline="v3.45-rc6", commit=str(m0))
- write_patch("net0.patch", mainline="v3.45-rc6", commit=str(n0))
- write_patch("net1.patch", repo=k_org_canon_prefix + "davem/net.git",
- commit=str(n1))
- write_patch("net2.patch", repo=k_org_canon_prefix + "davem/net.git",
- commit=str(n2))
- write_patch("net2.patch", repo=k_org_canon_prefix + "davem/net.git",
- commit=str(n2))
- write_patch("oot0.patch", mainline="no")
- write_patch("oot1.patch", mainline="no")
+ tests.support.format_patch(self.repo.get(m0), mainline="v3.45-rc6")
+ tests.support.format_patch(self.repo.get(n0), mainline="v3.45-rc6")
+ tests.support.format_patch(self.repo.get(n1), repo=net_repo)
+ tests.support.format_patch(self.repo.get(n2), repo=net_repo)
+ tests.support.format_patch(self.repo.get(oot0))
+ tests.support.format_patch(self.repo.get(oot1))
def tearDown(self):
shutil.rmtree(os.environ["XDG_CACHE_HOME"])
@@ -163,8 +161,8 @@ class TestSeriesSort(unittest.TestCase):
"""########################################################
# sorted patches
########################################################
- patches.suse/mainline0.patch
- patches.suse/net0.patch
+ patches.suse/mainline-0.patch
+ patches.suse/net-0.patch
########################################################
# end of sorted patches
########################################################
@@ -190,16 +188,16 @@ class TestSeriesSort(unittest.TestCase):
########################################################
# sorted patches
########################################################
- patches.suse/mainline0.patch
- patches.suse/net0.patch
+ patches.suse/mainline-0.patch
+ patches.suse/net-0.patch
# davem/net
- patches.suse/net1.patch
- patches.suse/net2.patch
+ patches.suse/net-1.patch
+ patches.suse/net-2.patch
# out-of-tree patches
- patches.suse/oot0.patch
- patches.suse/oot1.patch
+ patches.suse/oot-0.patch
+ patches.suse/oot-1.patch
########################################################
# end of sorted patches
diff --git a/scripts/gitlog2changes b/scripts/gitlog2changes
index 718c2d98f2..7f59a5d2c1 100755
--- a/scripts/gitlog2changes
+++ b/scripts/gitlog2changes
@@ -116,6 +116,12 @@ sub parse_gitlog {
return @res;
}
+my $excludes_file;
+if ($ARGV[0] eq "--excludes") {
+ shift(@ARGV);
+ $excludes_file = shift(@ARGV);
+}
+
my @fixups;
if ($ARGV[0] eq "--fixups") {
shift(@ARGV);
@@ -144,6 +150,17 @@ for my $fix (@fixups) {
}
}
+if ($excludes_file) {
+ open(my $fh, '<', $excludes_file) or die "$excludes_file: $!\n";
+ while (my $id = <$fh>) {
+ next if $id =~ /^#/;
+ chomp($id);
+ # delete the original commit
+ $commits_h{$id}->{commit} = undef;
+ }
+ close($fh);
+}
+
for my $c (sort { $b->{ts} - $a->{ts} } @commits) {
print_commit($c->{commit}, $c->{email}, $c->{ts}, @{$c->{message}});
}
diff --git a/scripts/osc_wrapper b/scripts/osc_wrapper
index 37dc5bd63f..20aac4969b 100755
--- a/scripts/osc_wrapper
+++ b/scripts/osc_wrapper
@@ -267,7 +267,7 @@ do_build()
--extra-pkgs=-brp-check-suse --extra-pkgs=-post-build-checks)
fi
if $kabi; then
- osc_args=("${osc_args[@]}" --define="'ignore_kabi_badness 0'")
+ osc_args=("${osc_args[@]}" --define 'ignore_kabi_badness 0')
fi
arch=$(uname -m | sed 's/^i.86$/i586/')
diff --git a/scripts/tar-up.sh b/scripts/tar-up.sh
index e2fc1c59ee..b933faab7d 100755
--- a/scripts/tar-up.sh
+++ b/scripts/tar-up.sh
@@ -243,6 +243,9 @@ elif $using_git; then
echo "expected \"last commit: <commit>\" in rpm/kernel-source.changes.old" >&2
exit 1
esac
+ if test -d rpm/gitlog-excludes; then
+ exclude=(--excludes "$_" "${exclude[@]}")
+ fi
if test -e rpm/gitlog-fixups; then
exclude=(--fixups "$_" "${exclude[@]}")
fi
diff --git a/series.conf b/series.conf
index 4610bb1a05..bef0ce0938 100644
--- a/series.conf
+++ b/series.conf
@@ -5106,6 +5106,11 @@
patches.arch/s390-sles12sp3-11-04-03-qeth-fix-double-free-on-IP-add-remove-race.patch
patches.arch/s390-sles12sp3-11-04-04-qeth-fix-IP-address-lookup-for-L3-devices.patch
+ # bsc#1088324 - SLES 12 SP3 - IBM LTC System z maintenance kernel patches (#12)
+ patches.arch/s390-sles12sp3-12-02-01-s390-mm-no-local-TLB-flush-for-clearing-by-ASCE-IDTE.patch
+ patches.arch/s390-sles12sp3-12-02-02-s390-mm-fix-local-TLB-flushing-vs.-detach-of-an-mm-a.patch
+ patches.arch/s390-sles12sp3-12-02-03-s390-mm-fix-race-on-mm-context.flush_mm.patch
+
########################################################
# arch misc patches
########################################################
@@ -14903,8 +14908,6 @@
patches.fixes/netfilter-ebtables-fix-erroneous-reject-of-last-rule.patch
patches.fixes/Revert-e1000e-Separate-signaling-for-link-check-link.patch
patches.fixes/e1000e-Fix-link-check-race-condition.patch
-
- # davem/net-next
patches.drivers/ibmvnic-Keep-track-of-supplementary-TX-descriptors.patch
patches.drivers/ibmvnic-Rename-active-queue-count-variables.patch
patches.drivers/ibmvnic-Move-active-sub-crq-count-settings.patch
@@ -14937,6 +14940,9 @@
patches.drivers/ibmvnic-Update-TX-pool-cleaning-routine.patch
patches.drivers/ibmvnic-Remove-unused-TSO-resources-in-TX-pool-struc.patch
patches.drivers/ibmvnic-Potential-NULL-dereference-in-clean_one_tx_p.patch
+ patches.suse/suse-hv-hv_balloon-fix-printk-loglevel.patch
+ patches.suse/suse-hv-hv_balloon-simplify-hv_online_page-hv_page_online_on.patch
+ patches.suse/suse-hv-hv_balloon-fix-bugs-in-num_pages_onlined-accounting.patch
# out-of-tree patches
patches.drivers/0002-hns-set-relation-between-hns_roce-and-hns_enet_drv.patch