From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 273BDC433EF for ; Fri, 1 Apr 2022 09:10:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4uPuGvDFUnVFALEP42+yLqzSKMm2JHsd8PbDqjChj9A=; b=PmfUsxSY4F0vME J8eLFoPJc02dQpUb8IWTiSaYqNk5Krcp3yj6LZ2w6ZwRatMkfudsGLdwSArEuMVCCqPUGiB+VjlJY R02YEbB78v3rnfotzduULWY/bpN5GyGA9GuE9nCOCLqpq8U54S1aSd5L7Vwvu/zCYjDAQK1iV0WLO y91+jfjpTFl2l1xZugLLD3l0mY9GK1PKdwyyorswx51S/7iGtBNyMYtqfRsDeV1DP+524uVrZ5TeV pm5Jla+uLzwBsPupM5E+eZ+SJz+8wOliMqUqn+S3fUCvvJ6VtKde5vT/CzIGZnokmv0j5U78fLF3h hTil6fwOTaI2yH13PySQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1naDHK-004zND-L3; Fri, 01 Apr 2022 09:09:10 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1naDHH-004zMb-9V; Fri, 01 Apr 2022 09:09:08 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id 44C50B8236D; Fri, 1 Apr 2022 09:09:05 +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-Disposition: inline In-Reply-To: <3162339.aeNJFYEL58@leap> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220401_020907_672097_6030FDCA X-CRM114-Status: GOOD ( 30.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Apr 01, 2022 at 10:07:36AM +0200, Fabio M. De Francesco wrote: > On mercoled=EC 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_ar= m.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 *pagelis= tinfo, > > if (head_bytes > actual) > > head_bytes =3D actual; > > = > > - memcpy((char *)kmap(pages[0]) + > > + memcpy_to_page(pages[0], > > pagelist->offset, > > fragments, > > head_bytes); > > - kunmap(pages[0]); > > } > > if ((actual >=3D 0) && (head_bytes < actual) && > > - (tail_bytes !=3D 0)) { > > - memcpy((char *)kmap(pages[num_pages - 1]) + > > - ((pagelist->offset + actual) & > > - (PAGE_SIZE - 1) & ~(g_cache_line_size - 1)), > > + (tail_bytes !=3D 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 =3D 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 wond= er > 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 :) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel