Re: Inline assembly queries [2]

2009-07-03 Thread kernel mailz
On Fri, Jul 03, 2009 at 12:14:41PM +0530, kernel mailz wrote: >> Thanks for responding to my previous mail. A few more queries >> >> a. What is the use of adding format specifiers in inline assembly >> like >> asm volatile("ld%U1%X1 %0,%1":"=r"(re

Inline assembly queries [2]

2009-07-02 Thread kernel mailz
Hi, Thanks for responding to my previous mail. A few more queries a. What is the use of adding format specifiers in inline assembly like asm volatile("ld%U1%X1 %0,%1":"=r"(ret) : "m"(*ptr) : "memory"); b. using m or Z with a memory address. I tried replacing m/Z but no change Is there some guid

Re: Inline Assembly queries

2009-06-29 Thread kernel mailz
with memory. For instance take atomic_add , atomic_add_return, while the atomic_add_return has the "memory", atomic_add skips it. -TZ On Tue, Jun 30, 2009 at 12:57 AM, Scott Wood wrote: > On Mon, Jun 29, 2009 at 09:19:57PM +0530, kernel mailz wrote: >> I tried a small e

Re: Inline Assembly queries

2009-06-29 Thread kernel mailz
Consider atomic_add and atomic_add_return in kernel code. On Tue, Jun 30, 2009 at 2:59 AM, Ian Lance Taylor wrote: > kernel mailz writes: > >> I tried a small example >> >> int *p = 0x1000; >> int a = *p; >> asm("sync":::"memory"); >&

Re: How to implement kexec on e500 ?

2009-06-29 Thread kernel mailz
Did some searching on the archieve Looks like this is a old patch [PATCH 03/10] powerpc: Add kexec support for PPC_85xx platforms Dale Farnsworth Thu, 22 Nov 2007 07:51:52 -0800 Is this the patch you were referring to kumar -TZ On Mon, Jun 29, 2009 at 9:06 PM, wilbur.chan wrote: > Excuse me ,

Inline Assembly queries

2009-06-29 Thread kernel mailz
"memory" ? But then why below example of __xchg uses both ? I am confused! Anyone has a clue? -TZ -- Forwarded message -- From: kernel mailz Date: Sun, Jun 28, 2009 at 10:27 AM Subject: Re: Inline Assembly queries To: Ian Lance Taylor Cc: gcc-h...@gcc.gnu.org, linux

Re: Inline Assembly queries

2009-06-27 Thread kernel mailz
414: 7d 60 48 28 lwarx r11,0,r9 1418: 7c 00 49 2d stwcx. r0,0,r9 141c: 40 a2 ff f8 bne-1414 1420: 38 60 00 00 li r3,0 1424: 4e 80 00 20 blr No diff ? am I choosing the right example ? -TZ On Sun, Jun 28, 2009

Inline Assembly queries

2009-06-27 Thread kernel mailz
Hello All the gurus, I've been fiddling my luck with gcc 4.3.2 inline assembly on powerpc There are a few queries 1. asm volatile or simply asm produce the same assembly code. Tried with a few examples but didnt find any difference by adding volatile with asm 2. Use of "memory" and clobbered reg

Slowing down the schedular, How?

2009-06-25 Thread kernel mailz
Hi, I have a SMP linux running on 85xx poweprc. Say on Core 0 and Core 1 two different processes are running and on both the schedular runs. Now for some special case, if one of my process issues a ioctl which gets serviced by a kernel module, I wish to slow the schedular on that core only. Otherw

Re: 85xx Address space query

2009-06-25 Thread kernel mailz
If an aap has to be placed in AS=1 and it issues an ioctl, kernel needs to be modified ? I guess the PID=0 trick will work when AS is same right ? On 6/25/09, Kumar Gala wrote: > That is correct. The PID = 0 translations are always valid. > > - k > > On Jun 25, 2009, at 5:51 A

Re: 85xx Address space query

2009-06-25 Thread kernel mailz
So this means when kernel gets interrupted by app which may be in PID=5 (say) kernel translations for PID=0 remain valid ? I am not able to follow Scott -TZ On Thu, Jun 25, 2009 at 4:22 AM, Scott Wood wrote: > kernel mailz wrote: >> >> But If the app was running with PID=1, i

Re: 85xx Address space query

2009-06-24 Thread kernel mailz
On Wed, Jun 24, 2009 at 6:45 PM, Kumar Gala wrote: > > On Jun 24, 2009, at 4:44 AM, kernel mailz wrote: > >> Hi, >> >> I am a newbie, trying to learn but have a few queries, nice if you could >> respond >> For linux on 85xx systems... >> >> (a)

85xx Address space query

2009-06-24 Thread kernel mailz
Hi, I am a newbie, trying to learn but have a few queries, nice if you could respond For linux on 85xx systems... (a) Kernel code runs in PR=0 AS=0 and PID=0, which user space application run in PR=1 AS=0 and PID 1-255. Is this correct. (b) I am writing a small program where the application code