summaryrefslogtreecommitdiff
path: root/mm/page_owner.c
diff options
context:
space:
mode:
authorAlan Mikhak <alan.mikhak@sifive.com>2019-10-09 20:06:56 +0300
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2019-10-15 17:47:54 +0300
commitdaee4f4e42c792997f4fee47dcdfa65dd720ec02 (patch)
tree5bf93bf90681ed553446f5c0822fda695c9b3721 /mm/page_owner.c
parent54ecb8f7028c5eb3d740bb82b0f1d90f2df63c5c (diff)
downloadlinux-daee4f4e42c792997f4fee47dcdfa65dd720ec02.tar.xz
PCI: endpoint: Cast the page number to phys_addr_t
Modify pci_epc_mem_alloc_addr() to cast the variable 'pageno' from type 'int' to 'phys_addr_t' before shifting left. This cast is needed to avoid treating bit 31 of 'pageno' as the sign bit which would otherwise get sign-extended to produce a negative value. When added to the base address of PCI memory space, the negative value would produce an invalid physical address which falls before the start of the PCI memory space. Signed-off-by: Alan Mikhak <alan.mikhak@sifive.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'mm/page_owner.c')
0 files changed, 0 insertions, 0 deletions