latest kernel compile-- system panic

2010-01-28 Thread nidhi mittal hada
hi all
i compiled latest kernel linux2.6.32.6

after 4 steps of
 make menuconfig
make
make modules
make modules_install
make install

when i rebooted these error messages came



Unable to access resume device (/dev/sda3)
mount: could not find filesystem /dev/root'
setuproot : moving /dev failed : No such file or directory
setuproot : error mounting /proc  : No such file or directory
 setuproot : error mounting /Sys : No such file or directory

switchroot: mount failed No such file or directory


earlier also whenever i compiled new kernel .. i used to copy the .config of
old running kernel into new liinux folder
as everytime if i create .config file with make menuconfig .. some unknown
mistake gives kernel panic

i need to know how to set proper .config so that it caters to all
requirement of my present machine hardware
i got to know
make cloneconfig but it gives error as
make[1]: *** No rule to make target `cloneconfig'.  Stop.
make: *** [cloneconfig] Error 2

will make oldconfig work ??
what to do

Nidhi
-- 
Thanks  Regards
Nidhi Mittal Hada


Re: latest kernel compile-- system panic

2010-01-28 Thread nidhi mittal hada
Hello
This time also . i just copied the .config of my running kernel to the
downloaded new kernel's directory
and
did make and further steps.
and it executed successfully.
no kernel panic.

is it the right way .?
But i helplessly do it as last resort everytime
when after my all efforts new kernel panics on boot everytime.


Nidhi

On Thu, Jan 28, 2010 at 2:53 PM, nidhi mittal hada
nidhimitta...@gmail.comwrote:

 hi all
 i compiled latest kernel linux2.6.32.6

 after 4 steps of
  make menuconfig
 make
 make modules
 make modules_install
 make install

 when i rebooted these error messages came



 Unable to access resume device (/dev/sda3)
 mount: could not find filesystem /dev/root'
 setuproot : moving /dev failed : No such file or directory
 setuproot : error mounting /proc  : No such file or directory
  setuproot : error mounting /Sys : No such file or directory

 switchroot: mount failed No such file or directory


 earlier also whenever i compiled new kernel .. i used to copy the .config
 of old running kernel into new liinux folder
 as everytime if i create .config file with make menuconfig .. some unknown
 mistake gives kernel panic

 i need to know how to set proper .config so that it caters to all
 requirement of my present machine hardware
 i got to know
 make cloneconfig but it gives error as
 make[1]: *** No rule to make target `cloneconfig'.  Stop.
 make: *** [cloneconfig] Error 2

 will make oldconfig work ??
 what to do

 Nidhi
 --
 Thanks  Regards
 Nidhi Mittal Hada




-- 
Thanks  Regards
Nidhi Mittal Hada


Re: module using another module

2010-01-28 Thread Jason Nymble


On 09 Dec 2009, at 12:09 PM, Matze wrote:


From: Jason Nymble jason.nym...@gmail.com
Date: 2009/12/8
Subject: module using another module
To: kernelnewbies kernelnewbies@nl.linux.org What is the correct/ 
recommended way for one module to plug in to or use
another module? e.g. if I have one module (call it A) which exports  
a symbol
allowing a different module (call it B) to register (and  
unregister) a
function pointer (which gets called by A if it has a valid value),  
it would
be very good if A cannot unload while B is using it (registered),  
and also
that B can unload without A being aware it has unregistered. The  
latter can
simply be achieved by having B call the unregister function of A  
when it

unloads. The former I suppose could be done via some sort of refcount
scheme, but I'm sure this type of problem has a proper correct  
solution in
the Linux kernel (e.g. all the modules that use the i2c module etc.  
etc.),

and I'd obviously like to avoid re-inventing the wheel (badly).


you can use modprobe for that reason. yust edit your modules.dep  
file so that loading module B will automatically load module A. Then  
the kernel don't let you unload A when B is still loaded.

regards,
Matthias
Is there not a way to do this in the source of module B, so that  
depmod will automatically generate the modules.dep correctly? Note I  
don't necessarily want A to be autoloaded if B is being loaded (though  
that would obviously be nice), I just want to prevent A from being  
unloaded while B is loaded. For example, if one just looks at the  
output of lsmod, the used by column shows modules using other  
modules, and the ones that are used cannot be unloaded. How is this  
achieved? Perhaps it is as simple as: if module B uses any symbols  
exported from module A, then module A is automatically marked as being  
used by B while B is loaded, in which case one does not need to do  
anything? I've briefly looked at the source of a few of the modules of  
in the used by column, and I can't see them explicitly doing  
anything to lock the modules that they use, so I'm thinking this  
just happens automagically because they're using exported functions.


--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: module using another module

2010-01-28 Thread Jason Nymble


On 28 Jan 2010, at 12:30 PM, Jason Nymble wrote:



On 09 Dec 2009, at 12:09 PM, Matze wrote:


From: Jason Nymble jason.nym...@gmail.com
Date: 2009/12/8
Subject: module using another module
To: kernelnewbies kernelnewbies@nl.linux.org What is the correct/ 
recommended way for one module to plug in to or use
another module? e.g. if I have one module (call it A) which  
exports a symbol
allowing a different module (call it B) to register (and  
unregister) a
function pointer (which gets called by A if it has a valid value),  
it would
be very good if A cannot unload while B is using it (registered),  
and also
that B can unload without A being aware it has unregistered. The  
latter can
simply be achieved by having B call the unregister function of A  
when it
unloads. The former I suppose could be done via some sort of  
refcount
scheme, but I'm sure this type of problem has a proper correct  
solution in
the Linux kernel (e.g. all the modules that use the i2c module  
etc. etc.),

and I'd obviously like to avoid re-inventing the wheel (badly).


you can use modprobe for that reason. yust edit your modules.dep  
file so that loading module B will automatically load module A.  
Then the kernel don't let you unload A when B is still loaded.

regards,
Matthias
Is there not a way to do this in the source of module B, so that  
depmod will automatically generate the modules.dep correctly? Note I  
don't necessarily want A to be autoloaded if B is being loaded  
(though that would obviously be nice), I just want to prevent A from  
being unloaded while B is loaded. For example, if one just looks at  
the output of lsmod, the used by column shows modules using other  
modules, and the ones that are used cannot be unloaded. How is this  
achieved? Perhaps it is as simple as: if module B uses any symbols  
exported from module A, then module A is automatically marked as  
being used by B while B is loaded, in which case one does not need  
to do anything? I've briefly looked at the source of a few of the  
modules of in the used by column, and I can't see them explicitly  
doing anything to lock the modules that they use, so I'm thinking  
this just happens automagically because they're using exported  
functions.



Actually, I just tried the above with some minimal kernel modules that  
I made quickly, it does work that way. Awesome! So I don't really need  
to do anything special at all to prevent A from being unloaded, the  
very fact that B just references one of A's exported symbols is good  
enough.


--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: latest kernel compile-- system panic

2010-01-28 Thread nidhi mittal hada
yes
when i get unhinting errors -- i guessed something , changed a few params in
.config and did make make modules so on
but again same errors .
finally
i copied earlier running kernel's .config into this ...didnot do make
menuconfig at all
and in .config changed my required parameter of ext4 to be build as module.
that's all
now make , make modules , make modules_install , make install and
it worked well

now my ques is ...is it right what i am doing ...
if not how to know correct parameter of .config
isnt there some
make someconfig   instead of menuconfig
which prepares correct .config file seeing hardware requirement on my pc or
working kernel's .config file ...

Please CMIIW anywhere.
Nidhi




On Thu, Jan 28, 2010 at 5:13 PM, Manish Katiyar mkati...@gmail.com wrote:

 On Thu, Jan 28, 2010 at 5:05 PM, waqar afridi afridi.wa...@gmail.com
 wrote:
  I used to get these errors when I started with kernel compilation and by
  this I mean a few weeks back.
 
  Where do u put the kernel source when you compile it, I used to download
 it
  and extract it to my home Directory and then the list of commands above,
 but
  it never worked.
 
  The Solution to this problem is to Extract the Kernel source to /usr/src/
  and then do the above process (make etc), may be this will help...

 Where you put the kernel sources to build is not at all related to
 these panics (Otherwise you don't need a build symlink in your
 /lib/modules/version). Did you build the same config ?

 Thanks -
 Manish

 
 
  On Thu, Jan 28, 2010 at 3:25 PM, nidhi mittal hada 
 nidhimitta...@gmail.com
  wrote:
 
  Hello
  This time also . i just copied the .config of my running kernel to the
  downloaded new kernel's directory
  and
  did make and further steps.
  and it executed successfully.
  no kernel panic.
 
  is it the right way .?
  But i helplessly do it as last resort everytime
  when after my all efforts new kernel panics on boot everytime.
 
 
  Nidhi
 
  On Thu, Jan 28, 2010 at 2:53 PM, nidhi mittal hada
  nidhimitta...@gmail.com wrote:
 
  hi all
  i compiled latest kernel linux2.6.32.6
 
  after 4 steps of
   make menuconfig
  make
  make modules
  make modules_install
  make install
 
  when i rebooted these error messages came
 
 
 
  Unable to access resume device (/dev/sda3)
  mount: could not find filesystem /dev/root'
  setuproot : moving /dev failed : No such file or directory
  setuproot : error mounting /proc  : No such file or directory
   setuproot : error mounting /Sys : No such file or directory
 
  switchroot: mount failed No such file or directory
 
 
  earlier also whenever i compiled new kernel .. i used to copy the
 .config
  of old running kernel into new liinux folder
  as everytime if i create .config file with make menuconfig .. some
  unknown mistake gives kernel panic
 
  i need to know how to set proper .config so that it caters to all
  requirement of my present machine hardware
  i got to know
  make cloneconfig but it gives error as
  make[1]: *** No rule to make target `cloneconfig'.  Stop.
  make: *** [cloneconfig] Error 2
 
  will make oldconfig work ??
  what to do
 
  Nidhi
  --
  Thanks  Regards
  Nidhi Mittal Hada
 
 
 
  --
  Thanks  Regards
  Nidhi Mittal Hada
 
 
 
  --
  Waqar Afridi
 
  Android Developer
  SERG IM|Sciences
 



 --
 Thanks -
 Manish
 ==
 [$\*.^ -- I miss being one of them
 ==




-- 
Thanks  Regards
Nidhi Mittal Hada


Re: latest kernel compile-- system panic

2010-01-28 Thread Manish Katiyar
On Thu, Jan 28, 2010 at 5:05 PM, waqar afridi afridi.wa...@gmail.com wrote:
 I used to get these errors when I started with kernel compilation and by
 this I mean a few weeks back.

 Where do u put the kernel source when you compile it, I used to download it
 and extract it to my home Directory and then the list of commands above, but
 it never worked.

 The Solution to this problem is to Extract the Kernel source to /usr/src/
 and then do the above process (make etc), may be this will help...

Where you put the kernel sources to build is not at all related to
these panics (Otherwise you don't need a build symlink in your
/lib/modules/version). Did you build the same config ?

Thanks -
Manish



 On Thu, Jan 28, 2010 at 3:25 PM, nidhi mittal hada nidhimitta...@gmail.com
 wrote:

 Hello
 This time also . i just copied the .config of my running kernel to the
 downloaded new kernel's directory
 and
 did make and further steps.
 and it executed successfully.
 no kernel panic.

 is it the right way .?
 But i helplessly do it as last resort everytime
 when after my all efforts new kernel panics on boot everytime.


 Nidhi

 On Thu, Jan 28, 2010 at 2:53 PM, nidhi mittal hada
 nidhimitta...@gmail.com wrote:

 hi all
 i compiled latest kernel linux2.6.32.6

 after 4 steps of
  make menuconfig
 make
 make modules
 make modules_install
 make install

 when i rebooted these error messages came



 Unable to access resume device (/dev/sda3)
 mount: could not find filesystem /dev/root'
 setuproot : moving /dev failed : No such file or directory
 setuproot : error mounting /proc  : No such file or directory
  setuproot : error mounting /Sys : No such file or directory

 switchroot: mount failed No such file or directory


 earlier also whenever i compiled new kernel .. i used to copy the .config
 of old running kernel into new liinux folder
 as everytime if i create .config file with make menuconfig .. some
 unknown mistake gives kernel panic

 i need to know how to set proper .config so that it caters to all
 requirement of my present machine hardware
 i got to know
 make cloneconfig but it gives error as
 make[1]: *** No rule to make target `cloneconfig'.  Stop.
 make: *** [cloneconfig] Error 2

 will make oldconfig work ??
 what to do

 Nidhi
 --
 Thanks  Regards
 Nidhi Mittal Hada



 --
 Thanks  Regards
 Nidhi Mittal Hada



 --
 Waqar Afridi

 Android Developer
 SERG IM|Sciences




-- 
Thanks -
Manish
==
[$\*.^ -- I miss being one of them
==

--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: latest kernel compile-- system panic

2010-01-28 Thread Manish Katiyar
On Thu, Jan 28, 2010 at 6:02 PM, nidhi mittal hada
nidhimitta...@gmail.com wrote:
 yes
 when i get unhinting errors -- i guessed something , changed a few params in
 .config and did make make modules so on
 but again same errors .
 finally
 i copied earlier running kernel's .config into this ...didnot do make
 menuconfig at all
 and in .config changed my required parameter of ext4 to be build as module.
 that's all
 now make , make modules , make modules_install , make install and
 it worked well

 now my ques is ...is it right what i am doing ...
 if not how to know correct parameter of .config
 isnt there some
 make someconfig   instead of menuconfig
 which prepares correct .config file seeing hardware requirement on my pc or
 working kernel's .config file ...

make oldconfig
make help


 Please CMIIW anywhere.
 Nidhi




 On Thu, Jan 28, 2010 at 5:13 PM, Manish Katiyar mkati...@gmail.com wrote:

 On Thu, Jan 28, 2010 at 5:05 PM, waqar afridi afridi.wa...@gmail.com
 wrote:
  I used to get these errors when I started with kernel compilation and by
  this I mean a few weeks back.
 
  Where do u put the kernel source when you compile it, I used to download
  it
  and extract it to my home Directory and then the list of commands above,
  but
  it never worked.
 
  The Solution to this problem is to Extract the Kernel source to
  /usr/src/
  and then do the above process (make etc), may be this will help...

 Where you put the kernel sources to build is not at all related to
 these panics (Otherwise you don't need a build symlink in your
 /lib/modules/version). Did you build the same config ?

 Thanks -
 Manish

 
 
  On Thu, Jan 28, 2010 at 3:25 PM, nidhi mittal hada
  nidhimitta...@gmail.com
  wrote:
 
  Hello
  This time also . i just copied the .config of my running kernel to the
  downloaded new kernel's directory
  and
  did make and further steps.
  and it executed successfully.
  no kernel panic.
 
  is it the right way .?
  But i helplessly do it as last resort everytime
  when after my all efforts new kernel panics on boot everytime.
 
 
  Nidhi
 
  On Thu, Jan 28, 2010 at 2:53 PM, nidhi mittal hada
  nidhimitta...@gmail.com wrote:
 
  hi all
  i compiled latest kernel linux2.6.32.6
 
  after 4 steps of
   make menuconfig
  make
  make modules
  make modules_install
  make install
 
  when i rebooted these error messages came
 
 
 
  Unable to access resume device (/dev/sda3)
  mount: could not find filesystem /dev/root'
  setuproot : moving /dev failed : No such file or directory
  setuproot : error mounting /proc  : No such file or directory
   setuproot : error mounting /Sys : No such file or directory
 
  switchroot: mount failed No such file or directory
 
 
  earlier also whenever i compiled new kernel .. i used to copy the
  .config
  of old running kernel into new liinux folder
  as everytime if i create .config file with make menuconfig .. some
  unknown mistake gives kernel panic
 
  i need to know how to set proper .config so that it caters to all
  requirement of my present machine hardware
  i got to know
  make cloneconfig but it gives error as
  make[1]: *** No rule to make target `cloneconfig'.  Stop.
  make: *** [cloneconfig] Error 2
 
  will make oldconfig work ??
  what to do
 
  Nidhi
  --
  Thanks  Regards
  Nidhi Mittal Hada
 
 
 
  --
  Thanks  Regards
  Nidhi Mittal Hada
 
 
 
  --
  Waqar Afridi
 
  Android Developer
  SERG IM|Sciences
 



 --
 Thanks -
 Manish
 ==
 [$\*.^ -- I miss being one of them
 ==



 --
 Thanks  Regards
 Nidhi Mittal Hada




-- 
Thanks -
Manish
==
[$\*.^ -- I miss being one of them
==

--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Sysfs Device Attributes: Subdirectory under subdirectory

2010-01-28 Thread Himanshu Chauhan
Dear all,

I want to create subdirectory under subdirectory in sysfs
for a device. For example, if vhci_hcd is my device I want
the following hierarchy:

vhci_hcd
|
+-- status
   |
   +---0
   ||
   |+-- status
   ||
   |+-- speed
   ||
   |+-- device id
   ||
   |+-- socket
   ||
   |+-- busid



   |
   +---N
|
+-- status
|
+-- speed
|
+-- device id
|
+-- socket
|
+-- busid

So, how do I create subdirectories 0 to N under
status? I created attribute groups from 0 to N,
how do I attach it to status and then in turn,
status to vhci_hcd?

Thanks in advance.

Regards
Himanshu

--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Sysfs Device Attributes: Subdirectory under subdirectory

2010-01-28 Thread Greg KH
On Fri, Jan 29, 2010 at 12:12:31AM +0530, Himanshu Chauhan wrote:
 Dear all,
 
 I want to create subdirectory under subdirectory in sysfs
 for a device.

Ick, don't.

 For example, if vhci_hcd is my device I want
 the following hierarchy:
 
 vhci_hcd
 |
 +-- status
|
+---0
||
|+-- status
||
|+-- speed
||
|+-- device id
||
|+-- socket
||
|+-- busid
 
 
 
|
+---N
 |
 +-- status
 |
 +-- speed
 |
 +-- device id
 |
 +-- socket
 |
 +-- busid

No, you really do not want this.  Why do you feel that you would want to
create something that does not fit into the current driver/device model
of the kernel?

In short, what specifically are you trying to convey here?

 So, how do I create subdirectories 0 to N under
 status? I created attribute groups from 0 to N,
 how do I attach it to status and then in turn,
 status to vhci_hcd?

What does these 0-N subdirectories represent?

What does 'status' represent?  Why would status have subdirectories?

And why in that subdirectory would you have another file called status?

totally confused,

greg k-h

--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Sysfs Device Attributes: Subdirectory under subdirectory

2010-01-28 Thread Himanshu Chauhan
On Thu, Jan 28, 2010 at 01:11:36PM -0800, Greg KH wrote:
 On Fri, Jan 29, 2010 at 12:12:31AM +0530, Himanshu Chauhan wrote:
  Dear all,
  
  I want to create subdirectory under subdirectory in sysfs
  for a device.
 
 Ick, don't.
 
  For example, if vhci_hcd is my device I want
  the following hierarchy:
  
  vhci_hcd
  |
  +-- status
 |
 +---0
 ||
 |+-- status
 ||
 |+-- speed
 ||
 |+-- device id
 ||
 |+-- socket
 ||
 |+-- busid
  
  
  
 |
 +---N
  |
  +-- status
  |
  +-- speed
  |
  +-- device id
  |
  +-- socket
  |
  +-- busid
 
 No, you really do not want this.  Why do you feel that you would want to
 create something that does not fit into the current driver/device model
 of the kernel?
 
 In short, what specifically are you trying to convey here?

Hi Greg,

There are 8 ports exported by VHCI. So I want to group
the attributes of each port together. 0 to N are the port numbers.
All attributes of port zero will be under 0 and all attributes
of port 1 will be under 1 and so on.

 
  So, how do I create subdirectories 0 to N under
  status? I created attribute groups from 0 to N,
  how do I attach it to status and then in turn,
  status to vhci_hcd?
 
 What does these 0-N subdirectories represent?
 
 What does 'status' represent?  Why would status have subdirectories?

status under VHCI should rather be port_status. So hierarcy would be
VHCI_HCD-port_status-port_number[0-8]-attributes

 
 And why in that subdirectory would you have another file called status?
Status is the status of the port if its connected to the stub on the server.

If this is not good, what would be the best layout?

Regards
Himanshu

--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



DMA reordering possible ?

2010-01-28 Thread yogeshwar sonawane
Hi all,

Following questions can be of naïve nature. Kindly, help me to clarify
the points.
Thanks in Advance.

1) Consider a situation where a PCIe device has requested a DMA Write
operation followed by an MSI based interrupt. Upon receiving the
interrupt, the software will read/check the DMAed data. Now, even if
the device is guaranteeing the ordering between the two (issuing one
after the other), whether the I/O controller OR chipset can
reorder/buffer them? This may result into getting interrupt before the
data is DMAed resulting into software reading invalid data. Here data
is residing into internal buffers of I/O controller and CPU is trying
to read from memory. Whether such DMA reordering can happen/is allowed
at all? Whether I/O controller can employ such intelligence(any kind
of DMA reordering) for gaining some performance advantage? Mainly,
focus is on high-end server class platforms having 8 or 16 cores with
many peripherals.

2) If above situation is at all possible, then to avoid such situation
is the responsibility of the device or the driver for that device?
Mainly, both the components (device and driver) expected to be generic
in nature (platform, I/O controller independent).

3) In continuation, if driver has to handle such situations, then how
to handle such cases in Linux device driver? Any API is there for
pending DMA flush/sync in I/O controller? I am aware of rmb(), wmb() 
mb() which ensures ordering from CPU side i.e. slave read/writes.
Anythings similar for DMA operations ?

Kindly, update me if i am missing something.

Any info,link or reference will be of great help.

Thanks and Regards,
Yogeshwar

--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ