Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4158170rwi; Mon, 17 Oct 2022 02:15:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Sc3LZ10A6vLM4bdsijMzWw78za54+DRafcz17uOBSlbBEpoCPvqeO5XZ6QdwJ8eTSkPIG X-Received: by 2002:a17:902:e94f:b0:17f:6df3:1a99 with SMTP id b15-20020a170902e94f00b0017f6df31a99mr11171806pll.20.1665998119180; Mon, 17 Oct 2022 02:15:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665998119; cv=none; d=google.com; s=arc-20160816; b=L9HS6L39Dn0Z89FO9GbkXTE25h6cxat+Ohrt6RbWrjM5B1LqBipRRjeiH7WLs93q69 ZZFGjCuYjXndDCAiY13Q11DotUVFR7m4liXwAalB2ZBQxh3ZoUpipPKVF9DkxuBprAPL 2SlhFsTwZJcgBlG9uURWKG1QOKz7VidIgvLDwRHSqliOOqCS2JS8zEGeflqhbUceZG86 p8g3vr7NYs4jn/6Kl7Bek0IgUGnV1m5XcFLYJvGo1JM71T5uaYnkbPPmNWGYiY2aHG9d sMscUrfz93ofJ9aadd2m3oFPge59ypFzJxf0ytxHdqR40AkA6U50idkdSgQAtwGFUNMO LpJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=gyBfJa1eOLn7mrcvT7v+17sbsp2akKfNFVudJCF/ZBE=; b=WdkiEvDecmiN/AnT1jG3R57lBCM20fxo9y6+gTZlfkx8k8UnqzrJFzltIlmhzyQnhm AivMWMfDxWbbLIX8rZav0VRTC6s2ReIMQsDnFQqknFU/3Vaic7i3CaavRZAxK7/Tz12l dTiF82JWcL8JYIMs+c/Z0e9k8Slozml3n5dwX8NTFTN+GPU/LsxXmb1oncdmOWaf9n7c b3ouzwTI1d9OasMjohsnRK5KJp9g7QhXoy910xCEHjxw80VpgbZPuTTUJfnlyQLGYdCv Ggfu4alHHJHYGGdro0rZUG8GUPweRhwAvID1VU7Ca1LyiHLWFo9bmmStg0SQ+dg1dUNK te5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=MJv7rbrd; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=JRpCbL54; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u1-20020a17090341c100b0017486813f81si12877956ple.528.2022.10.17.02.15.07; Mon, 17 Oct 2022 02:15:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=MJv7rbrd; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=JRpCbL54; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229810AbiJQIW4 (ORCPT + 99 others); Mon, 17 Oct 2022 04:22:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229606AbiJQIWy (ORCPT ); Mon, 17 Oct 2022 04:22:54 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C730A13CD9 for ; Mon, 17 Oct 2022 01:22:53 -0700 (PDT) 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 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 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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