ARC fixes for 5.9-rc4
- 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 -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOXpuCuR6hedrdLCJadfx3eKKwl4FAl9S5E4ACgkQadfx3eKK wl7y5xAAyExBJlAWH8tyJjKYnRnKUwP5xZxzSLt9k5sUF8+aVMBpSr6PCF9kf1ZP HTFJ3T9NLFOh4cI7Lk9QFkLXbOvuvjgkfqlSmbHjnlTYcuWCqCQfU93bLMhRvrvi oRnWzEXLXwRuYoYz4TVLzxw9SuQr/EtCvR+a4rAyMpUlg+9pWHTokpiv69nDeYSl t3ckCVkdKbqPsUW7fXclyzo5qtsdGgLhYh6pb8ZE/x/Qdk+IjaN4WEmjC5DCy10B VTKEKdK7VKfRGuhIJbPq/UDs0TwMMxic+5sCdQtM54vrQPuVTmpsUopOHQ4/2Y5D IVWsZ3Uy/jnZxS32FP4d4r4Rv+BT9r1c7o148glT9iI0poOZ13BZHNZbLuSxYi4l 1UQ2r/o+E+XKOWzAOc1WIgEJGdxcDu9seJNSSmxs1kBveOIg8S8JjoDyS6ZyTWD+ fbOttxNe3kqGWCdKkgtUGqrg2w0qr3kzJd5aF4ju4fE+KMSVQRylRSWBpM1hcovP rxhcVvxyd1xSS3krrXjBTsjgTlkPDAaLyku/G5VuwpG91LyTiWfSlg+IOfLO+zFm LAwMTlV0gXfV2GH/AlEDJXtvT7GPhXN9sqmqqqOpUmOcKbPE30RmUkUxTJJbGfPN s7ioUV8CJVzRAkxyo79IDQQjT20p13cbJrIeCfgaSKWBf1M64BU= =vOZp -----END PGP SIGNATURE----- Merge tag 'arc-5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc 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
This commit is contained in:
Коммит
70187f7727
|
@ -88,6 +88,8 @@
|
||||||
|
|
||||||
arcpct: pct {
|
arcpct: pct {
|
||||||
compatible = "snps,archs-pct";
|
compatible = "snps,archs-pct";
|
||||||
|
interrupt-parent = <&cpu_intc>;
|
||||||
|
interrupts = <20>;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* TIMER0 with interrupt for clockevent */
|
/* TIMER0 with interrupt for clockevent */
|
||||||
|
@ -208,7 +210,7 @@
|
||||||
reg = <0x8000 0x2000>;
|
reg = <0x8000 0x2000>;
|
||||||
interrupts = <10>;
|
interrupts = <10>;
|
||||||
interrupt-names = "macirq";
|
interrupt-names = "macirq";
|
||||||
phy-mode = "rgmii";
|
phy-mode = "rgmii-id";
|
||||||
snps,pbl = <32>;
|
snps,pbl = <32>;
|
||||||
snps,multicast-filter-bins = <256>;
|
snps,multicast-filter-bins = <256>;
|
||||||
clocks = <&gmacclk>;
|
clocks = <&gmacclk>;
|
||||||
|
@ -226,7 +228,7 @@
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
compatible = "snps,dwmac-mdio";
|
compatible = "snps,dwmac-mdio";
|
||||||
phy0: ethernet-phy@0 {
|
phy0: ethernet-phy@0 { /* Micrel KSZ9031 */
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
* vineetg: April 2010
|
* vineetg: April 2010
|
||||||
* -Switched pgtable_t from being struct page * to unsigned long
|
* -Switched pgtable_t from being struct page * to unsigned long
|
||||||
* =Needed so that Page Table allocator (pte_alloc_one) is not forced to
|
* =Needed so that Page Table allocator (pte_alloc_one) is not forced to
|
||||||
* to deal with struct page. Thay way in future we can make it allocate
|
* deal with struct page. That way in future we can make it allocate
|
||||||
* multiple PG Tbls in one Page Frame
|
* multiple PG Tbls in one Page Frame
|
||||||
* =sweet side effect is avoiding calls to ugly page_address( ) from the
|
* =sweet side effect is avoiding calls to ugly page_address( ) from the
|
||||||
* pg-tlb allocator sub-sys (pte_alloc_one, ptr_free, pmd_populate
|
* pg-tlb allocator sub-sys (pte_alloc_one, ptr_free, pmd_populate)
|
||||||
*
|
*
|
||||||
* Amit Bhor, Sameer Dhavale: Codito Technologies 2004
|
* Amit Bhor, Sameer Dhavale: Codito Technologies 2004
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -562,7 +562,7 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct arc_reg_pct_build pct_bcr;
|
struct arc_reg_pct_build pct_bcr;
|
||||||
struct arc_reg_cc_build cc_bcr;
|
struct arc_reg_cc_build cc_bcr;
|
||||||
int i, has_interrupts;
|
int i, has_interrupts, irq;
|
||||||
int counter_size; /* in bits */
|
int counter_size; /* in bits */
|
||||||
|
|
||||||
union cc_name {
|
union cc_name {
|
||||||
|
@ -637,13 +637,7 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
|
||||||
.attr_groups = arc_pmu->attr_groups,
|
.attr_groups = arc_pmu->attr_groups,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (has_interrupts) {
|
if (has_interrupts && (irq = platform_get_irq(pdev, 0) >= 0)) {
|
||||||
int irq = platform_get_irq(pdev, 0);
|
|
||||||
|
|
||||||
if (irq < 0) {
|
|
||||||
pr_err("Cannot get IRQ number for the platform\n");
|
|
||||||
return -ENODEV;
|
|
||||||
}
|
|
||||||
|
|
||||||
arc_pmu->irq = irq;
|
arc_pmu->irq = irq;
|
||||||
|
|
||||||
|
@ -652,9 +646,9 @@ static int arc_pmu_device_probe(struct platform_device *pdev)
|
||||||
this_cpu_ptr(&arc_pmu_cpu));
|
this_cpu_ptr(&arc_pmu_cpu));
|
||||||
|
|
||||||
on_each_cpu(arc_cpu_pmu_irq_init, &irq, 1);
|
on_each_cpu(arc_cpu_pmu_irq_init, &irq, 1);
|
||||||
|
} else {
|
||||||
} else
|
|
||||||
arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
|
arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* perf parser doesn't really like '-' symbol in events name, so let's
|
* perf parser doesn't really like '-' symbol in events name, so let's
|
||||||
|
|
|
@ -18,44 +18,37 @@
|
||||||
|
|
||||||
#define ARC_PATH_MAX 256
|
#define ARC_PATH_MAX 256
|
||||||
|
|
||||||
/*
|
static noinline void print_regs_scratch(struct pt_regs *regs)
|
||||||
* Common routine to print scratch regs (r0-r12) or callee regs (r13-r25)
|
|
||||||
* -Prints 3 regs per line and a CR.
|
|
||||||
* -To continue, callee regs right after scratch, special handling of CR
|
|
||||||
*/
|
|
||||||
static noinline void print_reg_file(long *reg_rev, int start_num)
|
|
||||||
{
|
{
|
||||||
unsigned int i;
|
pr_cont("BTA: 0x%08lx\n SP: 0x%08lx FP: 0x%08lx BLK: %pS\n",
|
||||||
char buf[512];
|
regs->bta, regs->sp, regs->fp, (void *)regs->blink);
|
||||||
int n = 0, len = sizeof(buf);
|
pr_cont("LPS: 0x%08lx\tLPE: 0x%08lx\tLPC: 0x%08lx\n",
|
||||||
|
regs->lp_start, regs->lp_end, regs->lp_count);
|
||||||
|
|
||||||
for (i = start_num; i < start_num + 13; i++) {
|
pr_info("r00: 0x%08lx\tr01: 0x%08lx\tr02: 0x%08lx\n" \
|
||||||
n += scnprintf(buf + n, len - n, "r%02u: 0x%08lx\t",
|
"r03: 0x%08lx\tr04: 0x%08lx\tr05: 0x%08lx\n" \
|
||||||
i, (unsigned long)*reg_rev);
|
"r06: 0x%08lx\tr07: 0x%08lx\tr08: 0x%08lx\n" \
|
||||||
|
"r09: 0x%08lx\tr10: 0x%08lx\tr11: 0x%08lx\n" \
|
||||||
if (((i + 1) % 3) == 0)
|
"r12: 0x%08lx\t",
|
||||||
n += scnprintf(buf + n, len - n, "\n");
|
regs->r0, regs->r1, regs->r2,
|
||||||
|
regs->r3, regs->r4, regs->r5,
|
||||||
/* because pt_regs has regs reversed: r12..r0, r25..r13 */
|
regs->r6, regs->r7, regs->r8,
|
||||||
if (is_isa_arcv2() && start_num == 0)
|
regs->r9, regs->r10, regs->r11,
|
||||||
reg_rev++;
|
regs->r12);
|
||||||
else
|
|
||||||
reg_rev--;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (start_num != 0)
|
|
||||||
n += scnprintf(buf + n, len - n, "\n\n");
|
|
||||||
|
|
||||||
/* To continue printing callee regs on same line as scratch regs */
|
|
||||||
if (start_num == 0)
|
|
||||||
pr_info("%s", buf);
|
|
||||||
else
|
|
||||||
pr_cont("%s\n", buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_callee_regs(struct callee_regs *cregs)
|
static void print_regs_callee(struct callee_regs *regs)
|
||||||
{
|
{
|
||||||
print_reg_file(&(cregs->r13), 13);
|
pr_cont("r13: 0x%08lx\tr14: 0x%08lx\n" \
|
||||||
|
"r15: 0x%08lx\tr16: 0x%08lx\tr17: 0x%08lx\n" \
|
||||||
|
"r18: 0x%08lx\tr19: 0x%08lx\tr20: 0x%08lx\n" \
|
||||||
|
"r21: 0x%08lx\tr22: 0x%08lx\tr23: 0x%08lx\n" \
|
||||||
|
"r24: 0x%08lx\tr25: 0x%08lx\n",
|
||||||
|
regs->r13, regs->r14,
|
||||||
|
regs->r15, regs->r16, regs->r17,
|
||||||
|
regs->r18, regs->r19, regs->r20,
|
||||||
|
regs->r21, regs->r22, regs->r23,
|
||||||
|
regs->r24, regs->r25);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_task_path_n_nm(struct task_struct *tsk)
|
static void print_task_path_n_nm(struct task_struct *tsk)
|
||||||
|
@ -175,7 +168,7 @@ static void show_ecr_verbose(struct pt_regs *regs)
|
||||||
void show_regs(struct pt_regs *regs)
|
void show_regs(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
struct task_struct *tsk = current;
|
struct task_struct *tsk = current;
|
||||||
struct callee_regs *cregs;
|
struct callee_regs *cregs = (struct callee_regs *)tsk->thread.callee_reg;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* generic code calls us with preemption disabled, but some calls
|
* generic code calls us with preemption disabled, but some calls
|
||||||
|
@ -204,25 +197,15 @@ void show_regs(struct pt_regs *regs)
|
||||||
STS_BIT(regs, A2), STS_BIT(regs, A1),
|
STS_BIT(regs, A2), STS_BIT(regs, A1),
|
||||||
STS_BIT(regs, E2), STS_BIT(regs, E1));
|
STS_BIT(regs, E2), STS_BIT(regs, E1));
|
||||||
#else
|
#else
|
||||||
pr_cont(" [%2s%2s%2s%2s]",
|
pr_cont(" [%2s%2s%2s%2s] ",
|
||||||
STS_BIT(regs, IE),
|
STS_BIT(regs, IE),
|
||||||
(regs->status32 & STATUS_U_MASK) ? "U " : "K ",
|
(regs->status32 & STATUS_U_MASK) ? "U " : "K ",
|
||||||
STS_BIT(regs, DE), STS_BIT(regs, AE));
|
STS_BIT(regs, DE), STS_BIT(regs, AE));
|
||||||
#endif
|
#endif
|
||||||
pr_cont(" BTA: 0x%08lx\n SP: 0x%08lx FP: 0x%08lx BLK: %pS\n",
|
|
||||||
regs->bta, regs->sp, regs->fp, (void *)regs->blink);
|
|
||||||
pr_info("LPS: 0x%08lx\tLPE: 0x%08lx\tLPC: 0x%08lx\n",
|
|
||||||
regs->lp_start, regs->lp_end, regs->lp_count);
|
|
||||||
|
|
||||||
/* print regs->r0 thru regs->r12
|
print_regs_scratch(regs);
|
||||||
* Sequential printing was generating horrible code
|
|
||||||
*/
|
|
||||||
print_reg_file(&(regs->r0), 0);
|
|
||||||
|
|
||||||
/* If Callee regs were saved, display them too */
|
|
||||||
cregs = (struct callee_regs *)current->thread.callee_reg;
|
|
||||||
if (cregs)
|
if (cregs)
|
||||||
show_callee_regs(cregs);
|
print_regs_callee(cregs);
|
||||||
|
|
||||||
preempt_disable();
|
preempt_disable();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,8 @@ static unsigned long low_mem_sz;
|
||||||
|
|
||||||
#ifdef CONFIG_HIGHMEM
|
#ifdef CONFIG_HIGHMEM
|
||||||
static unsigned long min_high_pfn, max_high_pfn;
|
static unsigned long min_high_pfn, max_high_pfn;
|
||||||
static u64 high_mem_start;
|
static phys_addr_t high_mem_start;
|
||||||
static u64 high_mem_sz;
|
static phys_addr_t high_mem_sz;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DISCONTIGMEM
|
#ifdef CONFIG_DISCONTIGMEM
|
||||||
|
@ -69,6 +69,7 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
|
||||||
high_mem_sz = size;
|
high_mem_sz = size;
|
||||||
in_use = 1;
|
in_use = 1;
|
||||||
memblock_add_node(base, size, 1);
|
memblock_add_node(base, size, 1);
|
||||||
|
memblock_reserve(base, size);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +158,7 @@ void __init setup_arch_memory(void)
|
||||||
min_high_pfn = PFN_DOWN(high_mem_start);
|
min_high_pfn = PFN_DOWN(high_mem_start);
|
||||||
max_high_pfn = PFN_DOWN(high_mem_start + high_mem_sz);
|
max_high_pfn = PFN_DOWN(high_mem_start + high_mem_sz);
|
||||||
|
|
||||||
max_zone_pfn[ZONE_HIGHMEM] = max_high_pfn;
|
max_zone_pfn[ZONE_HIGHMEM] = min_low_pfn;
|
||||||
|
|
||||||
high_memory = (void *)(min_high_pfn << PAGE_SHIFT);
|
high_memory = (void *)(min_high_pfn << PAGE_SHIFT);
|
||||||
kmap_init();
|
kmap_init();
|
||||||
|
@ -166,6 +167,17 @@ void __init setup_arch_memory(void)
|
||||||
free_area_init(max_zone_pfn);
|
free_area_init(max_zone_pfn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void __init highmem_init(void)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_HIGHMEM
|
||||||
|
unsigned long tmp;
|
||||||
|
|
||||||
|
memblock_free(high_mem_start, high_mem_sz);
|
||||||
|
for (tmp = min_high_pfn; tmp < max_high_pfn; tmp++)
|
||||||
|
free_highmem_page(pfn_to_page(tmp));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* mem_init - initializes memory
|
* mem_init - initializes memory
|
||||||
*
|
*
|
||||||
|
@ -174,14 +186,7 @@ void __init setup_arch_memory(void)
|
||||||
*/
|
*/
|
||||||
void __init mem_init(void)
|
void __init mem_init(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_HIGHMEM
|
|
||||||
unsigned long tmp;
|
|
||||||
|
|
||||||
reset_all_zones_managed_pages();
|
|
||||||
for (tmp = min_high_pfn; tmp < max_high_pfn; tmp++)
|
|
||||||
free_highmem_page(pfn_to_page(tmp));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
memblock_free_all();
|
memblock_free_all();
|
||||||
|
highmem_init();
|
||||||
mem_init_print_info(NULL);
|
mem_init_print_info(NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#define CTOP_AUX_DPC (CTOP_AUX_BASE + 0x02C)
|
#define CTOP_AUX_DPC (CTOP_AUX_BASE + 0x02C)
|
||||||
#define CTOP_AUX_LPC (CTOP_AUX_BASE + 0x030)
|
#define CTOP_AUX_LPC (CTOP_AUX_BASE + 0x030)
|
||||||
#define CTOP_AUX_EFLAGS (CTOP_AUX_BASE + 0x080)
|
#define CTOP_AUX_EFLAGS (CTOP_AUX_BASE + 0x080)
|
||||||
#define CTOP_AUX_IACK (CTOP_AUX_BASE + 0x088)
|
|
||||||
#define CTOP_AUX_GPA1 (CTOP_AUX_BASE + 0x08C)
|
#define CTOP_AUX_GPA1 (CTOP_AUX_BASE + 0x08C)
|
||||||
#define CTOP_AUX_UDMC (CTOP_AUX_BASE + 0x300)
|
#define CTOP_AUX_UDMC (CTOP_AUX_BASE + 0x300)
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,12 @@
|
||||||
#define CTOP_INST_MOV2B_FLIP_R3_B1_B2_INST 0x5B60
|
#define CTOP_INST_MOV2B_FLIP_R3_B1_B2_INST 0x5B60
|
||||||
#define CTOP_INST_MOV2B_FLIP_R3_B1_B2_LIMM 0x00010422
|
#define CTOP_INST_MOV2B_FLIP_R3_B1_B2_LIMM 0x00010422
|
||||||
|
|
||||||
|
#ifndef AUX_IENABLE
|
||||||
|
#define AUX_IENABLE 0x40c
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define CTOP_AUX_IACK (0xFFFFF800 + 0x088)
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/* In order to increase compilation test coverage */
|
/* In order to increase compilation test coverage */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче