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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6692C433EF for ; Sun, 10 Jul 2022 10:24:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229545AbiGJKYw (ORCPT ); Sun, 10 Jul 2022 06:24:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbiGJKYu (ORCPT ); Sun, 10 Jul 2022 06:24:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92680101F4 for ; Sun, 10 Jul 2022 03:24:49 -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 ams.source.kernel.org (Postfix) with ESMTPS id 2F2B3B80A2A for ; Sun, 10 Jul 2022 10:24:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 658B4C3411E; Sun, 10 Jul 2022 10:24:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657448686; bh=w7m3jDJj+v364kHW38aSZuC7EI6ALLFCYEuyEhaKXM4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y6LiU1gkY8U/MdYzfZYfZgeUR63DckW5+YfN89+2AqO43Il3UXalmmOyaGvbDz+BM nvZg+cDq/zhKx5O1za5vLP22XnJ8mJIhik+2qplliaHEubwL+Xan0sPHi+9yQ7IyO2 KsjhRSY55Px/MJdTXSBQDCjWWiapm4JDijoys6Kg= Date: Sun, 10 Jul 2022 12:24:41 +0200 From: Greg Kroah-Hartman To: "Fabio M. De Francesco" Cc: Luis Chamberlain , Russ Weight , "Rafael J. Wysocki" , Nick Terrell , linux-kernel@vger.kernel.org, Ira Weiny Subject: Re: [PATCH] firmware_loader: Replace kmap() with kmap_local_page() Message-ID: References: <20220710101156.26139-1-fmdefrancesco@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220710101156.26139-1-fmdefrancesco@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 10, 2022 at 12:11:56PM +0200, Fabio M. De Francesco wrote: > The use of kmap() is being deprecated in favor of kmap_local_page(). > > With kmap_local_page() the mappings are per thread, CPU local, can take > page faults, and can be called from any context (including interrupts). But that is not the case here for this kmap() instance? If this is a simple search/replace, why is this not just done once and be done with it? > Call kmap_local_page() in firmware_loader wherever kmap() is currently > used. In firmware_rw() use the copy_{from,to}_page() helpers instead of > open coding the local mappings plus memcpy(). Isn't that just a different cleanup than the kmap() change? Or is that tied to the fact that the other buffer is now allocated with kmap_local_page() instead of kmap()? > Suggested-by: Ira Weiny > Signed-off-by: Fabio M. De Francesco > --- > drivers/base/firmware_loader/main.c | 4 ++-- > drivers/base/firmware_loader/sysfs.c | 9 ++++----- > 2 files changed, 6 insertions(+), 7 deletions(-) Did you run this through the firmware test framework? thanks, greg k-h