]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Ensure dtl buffers do not cross 4k boundary
authorNishanth Aravamudan <nacc@us.ibm.com>
Wed, 4 May 2011 12:54:16 +0000 (12:54 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 19 May 2011 04:30:41 +0000 (14:30 +1000)
commit5480f14d34e57c1a73aa35fe1e3d61caacfc4dc5
tree8f0670e0fa3358eb46afcae2b4e1b0197d8f7d72
parenteb30ec7d2662102939c85a3ab4a015b16f7625e8
powerpc: Ensure dtl buffers do not cross 4k boundary

Future releases of fimrware will enforce a requirement that DTL buffers
do not cross a 4k boundary. Commit
c2d2d0baeb07d249d0761229ad8784840b4ef3f9 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
c2d2d0baeb07d249d0761229ad8784840b4ef3f9 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: Nishanth 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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/include/asm/lppaca.h
arch/powerpc/platforms/pseries/dtl.c
arch/powerpc/platforms/pseries/setup.c