From patchwork Mon Oct 17 09:37:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhao Liu X-Patchwork-Id: 201 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1355303wrs; Mon, 17 Oct 2022 02:43:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6nJLmLBoihAg53HdeM190RJ/SRH7XNiVEXHpUrVnYoqj8o/WgsWQV7QLlHEx6c0i1p5lox X-Received: by 2002:a17:903:2c9:b0:182:c500:d93d with SMTP id s9-20020a17090302c900b00182c500d93dmr11324115plk.44.1665999832659; Mon, 17 Oct 2022 02:43:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665999832; cv=none; d=google.com; s=arc-20160816; b=Xvnhc7eVhBSkbe6U9UFCBARq9F781sdtCbLNDZ4253k/usVlxZOkJvgnFzOqvoVMOW F4dKMgXoqfz28IcdiThf4xm6M4fVO5FOm9TVh+ZeDXnS21M2zrd9RV5D68CjFMBblGY0 T8Dk58DwH/g1JxbkS94P7+LH1QK23mFJd7CESQ6/4Y/NrknJIbphw+JZLbwbl96KUOeH kfTsUHj4MgHcS+zbhumU8oMmY5b7X/GIFrjvIwZVevGrcCsRN0SjhPVOO5RI3dOf8GXD rgYT2Ea2DgjJBIDn0aPByahBhiL1qJETfl+Zkl7slBU/X82JUjGBFvAc+sKvImnY1Iiq bOGg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=uei0l8upO60NrsS563E6DY8NcUAZTlGT3Z5V/PfZgLI=; b=MeJYnRkxIO8EGbDd/X1l6kafFaaFfLEPwAUXNuKmOGHPeYk0DTAxdcrPWyNCz/6yBm QdBUaCU9r5LigdFjqNKW4kOjL1UkAOjqx9Ivyxejt8k0K1Hp8ojycSe9v0aicVe5ZW+a mtBlS6xS0PjZVSKKwKqpsEJUd/LT9eF2Is0DVOP/U/lndA3e1CiWe+aIDwW4BGXmeO5S QaTtkZYrnvywaa1fl0xfTwCzQHavMPuSMFVraMG3XbtpYLVLFik5w65bW+ofngzuYn30 xGVc65d7HeK8PC13BHpkmOnGZZ1I8JALyWCkKBOkJ/E39bonCJNLH+5PFLn8kBVfABRa JDJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=b7x7iaPy; 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=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lw14-20020a17090b180e00b0020a6c8b4634si19866684pjb.153.2022.10.17.02.43.40; Mon, 17 Oct 2022 02:43:52 -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=@intel.com header.s=Intel header.b=b7x7iaPy; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231238AbiJQJcb (ORCPT + 99 others); Mon, 17 Oct 2022 05:32:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbiJQJc0 (ORCPT ); Mon, 17 Oct 2022 05:32:26 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E345347BAB for ; Mon, 17 Oct 2022 02:32:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665999143; x=1697535143; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=6ZU9PDhvVYa7AEOd0lamaGEe6sVuaqOTNJI83nJvfl8=; b=b7x7iaPyCtJSx9+o7AlKF5xK3Px7Gx7jozLoPsXofnr6plHJ4JRBXlaB QGQTYq0WMp8LQJ/It5058aZ5u0jiTOEFJuZVUoxogoRUY39Vgq4o+uO4u glZWzySRegqEkLDjQ7innXAUMcNeJ+Nl+uikWQ9FRrpDmb6Vx7jx3xA16 bbtedNMVAe6eQzEumktyJQuvwVlewAoyGf77Zlpx8RKAen5caVX1BAlcL X0Ng7SgdB2q66DexGPvTp/UZmKxvZPeLSoI/JOt7vVm1bw09wiryHxlpu UBQvD1cTZj5PWf48B3AQjUw1uy/y/Z0Hz2ylEyZFewBK0tvuxnEKvpVQS g==; X-IronPort-AV: E=McAfee;i="6500,9779,10502"; a="305741538" X-IronPort-AV: E=Sophos;i="5.95,191,1661842800"; d="scan'208";a="305741538" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2022 02:32:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10502"; a="717431199" X-IronPort-AV: E=Sophos;i="5.95,191,1661842800"; d="scan'208";a="717431199" Received: from liuzhao-optiplex-7080.sh.intel.com ([10.239.160.132]) by FMSMGA003.fm.intel.com with ESMTP; 17 Oct 2022 02:32:19 -0700 From: Zhao Liu To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Matthew Auld , =?utf-8?q?Thomas_Hellstr=C3=B6m?= , Nirmoy Das , Maarten Lankhorst , Chris Wilson , =?utf-8?q?Christian_K=C3=B6nig?= , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Ira Weiny , "Fabio M . De Francesco" , Zhenyu Wang , Zhao Liu Subject: [PATCH 0/9] drm/i915: Replace kmap_atomic() with kmap_local_page() Date: Mon, 17 Oct 2022 17:37:16 +0800 Message-Id: <20221017093726.2070674-1-zhao1.liu@linux.intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746927440775777452?= X-GMAIL-MSGID: =?utf-8?q?1746927440775777452?= From: Zhao Liu The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1]. In the following patches, we can convert the calls of kmap_atomic() / kunmap_atomic() to kmap_local_page() / kunmap_local(), which can instead do the mapping / unmapping regardless of the context. With kmap_local_page(), the mapping is per thread, CPU local and not globally visible. [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.weiny@intel.com --- Zhao Liu (9): drm/i915: Use kmap_local_page() in gem/i915_gem_object.c drm/i915: Use kmap_local_page() in gem/i915_gem_pyhs.c drm/i915: Use kmap_local_page() in gem/i915_gem_shmem.c drm/i915: Use kmap_local_page() in gem/selftests/huge_pages.c drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_coherency.c drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_context.c drm/i915: Use memcpy_from_page() in gt/uc/intel_uc_fw.c drm/i915: Use kmap_local_page() in i915_cmd_parser.c drm/i915: Use kmap_local_page() in gem/i915_gem_execbuffer.c drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 10 +++++----- drivers/gpu/drm/i915/gem/i915_gem_object.c | 8 +++----- drivers/gpu/drm/i915/gem/i915_gem_phys.c | 8 ++++---- drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 6 ++++-- drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 6 +++--- .../gpu/drm/i915/gem/selftests/i915_gem_coherency.c | 12 ++++-------- .../gpu/drm/i915/gem/selftests/i915_gem_context.c | 8 ++++---- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 5 +---- drivers/gpu/drm/i915/i915_cmd_parser.c | 4 ++-- 9 files changed, 30 insertions(+), 37 deletions(-)