hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/irqchip/irq-gic-v3-its.c
....@@ -2168,7 +2168,9 @@
21682168 {
21692169 struct page *prop_page;
21702170
2171
- if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566"))
2171
+ if (of_machine_is_compatible("rockchip,rk3568") ||
2172
+ of_machine_is_compatible("rockchip,rk3567") ||
2173
+ of_machine_is_compatible("rockchip,rk3566"))
21722174 gfp_flags |= GFP_DMA32;
21732175 prop_page = alloc_pages(gfp_flags, get_order(LPI_PROPBASE_SZ));
21742176 if (!prop_page)
....@@ -2306,7 +2308,9 @@
23062308 }
23072309
23082310 gfp_flags = GFP_KERNEL | __GFP_ZERO;
2309
- if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566"))
2311
+ if (of_machine_is_compatible("rockchip,rk3568") ||
2312
+ of_machine_is_compatible("rockchip,rk3567") ||
2313
+ of_machine_is_compatible("rockchip,rk3566"))
23102314 gfp_flags |= GFP_DMA32;
23112315 page = alloc_pages_node(its->numa_node, gfp_flags, order);
23122316 if (!page)
....@@ -2357,6 +2361,7 @@
23572361
23582362 if (IS_ENABLED(CONFIG_NO_GKI) &&
23592363 (of_machine_is_compatible("rockchip,rk3568") ||
2364
+ of_machine_is_compatible("rockchip,rk3567") ||
23602365 of_machine_is_compatible("rockchip,rk3566") ||
23612366 of_machine_is_compatible("rockchip,rk3588"))) {
23622367 if (tmp & GITS_BASER_SHAREABILITY_MASK)
....@@ -2947,7 +2952,9 @@
29472952 {
29482953 struct page *pend_page;
29492954
2950
- if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566"))
2955
+ if (of_machine_is_compatible("rockchip,rk3568") ||
2956
+ of_machine_is_compatible("rockchip,rk3567") ||
2957
+ of_machine_is_compatible("rockchip,rk3566"))
29512958 gfp_flags |= GFP_DMA32;
29522959 pend_page = alloc_pages(gfp_flags | __GFP_ZERO,
29532960 get_order(LPI_PENDBASE_SZ));
....@@ -3108,6 +3115,7 @@
31083115
31093116 if (IS_ENABLED(CONFIG_NO_GKI) &&
31103117 (of_machine_is_compatible("rockchip,rk3568") ||
3118
+ of_machine_is_compatible("rockchip,rk3567") ||
31113119 of_machine_is_compatible("rockchip,rk3566") ||
31123120 of_machine_is_compatible("rockchip,rk3588")))
31133121 tmp &= ~GICR_PROPBASER_SHAREABILITY_MASK;
....@@ -3138,6 +3146,7 @@
31383146
31393147 if (IS_ENABLED(CONFIG_NO_GKI) &&
31403148 (of_machine_is_compatible("rockchip,rk3568") ||
3149
+ of_machine_is_compatible("rockchip,rk3567") ||
31413150 of_machine_is_compatible("rockchip,rk3566") ||
31423151 of_machine_is_compatible("rockchip,rk3588")))
31433152 tmp &= ~GICR_PENDBASER_SHAREABILITY_MASK;
....@@ -3306,7 +3315,9 @@
33063315 if (!table[idx]) {
33073316 gfp_t gfp_flags = GFP_KERNEL | __GFP_ZERO;
33083317
3309
- if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566"))
3318
+ if (of_machine_is_compatible("rockchip,rk3568") ||
3319
+ of_machine_is_compatible("rockchip,rk3567") ||
3320
+ of_machine_is_compatible("rockchip,rk3566"))
33103321 gfp_flags |= GFP_DMA32;
33113322 page = alloc_pages_node(its->numa_node, gfp_flags,
33123323 get_order(baser->psz));
....@@ -3414,7 +3425,9 @@
34143425 sz = nr_ites * (FIELD_GET(GITS_TYPER_ITT_ENTRY_SIZE, its->typer) + 1);
34153426 sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1;
34163427 gfp_flags = GFP_KERNEL;
3417
- if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566")) {
3428
+ if (of_machine_is_compatible("rockchip,rk3568") ||
3429
+ of_machine_is_compatible("rockchip,rk3567") ||
3430
+ of_machine_is_compatible("rockchip,rk3566")) {
34183431 gfp_flags |= GFP_DMA32;
34193432 itt = (void *)__get_free_pages(gfp_flags, get_order(sz));
34203433 } else {
....@@ -3436,6 +3449,7 @@
34363449 kfree(dev);
34373450
34383451 if (of_machine_is_compatible("rockchip,rk3568") ||
3452
+ of_machine_is_compatible("rockchip,rk3567") ||
34393453 of_machine_is_compatible("rockchip,rk3566"))
34403454 free_pages((unsigned long)itt, get_order(sz));
34413455 else
....@@ -3480,6 +3494,7 @@
34803494 kfree(its_dev->event_map.col_map);
34813495
34823496 if (of_machine_is_compatible("rockchip,rk3568") ||
3497
+ of_machine_is_compatible("rockchip,rk3567") ||
34833498 of_machine_is_compatible("rockchip,rk3566"))
34843499 free_pages((unsigned long)its_dev->itt, get_order(its_dev->itt_sz));
34853500 else
....@@ -5085,7 +5100,9 @@
50855100 its->numa_node = numa_node;
50865101
50875102 gfp_flags = GFP_KERNEL | __GFP_ZERO;
5088
- if (of_machine_is_compatible("rockchip,rk3568") || of_machine_is_compatible("rockchip,rk3566"))
5103
+ if (of_machine_is_compatible("rockchip,rk3568") ||
5104
+ of_machine_is_compatible("rockchip,rk3567") ||
5105
+ of_machine_is_compatible("rockchip,rk3566"))
50895106 gfp_flags |= GFP_DMA32;
50905107 page = alloc_pages_node(its->numa_node, gfp_flags,
50915108 get_order(ITS_CMD_QUEUE_SZ));
....@@ -5120,6 +5137,7 @@
51205137
51215138 if (IS_ENABLED(CONFIG_NO_GKI) &&
51225139 (of_machine_is_compatible("rockchip,rk3568") ||
5140
+ of_machine_is_compatible("rockchip,rk3567") ||
51235141 of_machine_is_compatible("rockchip,rk3566") ||
51245142 of_machine_is_compatible("rockchip,rk3588")))
51255143 tmp &= ~GITS_CBASER_SHAREABILITY_MASK;