diff for duplicates of <20170424172527.GA15532@us.ibm.com> diff --git a/a/1.txt b/N1/1.txt index fdb734f..e3c67f8 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -2,34 +2,29 @@ Benjamin Herrenschmidt [benh@kernel.crashing.org] wrote: > On Thu, 2017-03-30 at 22:13 -0700, Sukadev Bhattiprolu wrote: > > +static void *map_mmio_region(char *name, uint64_t start, int len) > > +{ -> > +=A0=A0=A0=A0=A0=A0=A0void *map; +> > + void *map; > > + -> > +=A0=A0=A0=A0=A0=A0=A0if (!request_mem_region(start, len, name)) { -> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0pr_devel("%s(): request_m= -em_region(0x%llx, %d) failed\n", -> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= -=A0=A0=A0=A0=A0=A0=A0=A0__func__, start, len); -> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return NULL; -> > +=A0=A0=A0=A0=A0=A0=A0} +> > + if (!request_mem_region(start, len, name)) { +> > + pr_devel("%s(): request_mem_region(0x%llx, %d) failed\n", +> > + __func__, start, len); +> > + return NULL; +> > + } > > + -> > +=A0=A0=A0=A0=A0=A0=A0map =3D __ioremap(start, len, pgprot_val(pgprot_c= -ached(__pgprot(0)))); -> > +=A0=A0=A0=A0=A0=A0=A0if (!map) { -> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0pr_devel("%s(): ioremap(0= -x%llx, %d) failed\n", __func__, start, -> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= -=A0=A0=A0=A0=A0=A0=A0=A0len); -> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return NULL; -> > +=A0=A0=A0=A0=A0=A0=A0} +> > + 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; +> > + } > > + -> > +=A0=A0=A0=A0=A0=A0=A0return map; +> > + return map; > > +} ->=20 +> > That's very wrong. I assume this never worked right ? Untl recently, only tested on simics and has been working there. On the hardware, hitting a crash on the first mmio write... ->=20 +> > MMIO regions must be mapped non-cachable. Only the paste region which maybe due to this :-) Should I change to pgprot_noncached() for the @@ -40,14 +35,14 @@ MMIO writes? Ok. ->=20 +> > > +/* > > + * Unmap the MMIO regions for a window. > > + */ > > +static void unmap_wc_paste_kaddr(struct vas_window *window) > > +{ -> > +=A0=A0=A0=A0=A0=A0=A0int len; ->=20 +> > + int len; +> > Don't use "wc"... that usually means "write combine". Ok. diff --git a/a/content_digest b/N1/content_digest index be35361..5dab505 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -21,34 +21,29 @@ "> On Thu, 2017-03-30 at 22:13 -0700, Sukadev Bhattiprolu wrote:\n" "> > +static void *map_mmio_region(char *name, uint64_t start, int len)\n" "> > +{\n" - "> > +=A0=A0=A0=A0=A0=A0=A0void *map;\n" + "> > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240void *map;\n" "> > +\n" - "> > +=A0=A0=A0=A0=A0=A0=A0if (!request_mem_region(start, len, name)) {\n" - "> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0pr_devel(\"%s(): request_m=\n" - "em_region(0x%llx, %d) failed\\n\",\n" - "> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=\n" - "=A0=A0=A0=A0=A0=A0=A0=A0__func__, start, len);\n" - "> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return NULL;\n" - "> > +=A0=A0=A0=A0=A0=A0=A0}\n" + "> > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240if (!request_mem_region(start, len, name)) {\n" + "> > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240pr_devel(\"%s(): request_mem_region(0x%llx, %d) failed\\n\",\n" + "> > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240__func__, start, len);\n" + "> > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240return NULL;\n" + "> > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240}\n" "> > +\n" - "> > +=A0=A0=A0=A0=A0=A0=A0map =3D __ioremap(start, len, pgprot_val(pgprot_c=\n" - "ached(__pgprot(0))));\n" - "> > +=A0=A0=A0=A0=A0=A0=A0if (!map) {\n" - "> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0pr_devel(\"%s(): ioremap(0=\n" - "x%llx, %d) failed\\n\", __func__, start,\n" - "> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=\n" - "=A0=A0=A0=A0=A0=A0=A0=A0len);\n" - "> > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return NULL;\n" - "> > +=A0=A0=A0=A0=A0=A0=A0}\n" + "> > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240map = __ioremap(start, len, pgprot_val(pgprot_cached(__pgprot(0))));\n" + "> > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240if (!map) {\n" + "> > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240pr_devel(\"%s(): ioremap(0x%llx, %d) failed\\n\", __func__, start,\n" + "> > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240len);\n" + "> > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240\302\240return NULL;\n" + "> > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240}\n" "> > +\n" - "> > +=A0=A0=A0=A0=A0=A0=A0return map;\n" + "> > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240return map;\n" "> > +}\n" - ">=20\n" + "> \n" "> That's very wrong. I assume this never worked right ?\n" "\n" "Untl recently, only tested on simics and has been working there. On the\n" "hardware, hitting a crash on the first mmio write...\n" - ">=20\n" + "> \n" "> MMIO regions must be mapped non-cachable. Only the paste region\n" "\n" "which maybe due to this :-) Should I change to pgprot_noncached() for the\n" @@ -59,14 +54,14 @@ "\n" "Ok.\n" "\n" - ">=20\n" + "> \n" "> > +/*\n" "> > + * Unmap the MMIO regions for a window.\n" "> > + */\n" "> > +static void unmap_wc_paste_kaddr(struct vas_window *window)\n" "> > +{\n" - "> > +=A0=A0=A0=A0=A0=A0=A0int len;\n" - ">=20\n" + "> > +\302\240\302\240\302\240\302\240\302\240\302\240\302\240int len;\n" + "> \n" "> Don't use \"wc\"... that usually means \"write combine\".\n" "\n" "Ok.\n" @@ -75,4 +70,4 @@ "\n" Sukadev -92cab7e2f2ca7357deedc00e9cf50fface9e23791d93ebb5be58c88f2e22e2d0 +02fc9cc7cdd8bc6a2396ad61c15c89540466e60b1f8f2c3177160f2930654ac2
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.