Displaying 3 results from an estimated 3 matches for "nfit_res".
2019 Jun 26
0
[PATCH 15/25] memremap: provide an optional internal refcount in struct dev_pagemap
...+ struct dev_pagemap *pgmap =
+ container_of(ref, struct dev_pagemap, internal_ref);
+
+ complete(&pgmap->done);
}
void *__wrap_devm_memremap_pages(struct device *dev, struct dev_pagemap *pgmap)
{
+ int error;
resource_size_t offset = pgmap->res.start;
struct nfit_test_resource *nfit_res = get_nfit_res(offset);
- if (nfit_res) {
- int rc;
-
- rc = devm_add_action_or_reset(dev, nfit_test_kill, pgmap);
- if (rc)
- return ERR_PTR(rc);
- return nfit_res->buf + offset - nfit_res->res.start;
+ if (!nfit_res)
+ return devm_memremap_pages(dev, pgmap);
+
+ pgmap->dev = dev...
2019 Jun 26
1
[PATCH 15/25] memremap: provide an optional internal refcount in struct dev_pagemap
...(ref, struct dev_pagemap, internal_ref);
> +
> + complete(&pgmap->done);
> }
>
> void *__wrap_devm_memremap_pages(struct device *dev, struct dev_pagemap *pgmap)
> {
> + int error;
> resource_size_t offset = pgmap->res.start;
> struct nfit_test_resource *nfit_res = get_nfit_res(offset);
>
> - if (nfit_res) {
> - int rc;
> -
> - rc = devm_add_action_or_reset(dev, nfit_test_kill, pgmap);
> - if (rc)
> - return ERR_PTR(rc);
> - return nfit_res->buf + offset - nfit_res->res.start;
> + if (!nfit_res)
> + return devm_m...
2019 Jun 26
41
dev_pagemap related cleanups v3
Hi Dan, Jérôme and Jason,
below is a series that cleans up the dev_pagemap interface so that
it is more easily usable, which removes the need to wrap it in hmm
and thus allowing to kill a lot of code
Note: this series is on top of Linux 5.2-rc5 and has some minor
conflicts with the hmm tree that are easy to resolve.
Diffstat summary:
32 files changed, 361 insertions(+), 1012 deletions(-)
Git