Complete RV32 support for Linux

On 12/18/2014 02:18 PM, Andrew Waterman wrote:
> In arch/riscv/kernel/entry_32.S
> <https://github.com/ucb-bar/riscv-linux/pull/8#discussion-diff-22063946>:
> 
>> +	bgeu s1, s2, 1f
>> +	lw s1, 0(s1)
>> +	jr s1
>> +1:
>> +	jump handle_fault_unknown
>> +
>> +handle_syscall:
>> +	/* Advance EPC to avoid executing the original
>> +	   scall instruction on sret */
>> +	addi s2, s2, 0x4
>> +	sw s2, PT_EPC(sp)
>> +	/* System calls run with interrupts enabled */
>> +	csrs status, SR_EI
>> +	li t0, __NR_syscalls
>> +	/* Syscall number held in a7 */
>> +	bge a7, t0, bad_syscall_number
> 
> This should be bgeu. The bug is originally mine, but it looks like my
> patch to entry_64.S came after you started work on entry_32.S.
> 

Indeed.  I did notice your fix and checked entry_64.S, but I forgot to
propagate it to entry_32.S.  I'll make the fix and generate a new pull
request.