swiotlb-xen: suppress certain init retries
authorJan Beulich <jbeulich@suse.com>
Tue, 7 Sep 2021 12:05:54 +0000 (14:05 +0200)
committerJuergen Gross <jgross@suse.com>
Wed, 15 Sep 2021 06:42:04 +0000 (08:42 +0200)
Only on the 2nd of the paths leading to xen_swiotlb_init()'s "error"
label it is useful to retry the allocation; the first one did already
iterate through all possible order values.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/56477481-87da-4962-9661-5e1b277efde0@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/swiotlb-xen.c

index 08fc694f05b79d8555b68c0a752f47d4e3c8c46f..6520d05e62ef5a50e13a039f0fa81a4b8bc192fc 100644 (file)
@@ -184,7 +184,7 @@ retry:
                order--;
        }
        if (!start)
-               goto error;
+               goto exit;
        if (order != get_order(bytes)) {
                pr_warn("Warning: only able to allocate %ld MB for software IO TLB\n",
                        (PAGE_SIZE << order) >> 20);
@@ -214,6 +214,7 @@ error:
                pr_info("Lowering to %luMB\n", bytes >> 20);
                goto retry;
        }
+exit:
        pr_err("%s (rc:%d)\n", xen_swiotlb_error(m_ret), rc);
        return rc;
 }