[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b721f417-55aa-2bb0-a223-2118ae4cbc30@huawei.com>
Date: Tue, 14 Mar 2023 19:31:41 +0800
From: liulongfang <liulongfang@...wei.com>
To: Jason Gunthorpe <jgg@...dia.com>
CC: <alex.williamson@...hat.com>,
<shameerali.kolothum.thodi@...wei.com>,
<jonathan.cameron@...wei.com>, <cohuck@...hat.com>,
<linux-kernel@...r.kernel.org>, <linuxarm@...neuler.org>
Subject: Re: [PATCH v8 1/5] vfio/migration: Add debugfs to live migration
driver
On 2023/3/14 17:32, liulongfang wrote:
> On 2023/3/11 1:12, Jason Gunthorpe wrote:
>> On Fri, Feb 17, 2023 at 04:48:27PM +0800, Longfang Liu wrote:
>>> +void vfio_vf_debugfs_init(struct vfio_device *vdev)
>>> +{
>>> + struct device *dev = &vdev->device;
>>> +
>>> + vdev->debug_root = debugfs_create_dir(dev_name(vdev->dev), vfio_debugfs_root);
>>> +
>>> + debugfs_create_devm_seqfile(dev, "migration_state", vdev->debug_root,
>>> + vfio_vf_state_read);
>>> +}
>>> +EXPORT_SYMBOL_GPL(vfio_vf_debugfs_init);
>>> +
>>> +void vfio_vf_debugfs_exit(struct vfio_device *vdev)
>>> +{
>>> + debugfs_remove_recursive(vdev->debug_root);
>>> +}
>>> +EXPORT_SYMBOL_GPL(vfio_vf_debugfs_exit);
>>> +
>>> +void vfio_debugfs_create_root(void)
>>> +{
>>> + vfio_debugfs_root = debugfs_create_dir("vfio", NULL);
>>> +}
>>> +EXPORT_SYMBOL_GPL(vfio_debugfs_create_root);
>>> +
>>> +void vfio_debugfs_remove_root(void)
>>> +{
>>> + debugfs_remove_recursive(vfio_debugfs_root);
>>> + vfio_debugfs_root = NULL;
>>> +}
>>> +EXPORT_SYMBOL_GPL(vfio_debugfs_remove_root);
>>
>> Why are these symbols exported?
>>
>
> If the export statement is not added, a compilation error will occur:
>
> ERROR: modpost: "vfio_vf_debugfs_init" [drivers/vfio/pci/hisilicon/hisi-acc-vfio-pci.ko] undefined!
> ERROR: modpost: "vfio_vf_debugfs_exit" [drivers/vfio/pci/hisilicon/hisi-acc-vfio-pci.ko] undefined!
> scripts/Makefile.modpost:126: recipe for target 'Module.symvers' failed
> make[1]: *** [Module.symvers] Error 1
>
The first two functions cannot remove the export statement,
but the latter two can be removed.
Thanks,
Longfang.
>
>> Jason
>>
>> .
> Thanks,
> Longfang
>
>>
Powered by blists - more mailing lists