Pull arch/nios2 fixes from Ley Foon Tan: - fix compilation error when enable CONFIG_PREEMPT - initialize cpuinfo.mmu variable supplied by the device tree * tag 'nios2-fixes-v3.19-rc3' of git://git.rocketboards.org/linux-socfpga-next: nios2: Use preempt_schedule_irq nios2: Initialize cpuinfo.mmu
Unified · Split
| @@ -72,6 +72,7 @@ void __init setup_cpuinfo(void) · 71 unmodified lines | |||
| 72 | cpuinfo.has_div = fcpu_has(cpu, "altr,has-div"); | 72 | cpuinfo.has_div = fcpu_has(cpu, "altr,has-div"); |
| 73 | cpuinfo.has_mul = fcpu_has(cpu, "altr,has-mul"); | 73 | cpuinfo.has_mul = fcpu_has(cpu, "altr,has-mul"); |
| 74 | cpuinfo.has_mulx = fcpu_has(cpu, "altr,has-mulx"); | 74 | cpuinfo.has_mulx = fcpu_has(cpu, "altr,has-mulx"); |
| 75 | cpuinfo.mmu = fcpu_has(cpu, "altr,has-mmu"); | ||
| 75 | 76 | ||
| 76 | if (IS_ENABLED(CONFIG_NIOS2_HW_DIV_SUPPORT) && !cpuinfo.has_div) | 77 | if (IS_ENABLED(CONFIG_NIOS2_HW_DIV_SUPPORT) && !cpuinfo.has_div) |
| 77 | err_cpu("DIV"); | 78 | err_cpu("DIV"); |
| @@ -365,30 +365,14 @@ ENTRY(ret_from_interrupt) · 364 unmodified lines | |||
| 365 | GET_THREAD_INFO r1 | 365 | GET_THREAD_INFO r1 |
| 366 | ldw r4, TI_PREEMPT_COUNT(r1) | 366 | ldw r4, TI_PREEMPT_COUNT(r1) |
| 367 | bne r4, r0, restore_all | 367 | bne r4, r0, restore_all |
| 368 | |||
| 369 | need_resched: | ||
| 370 | ldw r4, TI_FLAGS(r1) /* ? Need resched set */ | 368 | ldw r4, TI_FLAGS(r1) /* ? Need resched set */ |
| 371 | BTBZ r10, r4, TIF_NEED_RESCHED, restore_all | 369 | BTBZ r10, r4, TIF_NEED_RESCHED, restore_all |
| 372 | ldw r4, PT_ESTATUS(sp) /* ? Interrupts off */ | 370 | ldw r4, PT_ESTATUS(sp) /* ? Interrupts off */ |
| 373 | andi r10, r4, ESTATUS_EPIE | 371 | andi r10, r4, ESTATUS_EPIE |
| 374 | beq r10, r0, restore_all | 372 | beq r10, r0, restore_all |
| 375 | movia r4, PREEMPT_ACTIVE | 373 | call preempt_schedule_irq |
| 376 | stw r4, TI_PREEMPT_COUNT(r1) | ||
| 377 | rdctl r10, status /* enable intrs again */ | ||
| 378 | ori r10, r10 ,STATUS_PIE | ||
| 379 | wrctl status, r10 | ||
| 380 | PUSH r1 | ||
| 381 | call schedule | ||
| 382 | POP r1 | ||
| 383 | mov r4, r0 | ||
| 384 | stw r4, TI_PREEMPT_COUNT(r1) | ||
| 385 | rdctl r10, status /* disable intrs */ | ||
| 386 | andi r10, r10, %lo(~STATUS_PIE) | ||
| 387 | wrctl status, r10 | ||
| 388 | br need_resched | ||
| 389 | #else | ||
| 390 | br restore_all | ||
| 391 | #endif | 374 | #endif |
| 375 | br restore_all | ||
| 392 | 376 | ||
| 393 | /*********************************************************************** | 377 | /*********************************************************************** |
| 394 | * A few syscall wrappers | 378 | * A few syscall wrappers |