Re: [PATCH 4/5] RFC: mmc: block: Convert RPMB to a character device
From: Christoph Hellwig <hch@lst.de>
Date: 2017-06-16 07:45:43
Also in:
linux-mmc
From: Christoph Hellwig <hch@lst.de>
Date: 2017-06-16 07:45:43
Also in:
linux-mmc
On Thu, Jun 15, 2017 at 02:12:58PM +0200, Linus Walleij wrote:
Currently the RPMB partition spawns a separate block device named /dev/mmcblkNrpmb for each device with an RPMB partition, including the creation of a block queue with its own kernel thread and all overhead associated with this. On the Ux500 HREFv60 platform, for example, the two eMMCs means that two block queues with separate threads are created for no use whatsoever.
Yikes! What an amazingly stupid design decision.
This patch tries to amend the situation using the following strategy: - Stop creating a block device for the RPMB partition/area - Instead create a custom, dynamic character device with the same name. - Make this new character device support exactly the same set of ioctl()s as the old block device. - Wrap the requests back to the same ioctl() handlers, but issue them on the block queue of the main partition/area, i.e. /dev/mmcblkN
Is it really worth to add all this code to work around the issue? We could still keep the block device around and stub out anything not needed.
Tomas Winkler [off-list ref] Signed-off-by: Linus Walleij <redacted>
I think some tag is missing before Tomas' name.