OSDN Git Service

iommu/iommu-debug: Don't add debugfs entries until we init
authorMitchel Humpherys <mitchelh@codeaurora.org>
Tue, 14 Jul 2015 21:30:33 +0000 (14:30 -0700)
committerDavid Keitel <dkeitel@codeaurora.org>
Tue, 22 Mar 2016 18:13:34 +0000 (11:13 -0700)
commitf0abe729244069c89906418be1824e103ca8dca6
tree4b40580deeea100b9d99243e74517d478a0c203a
parent844ca444df0061a826c0b4b5b908ebb9563911b3
iommu/iommu-debug: Don't add debugfs entries until we init

The attachment tracking code adds a node to debugfs every time a client
attaches a domain to an IOMMU device.  The problem is that clients can
start making those attachments during early boot, before iommu-debug
initializes (including setting up the root debugfs directory for the
attachment tracking), which means they get stuck in the root debugfs
directory.  Trying to initialize iommu-debug earlier than all possible
IOMMU clients is tricky, so fix this by only installing debugfs entries
onces we've initialized, installing debugfs entries for any early
attachments at initialization time.

Change-Id: I8364015346105187e0c8f787fc2b4155d72b3584
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
drivers/iommu/iommu-debug.c