Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1884863pxb; Wed, 20 Oct 2021 13:51:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLxfbBO1ckFmEaQ8pAhthJ/IvTsNKpoXDCSsjfo/QD8hAy6Db4VjcocgZ3blUmIHgSSWoZ X-Received: by 2002:a17:907:96a3:: with SMTP id hd35mr2031320ejc.222.1634763102573; Wed, 20 Oct 2021 13:51:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634763102; cv=none; d=google.com; s=arc-20160816; b=oB+H52BcuF9c6byux/GIcim8KTy5pd2a3bbIfbJA/6uU0Xi4lkl4+oR4I4pu/lvlAW eTpFKKHJeKwjjitXo3jEj5j48FNJ5TDcaXwW445BcwuZ78e0aJBj7+3O28iwyIwTTtz7 sLuHo+jeJS3VRnkeQFaSkPztn4jYfizztEz9zPIXJVFo0x5qPzqC1dpdRH9kyXc9cArE 3W7UCOlcPn6io6cIxAASRarE+7hECL85eUqtyWJS+AzNo7+ocsbgKXRLYr0dgLPlPvah obJUZoO9pCgvfBwQhkDvjemu4rRQQS4Wqlshsgodz/VpQqpo1PsZ8YiowTzYTXC67dVd gkOQ== 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; bh=20sEGZ7wDg96FBNp560QZyTr5QHur9ipv8h54h45eFw=; b=pL+DUVTwBT2M0j4zZnpYdnxSIkKNCE1a0qr6mwD6YDes5Kkz6KWzCJh4UXe3ROgySb Qa+78DZ87UzuBL4brQK95tFqmUMYm49240OYGGarTQf932D9RCRgV86SKlHKXieKgBjC 3L9brN647O2W4bsTnK9RXCZb0AhxITlT2mzIJ5utokmIqX+6rSwYIyQNzcZdIMiDUq9n C9iOh9jAkzShRqYwf/oXZAUhRZjXfKEEoyKLV0xhHjiOioHzdjimS9IbEmdvqmPsSHSF VWckNm17iIaV3CbDazK1c26ntsN25KOLURVUuI8mRIB/SX7BOrEZuqt/1HiV00v/x+cP ml3w== 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 c12si7165514ede.394.2021.10.20.13.50.52; Wed, 20 Oct 2021 13:51:42 -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 S230269AbhJTUvM (ORCPT + 99 others); Wed, 20 Oct 2021 16:51:12 -0400 Received: from mga09.intel.com ([134.134.136.24]:61472 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230020AbhJTUvL (ORCPT ); Wed, 20 Oct 2021 16:51:11 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10143"; a="228752477" X-IronPort-AV: E=Sophos;i="5.87,167,1631602800"; d="scan'208";a="228752477" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2021 13:48:56 -0700 X-IronPort-AV: E=Sophos;i="5.87,167,1631602800"; d="scan'208";a="444513628" Received: from lucas-s2600cw.jf.intel.com ([10.165.21.202]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2021 13:48:55 -0700 From: Lucas De Marchi To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Chris Wilson , Daniel Vetter , Joonas Lahtinen , linux-mm@kvack.org, Peter Zijlstra , Andrew Morton Subject: [PATCH] io-mapping: remove fallback for writecombine Date: Wed, 20 Oct 2021 13:48:38 -0700 Message-Id: <20211020204838.1142908-1-lucas.demarchi@intel.com> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The fallback was introduced in commit 80c33624e472 ("io-mapping: Fixup for different names of writecombine") to fix the build on microblaze. 5 years later, it seems all archs now provide a pgprot_writecombine(), so just remove the other possible fallbacks. For microblaze, pgprot_writecombine() is available since commit 97ccedd793ac ("microblaze: Provide pgprot_device/writecombine macros for nommu"). This is build-tested on microblaze with the following hack to always build mm/io-mapping.o and without diying on a x86-only macro (_PAGE_CACHE_MASK) Cc: Chris Wilson Cc: Daniel Vetter Cc: Joonas Lahtinen Cc: linux-mm@kvack.org Cc: Peter Zijlstra Cc: Andrew Morton Signed-off-by: Lucas De Marchi --- include/linux/io-mapping.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index e9743cfd8585..66a774d2710e 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h @@ -132,13 +132,7 @@ io_mapping_init_wc(struct io_mapping *iomap, iomap->base = base; iomap->size = size; -#if defined(pgprot_noncached_wc) /* archs can't agree on a name ... */ - iomap->prot = pgprot_noncached_wc(PAGE_KERNEL); -#elif defined(pgprot_writecombine) iomap->prot = pgprot_writecombine(PAGE_KERNEL); -#else - iomap->prot = pgprot_noncached(PAGE_KERNEL); -#endif return iomap; } -- 2.33.1