From: "Paul E. McKenney" <paulmck@linux.ibm.com> To: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>, Peter Zijlstra <peterz@infradead.org>, Will Deacon <Will.Deacon@arm.com>, arcml <linux-snps-arc@lists.infradead.org>, lkml <linux-kernel@vger.kernel.org>, "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org> Subject: Re: single copy atomicity for double load/stores on 32-bit systems Date: Thu, 6 Jun 2019 02:43:40 -0700 [thread overview] Message-ID: <20190606094340.GD28207@linux.ibm.com> (raw) In-Reply-To: <CAMuHMdW-8Jt80mSyHTYmj6354-3f1=Vp_8dY-Nite1ERpUCFew@mail.gmail.com> On Tue, Jun 04, 2019 at 09:41:04AM +0200, Geert Uytterhoeven wrote: > Hi Paul, > > On Mon, Jun 3, 2019 at 10:14 PM Paul E. McKenney <paulmck@linux.ibm.com> wrote: > > On Mon, Jun 03, 2019 at 06:08:35PM +0000, Vineet Gupta wrote: > > > On 5/31/19 1:21 AM, Peter Zijlstra wrote: > > > >> I'm not sure how to interpret "natural alignment" for the case of double > > > >> load/stores on 32-bit systems where the hardware and ABI allow for 4 byte > > > >> alignment (ARCv2 LDD/STD, ARM LDRD/STRD ....) > > > > Natural alignment: !((uintptr_t)ptr % sizeof(*ptr)) > > > > > > > > For any u64 type, that would give 8 byte alignment. the problem > > > > otherwise being that your data spans two lines/pages etc.. > > > > > > Sure, but as Paul said, if the software doesn't expect them to be atomic by > > > default, they could span 2 hardware lines to keep the implementation simpler/sane. > > > > I could imagine 8-byte types being only four-byte aligned on 32-bit systems, > > but it would be quite a surprise on 64-bit systems. > > Or two-byte aligned? > > M68k started with a 16-bit data bus, and alignment rules were retained > when gaining a wider data bus. > > BTW, do any platforms have issues with atomicity of 4-byte types on > 16-bit data buses? I believe some embedded ARM or PowerPC do have > such buses. But m68k is !SMP-only, correct? If so, the only issues would be interactions with interrupt handlers and the like, and doesn't current m68k hardware use exact interrupts? Or is it still possible to interrupt an m68k in the middle of an instruction like it was in the bad old days? Thanx, Paul > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds
WARNING: multiple messages have this Message-ID (diff)
From: paulmck@linux.ibm.com (Paul E. McKenney) To: linux-snps-arc@lists.infradead.org Subject: single copy atomicity for double load/stores on 32-bit systems Date: Thu, 6 Jun 2019 02:43:40 -0700 [thread overview] Message-ID: <20190606094340.GD28207@linux.ibm.com> (raw) In-Reply-To: <CAMuHMdW-8Jt80mSyHTYmj6354-3f1=Vp_8dY-Nite1ERpUCFew@mail.gmail.com> On Tue, Jun 04, 2019@09:41:04AM +0200, Geert Uytterhoeven wrote: > Hi Paul, > > On Mon, Jun 3, 2019@10:14 PM Paul E. McKenney <paulmck@linux.ibm.com> wrote: > > On Mon, Jun 03, 2019@06:08:35PM +0000, Vineet Gupta wrote: > > > On 5/31/19 1:21 AM, Peter Zijlstra wrote: > > > >> I'm not sure how to interpret "natural alignment" for the case of double > > > >> load/stores on 32-bit systems where the hardware and ABI allow for 4 byte > > > >> alignment (ARCv2 LDD/STD, ARM LDRD/STRD ....) > > > > Natural alignment: !((uintptr_t)ptr % sizeof(*ptr)) > > > > > > > > For any u64 type, that would give 8 byte alignment. the problem > > > > otherwise being that your data spans two lines/pages etc.. > > > > > > Sure, but as Paul said, if the software doesn't expect them to be atomic by > > > default, they could span 2 hardware lines to keep the implementation simpler/sane. > > > > I could imagine 8-byte types being only four-byte aligned on 32-bit systems, > > but it would be quite a surprise on 64-bit systems. > > Or two-byte aligned? > > M68k started with a 16-bit data bus, and alignment rules were retained > when gaining a wider data bus. > > BTW, do any platforms have issues with atomicity of 4-byte types on > 16-bit data buses? I believe some embedded ARM or PowerPC do have > such buses. But m68k is !SMP-only, correct? If so, the only issues would be interactions with interrupt handlers and the like, and doesn't current m68k hardware use exact interrupts? Or is it still possible to interrupt an m68k in the middle of an instruction like it was in the bad old days? Thanx, Paul > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds
next prev parent reply other threads:[~2019-06-06 9:43 UTC|newest] Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-05-30 18:22 single copy atomicity for double load/stores on 32-bit systems Vineet Gupta 2019-05-30 18:22 ` Vineet Gupta 2019-05-30 18:53 ` Paul E. McKenney 2019-05-30 18:53 ` Paul E. McKenney 2019-05-30 19:16 ` Vineet Gupta 2019-05-30 19:16 ` Vineet Gupta 2019-05-31 8:23 ` Peter Zijlstra 2019-05-31 8:23 ` Peter Zijlstra 2019-05-31 8:25 ` Peter Zijlstra 2019-05-31 8:25 ` Peter Zijlstra 2019-05-31 8:21 ` Peter Zijlstra 2019-05-31 8:21 ` Peter Zijlstra 2019-06-03 18:08 ` Vineet Gupta 2019-06-03 18:08 ` Vineet Gupta 2019-06-03 20:13 ` Paul E. McKenney 2019-06-03 20:13 ` Paul E. McKenney 2019-06-03 21:59 ` Vineet Gupta 2019-06-03 21:59 ` Vineet Gupta 2019-06-04 7:41 ` Geert Uytterhoeven 2019-06-04 7:41 ` Geert Uytterhoeven 2019-06-04 7:41 ` Geert Uytterhoeven 2019-06-06 9:43 ` Paul E. McKenney [this message] 2019-06-06 9:43 ` Paul E. McKenney 2019-06-06 9:53 ` Geert Uytterhoeven 2019-06-06 9:53 ` Geert Uytterhoeven 2019-06-06 16:34 ` David Laight 2019-06-06 16:34 ` David Laight 2019-06-06 21:17 ` Paul E. McKenney 2019-06-06 21:17 ` Paul E. McKenney 2019-06-03 18:43 ` Vineet Gupta 2019-06-03 18:43 ` Vineet Gupta 2019-07-01 20:05 ` Vineet Gupta 2019-07-01 20:05 ` Vineet Gupta 2019-07-02 10:46 ` Will Deacon 2019-07-02 10:46 ` Will Deacon 2019-05-31 9:41 ` David Laight 2019-05-31 9:41 ` David Laight 2019-05-31 9:41 ` David Laight 2019-05-31 11:44 ` Paul E. McKenney 2019-05-31 11:44 ` Paul E. McKenney 2019-06-03 18:44 ` Vineet Gupta 2019-06-03 18:44 ` Vineet Gupta
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=20190606094340.GD28207@linux.ibm.com \ --to=paulmck@linux.ibm.com \ --cc=Vineet.Gupta1@synopsys.com \ --cc=Will.Deacon@arm.com \ --cc=geert@linux-m68k.org \ --cc=linux-arch@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-snps-arc@lists.infradead.org \ --cc=peterz@infradead.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.