Pull ARC fixes from Vineet Gupta: - HSDK-4xd Dev system: perf driver updates for sampling interrupt - HSDK* Dev System: Ethernet broken [Evgeniy Didin] - HIGHMEM broken (2 memory banks) [Mike Rapoport] - show_regs() rewrite once and for all - Other minor fixes * tag 'arc-5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: [plat-hsdk]: Switch ethernet phy-mode to rgmii-id arc: fix memory initialization for systems with two memory banks irqchip/eznps: Fix build error for !ARC700 builds ARC: show_regs: fix r12 printing and simplify ARC: HSDK: wireup perf irq ARC: perf: don't bail setup if pct irq missing in device-tree ARC: pgalloc.h: delete a duplicated word + other fixes
Unified · Split
| @@ -88,6 +88,8 @@ · 87 unmodified lines | |||
| 88 | 88 | ||
| 89 | arcpct: pct { | 89 | arcpct: pct { |
| 90 | compatible = "snps,archs-pct"; | 90 | compatible = "snps,archs-pct"; |
| 91 | interrupt-parent = <&cpu_intc>; | ||
| 92 | interrupts = <20>; | ||
| 91 | }; | 93 | }; |
| 92 | 94 | ||
| 93 | /* TIMER0 with interrupt for clockevent */ | 95 | /* TIMER0 with interrupt for clockevent */ |
| @@ -208,7 +210,7 @@ · 114 unmodified lines | |||
| 208 | reg = <0x8000 0x2000>; | 210 | reg = <0x8000 0x2000>; |
| 209 | interrupts = <10>; | 211 | interrupts = <10>; |
| 210 | interrupt-names = "macirq"; | 212 | interrupt-names = "macirq"; |
| 211 | phy-mode = "rgmii"; | 213 | phy-mode = "rgmii-id"; |
| 212 | snps,pbl = <32>; | 214 | snps,pbl = <32>; |
| 213 | snps,multicast-filter-bins = <256>; | 215 | snps,multicast-filter-bins = <256>; |
| 214 | clocks = <&gmacclk>; | 216 | clocks = <&gmacclk>; |
| @@ -226,7 +228,7 @@ · 11 unmodified lines | |||
| 226 | #address-cells = <1>; | 228 | #address-cells = <1>; |
| 227 | #size-cells = <0>; | 229 | #size-cells = <0>; |
| 228 | compatible = "snps,dwmac-mdio"; | 230 | compatible = "snps,dwmac-mdio"; |
| 229 | phy0: ethernet-phy@0 { | 231 | phy0: ethernet-phy@0 { /* Micrel KSZ9031 */ |
| 230 | reg = <0>; | 232 | reg = <0>; |
| 231 | }; | 233 | }; |
| 232 | }; | 234 | }; |
| @@ -18,10 +18,10 @@ · 17 unmodified lines | |||
| 18 | * vineetg: April 2010 | 18 | * vineetg: April 2010 |
| 19 | * -Switched pgtable_t from being struct page * to unsigned long | 19 | * -Switched pgtable_t from being struct page * to unsigned long |
| 20 | * =Needed so that Page Table allocator (pte_alloc_one) is not forced to | 20 | * =Needed so that Page Table allocator (pte_alloc_one) is not forced to |
| 21 | * to deal with struct page. Thay way in future we can make it allocate | 21 | * deal with struct page. That way in future we can make it allocate |
| 22 | * multiple PG Tbls in one Page Frame | 22 | * multiple PG Tbls in one Page Frame |
| 23 | * =sweet side effect is avoiding calls to ugly page_address( ) from the | 23 | * =sweet side effect is avoiding calls to ugly page_address( ) from the |
| 24 | * pg-tlb allocator sub-sys (pte_alloc_one, ptr_free, pmd_populate | 24 | * pg-tlb allocator sub-sys (pte_alloc_one, ptr_free, pmd_populate) |
| 25 | * | 25 | * |
| 26 | * Amit Bhor, Sameer Dhavale: Codito Technologies 2004 | 26 | * Amit Bhor, Sameer Dhavale: Codito Technologies 2004 |
| 27 | */ | 27 | */ |
| @@ -562,7 +562,7 @@ static int arc_pmu_device_probe(struct platform_device *pdev) · 561 unmodified lines | |||
| 562 | { | 562 | { |
| 563 | struct arc_reg_pct_build pct_bcr; | 563 | struct arc_reg_pct_build pct_bcr; |
| 564 | struct arc_reg_cc_build cc_bcr; | 564 | struct arc_reg_cc_build cc_bcr; |
| 565 | int i, has_interrupts; | 565 | int i, has_interrupts, irq; |
| 566 | int counter_size; /* in bits */ | 566 | int counter_size; /* in bits */ |
| 567 | 567 | ||
| 568 | union cc_name { | 568 | union cc_name { |
| @@ -637,13 +637,7 @@ static int arc_pmu_device_probe(struct platform_device *pdev) · 68 unmodified lines | |||
| 637 | .attr_groups = arc_pmu->attr_groups, | 637 | .attr_groups = arc_pmu->attr_groups, |
| 638 | }; | 638 | }; |
| 639 | 639 | ||
| 640 | if (has_interrupts) { | 640 | if (has_interrupts && (irq = platform_get_irq(pdev, 0) >= 0)) { |
| 641 | int irq = platform_get_irq(pdev, 0); | ||
| 642 | |||
| 643 | if (irq < 0) { | ||
| 644 | pr_err("Cannot get IRQ number for the platform\n"); | ||
| 645 | return -ENODEV; | ||
| 646 | } | ||
| 647 | 641 | ||
| 648 | arc_pmu->irq = irq; | 642 | arc_pmu->irq = irq; |
| 649 | 643 | ||
| @@ -652,9 +646,9 @@ static int arc_pmu_device_probe(struct platform_device *pdev) · 2 unmodified lines | |||
| 652 | this_cpu_ptr(&arc_pmu_cpu)); | 646 | this_cpu_ptr(&arc_pmu_cpu)); |
| 653 | 647 | ||
| 654 | on_each_cpu(arc_cpu_pmu_irq_init, &irq, 1); | 648 | on_each_cpu(arc_cpu_pmu_irq_init, &irq, 1); |
| 655 | 649 | } else { | |
| 656 | } else | ||
| 657 | arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT; | 650 | arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT; |
| 651 | } | ||
| 658 | 652 | ||
| 659 | /* | 653 | /* |
| 660 | * perf parser doesn't really like '-' symbol in events name, so let's | 654 | * perf parser doesn't really like '-' symbol in events name, so let's |
| @@ -18,44 +18,37 @@ · 17 unmodified lines | |||
| 18 | 18 | ||
| 19 | #define ARC_PATH_MAX 256 | 19 | #define ARC_PATH_MAX 256 |
| 20 | 20 | ||
| 21 | /* | 21 | static noinline void print_regs_scratch(struct pt_regs *regs) |
| 22 | * Common routine to print scratch regs (r0-r12) or callee regs (r13-r25) | ||
| 23 | * -Prints 3 regs per line and a CR. | ||
| 24 | * -To continue, callee regs right after scratch, special handling of CR | ||
| 25 | */ | ||
| 26 | static noinline void print_reg_file(long *reg_rev, int start_num) | ||
| 27 | { | 22 | { |
| 28 | unsigned int i; | 23 | pr_cont("BTA: 0x%08lx\n SP: 0x%08lx FP: 0x%08lx BLK: %pS\n", |
| 29 | char buf[512]; | 24 | regs->bta, regs->sp, regs->fp, (void *)regs->blink); |
| 30 | int n = 0, len = sizeof(buf); | 25 | pr_cont("LPS: 0x%08lx\tLPE: 0x%08lx\tLPC: 0x%08lx\n", |
| 31 | 26 | regs->lp_start, regs->lp_end, regs->lp_count); | |
| 32 | for (i = start_num; i < start_num + 13; i++) { | ||
| 33 | n += scnprintf(buf + n, len - n, "r%02u: 0x%08lx\t", | ||
| 34 | i, (unsigned long)*reg_rev); | ||
| 35 | |||
| 36 | if (((i + 1) % 3) == 0) | ||
| 37 | n += scnprintf(buf + n, len - n, "\n"); | ||
| 38 | |||
| 39 | /* because pt_regs has regs reversed: r12..r0, r25..r13 */ | ||
| 40 | if (is_isa_arcv2() && start_num == 0) | ||
| 41 | reg_rev++; | ||
| 42 | else | ||
| 43 | reg_rev--; | ||
| 44 | } | ||
| 45 | |||
| 46 | if (start_num != 0) | ||
| 47 | n += scnprintf(buf + n, len - n, "\n\n"); | ||
| 48 | 27 | ||
| 49 | /* To continue printing callee regs on same line as scratch regs */ | 28 | pr_info("r00: 0x%08lx\tr01: 0x%08lx\tr02: 0x%08lx\n" \ |
| 50 | if (start_num == 0) | 29 | "r03: 0x%08lx\tr04: 0x%08lx\tr05: 0x%08lx\n" \ |
| 51 | pr_info("%s", buf); | 30 | "r06: 0x%08lx\tr07: 0x%08lx\tr08: 0x%08lx\n" \ |
| 52 | else | 31 | "r09: 0x%08lx\tr10: 0x%08lx\tr11: 0x%08lx\n" \ |
| 53 | pr_cont("%s\n", buf); | 32 | "r12: 0x%08lx\t", |
| 33 | regs->r0, regs->r1, regs->r2, | ||
| 34 | regs->r3, regs->r4, regs->r5, | ||
| 35 | regs->r6, regs->r7, regs->r8, | ||
| 36 | regs->r9, regs->r10, regs->r11, | ||
| 37 | regs->r12); | ||
| 54 | } | 38 | } |
| 55 | 39 | ||
| 56 | static void show_callee_regs(struct callee_regs *cregs) | 40 | static void print_regs_callee(struct callee_regs *regs) |
| 57 | { | 41 | { |
| 58 | print_reg_file(&(cregs->r13), 13); | 42 | pr_cont("r13: 0x%08lx\tr14: 0x%08lx\n" \ |
| 43 | "r15: 0x%08lx\tr16: 0x%08lx\tr17: 0x%08lx\n" \ | ||
| 44 | "r18: 0x%08lx\tr19: 0x%08lx\tr20: 0x%08lx\n" \ | ||
| 45 | "r21: 0x%08lx\tr22: 0x%08lx\tr23: 0x%08lx\n" \ | ||
| 46 | "r24: 0x%08lx\tr25: 0x%08lx\n", | ||
| 47 | regs->r13, regs->r14, | ||
| 48 | regs->r15, regs->r16, regs->r17, | ||
| 49 | regs->r18, regs->r19, regs->r20, | ||
| 50 | regs->r21, regs->r22, regs->r23, | ||
| 51 | regs->r24, regs->r25); | ||
| 59 | } | 52 | } |
| 60 | 53 | ||
| 61 | static void print_task_path_n_nm(struct task_struct *tsk) | 54 | static void print_task_path_n_nm(struct task_struct *tsk) |
| @@ -175,7 +168,7 @@ static void show_ecr_verbose(struct pt_regs *regs) · 113 unmodified lines | |||
| 175 | void show_regs(struct pt_regs *regs) | 168 | void show_regs(struct pt_regs *regs) |
| 176 | { | 169 | { |
| 177 | struct task_struct *tsk = current; | 170 | struct task_struct *tsk = current; |
| 178 | struct callee_regs *cregs; | 171 | struct callee_regs *cregs = (struct callee_regs *)tsk->thread.callee_reg; |
| 179 | 172 | ||
| 180 | /* | 173 | /* |
| 181 | * generic code calls us with preemption disabled, but some calls | 174 | * generic code calls us with preemption disabled, but some calls |
| @@ -204,25 +197,15 @@ void show_regs(struct pt_regs *regs) · 22 unmodified lines | |||
| 204 | STS_BIT(regs, A2), STS_BIT(regs, A1), | 197 | STS_BIT(regs, A2), STS_BIT(regs, A1), |
| 205 | STS_BIT(regs, E2), STS_BIT(regs, E1)); | 198 | STS_BIT(regs, E2), STS_BIT(regs, E1)); |
| 206 | #else | 199 | #else |
| 207 | pr_cont(" [%2s%2s%2s%2s]", | 200 | pr_cont(" [%2s%2s%2s%2s] ", |
| 208 | STS_BIT(regs, IE), | 201 | STS_BIT(regs, IE), |
| 209 | (regs->status32 & STATUS_U_MASK) ? "U " : "K ", | 202 | (regs->status32 & STATUS_U_MASK) ? "U " : "K ", |
| 210 | STS_BIT(regs, DE), STS_BIT(regs, AE)); | 203 | STS_BIT(regs, DE), STS_BIT(regs, AE)); |
| 211 | #endif | 204 | #endif |
| 212 | pr_cont(" BTA: 0x%08lx\n SP: 0x%08lx FP: 0x%08lx BLK: %pS\n", | ||
| 213 | regs->bta, regs->sp, regs->fp, (void *)regs->blink); | ||
| 214 | pr_info("LPS: 0x%08lx\tLPE: 0x%08lx\tLPC: 0x%08lx\n", | ||
| 215 | regs->lp_start, regs->lp_end, regs->lp_count); | ||
| 216 | |||
| 217 | /* print regs->r0 thru regs->r12 | ||
| 218 | * Sequential printing was generating horrible code | ||
| 219 | */ | ||
| 220 | print_reg_file(&(regs->r0), 0); | ||
| 221 | 205 | ||
| 222 | /* If Callee regs were saved, display them too */ | 206 | print_regs_scratch(regs); |
| 223 | cregs = (struct callee_regs *)current->thread.callee_reg; | ||
| 224 | if (cregs) | 207 | if (cregs) |
| 225 | show_callee_regs(cregs); | 208 | print_regs_callee(cregs); |
| 226 | 209 | ||
| 227 | preempt_disable(); | 210 | preempt_disable(); |
| 228 | } | 211 | } |
| @@ -26,8 +26,8 @@ static unsigned long low_mem_sz; · 25 unmodified lines | |||
| 26 | 26 | ||
| 27 | #ifdef CONFIG_HIGHMEM | 27 | #ifdef CONFIG_HIGHMEM |
| 28 | static unsigned long min_high_pfn, max_high_pfn; | 28 | static unsigned long min_high_pfn, max_high_pfn; |
| 29 | static u64 high_mem_start; | 29 | static phys_addr_t high_mem_start; |
| 30 | static u64 high_mem_sz; | 30 | static phys_addr_t high_mem_sz; |
| 31 | #endif | 31 | #endif |
| 32 | 32 | ||
| 33 | #ifdef CONFIG_DISCONTIGMEM | 33 | #ifdef CONFIG_DISCONTIGMEM |
| @@ -69,6 +69,7 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size) · 35 unmodified lines | |||
| 69 | high_mem_sz = size; | 69 | high_mem_sz = size; |
| 70 | in_use = 1; | 70 | in_use = 1; |
| 71 | memblock_add_node(base, size, 1); | 71 | memblock_add_node(base, size, 1); |
| 72 | memblock_reserve(base, size); | ||
| 72 | #endif | 73 | #endif |
| 73 | } | 74 | } |
| 74 | 75 | ||
| @@ -157,7 +158,7 @@ void __init setup_arch_memory(void) · 82 unmodified lines | |||
| 157 | min_high_pfn = PFN_DOWN(high_mem_start); | 158 | min_high_pfn = PFN_DOWN(high_mem_start); |
| 158 | max_high_pfn = PFN_DOWN(high_mem_start + high_mem_sz); | 159 | max_high_pfn = PFN_DOWN(high_mem_start + high_mem_sz); |
| 159 | 160 | ||
| 160 | max_zone_pfn[ZONE_HIGHMEM] = max_high_pfn; | 161 | max_zone_pfn[ZONE_HIGHMEM] = min_low_pfn; |
| 161 | 162 | ||
| 162 | high_memory = (void *)(min_high_pfn << PAGE_SHIFT); | 163 | high_memory = (void *)(min_high_pfn << PAGE_SHIFT); |
| 163 | kmap_init(); | 164 | kmap_init(); |
| @@ -166,22 +167,26 @@ void __init setup_arch_memory(void) · 2 unmodified lines | |||
| 166 | free_area_init(max_zone_pfn); | 167 | free_area_init(max_zone_pfn); |
| 167 | } | 168 | } |
| 168 | 169 | ||
| 169 | /* | 170 | static void __init highmem_init(void) |
| 170 | * mem_init - initializes memory | ||
| 171 | * | ||
| 172 | * Frees up bootmem | ||
| 173 | * Calculates and displays memory available/used | ||
| 174 | */ | ||
| 175 | void __init mem_init(void) | ||
| 176 | { | 171 | { |
| 177 | #ifdef CONFIG_HIGHMEM | 172 | #ifdef CONFIG_HIGHMEM |
| 178 | unsigned long tmp; | 173 | unsigned long tmp; |
| 179 | 174 | ||
| 180 | reset_all_zones_managed_pages(); | 175 | memblock_free(high_mem_start, high_mem_sz); |
| 181 | for (tmp = min_high_pfn; tmp < max_high_pfn; tmp++) | 176 | for (tmp = min_high_pfn; tmp < max_high_pfn; tmp++) |
| 182 | free_highmem_page(pfn_to_page(tmp)); | 177 | free_highmem_page(pfn_to_page(tmp)); |
| 183 | #endif | 178 | #endif |
| 179 | } | ||
| 184 | 180 | ||
| 181 | /* | ||
| 182 | * mem_init - initializes memory | ||
| 183 | * | ||
| 184 | * Frees up bootmem | ||
| 185 | * Calculates and displays memory available/used | ||
| 186 | */ | ||
| 187 | void __init mem_init(void) | ||
| 188 | { | ||
| 185 | memblock_free_all(); | 189 | memblock_free_all(); |
| 190 | highmem_init(); | ||
| 186 | mem_init_print_info(NULL); | 191 | mem_init_print_info(NULL); |
| 187 | } | 192 | } |
| @@ -33,7 +33,6 @@ · 32 unmodified lines | |||
| 33 | #define CTOP_AUX_DPC (CTOP_AUX_BASE + 0x02C) | 33 | #define CTOP_AUX_DPC (CTOP_AUX_BASE + 0x02C) |
| 34 | #define CTOP_AUX_LPC (CTOP_AUX_BASE + 0x030) | 34 | #define CTOP_AUX_LPC (CTOP_AUX_BASE + 0x030) |
| 35 | #define CTOP_AUX_EFLAGS (CTOP_AUX_BASE + 0x080) | 35 | #define CTOP_AUX_EFLAGS (CTOP_AUX_BASE + 0x080) |
| 36 | #define CTOP_AUX_IACK (CTOP_AUX_BASE + 0x088) | ||
| 37 | #define CTOP_AUX_GPA1 (CTOP_AUX_BASE + 0x08C) | 36 | #define CTOP_AUX_GPA1 (CTOP_AUX_BASE + 0x08C) |
| 38 | #define CTOP_AUX_UDMC (CTOP_AUX_BASE + 0x300) | 37 | #define CTOP_AUX_UDMC (CTOP_AUX_BASE + 0x300) |
| 39 | 38 | ||
| @@ -45,6 +45,12 @@ · 44 unmodified lines | |||
| 45 | #define CTOP_INST_MOV2B_FLIP_R3_B1_B2_INST 0x5B60 | 45 | #define CTOP_INST_MOV2B_FLIP_R3_B1_B2_INST 0x5B60 |
| 46 | #define CTOP_INST_MOV2B_FLIP_R3_B1_B2_LIMM 0x00010422 | 46 | #define CTOP_INST_MOV2B_FLIP_R3_B1_B2_LIMM 0x00010422 |
| 47 | 47 | ||
| 48 | #ifndef AUX_IENABLE | ||
| 49 | #define AUX_IENABLE 0x40c | ||
| 50 | #endif | ||
| 51 | |||
| 52 | #define CTOP_AUX_IACK (0xFFFFF800 + 0x088) | ||
| 53 | |||
| 48 | #ifndef __ASSEMBLY__ | 54 | #ifndef __ASSEMBLY__ |
| 49 | 55 | ||
| 50 | /* In order to increase compilation test coverage */ | 56 | /* In order to increase compilation test coverage */ |