Re: [PATCH-V2 1/1] sparc: Fix context switch on SMP

2015-11-16 Thread Sebastian Huber
On 16/11/15 13:14, Daniel Cederman wrote: I was unsure if the ET bit was always set or not for newly created task contexts, or if this was the first place that traps got enabled for a new task. If it is always set we can remove that instruction. The PSR is initialized like this

Re: Memory access between application task and driver using printk

2015-11-16 Thread Gedare Bloom
There appears to be problems in the code you copy-pasted, so it is hard to say for sure what is going on in your actual code. See below for a few notes. On Mon, Nov 16, 2015 at 11:28 AM, Inderjit Singh wrote: > Hi, > > I have a strange behaviour regarding memory

Memory access between application task and driver using printk

2015-11-16 Thread Inderjit Singh
Hi, I have a strange behaviour regarding memory access between my user application and the driver i have developed I'd like to get some clarification on. The development is all used on or1k arch. On the application side, I have a buffer declared as: #define PACKET_SIZE 256 volatile uint8_t

Re: [PATCH-V3 1/1] sparc: Fix context switch on SMP

2015-11-16 Thread Sebastian Huber
Looks good, we should probably apply it to the 4.11 branch as well. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available

Re: [PATCH-V3 1/1] sparc: Fix context switch on SMP

2015-11-16 Thread Daniel Cederman
Yes, definitely. Would you mind doing it? Daniel is away from office this week and I do not have access. On 2015-11-16 15:57, Sebastian Huber wrote: Looks good, we should probably apply it to the 4.11 branch as well. -- Daniel Cederman Software Engineer Cobham Gaisler

Re: [PATCH-V2 1/1] sparc: Fix context switch on SMP

2015-11-16 Thread Daniel Cederman
I was unsure if the ET bit was always set or not for newly created task contexts, or if this was the first place that traps got enabled for a new task. If it is always set we can remove that instruction. On 2015-11-16 11:27, Sebastian Huber wrote: On 16/11/15 11:06, Daniel Cederman wrote:

Re: [PATCH-V3 1/1] sparc: Fix context switch on SMP

2015-11-16 Thread Sebastian Huber
- Am 16. Nov 2015 um 17:06 schrieb Gedare Bloom ged...@rtems.org: > Does this bug have a ticket? >From my point of view we need a ticket, if 1) a bug cannot be fixed immediately or requires a couple of patches, or 2) a new feature need several patches, accompanying

Re: [PATCH-V3 1/1] sparc: Fix context switch on SMP

2015-11-16 Thread Gedare Bloom
On Mon, Nov 16, 2015 at 2:31 PM, Sebastian Huber wrote: > > > - Am 16. Nov 2015 um 17:06 schrieb Gedare Bloom ged...@rtems.org: > >> Does this bug have a ticket? > > From my point of view we need a ticket, if > > 1) a bug cannot be fixed immediately or

[PATCH 1/1] sparc: Fix context switch on SMP

2015-11-16 Thread Daniel Cederman
We must not load registers (e.g. PSR) from the heir context area before the heir stopped execution. --- c/src/lib/libbsp/sparc/shared/irq_asm.S | 30 +- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/c/src/lib/libbsp/sparc/shared/irq_asm.S

[PATCH-V4 1/1] sparc: Fix context switch on SMP

2015-11-16 Thread Daniel Cederman
We must not load registers (e.g. PSR) from the heir context area before the heir stopped execution. With this patch the write to PSR is divided into two steps. We first update the current window pointer and then we restore the status registers and enable traps. This allows us to move the first