From patchwork Wed Oct 20 20:48:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas De Marchi X-Patchwork-Id: 12573325 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 304AFC4332F for ; Wed, 20 Oct 2021 20:49:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B156E61381 for ; Wed, 20 Oct 2021 20:49:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B156E61381 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id CA937940007; Wed, 20 Oct 2021 16:49:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C3106900003; Wed, 20 Oct 2021 16:49:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AD1F5940007; Wed, 20 Oct 2021 16:49:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0154.hostedemail.com [216.40.44.154]) by kanga.kvack.org (Postfix) with ESMTP id 9687C900003 for ; Wed, 20 Oct 2021 16:49:03 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 3FB8A2FDE5 for ; Wed, 20 Oct 2021 20:49:03 +0000 (UTC) X-FDA: 78718005366.21.0FC045B Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by imf04.hostedemail.com (Postfix) with ESMTP id 93F8650000AE for ; Wed, 20 Oct 2021 20:48:59 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10143"; a="315084176" X-IronPort-AV: E=Sophos;i="5.87,167,1631602800"; d="scan'208";a="315084176" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.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 X-Rspamd-Queue-Id: 93F8650000AE X-Stat-Signature: d7n8xy78y5o363nrm1htdhywamxdheu4 Authentication-Results: imf04.hostedemail.com; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=intel.com (policy=none); spf=none (imf04.hostedemail.com: domain of lucas.demarchi@intel.com has no SPF policy when checking 192.55.52.43) smtp.mailfrom=lucas.demarchi@intel.com X-Rspamd-Server: rspam04 X-HE-Tag: 1634762939-688065 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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; }