lkml.org 
[lkml]   [2021]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v6 1/1] gpio: add sloppy logic analyzer using polling

> > Yes, the search engines helped[1]. I run a minimal system, so when I
> > mount cpusets, it will actually mount cgroups with a default mount
> > option of "noprefix". But you likely run a rootfs with cgroups already,
> > so it gets mounted directly without "noprefix". Then, when the logic
> > analyzer tries to mount again, the implied default "noprefix" is
> > discarded.
>
> Yeah, systemd on Debian has it mounted.

So, the proper solution is to use/mount 'cgroups2' instead of 'cpuset'.
But this needs more thinking and testing and, thus, another revision.
Dunno if I can make it this year, so I am probably going to miss the
next merge window after all :(

Geert, if you still want to test the PFC patch I sent, then this patch
for the script should get you going:

diff --git a/tools/gpio/gpio-sloppy-logic-analyzer b/tools/gpio/gpio-sloppy-logic-analyzer
index eb2065fe6733..f1bfdd3568cf 100755
--- a/tools/gpio/gpio-sloppy-logic-analyzer
+++ b/tools/gpio/gpio-sloppy-logic-analyzer
@@ -80,13 +80,13 @@ init_cpu()
mount | grep -q $cpusetdir || mount -t cpuset cpuset $cpusetdir
[ -d "$lacpusetdir" ] || mkdir "$lacpusetdir"

- cur_cpu="$(cat "$lacpusetdir"/cpus)"
+ cur_cpu="$(cat "$lacpusetdir"/cpuset.cpus)"
[ "$cur_cpu" = "$isol_cpu" ] && return
[ -z "$cur_cpu" ] || fail "CPU$isol_cpu requested but CPU$cur_cpu already isolated"

- echo "$isol_cpu" > "$lacpusetdir"/cpus || fail "Could not isolate CPU$isol_cpu. Does it exist?"
- echo 1 > "$lacpusetdir"/cpu_exclusive
- echo 0 > "$lacpusetdir"/mems
+ echo "$isol_cpu" > "$lacpusetdir"/cpuset.cpus || fail "Could not isolate CPU$isol_cpu. Does it exist?"
+ echo 1 > "$lacpusetdir"/cpuset.cpu_exclusive
+ echo 0 > "$lacpusetdir"/cpuset.mems

oldmask=$(cat /proc/irq/default_smp_affinity)
newmask=$(printf "%x" $((0x$oldmask & ~(1 << isol_cpu))))
@@ -213,7 +213,7 @@ if [ -n "$triggerdat" ]; then
printf "$trigger_bindat" > "$lasysfsdir"/trigger 2>/dev/null || fail "Trigger data '$triggerdat' rejected"
fi

-workcpu=$(cat "$lacpusetdir"/effective_cpus)
+workcpu=$(cat "$lacpusetdir"/cpuset.effective_cpus)
[ -n "$workcpu" ] || fail "No isolated CPU found"
cpumask=$(printf '%x' $((1 << workcpu)))
instance=${lasysfsdir##*/}
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-12-22 13:59    [W:0.069 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site