Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3350227rwl; Fri, 6 Jan 2023 21:16:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXuB85++aSS4U4xGFN80QG5FSuTMGFioaYrUulU1ymLUaJ+/O3GpRjrOyK61z2Cka2zQrA6Z X-Received: by 2002:a05:6a21:6da7:b0:a3:22f3:27ca with SMTP id wl39-20020a056a216da700b000a322f327camr89304190pzb.56.1673068594990; Fri, 06 Jan 2023 21:16:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673068594; cv=none; d=google.com; s=arc-20160816; b=TyoynH0zTZROxAwVeJ2FmWpyREke+r/T+uvh7HBmZpjptHe7NsrPaHMncm3OD6aGLa pHaf/wDgmMHjafRw+BeBf1yFiCKDAflGcVmVzI8LPQqkDb/yg5o7MoTERjPe00XGirGj 1O2x+NKleDQ2MBPunKTKVXZ7Q7bReCxmPrCT/N5Z9uBCf1pZ+Omuu8Af0ddBSyEsa3yz iftzEEH0OHNGzq/6ONb4QCNvYX6DI9pU1qisXXSWMWlcYIrQesCcjYlhuQV6rCAidZUR emF3FSPk60HSo+yX2zL4h/ycmsu3xyeL8IBBVfCbY5sXiRjH3B2UOL9b+pWPSY3k9j/6 RyGA== 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 Return-Path: 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.16.27; Fri, 06 Jan 2023 21:16:34 -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 + 55 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 Content-Type: text/plain 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 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; -- 2.25.1