99#include <linux/pci.h>
1010#include <linux/interrupt.h>
1111#include <linux/group_cpus.h>
12- #include <linux/pfn_t.h>
1312#include <linux/memremap.h>
1413#include <linux/module.h>
1514#include <linux/virtio.h>
@@ -862,7 +861,7 @@ static void virtio_fs_requests_done_work(struct work_struct *work)
862861static void virtio_fs_map_queues (struct virtio_device * vdev , struct virtio_fs * fs )
863862{
864863 const struct cpumask * mask , * masks ;
865- unsigned int q , cpu ;
864+ unsigned int q , cpu , nr_masks ;
866865
867866 /* First attempt to map using existing transport layer affinities
868867 * e.g. PCIe MSI-X
@@ -882,7 +881,7 @@ static void virtio_fs_map_queues(struct virtio_device *vdev, struct virtio_fs *f
882881 return ;
883882fallback :
884883 /* Attempt to map evenly in groups over the CPUs */
885- masks = group_cpus_evenly (fs -> num_request_queues );
884+ masks = group_cpus_evenly (fs -> num_request_queues , & nr_masks );
886885 /* If even this fails we default to all CPUs use first request queue */
887886 if (!masks ) {
888887 for_each_possible_cpu (cpu )
@@ -891,7 +890,7 @@ static void virtio_fs_map_queues(struct virtio_device *vdev, struct virtio_fs *f
891890 }
892891
893892 for (q = 0 ; q < fs -> num_request_queues ; q ++ ) {
894- for_each_cpu (cpu , & masks [q ])
893+ for_each_cpu (cpu , & masks [q % nr_masks ])
895894 fs -> mq_map [cpu ] = q + VQ_REQUEST ;
896895 }
897896 kfree (masks );
@@ -1008,7 +1007,7 @@ static void virtio_fs_cleanup_vqs(struct virtio_device *vdev)
10081007 */
10091008static long virtio_fs_direct_access (struct dax_device * dax_dev , pgoff_t pgoff ,
10101009 long nr_pages , enum dax_access_mode mode ,
1011- void * * kaddr , pfn_t * pfn )
1010+ void * * kaddr , unsigned long * pfn )
10121011{
10131012 struct virtio_fs * fs = dax_get_private (dax_dev );
10141013 phys_addr_t offset = PFN_PHYS (pgoff );
@@ -1017,7 +1016,7 @@ static long virtio_fs_direct_access(struct dax_device *dax_dev, pgoff_t pgoff,
10171016 if (kaddr )
10181017 * kaddr = fs -> window_kaddr + offset ;
10191018 if (pfn )
1020- * pfn = phys_to_pfn_t (fs -> window_phys_addr + offset , 0 );
1019+ * pfn = PHYS_PFN (fs -> window_phys_addr + offset );
10211020 return nr_pages > max_nr_pages ? max_nr_pages : nr_pages ;
10221021}
10231022
0 commit comments