Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp884481pxb; Thu, 21 Oct 2021 11:18:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7dJWeRgY1f/dbmVl7zdAGa0R0P95XAUTUPdtxGWL8n7SbZzn4M0LQn9TndJnO4n+Ls/l8 X-Received: by 2002:a62:7a8b:0:b0:44d:47e2:99bf with SMTP id v133-20020a627a8b000000b0044d47e299bfmr7230377pfc.64.1634840292345; Thu, 21 Oct 2021 11:18:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634840292; cv=none; d=google.com; s=arc-20160816; b=YRqf8+xUPwhw6HDldNY1jDnKlPmaA3PniQpgvOUOYZabYMTuy21ONVcZ76tUP3aYVz aXCUgveufFdz3bEKbLCDQ1Zi74HAmHzi5KYYhcQ6PD1ktlZRCa1DXdhq8xjlqtBuV09U 9CYkzZDjMQDuaFK/ef8MbWmxwEFLWJL7bkNB0iulS4UGycsqDPB+mGqC4YGNKmUojVsa IC1zZL93Q5GOOE1GzWmswxvS/8Ltty4rJ972tQ0omdrKxJlwzs3/yaQUPcpRwl5OupAb 7qJCWJuYoGn3M7xrq3VL8wCUaOtipY7vsFESusBzHH4S3Ff1j0qAu/p0TZBU/4C6cLNS Tztg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=WqAvyxyuPJOJnhEbyl4Xhg7Hg8VKn5jOxI6uWtAb2EY=; b=0uBMqDtvayEEriE+Q+r0tHRsEvtx64NkOtMAtPBFmiX3OdSDlc5EGgyC2dj6JE5y4i 4aCvQdp5FdgA1oGt5wxW/DT/QuDLGZzyUC6vNSGb3n9huBRQK9hrQLqWtp1NkXLpaH0W g1UYKMSKOiO7s+Ord9O71isDuVsgq8cly7OB7QCGyf9c0PNxaUCrqSmljzmSaB2edbFG NGfIwic/sgAkAMl4j3/PCkIwc5arREV5phy3BKVpWFNXskuWZbJXO55VCA1cxeyrwEdQ 4DXbU8cB0+nPbu5N7vJdw4t0kCd+kkBJRGEXe+0K+6XkOR/yVV9yyLfiqPqdgMpnqjwF lgng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nu15si13837486pjb.179.2021.10.21.11.17.57; Thu, 21 Oct 2021 11:18:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231433AbhJUSRk (ORCPT + 99 others); Thu, 21 Oct 2021 14:17:40 -0400 Received: from mga14.intel.com ([192.55.52.115]:33015 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230020AbhJUSRj (ORCPT ); Thu, 21 Oct 2021 14:17:39 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10144"; a="229377370" X-IronPort-AV: E=Sophos;i="5.87,170,1631602800"; d="scan'208";a="229377370" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2021 11:15:20 -0700 X-IronPort-AV: E=Sophos;i="5.87,170,1631602800"; d="scan'208";a="527582106" Received: from lucas-s2600cw.jf.intel.com ([10.165.21.202]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2021 11:15:19 -0700 From: Lucas De Marchi To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, x86@kernel.org Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Peter Zijlstra , Boris Ostrovsky , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, xen-devel@lists.xenproject.org, Daniel Vetter Subject: [PATCH 1/2] drm/i915/gem: stop using PAGE_KERNEL_IO Date: Thu, 21 Oct 2021 11:15:10 -0700 Message-Id: <20211021181511.1533377-2-lucas.demarchi@intel.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211021181511.1533377-1-lucas.demarchi@intel.com> References: <20211021181511.1533377-1-lucas.demarchi@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PAGE_KERNEL_IO is only defined for x86 and nowadays is the same as PAGE_KERNEL. It was different for some time, OR'ing a `_PAGE_IOMAP` flag in commit be43d72835ba ("x86: add _PAGE_IOMAP pte flag for IO mappings"). This got removed in commit f955371ca9d3 ("x86: remove the Xen-specific _PAGE_IOMAP PTE flag"), so today they are just the same. This is the same that was done in commit ac96b5566926 ("io-mapping.h: s/PAGE_KERNEL_IO/PAGE_KERNEL/"). There is a subsequent commit with 'Fixes: ac96b5566926 ("io-mapping.h: s/PAGE_KERNEL_IO/PAGE_KERNEL/")' - but that is not relevant here since is it's actually fixing the different names for pgprot_writecombine(), which we also don't have today since all archs expose pgprot_writecombine(). Microblaze, mentioned in that discussion, gained pgprot_writecombine() in commit 97ccedd793ac ("microblaze: Provide pgprot_device/writecombine macros for nommu"). So, just use PAGE_KERNEL, and just use pgprot_writecombine(). Signed-off-by: Lucas De Marchi Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20211020090625.1037517-1-lucas.demarchi@intel.com --- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/drm/i915/gem/i915_gem_pages.c index 8eb1c3a6fc9c..68fe1837ef54 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c @@ -289,7 +289,7 @@ static void *i915_gem_object_map_page(struct drm_i915_gem_object *obj, pgprot = PAGE_KERNEL; break; case I915_MAP_WC: - pgprot = pgprot_writecombine(PAGE_KERNEL_IO); + pgprot = pgprot_writecombine(PAGE_KERNEL); break; } @@ -333,7 +333,7 @@ static void *i915_gem_object_map_pfn(struct drm_i915_gem_object *obj, i = 0; for_each_sgt_daddr(addr, iter, obj->mm.pages) pfns[i++] = (iomap + addr) >> PAGE_SHIFT; - vaddr = vmap_pfn(pfns, n_pfn, pgprot_writecombine(PAGE_KERNEL_IO)); + vaddr = vmap_pfn(pfns, n_pfn, pgprot_writecombine(PAGE_KERNEL)); if (pfns != stack) kvfree(pfns); -- 2.33.1