Re: [PATCH] pinctrl: imx: Check for memory allocation failure

2017-05-06 Thread Stafford Horne
Hi Christophe, On Sat, May 06, 2017 at 10:23:59AM +0200, Christophe JAILLET wrote: > If 'devm_kzalloc' fails, a NULL pointer will be dereferenced. > Return -ENOMEM instead, as done for the other memory allocation just a > few lines below. This looks fine. > BTW, change the 'devm_kzalloc' into a

Re: [4.12.0-rc0]: compile error in initramfs.c

2017-05-06 Thread Stafford Horne
On Sat, May 06, 2017 at 10:39:01AM -0700, Linus Torvalds wrote: > On Sat, May 6, 2017 at 10:28 AM, Randy Dunlap wrote: > > > > A fix was posted here: > > http://marc.info/?l=linux-kernel&m=149405418520059&w=2 > > That looks like it will just cause a warning instead ("unused label"). > > The prop

Re: initramfs: Always do fput() and load modules after rootfs populate

2017-05-06 Thread Stafford Horne
On Sat, May 06, 2017 at 05:17:04PM +0900, Stafford Horne wrote: > On Sat, May 06, 2017 at 12:02:32AM -0700, Andrei Vagin wrote: > > Hi, > > > > I see the following error with this patch: > > > > init/initramfs.c: In function 'populate_rootfs': > &g

Re: initramfs: Always do fput() and load modules after rootfs populate

2017-05-06 Thread Stafford Horne
On Sat, May 06, 2017 at 12:02:32AM -0700, Andrei Vagin wrote: > Hi, > > I see the following error with this patch: > > init/initramfs.c: In function 'populate_rootfs': > init/initramfs.c:644:2: error: label at end of compound statement > done: > ^ > scripts/Makefile.build:294: recipe for targ

Re: [PATCH] initramfs: Always do fput() and load modules after rootfs populate

2017-05-05 Thread Stafford Horne
On Thu, May 04, 2017 at 07:41:48PM +0100, Al Viro wrote: > On Thu, May 04, 2017 at 09:47:00PM +0900, Stafford Horne wrote: > > In OpenRISC we do not have a bootloader passed initrd, but the built in > > initramfs does contain the /init and other binaries, including modules. > >

[GIT PULL] Initramfs fix for 4.12-rc1

2017-05-05 Thread Stafford Horne
) Fix for initramfs for 4.12-rc1 Stafford Horne (1): initramfs: Always do fput() and load modules after rootfs populate init/initramfs.c | 15 +-- 1 file changed, 9 insertions(+), 6

[PATCH] initramfs: Always do fput() and load modules after rootfs populate

2017-05-04 Thread Stafford Horne
itramfs: finish fput() before accessing any binary from initramfs") Cc: Lokesh Vutla Cc: Al Viro Signed-off-by: Stafford Horne --- init/initramfs.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/init/initramfs.c b/init/initramfs.c index 981f286..3a687

Re: [BUG] OpenRISC exec init fails, bisected to 0886551 ("initramfs: finish fput() before accessing any binary from initramfs")

2017-05-04 Thread Stafford Horne
On Thu, May 04, 2017 at 02:39:38PM +0530, Lokesh Vutla wrote: > > > On Thursday 04 May 2017 02:05 PM, Stafford Horne wrote: > > On Thu, May 04, 2017 at 01:15:23PM +0530, Lokesh Vutla wrote: > >> > >> > >> On Thursday 04 May 2017 12:41 PM, Stafford H

Re: [BUG] OpenRISC exec init fails, bisected to 0886551 ("initramfs: finish fput() before accessing any binary from initramfs")

2017-05-04 Thread Stafford Horne
On Thu, May 04, 2017 at 01:15:23PM +0530, Lokesh Vutla wrote: > > > On Thursday 04 May 2017 12:41 PM, Stafford Horne wrote: > > Hello, > > > > While booting the v4.11 kernel I found the below issue. > > > > The summary of the issue mentions > >

[BUG] OpenRISC exec init fails, bisected to 0886551 ("initramfs: finish fput() before accessing any binary from initramfs")

2017-05-04 Thread Stafford Horne
Hello, While booting the v4.11 kernel I found the below issue. The summary of the issue mentions Commit 4a9d4b024a31 ("switch fput to task_work_add") implements a schedule_work() for completing fput(), but did not guarantee calling __fput() after unpacking initramfs. Because of this

Re: [PATCH v2] generic syscalls: Wire up statx syscall

2017-03-20 Thread Stafford Horne
On Mon, Mar 20, 2017 at 12:33:20PM +, Will Deacon wrote: > On Mon, Mar 13, 2017 at 11:45:21PM +0900, Stafford Horne wrote: > > The new syscall statx is implemented as generic code, so enable it > > for architectures like openrisc which use the generic syscall table.

[GIT PULL] Openrisc fixes for 4.11

2017-03-18 Thread Stafford Horne
modules (2017-03-16 00:12:57 +0900) OpenRISC fixes for 4.11 Stafford Horne (3): openrisc: xchg: fix `computed is not used` warning openrisc: fix issue handling

Re: [OpenRISC] [PATCH 3/3] openrisc: Export symbols needed by modules

2017-03-14 Thread Stafford Horne
On Tue, Mar 14, 2017 at 04:25:30PM +0100, Geert Uytterhoeven wrote: > Hi Stafford, > > On Tue, Mar 14, 2017 at 3:56 PM, Stafford Horne wrote: > > This was detected by allmodconfig, errors reported: > > > > ERROR: "empty_zero_page" [net/ceph/libceph.ko] un

[PATCH 2/3] openrisc: fix issue handling 8 byte get_user calls

2017-03-14 Thread Stafford Horne
Was getting the following error with allmodconfig: ERROR: "__get_user_bad" [lib/test_user_copy.ko] undefined! This was simply a missing break statement, causing an unwanted fall through. Signed-off-by: Stafford Horne --- arch/openrisc/include/asm/uaccess.h | 2 +- 1 file

[PATCH 1/3] openrisc: xchg: fix `computed is not used` warning

2017-03-14 Thread Stafford Horne
Applying the same patch logic that was done to the cmpxchg macro. Signed-off-by: Stafford Horne --- arch/openrisc/include/asm/cmpxchg.h | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/openrisc/include/asm/cmpxchg.h b/arch/openrisc/include/asm/cmpxchg.h ind

[PATCH 3/3] openrisc: Export symbols needed by modules

2017-03-14 Thread Stafford Horne
empty_zero_page" [fs/exofs/exofs.ko] undefined! ERROR: "empty_zero_page" [fs/crypto/fscrypto.ko] undefined! ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined! ERROR: "pm_power_off" [drivers/regulator/act8865-regulator.ko] undefined! Signed-off-by: Stafford Horne

[PATCH 0/3] Openrisc fixes for 4.11

2017-03-14 Thread Stafford Horne
Hello, These are a few compile error and warning fixes which were pointed out after the 4.11 code was merged. Most of these could be found at this kbuild failure here: https://lkml.org/lkml/2017/3/9/976 The rest I found with some local testing. Stafford Horne (3): openrisc: xchg: fix

Re: ERROR: "empty_zero_page" [drivers/usb/wusbcore/wusbcore.ko] undefined!

2017-03-14 Thread Stafford Horne
(Resending this to all since somehow I only sent to Andy originally) On Fri, Mar 10, 2017 at 10:20:39AM -0800, Andy Lutomirski wrote: > On Thu, Mar 9, 2017 at 7:54 PM, kbuild test robot > wrote: > > Hi Andy, > > > > First bad commit (maybe != root cause): > > > > tree: https://git.kernel.org/pu

Re: [PATCH v3 02/25] openrisc: add cache way information to cpuinfo

2017-03-14 Thread Stafford Horne
On Tue, Mar 14, 2017 at 01:45:24PM +, Sudeep Holla wrote: > > > On 14/03/17 13:11, Stefan Kristiansson wrote: > > On Tue, Mar 14, 2017 at 12:08:33PM +, Sudeep Holla wrote: > >> On Tue, Feb 21, 2017 at 7:11 PM, Stafford Horne wrote: > >>> From: Stefan

Re: [OpenRISC] Build regressions/improvements in v4.11-rc2

2017-03-14 Thread Stafford Horne
On Tue, Mar 14, 2017 at 10:36:47PM +1100, Michael Ellerman wrote: > Stafford Horne writes: > > On Mon, Mar 13, 2017 at 03:17:15PM +0100, Geert Uytterhoeven wrote: > >> >> > >> >> OpenRISC needs an updated toolchain. > >> > > >> &g

Re: [OpenRISC] Build regressions/improvements in v4.11-rc2

2017-03-13 Thread Stafford Horne
On Mon, Mar 13, 2017 at 03:17:15PM +0100, Geert Uytterhoeven wrote: > Hi Stafford, > > On Mon, Mar 13, 2017 at 3:12 PM, Stafford Horne wrote: > > On Mon, Mar 13, 2017 at 11:15:23AM +0100, Geert Uytterhoeven wrote: > >> On Mon, Mar 13, 2017 at 9:43 AM, Geert Uytterhoeven

[PATCH v2] generic syscalls: Wire up statx syscall

2017-03-13 Thread Stafford Horne
in Marinas Cc: Will Deacon Cc: linux-arm-ker...@lists.infradead.org Signed-off-by: Stafford Horne --- Change in v2: - Add a few more Cc's to get attention of the right people - Add a fixes tag for better audit include/uapi/asm-generic/unistd.h | 4 +++- 1 file changed, 3 insertions

Re: [OpenRISC] Build regressions/improvements in v4.11-rc2

2017-03-13 Thread Stafford Horne
On Mon, Mar 13, 2017 at 11:15:23AM +0100, Geert Uytterhoeven wrote: > On Mon, Mar 13, 2017 at 9:43 AM, Geert Uytterhoeven > wrote: > > JFYI, when comparing v4.11-rc2[1] to v4.11-rc1[3], the summaries are: > > - build errors: +6/-13 > > + /home/kisskb/slave/src/arch/openrisc/include/asm/atomic

[PATCH] generic syscalls: Wire up statx syscall

2017-03-10 Thread Stafford Horne
The new syscall statx is implemented as generic code, so enable it for architectures like openrisc which use the generic syscall table. Signed-off-by: Stafford Horne --- include/uapi/asm-generic/unistd.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uapi/asm

Re: arch/openrisc/include/asm/bitops/atomic.h:35: Error: unknown opcode2 `l.lwa'.

2017-03-05 Thread Stafford Horne
On Sun, Mar 05, 2017 at 07:56:25AM +0800, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head: 2d62e0768d3c28536d4cfe4c40ba1e5e8e442a93 > commit: 0e9f9fd20ce931cc2cf0519c56ae33fc74d656ad openrisc: add atomic bitops > date: 8 day

Re: [PATCH 1/3] futex: remove duplicated code

2017-03-04 Thread Stafford Horne
rg > From: h...@zytor.com > Message-ID: > > On March 4, 2017 1:38:05 PM PST, Stafford Horne wrote: > >On Sat, Mar 04, 2017 at 11:15:17AM -0800, H. Peter Anvin wrote: > >> On 03/04/17 05:05, Russell King - ARM Linux wrote: > >> >> > >> &

Re: [PATCH 1/3] futex: remove duplicated code

2017-03-04 Thread Stafford Horne
On Sat, Mar 04, 2017 at 11:15:17AM -0800, H. Peter Anvin wrote: > On 03/04/17 05:05, Russell King - ARM Linux wrote: > >> > >> +static int futex_atomic_op_inuser(int encoded_op, u32 __user *uaddr) > >> +{ > >> + int op = (encoded_op >> 28) & 7; > >> + int cmp = (encoded_op >> 24) & 15; > >> +

[GIT PULL] OpenRISC updates for 4.11 merge

2017-02-24 Thread Stafford Horne
Olof Kindgren (1): openrisc: Add optimized memset Sebastian Macke (2): openrisc: Fix the bitmask for the unit present register openrisc: Initial support for the idle state Stafford Horne (10): openrisc: Add optimized memcpy routine openrisc: Add .gitignore MAINTA

Re: [PATCH v4 19/24] openrisc: entry: Whitespace and comment cleanups

2017-02-24 Thread Stafford Horne
On Fri, Feb 24, 2017 at 10:45:08AM +0100, Jonas Bonn wrote: > On 02/24/2017 05:32 AM, Stafford Horne wrote: > > Cleanups to whitespace and add some comments. Reading through the delay > > slot logic I noticed some things: > > - Delay slot instructions were not indented >

Re: [PATCH v4 21/24] openrisc: head: Move init strings to rodata section

2017-02-24 Thread Stafford Horne
On Fri, Feb 24, 2017 at 10:28:46AM +0100, Jonas Bonn wrote: > On 02/24/2017 05:32 AM, Stafford Horne wrote: > > The strings used during the head/init phase of openrisc bootup were > > stored in the executable section of the binary. > > > > This causes com

Re: [PATCH v4 20/24] openrisc: entry: Fix delay slot detection

2017-02-24 Thread Stafford Horne
On Fri, Feb 24, 2017 at 10:32:32AM +0100, Jonas Bonn wrote: > On 02/24/2017 05:32 AM, Stafford Horne wrote: > > Use execption SR stored in pt_regs for detection, the current SR is not > > correct as the handler is running after return from exception. > > > > Also, The c

Re: [PATCH v4 22/24] arch/openrisc/lib/memcpy.c: use correct OR1200 option

2017-02-24 Thread Stafford Horne
t; > On 02/24/2017 05:32 AM, Stafford Horne wrote: > > From: Valentin Rothberg > > > > The Kconfig option for OR12000 is OR1K_1200. > > > > Signed-off-by: Valentin Rothberg > > Signed-off-by: Stafford Horne > > --- > > arch/openrisc/lib/memcpy.c

Re: [PATCH v4 06/24] openrisc: add l.lwa/l.swa emulation

2017-02-24 Thread Stafford Horne
On Fri, Feb 24, 2017 at 10:27:37AM +0100, Jonas Bonn wrote: > On 02/24/2017 05:32 AM, Stafford Horne wrote: > > From: Stefan Kristiansson > > > > This adds an emulation layer for implementations > > that lack the l.lwa and l.swa instructions. > > It handles

Re: [PATCH v4 24/24] openrisc: head: Init r0 to 0 on start

2017-02-24 Thread Stafford Horne
On Fri, Feb 24, 2017 at 10:21:50AM +0100, Jonas Bonn wrote: > On 02/24/2017 05:32 AM, Stafford Horne wrote: > > Originally openrisc spec 0 specified that r0 would be wired to ground. > > This is no longer the case. r0 is not guaranteed to be 0 at init, so we > > need to init

Re: [PATCH v4 18/24] scripts/checkstack.pl: Add openrisc support

2017-02-24 Thread Stafford Horne
On Fri, Feb 24, 2017 at 03:42:06PM +0100, Tobias Klauser wrote: > On 2017-02-24 at 05:32:38 +0100, Stafford Horne wrote: > > Openrisc stack pointer is managed by decrementing r1. Add regexes to > > recognize this. > > > > Signed-off-by: Stafford Horne > > -

Re: [PATCH v4 07/24] openrisc: add atomic bitops

2017-02-24 Thread Stafford Horne
On Fri, Feb 24, 2017 at 11:56:48AM +0100, Peter Zijlstra wrote: > > > These 4 patches (7,8,9,10) look good to me. > > Thanks! > > Acked-by: Peter Zijlstra (Intel) Thanks Peter

Re: [PATCH v4 05/24] openrisc: head: refactor out tlb flush into it's own function

2017-02-24 Thread Stafford Horne
On Fri, Feb 24, 2017 at 03:54:02PM +0200, Stefan Kristiansson wrote: > On Fri, Feb 24, 2017 at 01:48:10PM +0100, Jonas Bonn wrote: > > On 02/24/2017 11:54 AM, Stefan Kristiansson wrote: > > >eOn Fri, Feb 24, 2017 at 10:57:19AM +0100, Jonas Bonn wrote: > > >>On 02/24

[PATCH v4 15/24] openrisc: Add optimized memcpy routine

2017-02-23 Thread Stafford Horne
6467 - Byte Copies 7600 In the end I ended up going with Word Copies + Loop Unrolls as it provides best tradeoff between simplicity and boot speedups. Signed-off-by: Stafford Horne --- arch/openrisc/TODO.openrisc| 1 - arch/openrisc/include/asm

[PATCH v4 16/24] openrisc: Add .gitignore

2017-02-23 Thread Stafford Horne
This helps to suppress the vmlinux.lds file. Signed-off-by: Stafford Horne --- arch/openrisc/kernel/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 arch/openrisc/kernel/.gitignore diff --git a/arch/openrisc/kernel/.gitignore b/arch/openrisc/kernel/.gitignore new file mode

[PATCH v4 14/24] openrisc: Add optimized memset

2017-02-23 Thread Stafford Horne
From: Olof Kindgren This adds a hand-optimized assembler version of memset and sets __HAVE_ARCH_MEMSET to use this version instead of the generic C routine Signed-off-by: Olof Kindgren Signed-off-by: Stafford Horne --- arch/openrisc/include/asm/string.h | 7 +++ arch/openrisc/kernel

[PATCH v4 07/24] openrisc: add atomic bitops

2017-02-23 Thread Stafford Horne
OPENRISC_HAVE_INST_LWA_SWA config suggesed by Alan Cox https://lkml.org/lkml/2014/7/23/666, implement test_and_change_bit] Signed-off-by: Stafford Horne --- arch/openrisc/include/asm/bitops.h| 2 +- arch/openrisc/include/asm/bitops/atomic.h | 123 ++ 2 files changed, 124

[PATCH v4 06/24] openrisc: add l.lwa/l.swa emulation

2017-02-23 Thread Stafford Horne
: Stafford Horne --- arch/openrisc/kernel/entry.S | 22 - arch/openrisc/kernel/process.c | 3 + arch/openrisc/kernel/traps.c | 183 + 3 files changed, 206 insertions(+), 2 deletions(-) diff --git a/arch/openrisc/kernel/entry.S b/arch/openrisc/kernel

[PATCH v4 23/24] openrisc: Export ioremap symbols used by modules

2017-02-23 Thread Stafford Horne
Noticed this when building with allyesconfig. Got build failures due to iounmap and __ioremap symbols missing. This patch exports them so modules can use them. This is inline with other architectures. Signed-off-by: Stafford Horne --- arch/openrisc/mm/ioremap.c | 2 ++ 1 file changed, 2

[PATCH v4 18/24] scripts/checkstack.pl: Add openrisc support

2017-02-23 Thread Stafford Horne
Openrisc stack pointer is managed by decrementing r1. Add regexes to recognize this. Signed-off-by: Stafford Horne --- scripts/checkstack.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index dd83978..eea5b78 100755 --- a/scripts

[PATCH v4 08/24] openrisc: add cmpxchg and xchg implementations

2017-02-23 Thread Stafford Horne
OPENRISC_HAVE_INST_LWA_SWA config suggesed by Alan Cox https://lkml.org/lkml/2014/7/23/666] [sho...@gmail.com: fixed unused calculated value compiler warning in define cmpxchg] Signed-off-by: Stafford Horne --- arch/openrisc/include/asm/Kbuild| 2 - arch/openrisc/include/asm/cmpxchg.h | 83

[PATCH v4 05/24] openrisc: head: refactor out tlb flush into it's own function

2017-02-23 Thread Stafford Horne
ommit body] Signed-off-by: Stafford Horne --- arch/openrisc/kernel/head.S | 38 ++ 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/arch/openrisc/kernel/head.S b/arch/openrisc/kernel/head.S index 63ba2d9..a22f1fc 100644 --- a/arch/openrisc/k

[PATCH v4 21/24] openrisc: head: Move init strings to rodata section

2017-02-23 Thread Stafford Horne
-off-by: Stafford Horne --- arch/openrisc/kernel/head.S | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/arch/openrisc/kernel/head.S b/arch/openrisc/kernel/head.S index a22f1fc..573e131 100644 --- a/arch/openrisc/kernel/head.S +++ b/arch/openrisc/kernel/head.S

[PATCH v4 24/24] openrisc: head: Init r0 to 0 on start

2017-02-23 Thread Stafford Horne
clearing. Signed-off-by: Stafford Horne --- arch/openrisc/kernel/head.S | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/openrisc/kernel/head.S b/arch/openrisc/kernel/head.S index 573e131..e8a1784 100644 --- a/arch/openrisc/kernel/head.S +++ b/arch/openrisc/kernel

[PATCH v4 19/24] openrisc: entry: Whitespace and comment cleanups

2017-02-23 Thread Stafford Horne
Cleanups to whitespace and add some comments. Reading through the delay slot logic I noticed some things: - Delay slot instructions were not indented - Some comments are not lined up - Use tabs and spaces consistent with other code No functional change Signed-off-by: Stafford Horne --- arch

[PATCH v4 22/24] arch/openrisc/lib/memcpy.c: use correct OR1200 option

2017-02-23 Thread Stafford Horne
From: Valentin Rothberg The Kconfig option for OR12000 is OR1K_1200. Signed-off-by: Valentin Rothberg Signed-off-by: Stafford Horne --- arch/openrisc/lib/memcpy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/openrisc/lib/memcpy.c b/arch/openrisc/lib/memcpy.c index

[PATCH v4 20/24] openrisc: entry: Fix delay slot detection

2017-02-23 Thread Stafford Horne
by changing the test to check result against non zero. Signed-off-by: Stafford Horne --- arch/openrisc/kernel/entry.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/openrisc/kernel/entry.S b/arch/openrisc/kernel/entry.S index daae2a4..bc65008 100644 --- a/arch

[PATCH v4 17/24] MAINTAINERS: Add the openrisc official repository

2017-02-23 Thread Stafford Horne
The openrisc official repository and patch work happens currently on github. Add the repo for reference. Signed-off-by: Stafford Horne --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 187b961..57809d6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

[PATCH v4 12/24] openrisc: Fix the bitmask for the unit present register

2017-02-23 Thread Stafford Horne
From: Sebastian Macke The bits were swapped, as per spec and processor implementation the power management present bit is 9 and PIC bit is 8. This patch brings the definitions into spec. Signed-off-by: Sebastian Macke [sho...@gmail.com: Added commit body] Signed-off-by: Stafford Horne

[PATCH v4 13/24] openrisc: Initial support for the idle state

2017-02-23 Thread Stafford Horne
checkpatch, blankline after declarations] Signed-off-by: Stafford Horne --- arch/openrisc/kernel/process.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c index c49350b..6e9d1cb 100644 --- a/arch/openrisc/kernel/process.c

[PATCH v4 09/24] openrisc: add optimized atomic operations

2017-02-23 Thread Stafford Horne
OPENRISC_HAVE_INST_LWA_SWA config suggesed by Alan Cox https://lkml.org/lkml/2014/7/23/666] [sho...@gmail.com: expand to implement all ops suggested by Peter Zijlstra https://lkml.org/lkml/2017/2/20/317] Signed-off-by: Stafford Horne --- arch/openrisc/include/asm/Kbuild | 1 - arch/openrisc/include/asm

[PATCH v4 10/24] openrisc: add futex_atomic_* implementations

2017-02-23 Thread Stafford Horne
...@gmail.com: remove OPENRISC_HAVE_INST_LWA_SWA config suggesed by Alan Cox https://lkml.org/lkml/2014/7/23/666] Signed-off-by: Stafford Horne --- arch/openrisc/include/asm/Kbuild | 1 - arch/openrisc/include/asm/futex.h | 135 ++ 2 files changed, 135 insertions

[PATCH v4 11/24] openrisc: remove unnecessary stddef.h include

2017-02-23 Thread Stafford Horne
From: Stefan Kristiansson This causes the build to fail when building with the or1k-musl-linux- toolchain and it is not needed. Signed-off-by: Stafford Horne --- arch/openrisc/kernel/ptrace.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc

[PATCH v4 02/24] openrisc: add cache way information to cpuinfo

2017-02-23 Thread Stafford Horne
: Stafford Horne --- arch/openrisc/include/asm/cpuinfo.h | 2 ++ arch/openrisc/kernel/setup.c| 67 - 2 files changed, 38 insertions(+), 31 deletions(-) diff --git a/arch/openrisc/include/asm/cpuinfo.h b/arch/openrisc/include/asm/cpuinfo.h index 917318b

[PATCH v4 04/24] openrisc: head: use THREAD_SIZE instead of magic constant

2017-02-23 Thread Stafford Horne
From: Stefan Kristiansson The stack size was hard coded to 0x2000, use the standard THREAD_SIZE definition loaded from thread_info.h. Signed-off-by: Stefan Kristiansson [sho...@gmail.com: Added body to the commit message] Signed-off-by: Stafford Horne --- arch/openrisc/kernel/head.S | 4

[PATCH v4 01/24] openrisc: use SPARSE_IRQ

2017-02-23 Thread Stafford Horne
From: Jonas Bonn The sparse IRQ framework is preferred nowadays so switch over to it. Signed-off-by: Jonas Bonn Signed-off-by: Stafford Horne --- arch/openrisc/Kconfig| 1 + arch/openrisc/include/asm/Kbuild | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/openrisc

[PATCH v4 03/24] openrisc: tlb miss handler optimizations

2017-02-23 Thread Stafford Horne
Signed-off-by: Jonas Bonn Signed-off-by: Stafford Horne --- arch/openrisc/kernel/head.S | 141 +++- 1 file changed, 46 insertions(+), 95 deletions(-) diff --git a/arch/openrisc/kernel/head.S b/arch/openrisc/kernel/head.S index f147933..2346c5b 100644

[PATCH v4 00/24] OpenRISC patches for 4.11

2017-02-23 Thread Stafford Horne
_IRQ Olof Kindgren (1): openrisc: Add optimized memset Sebastian Macke (2): openrisc: Fix the bitmask for the unit present register openrisc: Initial support for the idle state Stafford Horne (9): openrisc: Add optimized memcpy routine openrisc: Add .gitignore MAINTAINERS: Add the open

Re: Crosstool/kbuild-all toolchain updates

2017-02-23 Thread Stafford Horne
On Sun, Feb 19, 2017 at 11:49:23AM -0600, Segher Boessenkool wrote: > Hi! > > On Sun, Feb 19, 2017 at 09:26:37PM +0800, Fengguang Wu wrote: > > An uptodate crosstool and reasonable active maintainer would be very > > welcome. I'll sure be a heavy user. In the past year when crosstool is > > not up

Re: [OpenRISC] [PATCH v3 08/25] openrisc: add cmpxchg and xchg implementations

2017-02-22 Thread Stafford Horne
On Thu, Feb 23, 2017 at 04:30:35AM +1100, Richard Henderson wrote: > On 02/23/2017 01:20 AM, Stafford Horne wrote: > > On Wed, Feb 22, 2017 at 12:19:40PM +0100, Peter Zijlstra wrote: > > > On Wed, Feb 22, 2017 at 04:11:37AM +0900, Stafford Horne wrote: > > > >

Re: [OpenRISC] [PATCH v3 09/25] openrisc: add optimized atomic operations

2017-02-22 Thread Stafford Horne
On Thu, Feb 23, 2017 at 04:31:34AM +1100, Richard Henderson wrote: > On 02/23/2017 01:22 AM, Stafford Horne wrote: > > > static inline int __atomic_add_unless(atomic_t *v, int a, int u) > > > { > > > int old, tmp; > > > > > > __asm__ __vo

Re: [PATCH v3 09/25] openrisc: add optimized atomic operations

2017-02-22 Thread Stafford Horne
On Wed, Feb 22, 2017 at 12:27:37PM +0100, Peter Zijlstra wrote: > On Wed, Feb 22, 2017 at 04:11:38AM +0900, Stafford Horne wrote: > > +#define atomic_add_return atomic_add_return > > +#define atomic_sub_return atomic_sub_return > > +#define atomic_fetch_add atomic_f

Re: [PATCH v3 08/25] openrisc: add cmpxchg and xchg implementations

2017-02-22 Thread Stafford Horne
On Wed, Feb 22, 2017 at 12:19:40PM +0100, Peter Zijlstra wrote: > On Wed, Feb 22, 2017 at 04:11:37AM +0900, Stafford Horne wrote: > > + __asm__ __volatile__( > > + "1: l.lwa %0, 0(%1) \n" > > + " l.sfeq %0, %2

Re: [PATCH v3 14/25] openrisc: Initial support for the idle state

2017-02-22 Thread Stafford Horne
On Tue, Feb 21, 2017 at 12:24:41PM -0800, Joe Perches wrote: > On Wed, 2017-02-22 at 04:11 +0900, Stafford Horne wrote: > > From: Sebastian Macke > > > > This patch adds basic support for the idle state of the cpu. > > The patch overrides the regular idle func

[PATCH v3 14/25] openrisc: Initial support for the idle state

2017-02-21 Thread Stafford Horne
checkpatch, blankline after declarations] Signed-off-by: Stafford Horne --- arch/openrisc/kernel/process.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/openrisc/kernel/process.c b/arch/openrisc/kernel/process.c index c49350b..ffde77f 100644 --- a/arch/openrisc/kernel

[PATCH v3 12/25] openrisc: remove unnecessary stddef.h include

2017-02-21 Thread Stafford Horne
From: Stefan Kristiansson This causes the build to fail when building with the or1k-musl-linux- toolchain and it is not needed. Signed-off-by: Stafford Horne --- arch/openrisc/kernel/ptrace.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc

[PATCH v3 13/25] openrisc: Fix the bitmask for the unit present register

2017-02-21 Thread Stafford Horne
From: Sebastian Macke The bits were swapped, as per spec and processor implementation the power management present bit is 9 and PIC bit is 8. This patch brings the definitions into spec. Signed-off-by: Sebastian Macke [sho...@gmail.com: Added commit body] Signed-off-by: Stafford Horne

[PATCH v3 11/25] openrisc: add futex_atomic_* implementations

2017-02-21 Thread Stafford Horne
...@gmail.com: remove OPENRISC_HAVE_INST_LWA_SWA config suggesed by Alan Cox https://lkml.org/lkml/2014/7/23/666] Signed-off-by: Stafford Horne --- arch/openrisc/include/asm/Kbuild | 1 - arch/openrisc/include/asm/futex.h | 135 ++ 2 files changed, 135 insertions

[PATCH v3 10/25] openrisc: add spinlock implementation

2017-02-21 Thread Stafford Horne
From: Stefan Kristiansson Heavily based on the ARM implementation, this adds ticket spinlock support for OpenRISC. Cc: Peter Zijlstra Signed-off-by: Stefan Kristiansson [sho...@gmail.com: fix tabs vs space checkpatch warning] Signed-off-by: Stafford Horne --- arch/openrisc/include/asm

[PATCH v3 09/25] openrisc: add optimized atomic operations

2017-02-21 Thread Stafford Horne
OPENRISC_HAVE_INST_LWA_SWA config suggesed by Alan Cox https://lkml.org/lkml/2014/7/23/666] [sho...@gmail.com: expand to implement all ops suggested by Peter Zijlstra https://lkml.org/lkml/2017/2/20/317] Signed-off-by: Stafford Horne --- arch/openrisc/include/asm/Kbuild | 1 - arch/openrisc/include/asm

[PATCH v3 18/25] MAINTAINERS: Add the openrisc official repository

2017-02-21 Thread Stafford Horne
The openrisc official repository and patch work happens currently on github. Add the repo for reference. Signed-off-by: Stafford Horne --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 187b961..57809d6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

[PATCH v3 08/25] openrisc: add cmpxchg and xchg implementations

2017-02-21 Thread Stafford Horne
OPENRISC_HAVE_INST_LWA_SWA config suggesed by Alan Cox https://lkml.org/lkml/2014/7/23/666] [sho...@gmail.com: fixed unused calculated value compiler warning in define cmpxchg] Signed-off-by: Stafford Horne --- arch/openrisc/include/asm/Kbuild| 2 - arch/openrisc/include/asm/cmpxchg.h | 82

[PATCH v3 07/25] openrisc: add atomic bitops

2017-02-21 Thread Stafford Horne
OPENRISC_HAVE_INST_LWA_SWA config suggesed by Alan Cox https://lkml.org/lkml/2014/7/23/666, implement test_and_change_bit] Signed-off-by: Stafford Horne --- arch/openrisc/include/asm/bitops.h| 2 +- arch/openrisc/include/asm/bitops/atomic.h | 123 ++ 2 files changed, 124

[PATCH v3 20/25] openrisc: entry: Whitespace and comment cleanups

2017-02-21 Thread Stafford Horne
Cleanups to whitespace and add some comments. Reading through the delay slot logic I noticed some things: - Delay slot instructions were not indented - Some comments are not lined up - Use tabs and spaces consistent with other code No functional change Signed-off-by: Stafford Horne --- arch

[PATCH v3 17/25] openrisc: Add .gitignore

2017-02-21 Thread Stafford Horne
This helps to suppress the vmlinux.lds file. Signed-off-by: Stafford Horne --- arch/openrisc/kernel/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 arch/openrisc/kernel/.gitignore diff --git a/arch/openrisc/kernel/.gitignore b/arch/openrisc/kernel/.gitignore new file mode

[PATCH v3 21/25] openrisc: entry: Fix delay slot detection

2017-02-21 Thread Stafford Horne
by changing the test to check result against non zero. Signed-off-by: Stafford Horne --- arch/openrisc/kernel/entry.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/openrisc/kernel/entry.S b/arch/openrisc/kernel/entry.S index daae2a4..bc65008 100644 --- a/arch

[PATCH v3 06/25] openrisc: add l.lwa/l.swa emulation

2017-02-21 Thread Stafford Horne
: Stafford Horne --- arch/openrisc/kernel/entry.S | 22 - arch/openrisc/kernel/process.c | 3 + arch/openrisc/kernel/traps.c | 183 + 3 files changed, 206 insertions(+), 2 deletions(-) diff --git a/arch/openrisc/kernel/entry.S b/arch/openrisc/kernel

[PATCH v3 16/25] openrisc: Add optimized memcpy routine

2017-02-21 Thread Stafford Horne
6467 - Byte Copies 7600 In the end I ended up going with Word Copies + Loop Unrolls as it provides best tradeoff between simplicity and boot speedups. Signed-off-by: Stafford Horne --- arch/openrisc/TODO.openrisc| 1 - arch/openrisc/include/asm

[PATCH v3 19/25] scripts/checkstack.pl: Add openrisc support

2017-02-21 Thread Stafford Horne
Openrisc stack pointer is managed by decrementing r1. Add regexes to recognize this. Signed-off-by: Stafford Horne --- scripts/checkstack.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/checkstack.pl b/scripts/checkstack.pl index dd83978..eea5b78 100755 --- a/scripts

[PATCH v3 03/25] openrisc: tlb miss handler optimizations

2017-02-21 Thread Stafford Horne
Signed-off-by: Jonas Bonn Signed-off-by: Stafford Horne --- arch/openrisc/kernel/head.S | 141 +++- 1 file changed, 46 insertions(+), 95 deletions(-) diff --git a/arch/openrisc/kernel/head.S b/arch/openrisc/kernel/head.S index f147933..2346c5b 100644

[PATCH v3 04/25] openrisc: head: use THREAD_SIZE instead of magic constant

2017-02-21 Thread Stafford Horne
From: Stefan Kristiansson The stack size was hard coded to 0x2000, use the standard THREAD_SIZE definition loaded from thread_info.h. Signed-off-by: Stefan Kristiansson [sho...@gmail.com: Added body to the commit message] Signed-off-by: Stafford Horne --- arch/openrisc/kernel/head.S | 4

[PATCH v3 23/25] arch/openrisc/lib/memcpy.c: use correct OR1200 option

2017-02-21 Thread Stafford Horne
From: Valentin Rothberg The Kconfig option for OR12000 is OR1K_1200. Signed-off-by: Valentin Rothberg Signed-off-by: Stafford Horne --- arch/openrisc/lib/memcpy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/openrisc/lib/memcpy.c b/arch/openrisc/lib/memcpy.c index

[PATCH v3 05/25] openrisc: head: refactor out tlb flush into it's own function

2017-02-21 Thread Stafford Horne
ommit body] Signed-off-by: Stafford Horne --- arch/openrisc/kernel/head.S | 38 ++ 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/arch/openrisc/kernel/head.S b/arch/openrisc/kernel/head.S index 63ba2d9..a22f1fc 100644 --- a/arch/openrisc/k

[PATCH v3 22/25] openrisc: head: Move init strings to rodata section

2017-02-21 Thread Stafford Horne
-off-by: Stafford Horne --- arch/openrisc/kernel/head.S | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/arch/openrisc/kernel/head.S b/arch/openrisc/kernel/head.S index a22f1fc..573e131 100644 --- a/arch/openrisc/kernel/head.S +++ b/arch/openrisc/kernel/head.S

[PATCH v3 24/25] openrisc: Export ioremap symbols used by modules

2017-02-21 Thread Stafford Horne
Noticed this when building with allyesconfig. Got build failures due to iounmap and __ioremap symbols missing. This patch exports them so modules can use them. This is inline with other architectures. Signed-off-by: Stafford Horne --- arch/openrisc/mm/ioremap.c | 2 ++ 1 file changed, 2

[PATCH v3 02/25] openrisc: add cache way information to cpuinfo

2017-02-21 Thread Stafford Horne
: Stafford Horne --- arch/openrisc/include/asm/cpuinfo.h | 2 ++ arch/openrisc/kernel/setup.c| 67 - 2 files changed, 38 insertions(+), 31 deletions(-) diff --git a/arch/openrisc/include/asm/cpuinfo.h b/arch/openrisc/include/asm/cpuinfo.h index 917318b

[PATCH v3 25/25] openrisc: head: Init r0 to 0 on start

2017-02-21 Thread Stafford Horne
clearing. Signed-off-by: Stafford Horne --- arch/openrisc/kernel/head.S | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/openrisc/kernel/head.S b/arch/openrisc/kernel/head.S index 573e131..e8a1784 100644 --- a/arch/openrisc/kernel/head.S +++ b/arch/openrisc/kernel

[PATCH v3 00/25] OpenRISC patches for 4.11 final call

2017-02-21 Thread Stafford Horne
ow if different. -Stafford Jonas Bonn (1): openrisc: use SPARSE_IRQ Olof Kindgren (1): openrisc: Add optimized memset Sebastian Macke (2): openrisc: Fix the bitmask for the unit present register openrisc: Initial support for the idle state Stafford Horne (9): openrisc: Add optimized m

[PATCH v3 01/25] openrisc: use SPARSE_IRQ

2017-02-21 Thread Stafford Horne
From: Jonas Bonn The sparse IRQ framework is preferred nowadays so switch over to it. Signed-off-by: Jonas Bonn Signed-off-by: Stafford Horne --- arch/openrisc/Kconfig| 1 + arch/openrisc/include/asm/Kbuild | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/openrisc

[PATCH v3 15/25] openrisc: Add optimized memset

2017-02-21 Thread Stafford Horne
From: Olof Kindgren This adds a hand-optimized assembler version of memset and sets __HAVE_ARCH_MEMSET to use this version instead of the generic C routine Signed-off-by: Olof Kindgren Signed-off-by: Stafford Horne --- arch/openrisc/include/asm/string.h | 7 +++ arch/openrisc/kernel

Re: linux-next: manual merge of the tip tree with the openrisc tree

2017-02-20 Thread Stafford Horne
On Mon, Feb 20, 2017 at 12:28:44PM +0100, Peter Zijlstra wrote: > On Mon, Feb 20, 2017 at 12:18:05PM +0100, Peter Zijlstra wrote: > > On Sun, Feb 19, 2017 at 04:26:54PM +0900, Stafford Horne wrote: > > > On Fri, Feb 17, 2017 at 12:43:21PM +1100, Stephen Rothwell wro

Re: Crosstool/kbuild-all toolchain updates

2017-02-19 Thread Stafford Horne
Ping? On Wed, Feb 01, 2017 at 07:44:38AM +0900, Stafford Horne wrote: > Hi Fengguang/All, > > I am working as the OpenRISC linux kernel maintainer. Currently in > linux-next our patches are causing kbuild test robot to fail. > > This is because the patches are taking advan

[PATCH] make.cross: Update openrisc toolchain to fix builds

2017-02-19 Thread Stafford Horne
The latest openrisc kernel patchs in linux-next are failing to build due to old toolchains at the crosstool website. Update to point the the toolchain binaries released the OpenRISC team. Signed-off-by: Stafford Horne --- sbin/make.cross | 21 - 1 file changed, 20

Re: linux-next: manual merge of the tip tree with the openrisc tree

2017-02-18 Thread Stafford Horne
On Fri, Feb 17, 2017 at 12:43:21PM +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the tip tree got a conflict in: > > arch/openrisc/include/asm/Kbuild > > between commit: > > 157e82f58007 ("openrisc: add cmpxchg and xchg implementations") > > from the openrisc tre

Re: [PATCH 1/2] libceph: Remove unneeded stddef.h include

2017-02-06 Thread Stafford Horne
On Mon, Feb 06, 2017 at 04:16:55PM +, David Laight wrote: > From: Stafford Horne > > Sent: 05 February 2017 07:08 > > This was causing a build failure for openrisc when using musl and > > gcc 5.4.0 since the file is not available in the toolchain. > > > >

[PATCH 1/2] libceph: Remove unneeded stddef.h include

2017-02-04 Thread Stafford Horne
This was causing a build failure for openrisc when using musl and gcc 5.4.0 since the file is not available in the toolchain. It doesnt seem this is needed and removing it does not cause any build warnings for me. Signed-off-by: Stafford Horne --- net/ceph/snapshot.c | 2 -- 1 file changed, 2

<    1   2   3   4   5   6   >