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
7272 cpuinfo.has_div = fcpu_has(cpu, "altr,has-div");
7373 cpuinfo.has_mul = fcpu_has(cpu, "altr,has-mul");
7474 cpuinfo.has_mulx = fcpu_has(cpu, "altr,has-mulx");
75+ cpuinfo.mmu = fcpu_has(cpu, "altr,has-mmu");
7576
7677 if (IS_ENABLED(CONFIG_NIOS2_HW_DIV_SUPPORT) && !cpuinfo.has_div)
7778 err_cpu("DIV");
arch/nios2/kernel/entry.S+2−18
@@ -365,30 +365,14 @@ ENTRY(ret_from_interrupt) · 364 unmodified lines
365365 GET_THREAD_INFO r1
366366 ldw r4, TI_PREEMPT_COUNT(r1)
367367 bne r4, r0, restore_all
368−
369−need_resched:
370368 ldw r4, TI_FLAGS(r1) /* ? Need resched set */
371369 BTBZ r10, r4, TIF_NEED_RESCHED, restore_all
372370 ldw r4, PT_ESTATUS(sp) /* ? Interrupts off */
373371 andi r10, r4, ESTATUS_EPIE
374372 beq r10, r0, restore_all
375− movia r4, PREEMPT_ACTIVE
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
373+ call preempt_schedule_irq
391374 #endif
375+ br restore_all
392376
393377 /***********************************************************************
394378 * 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