From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] MIPS: Move cache sizes to Kconfig
Date: Sat, 28 May 2016 14:18:04 +0200 [thread overview]
Message-ID: <57498C7C.9090206@denx.de> (raw)
In-Reply-To: <20160527145406.GC23805@NP-P-BURTON>
On 05/27/2016 04:54 PM, Paul Burton wrote:
> On Fri, May 27, 2016 at 04:40:07PM +0200, Marek Vasut wrote:
>>> Hi Marek,
>>
>> Hi!
>
> Hi again Marek :)
Hi!
>>> We're already using the cache size auto-detection on Malta, and on 2
>>> other FPGA-based boards internally. I've submitted v2 which preserves
>>> CONFIG_SYS_CACHELINE_SIZE as a synonym of ARCH_DMA_MINALIGN for the
>>> drivers that are still using it.
>>
>> That's a good workaround for now. Would you be interested in fixing this
>> runtime cache configuration properly ?
>
> We use the runtime cache size detection on Malta, on SEAD3 & on Boston.
> The latter 2 aren't upstream yet of course, but all 3 are FPGA-based
> platforms used to develop, test & showcase new CPUs. As such the CPU (&
> by association the cache) can change just by flashing a new bitfile to
> the board, and it's very convenient for a single build of U-Boot to work
> regardless of the bitfile in use.
Right, this much I understand.
> It all works fine so long as drivers are well behaved, and nothing on
> any of those platforms uses CONFIG_SYS_CACHELINE_SIZE. I'm not sure
> there's anything to fix really apart from drivers should possibly move
> to use ARCH_DMA_MINALIGN, but I wouldn't feel comfortable doing a global
> replacement as I don't have a way to test many boards for other
> architectures.
I went through the u-boot sources again and it's mostly USB to blame,
but I don't think USB should use ARCH_DMA_MINALIGN. USB controllers
usually have their own DMA engine which might have different alignment
requirements from the one in the CPU. This would imply that the entire
concept of ARCH_DMA_MINALIGN is becoming increasingly inapplicable to
modern CPUs and we might need some sort of DMA API to deal with that.
But ok, that would be a lot of work far beyond the scope of this
patchset. I suspect setting CONFIG_SYS_CACHELINE_SIZE to sensible
default so it wouldn't break USB would be a good start. 128 might
be a good pick, since I don't think there are systems with cache
line size longer than that and so flushing/invalidating that much
would assure it works on whole cacheline at least.
>> Off-topic: Is malta that mipsfpga or is that something else ?
>> Can I synthesise that mipsfpga into some altera FPGA ? If so, which one
>> is a good pick ?
>
> I don't know much about the MIPSfpga project to be honest, but I can
> forward your question to someone who does.
That's OK, I will poke myself into it before bothering you with it, thanks!
> Thanks,
> Paul
>
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2016-05-28 12:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 15:58 [U-Boot] [PATCH 0/3] MIPS cache cleanups Paul Burton
2016-05-26 15:58 ` [U-Boot] [PATCH 1/3] MIPS: Move cache sizes to Kconfig Paul Burton
2016-05-26 16:10 ` Marek Vasut
2016-05-27 10:36 ` Paul Burton
2016-05-27 14:32 ` Marek Vasut
2016-05-27 14:34 ` Paul Burton
2016-05-27 14:40 ` Marek Vasut
2016-05-27 14:54 ` Paul Burton
2016-05-28 12:18 ` Marek Vasut [this message]
2016-05-27 15:43 ` Daniel Schwierzeck
2016-05-28 12:03 ` Marek Vasut
2016-05-31 16:21 ` Zubair Lutfullah Kakakhel
2016-05-31 8:00 ` Daniel Schwierzeck
2016-05-26 15:58 ` [U-Boot] [PATCH 2/3] MIPS: Split I & D cache line size config Paul Burton
2016-05-26 16:12 ` Marek Vasut
2016-05-27 11:21 ` Daniel Schwierzeck
2016-05-31 8:01 ` Daniel Schwierzeck
2016-05-26 15:58 ` [U-Boot] [PATCH 3/3] MIPS: Abstract cache op loops with a macro Paul Burton
2016-05-26 16:13 ` Marek Vasut
2016-05-27 10:30 ` Paul Burton
2016-05-27 14:36 ` Marek Vasut
2016-05-27 14:48 ` Paul Burton
2016-05-28 12:27 ` Marek Vasut
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=57498C7C.9090206@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/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 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.