From patchwork Fri Nov 5 20:39:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12605535 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 10986C433F5 for ; Fri, 5 Nov 2021 20:39:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BEF7961252 for ; Fri, 5 Nov 2021 20:39:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BEF7961252 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 60BC9940052; Fri, 5 Nov 2021 16:39:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5BCC3940049; Fri, 5 Nov 2021 16:39:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 45BCE940052; Fri, 5 Nov 2021 16:39:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0242.hostedemail.com [216.40.44.242]) by kanga.kvack.org (Postfix) with ESMTP id 2C8F4940049 for ; Fri, 5 Nov 2021 16:39:12 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id E03A67798F for ; Fri, 5 Nov 2021 20:39:11 +0000 (UTC) X-FDA: 78776041302.30.A88B1D2 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf07.hostedemail.com (Postfix) with ESMTP id 7721D10000AB for ; Fri, 5 Nov 2021 20:39:11 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 83BF66056B; Fri, 5 Nov 2021 20:39:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1636144750; bh=p6w+94iaxs7+r544PijRic/QocSyQwil4huhbWvkmJM=; h=Date:From:To:Subject:In-Reply-To:From; b=jbwechSTOKscOUsBf5zT7zlLyDCobpI1l2xFl3Ky0D1ss/M63QU48lkPaVV/2eA1R +ZUqNqx19ewOG/8k+Li1CsMeSSNw9e+I0uIVktWyKGHwTHR/pDycahOm7Skkl+74RN pYwZuoDSUvhPJ+/yrK7P9Ro7N0e/w5QaEOLQe+kU= Date: Fri, 05 Nov 2021 13:39:10 -0700 From: Andrew Morton To: akpm@linux-foundation.org, chris@chris-wilson.co.uk, daniel.vetter@ffwll.ch, joonas.lahtinen@linux.intel.com, linux-mm@kvack.org, lucas.demarchi@intel.com, mm-commits@vger.kernel.org, peterz@infradead.org, torvalds@linux-foundation.org Subject: [patch 086/262] include/linux/io-mapping.h: remove fallback for writecombine Message-ID: <20211105203910.DxiEtivZD%akpm@linux-foundation.org> In-Reply-To: <20211105133408.cccbb98b71a77d5e8430aba1@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=jbwechST; dmarc=none; spf=pass (imf07.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 7721D10000AB X-Stat-Signature: nac1zr7zdhqpzjrmhj41yzdno4gjse9o X-HE-Tag: 1636144751-940251 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: From: Lucas De Marchi Subject: include/linux/io-mapping.h: remove fallback for writecombine 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 a hack to always build mm/io-mapping.o and without DIYing on an x86-only macro (_PAGE_CACHE_MASK) Link: https://lkml.kernel.org/r/20211020204838.1142908-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Cc: Chris Wilson Cc: Daniel Vetter Cc: Joonas Lahtinen Cc: Peter Zijlstra Signed-off-by: Andrew Morton --- include/linux/io-mapping.h | 6 ------ 1 file changed, 6 deletions(-) --- a/include/linux/io-mapping.h~io-mapping-remove-fallback-for-writecombine +++ a/include/linux/io-mapping.h @@ -132,13 +132,7 @@ io_mapping_init_wc(struct io_mapping *io 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; }