• Nishanth Aravamudan's avatar
    powerpc: Ensure dtl buffers do not cross 4k boundary · af442a1b
    Nishanth Aravamudan authored
    Future releases of fimrware will enforce a requirement that DTL buffers
    do not cross a 4k boundary. Commit
    127493d5 satisfies this requirement for
    CONFIG_VIRT_CPU_ACCOUNTING=y kernels, but if !CONFIG_VIRT_CPU_ACCOUNTING
    && CONFIG_DTL=y, the current code will fail at dtl registration time.
    Fix this by making the kmem cache from
    127493d5 visible outside of setup.c and
    using the same cache in both dtl.c and setup.c. This requires a bit of
    reorganization to ensure ordering of the kmem cache and buffer
    allocations.
    
    Note: Since firmware now limits the size of the buffer, I made
    dtl_buf_entries read-only in debugfs.
    
    Tested with upcoming firmware with the 4 combinations of
    CONFIG_VIRT_CPU_ACCOUNTING and CONFIG_DTL.
    Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Anton Blanchard <anton@samba.org>
    Cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    af442a1b
setup.c 18.2 KB