Re: Can interrupt be missed between interrupt disable/enable window?

2016-03-21 Thread Chetan Nanda
ter interrupts enabled again, i.e. all interrupt except one are missed by core, Thanks, Chetan Nanda > > specially when the irq > affinity has been set to the same core on which the > above mentioned code (disabling / enabling the irq's) > runs? > How the linux deals with this ki

Re: owner not checked in mutex_unlock

2016-03-15 Thread Chetan Nanda
On 15-Mar-2016 7:19 pm, "Cihangir Akturk" <cakt...@gmail.com> wrote: > > On Thu, Mar 10, 2016 at 02:59:31PM +0530, Chetan Nanda wrote: > > Hi, > > > > As per book (Linux kernel development) > > > > "Whoever locked a mutex must unlo

owner not checked in mutex_unlock

2016-03-10 Thread Chetan Nanda
ss context and unlocking from separate context (work context) and it is allowed without any error from kernel. Is it the mutex user responsibility to keep track of it? Ideally mutex_unlock should check if owner is same as current? Thanks, Ch

Videobuf2's vb2_dqbuf return (-EINVAL) error on streamoff

2015-09-09 Thread Chetan Nanda
d idea. Thanks, Chetan Nanda ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: [Off-topic] SCM using git

2015-08-18 Thread Chetan Nanda
On Tue, Aug 18, 2015 at 3:16 PM, amit mehta gmate.a...@gmail.com wrote: Hello All, This query is not about Linux kernel, but is rather generic query on development framework with git. Since, Linux Kernel project is significantly large, with astonishing number of people involved and large

Re: Kernel options to boot root over NFS (kernel-4.1.fc22/linux-4.1.3-200.fc22.x86_64)

2015-08-06 Thread Chetan Nanda
in 'Documentation/filesystems/nfs/nfsroot.txt' ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies ~Chetan Nanda ___ Kernelnewbies mailing

Re: Is there any tool can format source code according to kernel coding rule?

2015-08-02 Thread Chetan Nanda
~ Chetan Nanda ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Data inconsistency observed while performing to-device DMA with spi-nor (m25p80)

2015-07-26 Thread Chetan Nanda
issues like - In buffers allocations, is the buffer used for to-device DMA is physically contiguous? - Caching issue, buffer should be un-cacheable. - Any other programming error. - Chetan Nanda Regards, Ayan Kumar Halder ___ Kernelnewbies mailing

Re: Option CONFIG_DEBUG_SET_MODULE_RONX not working for kernel 3.10

2014-08-17 Thread Chetan Nanda
On Fri, Aug 15, 2014 at 4:19 PM, Paul Bolle pebo...@tiscali.nl wrote: On Thu, 2014-08-14 at 09:38 -0400, Valdis Kletnieks wrote: On Thu, 14 Aug 2014 16:46:22 +0530, Chetan Nanda said: I am trying to enable 'CONFIG_DEBUG_SET_MODULE_RONX' config option on 3.10 kernel (for ARM arch) via writing

Re: How to prevent a module from unloading when in used

2014-07-20 Thread Chetan Nanda
On Mon, Jul 21, 2014 at 9:52 AM, Greg KH g...@kroah.com wrote: On Mon, Jul 21, 2014 at 09:09:02AM +0530, Chetan Nanda wrote: I try to debug the hang when unloading of driver. I am using kernel v3.10 and it hangs in 'wait_for_zero_refcount'. I checked that this function has been removed

Re: How to prevent a module from unloading when in used

2014-07-18 Thread Chetan Nanda
On Fri, Jul 18, 2014 at 9:47 AM, Greg KH g...@kroah.com wrote: On Fri, Jul 18, 2014 at 09:43:48AM +0530, Chetan Nanda wrote: On Wed, Jul 16, 2014 at 9:51 PM, Greg KH g...@kroah.com wrote: On Wed, Jul 16, 2014 at 08:57:38PM +0530, Chetan Nanda wrote

Re: How to prevent a module from unloading when in used

2014-07-17 Thread Chetan Nanda
On Wed, Jul 16, 2014 at 9:51 PM, Greg KH g...@kroah.com wrote: On Wed, Jul 16, 2014 at 08:57:38PM +0530, Chetan Nanda wrote: On Wed, Jul 16, 2014 at 8:49 PM, Chetan Nanda chetanna...@gmail.com wrote: On Wed, Jul 16, 2014 at 6:39 PM, John de la Garza j...@jjdev.com wrote

Re: How to prevent a module from unloading when in used

2014-07-16 Thread Chetan Nanda
, Chetan Nanda ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: How to prevent a module from unloading when in used

2014-07-16 Thread Chetan Nanda
On Wed, Jul 16, 2014 at 8:49 PM, Chetan Nanda chetanna...@gmail.com wrote: On Wed, Jul 16, 2014 at 6:39 PM, John de la Garza j...@jjdev.com wrote: On Wed, Jul 16, 2014 at 04:00:18PM +0530, Chetan Nanda wrote: A depends on B, so B is automatically loaded when A is loaded. B module is also

Re: Release DMA Memory

2014-03-10 Thread Chetan Nanda
On Mar 11, 2014 7:57 AM, Matt Davis mattdav...@gmail.com wrote: I have a kernel module that communicates to a PCI device via DMA. The module allocates the shared memory using dma_alloc_coherent(). When the module is unloaded, a call to dma_free_coherent() is executed. My question is, since

Loading / Unloading kernel module from another module

2014-02-02 Thread Chetan Nanda
Hi, Is there a way to load and unload a module from another module? I know 'request_module' can be used to load but what is the API for unloading a module. Thanks for your help. Thanks, Chetan Nanda ___ Kernelnewbies mailing list Kernelnewbies

Re: About exporting symbols from an external module

2014-01-14 Thread Chetan Nanda
On Tue, Jan 14, 2014 at 12:38 PM, Le Tan tamlokv...@gmail.com wrote: Thanks very much! I will try that later. What you mentioned is another amazing sight. But I am confused that why it can't work if I export a function from my module and call it in the kvm? Do I have to modify the makefile of

Issue while unloading modules via modprobe

2013-12-03 Thread Chetan Nanda
, Chetan Nanda ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Issue while unloading modules via modprobe

2013-12-03 Thread Chetan Nanda
$?') printed? echo $? show 1 (EPERM? most probably, operation not permitted for common module). BTW, why are you using the '-v' option when invoking modprobe programatically? yes, -v option can be removed (behaviour is same even after removing -v option) -mandeep Thanks, Chetan Nanda

Re: Can mm_struct of a process be null?

2013-11-17 Thread Chetan Nanda
Yes, current-mm points to user space context for the current process. Now for a kernel threads there is no user space context and for them current-mm would be NULL. Thanks, Chetan Nanda On Fri, Nov 15, 2013 at 9:54 PM, Paul Davies C pauldavi...@gmail.comwrote: Hi, I happen to find

Re: How to find out which part of code is changing a particular data structure.

2013-11-07 Thread Chetan Nanda
You may attach debugger (like Lauterbach) and use its data breakpoint functionality. Thanks, Chetan Nanda On Fri, Nov 8, 2013 at 6:16 AM, Rajat Jain rajatj...@juniper.net wrote: Hi folks, I have a memory location (One of the fields in a kernel data structure) and I want to track down

i2c_add_driver and i2c_new_device handling

2013-10-04 Thread Chetan Nanda
. Thanks, Chetan Nanda ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: I2C Adapters

2013-09-09 Thread Chetan Nanda
controller. And I2C core is containing some common code (routines) being used by both I2C client (I2C devices) driver and I2C adapter (controller) driver. Thanks, Chetan Nanda Thanks -- Regards Jeshwanth Kumar N K Bangalore, India

Re: Use of copy_to_user() and copy_from_user() functions

2013-02-11 Thread Chetan Nanda
On Mon, Feb 11, 2013 at 5:25 PM, anish singh anish198519851...@gmail.comwrote: On Mon, Feb 11, 2013 at 4:51 PM, पारस bepa...@gmail.com wrote: Hi All, To read/write data to user-space from kernel-space we use copy_from_user() and copy_to_user() functions. What is the use of these

Re: Regarding high mem

2012-10-17 Thread Chetan Nanda
/kernelnewbies Chetan Nanda ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: Regarding high mem

2012-10-17 Thread Chetan Nanda
On Oct 17, 2012 2:22 PM, Kshemendra KP kshemen...@suphalaam.com wrote: On Wed, Oct 17, 2012 at 2:04 PM, Chetan Nanda chetanna...@gmail.com wrote: On Tue, Oct 16, 2012 at 5:47 PM, Kshemendra KP kshemen...@suphalaam.com wrote: On x86 kernel is normally split into 3GB (user) : 1 GB

Re: Module vs Kernel main performacne

2012-05-31 Thread Chetan Nanda
On May 31, 2012 9:37 PM, Abu Rasheda rcpilot2...@gmail.com wrote: On Wed, May 30, 2012 at 10:35 PM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: Hi... On Thu, May 31, 2012 at 4:44 AM, Abu Rasheda rcpilot2...@gmail.com wrote: as I increase size of buffer, insns per cycle keep

Re: user virtual address to physical address

2012-05-08 Thread Chetan Nanda
On Wed, May 9, 2012 at 5:40 AM, Fredrick fjohn...@zoho.com wrote: Hi, I need to convert a user virtual address to its corresponding physical address. I know that if the virtual address is from kernel, we could use virt_to_phys. Is there a similar helper function to convert user virtual

Writing a single buffer in kernel ring buffer take 6-8 ms

2012-05-03 Thread Chetan Nanda
. Strangely wringing a single log message in the kernel ring-buffer cost around 6-8ms. Please help to confirm this, or we are doing something wrong. Thanks, Chetan Nanda ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http

Re: Problem of workqueue

2012-05-03 Thread Chetan Nanda
On May 3, 2012 8:37 PM, 夏业添 summer...@gmail.com wrote: Hi, I want to use workqueue in my irq handler. Some materials say that I can use INIT_WORK( work, function, data ); to initialize work, whose type is struct work_struct, and data is something should be passed to function. however,

Re: Kernel threads and system usage metric.

2012-03-12 Thread Chetan Nanda
On Mar 9, 2012 11:57 PM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: Hi :) On Fri, Mar 9, 2012 at 18:39, Daniel Hilst danielhi...@gmail.com wrote: The processes that appear in top with brackets are the kernel threads? Yup :) If so, this threads spend all its time on system mode,

Re: linux camera drivers

2012-03-06 Thread Chetan Nanda
Hi, AFAIK imx036 is a raw bayer camera, and would be outputting data on mipi data line. So one needs a dedicated hardware such as mipi rx and then Isp etc.. And i dont think drivers for these would be available in linux. I might be wrong ... On Mar 5, 2012 2:18 PM, Prabhakar Lad prab Mayank,

Re: Issue with ioctl commands - Linux version 2.6.35.7+

2011-12-28 Thread Chetan Nanda
for sharing. Autif Hi Autif, Please go through the link: http://lwn.net/Articles/119652/ Problem with my dummy driver was that i am using unlocked_ioctl, but defined the ioctl function with wrong syntax (i.e. with syntax of normal ioctl function.) Thanks, Chetan Nanda On Tue, Dec 27, 2011

Re: Issue with ioctl commands - Linux version 2.6.35.7+

2011-12-27 Thread Chetan Nanda
On 12/27/11, Alexandru Juncu alex.ju...@rosedu.org wrote: On Tue, Dec 27, 2011 at 1:57 PM, Chetan Nanda chetanna...@gmail.com wrote: On Tue, Dec 27, 2011 at 5:23 PM, Alexandru Juncu alex.ju...@rosedu.org wrote: On Tue, Dec 27, 2011 at 1:39 PM, Chetan Nanda chetanna...@gmail.com wrote: Hi

Issue with ioctl commands - Linux version 2.6.35.7+

2011-12-27 Thread Chetan Nanda
); .. In kernel space int readHwReg_ioctl(struct inode *node, struct file *filp, unsigned int cmd, unsigned long arg) { ... printk(\n%d %s cmd = %x\n,__LINE__,__FUNCTION__,cmd); --- cmd = bee6a9d4 ... } I am not able to figure out the root cause, Please help to check... Thanks, Chetan Nanda

Re: When is to preempt safe?

2011-10-07 Thread Chetan Nanda
On 7 Oct 2011 16:58, Parmenides mobile.parmeni...@gmail.com wrote: Hi, Preemption has two cases: user preemption and kernel preemption. I have tow questions about them. 1. According to Love, If the kernel is returning to user-space, it knows it is in a safe quiescent state. In other