mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
qed: Limit msix vectors in kdump kernel to the minimum required count.
[ Upstream commitbb7858ba11] Memory size is limited in the kdump kernel environment. Allocation of more msix-vectors (or queues) consumes few tens of MBs of memory, which might lead to the kdump kernel failure. This patch adds changes to limit the number of MSI-X vectors in kdump kernel to minimum required value (i.e., 2 per engine). Fixes:fe56b9e6a("qed: Add module with basic common support") Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com> Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Chris
parent
da42aa657c
commit
e711bf3fa1
@@ -23,6 +23,7 @@
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/qed/qed_if.h>
|
||||
#include <linux/qed/qed_ll2_if.h>
|
||||
#include <linux/crash_dump.h>
|
||||
|
||||
#include "qed.h"
|
||||
#include "qed_sriov.h"
|
||||
@@ -701,6 +702,14 @@ static int qed_slowpath_setup_int(struct qed_dev *cdev,
|
||||
/* We want a minimum of one slowpath and one fastpath vector per hwfn */
|
||||
cdev->int_params.in.min_msix_cnt = cdev->num_hwfns * 2;
|
||||
|
||||
if (is_kdump_kernel()) {
|
||||
DP_INFO(cdev,
|
||||
"Kdump kernel: Limit the max number of requested MSI-X vectors to %hd\n",
|
||||
cdev->int_params.in.min_msix_cnt);
|
||||
cdev->int_params.in.num_vectors =
|
||||
cdev->int_params.in.min_msix_cnt;
|
||||
}
|
||||
|
||||
rc = qed_set_int_mode(cdev, false);
|
||||
if (rc) {
|
||||
DP_ERR(cdev, "qed_slowpath_setup_int ERR\n");
|
||||
|
||||
Reference in New Issue
Block a user