Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v6 1/1] gpio: add sloppy logic analyzer using polling
Date: Wed, 22 Dec 2021 13:58:24 +0100	[thread overview]
Message-ID: <YcMg8NzjlNDLksNT@ninjato> (raw)
In-Reply-To: <CAMuHMdXn-cmK1HewukjOnjC1JEgfFfH7FW23YvPTKHcNCiet2w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2261 bytes --]


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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-12-22 12:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-19 13:24 [PATCH v6 0/1] gpio: add simple logic analyzer using polling Wolfram Sang
2021-12-19 13:24 ` [PATCH v6 1/1] gpio: add sloppy " Wolfram Sang
2021-12-20 14:12   ` Geert Uytterhoeven
2021-12-20 20:01     ` Geert Uytterhoeven
2021-12-22 10:19     ` Wolfram Sang
2021-12-22 10:35       ` Geert Uytterhoeven
2021-12-22 12:58         ` Wolfram Sang [this message]
2022-01-07 17:08           ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YcMg8NzjlNDLksNT@ninjato \
    --to=wsa+renesas@sang-engineering.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox