Messages in this thread | | | Date | Mon, 17 Oct 2022 10:22:00 +0200 | From | "Arnd Bergmann" <> | Subject | Re: [PATCH] LoongArch: Add unaligned access support |
| |
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
| |