OSDN Git Service

mm/hmm: define the pre-processor related parts of hmm.h even if disabled
authorJason Gunthorpe <jgg@mellanox.com>
Tue, 12 Nov 2019 20:22:21 +0000 (16:22 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Sat, 23 Nov 2019 23:56:44 +0000 (19:56 -0400)
commit107e899874e95dcddc779142942bf285eba38bc5
tree163ec4747888c248d4177082c7bfa06c8105ec99
parent04ec32fbc2b29a640d67872d2f88daac4c73e45b
mm/hmm: define the pre-processor related parts of hmm.h even if disabled

Only the function calls are stubbed out with static inlines that always
fail. This is the standard way to write a header for an optional component
and makes it easier for drivers that only optionally need HMM_MIRROR.

Link: https://lore.kernel.org/r/20191112202231.3856-5-jgg@ziepe.ca
Reviewed-by: Jérôme Glisse <jglisse@redhat.com>
Tested-by: Ralph Campbell <rcampbell@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
include/linux/hmm.h
kernel/fork.c