History

Merge tag 'nios2-fixes-v3.19-rc3' of git://git.rocketboards.org/linux-socfpga-next

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

Linus Torvalds committed 11 years ago

Commit a5cb2362 parents 6ca793a 1b0f4492 files · +3 −18Browse files

Unified · Split

2 files
  1. arch/nios2/kernel/cpuinfo.c +1 −0
  2. arch/nios2/kernel/entry.S +2 −18
arch/nios2/kernel/cpuinfo.c+1−0
@@ -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");
arch/nios2/kernel/entry.S+2−18
@@ -365,30 +365,14 @@ ENTRY(ret_from_interrupt) · 364 unmodified lines
365 GET_THREAD_INFO r1365 GET_THREAD_INFO r1
366 ldw r4, TI_PREEMPT_COUNT(r1)366 ldw r4, TI_PREEMPT_COUNT(r1)
367 bne r4, r0, restore_all367 bne r4, r0, restore_all
368
369need_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_all369 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_EPIE371 andi r10, r4, ESTATUS_EPIE
374 beq r10, r0, restore_all372 beq r10, r0, restore_all
375 movia r4, PREEMPT_ACTIVE373 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#endif374#endif
375 br restore_all
392 376
393/***********************************************************************377/***********************************************************************
394 * A few syscall wrappers378 * A few syscall wrappers

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t