Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2661285rwd; Wed, 14 Jun 2023 06:02:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7s+ep8Le94vbd5/80/wKRQ6jn7Vozp5aeQr7DiWXCwBYYo1IktPceqcb8Nnbbt1rCsApmd X-Received: by 2002:aa7:c489:0:b0:516:459d:d912 with SMTP id m9-20020aa7c489000000b00516459dd912mr8743629edq.28.1686747752857; Wed, 14 Jun 2023 06:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686747752; cv=none; d=google.com; s=arc-20160816; b=sI7T4O0V2RL5mOv3Vo342H87MPdbv3qE6OvKgyDtTlu4fHviREy0TAobWafKdcViZZ LkTb6Q1mI1kJpELdkvO7nFZbKHy5AZfSAIxeUPg0Fj+bpDS2MDXLn4i55Kif8V1P//NA Xwcsrun1G6555X2dI6z8k4VNQNrPw65lRDjmamN5BJJmvglAmLoK6CRckODirguSFnov LDqcqbVGDtYrAyAqn5U6fbE9k8CUwoil2Hq8lovDV28Ip9kTORRi5sug6x6IwKNsFFHv 1Ql6gcaF4mgOYKubwC6KRdZHJbYz0qRrOHvM5J+oI/cFHRodzo5nNBRYtq6g/H0DtcSp WX7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=4e+Pwp+021TOiqEOI55JQb3RjMEOtcdSeHsod/nYw0o=; b=F/0ylTvUBLI0/2VF8APdw5ipUgd9K/IY/mmNlx7yeLn4x1LxNh4JldDilv4grvuiho piX+nea0TEOnpCUrVfKY1AYTcs+mllAI49u6T37xsdnnjVIfbCs9XN7OldMLuTz7eR8c DZrsVn36UlRcl2kk4275C7Z8DpiZWs41doiuYwjpj5yqIJOnbDuk8bw0KL3Oe/4LAwl4 yVCdZTa3IBo2fx7OzTvEZQjhkzloT7fWVBrX9O3Nu8afpBe6ahSZSvfvzPdFK4YUODG9 aBtoTu9v4jWvoFqGE1g6IXxb0DFeYvKs8U3yz26r3+C31dc4VyRscilC7KzPbPxnwFOA CAaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=V+SK9acd; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q8-20020a17090622c800b0098280c74884si497677eja.437.2023.06.14.06.01.54; Wed, 14 Jun 2023 06:02:32 -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=@gmail.com header.s=20221208 header.b=V+SK9acd; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244645AbjFNMgZ (ORCPT + 99 others); Wed, 14 Jun 2023 08:36:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236094AbjFNMgV (ORCPT ); Wed, 14 Jun 2023 08:36:21 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCFD61FD0 for ; Wed, 14 Jun 2023 05:36:05 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-6537d2a8c20so5259126b3a.2 for ; Wed, 14 Jun 2023 05:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686746165; x=1689338165; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=4e+Pwp+021TOiqEOI55JQb3RjMEOtcdSeHsod/nYw0o=; b=V+SK9acdDTnYBrQKZHF8LeRsGMn16ZHTwKjr6/V6NkXCuBoLLzDUu2M0Nfa+OFigNK V4mQFdEHDLPFNGAHcke1u4x7oi0gwn+8sSer3mbHXMTPH4KzJ9EHm7s6O7S8YuK2HChJ /3Z/Ndb5PEZlD/1RlJPV63dLNOflrGTYfxFYmOhTgJ6/K7qwLvsbI1BmE0URxNHCVRXo 9R2P0rV1z6rLJ6IfG7arZAz9VmdPMFRQ6xpVawkJQ1w+PTLcc2T9pMQa4lhz4V2yo/EW +EQhBPpZFjsn/mbRUj0tN2+wlhbExNE2qB0PJFzysg1AAEeDMpDC6NSsKLyfXZ0iDzEN VSnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686746165; x=1689338165; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4e+Pwp+021TOiqEOI55JQb3RjMEOtcdSeHsod/nYw0o=; b=iwIRPccOd1bO2emSTAa89Ztv2tdyuWkndp+XF9DwqN1DWozq4okjOOuI1rUg3FkYeW LmYBy86qxue9JkExOxcjia/5zsQsWEE/J+bMHrvcMN+tmtZXd5fBfFi5IXibmJvOY0O1 lPrhau9GqrThAHUhjAWAyo8ZBO8Dy/+hCxBgkeKii/tnWbcEkSbxTG9t8ssWbk1TYmqT r+YqxiXcRZZ53Dn69gInDR0aBRx+YMX7oFpHmCQBy1y8hPmFxYUiYrNdUcrfA5frQddo tKq0FlmxrnF8Gey1yoOWG+S7N7HNTiIvHbFgEulFuBT2YEduX7mr3aHLa0fHw8lXZWix kBRw== X-Gm-Message-State: AC+VfDwtDQfSxPB1kGzdg4Sva5kkFjaizlaHAMe3FeNOMVztoZrv9D3I UNx8GCu25kh89WSYWdpJ5Ec= X-Received: by 2002:a05:6a00:2352:b0:665:bd58:c948 with SMTP id j18-20020a056a00235200b00665bd58c948mr2301728pfj.8.1686746164598; Wed, 14 Jun 2023 05:36:04 -0700 (PDT) Received: from sumitra.com ([117.245.169.18]) by smtp.gmail.com with ESMTPSA id j1-20020aa78001000000b00634dde2992bsm10250199pfi.132.2023.06.14.05.35.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 05:36:04 -0700 (PDT) Date: Wed, 14 Jun 2023 05:35:56 -0700 From: Sumitra Sharma To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Ira Weiny , Fabio , Deepak R Varma , Sumitra Sharma Subject: [PATCH] drm/i915: Call page_address() on page acquired with GFP_KERNEL flag Message-ID: <20230614123556.GA381200@sumitra.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Pages allocated with GFP_KERNEL cannot come from Highmem. That is why there is no need to call kmap() on them. Therefore, don't call kmap() on the page coming from vma_res->bi.pages using for_each_sgt_page() in i915_vma_coredump_create(). Use a plain page_address() to get the kernel address instead. Signed-off-by: Sumitra Sharma --- drivers/gpu/drm/i915/i915_gpu_error.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index f020c0086fbc..6f51cb4fc55c 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -1164,9 +1164,8 @@ i915_vma_coredump_create(const struct intel_gt *gt, drm_clflush_pages(&page, 1); - s = kmap(page); + s = page_address(page); ret = compress_page(compress, s, dst, false); - kunmap(page); drm_clflush_pages(&page, 1); -- 2.25.1