Thread (8 messages) 8 messages, 2 authors, 2022-01-07

Re: [PATCH v6 1/1] gpio: add sloppy logic analyzer using polling

From: Wolfram Sang <wsa+renesas@sang-engineering.com>
Date: 2021-12-22 12:58:31
Also in: linux-renesas-soc, lkml
Subsystem: gpio uapi, the rest · Maintainers: Bartosz Golaszewski, Linus Torvalds

quoted
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##*/}

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help