From c9a2cc2a3c78349f08f484f7dc5144788f8b49da Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Fri, 17 May 2024 16:55:44 +0800 Subject: [PATCH] rockchip: remove extra its hack Signed-off-by: Tianling Shen --- ...d-GFP_DMA32-flag-for-memory-allocate.patch | 105 ------------------ 1 file changed, 105 deletions(-) delete mode 100644 target/linux/rockchip/patches-6.6/702-irqchip-gic-v3-its-add-GFP_DMA32-flag-for-memory-allocate.patch diff --git a/target/linux/rockchip/patches-6.6/702-irqchip-gic-v3-its-add-GFP_DMA32-flag-for-memory-allocate.patch b/target/linux/rockchip/patches-6.6/702-irqchip-gic-v3-its-add-GFP_DMA32-flag-for-memory-allocate.patch deleted file mode 100644 index 655a3f99ad..0000000000 --- a/target/linux/rockchip/patches-6.6/702-irqchip-gic-v3-its-add-GFP_DMA32-flag-for-memory-allocate.patch +++ /dev/null @@ -1,105 +0,0 @@ -From a9d1129997cf016b24a33a822659abd13b686323 Mon Sep 17 00:00:00 2001 -From: XiaoDong Huang -Date: Wed, 2 Dec 2020 17:30:47 +0800 -Subject: [PATCH] irqchip/gic-v3-its: add GFP_DMA32 flag for memory allocated - for ITS in rk356x - -Change-Id: Ic1d866733b348b86bbfdf2df4c0416a68eb422b7 -Signed-off-by: XiaoDong Huang ---- - drivers/irqchip/irq-gic-v3-its.c | 28 ++++++++++++++++++++++++---- - 1 file changed, 24 insertions(+), 4 deletions(-) - ---- a/drivers/irqchip/irq-gic-v3-its.c -+++ b/drivers/irqchip/irq-gic-v3-its.c -@@ -2206,6 +2206,8 @@ static struct page *its_allocate_prop_ta - { - struct page *prop_page; - -+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566")) -+ gfp_flags |= GFP_DMA32; - prop_page = alloc_pages(gfp_flags, get_order(LPI_PROPBASE_SZ)); - if (!prop_page) - return NULL; -@@ -2329,6 +2331,7 @@ static int its_setup_baser(struct its_no - u32 alloc_pages, psz; - struct page *page; - void *base; -+ gfp_t gfp_flags; - - psz = baser->psz; - alloc_pages = (PAGE_ORDER_TO_SIZE(order) / psz); -@@ -2340,7 +2343,10 @@ static int its_setup_baser(struct its_no - order = get_order(GITS_BASER_PAGES_MAX * psz); - } - -- page = alloc_pages_node(its->numa_node, GFP_KERNEL | __GFP_ZERO, order); -+ gfp_flags = GFP_KERNEL | __GFP_ZERO; -+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566")) -+ gfp_flags |= GFP_DMA32; -+ page = alloc_pages_node(its->numa_node, gfp_flags, order); - if (!page) - return -ENOMEM; - -@@ -2980,6 +2986,8 @@ static struct page *its_allocate_pending - { - struct page *pend_page; - -+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566")) -+ gfp_flags |= GFP_DMA32; - pend_page = alloc_pages(gfp_flags | __GFP_ZERO, - get_order(LPI_PENDBASE_SZ)); - if (!pend_page) -@@ -3328,7 +3336,11 @@ static bool its_alloc_table_entry(struct - - /* Allocate memory for 2nd level table */ - if (!table[idx]) { -- page = alloc_pages_node(its->numa_node, GFP_KERNEL | __GFP_ZERO, -+ gfp_t gfp_flags = GFP_KERNEL | __GFP_ZERO; -+ -+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566")) -+ gfp_flags |= GFP_DMA32; -+ page = alloc_pages_node(its->numa_node, gfp_flags, - get_order(baser->psz)); - if (!page) - return false; -@@ -3417,6 +3429,7 @@ static struct its_device *its_create_dev - int nr_lpis; - int nr_ites; - int sz; -+ gfp_t gfp_flags; - - if (!its_alloc_device_table(its, dev_id)) - return NULL; -@@ -3432,7 +3445,10 @@ static struct its_device *its_create_dev - nr_ites = max(2, nvecs); - sz = nr_ites * (FIELD_GET(GITS_TYPER_ITT_ENTRY_SIZE, its->typer) + 1); - sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1; -- itt = kzalloc_node(sz, GFP_KERNEL, its->numa_node); -+ gfp_flags = GFP_KERNEL; -+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566")) -+ gfp_flags |= GFP_DMA32; -+ itt = kzalloc_node(sz, gfp_flags, its->numa_node); - if (alloc_lpis) { - lpi_map = its_lpi_alloc(nvecs, &lpi_base, &nr_lpis); - if (lpi_map) -@@ -5091,6 +5107,7 @@ static int __init its_probe_one(struct i - struct page *page; - u32 ctlr; - int err; -+ gfp_t gfp_flags; - - its_enable_quirks(its); - -@@ -5124,7 +5141,10 @@ static int __init its_probe_one(struct i - } - } - -- page = alloc_pages_node(its->numa_node, GFP_KERNEL | __GFP_ZERO, -+ gfp_flags = GFP_KERNEL | __GFP_ZERO; -+ if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566")) -+ gfp_flags |= GFP_DMA32; -+ page = alloc_pages_node(its->numa_node, gfp_flags, - get_order(ITS_CMD_QUEUE_SZ)); - if (!page) { - err = -ENOMEM;