staging: vc04_services: add vchiq_pagelist_info structure
authorMichael Zoran <mzoran@crowfest.net>
Mon, 7 Nov 2016 14:06:03 +0000 (06:06 -0800)
committerJaechul Lee <jcsing.lee@samsung.com>
Fri, 18 Aug 2017 01:04:49 +0000 (10:04 +0900)
commit65111999893a55a2629ece271410bf62385f7069
tree53d815082113affc4d4fe976ca79badb47d71f74
parentd90b6d5b082a8a53d097bef3df35405c00870965
staging: vc04_services: add vchiq_pagelist_info structure

The current dma_map_sg based implementation for bulk messages
computes many offsets into a single allocation multiple times in
both the create and free code paths.  This is inefficient,
error prone and in fact still has a few lingering issues
with arm64.

This change replaces a small portion of that inplementation with
new code that uses a new struct vchiq_pagelist_info to store the
needed information rather then complex offset calculations.

This improved implementation should be more efficient and easier
to understand and maintain.

Tests Run(Both Pass):
vchiq_test -p 1
vchiq_test -f 10

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c