irq = platform_get_irq(pdev, 0);
if (irq <= 0) {
- dev_dbg(dev, "Unable to find IRQ resource\n");
+ dev_err(dev, "Unable to find IRQ resource\n");
return irq;
}
short *pgcnt)
{
if (size == SPAGE_SIZE) {
- if (!lv2ent_fault(pent)) {
- WARN(1, "Trying mapping on 4KiB where mapping exists");
+ if (WARN_ON(!lv2ent_fault(pent)))
return -EADDRINUSE;
- }
*pent = mk_lv2ent_spage(paddr);
pgtable_flush(pent, pent + 1);
} else { /* size == LPAGE_SIZE */
int i;
for (i = 0; i < SPAGES_PER_LPAGE; i++, pent++) {
- if (!lv2ent_fault(pent)) {
- WARN(1,
- "Trying mapping on 64KiB where mapping exists");
+ if (WARN_ON(!lv2ent_fault(pent))) {
if (i > 0)
memset(pent - i, 0, sizeof(*pent) * i);
return -EADDRINUSE;
}
if (ret)
- pr_debug("%s: Failed to map iova %#x/%#zx bytes\n",
- __func__, iova, size);
+ pr_err("%s: Failed(%d) to map %#zx bytes @ %#x\n",
+ __func__, ret, size, iova);
spin_unlock_irqrestore(&priv->pgtablelock, flags);
ent = section_entry(priv->pgtable, iova);
if (lv1ent_section(ent)) {
- if (size < SECT_SIZE) {
+ if (WARN_ON(size < SECT_SIZE)) {
err_pgsize = SECT_SIZE;
goto err;
}
}
/* lv1ent_large(ent) == true here */
- if (size < LPAGE_SIZE) {
+ if (WARN_ON(size < LPAGE_SIZE)) {
err_pgsize = LPAGE_SIZE;
goto err;
}
err:
spin_unlock_irqrestore(&priv->pgtablelock, flags);
- WARN(1,
- "%s: Failed due to size(%#zx) @ %#x is smaller than page size %#zx\n",
- __func__, size, iova, err_pgsize);
+ pr_err("%s: Failed: size(%#zx) @ %#x is smaller than page size %#zx\n",
+ __func__, size, iova, err_pgsize);
return 0;
}