mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.7-rc1-mm1
Date: 01 Jun 2004 00:38:14 -0600	[thread overview]
Message-ID: <m11xkzye95.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20040527015259.3525cbbc.akpm@osdl.org>

Andrew Morton <akpm@osdl.org> writes:

> add-i386-readq.patch
>   add i386 readq()/writeq()

- Again this is logically broken.

  On 32bit-PCI bursts (the basic unit of transfer) can be split and
  merged on 32bit boundaries so you can't be atomic on the bus.  But
  note even if a  64bit transaction is split (which is unlikely) the
  order of the operations on the device will remain the same because
  of pci ordering rules.

  On 64bit-PCI bursts can only be split on 64bit boundaries so there
  are 64bit atomic cycles on the bus.

  In PCI-X bursts can only be split when the address is a multiple
  of 128.  So cards can care about atomic 64bit cycles.

  In PCI-E switches do not touch the packets and devices are explicitly
  allowed to reject any packet they don't like.

So a readq or a writeq can on existing hardware be detected, and cared
about.

The strongest argument that this readq/writeq is broken
is this chunk of the hpet patch.

+#if BITS_PER_LONG == 64
+#define        write_counter(V, MC)    writeq(V, MC)
+#define        read_counter(MC)        readq(MC)
+#else
+#define        write_counter(V, MC)    writel(V, MC)
+#define        read_counter(MC)        readl(MC)
+#endif

The code still cares and does not trust the readq/writeq emulations
to do the same thing as their atomic counter parts.

So would a patch that names those helper functions readl2 and writel2
be acceptable?  Just so it is clear what they do?

Eric

      parent reply	other threads:[~2004-06-01  6:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-27  8:52 2.6.7-rc1-mm1 Andrew Morton
2004-05-27 11:53 ` 2.6.7-rc1-mm1 Andrey Panin
2004-05-27 18:20   ` 2.6.7-rc1-mm1 Andrew Morton
2004-05-28  5:46     ` 2.6.7-rc1-mm1 Andrey Panin
2004-05-28  5:52       ` 2.6.7-rc1-mm1 Andrew Morton
2004-05-28  6:05         ` 2.6.7-rc1-mm1 Andrey Panin
2004-05-28 10:37         ` 2.6.7-rc1-mm1 Dave Jones
2004-05-27 16:25 ` 2.6.7-rc1-mm1 (compile stats) John Cherry
2004-05-28  2:57   ` Rik van Riel
2004-05-28 12:32     ` [patch] 2.6.7-rc1-mm1: fix set_8042_nomux warning Adrian Bunk
2004-05-28 19:25 ` 2.6.7-rc1-mm1 Rafał 'rmrmg' Roszak
2004-06-01  6:33 ` 2.6.7-rc1-mm1 Eric W. Biederman
2004-06-01  6:39   ` 2.6.7-rc1-mm1 Andrew Morton
2004-06-01  7:26     ` [Fastboot] 2.6.7-rc1-mm1 Eric W. Biederman
2004-06-01  6:38 ` Eric W. Biederman [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=m11xkzye95.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®