Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1493327lql; Tue, 12 Mar 2024 21:51:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJgXZPFdfus/QmRe8Sa8FS+8XXiNoQb/uFjMV8Hr2hxA9KEQKcjVBID/GDhQvQ4bHhLATXUr3vhO9Q2Xj6x3qE1uKQHLdKWZWqYBAo4A== X-Google-Smtp-Source: AGHT+IGBhlUCA36EqvTbntPJONuKQ+QE8F2W4IlgLsACLs1VQWjMDYhcYJt9P7psoVZ2RNi39S+7 X-Received: by 2002:a05:6808:1598:b0:3c2:51f4:9854 with SMTP id t24-20020a056808159800b003c251f49854mr6646197oiw.41.1710305467840; Tue, 12 Mar 2024 21:51:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710305467; cv=pass; d=google.com; s=arc-20160816; b=QAfcANZa9c9zcnbaDbnZbdZyNtR+C72jNdZkKQz9nsIp7gIf43ZdcLjSoGQAe7mYDL 5ny2Z3OOY1vY3tPJTi38AwtuMcJ/LuA70sFEGERWGed6+kTXEYvXZZ+qT8wjHPfqNlL1 fNxY5mVtNzqMma/69aOD7f2ctZTEAr6UhiP7qkOD8MGoNzBq4MjFYtAyLNPGqJb1XHrS oYxtou/40Rdfg1IY8zcBs5JTgStHU41nv26vDJ5mwSuuDAm+ojToYumR1fra3ckO6kNV 1lCGnAURhTiQd924IA7Z79fGv2eg6oahqlIbXSY8opOZHAk7aI63coBBC1Z3xcrzg1hK UAiw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=lX/+Ue7KhlYC6XaU1gURwyGMaHqvfNR8b8K3j40yg4o=; fh=s2qttKQQv64EeOI7Noh/EytVtqacPDaIx49+rryjBa0=; b=TDYCFK2EgQ9OROMWwiRIdYeT8/wr7W8Ma6sh9JEe5d3o2wAjBYGrRI72AX7CCva7xS FIdP9tci2ikXW7mdxRrzIltcRSJD2l6JtRAwggWFPD8ZtIk/guVCUkBe/uj2LWnW0RYJ 8eUUxIJLi62usIK0OEowGGHAAIwXswWw54K50tcGw8y7W2HbOh5ZDRkNeH+hNsWZeqTO 3Wt2NmZrgeg9WAWh43GwUi6SNtk6aCQBy6UnqdPJBpP6dogwWdNVLqmNDOW2tO6iZxZU WgRbMMSYv2qOHHLrfN1JAUJtJdfqE5lLLQVsC5gMYn2BjYgMOVEAb2qcLRlQjFMkr1Uk l+Yg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lhCBzKKP; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-101107-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101107-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bd43-20020a056a0027ab00b006e63f027285si8082271pfb.19.2024.03.12.21.51.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 21:51:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101107-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lhCBzKKP; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-101107-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101107-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 57E3A283418 for ; Wed, 13 Mar 2024 04:51:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5D201170D; Wed, 13 Mar 2024 04:51:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lhCBzKKP" Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8401DD2FF for ; Wed, 13 Mar 2024 04:51:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710305461; cv=none; b=WTGO1IZmyreIkNzxUf0bmGv6n+Uk32b6fqJpONmWoFTGHokJUhjGIK5bwlnUocmlYJe+eH9FG14Uf5ywh44A/alvP6VmEPJxYrH+xOAYT6ZIt6mxAHnwd8EA7Mfl8TTwxF7wUn6syAK+z80BhhFdcBo77vtTdvJU/QQPt4mOvfE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710305461; c=relaxed/simple; bh=0up+P6357wxJnmhhj/1DSZlJcRMFmijD1DOSan59UjA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=kbVNz3M+frhFhmNA0SPmfTzpW1j4p7CyZXlJTobzhXSqL74nLNpqvjx9/IRSBYtaunh5yGUnbjfSLX4hmuqEBoWpCZxSjk5MjUbor7SPZfdBc+lrFJZ9PIY4pWpTYviQ3EWtSIuKYRLi6MddanI8a+8iXE5PFESFbuqKDXI9hko= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lhCBzKKP; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1ddcec424a6so1669005ad.2 for ; Tue, 12 Mar 2024 21:51:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710305460; x=1710910260; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=lX/+Ue7KhlYC6XaU1gURwyGMaHqvfNR8b8K3j40yg4o=; b=lhCBzKKP10X6V/3AQawcvifUa/T0kVBQb0zxqdMhWA4oIqlxCeHPZYDm7Ezo2/Hc6l zrBnpT/AOmox/eeSpQa/LP77s8WJrHQILjfFTkrD6rHlv0iK6MgZLBLY1Mnv4JmHTQZO lC839kI9U+D0xzoOHIkQb2mG32Is3VcBVQj/jjLirpL3T8rvr4dzj2om+PWWHlduDacA 4jbCulh2KlwvSj5qUOaCUJzX07juGXTXrMx4fIFAR+pH+KoaeIVUjm51emjQLefUhM6A ASMK/NxJ01bB+9Sah2d/KLCAZkNrbBZvrNKlUQkCOqxBWMk06sNhsK1Le2gXmEaRdnNn D+ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710305460; x=1710910260; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lX/+Ue7KhlYC6XaU1gURwyGMaHqvfNR8b8K3j40yg4o=; b=c+2TtFcDW5KKnMbauL3QreFxL/odZDaEY/xgDp8ePL7F5iw3q04eop6TLpyKd/kOfI Y09wmWbVMkpjdsQFH9OBwuWTz+hTIW6qrXKv99U5ebdi/ClCT7Dagmi0pDI1QItf3oVl 9b3OXniXSe1dQoIj8YxKbncLtPYx4VhzVCJ1zdH71wy693hD4RTsNLz3Mcx6womedNFJ XRkxTpxla5nfWpOrrn1CTFa3Gdt4jG9R/5nmck2ZlhizpLI5MO2kFWW0B1jNJzZedtu0 SCoLFk5fh9U/tqH3fjeHsmCTWGg6GhLKpHR5cYdZtdu3eLwh/1Rqcv9ZHRyhF1GffF4J 1Bbw== X-Forwarded-Encrypted: i=1; AJvYcCXJPYEBgAaWlNzZsEPJbbJDe9Qoo6dwWQnE2Te0HDn59PpykHqxv0E+h1PD5U9LEaaftPH3IQg7tcxhs67BygyqyOh3UI5nDkL12zqj X-Gm-Message-State: AOJu0YyHV8v0i4FqfyjhgWwalCtGg9ag0yq0KsSCoA8PmnUuMXLYHDOp POAFhNt+vMt4arTXr/9TBchMl0ch+Nbhd6RwnFC+ytmnNAbp2/JH X-Received: by 2002:a17:902:ec92:b0:1dd:7119:d7d9 with SMTP id x18-20020a170902ec9200b001dd7119d7d9mr12054203plg.8.1710305459687; Tue, 12 Mar 2024 21:50:59 -0700 (PDT) Received: from localhost.localdomain ([2407:7000:8942:5500:aaa1:59ff:fe57:eb97]) by smtp.gmail.com with ESMTPSA id u11-20020a170903124b00b001d8f81ecea1sm7617467plh.172.2024.03.12.21.50.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 21:50:59 -0700 (PDT) From: Barry Song <21cnbao@gmail.com> To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, chris@zankel.net, jcmvbkbc@gmail.com Cc: willy@infradead.org, alexghiti@rivosinc.com, rppt@kernel.org, dennis@kernel.org, Barry Song , Huacai Chen , Herbert Xu , kernel test robot Subject: [PATCH] xtensa: remove redundant flush_dcache_page and ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE macros Date: Wed, 13 Mar 2024 17:50:36 +1300 Message-Id: <20240313045036.51065-1-21cnbao@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Barry Song xtensa's flush_dcache_page() can be a no-op sometimes. There is a generic implementation for this case in include/asm-generic/ cacheflush.h. #ifndef ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE static inline void flush_dcache_page(struct page *page) { } #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 #endif So remove the superfluous flush_dcache_page() definition, which also helps silence potential build warnings complaining the page variable passed to flush_dcache_page() is not used. In file included from crypto/scompress.c:12: include/crypto/scatterwalk.h: In function 'scatterwalk_pagedone': include/crypto/scatterwalk.h:76:30: warning: variable 'page' set but not used [-Wunused-but-set-variable] 76 | struct page *page; | ^~~~ crypto/scompress.c: In function 'scomp_acomp_comp_decomp': >> crypto/scompress.c:174:38: warning: unused variable 'dst_page' [-Wunused-variable] 174 | struct page *dst_page = sg_page(req->dst); | The issue was originally reported on LoongArch by kernel test robot. And Huacai fixed it on LoongArch, but I found xtensa obviously has the same issue. Cc: Huacai Chen Cc: Herbert Xu Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202403091614.NeUw5zcv-lkp@intel.com/ Closes: https://lore.kernel.org/all/CAGsJ_4yDk1+axbte7FKQEwD7X2oxUCFrEc9M5YOS1BobfDFXPA@mail.gmail.com/ Signed-off-by: Barry Song --- arch/xtensa/include/asm/cacheflush.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/xtensa/include/asm/cacheflush.h b/arch/xtensa/include/asm/cacheflush.h index 38bcecb0e457..11efdc8eb262 100644 --- a/arch/xtensa/include/asm/cacheflush.h +++ b/arch/xtensa/include/asm/cacheflush.h @@ -144,9 +144,6 @@ void local_flush_cache_page(struct vm_area_struct *vma, #define flush_cache_vmap_early(start,end) do { } while (0) #define flush_cache_vunmap(start,end) do { } while (0) -#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0 -#define flush_dcache_page(page) do { } while (0) - #define flush_icache_range local_flush_icache_range #define flush_cache_page(vma, addr, pfn) do { } while (0) #define flush_cache_range(vma, start, end) do { } while (0) -- 2.34.1