Received: by 2002:a89:2d5:0:b0:1ef:f8eb:5d24 with SMTP id d21csp188138lqs; Sun, 17 Mar 2024 17:28:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX/MX0codssJQtbIND05ijlBtGekZvybEd2O70WrAM46Vzcg1N0XCpkOD1BRqtCobWTs4Btt8YwwZwf7mvW8WM2S1C98OK3zai9I/y0jw== X-Google-Smtp-Source: AGHT+IF1qMKE7nPHVMqnhfV+K69KcLsem0FSNsVeRvA1h0+ZKIwrWshbiH2RL1UiXqBwz3aOlzWG X-Received: by 2002:a05:620a:3721:b0:789:f3b7:e668 with SMTP id de33-20020a05620a372100b00789f3b7e668mr4700877qkb.39.1710721686094; Sun, 17 Mar 2024 17:28:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710721686; cv=pass; d=google.com; s=arc-20160816; b=GK0uGUUqjS3FULaEngrE34v4LGYfSKLY4TpTFXxwUqzon0NZC+aEDAkze8/OK+J6Zd JLWvGmkCEDiP28Gd7ly943g0kMTVKK2hKJ/H6utfjLTXCLMbVzbeUnaBbRLKclIGlveU e39OdXGOQaw8mGfcHSqaYxBQXcBZORv5zbYJ+adKMtgRacRfCAUS4bw2abm+ccmQoKO8 jeu7eJ2rDbJddyNEFXZd5vf4k182uw9Pa58cSMp2I7VQd25YMCuXwbc2YL6rSIjcbg+p IQhJ3s8JGYs1cmaunNt35ZgyaRqU3I9tTBUT7a8bCCph8qakrYXJu7g8NgCcmoJV3cpk QHAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=1Qt7u+PWqpqCiGmiH10iOB2sx5m0iKrXs+EtR3m51rw=; fh=eVZyGLfQCW6V1AD1JUn/67D0aviurSFkU6Bd3MDY8q0=; b=Sz2KGc7xeYrJ4YNIu1im/TKtifQ85w5TDz9Q7UzStBYmShYJvAzbIr+xQ22xiiX38w H0F3NZRpxIhhCa9gHIl8pwqzbUmw2/NiZhp/Ef4cssdhpwROhmNlrIU5xp79bFKUrvYi LTdqIgZ6AEEcxL6WdXcI+vKv9zsj8siNMclW3IiRnILN/k9nvPykAw2Y0rgOm25xr9lt bTKM5pB00QjvXZrwrnbUUlv34v/8h8OkWoL7FlBuSxExpp9peKo9++Ot/E+56V3WdqgP K9VL99hO4TTQ44IQLdp0ox8Ar9McrZ+eSj9jyJbwyTkPUcq4fAUt5EGUNqi95QT9Ijl4 iCGg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=b1Nj6hTu; 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-105600-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105600-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v18-20020a05620a091200b0078a03225bb7si515395qkv.84.2024.03.17.17.28.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 17:28:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105600-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=b1Nj6hTu; 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-105600-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105600-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C5B0A1C20E9A for ; Mon, 18 Mar 2024 00:28:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61496D29E; Mon, 18 Mar 2024 00:28:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b1Nj6hTu" Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com [209.85.217.48]) (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 1C2D64C63 for ; Mon, 18 Mar 2024 00:27:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710721679; cv=none; b=ASCacRAS81OVleUQLGuauqAMvbyrZuBL5Ox4kHYjTWLKmkMi5GqRuMYuQNIjF9/sp6HMfqUDNYeEiz2fgwKid7dtRaVRlvZ2jJ/XtMk3ClXa7J78ErK6iDOal5k4XqABS3vhSAIJRVqaxAOZYJoAL3B3AhT85S0lP0ioySVIOdk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710721679; c=relaxed/simple; bh=3yDSAwIFbySv3JmaN6hmK5jPysilhvZsLdYo9LyvPIQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=VeCJkI7zWRVvDfbyb5P2SDE1s5N/sHbXNxlZ/Daba09aaOmViNW+sCmGYO2x/96ROvm+38LcQvrwdeiVDEktFr/3hwNftvBd9P1nD/npMqIzQTqJVDW4T3n4Vv33Z6j7TM4oNQ3eMWX9jHeX2w5TlyQ54iNP10Pta2Rx4oJRt40= 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=b1Nj6hTu; arc=none smtp.client-ip=209.85.217.48 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-vs1-f48.google.com with SMTP id ada2fe7eead31-476665f067fso1100544137.1 for ; Sun, 17 Mar 2024 17:27:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710721677; x=1711326477; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1Qt7u+PWqpqCiGmiH10iOB2sx5m0iKrXs+EtR3m51rw=; b=b1Nj6hTuyBMesAhKH6pBfwzNvoWQwyeKfojziNRkuYBa8RuS3H3lE1s2uiWXRaXpo+ 2HloAORUsu/5QTjVP4EBTyepCoKQ0Oi72b62FzhMRCqSbZVZMTgOXeVDGHhq83MLMYPA yW6QiwULKJjywPEIHwiOfHzAiLxFWQS4fg1SRNOQ0mSbBsrfZXkjGZgzvKFaUOdjpd+B dv8t5cS5ujLU2N29hbW+uRBjv4+YJ2gn85L1CRTPCnuksIgfb8/jI6b+5fETOV/H2VJj iLN3lphjSwt98t9VOWb4wnUzHNF+p0N4NmgAeWbn5UeTmkEatUXNLRqgqGkNs/esvtue edDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710721677; x=1711326477; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1Qt7u+PWqpqCiGmiH10iOB2sx5m0iKrXs+EtR3m51rw=; b=AdaE53HC4U6ipGK3mygOvgGvWntJlSCiUVw+1pEGrS/03PU5eq9LRm1vi/cmcQU9Y+ ZQo8D21nzSEjVF4GjesRUpE2FIABOOF4wqD8lMiB8DbQ/nb7zZJBE5KBmjWVN8eBhUir mqDxDhU4fBdEVL7L96SO3CQKQyelgigov0h7ONfAsskmBZQRIMN/py10X7w4bp3DaW2t qTrPB+737qAZIbf56Ub76M4+Af1+etVRi79et/EAynTUCuxIwOzH+vhbyFeCalGQBf1T 5vfjaGOMoB/pHi+E62T6QGKpQunG7HXWWCQmk6OJp55Zy2qpGDqKHvoPwh04JQZpIKxk WaHw== X-Forwarded-Encrypted: i=1; AJvYcCUOFpsHIokCUxS8mxt7q8B57diKOA/gDgw6SbY2XMwOjsRthEHgPg9xVJhwHjphzYMJxnxfFGgOuddPVaDVj/b1IGfnveWQ3zmpG1Na X-Gm-Message-State: AOJu0YyhS1bB1318HFzmZDsmdZo0zCP1/5nwT2biePxCORn1L3ki/jUt DFBuHpGdjDRgpJRhO7antgfyC8nYtFsQkjsw1kUAey9oFws5+Z421zHRMjW7PpjaBBDbsdZ6ivh CBGdczh1g5cDfZby42wUyo0e5wBA= X-Received: by 2002:a67:fc10:0:b0:476:5b1b:b109 with SMTP id o16-20020a67fc10000000b004765b1bb109mr6696501vsq.17.1710721676913; Sun, 17 Mar 2024 17:27:56 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240313045036.51065-1-21cnbao@gmail.com> <369716bf-0216-4114-b502-a2d2c819ee8c@roeck-us.net> In-Reply-To: <369716bf-0216-4114-b502-a2d2c819ee8c@roeck-us.net> From: Barry Song <21cnbao@gmail.com> Date: Mon, 18 Mar 2024 08:27:42 +0800 Message-ID: Subject: Re: [PATCH] xtensa: remove redundant flush_dcache_page and ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE macros To: Guenter Roeck 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Mar 18, 2024 at 8:16=E2=80=AFAM 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' [-Wun= used-variable] > > 174 | struct page *dst_page =3D sg_page(re= q->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_PA= GE" is not defined, evaluates to 0 [-Werror=3Dundef] > 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 > > Guenter