]> git.baikalelectronics.ru Git - kernel.git/commit
rpmsg: use less buffers when vrings are small
authorSuman Anna <s-anna@ti.com>
Tue, 16 Sep 2014 18:33:07 +0000 (13:33 -0500)
committerOhad Ben-Cohen <ohad@wizery.com>
Wed, 26 Nov 2014 16:24:36 +0000 (18:24 +0200)
commit2b84c936b51ac330c652c76017b62a7e5bd85bcb
tree50101517ccd4202654ac1146e6d2d2d9e3c9668f
parenteab860ea7c694551460224be5f21dd016f8a5473
rpmsg: use less buffers when vrings are small

Adjust the number of rpmsg buffers to rely on the size of the
vring, instead of using the hard coded value of 512 (256 per
direction).

This is needed when small vrings are being used, where 256
buffers are too much to fit in a vring.

While considering the vring size, keep using the 512 hard coded
value as an upper limit to avoid wacky resource tables consuming
unreasonable amount of memory.

NOTE: The number of buffers is already assumed to be symmetrical
in each direction, and that logic is unchanged.

Signed-off-by: Suman Anna <s-anna@ti.com>
[edit commit message, small code and comment simplification]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
drivers/rpmsg/virtio_rpmsg_bus.c