Commit 0d5ffd9a authored by Christoph Hellwig's avatar Christoph Hellwig

swiotlb: rename swiotlb_late_init_with_default_size

swiotlb_late_init_with_default_size is an overly verbose name that
doesn't even catch what the function is doing, given that the size is
not just a default but the actual requested size.

Rename it to swiotlb_init_late.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
parent a2daa27c
...@@ -57,7 +57,7 @@ static void sta2x11_new_instance(struct pci_dev *pdev) ...@@ -57,7 +57,7 @@ static void sta2x11_new_instance(struct pci_dev *pdev)
int size = STA2X11_SWIOTLB_SIZE; int size = STA2X11_SWIOTLB_SIZE;
/* First instance: register your own swiotlb area */ /* First instance: register your own swiotlb area */
dev_info(&pdev->dev, "Using SWIOTLB (size %i)\n", size); dev_info(&pdev->dev, "Using SWIOTLB (size %i)\n", size);
if (swiotlb_late_init_with_default_size(size)) if (swiotlb_init_late(size))
dev_emerg(&pdev->dev, "init swiotlb failed\n"); dev_emerg(&pdev->dev, "init swiotlb failed\n");
} }
list_add(&instance->list, &sta2x11_instance_list); list_add(&instance->list, &sta2x11_instance_list);
......
...@@ -40,7 +40,7 @@ extern void swiotlb_init(int verbose); ...@@ -40,7 +40,7 @@ extern void swiotlb_init(int verbose);
int swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose); int swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose);
unsigned long swiotlb_size_or_default(void); unsigned long swiotlb_size_or_default(void);
extern int swiotlb_late_init_with_tbl(char *tlb, unsigned long nslabs); extern int swiotlb_late_init_with_tbl(char *tlb, unsigned long nslabs);
extern int swiotlb_late_init_with_default_size(size_t default_size); int swiotlb_init_late(size_t size);
extern void __init swiotlb_update_mem_attributes(void); extern void __init swiotlb_update_mem_attributes(void);
phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, phys_addr_t phys, phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, phys_addr_t phys,
......
...@@ -281,11 +281,9 @@ swiotlb_init(int verbose) ...@@ -281,11 +281,9 @@ swiotlb_init(int verbose)
* initialize the swiotlb later using the slab allocator if needed. * initialize the swiotlb later using the slab allocator if needed.
* This should be just like above, but with some error catching. * This should be just like above, but with some error catching.
*/ */
int int swiotlb_init_late(size_t size)
swiotlb_late_init_with_default_size(size_t default_size)
{ {
unsigned long nslabs = unsigned long nslabs = ALIGN(size >> IO_TLB_SHIFT, IO_TLB_SEGSIZE);
ALIGN(default_size >> IO_TLB_SHIFT, IO_TLB_SEGSIZE);
unsigned long bytes; unsigned long bytes;
unsigned char *vstart = NULL; unsigned char *vstart = NULL;
unsigned int order; unsigned int order;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment