pci_user: fix build for 32-bit platforms
Commit: f2f1ab39c0
("pci_user: call bus_translate_resource before BAR mmap")
broke build for 32-bit platforms due to rman_res_t and vm_paddr_t
incompatible types. Fix that.
This commit is contained in:
parent
f2f1ab39c0
commit
9857e00a52
@ -854,7 +854,7 @@ pci_bar_mmap(device_t pcidev, struct pci_bar_mmap *pbm)
|
||||
struct thread *td;
|
||||
struct sglist *sg;
|
||||
struct pci_map *pm;
|
||||
vm_paddr_t membase;
|
||||
rman_res_t membase;
|
||||
vm_paddr_t pbase;
|
||||
vm_size_t plen;
|
||||
vm_offset_t addr;
|
||||
@ -877,9 +877,8 @@ pci_bar_mmap(device_t pcidev, struct pci_bar_mmap *pbm)
|
||||
return (EBUSY); /* XXXKIB enable if _ACTIVATE */
|
||||
if (!PCI_BAR_MEM(pm->pm_value))
|
||||
return (EIO);
|
||||
membase = pm->pm_value & PCIM_BAR_MEM_BASE;
|
||||
error = BUS_TRANSLATE_RESOURCE(pcidev, SYS_RES_MEMORY, membase,
|
||||
&membase);
|
||||
error = BUS_TRANSLATE_RESOURCE(pcidev, SYS_RES_MEMORY,
|
||||
pm->pm_value & PCIM_BAR_MEM_BASE, &membase);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user