From: <gregkh@linuxfoundation.org>
To: nacc@linux.vnet.ibm.com, gregkh@linuxfoundation.org,
jstancek@redhat.com, mpe@ellerman.id.au
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "powerpc/powernv/pci-ioda: fix kdump with non-power-of-2 crashkernel=" has been added to the 4.2-stable tree
Date: Tue, 22 Sep 2015 21:59:39 -0700 [thread overview]
Message-ID: <144298437920932@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
powerpc/powernv/pci-ioda: fix kdump with non-power-of-2 crashkernel=
to the 4.2-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
powerpc-powernv-pci-ioda-fix-kdump-with-non-power-of-2-crashkernel.patch
and it can be found in the queue-4.2 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From fa14486979b3a47307bcdb10f8b5baa875a5cf68 Mon Sep 17 00:00:00 2001
From: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
Date: Fri, 4 Sep 2015 11:22:52 -0700
Subject: powerpc/powernv/pci-ioda: fix kdump with non-power-of-2 crashkernel=
From: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
commit fa14486979b3a47307bcdb10f8b5baa875a5cf68 upstream.
The 32-bit TCE table initialization relies on the DMA window having a
size equal to a power of 2 (and checks for it explicitly). But
crashkernel= has no constraint that requires a power-of-2 be specified.
This causes the kdump kernel to fail to boot as none of the PCI devices
(including the disk controller) are successfully initialized.
After this change, the PCI devices successfully set up the 32-bit TCE
table and kdump succeeds.
Fixes: aca6913f5551 ("powerpc/powernv/ioda2: Introduce helpers to allocate TCE pages")
Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
Tested-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/platforms/powernv/pci-ioda.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -2079,12 +2079,18 @@ static long pnv_pci_ioda2_setup_default_
long rc;
/*
+ * crashkernel= specifies the kdump kernel's maximum memory at
+ * some offset and there is no guaranteed the result is a power
+ * of 2, which will cause errors later.
+ */
+ const u64 max_memory = __rounddown_pow_of_two(memory_hotplug_max());
+
+ /*
* In memory constrained environments, e.g. kdump kernel, the
* DMA window can be larger than available memory, which will
* cause errors later.
*/
- const u64 window_size = min((u64)pe->table_group.tce32_size,
- memory_hotplug_max());
+ const u64 window_size = min((u64)pe->table_group.tce32_size, max_memory);
rc = pnv_pci_ioda2_create_table(&pe->table_group, 0,
IOMMU_PAGE_SHIFT_4K,
Patches currently in stable-queue which might be from nacc@linux.vnet.ibm.com are
queue-4.2/powerpc-powernv-pci-ioda-fix-kdump-with-non-power-of-2-crashkernel.patch
queue-4.2/powerpc-powernv-pci-ioda-fix-32-bit-tce-table-init-in-kdump-kernel.patch
reply other threads:[~2015-09-23 4:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=144298437920932@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=jstancek@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=nacc@linux.vnet.ibm.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.