Re: [PATCH v5 09/10] VAS: Define vas_tx_win_open()

From: Sukadev Bhattiprolu
Date: Tue Jun 06 2017 - 21:35:56 EST


Sukadev Bhattiprolu [sukadev@xxxxxxxxxxxxxxxxxx] wrote:
> +static void *map_paste_region(char *name, uint64_t start, int len)
> +{
> + void *map;
> +
> + if (!request_mem_region(start, len, name)) {
> + pr_devel("%s(): request_mem_region(0x%llx, %d) failed\n",
> + __func__, start, len);
> + return NULL;
> + }
> +
> + map = __ioremap(start, len, pgprot_val(pgprot_cached(__pgprot(0))));
> + if (!map) {
> + pr_devel("%s(): ioremap(0x%llx, %d) failed\n", __func__, start,
> + len);
> + return NULL;
> + }
> +
> + return map;
> +}

Based on Ben Herrenschmidt and Michael Ellerman's comments, replaced the
__ioremap() call above with ioremap_cache(start, len). Here is the updated
patch.

---