Console stops with calltrace on cavium octeon2 68XX EVB

2017-03-17 Thread Arun Chandran
Hi, I got this on my cavium octeon2 68XX EVB console when booting the latest kernel(4.11.0-rc2-00235-gd528ae0). [ cut here ] WARNING: CPU: 0 PID: 1 at drivers/tty/serial/serial_core.c:442 uart_get_baud_rate+0x114/0x1e8 Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not

Console stops with calltrace on cavium octeon2 68XX EVB

2017-03-17 Thread Arun Chandran
Hi, I got this on my cavium octeon2 68XX EVB console when booting the latest kernel(4.11.0-rc2-00235-gd528ae0). [ cut here ] WARNING: CPU: 0 PID: 1 at drivers/tty/serial/serial_core.c:442 uart_get_baud_rate+0x114/0x1e8 Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not

[PATCH v1] regmap: Fix regmap_bulk_read in BE mode

2015-06-15 Thread Arun Chandran
In big endian mode regmap_bulk_read gives incorrect data for byte reads. This is because memcpy of a single byte from an address after full word read gives different results when endianness differs. ie. we get little-end in LE and big-end in BE. Signed-off-by: Arun Chandran --- --- I tested

[PATCH v1] regmap: Fix regmap_bulk_read in BE mode

2015-06-15 Thread Arun Chandran
In big endian mode regmap_bulk_read gives incorrect data for byte reads. This is because memcpy of a single byte from an address after full word read gives different results when endianness differs. ie. we get little-end in LE and big-end in BE. Signed-off-by: Arun Chandran achand...@mvista.com

Re: [PATCH v1] ARM: zynq: Fix earlyprintk in big endian mode

2015-06-12 Thread Arun Chandran
On Thu, Jun 11, 2015 at 11:43 PM, Michal Simek wrote: > On 06/10/2015 04:13 PM, Arun Chandran wrote: >> earlyprintk messages are not appearing on the terminal >> emulator during a big endian kernel boot. If we >> byte swap the sending data it comes properly. >> >

[PATCH v2] ARM: zynq: Fix earlyprintk in big endian mode

2015-06-12 Thread Arun Chandran
earlyprintk messages are not appearing on the terminal emulator during a big endian kernel boot. In BE mode sending full words to UART will result in unprintable characters as they are byte swapped versions of printable ones. So send only bytes. Signed-off-by: Arun Chandran --- --- Changes since

Re: [PATCH v1] ARM: zynq: Fix earlyprintk in big endian mode

2015-06-12 Thread Arun Chandran
On Thu, Jun 11, 2015 at 11:43 PM, Michal Simek michal.si...@xilinx.com wrote: On 06/10/2015 04:13 PM, Arun Chandran wrote: earlyprintk messages are not appearing on the terminal emulator during a big endian kernel boot. If we byte swap the sending data it comes properly. Signed-off-by: Arun

[PATCH v2] ARM: zynq: Fix earlyprintk in big endian mode

2015-06-12 Thread Arun Chandran
earlyprintk messages are not appearing on the terminal emulator during a big endian kernel boot. In BE mode sending full words to UART will result in unprintable characters as they are byte swapped versions of printable ones. So send only bytes. Signed-off-by: Arun Chandran achand...@mvista.com

[PATCH v1] ARM: zynq: Fix earlyprintk in big endian mode

2015-06-10 Thread Arun Chandran
earlyprintk messages are not appearing on the terminal emulator during a big endian kernel boot. If we byte swap the sending data it comes properly. Signed-off-by: Arun Chandran --- --- This can be tested by adding 'early_print("early print test\n");' to setup_arch() in arch/arm/kern

[PATCH v1] ARM: zynq: Fix earlyprintk in big endian mode

2015-06-10 Thread Arun Chandran
earlyprintk messages are not appearing on the terminal emulator during a big endian kernel boot. If we byte swap the sending data it comes properly. Signed-off-by: Arun Chandran achand...@mvista.com --- --- This can be tested by adding 'early_print(early print test\n);' to setup_arch() in arch

Re: [PATCH] net: macb: fix endian code for avr32

2015-03-18 Thread Arun Chandran
On Wed, Mar 18, 2015 at 6:46 PM, Arun Chandran wrote: > On Wed, Mar 18, 2015 at 4:27 PM, Ben Dooks wrote: >> >> [note this has yet to be compile tested on avr32] >> >> The changes to run the macb driver in 29af05aeb98e ("net: macb: > > Yes I mistakenly t

Re: [PATCH] net: macb: fix endian code for avr32

2015-03-18 Thread Arun Chandran
sion that can be put > back to __raw_readl/__raw_writel for the CONFIG_AVR32 case (and also > remove the change to the DMA descriptor endian). > > Signed-off-by: Ben Dooks > Reported-by: Arnd Bergmann > -- > CC: Linux Networking List > CC: Arun Chandran > CC: Haavard Skin

Re: [PATCH] net: macb: fix endian code for avr32

2015-03-18 Thread Arun Chandran
On Wed, Mar 18, 2015 at 6:46 PM, Arun Chandran achand...@mvista.com wrote: On Wed, Mar 18, 2015 at 4:27 PM, Ben Dooks ben.do...@codethink.co.uk wrote: [note this has yet to be compile tested on avr32] The changes to run the macb driver in 29af05aeb98e (net: macb: Yes I mistakenly thought

Re: [PATCH] net: macb: fix endian code for avr32

2015-03-18 Thread Arun Chandran
for the CONFIG_AVR32 case (and also remove the change to the DMA descriptor endian). Signed-off-by: Ben Dooks ben.do...@codethink.co.uk Reported-by: Arnd Bergmann a...@arndb.de -- CC: Linux Networking List net...@vger.kernel.org CC: Arun Chandran achand...@mvista.com CC: Haavard Skinnemoen hskinnem

[PATCH 1/2] net: macb: Add on the fly CPU endianness detection

2015-02-28 Thread Arun Chandran
Program management descriptor's access mode according to the dynamically detected CPU endianness. Signed-off-by: Arun Chandran Acked-by: Nicolas Ferre Tested-by: Michal Simek --- * Adding CPU endianness detection according to Michal Simek * Added Acked-by: Nicolas Ferre * Added Tested

[PATCH 2/2] net: macb: Properly add DMACFG bit definitions

2015-02-28 Thread Arun Chandran
Add *_SIZE macros for the bits ENDIA_DESC and ENDIA_PKT Signed-off-by: Arun Chandran Acked-by: Nicolas Ferre --- * Correct these macros according to comments from Nicolas Ferre. Also add his Acked-by --- --- drivers/net/ethernet/cadence/macb.h | 3 ++- 1 file changed, 2 insertions(+), 1

Re: [PATCH v3] net: macb: Add big endian CPU support

2015-02-28 Thread Arun Chandran
endian mode. >> >> Signed-off-by: Arun Chandran > > This does not apply cleanly to net-next, please respin. The net-next tree already contains the initial version of this change (commit: a50dad355a5314da64586da36804b86fbebb7c2a). This applies cleanly if you revert that. #~/work/

Re: [PATCH v3] net: macb: Add big endian CPU support

2015-02-28 Thread Arun Chandran
Hi David, This patch converts all __raw_readl and __raw_writel function calls to their corresponding readl_relaxed and writel_relaxed variants. It also tells the driver to set ahb_endian_swp_mgmt_en bit in dma_cfg when the CPU is configured in big endian mode. Signed-off-by: Arun Chandran

[PATCH 1/2] net: macb: Add on the fly CPU endianness detection

2015-02-28 Thread Arun Chandran
Program management descriptor's access mode according to the dynamically detected CPU endianness. Signed-off-by: Arun Chandran achand...@mvista.com Acked-by: Nicolas Ferre nicolas.fe...@atmel.com Tested-by: Michal Simek michal.si...@xilinx.com --- * Adding CPU endianness detection according

[PATCH 2/2] net: macb: Properly add DMACFG bit definitions

2015-02-28 Thread Arun Chandran
Add *_SIZE macros for the bits ENDIA_DESC and ENDIA_PKT Signed-off-by: Arun Chandran achand...@mvista.com Acked-by: Nicolas Ferre nicolas.fe...@atmel.com --- * Correct these macros according to comments from Nicolas Ferre. Also add his Acked-by --- --- drivers/net/ethernet/cadence/macb.h | 3

[PATCH v3] net: macb: Add big endian CPU support

2015-02-26 Thread Arun Chandran
This patch converts all __raw_readl and __raw_writel function calls to their corresponding readl_relaxed and writel_relaxed variants. It also tells the driver to set ahb_endian_swp_mgmt_en bit in dma_cfg when the CPU is configured in big endian mode. Signed-off-by: Arun Chandran --- This patch

[PATCH] net: macb: Add big endian CPU support

2015-02-26 Thread Arun Chandran
This patch converts all __raw_readl and __raw_writel function calls to their corresponding readl_relaxed and writel_relaxed variants. It also tells the driver to set ahb_endian_swp_mgmt_en bit in dma_cfg when the CPU is configured in big endian mode. Signed-off-by: Arun Chandran

[PATCH] net: macb: Add big endian CPU support

2015-02-26 Thread Arun Chandran
This patch converts all __raw_readl and __raw_writel function calls to their corresponding readl_relaxed and writel_relaxed variants. It also tells the driver to set ahb_endian_swp_mgmt_en bit in dma_cfg when the CPU is configured in big endian mode. Signed-off-by: Arun Chandran achand

[PATCH v3] net: macb: Add big endian CPU support

2015-02-26 Thread Arun Chandran
This patch converts all __raw_readl and __raw_writel function calls to their corresponding readl_relaxed and writel_relaxed variants. It also tells the driver to set ahb_endian_swp_mgmt_en bit in dma_cfg when the CPU is configured in big endian mode. Signed-off-by: Arun Chandran achand

Re: [PATCH] net: macb: Add big endian CPU support

2015-02-25 Thread Arun Chandran
On Wed, Feb 25, 2015 at 3:32 PM, Michal Simek wrote: > On 02/24/2015 08:39 AM, Arun Chandran wrote: >> This patch converts all __raw_readl and __raw_writel function calls >> to their corresponding readl_relaxed and writel_relaxed variants. >> >> It a

Re: [PATCH] net: macb: Add big endian CPU support

2015-02-25 Thread Arun Chandran
On Wed, Feb 25, 2015 at 3:32 PM, Michal Simek mon...@monstr.eu wrote: On 02/24/2015 08:39 AM, Arun Chandran wrote: This patch converts all __raw_readl and __raw_writel function calls to their corresponding readl_relaxed and writel_relaxed variants. It also tells the driver to set

Re: [PATCH] net: macb: Add big endian CPU support

2015-02-24 Thread Arun Chandran
On Tue, Feb 24, 2015 at 6:27 PM, Nicolas Ferre wrote: > Le 24/02/2015 08:39, Arun Chandran a écrit : >> This patch converts all __raw_readl and __raw_writel function calls >> to their corresponding readl_relaxed and writel_relaxed variants. >> >> It a

Re: [PATCH] net: macb: Add big endian CPU support

2015-02-24 Thread Arun Chandran
On Tue, Feb 24, 2015 at 6:27 PM, Nicolas Ferre nicolas.fe...@atmel.com wrote: Le 24/02/2015 08:39, Arun Chandran a écrit : This patch converts all __raw_readl and __raw_writel function calls to their corresponding readl_relaxed and writel_relaxed variants. It also tells the driver to set

[PATCH] net: macb: Add big endian CPU support

2015-02-23 Thread Arun Chandran
This patch converts all __raw_readl and __raw_writel function calls to their corresponding readl_relaxed and writel_relaxed variants. It also tells the driver to set ahb_endian_swp_mgmt_en bit in dma_cfg when the cpu is configured in big endian mode. Signed-off-by: Arun Chandran

Re: [PATCH] net: macb: Add big endian CPU support

2015-02-23 Thread Arun Chandran
On Mon, Feb 23, 2015 at 8:08 PM, Nicolas Ferre wrote: > Le 20/02/2015 12:45, Arun Chandran a écrit : >> On Thu, Feb 19, 2015 at 5:52 PM, Michal Simek wrote: >>> >>> On 02/18/2015 12:29 PM, Arun Chandran wrote: >>>> This patch converts all __ra

[PATCH] net: macb: Add big endian CPU support

2015-02-23 Thread Arun Chandran
This patch converts all __raw_readl and __raw_writel function calls to their corresponding readl_relaxed and writel_relaxed variants. It also tells the driver to set ahb_endian_swp_mgmt_en bit in dma_cfg when the cpu is configured in big endian mode. Signed-off-by: Arun Chandran achand

Re: [PATCH] net: macb: Add big endian CPU support

2015-02-23 Thread Arun Chandran
On Mon, Feb 23, 2015 at 8:08 PM, Nicolas Ferre nicolas.fe...@atmel.com wrote: Le 20/02/2015 12:45, Arun Chandran a écrit : On Thu, Feb 19, 2015 at 5:52 PM, Michal Simek mon...@monstr.eu wrote: On 02/18/2015 12:29 PM, Arun Chandran wrote: This patch converts all __raw_readl and __raw_writel

Re: [PATCH] net: macb: Add big endian CPU support

2015-02-20 Thread Arun Chandran
On Thu, Feb 19, 2015 at 5:52 PM, Michal Simek wrote: > > On 02/18/2015 12:29 PM, Arun Chandran wrote: > > This patch converts all __raw_readl and __raw_writel function calls > > to their corresponding readl_relaxed and writel_relaxed variants. > > > > I

Re: [PATCH] net: macb: Add big endian CPU support

2015-02-20 Thread Arun Chandran
On Thu, Feb 19, 2015 at 5:52 PM, Michal Simek mon...@monstr.eu wrote: On 02/18/2015 12:29 PM, Arun Chandran wrote: This patch converts all __raw_readl and __raw_writel function calls to their corresponding readl_relaxed and writel_relaxed variants. It also tells the driver to set

[PATCH] net: macb: Add big endian CPU support

2015-02-18 Thread Arun Chandran
This patch converts all __raw_readl and __raw_writel function calls to their corresponding readl_relaxed and writel_relaxed variants. It also tells the driver to set ahb_endian_swp_mgmt_en bit in dma_cfg when the CPU is configured in big endian mode. Signed-off-by: Arun Chandran

[PATCH] net: macb: Add big endian CPU support

2015-02-18 Thread Arun Chandran
This patch converts all __raw_readl and __raw_writel function calls to their corresponding readl_relaxed and writel_relaxed variants. It also tells the driver to set ahb_endian_swp_mgmt_en bit in dma_cfg when the CPU is configured in big endian mode. Signed-off-by: Arun Chandran achand

[PATCH v2] Arm64: ASLR: Don't randomise text when randomise_va_space == 0

2014-10-10 Thread Arun Chandran
When user asks to turn off ASLR by writing "0" to /proc/sys/kernel/randomize_va_space there should not be any randomization to mmap base, stack, VDSO, libs, text and heap Currently arm64 violates this behavior by randomising text. Fix this. Signed-off-by: Arun Chandran --- Change

[PATCH v2] Arm64: ASLR: Don't randomise text when randomise_va_space == 0

2014-10-10 Thread Arun Chandran
When user asks to turn off ASLR by writing 0 to /proc/sys/kernel/randomize_va_space there should not be any randomization to mmap base, stack, VDSO, libs, text and heap Currently arm64 violates this behavior by randomising text. Fix this. Signed-off-by: Arun Chandran achand...@mvista.com

ASLR on arm64

2014-10-09 Thread Arun Chandran
Hi, Booted latest kernel on arm64 board with "/proc/sys/kernel/randomize_va_space" = 2 and running the below code(aarch64-linux-gnu-gcc -fPIE -pie aslr.c -o aslr). #include #include #include int main(int argc, char *argv) { int val = 0 ; char *d = malloc(10); FILE *fp; char

ASLR on arm64

2014-10-09 Thread Arun Chandran
Hi, Booted latest kernel on arm64 board with /proc/sys/kernel/randomize_va_space = 2 and running the below code(aarch64-linux-gnu-gcc -fPIE -pie aslr.c -o aslr). #include stdio.h #include stdlib.h #include string.h int main(int argc, char *argv) { int val = 0 ; char *d = malloc(10);

Re: [PATCH v1] Arm64: ASLR: fix text randomization

2014-10-08 Thread Arun Chandran
Hi Mark, On Tue, Oct 7, 2014 at 7:13 PM, Mark Rutland wrote: > > On Tue, Oct 07, 2014 at 01:40:28PM +0100, Arun Chandran wrote: > > This is due to incorrect definition of ELF_ET_DYN_BASE. It > > introduces randomization for text even if user does a "echo 0

Re: [PATCH v1] Arm64: ASLR: fix text randomization

2014-10-08 Thread Arun Chandran
Hi Mark, On Tue, Oct 7, 2014 at 7:13 PM, Mark Rutland mark.rutl...@arm.com wrote: On Tue, Oct 07, 2014 at 01:40:28PM +0100, Arun Chandran wrote: This is due to incorrect definition of ELF_ET_DYN_BASE. It introduces randomization for text even if user does a echo 0 /proc/sys/kernel

[PATCH v1] Arm64: ASLR: fix text randomization

2014-10-07 Thread Arun Chandran
This is due to incorrect definition of ELF_ET_DYN_BASE. It introduces randomization for text even if user does a "echo 0 > /proc/sys/kernel/randomize_va_space" Signed-off-by: Arun Chandran --- This can be tested using the code below #include int main(int argc, char *argv) {

[PATCH v1] Arm64: ASLR: fix text randomization

2014-10-07 Thread Arun Chandran
This is due to incorrect definition of ELF_ET_DYN_BASE. It introduces randomization for text even if user does a echo 0 /proc/sys/kernel/randomize_va_space Signed-off-by: Arun Chandran achand...@mvista.com --- This can be tested using the code below #include stdio.h int main(int argc, char

Re: [PATCH V3] irqchip:gic: change access of gicc_ctrl register to read modify write.

2014-09-09 Thread Arun Chandran
On Mon, Sep 8, 2014 at 10:27 PM, Feng Kan wrote: > On Mon, Sep 8, 2014 at 1:52 AM, Arun Chandran wrote: >> Hi Feng, >> >> Is this patch still needed to fix perf calltrace? > Yes, if the someone decide to run the secure mode of the GIC, which is > what is prese

Re: [PATCH V3] irqchip:gic: change access of gicc_ctrl register to read modify write.

2014-09-09 Thread Arun Chandran
On Mon, Sep 8, 2014 at 10:27 PM, Feng Kan f...@apm.com wrote: On Mon, Sep 8, 2014 at 1:52 AM, Arun Chandran achand...@mvista.com wrote: Hi Feng, Is this patch still needed to fix perf calltrace? Yes, if the someone decide to run the secure mode of the GIC, which is what is present

Re: [PATCH V3] irqchip:gic: change access of gicc_ctrl register to read modify write.

2014-09-08 Thread Arun Chandran
Hi Feng, Is this patch still needed to fix perf calltrace? http://lists.infradead.org/pipermail/linux-arm-kernel/2014-June/265814.html On Fri, Feb 28, 2014 at 3:06 AM, Feng Kan wrote: > This change is made to preserve the GIC v2 releated bits in the > GIC_CPU_CTRL register (also known as the

Re: [PATCH V3] irqchip:gic: change access of gicc_ctrl register to read modify write.

2014-09-08 Thread Arun Chandran
Hi Feng, Is this patch still needed to fix perf calltrace? http://lists.infradead.org/pipermail/linux-arm-kernel/2014-June/265814.html On Fri, Feb 28, 2014 at 3:06 AM, Feng Kan f...@apm.com wrote: This change is made to preserve the GIC v2 releated bits in the GIC_CPU_CTRL register (also known

checkpatch.pl: Use of extern in function prototype

2014-08-18 Thread Arun Chandran
Hi, I have a piece of code as shown below. ### diff --git a/arch/arm64/include/asm/proc-fns.h b/arch/arm64/include/asm/proc-fns.h index 9a8fd84..86be4f9 100644 --- a/arch/arm64/include/asm/proc-fns.h +++ b/arch/arm64/include/asm/proc-fns.h @@ -32,7 +32,7 @@ extern void

checkpatch.pl: Use of extern in function prototype

2014-08-18 Thread Arun Chandran
Hi, I have a piece of code as shown below. ### diff --git a/arch/arm64/include/asm/proc-fns.h b/arch/arm64/include/asm/proc-fns.h index 9a8fd84..86be4f9 100644 --- a/arch/arm64/include/asm/proc-fns.h +++ b/arch/arm64/include/asm/proc-fns.h @@ -32,7 +32,7 @@ extern void