Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6834789rwd; Tue, 6 Jun 2023 02:37:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6V1QDfdeccOu92WaZF4e/QOkCDEY9XeSUytNykavsDF3/LNDQoEBxKBuoR9ziy1ksFUjIW X-Received: by 2002:ad4:5dea:0:b0:5ea:d52:7042 with SMTP id jn10-20020ad45dea000000b005ea0d527042mr1629528qvb.31.1686044224187; Tue, 06 Jun 2023 02:37:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686044224; cv=none; d=google.com; s=arc-20160816; b=mxY2NyyU6HXgd0WdLs8B/W94471moK4rBdSd1tWkeuY72O/gRhzvmtcuDjd7A8/o6S T28tqKFX1Ls6XfPliSQfI71BPhmwp+X9VT8wMywNcuK9YLYnzjLvsE6iJsW90D35lOS2 ADoWC59Ox1nTYyLGAqqEacNoVnxZjzP+T+YNPPEgOYrL1ANAj7FhkBIHSUjvH1jiHVsZ fTC5J291M+N+34tp6u+2+KDAvkalZBA9Keoh9ywt3VdeBmqc211QOd9oKKeU/uJR0iX5 TLF8h7Ba1P4pkaEQVr1CNDkkxqO0Z3IrNzbQ5CYVvJD9uboK6Ub3fIp2X/w9chrtIZSF INgg== 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=+x5t6GJlEP2ImsimYhY3bzPrfrdsd3JKYraDAAf6r0Y=; b=lKUaRtTUA5xvrHCzGlJ/lyWEQzDvWVDITAu7mhP0eC5Pc+I+Xjp5MJ/J9oGOfLT7L0 CGrG8KF3FFpJgVFCFsbBkNgdlw1FrDcNCocKQD7GrrMY0X85F9NrTKVDsSMXX5qSK9sF 41JlxeYph3dsHH4TbWABX/ggPvGl7f4uhwsI/6lxF8ku+7H7ikCdtuvjdG/mUzXRk+K9 3cUInH3YVTyqXF1oQrjNbWnWkv6bcoGIRE7XBM0ErfiDxbqasRlIVqTvJkd2sRKLuiNt r6WZWeSY/jmwSe9IdrZEV0TZe6AxdGaTM8mDZSVgleJL1ngLrIuWqTsCD8rgcheiRrxf BRlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kDdLrmSV; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eo13-20020ad4594d000000b00628519b8242si552806qvb.350.2023.06.06.02.36.48; Tue, 06 Jun 2023 02:37:04 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=kDdLrmSV; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236272AbjFFIdv (ORCPT + 99 others); Tue, 6 Jun 2023 04:33:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236368AbjFFIdp (ORCPT ); Tue, 6 Jun 2023 04:33:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84D5D10CF; Tue, 6 Jun 2023 01:33:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C39F462EB2; Tue, 6 Jun 2023 08:33:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36F83C433D2; Tue, 6 Jun 2023 08:33:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686040390; bh=CdJanuObyG6+eqgZzEAO/tzXt5ffnMV7P2BI90Gcpvc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kDdLrmSV9LfBnHd6snA/yb5534Bi1rCnmciko+Wv+s54pvS01FOSuG8oGomb3XEjF o6VGAziPMDOLOqRZ0DcvPZp3DoRNa2+n5Px2fAZXp5CxsPR/VzvDjGKfRju/nwcOKR m8ME+enGbPrSbizmMatlEpanUWerodvKKre5xb/eFFvAe2YdMe1c0YAWosYQG6a7gP nUsEdgkTx+GBYi1hkyd7Xg0Bsem6vJR2pdGH8KnbPwyiQtU3uscr4cYsm1i/rZmQtN k5JsfuVPa7m4hfifY78MqNZdAo+YUkgbZdgNmzUNHXr4gr04iARmhZ5pJDI15UWV3o QZBgFaCqUtV5Q== From: Lorenzo Pieralisi To: kw@linux.com, Manivannan Sadhasivam Cc: Lorenzo Pieralisi , kishon@kernel.org, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] PCI: endpoint: epf-mhi: Fix the outbound window offset handling Date: Tue, 6 Jun 2023 10:33:04 +0200 Message-Id: <168604028639.57025.13332670969969616995.b4-ty@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230606074657.31622-1-manivannan.sadhasivam@linaro.org> References: <20230606074657.31622-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Tue, 06 Jun 2023 13:16:57 +0530, Manivannan Sadhasivam wrote: > __pci_epf_mhi_alloc_map() allocates and maps the PCI outbound window memory > to endpoint local memory. For taking care of alignment restrictions, the > caller needs to specify the address alignment offset. Currently, this > offset is not added to the allocated physical and virtual addresses before > returning from the function. > > But __pci_epf_mhi_unmap_free() function substracts the offset before > unmapping and freeing the memory, leading to incorrect unmap and free. > > [...] Squashed it with the commit it was fixing. Thanks, Lorenzo