From 00ee7f71736ab7a4d0dd32c99095adfd7abd9626 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Thu, 22 Aug 2019 19:28:48 +0100 Subject: [PATCH] [ppc64el] Avoid ABI change for disabling TM Ignore removal of TM functions that are exported for use by KVM. --- debian/changelog | 1 + debian/config/defines | 4 +++ ...pc-avoid-abi-change-for-disabling-tm.patch | 34 +++++++++++++++++++ debian/patches/series | 1 + 4 files changed, 40 insertions(+) create mode 100644 debian/patches/debian/abi/powerpc-avoid-abi-change-for-disabling-tm.patch diff --git a/debian/changelog b/debian/changelog index 35604b6db..3d98140bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ linux (4.19.67-2) UNRELEASED; urgency=medium [ Ben Hutchings ] * KVM: Ignore ABI changes * [ppc64el] Disable PPC_TRANSACTIONAL_MEM (Closes: #866122) + * [ppc64el] Avoid ABI change for disabling TM -- Ben Hutchings Wed, 21 Aug 2019 23:37:56 +0100 diff --git a/debian/config/defines b/debian/config/defines index faa86c867..9c85fab13 100644 --- a/debian/config/defines +++ b/debian/config/defines @@ -88,6 +88,10 @@ ignore-changes: mark_page_dirty vcpu_* module:arch/x86/kvm/* +# Only exported for use by KVM + tm_abort + tm_disable + tm_enable [base] arches: diff --git a/debian/patches/debian/abi/powerpc-avoid-abi-change-for-disabling-tm.patch b/debian/patches/debian/abi/powerpc-avoid-abi-change-for-disabling-tm.patch new file mode 100644 index 000000000..f9e9704da --- /dev/null +++ b/debian/patches/debian/abi/powerpc-avoid-abi-change-for-disabling-tm.patch @@ -0,0 +1,34 @@ +From: Ben Hutchings +Date: Thu, 22 Aug 2019 19:26:31 +0100 +Subject: powerpc: Avoid ABI change for disabling TM +Forwarded: not-needed + +Keep the TM state in struct paca_struct and struct thread_struct even +though we won't be using it any more. + +The KVM state structures will change, but we ignore ABI changes there +since they won't affect out-of-tree modules. + +--- +--- a/arch/powerpc/include/asm/paca.h ++++ b/arch/powerpc/include/asm/paca.h +@@ -173,7 +173,7 @@ struct paca_struct { + u8 pmcregs_in_use; /* pseries puts this in lppaca */ + #endif + u64 sprg_vdso; /* Saved user-visible sprg */ +-#ifdef CONFIG_PPC_TRANSACTIONAL_MEM ++#if 1 /* ifdef CONFIG_PPC_TRANSACTIONAL_MEM */ + u64 tm_scratch; /* TM scratch area for reclaim */ + #endif + +--- a/arch/powerpc/include/asm/processor.h ++++ b/arch/powerpc/include/asm/processor.h +@@ -293,7 +293,7 @@ struct thread_struct { + call or trap return */ + int used_spe; /* set if process has used spe */ + #endif /* CONFIG_SPE */ +-#ifdef CONFIG_PPC_TRANSACTIONAL_MEM ++#if 1 /* ifdef CONFIG_PPC_TRANSACTIONAL_MEM */ + u8 load_tm; + u64 tm_tfhar; /* Transaction fail handler addr */ + u64 tm_texasr; /* Transaction exception & summary */ diff --git a/debian/patches/series b/debian/patches/series index 5496f8b54..4cdbc4622 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -248,3 +248,4 @@ bugfix/arm64/huawei-taishan/0032-scsi-hisi_sas-Fix-NULL-pointer-dereference.patc bugfix/arm64/huawei-taishan/0033-scsi-hisi_sas-fix-calls-to-dma_set_mask_and_coherent.patch # ABI maintenance +debian/abi/powerpc-avoid-abi-change-for-disabling-tm.patch