[PATCH v3 0/3] Define CPU_BIG_ENDIAN or warn for inconsistencies

2017-06-12 Thread Babu Moger
ion for microblaze. Updated the Makefile for microblaze(Suggested by Arnd Bergmann) to properly compile for the correct format. Updated acks. v1 -> v2: Updated the commit messages and acks. Babu Moger (3): arch: Define CPU_BIG_ENDIAN for all fixed big endian archs arch/microblaze: Add

[PATCH v3 2/3] arch/microblaze: Add choice for endianness and update Makefile

2017-06-12 Thread Babu Moger
microblaze architectures can be configured for either little or big endian formats. Add a choice option for the user to select the correct endian format(default to big endian). Also update the Makefile so toolchain can compile for the format it is configured for. Signed-off-by: Babu Moger

[PATCH v3 3/3] include: warn for inconsistent endian config definition

2017-06-12 Thread Babu Moger
is not defined on big endian architecture and also warn if it defined on little endian architectures. Here is our original discussion https://lkml.org/lkml/2017/5/24/620 Signed-off-by: Babu Moger <babu.mo...@oracle.com> Suggested-by: Arnd Bergmann <a...@arndb.de> Acked-by: Geert Uytterhoeven

[PATCH v2 2/7] arch/sparc: Remove the check #ifndef __LINUX_SPINLOCK_TYPES_H

2017-05-19 Thread Babu Moger
Remove the un-necessary "ifndef __LINUX_SPINLOCK_TYPES_H" stanza from SPARC. Signed-off-by: Babu Moger <babu.mo...@oracle.com> Suggested-by: David Miller <da...@davemloft.net> --- arch/sparc/include/asm/spinlock_types.h |4 1 files changed, 0 insertions(+), 4 de

[PATCH v2 0/7] Enable queued rwlock and queued spinlock for SPARC

2017-05-19 Thread Babu Moger
ons as it is defined now in qrwlock.h. 4. Removed check for CONFIG_QUEUED_SPINLOCKS in SPARC64 as it is the default definition now for SPARC64 now. Cleaned-up the previous arch_spin_xxx definitions as it is defined in qspinlock.h. v1: Initial version Babu Moger (7): kernel/locking: Fix compile er

[PATCH v2 7/7] arch/sparc: Enable queued spinlock support for SPARC

2017-05-19 Thread Babu Moger
are replaced by the function in Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewed-by: Shannon Nelson <shannon.nel...@oracle.com> Reviewed-by: Vijay Kumar <vijay.ac.ku...@oracle.c

[PATCH v2 6/7] arch/sparc: Introduce xchg16 for SPARC

2017-05-19 Thread Babu Moger
xchg16. Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Steven Sistare <steven.sist...@oracle.com> Reviewed-by: Shannon Nelson <shannon.nel...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewe

[PATCH v2 5/7] arch/sparc: Enable queued rwlocks for SPARC

2017-05-19 Thread Babu Moger
in include/asm-generic/qrwlock.h Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewed-by: Shannon Nelson <shannon.nel...@oracle.com> Reviewed-by: Vijay Kumar <vijay.ac.ku...@

[PATCH v2 3/7] arch/sparc: Define config parameter CPU_BIG_ENDIAN

2017-05-19 Thread Babu Moger
(u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); } Define CPU_BIG_ENDIAN for SPARC to fix it. Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewed-by: Shannon Nelson <shan

[PATCH v2 4/7] arch/sparc: Introduce cmpxchg_u8 SPARC

2017-05-19 Thread Babu Moger
-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Steve Sistare <steven.sist...@oracle.com> Reviewed-by: Shannon Nelson <shannon.nel...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewed-by: Vijay Ku

[PATCH v2 1/7] kernel/locking: Fix compile error with qrwlock.c

2017-05-19 Thread Babu Moger
d include spinlock.h in qrwlock.c to fix it. Also will be removing this stanza from SPARC. Stay tuned. Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewed-by: Shannon Nelson <shannon.ne

Re: [PATCH v2 1/7] kernel/locking: Fix compile error with qrwlock.c

2017-05-22 Thread Babu Moger
On 5/22/2017 2:03 PM, David Miller wrote: From: Babu Moger <babu.mo...@oracle.com> Date: Fri, 19 May 2017 18:16:55 -0600 Some architectures use the following guard in include file "asm/spinlock_types.h" to discourage including the file directly. Saw these compile erro

Re: [PATCH v3 3/7] arch/sparc: Define config parameter CPU_BIG_ENDIAN

2017-05-24 Thread Babu Moger
On 5/24/2017 4:48 AM, Geert Uytterhoeven wrote: On Tue, May 23, 2017 at 11:45 PM, Babu Moger <babu.mo...@oracle.com> wrote: Found this problem while enabling queued rwlock on SPARC. The parameter CONFIG_CPU_BIG_ENDIAN is used to clear the specific byte in qrwlock structure. W

Re: CPU_BIG_ENDIAN in generic code (was: Re: [PATCH v3 3/7] arch/sparc: Define config parameter CPU_BIG_ENDIAN)

2017-05-24 Thread Babu Moger
Arnd, On 5/24/2017 5:18 AM, Arnd Bergmann wrote: On Wed, May 24, 2017 at 11:59 AM, Geert Uytterhoeven <ge...@linux-m68k.org> wrote: On Tue, May 23, 2017 at 11:45 PM, Babu Moger <babu.mo...@oracle.com> wrote: Found this problem while enabling queued rwlock on SPARC. T

Re: CPU_BIG_ENDIAN in generic code (was: Re: [PATCH v3 3/7] arch/sparc: Define config parameter CPU_BIG_ENDIAN)

2017-05-24 Thread Babu Moger
On 5/24/2017 10:09 AM, Arnd Bergmann wrote: On Wed, May 24, 2017 at 4:45 PM, Babu Moger <babu.mo...@oracle.com> wrote: On 5/24/2017 5:18 AM, Arnd Bergmann wrote: On Wed, May 24, 2017 at 11:59 AM, Geert Uytterhoeven <ge...@linux-m68k.org> wrote: On Tue, May 23, 2017 at 11:45 PM

[PATCH v3 6/7] arch/sparc: Introduce xchg16 for SPARC

2017-05-23 Thread Babu Moger
xchg16. Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Steven Sistare <steven.sist...@oracle.com> Reviewed-by: Shannon Nelson <shannon.nel...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewe

[PATCH v3 0/7] Enable queued rwlock and queued spinlock for SPARC

2017-05-23 Thread Babu Moger
nitial version Babu Moger (7): arch/sparc: Remove the check #ifndef __LINUX_SPINLOCK_TYPES_H kernel/locking: Fix compile error with qrwlock.c arch/sparc: Define config parameter CPU_BIG_ENDIAN arch/sparc: Introduce cmpxchg_u8 SPARC arch/sparc: Enable queued rwlocks for SPARC arch/sparc: Int

[PATCH v3 3/7] arch/sparc: Define config parameter CPU_BIG_ENDIAN

2017-05-23 Thread Babu Moger
(u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); } Define CPU_BIG_ENDIAN for SPARC to fix it. Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewed-by: Shannon Nelson <shan

[PATCH v3 5/7] arch/sparc: Enable queued rwlocks for SPARC

2017-05-23 Thread Babu Moger
in include/asm-generic/qrwlock.h Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewed-by: Shannon Nelson <shannon.nel...@oracle.com> Reviewed-by: Vijay Kumar <vijay.ac.ku...@

[PATCH v3 1/7] arch/sparc: Remove the check #ifndef __LINUX_SPINLOCK_TYPES_H

2017-05-23 Thread Babu Moger
ndif Remove this un-necessary "ifndef __LINUX_SPINLOCK_TYPES_H" stanza from SPARC. Signed-off-by: Babu Moger <babu.mo...@oracle.com> Suggested-by: David Miller <da...@davemloft.net> --- arch/sparc/include/asm/spinlock_types.h |4 1 files changed, 0 insertions(+

[PATCH v3 4/7] arch/sparc: Introduce cmpxchg_u8 SPARC

2017-05-23 Thread Babu Moger
-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Steve Sistare <steven.sist...@oracle.com> Reviewed-by: Shannon Nelson <shannon.nel...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewed-by: Vijay Ku

[PATCH v3 7/7] arch/sparc: Enable queued spinlock support for SPARC

2017-05-23 Thread Babu Moger
are replaced by the function in Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewed-by: Shannon Nelson <shannon.nel...@oracle.com> Reviewed-by: Vijay Kumar <vijay.ac.ku...@oracle.c

[PATCH v3 2/7] kernel/locking: Fix compile error with qrwlock.c

2017-05-23 Thread Babu Moger
: implicit declaration of function ‘arch_spin_unlock’ make[4]: *** [kernel/locking/qrwlock.o] Error 1 Include spinlock.h in qrwlock.c to fix it. Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Jane Chu <jane@oracl

[PATCH v4 1/7] arch/sparc: Remove the check #ifndef __LINUX_SPINLOCK_TYPES_H

2017-05-24 Thread Babu Moger
ndif Remove this un-necessary "ifndef __LINUX_SPINLOCK_TYPES_H" stanza from SPARC. Signed-off-by: Babu Moger <babu.mo...@oracle.com> Suggested-by: David Miller <da...@davemloft.net> --- arch/sparc/include/asm/spinlock_types.h |4 1 files changed, 0 insertions(+

[PATCH v4 4/7] arch/sparc: Introduce cmpxchg_u8 SPARC

2017-05-24 Thread Babu Moger
-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Steve Sistare <steven.sist...@oracle.com> Reviewed-by: Shannon Nelson <shannon.nel...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewed-by: Vijay Ku

[PATCH v4 7/7] arch/sparc: Enable queued spinlock support for SPARC

2017-05-24 Thread Babu Moger
are replaced by the function in Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewed-by: Shannon Nelson <shannon.nel...@oracle.com> Reviewed-by: Vijay Kumar <vijay.ac.ku...@oracle.c

[PATCH v4 5/7] arch/sparc: Enable queued rwlocks for SPARC

2017-05-24 Thread Babu Moger
in include/asm-generic/qrwlock.h Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewed-by: Shannon Nelson <shannon.nel...@oracle.com> Reviewed-by: Vijay Kumar <vijay.ac.ku...@

[PATCH v4 6/7] arch/sparc: Introduce xchg16 for SPARC

2017-05-24 Thread Babu Moger
xchg16. Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Steven Sistare <steven.sist...@oracle.com> Reviewed-by: Shannon Nelson <shannon.nel...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewe

[PATCH v4 0/7] Enable queued rwlock and queued spinlock for SPARC

2017-05-24 Thread Babu Moger
s defined now in qrwlock.h. 4. Removed check for CONFIG_QUEUED_SPINLOCKS in SPARC64 as it is the default definition now for SPARC64 now. Cleaned-up the previous arch_spin_xxx definitions as it is defined in qspinlock.h. v1: Initial version Babu Moger (7): arch/sparc: Remove the chec

[PATCH v4 3/7] arch/sparc: Define config parameter CPU_BIG_ENDIAN

2017-05-24 Thread Babu Moger
(u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); } Define CPU_BIG_ENDIAN for SPARC to fix it. Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewed-by: Shannon Nelson <shan

[PATCH v4 2/7] kernel/locking: Fix compile error with qrwlock.c

2017-05-24 Thread Babu Moger
: implicit declaration of function ‘arch_spin_unlock’ make[4]: *** [kernel/locking/qrwlock.o] Error 1 Include spinlock.h in qrwlock.c to fix it. Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Jane Chu <jane@oracl

Re: CPU_BIG_ENDIAN in generic code (was: Re: [PATCH v3 3/7] arch/sparc: Define config parameter CPU_BIG_ENDIAN)

2017-05-25 Thread Babu Moger
On 5/25/2017 5:27 PM, Max Filippov wrote: On Wed, May 24, 2017 at 3:18 AM, Arnd Bergmann wrote: On Wed, May 24, 2017 at 11:59 AM, Geert Uytterhoeven wrote: I guess the time is ripe for adding (both) symbols to all architectures? Good idea. I think we

Re: CPU_BIG_ENDIAN in generic code (was: Re: [PATCH v3 3/7] arch/sparc: Define config parameter CPU_BIG_ENDIAN)

2017-05-25 Thread Babu Moger
On 5/25/2017 3:09 PM, Arnd Bergmann wrote: On Thu, May 25, 2017 at 4:51 PM, Babu Moger <babu.mo...@oracle.com> wrote: On 5/24/2017 5:18 AM, Arnd Bergmann wrote: I guess the time is ripe for adding (both) symbols to all architectures? Good idea. I think we can do most of this by adding

Re: CPU_BIG_ENDIAN in generic code (was: Re: [PATCH v3 3/7] arch/sparc: Define config parameter CPU_BIG_ENDIAN)

2017-05-25 Thread Babu Moger
Hi Arnd, Here is the draft patch. Some questions below. On 5/24/2017 5:18 AM, Arnd Bergmann wrote: On Wed, May 24, 2017 at 11:59 AM, Geert Uytterhoeven <ge...@linux-m68k.org> wrote: On Tue, May 23, 2017 at 11:45 PM, Babu Moger <babu.mo...@oracle.com> wrote: Found this problem wh

Re: [PATCH 2/6] arch/sparc: Define config parameter CPU_BIG_ENDIAN

2017-05-19 Thread Babu Moger
On 5/18/2017 9:26 PM, David Miller wrote: From: Babu Moger <babu.mo...@oracle.com> Date: Thu, 18 May 2017 18:36:06 -0600 @@ -91,6 +91,10 @@ config ARCH_DEFCONFIG config ARCH_PROC_KCORE_TEXT def_bool y +config CPU_BIG_ENDIAN + bool + default y if SPARC64 +

Re: [PATCH 1/6] kernel/locking: Fix compile error with qrwlock.c

2017-05-19 Thread Babu Moger
On 5/18/2017 9:27 PM, David Miller wrote: From: Babu Moger <babu.mo...@oracle.com> Date: Thu, 18 May 2017 18:36:05 -0600 Seeing this error on SPARC while compiling qrwlock.c. CC kernel/locking/qrwlock.o In file included from ./include/asm-generic/qrwlock_typ

Re: [PATCH 4/6] arch/sparc: Enable queued rwlocks for SPARC

2017-05-19 Thread Babu Moger
On 5/19/2017 4:03 AM, Peter Zijlstra wrote: On Thu, May 18, 2017 at 10:31:13PM -0400, David Miller wrote: From: Babu Moger <babu.mo...@oracle.com> Date: Thu, 18 May 2017 18:36:08 -0600 @@ -82,6 +82,7 @@ config SPARC64 select HAVE_ARCH_AUDITSYSCALL

Re: [PATCH 6/6] arch/sparc: Enable queued spinlock support for SPARC

2017-05-19 Thread Babu Moger
On 5/18/2017 9:32 PM, David Miller wrote: From: Babu Moger <babu.mo...@oracle.com> Date: Thu, 18 May 2017 18:36:10 -0600 @@ -83,6 +83,7 @@ config SPARC64 select ARCH_SUPPORTS_ATOMIC_RMW select HAVE_NMI select ARCH_USE_QUEUED_RWLOCKS +

Re: [PATCH 4/6] arch/sparc: Enable queued rwlocks for SPARC

2017-05-19 Thread Babu Moger
On 5/18/2017 9:31 PM, David Miller wrote: From: Babu Moger <babu.mo...@oracle.com> Date: Thu, 18 May 2017 18:36:08 -0600 @@ -82,6 +82,7 @@ config SPARC64 select HAVE_ARCH_AUDITSYSCALL select ARCH_SUPPORTS_ATOMIC_RMW select HAVE_NMI +

[PATCH 2/6] arch/sparc: Define config parameter CPU_BIG_ENDIAN

2017-05-18 Thread Babu Moger
(u8 *)lock + 3 * IS_BUILTIN(CONFIG_CPU_BIG_ENDIAN); } Define CPU_BIG_ENDIAN for SPARC to fix it. Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewed-by: Shannon Nelson <shan

[PATCH 0/6] Enable queued rwlock and queued spinlock for SPARC

2017-05-18 Thread Babu Moger
324812.2+20.74 fserver IO 1200-2000 users 229538.87 284713.77 +24.03 Disk I/O results are little bit in negative territory. But majority of the performance changes are in positive and it is significant in some cases. Babu Moger (6): kernel/locking: Fix compile error

[PATCH 4/6] arch/sparc: Enable queued rwlocks for SPARC

2017-05-18 Thread Babu Moger
Enable queued rwlocks for SPARC. Here are the discussions on this feature when this was introduced. https://lwn.net/Articles/572765/ https://lwn.net/Articles/582200/ Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Ja

[PATCH 1/6] kernel/locking: Fix compile error with qrwlock.c

2017-05-18 Thread Babu Moger
/spinlock_types.h:5:3: error: #error "please don't include this file directly" Re-arrange the includes in qrwlock_types.h and also include spinlock.h in qrwlock.c to fix it. This should also help other architectures when queued rwlock is enabled. Signed-off-by: Babu Moger <babu.mo.

[PATCH 5/6] arch/sparc: Introduce xchg16 for SPARC

2017-05-18 Thread Babu Moger
xchg16. Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Steven Sistare <steven.sist...@oracle.com> Reviewed-by: Shannon Nelson <shannon.nel...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewe

[PATCH 3/6] arch/sparc: Introduce cmpxchg_u8 SPARC

2017-05-18 Thread Babu Moger
-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon Bugge <haakon.bu...@oracle.com> Reviewed-by: Steve Sistare <steven.sist...@oracle.com> Reviewed-by: Shannon Nelson <shannon.nel...@oracle.com> Reviewed-by: Jane Chu <jane@oracle.com> Reviewed-by: Vijay Ku

[PATCH 6/6] arch/sparc: Enable queued spinlock support for SPARC

2017-05-18 Thread Babu Moger
This patch makes the necessary changes in SPARC architecture to enable queued spinlock support. Here are some of the earlier discussions about this feature. https://lwn.net/Articles/561775/ https://lwn.net/Articles/590243/ Signed-off-by: Babu Moger <babu.mo...@oracle.com> Reviewed-by: Håkon

Re: CPU_BIG_ENDIAN in generic code (was: Re: [PATCH v3 3/7] arch/sparc: Define config parameter CPU_BIG_ENDIAN)

2017-06-07 Thread Babu Moger
On 5/29/2017 9:56 PM, Michael Ellerman wrote: Geert Uytterhoeven <ge...@linux-m68k.org> writes: Hi Michael, On Mon, May 29, 2017 at 2:07 PM, Michael Ellerman <m...@ellerman.id.au> wrote: Geert Uytterhoeven <ge...@linux-m68k.org> writes: On Tue, May 23, 2017 at 11:45 PM, B

[PATCH 0/2] Define CPU_BIG_ENDIAN or warn for inconsistencies

2017-06-08 Thread Babu Moger
and sparc). And warn if there are inconsistencies in this definition. Babu Moger (2): arch: Define CPU_BIG_ENDIAN for all fixed big endian archs include: warn for inconsistent endian config definition arch/frv/Kconfig|3 +++ arch/h8300/Kconfig |3

[PATCH 1/2] arch: Define CPU_BIG_ENDIAN for all fixed big endian archs

2017-06-08 Thread Babu Moger
); } Problem is many of the fixed big endian architectures dont define CPU_BIG_ENDIAN and clears the wrong byte. Define CPU_BIG_ENDIAN for all the fixed big endian architecture. Here is the orinal discussion http://www.spinics.net/lists/devicetree/msg178101.html Signed-off-by: Babu Moger <babu

[PATCH 2/2] include: warn for inconsistent endian config definition

2017-06-08 Thread Babu Moger
discussion http://www.spinics.net/lists/devicetree/msg178101.html Signed-off-by: Babu Moger <babu.mo...@oracle.com> Suggested-by: Arnd Bergmann <a...@arndb.de> --- include/linux/byteorder/big_endian.h|4 include/linux/byteorder/little_endian.h |4 2 files changed, 8 inse

Re: [PATCH 1/2] arch: Define CPU_BIG_ENDIAN for all fixed big endian archs

2017-06-09 Thread Babu Moger
On 6/9/2017 2:03 AM, Geert Uytterhoeven wrote: On Fri, Jun 9, 2017 at 12:17 AM, Babu Moger <babu.mo...@oracle.com> wrote: While working on enabling queued rwlock on SPARC, found this following code in include/asm-generic/qrwlock.h which uses CONFIG_CPU_BIG_ENDIAN to clear a byte.

Re: [PATCH 2/2] include: warn for inconsistent endian config definition

2017-06-09 Thread Babu Moger
Geert, On 6/9/2017 2:16 AM, Geert Uytterhoeven wrote: Hi Babu, On Fri, Jun 9, 2017 at 9:05 AM, Geert Uytterhoeven <ge...@linux-m68k.org> wrote: Here is the original discussion http://www.spinics.net/lists/devicetree/msg178101.html Signed-off-by: Babu Moger <babu.mo...@oracle.com&g

Re: [PATCH 2/2] include: warn for inconsistent endian config definition

2017-06-09 Thread Babu Moger
On 6/9/2017 9:11 AM, Geert Uytterhoeven wrote: Hi Babu, On Fri, Jun 9, 2017 at 3:55 PM, Babu Moger <babu.mo...@oracle.com> wrote: On 6/9/2017 2:16 AM, Geert Uytterhoeven wrote: On Fri, Jun 9, 2017 at 9:05 AM, Geert Uytterhoeven <ge...@linux-m68k.org> wrote: Here is the origina

Re: [PATCH 3/4] watchdog: Split up config options

2017-06-14 Thread Babu Moger
Hi Don, On 6/14/2017 9:09 AM, Don Zickus wrote: On Wed, Jun 14, 2017 at 02:11:18AM +1000, Nicholas Piggin wrote: Yeah, if you wouldn't mind. Sorry for dragging this out, but I feel like we are getting close to have this defined properly which would allow us to split the code up correctly in

Re: [PATCH 3/4] watchdog: Split up config options

2017-06-15 Thread Babu Moger
Nick, On 6/14/2017 10:04 PM, Nicholas Piggin wrote: On Wed, 14 Jun 2017 21:16:04 -0500 Babu Moger <babu.mo...@oracle.com> wrote: Hi Don, On 6/14/2017 9:09 AM, Don Zickus wrote: On Wed, Jun 14, 2017 at 02:11:18AM +1000, Nicholas Piggin wrote: Yeah, if you wouldn't mind. Sorry for dr

Re: [PATCH v4 0/5] Improve watchdog config for arch watchdogs

2017-06-16 Thread Babu Moger
Tested on sparc: Tested-by: Babu Moger <babu.mo...@oracle.com> Reviewed patch #1, #2, #3 Reviewed-by: Babu Moger <babu.mo...@oracle.com> On 6/16/2017 9:50 AM, Don Zickus wrote: (adding Andrew) On Fri, Jun 16, 2017 at 04:57:10PM +1000, Nicholas Piggin wrote: This is the l

[PATCH v2 1/2] arch: Define CPU_BIG_ENDIAN for all fixed big endian archs

2017-06-09 Thread Babu Moger
/earlycon.c drivers/tty/serial/serial_core.c Be aware that this may cause regressions if someone has worked-around problems in the above code already. Remove the work-around. Here is our original discussion https://lkml.org/lkml/2017/5/24/620 Signed-off-by: Babu Moger <babu.mo...@oracle.com> Sug

[PATCH v2 0/2] Define CPU_BIG_ENDIAN or warn for inconsistencies

2017-06-09 Thread Babu Moger
/2017/5/24/620 Based on the discussion, it was decided to add CONFIG_CPU_BIG_ENDIAN for all the fixed big endian architecture(frv, h8300, m68k, openrisc, parisc and sparc). And warn if there are inconsistencies in this definition. v1 -> v2: Updated the commit messages and acks. Babu Moger

[PATCH v2 2/2] include: warn for inconsistent endian config definition

2017-06-09 Thread Babu Moger
is not defined on big endian architecture and also warn if it defined on little endian architectures. Here is our original discussion https://lkml.org/lkml/2017/5/24/620 Signed-off-by: Babu Moger <babu.mo...@oracle.com> Suggested-by: Arnd Bergmann <a...@arndb.de> Acked-by: Geert Uytterhoeven

Re: [PATCH 0/4][V3] Improve watchdog config for arch watchdogs

2017-06-06 Thread Babu Moger
Hi Don, Nicholas, On 6/6/2017 11:08 AM, Don Zickus wrote: (adding Babu) On Tue, May 30, 2017 at 11:26:55AM +1000, Nicholas Piggin wrote: Since last time: - Have the perf based hardlockup detector use arch_touch_nmi_watchdog() rather than hld_touch_nmi_watchdog(). This changes direction

[PATCH 1/2] arch: Fix duplicates in Kconfig for parisc and sparc

2017-09-18 Thread Babu Moger
f21 ("parisc: Define CONFIG_CPU_BIG_ENDIAN") Remove duplicates. Signed-off-by: Babu Moger <babu.mo...@oracle.com> --- arch/parisc/Kconfig |3 --- arch/sparc/Kconfig |3 --- 2 files changed, 0 insertions(+), 6 deletions(-) diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig inde

[PATCH 2/2] arch: change default endian for microblaze

2017-09-18 Thread Babu Moger
Fix the default for microblaze. Michal Simek mentioned default for microblaze should be CPU_LITTLE_ENDIAN. Fixes : commit 206d3642d8ee ("arch/microblaze: add choice for endianness and update Makefile") Signed-off-by: Babu Moger <babu.mo...@oracle.com> Cc: Michal Simek &

[PATCH 0/2] Fix duplicates and change default endian for microblaze

2017-09-18 Thread Babu Moger
This series fixes few Kconfig issues. Babu Moger (2): arch: Fix duplicates in Kconfig for parisc and sparc arch: change default endian for microblaze arch/microblaze/Kconfig |2 +- arch/parisc/Kconfig |3 --- arch/sparc/Kconfig |3 --- 3 files changed, 1 insertions

Re: [PATCH 2/2] arch: change default endian for microblaze

2017-09-18 Thread Babu Moger
On 9/18/2017 12:49 PM, Michal Simek wrote: On 18.9.2017 18:53, Babu Moger wrote: Fix the default for microblaze. Michal Simek mentioned default for microblaze should be CPU_LITTLE_ENDIAN. Fixes : commit 206d3642d8ee ("arch/microblaze: add choice for endianness and update Mak

Re: [PATCH v4 0/5] sparc64: Optimize fls and __fls

2017-10-12 Thread Babu Moger
Looked at all the patches. Looks good to me. Reviewed-by: Babu Moger <babu.mo...@oracle.com> On 10/11/2017 1:50 PM, Vijay Kumar wrote: SPARC provides lzcnt instruction (with VIS3) which can be used to optimize fls, __fls and fls64 functions. For the systems that supports lzcnt instructi

[PATCH] KVM:x86: AMD Processor Topology Information

2018-01-29 Thread Babu Moger
-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Babu Moger <babu.mo...@amd.com> --- Rebased on top of linux-next. Maximum extended functions are already set to 0x801f after the commit 8765d75329a3 KVM: X86: Extend CPUID range to include new leaf arch/x86/kvm/cpuid.c | 3 ++-

[PATCH v2 1/5] KVM: VMX: Fix the module parameters for vmx

2018-03-16 Thread Babu Moger
The vmx module parameters are supposed to be unsigned variants. Also fixed the checkpatch errors like the one below. WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +module_param(ple_gap, uint, S_IRUGO); Signed-off-by: Babu Moger <babu

[PATCH v2 2/5] KVM: VMX: Remove ple_window_actual_max

2018-03-16 Thread Babu Moger
Get rid of ple_window_actual_max, because its benefits are really minuscule and the logic is complicated. The overflows(and underflow) are controlled in __ple_window_grow and _ple_window_shrink respectively. Suggested-by: Radim Krčmář <rkrc...@redhat.com> Signed-off-by: Babu Moger &l

[PATCH v2 5/5] KVM: SVM: Implement pause loop exit logic in SVM

2018-03-16 Thread Babu Moger
with 32 vcpus to simulate extensive pause behaviour. Here are VMEXITS in 10 seconds interval. #VMEXITSBefore the change After the change Pauses 810199 504 Total 882184 325415 Signed-off-by: Babu Moger <babu.mo...@amd.

[PATCH v2 4/5] KVM: SVM: Add pause filter threshold

2018-03-16 Thread Babu Moger
than zero and pause intercept is enabled, a #VMEXIT is triggered. If advanced pause filtering is supported and pause filter threshold field is set to zero, the filter will operate in the simpler, count only mode. Signed-off-by: Babu Moger <babu.mo...@amd.com> --- arch/x86/include/asm/svm

[PATCH v2 0/5] KVM: x86: Implement Pause Loop Exit for SVM

2018-03-16 Thread Babu Moger
as pause_filter_count, pause_filter_thresh, pause_filter_shrink and pause_filter_grow. 4. Taken care of intercept setting and clearing. 5. Fixed few more text changes. v1: Initial RFC version Babu Moger (5): KVM: VMX: Fix the module parameters for vmx KVM: VMX: Remove ple_window_actual_max KVM: VMX

[PATCH v2 3/5] KVM: VMX: Bring the common code to header file

2018-03-16 Thread Babu Moger
This patch brings some of the code from vmx to x86.h header file. Now, we can share this code between vmx and svm. Modified couple functions to make it common. Signed-off-by: Babu Moger <babu.mo...@amd.com> --- arch/x86/kvm/vmx.c | 48 +--- ar

[RFC 1/3] arch/x86/kvm: SVM: Introduce pause filter threshold

2018-03-02 Thread Babu Moger
zero and pause intercept is enabled, a #VMEXIT is triggered. If advanced pause filtering is supported and pause Filter Threshold field is set to zero, the filter will operate in the simpler, count only mode. Signed-off-by: Babu Moger <babu.mo...@amd.com> --- arch/x86/include/asm/svm

[RFC 3/3] arch/x86/kvm: SVM: Introduce pause loop exit logic in SVM

2018-03-02 Thread Babu Moger
Bring the PLE(pause loop exit) logic to AMD svm driver. We have noticed it help in situations where numerous pauses are generated due to spinlock or other scenarios. Tested it with idle=poll and noticed pause interceptions go down considerably. Signed-off-by: Babu Moger <babu.mo...@amd.

[RFC 0/3] arch/x86/kvm: Introduce PLE(pause loop exit) logic in SVM

2018-03-02 Thread Babu Moger
Started working on bringing the PLE(pause loop exit) logic from VMX to SVM. We noticed some improvements in certain cases where numerious pause is generated. Please take a look. If you have any suggestions to make things better, let me know. Babu Moger (3): arch/x86/kvm: SVM: Introduce pause

[RFC 2/3] arch/x86/kvm: VMX: Bring the common code to header file

2018-03-02 Thread Babu Moger
This patch is brings some of the code from vmx to x86.h. We can share this code between vmx and svm. Modified couple of functions to make it common. No functional change. Signed-off-by: Babu Moger <babu.mo...@amd.com> --- arch/x86/kvm/vmx.

[PATCH v2 2/5] KVM: VMX: Remove ple_window_actual_max

2018-03-16 Thread Babu Moger
Get rid of ple_window_actual_max, because its benefits are really minuscule and the logic is complicated. The overflows(and underflow) are controlled in __ple_window_grow and _ple_window_shrink respectively. Suggested-by: Radim Krčmář Signed-off-by: Babu Moger --- arch/x86/kvm/vmx.c | 22

[PATCH v2 5/5] KVM: SVM: Implement pause loop exit logic in SVM

2018-03-16 Thread Babu Moger
with 32 vcpus to simulate extensive pause behaviour. Here are VMEXITS in 10 seconds interval. #VMEXITSBefore the change After the change Pauses 810199 504 Total 882184 325415 Signed-off-by: Babu Moger --- arch/x86/kvm/svm.c

[PATCH v2 4/5] KVM: SVM: Add pause filter threshold

2018-03-16 Thread Babu Moger
than zero and pause intercept is enabled, a #VMEXIT is triggered. If advanced pause filtering is supported and pause filter threshold field is set to zero, the filter will operate in the simpler, count only mode. Signed-off-by: Babu Moger --- arch/x86/include/asm/svm.h | 3 ++- arch/x86/kvm/svm.c

[PATCH v2 0/5] KVM: x86: Implement Pause Loop Exit for SVM

2018-03-16 Thread Babu Moger
as pause_filter_count, pause_filter_thresh, pause_filter_shrink and pause_filter_grow. 4. Taken care of intercept setting and clearing. 5. Fixed few more text changes. v1: Initial RFC version Babu Moger (5): KVM: VMX: Fix the module parameters for vmx KVM: VMX: Remove ple_window_actual_max KVM: VMX

[PATCH v2 3/5] KVM: VMX: Bring the common code to header file

2018-03-16 Thread Babu Moger
This patch brings some of the code from vmx to x86.h header file. Now, we can share this code between vmx and svm. Modified couple functions to make it common. Signed-off-by: Babu Moger --- arch/x86/kvm/vmx.c | 48 +--- arch/x86/kvm/x86.h | 35

[PATCH v2 1/5] KVM: VMX: Fix the module parameters for vmx

2018-03-16 Thread Babu Moger
The vmx module parameters are supposed to be unsigned variants. Also fixed the checkpatch errors like the one below. WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +module_param(ple_gap, uint, S_IRUGO); Signed-off-by: Babu Moger --- arch

Re: [PATCH v4 0/5] sparc64: Optimize fls and __fls

2017-10-12 Thread Babu Moger
Looked at all the patches. Looks good to me. Reviewed-by: Babu Moger On 10/11/2017 1:50 PM, Vijay Kumar wrote: SPARC provides lzcnt instruction (with VIS3) which can be used to optimize fls, __fls and fls64 functions. For the systems that supports lzcnt instruction, we now do boot time

[PATCH 0/2] Fix duplicates and change default endian for microblaze

2017-09-18 Thread Babu Moger
This series fixes few Kconfig issues. Babu Moger (2): arch: Fix duplicates in Kconfig for parisc and sparc arch: change default endian for microblaze arch/microblaze/Kconfig |2 +- arch/parisc/Kconfig |3 --- arch/sparc/Kconfig |3 --- 3 files changed, 1 insertions

[PATCH 1/2] arch: Fix duplicates in Kconfig for parisc and sparc

2017-09-18 Thread Babu Moger
f21 ("parisc: Define CONFIG_CPU_BIG_ENDIAN") Remove duplicates. Signed-off-by: Babu Moger --- arch/parisc/Kconfig |3 --- arch/sparc/Kconfig |3 --- 2 files changed, 0 insertions(+), 6 deletions(-) diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index ba7b7dd..1364851 100644 --- a/

[PATCH 2/2] arch: change default endian for microblaze

2017-09-18 Thread Babu Moger
Fix the default for microblaze. Michal Simek mentioned default for microblaze should be CPU_LITTLE_ENDIAN. Fixes : commit 206d3642d8ee ("arch/microblaze: add choice for endianness and update Makefile") Signed-off-by: Babu Moger Cc: Michal Simek --- arch/microblaze/Kconfig |

Re: [PATCH 2/2] arch: change default endian for microblaze

2017-09-18 Thread Babu Moger
On 9/18/2017 12:49 PM, Michal Simek wrote: On 18.9.2017 18:53, Babu Moger wrote: Fix the default for microblaze. Michal Simek mentioned default for microblaze should be CPU_LITTLE_ENDIAN. Fixes : commit 206d3642d8ee ("arch/microblaze: add choice for endianness and update Mak

Re: [PATCH v2 0/4] Update memcpy, memset etc. for M7/M8 architectures

2017-08-11 Thread Babu Moger
David, Thanks for applying. On 8/10/2017 4:38 PM, David Miller wrote: From: Babu Moger Date: Mon, 7 Aug 2017 17:52:48 -0600 This series of patches updates the memcpy, memset, copy_to_user, copy_from_user etc for SPARC M7/M8 architecture. This doesn't build, you cannot assume the existence

Re: [PATCH RFC 3/4] arch/sparc: Optimized memcpy, memset, copy_to_user, copy_from_user for M7

2017-08-03 Thread Babu Moger
David, Thanks for the comments. I am working on addressing your feedback. Comments inline below. On 7/29/2017 4:36 PM, David Miller wrote: From: Babu Moger Date: Thu, 27 Jul 2017 15:57:29 -0600 @@ -600,7 +600,7 @@ niagara_tlb_fixup: be,pt %xcc, niagara4_patch nop

[PATCH v2 2/4] arch/sparc: Rename exception handlers

2017-08-07 Thread Babu Moger
Rename exception handlers to memcpy_xxx as these are going to be used by new memcpy routines and these handlers are not exclusive to NG4memcpy anymore. Signed-off-by: Babu Moger --- arch/sparc/lib/Memcpy_utils.S | 120 +++--- arch/sparc/lib/NG4memcpy.S| 128

[PATCH v2 0/4] Update memcpy, memset etc. for M7/M8 architectures

2017-08-07 Thread Babu Moger
/patch/792662/ However, I did not see these patches in sparc-next tree. It may be in queue now. It is possible these patches might cause some build problems. It will resolve once all M8 patches are in sparc-next tree. v0: Initial version Babu Moger (4): arch/sparc: Separate

[PATCH v2 1/4] arch/sparc: Separate the exception handlers from NG4memcpy

2017-08-07 Thread Babu Moger
Separate the exception handlers from NG4memcpy so that it can be used with new memcpy routines. Make a separate file for all these handlers. Signed-off-by: Babu Moger --- arch/sparc/lib/Makefile |2 + arch/sparc/lib/Memcpy_utils.S | 163 + arch

[PATCH v2 3/4] arch/sparc: Optimized memcpy, memset, copy_to_user, copy_from_user for M7/M8

2017-08-07 Thread Babu Moger
New algorithm that takes advantage of the M7/M8 block init store ASI, ie, overlapping pipelines and miss buffer filling. Full details in code comments. Signed-off-by: Babu Moger --- arch/sparc/kernel/head_64.S | 16 +- arch/sparc/lib/M7copy_from_user.S | 41 ++ arch/sparc/lib

[PATCH v2 4/4] arch/sparc: Add accurate exception reporting in M7memcpy

2017-08-07 Thread Babu Moger
Add accurate exception reporting in M7memcpy Signed-off-by: Babu Moger --- arch/sparc/lib/M7copy_from_user.S | 11 +- arch/sparc/lib/M7copy_to_user.S | 10 +- arch/sparc/lib/M7memcpy.S | 396 ++-- arch/sparc/lib/Memcpy_utils.S | 182

[PATCH RFC 2/4] arch/sparc: Rename exception handlers

2017-07-27 Thread Babu Moger
Rename exception handlers to memcpy_xxx as these are going to be used by new memcpy routines and these handlers are not exclusive to NG4memcpy anymore. Signed-off-by: Babu Moger --- arch/sparc/lib/Memcpy_utils.S | 120 +++--- arch/sparc/lib/NG4memcpy.S| 128

[PATCH RFC 4/4] arch/sparc: Add accurate exception reporting in M7memcpy

2017-07-27 Thread Babu Moger
Add accurate exception reporting in M7memcpy Signed-off-by: Babu Moger --- arch/sparc/lib/M7copy_from_user.S | 11 +- arch/sparc/lib/M7copy_to_user.S | 10 +- arch/sparc/lib/M7memcpy.S | 396 ++-- arch/sparc/lib/Memcpy_utils.S | 182

[PATCH RFC 1/4] arch/sparc: Separate the exception handlers from NG4memcpy

2017-07-27 Thread Babu Moger
Separate the exception handlers from NG4memcpy so that it can be used with new memcpy routines. Make a separate file for all these handlers. Signed-off-by: Babu Moger --- arch/sparc/lib/Makefile |2 + arch/sparc/lib/Memcpy_utils.S | 163 + arch

[PATCH RFC 3/4] arch/sparc: Optimized memcpy, memset, copy_to_user, copy_from_user for M7

2017-07-27 Thread Babu Moger
New algorithm that takes advantage of the M7 block init store ASI, ie, overlapping pipelines and miss buffer filling. Full details in code comments. Signed-off-by: Babu Moger --- arch/sparc/kernel/head_64.S | 12 +- arch/sparc/lib/M7copy_from_user.S | 41 ++ arch/sparc/lib

[RFC 0/3] arch/x86/kvm: Introduce PLE(pause loop exit) logic in SVM

2018-03-02 Thread Babu Moger
Started working on bringing the PLE(pause loop exit) logic from VMX to SVM. We noticed some improvements in certain cases where numerious pause is generated. Please take a look. If you have any suggestions to make things better, let me know. Babu Moger (3): arch/x86/kvm: SVM: Introduce pause

[RFC 2/3] arch/x86/kvm: VMX: Bring the common code to header file

2018-03-02 Thread Babu Moger
This patch is brings some of the code from vmx to x86.h. We can share this code between vmx and svm. Modified couple of functions to make it common. No functional change. Signed-off-by: Babu Moger --- arch/x86/kvm/vmx.c | 53 ++--- arch/x86/kvm

<    1   2   3   4   5   6   >