Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1133575pxb; Fri, 1 Apr 2022 05:36:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLBoRQ3tut18kCcCSSwNt1sv15/1YUdWVjMkGaFnymO48tgGk5FCHPMhK4EznLwBBqd2Dz X-Received: by 2002:a63:eb51:0:b0:382:53c4:bb66 with SMTP id b17-20020a63eb51000000b0038253c4bb66mr15035391pgk.540.1648816600585; Fri, 01 Apr 2022 05:36:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648816600; cv=none; d=google.com; s=arc-20160816; b=UVA/+uALL+sQsy9EKJFkLQeGQ9QwArq45GGKUns4vfqTgH1qMZHkEUcQI4ssgRM0K7 ZAiNTg/nQGabfJnYRR0lgl2H0j12RZzkkp8X4dKX61ItE2MrsQzCt7OzREeE83QMELzj YGTujlSxW6Fg/yz+v72ssZzNVJdy+UWnnartMVWi3C8fQb5BsNVT9zX35fYYQZGqlksZ pQ9jhhJZPghYIEWOVvqI3kVDMxMLMhqKlOkCds0RuoLPmu2OfbSUFJwpSOpQKMHw6mEW FsqHhkwyXq+degb0iuj2ESVg4or4Hat+0ewS7FltpnOlOcLIIPciTGvBV71tjIyZmbg0 2rsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=6tr9X86uO9FxB+Yq9wvdcI8gWxWv/TEjIqUIFamOVOw=; b=cJOjKPAQ2vWBA1cKhSlL87njB6vdgr5Dr5qS5QtQdSx1TV6iHI/7wxJnJVwn//EsKf ixiUgnYpLe+88fRm42e8O7M+Gk6dcTlraJHZVeAW/KympvlqoLsEyXOHYdka9a9C9QGV J7BFMKskLzUNtqluIjuf1PkR8VdbNCmP9yvcoA8bD3r9MIqOl4qxUxbOQjpMesvYUOR6 51PCPztFiQh+Wc9xSbsE+/+aGLCM2A5k4Ur0Zei17dhQc9lnJ+9FCeqflz2zMytFaxit fX+nBj/p8DWm9oT0dnf2wInjMMZpANMe62YN+5M8EekOvU/N2wHm4KL0515XLSmwzNCX 25mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="q/KGEFkj"; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b17-20020a170902e95100b001565a006f53si2078035pll.404.2022.04.01.05.36.23; Fri, 01 Apr 2022 05:36:40 -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=@linuxfoundation.org header.s=korg header.b="q/KGEFkj"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344326AbiDAJK6 (ORCPT + 99 others); Fri, 1 Apr 2022 05:10:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344322AbiDAJKz (ORCPT ); Fri, 1 Apr 2022 05:10:55 -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 C8B9D11862B for ; Fri, 1 Apr 2022 02:09:05 -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 84BB460AC0 for ; Fri, 1 Apr 2022 09:09:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A24CC2BBE4; Fri, 1 Apr 2022 09:09:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1648804143; bh=MOGtfJobPi0ZSab1gabpQOfmpSETqgpVKmTH8A1H2PQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q/KGEFkj9oWQynZ+Z20+nsb5t/AJ5qsXg1sK+TUpusQF3ymkYnD/WUq1ZDMqkFUSK dc7I0WMpI26Dr3z/gqLcy0ll4A1LnWjY/4gbLcoTGnCGBnxP9KLI6EkmU9khutZZGl zldgmY7TCprnpG7K7ez+Gy22oCfZ+VXmPSIyjFoE= Date: Fri, 1 Apr 2022 11:09:00 +0200 From: Greg Kroah-Hartman To: "Fabio M. De Francesco" Cc: Nicolas Saenz Julienne , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, ira.weiny@intel.com, outreachy@lists.linux.dev Subject: Re: [PATCH] staging: vc04_services: Convert kmap() to kmap_local_page() Message-ID: References: <20220330191414.23141-1-fmdefrancesco@gmail.com> <3162339.aeNJFYEL58@leap> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3162339.aeNJFYEL58@leap> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Fri, Apr 01, 2022 at 10:07:36AM +0200, Fabio M. De Francesco wrote: > On mercoled? 30 marzo 2022 21:14:14 CEST Fabio M. De Francesco wrote: > > The use of kmap() is being deprecated in favor of kmap_local_page() > > where it is feasible. In file interface/vchiq_arm/vchiq_arm.c, > > function free_pagelist() calls kmap() / kunmap() from two places. > > > > With kmap_local_page(), the mapping is per thread, CPU local and not > > globally visible. Therefore, free_pagelist() is a function where the > > use of kmap_local_page() in place of kmap() is correctly suited. > > > > Convert to kmap_local_page() but, instead of open coding it, use the > > memcpy_to_page() helper. > > > > Signed-off-by: Fabio M. De Francesco > > --- > > .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 13 +++++-------- > > 1 file changed, 5 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > > index f0bfacfdea80..efb1383b5218 100644 > > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > > @@ -431,21 +431,18 @@ free_pagelist(struct vchiq_pagelist_info *pagelistinfo, > > if (head_bytes > actual) > > head_bytes = actual; > > > > - memcpy((char *)kmap(pages[0]) + > > + memcpy_to_page(pages[0], > > pagelist->offset, > > fragments, > > head_bytes); > > - kunmap(pages[0]); > > } > > if ((actual >= 0) && (head_bytes < actual) && > > - (tail_bytes != 0)) { > > - memcpy((char *)kmap(pages[num_pages - 1]) + > > - ((pagelist->offset + actual) & > > - (PAGE_SIZE - 1) & ~(g_cache_line_size - 1)), > > + (tail_bytes != 0)) > > + memcpy_to_page(pages[num_pages - 1], > > + (pagelist->offset + actual) & > > + (PAGE_SIZE - 1) & ~(g_cache_line_size - 1), > > fragments + g_cache_line_size, > > tail_bytes); > > - kunmap(pages[num_pages - 1]); > > - } > > > > down(&g_free_fragments_mutex); > > *(char **)fragments = g_free_fragments; > > -- > > 2.34.1 > > > Hi Greg, > > I've just received a message from you that says that a patch that I sent > on March 31 has been applied to staging testing. I know that you usually > apply patches in first come first served fashion (FIFO), therefore I wonder > why this patch has not yet been applied. > > Please don't misunderstand me: I have no hurry. I'm asking only because > I suspect that this patch, sent on March 30th) could have been overlooked > since it has the very identical subject of another patch that I sent on > the same day (or the day before, I'm not sure about it now) and which has > already been applied. Therefore, they may appear to be the same patch, > because the only difference is that the drivers are different. I wanted to give others the chance to review this before applying it :)