9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Brian L. Stuart" <blstuart@bellsouth.net>
To: <9fans@9fans.net>
Subject: [9fans] Plan9 on Pi 3B+
Date: Tue,  3 Apr 2018 18:52:28 +0000	[thread overview]
Message-ID: <1092190499.1253166.1522781548163@mail.yahoo.com> (raw)
In-Reply-To: <1092190499.1253166.1522781548163.ref@mail.yahoo.com>

Has anyone tried Plan 9 on the new Pi 3B+?  I've
run into something that confuses me a bit.  First,
it seems you need the new version of start_cd.elf
to bring up the 3B+.  However, with that, the kernel
throws a lock loop error.  In tracking down the loop,
it happens in startcpus() in archbcm2.c.  The code
here looks like:

    for(i = 0; i < ncpu; i++)
        lock(&startlock[i]);
    cachedwbse(startlock, sizeof startlock);
    for(i = 1; i < ncpu; i++) {
        if(startcpu(i) < 0)
            return i;
        lock(&startlock[i]);
        unlock(&startlock[i]);
    }

So we grab a lock on all the CPUs, then drop into
a second loop where we start CPUs 1 to n.  But
in that loop we grab the lock again and then
immediately unlock it.  This is where the lock
loop happens.  Everything seems to continue
to be happy on both a 2 and a 3B+ if I comment
out the lock in the second loop.  But what is the
rationale for the lock in the second loop?  Was
there a reason for putting it there, or was it an
oversight that wasn't exposed until the new boot
code?

Thanks,
BLS



       reply	other threads:[~2018-04-03 18:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1092190499.1253166.1522781548163.ref@mail.yahoo.com>
2018-04-03 18:52 ` Brian L. Stuart [this message]
2018-04-03 19:35   ` Erik Quanstrom
2018-04-03 21:05   ` Richard Miller
2018-04-04  0:30     ` Skip Tavakkolian
2018-04-05 14:17       ` Richard Miller
2018-04-05 15:03       ` Richard Miller
2018-04-05 17:02         ` Steve Simon
2018-04-05 20:25           ` Bakul Shah
2018-04-05 22:13             ` hiro
2018-04-05 22:40               ` Rui Carmo
2018-04-05 21:33           ` Richard Miller

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=1092190499.1253166.1522781548163@mail.yahoo.com \
    --to=blstuart@bellsouth.net \
    --cc=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).