Received: by 2002:a89:2d5:0:b0:1ef:f8eb:5d24 with SMTP id d21csp190238lqs; Sun, 17 Mar 2024 17:35:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUWWngkNl/StwERkQhCRootR2SOH81ZNbVpush/Jmhn0tH7KMlbArv9wzvjcZy1EjWH1VUTWqDliU6n6ApxdHtC6+4FuFckDlT7eA+mhQ== X-Google-Smtp-Source: AGHT+IFQ2XYgH3RPOjvAvUyzwL99IVnYYREM7qB1D+fWVyzD+d8m1VCZ77QuZa59E2FNHyphU8rq X-Received: by 2002:a17:902:74cc:b0:1db:9fa2:3408 with SMTP id f12-20020a17090274cc00b001db9fa23408mr10748822plt.42.1710722099952; Sun, 17 Mar 2024 17:34:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710722099; cv=pass; d=google.com; s=arc-20160816; b=Z+pCRrSc5JoDMQRwTHkujZqnGE6lN1x0cBj1cbKo75oYKmrCu+uQtPzU2OePdD3LHW uobdYGdwCh5a+YlHkNDLMeHzVNd7ULvYs/L33mM2EJ6Yxbl/3zLM4N9YFm2tlt7uUkWC 15PDpKaZT6cuK8JV39/X5i35VjpobZxwQuXsiDRoSazUWtEMfrMKTAhfWufDiLjqIfdg ylYzYQGjzMTzUYp/33JItuMxXeEEeBm84l+t3ZPDGqcAfZFfeIp2xVqzXZ/YSnep+n6W FLh9ainhAdck8gXfUWi/RbQBYaPHdXufuHOBaIyyNsZ/GpYPg63ZaMaxEtVAYU6NGJNi i6MQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :sender:dkim-signature; bh=cVWmTsQ8ue3A0Em93Wm1JD2Ed8I6QgcZgxAYU9FbXiU=; fh=WzSte32pBy5WItE7p2HtbblFPz58GW4adsL4AwFgDeo=; b=z4F5ZgfXbuBVYEwHrPaeE1+gwpxtrzhq0pTjKrn6dAjyYMa4x8e6Axq0VxbTAGyMzc OTJDuGM5pIFa7Ze9Ur0XatVKxXASNMTUlIQ0MihA15goCYmzzp6Wp3drdOsbh4Z909a/ 0B/Ijz1GYxTqSDiazMS98brXwgRHbilDkmuTMIfHJmp9rTxji7vLS4i8M4HI6kz0g/A8 kTG/0rWut7stE5jM3s/qh8klk8STEro6EYuw0fg/HlD6egb8w0Am2tSoPnkPjAkYrB71 ClxN9wFqHeKZHrHZqufj2fbKPNygNOlKYucMsKOBMNV9mw1D5sJi+3m9bL9Rnys27b4d JxVQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=j3pHyUNf; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-105604-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105604-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id h10-20020a170902f70a00b001e009bd74f5si2584533plo.212.2024.03.17.17.34.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 17:34:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105604-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=j3pHyUNf; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-105604-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105604-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 73E54B21484 for ; Mon, 18 Mar 2024 00:34:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75E2D1DDF1; Mon, 18 Mar 2024 00:34:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="j3pHyUNf" Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (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 F12C11CFAD for ; Mon, 18 Mar 2024 00:34:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710722075; cv=none; b=VbN0NEof1WFYv5bIHRqddsegYXb930uuTzbeUkmjIU+nD+y2hI/MkUOtg44OXd/7ZPSO1oTKaTru6hamZWiG5WM1nZBZcYhzXhYwEuqcoiailXTW/h7pap1EV/cxyZTSiJ58dPHN1RAeqRggBZIbTVs8eNkfKO7vyxm3g6MewSs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710722075; c=relaxed/simple; bh=hfHuOjNFBvM74AkH/7bAsDIUjZef3lfTmRVSePaltt4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dnsgPn5KQoDASIMlZ0gYW21OuFq1MK1gP7Mm/l7lKekvCjzBBbJUfgpwl49lT13ajnNYtsQ4vVnzREdcJld7juYm0xaB59UzX0hb8MHmnZFaVzoy+cU4WiMxZhuJEkD0djK6r5kXcw//yAOpdRMOehykkAdzbrVXWuF36wL9p44= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=j3pHyUNf; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1e0189323b4so4003225ad.1 for ; Sun, 17 Mar 2024 17:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710722073; x=1711326873; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=cVWmTsQ8ue3A0Em93Wm1JD2Ed8I6QgcZgxAYU9FbXiU=; b=j3pHyUNfhY4O3wcebstC6OEl9eY+qSw0lF075Tzl2cbJ//AoyvPdvbjKSB9Vf20WlA rVIbA4MohnNCiBvVFX6XiiWHAUjBMAYRvMUF4XcVCK9KY0usYgaOXJ0IKOTgL3LoD9gM GROAr+aby8es9surxbi23POiwcKOg5nWUUkUQYaXCe5MNaMuSgL9XCZG2WrbyZ6J+MMf iyxtFunizLVtYsB4Xft1SUQ2Nhs05927wdrfahjFr+7ZyTFyJJmpb/yLfx1r38k7if0H dpx7OsMYhGLvY0B1ZAAAz7UHooH9eR/wUkVHb5VKohEpjVsXQDyQv3caOZe4IC5zdrjl nhRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710722073; x=1711326873; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cVWmTsQ8ue3A0Em93Wm1JD2Ed8I6QgcZgxAYU9FbXiU=; b=u5XSm6DOWqYoKLxzRWTH/eoeGujah80lJt5/k7HTFpBTfgoolcqg+L/v8fJdLlXasB KxHca6ZfTPCf4jNzKbXlD0IsDeCVGFplIgi39WX5K5Bb4Ar9f+sTbUUziLTUn2xr8Mms PrR1jSz69tBrOVTbRQK7ES2LNWzOJbWk6ZOhU5krguLkyR1RZBbFiwQpsQ08D1glT6up KC2f+6+UV/34vR2+M3z1tOTZAu4ITOm+OvKE78dE4i9H1ibxq+qEdZhJz0pOcB0B8jyD OgDX82zNT2IunPnQkIG/j8gwWmUPA4ETjI7wRJs+OqjBPW1h8CT00NzN4EWDJSLlYQFe wBIA== X-Forwarded-Encrypted: i=1; AJvYcCXRRYDPAm0XBmJ8Qp/H0Jsg1GxGRk8YK4yKc85mKYNiM5jm4cdNO6qxs/D93NQmCcC0pEdgxgQIAIW14gUrKRa7iw8+oRmuw255CNKI X-Gm-Message-State: AOJu0YyJJbWMN7BiuN8u6YoWyEH+mzNGFVg7FmzqMwR8IWUnktGRsNvG EpBCv9gjOJrz9gEmmh5C9u/lexHVA50IATqgegnxQkcfQLTCgdqV X-Received: by 2002:a17:903:186:b0:1df:fbde:aad9 with SMTP id z6-20020a170903018600b001dffbdeaad9mr5761052plg.38.1710722073186; Sun, 17 Mar 2024 17:34:33 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id p6-20020a170902eac600b001dd689a6ff4sm7789618pld.227.2024.03.17.17.34.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 17 Mar 2024 17:34:32 -0700 (PDT) Sender: Guenter Roeck Message-ID: Date: Sun, 17 Mar 2024 17:34:31 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] xtensa: remove redundant flush_dcache_page and ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE macros Content-Language: en-US To: Barry Song <21cnbao@gmail.com> Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, chris@zankel.net, jcmvbkbc@gmail.com, willy@infradead.org, alexghiti@rivosinc.com, rppt@kernel.org, dennis@kernel.org, Barry Song , Huacai Chen , Herbert Xu , kernel test robot References: <20240313045036.51065-1-21cnbao@gmail.com> <369716bf-0216-4114-b502-a2d2c819ee8c@roeck-us.net> From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0 VHGMNJ3MwXlrEFPXaYJgibcg6brM6wGfX/LBvc/haWw4yO24lT5eitm4UBdIy9pKkKmHHh7s jfZJkB5fWKVdoCv/omy6UyH6ykLOPFugl+hVL2Prf8xrXuZe1CMS7ID9Lc8Fa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8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 3/17/24 17:27, Barry Song wrote: > On Mon, Mar 18, 2024 at 8:16 AM Guenter Roeck wrote: >> >> On Wed, Mar 13, 2024 at 05:50:36PM +1300, Barry Song wrote: >>> 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. >>> >> >> Maybe I am doing something wrong, but this patch doesn't build >> for me. >> >> CC arch/xtensa/kernel/asm-offsets.s >> In file included from ./include/linux/highmem.h:8, >> from ./include/linux/bvec.h:10, >> from ./include/linux/blk_types.h:10, >> from ./include/linux/writeback.h:13, >> from ./include/linux/memcontrol.h:23, >> from ./include/linux/swap.h:9, >> from ./include/linux/suspend.h:5, >> from arch/xtensa/kernel/asm-offsets.c:24: >> ./include/linux/cacheflush.h:9:5: error: "ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE" is not defined, evaluates to 0 [-Werror=undef] >> 9 | #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE > > is it because xtensa doesn't include this at the end of > arch/xtensa/include/asm/cacheflush.h > while other architectures do? > > #include > Looks like it (see my other e-mail). Guenter