From: Mike Frysinger <vapier@gentoo.org>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: Sim bfin build failure with gcc 11
Date: Fri, 28 May 2021 23:32:32 -0400 [thread overview]
Message-ID: <YLG10BFzN+amfu2I@vapier> (raw)
In-Reply-To: <53def67b-7cca-7d66-202c-cd0826537187@polymtl.ca>
On 28 May 2021 21:52, Simon Marchi via Gdb-patches wrote:
> On 2021-05-23 10:16 p.m., Mike Frysinger wrote:
> > static void
> > bfin_otp_write_page (struct bfin_otp *otp, bu16 page)
> > {
> > - bfin_otp_write_page_val2 (otp, page, otp->data0, otp->data1);
> > + bfin_otp_write_page_val2 (otp, page, (bu64)otp->data1 | otp->data0,
> > + (bu64)otp->data3 | otp->data2);
>
> I really don't know what this is doing but... did you mean to have some
> shifts in there?
err, yeah. thanks.
-mike
commit f006d9e205f729aad48c0876eb8cd8feb70a6972
Author: Mike Frysinger <vapier@gentoo.org>
Date: Fri May 28 23:29:40 2021 -0400
sim: bfin: fix the otp fix fix
Need to shift the upper 32-bits and not just combine directly with
the lower 32-bits.
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
index 29dfde8fe6e3..e5b644990947 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -1,3 +1,7 @@
+2021-05-28 Mike Frysinger <vapier@gentoo.org>
+
+ * dv-bfin_otp.c (bfin_otp_write_page): Shift data1 & data3 by 32-bits.
+
2021-05-23 Mike Frysinger <vapier@gentoo.org>
* dv-bfin_otp.c (bfin_otp_write_page): Fix args to
diff --git a/sim/bfin/dv-bfin_otp.c b/sim/bfin/dv-bfin_otp.c
index cdc010ae551b..a9f768d0c0ea 100644
--- a/sim/bfin/dv-bfin_otp.c
+++ b/sim/bfin/dv-bfin_otp.c
@@ -91,8 +91,8 @@ bfin_otp_write_page_val2 (struct bfin_otp *otp, bu16 page, bu64 lo, bu64 hi)
static void
bfin_otp_write_page (struct bfin_otp *otp, bu16 page)
{
- bfin_otp_write_page_val2 (otp, page, (bu64)otp->data1 | otp->data0,
- (bu64)otp->data3 | otp->data2);
+ bfin_otp_write_page_val2 (otp, page, ((bu64)otp->data1 << 32) | otp->data0,
+ ((bu64)otp->data3 << 32) | otp->data2);
}
static unsigned
prev parent reply other threads:[~2021-05-29 3:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 0:51 Simon Marchi
2021-05-24 1:37 ` Mike Frysinger
2021-05-24 1:41 ` Simon Marchi
2021-05-24 2:16 ` Mike Frysinger
2021-05-29 1:52 ` Simon Marchi
2021-05-29 3:32 ` Mike Frysinger [this message]
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=YLG10BFzN+amfu2I@vapier \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@polymtl.ca \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).