From patchwork Sat Jan 7 04:41:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geetha sowjanya X-Patchwork-Id: 40312 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1165158wrt; Fri, 6 Jan 2023 21:16:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXsPX3sxDla2Y9PmldVZF9LfKbatPib+KZxSNHo+hQ5A/9RDCU5TlcUbt0zLinUPqUxAUGDB X-Received: by 2002:a17:903:3251:b0:193:211:fb33 with SMTP id ji17-20020a170903325100b001930211fb33mr7492289plb.35.1673068562754; Fri, 06 Jan 2023 21:16:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673068562; cv=none; d=google.com; s=arc-20160816; b=brL6+O+fKXGKE9nMDMiLr47alQxNo14uyOIfFSds4yTOubD2kQmgv+CCTgf92/Eb3B qaGGxCM3hj15FABQPPpW3Z8pNZVcc8ttOkV6+SoCzYfegf/YZ1bY047xXcqiyYcrBaiM 9iidIDC0Yv168D0VPb/5ZfbLZESWoa+P+JRtjqnmccr1HKlJ9Uh4AuQucaBrr6v3qfru ADa4aYKNiFpD9aEj2S4QUwXR8RzphkbHI9WfLERR7S2H2fnf0WeibawUbpMPo6N57h2u 1nZxt9erAaJUTKGODLKKjHBji5Voj09HRtpCSt9YiCmptLOY46/tzjPlU2xL064ZEh7K ZctQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=BVxoW8PmXFMv3h+4qTBfZny95ISCtWzgZuWh5HvWCfM=; b=dy76r+B2SrUaRsB2xBM2J4WAWDzKyZhEnXLW0tHaIc8hbN01NL/ntX8EFHaxvAJWq5 /GjLJ7rTRlUb62NkiVOT0rdGXAd3R3Ce8xFsQybEm1iOqLn3cMt6D5DcaBXb4U0CvB6Y DI3AaBHBsIJId3hIZjEnr74DEq3IsVbHe5ZRGjd/75pO5AMz3dbpb5pTjI4ebhmNfHiG wsLdQA/EcAckNpF1kMnxvvOZON+dwXbnJKYhvk8IwsgjHzVZUwGvRQlejs2u33MRiMBc 6LswdlMYOBLrrxMtPxP+mLl1AohN9ZFLYAqDIBMtlQNKuV0FMsSRTgazoYEgHYHGToUK i1Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=Xbs5d+9y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a639247000000b004915c5ca6b1si2957580pgn.866.2023.01.06.21.15.48; Fri, 06 Jan 2023 21:16:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=Xbs5d+9y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236693AbjAGEmC (ORCPT + 99 others); Fri, 6 Jan 2023 23:42:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjAGEl4 (ORCPT ); Fri, 6 Jan 2023 23:41:56 -0500 Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AA7684635; Fri, 6 Jan 2023 20:41:56 -0800 (PST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3072vWtZ003726; Fri, 6 Jan 2023 20:41:45 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0220; bh=BVxoW8PmXFMv3h+4qTBfZny95ISCtWzgZuWh5HvWCfM=; b=Xbs5d+9ytUe6Agj6Tue9c4UDHCAhdNc30SYEDcwbQIDNTJLXXdew1XNx69H4Oj+hKIIz anZXwCOtNshZ3ES/GP1B8D3jTR7t1G/jaidDf5UcFloAPl8shj0FGTx7aZ3ruIdIIYa2 la1AggW241uAtz7tEvQDb0WgrfFsnhfKMays3CKq/ffZ924lJFWHPMo24axLgoSzRpkH q+4kAdpYIgx9EtJOp/vW/cUfav+I9uGmHixDVq7s9jzcxoEi4iE3uaBncDFSNJCwShsk 0LYArjDdEFY+aQu18GUaPD+ONCFozcUN2LaJXVBqjrQai/U2sOlBbdFbYSuBHYVsaYw3 6Q== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3mx4hhbf6p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 06 Jan 2023 20:41:45 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 6 Jan 2023 20:41:43 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.42 via Frontend Transport; Fri, 6 Jan 2023 20:41:43 -0800 Received: from hyd1soter3.marvell.com (unknown [10.29.37.12]) by maili.marvell.com (Postfix) with ESMTP id 4084B5B72F4; Fri, 6 Jan 2023 20:41:40 -0800 (PST) From: Geetha sowjanya To: , CC: , , , , , , , Subject: [net PATCH] octeontx2-pf: Use GFP_ATOMIC in atomic context Date: Sat, 7 Jan 2023 10:11:39 +0530 Message-ID: <20230107044139.25787-1-gakula@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Proofpoint-GUID: O1jxXlW2LUljYUlLuwIwi4j2VulCaoBy X-Proofpoint-ORIG-GUID: O1jxXlW2LUljYUlLuwIwi4j2VulCaoBy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-06_14,2023-01-06_01,2022-06-22_01 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754339541419934075?= X-GMAIL-MSGID: =?utf-8?q?1754339541419934075?= Use GFP_ATOMIC flag instead of GFP_KERNEL while allocating memory in atomic context. Fixes: 4af1b64f80fb ("octeontx2-pf: Fix lmtst ID used in aura free") Signed-off-by: Sunil Goutham Signed-off-by: Geetha sowjanya --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c index 88f8772a61cd..12e4365d53df 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c @@ -886,7 +886,7 @@ static int otx2_sq_init(struct otx2_nic *pfvf, u16 qidx, u16 sqb_aura) } sq->sqe_base = sq->sqe->base; - sq->sg = kcalloc(qset->sqe_cnt, sizeof(struct sg_list), GFP_KERNEL); + sq->sg = kcalloc(qset->sqe_cnt, sizeof(struct sg_list), GFP_ATOMIC); if (!sq->sg) return -ENOMEM; @@ -1378,7 +1378,7 @@ int otx2_sq_aura_pool_init(struct otx2_nic *pfvf) sq = &qset->sq[qidx]; sq->sqb_count = 0; - sq->sqb_ptrs = kcalloc(num_sqbs, sizeof(*sq->sqb_ptrs), GFP_KERNEL); + sq->sqb_ptrs = kcalloc(num_sqbs, sizeof(*sq->sqb_ptrs), GFP_ATOMIC); if (!sq->sqb_ptrs) { err = -ENOMEM; goto err_mem;