lkml.org 
[lkml]   [2021]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v2 06/11] riscv: pgtable: Add DMA_COHERENT with custom PTE attributes
Στις 2021-06-06 12:04, guoren@kernel.org έγραψε:
> From: Guo Ren <guoren@linux.alibaba.com>
>
> The dma-noncoherent SOCs need different virtual memory mappings
> with different attributes:
> - noncached + Strong Order (for IO/DMA descriptor)
> - noncached + Weak Order (for writecombine usage, eg: frame
> buffer)
>
> All above base on PTE attributes by MMU hardware. That means
> address attributes are determined by PTE entry, not PMA. RISC-V
> soc vendors have defined their own custom PTE attributes for
> dma-noncoherency.
>

This patch violates the Privilege Spec section 4.4.1 that clearly
states:

"Bits63–54 are reserved for future standard use and must be zeroed by
software for forward compatibility"

Standard use means that valid values can only be defined by the Priv.
Spec, not by the vendor (otherwise they'd be marked as "custom use" or
"platform use"), and since they "must" be zeroed by software we 'll be
violating the Privilege Spec if we do otherwise.

\
 
 \ /
  Last update: 2021-06-06 19:22    [W:0.291 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site