Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp9246303rwb; Thu, 24 Nov 2022 09:56:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf5CtReIaEHuRk6AfqSPo6MCIy/N7kT60tF0/2Mk59YLHYJdWZk4PEZnmDA7oAS4XhOihbGe X-Received: by 2002:a17:907:c208:b0:7ad:79c0:547a with SMTP id ti8-20020a170907c20800b007ad79c0547amr18553145ejc.41.1669312607824; Thu, 24 Nov 2022 09:56:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669312607; cv=none; d=google.com; s=arc-20160816; b=F+owdTlOccm3lAl0KbvKe6yjkUk8tFjHKlTTMZsS9ZAFUedQfrPYBDMcMchKa+1HMM m/jORBDAUFOsi/6vUmyQu2k/PBpvHwX0IQ2o3/FD3bN+GaPY7xuNEnGaNGLfvFSb38so rbbjyFx7dG1YCPMBrnZwsM/Vnigzi7JCQAFhKKjBpUNwhEbxNFyfQGf4jJN+Yl+C7IyG MhVZ8/IckWA1f3v4xPLlhNWUIecsqiatVQ2xGZZLRiVOpKhA1X4TXKe6dozMDXNe5gtT DxMgCIC2mlQdRwjpeVdEtu29p0cGoWVifbPI2c1n9jOs+gxZ6AfUALQg5o4kZFSk+Zr1 CFmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rylusfgUDpkkWgalnBLghu7kEy11PXXS0gvZ7chhswg=; b=WbPoJXiOG2satBDnCHpncahuaqt2EH8nTQ0g/GCDkGDDA6OMkLkkDchw628BHMUykc NYqmpQfGBpqRUdEtPYcAmmX4Cof8sRzEMGzULz/GX1v1yFIRh6jku2hUKjxL/3ZFQ5D5 Ndpo3xOoyJ4oZXhi0wM87vbZVYuwd+IZQ8BOZIi/ZqF/Cr9270P72jijVcE6iK3sHZ+X TgeV/21ea7xUGrRSbaVS584QaZRZbOPKvyPkk662pXygY9fCil2uELFOSsvYmpYf+rV3 IlvE8SG8ndaVxExPAHkOZVaNMV6d2qA41lWDBCSP5JaIiI9U/kdC77OEGqIuhxQAFoNA xlHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XPDXYp9K; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hp42-20020a1709073e2a00b0078db371355esi1399369ejc.987.2022.11.24.09.56.22; Thu, 24 Nov 2022 09:56:47 -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=@linaro.org header.s=google header.b=XPDXYp9K; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229613AbiKXRwW (ORCPT + 86 others); Thu, 24 Nov 2022 12:52:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229657AbiKXRvz (ORCPT ); Thu, 24 Nov 2022 12:51:55 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E00415B4F7 for ; Thu, 24 Nov 2022 09:51:52 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id bs21so3463261wrb.4 for ; Thu, 24 Nov 2022 09:51:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rylusfgUDpkkWgalnBLghu7kEy11PXXS0gvZ7chhswg=; b=XPDXYp9KiAJX835BXQlDYnHHGeXq/je8vdMyi6suSfk5joz+t4t3Hi30Uqhrs5LSMY ZtoieTiw+0jj5/harETzmyCF80lZt7CYCpwfWpBGEZR6rghIukacHhfWEvpKOn5iyJna XN5m9TDzeklaY52nPzYMLyANOTuGGWU86Y1RcoJ4Yg2a9JdM4o6jUVqVBkyJUV8lyLpb hnHJResQwXk0qcFzSht+0L5dJEpFEdr1bljA2QzFBEf8kmjV979hIT6Kb+/dNjfKEkn+ 47FHpwUDE3Fal69YeLagMO/96ZcmCCYgRQLpiBSGA8tie10+F1g0ONa3lh249vur0mKb qboA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rylusfgUDpkkWgalnBLghu7kEy11PXXS0gvZ7chhswg=; b=UNTmCcRYnR1UrK+lY42fD2ALTj4WbdEImi3yRYhuMchU5UDSxW8xRTO4Cgh7K5OjSX mMBxezkv83MSYZjmWOBmhqbM5ruR3CFzaB2zlkf6HQbrhwJJUJOvBMtwM95qPY4dpeXe loIUhI7lDctyvlE9b6nR5brQP1eGhqRmx9c7G6m4bulhXN53gIovmaLFVHd8LecDsNBR /6h2JytNBms+1Jca7aGKBFLJUqaYbhBwmHLrxDuKuF8v1TR4WineONE2oNiG0kxjloBe Q3Sv1mfv608VyHI8hVnd933/jR2eKqybjcshEpIK7G1E4riG7dwm6ai/obIj07txxbgT 2xfA== X-Gm-Message-State: ANoB5pmojEP8A1L1mjhEjQ8PAkTl2y0apbEm68ZlCyKVQomPM3Hh9Dyu Bar2vAsNRh26w4Mm67f+uiSkxve1l3hIvw== X-Received: by 2002:adf:dc02:0:b0:236:77f4:6e19 with SMTP id t2-20020adfdc02000000b0023677f46e19mr21398695wri.638.1669312311888; Thu, 24 Nov 2022 09:51:51 -0800 (PST) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id bi8-20020a05600c3d8800b003c701c12a17sm6394192wmb.12.2022.11.24.09.51.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Nov 2022 09:51:51 -0800 (PST) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Abel Vesa , Srinivas Kandagatla Subject: [PATCH 11/11] misc: fastrpc: Add dma_mask to fastrpc_channel_ctx Date: Thu, 24 Nov 2022 17:51:25 +0000 Message-Id: <20221124175125.418702-12-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221124175125.418702-1-srinivas.kandagatla@linaro.org> References: <20221124175125.418702-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 From: Abel Vesa dma_set_mask_and_coherent only updates the mask to which the device dma_mask pointer points to. Add a dma_mask to the channel ctx and set the device dma_mask to point to that, otherwise the dma_set_mask will return an error and the dma_set_coherent_mask will be skipped too. Signed-off-by: Abel Vesa Co-developed-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla --- drivers/misc/fastrpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index d3147e4313cc..9ddcaa4def06 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -279,6 +279,7 @@ struct fastrpc_channel_ctx { struct list_head invoke_interrupted_mmaps; bool secure; bool unsigned_support; + u64 dma_mask; }; struct fastrpc_device { @@ -2309,6 +2310,7 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev) kref_init(&data->refcount); dev_set_drvdata(&rpdev->dev, data); + rdev->dma_mask = &data->dma_mask; dma_set_mask_and_coherent(rdev, DMA_BIT_MASK(32)); INIT_LIST_HEAD(&data->users); INIT_LIST_HEAD(&data->invoke_interrupted_mmaps); -- 2.25.1