From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9AFDE10EA for ; Mon, 17 Oct 2022 08:22:51 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 310883200319; Mon, 17 Oct 2022 04:22:50 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute3.internal (MEProxy); Mon, 17 Oct 2022 04:22:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1665994969; x=1666081369; bh=gyBfJa1eOL n7mrcvT7v+17sbsp2akKfNFVudJCF/ZBE=; b=MJv7rbrdt1PWbIJ2Fo7Mj32t/V AuPLKMzjPGcGAfh6wMh5+vutte/YuZ1fj0pYUA1loD+QNVNYGXw8wCUPrLwwYuBx BqqKO0YnFE2gvrJ/rFjTsHz+6G0lq28iqmd+jxSAy+ciXgzx3fAGreInyHHu7HeB oXZeGY64dWaH6bt/YjleGqKu278XL6MlBAh41/wSjPL6BsfTwCQa5UMWL0FY5rkU M0kOQhLQtrdjZHa1hxBuHO5JJbXBBNVOYgmvAE+vgHEQKR0Gx5I/3GR0vLJXqVKT iEtYuGFB/zgZo92ebxpTm9EEZiLAaWfKU1iR8ci2wNAD1SJh4OfmzPgXSAog== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1665994969; x=1666081369; bh=gyBfJa1eOLn7mrcvT7v+17sbsp2a kKfNFVudJCF/ZBE=; b=JRpCbL54IprxWQuNjJN5ghgSuX6t98ISDUu1VmTK+6u0 CBu/BLVAGUxfg5NM8FPZT16YOQlj0QvKpALcakln7gWJRjJhMHeknBUB3PaHG+VW 3dsijGZr7KgHfXoKO4l+Z/zNhJZEs3X4lI2wVU1r+mjrX6u59e/YonGvRKfQngbR BCHLQhQCQRgVlU/m7/+h/5vi7F8ElBZmWu+rGftyhZeGWSIis7H+AcbSvfYsUUtJ 0hQafAinwYFwEqZJZyhzvDYVGDHnaYlb0fB1Jut+jcbzrHiEuKtrmDM3s4pk89yF R/cn69RLJx29/N6fiS1YhnhXX/5JqBv+MWgrhzYOvw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeekledgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepffehueegteeihfegtefhjefgtdeugfegjeelheejueethfefgeeghfektdek teffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 771FFB60086; Mon, 17 Oct 2022 04:22:48 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1047-g9e4af4ada4-fm-20221005.001-g9e4af4ad Precedence: bulk X-Mailing-List: loongarch@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Message-Id: <995e1d32-7818-4a44-9911-705dd1c62929@app.fastmail.com> In-Reply-To: <52ada3c4-f4f2-dc27-5899-d29e5952189d@xen0n.name> References: <20221016133418.2122777-1-chenhuacai@loongson.cn> <506fe4e5-a203-48e6-84a6-f70133be15dd@app.fastmail.com> <52ada3c4-f4f2-dc27-5899-d29e5952189d@xen0n.name> Date: Mon, 17 Oct 2022 10:22:00 +0200 From: "Arnd Bergmann" To: "WANG Xuerui" , "Huacai Chen" Cc: "Huacai Chen" , loongarch@lists.linux.dev, "Xuefeng Li" , "Tiezhu Yang" , guoren , "Jiaxun Yang" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] LoongArch: Add unaligned access support Content-Type: text/plain On Mon, Oct 17, 2022, at 10:05 AM, WANG Xuerui wrote: > On 2022/10/17 15:38, Arnd Bergmann wrote: >> On Mon, Oct 17, 2022, at 9:31 AM, Huacai Chen wrote: >>>>> +/* sysctl hooks */ >>>>> +int unaligned_enabled __read_mostly = 1; /* Enabled by default */ >>>>> +int no_unaligned_warning __read_mostly = 1; /* Only 1 warning by default */ >>>> >>>> The comment says 'sysctl', the implementation has a debugfs interface. >>> Originally "enabled", "warning" and "counters" are all debugfs >>> interfaces, then you told me to use sysctl. Now in this version >>> "enabled" and "warning" are converted to sysctl, but there are no >>> existing "counters" sysctl. >> >> I don't see the sysctl interface in the patch, what am I missing? > > FYI they are chosen by the Kconfig options and live in kernel/sysctl.c. Got it, that's what I was looking for, I had completely forgotten about how we got here. > And I believe the debugfs interface (the counters) is inspired by the > original mips code. Pretty niche use case but can be handy at times... Right, I see what it does now, and I agree that this is not a problem. A tracepoint is probably an even better way to handle this flexibly, but since it's not a stable interface either way, this can be optimized later on. Arnd