Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1583119
| From | Auger Eric <eric.auger@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 09/33] irqchip/gic-v3-its: Split out property table allocation |
| Date | 2017-02-17 07:20 +0100 |
| Message-ID | <tbK3D-wj-15@gated-at.bofh.it> (permalink) |
| References | <t0zbz-5Tg-15@gated-at.bofh.it> <t0zbB-5Tg-57@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Marc,
On 17/01/2017 11:20, Marc Zyngier wrote:
> Move the LPI property table allocation into its own function, as
> this is going to be required for those associated with VMs in
> the future.
>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> ---
> drivers/irqchip/irq-gic-v3-its.c | 28 ++++++++++++++++++----------
> 1 file changed, 18 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
> index b28fb19..c92ff4d 100644
> --- a/drivers/irqchip/irq-gic-v3-its.c
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -889,15 +889,31 @@ static void its_lpi_free(struct event_lpi_map *map)
> kfree(map->col_map);
> }
>
> +static struct page *its_allocate_prop_table(gfp_t gfp_flags)
> +{
> + struct page *prop_page;
> +
> + prop_page = alloc_pages(gfp_flags, get_order(LPI_PROPBASE_SZ));
> + if (!prop_page)
> + return NULL;
> +
> + /* Priority 0xa0, Group-1, disabled */
> + memset(page_address(prop_page),
> + LPI_PROP_DEFAULT_PRIO | LPI_PROP_GROUP1,
> + LPI_PROPBASE_SZ);
> +
> + /* Make sure the GIC will observe the written configuration */
> + gic_flush_dcache_to_poc(page_address(gic_rdists->prop_page), LPI_PROPBASE_SZ);
s/gic_rdists->prop_page/prop_page.
With that fix,
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Eric
>
> + return prop_page;
> +}
>
>
> static int __init its_alloc_lpi_tables(void)
> {
> phys_addr_t paddr;
>
> - gic_rdists->prop_page = alloc_pages(GFP_NOWAIT,
> - get_order(LPI_PROPBASE_SZ));
> + gic_rdists->prop_page = its_allocate_prop_table(GFP_NOWAIT);
> if (!gic_rdists->prop_page) {
> pr_err("Failed to allocate PROPBASE\n");
> return -ENOMEM;
> @@ -906,14 +922,6 @@ static int __init its_alloc_lpi_tables(void)
> paddr = page_to_phys(gic_rdists->prop_page);
> pr_info("GIC: using LPI property table @%pa\n", &paddr);
>
> - /* Priority 0xa0, Group-1, disabled */
> - memset(page_address(gic_rdists->prop_page),
> - LPI_PROP_DEFAULT_PRIO | LPI_PROP_GROUP1,
> - LPI_PROPBASE_SZ);
> -
> - /* Make sure the GIC will observe the written configuration */
> - gic_flush_dcache_to_poc(page_address(gic_rdists->prop_page), LPI_PROPBASE_SZ);
> -
> return 0;
> }
>
>
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [RFC PATCH 09/33] irqchip/gic-v3-its: Split out property table allocation Auger Eric <eric.auger@redhat.com> - 2017-02-17 07:20 +0100
csiph-web