Re: [PATCH] FIXED sparse warning : drivers/cpuidle/cpuidle.c:27:1: warning: symbol 'cpuidle_dev' was not declared. Should it be static?

2013-10-03 Thread Sagar Padhye
  I checked that cpuidle_devices is only being used in cpuidle.c - hence
  thought that it can be made static and be removed from header.
 
 cpuidle_devices is actually used in drivers/cpuidle/coupled.c as well
 so this breaks the build.

Darn! I forgot 'clean build' part. sorry.
 
 Even for cpuidle_dev the patch isn't right.  It doesn't fix the
 warning, for me.  The DEFINE_PER_CPU() macro defines several variables
 actually.  Per CPU variables are a bit complicated and they have to have
 globally unique names.  So just ignore the Sparse warning for per CPU
 variables.
 

Ok, let me look at my sparse log once again, will pick some other problem (any 
suggestions?)

 There are several other process problems with the patch submission.
 
 1) Incorrect subject.  It should be:
   [PATCH] cpuidle: make a variable static
 
This is based on `git log --oneline drivers/cpuidle/cpuidle.c`
output.
 
 2) No blank line between subject and body of commit message.
 3) Line wrap the body of the email at 72 characters.
 4) No Signed-off-by line.
 

Ok, will keep this in mind

Thanks and Regards,
Sagar 

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


kexec

2013-10-03 Thread Dmitry Kolesov
Hello.

Could anybody help with kexec. I cannot find some informaton from google.
I try to use kexec for fast boot new kernel but I have error below:

# kexec -l /boot/vmlinuz-3.12.0-rc1+
--initrd=/boot/initramfs-3.12.0-rc1+.img --command-line=$(cat
/proc/cmdline)
kexec_load failed: Operation not permitted
entry   = 0x24eff5790 flags = 3e
nr_segments = 3
segment[0].buf   = 0x7fd169783210
segment[0].bufsz = 505250
segment[0].mem   = 0x24d00
segment[0].memsz = 1413000
segment[1].buf   = 0xbc3770
segment[1].bufsz = 4310
segment[1].mem   = 0x24efef000
segment[1].memsz = 5000
segment[2].buf   = 0xbba650
segment[2].bufsz = 90e0
segment[2].mem   = 0x24eff5000
segment[2].memsz = b000

KEXEC option in the config is enabled.

How can I decid this problem?

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


On SPI stress testing on a mini2440 board.

2013-10-03 Thread mind entropy
Hi,

  I have a mini2440 board to which I have connected a TI MSP430 G2553
microcontroller. I am communicating via SPI from the mini2440 master
to the MSP430 microcontroller slave. I am having a problem though. I
have to put a chip select delay and hence I am waiting for 500 uS
using udelay. Sometimes the data seems to skip or cause glitches when
the load is high I think. I had connected 2 microcontrollers and it
works fine when I stress test it. In case of the mini2440 board after
quite some hours of continuous transfers I get glitches. Is udelay
consistent?

Thanks,
Gautam.

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


Re: can a bottom half be scheduled by another BH ??

2013-10-03 Thread sujan dutta

Yes you can, infact network subsystem softirq are reactive so it can run again.
however, reactivated softirq are not immediately process but until kernel 
handles the pending softirqs because it might introduce latency in user-space. 
And for better performance, when pending BH grows excessively then family of 
kernel threads are wakes up to handle the load.


On 27-Sep-2013, at 4:44 PM, Vishwas Srivastava (vishsriv) vishs...@cisco.com 
wrote:

 Hi Group,
I am a bit unclear if, I could schedule another BH while I am already 
 running in a BH ?
 For example, if I am running in a SOFT IRQ, can I schedule a tasklet from 
 there ??
  
 Thanks,
 Vishwas S
  
  
 ___
 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: can a bottom half be scheduled by another BH ??

2013-10-03 Thread anish singh
On Oct 3, 2013 8:28 PM, sujan dutta stoned.se...@gmail.com wrote:


 Yes you can, infact network subsystem softirq are reactive so it can run
again.
 however, reactivated softirq are not immediately process but until kernel
handles the pending softirqs because it might introduce latency in
user-space.
 And for better performance, when pending BH grows excessively then family
of kernel threads are wakes up to handle the load.
Family of threads mentioned here is called ksoftirqd.
Linux uses the ksoftirqd as the general solution to schedule softirq's to
run before next interrupt and by putting them under scheduler control. Also
this prevents consecutive softirq's from monopolizing the CPU. This also
has the effect that the priority of ksoftirq needs to be considered when
running very CPU-intensive applications and networking to get the proper
balance of softirq/user balance. Increasing ksoftirq priority to 0
(eventually more) is reported to cure problems with low network performance
at high CPU load.
I think softirq calling itself is a problem which is delicately managed by
linux kernel developers and how to improve the code and logic is an active
field where you can contribute.


 On 27-Sep-2013, at 4:44 PM, Vishwas Srivastava (vishsriv) 
vishs...@cisco.com wrote:

 Hi Group,
I am a bit unclear if, I could schedule another BH while I am already
running in a BH ?
 For example, if I am running in a SOFT IRQ, can I schedule a tasklet
from there ??

 Thanks,
 Vishwas S


 ___
 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

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


Re: User Space Network Drivers

2013-10-03 Thread Bjørn Mork
james jones james.voip+ker...@gmail.com writes:

 Is there any work being done on a kernel module for generic packet
 processing in user space?

Like the Universal TUN/TAP device driver, you mean?


Bjørn

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


some basic doubts / confusion regarding linux kernel / OS

2013-10-03 Thread ajay saini
Hi,

I had some confusion/doubts regarding Linux kernel / OS and I want to be 
completely sure that my understanding is right for below, and need your inputs 
(would be really glad for your help):

- There are functions defined in linux kernel. Some of these functions have a 
line EXPORT_SYMBOL(function_name);  after them.

   These are the functions which are exported, so they can be directly called 
from a linux kernel module - right ? (we just need to include header files 
which define
   them in our kernel module)

- There are some functions defined in linux kernel, which are not static and 
are not exported, like migrate_pages in migrate.c and it is mentioned in
   include/linux/migrate.h file. 
   Is there a way to call these functions, directly from kernel module ?? (even 
if I include the header file) ??
   If no, What is the technique used there, which prevents the module from 
calling this function (even though I have included the header file)??

- We have kernel header files defined in include/linux/ and there are user 
space header files (the C libraries).
    Can a user space program include kernel header file and call a kernel 
function directly?? No , right ??
    Again, what is there which prevents a user space program from doing so?? 
How this technique is implemented ??
   
- I understand that, a struct page exists for each physical page in RAM. And 
this linked list of struct pages are stored together at the beginning of a 
zone. After this
  storage, does the real data (content) of pages is stored.
  Now each of these pages must be pointing to the data area/page which they 
define ? Which is this field in the struct page, which points to this data 
area, a physical
  address + length of the page ?
   
Thanks,
Ajay___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


unsubscribe

2013-10-03 Thread Daniel Kranich


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


[PCIe spec question] How to get PCI express link up / link down notifications?

2013-10-03 Thread Rajat Jain
Hello,

I have a HW which is not compliant with the PCI Express hot-plug (as described 
in the PCI express spec) because the HP signals from the downstream port are 
simply not connected. And I have a PCI express endpoint, that in the course of 
its life, will routinely undergo power-off and power-on on cycles. Hence the 
PCIe link to this device is expected to come down, and come up as part of 
regular operation.

I'm reading the PCI express spec trying to understand if it is possible to get 
notification interrupts, whenever the PCIe link to this device goes down or 
goes up. Can someone please help me understand if it is possible?

In the link control register, I only see the capability to generate interrupts 
when link bandwidth changes and looking at the text, I doubt if Link down or 
link up counts as link bandwidth change. Is there a way to generate and 
interrupt / notification when the Link goes up or down?

Thanks,

Rajat Jain




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


Re: [PATCH 1/3] Minimum wrapfs rename

2013-10-03 Thread Valdis . Kletnieks
On Wed, 02 Oct 2013 15:47:33 +0100, Alin Dobre said:

 +++ b/fs/idmapfs/Kconfig
 @@ -0,0 +1,8 @@
 +config IDMAP_FS
 + tristate Idmapfs stackable file system (EXPERIMENTAL)
 + help
 +   Wrapfs is a stackable file system which simply passes its
 +   operations to the lower layer.

NAK.

The help text states this is 'wrapfs', and that it merely passes its operations
to the lower layer, presumably without being modified.

The menu item calls it 'idmapfs',which implies that the requests *are*
modified.

This may be wrapfs renamed to idmapfs, with minimum changes', but
in this case it's *too* minimum.


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


RE: [PCIe spec question] How to get PCI express link up / link down notifications?

2013-10-03 Thread Rajat Jain
Hello Greg,

 
 On Fri, Oct 04, 2013 at 01:40:49AM +, Rajat Jain wrote:
  Hello,
 
  I have a HW which is not compliant with the PCI Express hot-plug (as
  described in the PCI express spec) because the HP signals from the
  downstream port are simply not connected. And I have a PCI express
  endpoint, that in the course of its life, will routinely undergo
  power-off and power-on on cycles. Hence the PCIe link to this device
  is expected to come down, and come up as part of regular operation.
 
 What hardware is this?  Why not ask the manufacturer of it as they are
 the ones in control of this type of thing.

OK, Understood :-).

Actually my question was generic. For e.g. say I have a topology where root 
port connects to a PCIe switch-1 that in turn connects to a PCIe switch-2. My 
question is if the PCIe link between the switch-1 and switch-2 goes down or up 
for some reason (say a power fault, or due to RESET pin assertion on the switch 
etc), is there a way to get notification interrupt at the root port or CPU? 
Essentially I am looking for a notification from downstream port of switch-1, 
that it saw a change in the link status.

 
  I'm reading the PCI express spec trying to understand if it is
  possible to get notification interrupts, whenever the PCIe link to
  this device goes down or goes up. Can someone please help me
  understand if it is possible?
 
 Notification where?

Notification to the CPU via the root port.

Thanks a bunch,

Rajat

 
 thanks,
 
 greg k-h
 --
 To unsubscribe from this list: send the line unsubscribe linux-pci in
 the body of a message to majord...@vger.kernel.org More majordomo info
 at  http://vger.kernel.org/majordomo-info.html
 



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


Re: some basic doubts / confusion regarding linux kernel / OS

2013-10-03 Thread Mandeep Sandhu
On Thu, Oct 3, 2013 at 10:38 PM, ajay saini ajay_saini1...@yahoo.co.inwrote:

 Hi,

 I had some confusion/doubts regarding Linux kernel / OS and I want to be
 completely sure that my understanding is right for below, and need your
 inputs (would be really glad for your help):

 - There are functions defined in linux kernel. Some of these functions
 have a line EXPORT_SYMBOL(function_name);  after them.
These are the functions which are exported, so they can be directly
 called from a linux kernel module - right ? (we just need to include header
 files which define
them in our kernel module)


Yes. They are used during dynamic loading of modules. More here:
http://stackoverflow.com/questions/6670589/use-of-export-symbol



 - There are some functions defined in linux kernel, which are not static
 and are not exported, like migrate_pages in migrate.c and it is
 mentioned in
include/linux/migrate.h file.
Is there a way to call these functions, directly from kernel module ??
 (even if I include the header file) ??
If no, What is the technique used there, which prevents the module
 from calling this function (even though I have included the header file)??


The  compiler? :)


 - We have kernel header files defined in include/linux/ and there are user
 space header files (the C libraries).
 Can a user space program include kernel header file and call a kernel
 function directly?? No , right ??
 Again, what is there which prevents a user space program from doing
 so?? How this technique is implemented ??


Kernel fxn's can't be called directly, you'll have to use either the syscal
interface or one of the many (indirect) userspace-kernel communication
mechanisms.

Again, the technique here is that you compiler will barf if you try and
use kernel functions directly as it won't find the definitions of those
functions during linking. CMIIW.

HTH,
-mandeep


 - I understand that, a struct page exists for each physical page in RAM.
 And this linked list of struct pages are stored together at the beginning
 of a zone. After this
   storage, does the real data (content) of pages is stored.
   Now each of these pages must be pointing to the data area/page which
 they define ? Which is this field in the struct page, which points to this
 data area, a physical
   address + length of the page ?

 Thanks,
 Ajay

 ___
 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