[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <adahc071ie4.fsf@cisco.com>
Date: Wed, 29 Apr 2009 10:25:55 -0700
From: Roland Dreier <rdreier@...co.com>
To: Jeff Garzik <jeff@...zik.org>
Cc: Ingo Molnar <mingo@...e.hu>, David Miller <davem@...emloft.net>,
Linus Torvalds <torvalds@...ux-foundation.org>, hpa@...or.com,
tglx@...utronix.de, h.mitake@...il.com, rpjday@...shcourse.ca,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: Remove readq()/writeq() on 32-bit
> This removal patch is completely pointless, because it moves us
> backwards to the point where we had a bunch of drivers defining it.
No, the current kernel still requires drivers to define it anyway,
because there are tons of 32-bit architectures that are not x86.
And more than that, centralizing the definition makes the API much more
dangerous for driver authors.
> At least the networking drivers I messed with (until 11/2008) were
> always fine with a non-atomic readq.
The commit to niu I keep citing (e23a59e1, "niu: Fix readq
implementation when architecture does not provide one.") shows that
drivers need to take care. Now, the x86 implementation would happen to
work for that hardware, but eg drivers/infiniband/hw/amso1100 defines
readq with the opposite order -- whether that's required or just an
arbitrary choice, I don't know. And drivers/infiniband/hw/mthca has
some uses of __raw_writeq() that only work if no other CPU accesses to
the same page can happen between the two halves, so it adds a per-page
spinlock for 32-bit architectures. etc.
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists