hi Why is can't find a register in class ‘AREG’ while reloading ‘asm’ ?

2013-05-27 Thread lx
hi all:
   The codes is:
static int match(int len,const char * name,struct dir_entry * de)
{
register int same __asm__(ax);

if (!de || !de-inode || len  NAME_LEN)
return 0;
if (len  NAME_LEN  de-name[len])
return 0;
*__asm__ (cld\n\t*
fs ; repe ; cmpsb\n\t
setz %%al
:=a (same)
:0 (0),S ((long) name),D ((long) de-name),c (len)
:cx,di,si);
return same;
}

When I make it, the error messages is:
*namei.c:35: error: can't find a register in class ‘AREG’ while reloading
‘asm’*
*
*
*This is why? *
*Thank you*
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: File system implementation

2013-05-27 Thread Vineet Agarwal
On Sat, May 25, 2013 at 10:47 AM, Dibyayan Chakraborty 
dib.cool...@gmail.com wrote:

 Hi,
 I want to implement a file system and integrate with my system. Now
 first i have to implement the code for disk-formatting(like populating
 the super_block , root inode etc). I want to see the source code for the
 ext3 file system for this purpose.

 Please tell me which file in the kernel source contains the
 implementation.



You can start looking for e2fsprogs. You can find the details out there
regarding the file-system formatting etc.



 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: hi Why is can't find a register in class ‘AREG’ while reloading ‘asm’ ?

2013-05-27 Thread Rajat Sharma
I tried compiling this but I get slightly different error:

  error: can’t find a register in class ‘CREG’ while reloading ‘asm’

this error is because of explicit clobber list which is not needed in this
case as all registers in clobber list are input list.
Note that it is CREG because it encounter cx in clobber list first.

-Rajat


On Mon, May 27, 2013 at 1:21 PM, lx lxlenovos...@gmail.com wrote:

 hi all:
The codes is:
 static int match(int len,const char * name,struct dir_entry * de)
 {
 register int same __asm__(ax);

 if (!de || !de-inode || len  NAME_LEN)
 return 0;
 if (len  NAME_LEN  de-name[len])
 return 0;
 *__asm__ (cld\n\t*
 fs ; repe ; cmpsb\n\t
 setz %%al
 :=a (same)
 :0 (0),S ((long) name),D ((long) de-name),c (len)
 :cx,di,si);
 return same;
 }

 When I make it, the error messages is:
 *namei.c:35: error: can't find a register in class ‘AREG’ while reloading
 ‘asm’*
 *
 *
 *This is why? *
 *Thank you*


 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


RE: Kernel 64bit

2013-05-27 Thread Giridhara RP (grp)
Thanks Jonthan/Santosa,

I could make a  ISO image with Debian. My kernel was not booting earlier as I 
was booting wrong image. With new ISO image, still I did not get login prompt 
yet:(. Debugging the issue.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: hi Why is can't find a register in class

2013-05-27 Thread Valdis . Kletnieks
On Mon, 27 May 2013 15:51:26 +0800, lx said:

 When I make it, the error messages is:
 *namei.c:35: error: can't find a register in class

 *This is why? *

Possibility 1:  You screwed up the constrains on your asm and didn't leave
the compiler any way to allocate CPU registers.. I havent had enough caffeine
yet to check that in detail, you're on your own. ;)

Possibility 2: Your compiler has a bug in it,. Such thinks happen.  If you're
using something older than gcc 4.8, either update it or get your vendor to
update it, and then try again.

If you're using 4.8 and your asm constraints have been verified as OK, please
consider filing a gcc bug with your vendor and/or with the GCC team.

(I had to keep a copy of gcc 4.6.3 around for a *long* time, because 4.7
would miscompile the NVidia module - I suspect the famous bug where it split
a 64-bit operation that needed to be atomic.  Then gcc developed another
bug where the optimizer choked on one of the VirtualBox modules.  Fedora
finally shipped a patched 4.8 that didn't have either bug)



pgpKfPKxYxyi2.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: what's best way for playing with kernel configurations and source code

2013-05-27 Thread Jonathan Neuschäfer
On Mon, May 27, 2013 at 12:01:20AM +0530, Sankar P wrote:
 On Sun, May 26, 2013 at 9:13 PM, Alshamlan, Mohammad malsh...@fiu.edu wrote:
  Hi everybody,
 
  How you can reconfigure and also modify your source code without affected
  your system? Please, if you want to suggest a virtual machine is the best
  option, then could you tell me why? Thanks in advance.
 
 
 Usually while kernel development, you do not overwrite your existing
 distro-provided kernel, but install your built kernel as a new option.
 This helps you in not losing access to your machine in case the kernel
 changes you have made are serious.

If they're serious enough you might still break your file system and
lose your data, so it's in any case good to have a backup. ;-)


--
Thanks,
Jonathan Neuschäfer

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


lookup function return value in inode_operations

2013-05-27 Thread Sankar P
Hi,

What is the return value of the lookup function under the
inode_operations struct ? I see that the function gets a dentry as a
parameter, which can be used to associate an inode. For example:

If we have:

struct dentry * somefs_lookup(struct inode *parent_inode,
  struct dentry *child_dentry, unsigned int flags)
{
d_add(child_dentry, inode);
}

so, what is the meaning of the return struct dentry in this lookup
function ? In some simple filesystems that I saw, they return NULL
here and it seem to work just fine. So what is that the lookup
function should do if we are implementing our own filesystem ?

Thanks.

--
Sankar P
http://psankar.blogspot.com

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


mss for tcp segment

2013-05-27 Thread Varun Sharma
Hi,

What is the value of mss for tcp segment.
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies