How to Start File System in Linux Kernel

2014-08-20 Thread Rahul Garg
Hi All,

I have basic knowledge of linux kernel concept and I would like to
read more about File System.
So I would really appreciate if some one can suggest me some
material(blogs, tutorial) or anything which can help me to get better
understanding about File system.

Regards
Rahul

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


Problem facing while running checkpatch.pl on linux-next tree

2014-07-27 Thread Rahul Garg
Hi All,

I am trying to run checkpatch.pl on linux-next tree's staging folder.
But whatever sub directory, I try to run it on. It is giving me the
same error for all the files :

ERROR: Does not appear to be a unified-diff format patch

I thought that it might be a problem with my git. So I clone the git tree again.

So can anyone help me, what am I missing ?

Regards
Rahul

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


Need help related to Eudyptula Task 08

2014-05-29 Thread Rahul Garg
Hi All,

I am stuck at Task 08. Problem is I have to send files and changes
using send-email utility.  As per my understanding, whenever we need
to add a new file to git, we use git add command, it creates a patch
for it and then we will send it.

But when I did it, I got response saying that you should not send new
file as a patch, So I want to know how can I send this new file then ?
And if I directly attach this file, how will I link my further 2 mails
to this original mail ?

Regards
Rahul

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


How does device tree support for two different LCD panel in the same kernel image ?

2014-05-26 Thread Rahul Garg
I am having confusion with device tree concept. As device tree is
used, so that same kernel image can be flashed on the different device
(which are compatible).

Now suppose I want to use two different LCD panel for same project,
For that I will have 2 separate dtsi file which will be having panel
settings for respective lcd panel.

What I want to know is, how can I put conditions in my driver code or
in main dts file, so that If I flash the same kernel image on device A
(with Panel A) or on device B ( with Panel B), it works fine.

is there any way to do this or not?

Regards
Rahul

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


Help needed to use git send-email utility

2014-04-20 Thread Rahul Garg
Hi All,

Like many people here, I am also taking Eudyptula Challlenge, But for
last 1 week, I am stuck at level 8.
I am stuck because I dont know how to send email using git. I have to
send some thing like this :

[xyz] Task 08 results
└─>[xyz] [PATCH 01/02] Task 08: add jiffies file
  └─>[xyz] [PATCH 02/02] Task 08: add foo file

I have tried following links:
http://www.freedesktop.org/wiki/Software/PulseAudio/HowToUseGitSendEmail/
http://alblue.bandlem.com/2011/12/git-tip-of-week-patches-by-email.html
http://git-scm.com/docs/git-send-email

But I still unable to understand it properly. So anyone can help me
with this, would be great.

Regards
Rahul

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


Re: How Kernel stack is used in case of different processor mode in ARM architecture?

2014-03-25 Thread Rahul Garg
Hi Arun,

When I used word nested interrupt, I meant that in my interrupt
handler I am enabling interrupts.

and about "what made you believe we need system mode to support nesting?"

I asked this question on SO, here is the link for its answer

http://stackoverflow.com/a/22500017/769260

And thanks for your prompt answer :)

Regards
Rahul

On Tue, Mar 25, 2014 at 4:45 PM, Arun KS  wrote:
> On Tue, Mar 25, 2014 at 4:40 PM, Arun KS  wrote:
>> Hello Rahul,
>>
>> On Tue, Mar 25, 2014 at 4:10 PM, Rahul Garg  wrote:
>>> Hi Arun,
>>>
>>> Lines from Robert Love :
>>>
>>> Early in the 2.6 kernel process, an option was added to reduce the
>>> stack size from two
>>> pages down to one, providing only a 4KB stack on 32-bit systems.This
>>> reduced memory
>>> pressure because every process on the system previously needed two
>>> pages of contiguous,
>>> nonswappable kernel memory.To cope with the reduced stack size,
>>> interrupt handlers
>>> were given their own stack, one stack per processor, one page in
>>> size.This stack is referred
>>> to as the interrupt stack.Although the total size of the interrupt
>>> stack is half that of the
>>> original shared stack, the average stack space available is greater
>>> because interrupt handlers
>>> get the full page of memory to themselves.
>>
>> Kernel stack size is architecture dependent. Some architecture uses
>> CONFIG_4KSTACKS to choose 4K stacks.
>>
>> Where as in arm, it is always 8KB.
>>
>> File:arch/arm/include/asm/thread_info.h
>> #define THREAD_SIZE_ORDER   1
>> #define THREAD_SIZE 8192
>> #define THREAD_START_SP (THREAD_SIZE - 8)
>>
>>>
>>>
>>> So with these lines, it is clear that interrupt stack is used by
>>> interrupt handlers. So can you please re-confirm your answer ?
>> On ARM when there is an irq, the processor switches to irq mode. But
>> the kernel switches to svc mode immediately and uses SVC stack, ie the
>> stack of the current process.
>>
>> Why do you believe my be? :-)
>> If you want re-confirmation, go through arch/arm/kernel/entry-armv.S
>>
>> Thanks,
>> Arun
>>>
>>> And one more thing, as you mentioned only interrupt, undefined and
>>> abort have stack, So how nested interrupt is handled because for that
>>> we need System mode stack ?
> Interrupts are no more nested in linux kernel,
>
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/kernel/irq/handle.c?id=e58aa3d2d0cc01ad8d6f7f640a0670433f794922
>
> But nested exceptions(data, prefetch aborts etc) can still happen.
>
> And, what made you believe we need system mode to support nesting?
> What difference does it make if it is svc mode?
>
> Thanks,
> Arun
>
>
>> ARM linux never use system mode for anything.
>>
>>>
>>> Regards
>>> Rahul
>>>
>>> On Tue, Mar 25, 2014 at 3:06 PM, Arun KS  wrote:
>>>> On Tue, Mar 25, 2014 at 2:58 PM, Arun KS  wrote:
>>>>> Hello Rahul,
>>>>>
>>>>> On Tue, Mar 25, 2014 at 6:29 AM, Rahul Garg  
>>>>> wrote:
>>>>>> As I understand every process have a user stack and kernel stack.
>>>>> True.
>>>>>
>>>>>> Apart from that there is a stack for every mode in ARM achitecture. So
>>>>> This is wrong.
>>>>> Only irq, abort and undefined modes have stacks in linux. That too is
>>>>> very limited, 3 bytes per mode per cpu.
>>>>> Have a look at arch/arm/kernel/irq.c
>>>> Sorry. Wrong file, its at arch/arm/kernel/setup.c
>>>>
>>>> Thanks,
>>>> Arun
>>>>> struct stack {
>>>>> u32 irq[3];
>>>>> u32 abt[3];
>>>>> u32 und[3];
>>>>> } cacheline_aligned;
>>>>>
>>>>> kernel runs in SVC mode and the stack used belong to the kernel stack
>>>>> of the current task.
>>>>> Even irq, abort and undefined exception handlers use kernel stack of
>>>>> current task. All the exception
>>>>> handlers switch to SVC mode at a very early stage and use kernel
>>>>> stack. Those 3 bytes are used
>>>>> as stack just during the transition phase(for example transition from
>>>>> irq to svc mode during and interrupt).
>>>>>
>>>>> Thanks,
>>>>> Arun
>>>>>> I want to know How different stack and stack pointer works in ARM
>>>>>> modes? Also when this kernel stack associated with the process will be
>>>>>> used ?
>>>>>>
>>>>>> ___
>>>>>> 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: How Kernel stack is used in case of different processor mode in ARM architecture?

2014-03-25 Thread Rahul Garg
Hi Arun,

Lines from Robert Love :

Early in the 2.6 kernel process, an option was added to reduce the
stack size from two
pages down to one, providing only a 4KB stack on 32-bit systems.This
reduced memory
pressure because every process on the system previously needed two
pages of contiguous,
nonswappable kernel memory.To cope with the reduced stack size,
interrupt handlers
were given their own stack, one stack per processor, one page in
size.This stack is referred
to as the interrupt stack.Although the total size of the interrupt
stack is half that of the
original shared stack, the average stack space available is greater
because interrupt handlers
get the full page of memory to themselves.


So with these lines, it is clear that interrupt stack is used by
interrupt handlers. So can you please re-confirm your answer ?

And one more thing, as you mentioned only interrupt, undefined and
abort have stack, So how nested interrupt is handled because for that
we need System mode stack ?

Regards
Rahul

On Tue, Mar 25, 2014 at 3:06 PM, Arun KS  wrote:
> On Tue, Mar 25, 2014 at 2:58 PM, Arun KS  wrote:
>> Hello Rahul,
>>
>> On Tue, Mar 25, 2014 at 6:29 AM, Rahul Garg  wrote:
>>> As I understand every process have a user stack and kernel stack.
>> True.
>>
>>> Apart from that there is a stack for every mode in ARM achitecture. So
>> This is wrong.
>> Only irq, abort and undefined modes have stacks in linux. That too is
>> very limited, 3 bytes per mode per cpu.
>> Have a look at arch/arm/kernel/irq.c
> Sorry. Wrong file, its at arch/arm/kernel/setup.c
>
> Thanks,
> Arun
>> struct stack {
>> u32 irq[3];
>> u32 abt[3];
>> u32 und[3];
>> } cacheline_aligned;
>>
>> kernel runs in SVC mode and the stack used belong to the kernel stack
>> of the current task.
>> Even irq, abort and undefined exception handlers use kernel stack of
>> current task. All the exception
>> handlers switch to SVC mode at a very early stage and use kernel
>> stack. Those 3 bytes are used
>> as stack just during the transition phase(for example transition from
>> irq to svc mode during and interrupt).
>>
>> Thanks,
>> Arun
>>> I want to know How different stack and stack pointer works in ARM
>>> modes? Also when this kernel stack associated with the process will be
>>> used ?
>>>
>>> ___
>>> 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


How Kernel stack is used in case of different processor mode in ARM architecture?

2014-03-24 Thread Rahul Garg
As I understand every process have a user stack and kernel stack.
Apart from that there is a stack for every mode in ARM achitecture. So
I want to know How different stack and stack pointer works in ARM
modes? Also when this kernel stack associated with the process will be
used ?

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


Unable to find /sbin/hotplug in my running kernel

2014-03-20 Thread Rahul Garg
Hi

I am unable to find /sbin/hotplug in my running kernel. I checked my
config file, CONFIG_HOTPLUG_CPU=y is enabled.

Also one more doubt which I have is, with out this file how hotplug
event is working.
My running kernel version is 3.14.0-rc6.

Any leads will be appreciated.

Regards
Rahul

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


Re: A new way to dive into the kernel!

2014-03-16 Thread Rahul Garg
Hi Anand,

 you can send the attachment in the mail. But make sure it is in not
using base64 encoding for attachment.

On Sun, Mar 16, 2014 at 1:16 PM, Anand Moon  wrote:
> Hi All,
>
> Can we send attachment to lit...@eudyptula-challenge.org
> or all the code need to be part of the mail.
>
> -Anand Moon
>
>
> On Sunday, March 16, 2014 7:25 AM, Subhra S. Sarkar  
> wrote:
> jimmy.li  qq.com> writes:
>
>>
>>
>> I have tried thunderbird, but it always send attachments with base64
> encoding.
>> It's there any solution to this issue?
>>
>> I'm using mutt, It's ok.
>>
>>
>>
>> -- Original --
>>
>> From:  "Asutosh Das"; gmail.com>;
>> Date:  Thu, Mar 13, 2014 01:32 AM
>> To:  "sanmukh rao" gmail.com>;
>> Cc:  "sanjeev sharma" gmail.com>; "Mallesh
> Koujalagi" gmail.com>; "kernelnewbies"
>  kernelnewbies.org>; "Ronald Dahlgren"  gmail.com>; "Aruna Hewapathirane" gmail.com>;
> "Amit Saha" gmail.com>; "Srivardhan M S"
> gmail.com>; "Mandeep Sandhu" gmail.com>;
>> Subject:  Re: A new way to dive into the kernel!
>>
>>
>> Used Thunderbird this time with plain text settings. Hope it works.
> Appreciate the suggestions.
>> On Mar 12, 2014 10:29 PM, "sanmukh rao"  gmail.com> wrote:
>> Thanks :)
>> I am using mutt by the way. So got covered.
>> -Sanmukh
>>
>>
>>
>>
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies  kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>
> Well, Thunderbird worked out perfectly for me. You'll have to enable couple
> of options in there though. Below settings worked for me for Thunderbird
> client.
>
> 1. Go to Settings for Account -> Composition & Addressing and disable the
> "Compose messages in HTML format" option.
> 2. On Composition & Addressing -> Global Composing Preferences ->
> Composition tab -> General tab -> Send Options, you'll have to choose
> "Convert the message to plain text" option from the drop-down list.
>
> ~ Subhra S. Sarkar
>
>
>
> ___
> 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


is there any faster way to download using git?

2014-03-15 Thread Rahul Garg
Hi All,

I am trying to download following git branch

git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

But it is downloading very slow with speed of 10-40 KB/s.
So I was wondering is there any faster way to download this branch.

Regards
Rahul

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


Problem while compiling my module on downloaded kernel source

2014-03-14 Thread Rahul Garg
Hi,

Being newbie to kernel, I downloaded the source code of stable kernel
code[3.13.6].
Then I build it using make oldconfig && make prepare.

Now when I am trying build my kernel module against this source code.
But I am unable to do so, Here is the error I am getting

make -C /home/rahul/linux-3.13.6 M=/home/rahul/KerenelTryouts modules
make[1]: Entering directory `/home/rahul/linux-3.13.6'

  WARNING: Symbol version dump /home/rahul/linux-3.13.6/Module.symvers
   is missing; modules will have no dependencies and modversions.

  CC [M]  /home/rahul/KerenelTryouts/test.o
/bin/sh: 1: /home/rahul/linux-3.13.6/scripts/recordmcount: not found
make[2]: *** [/home/rahul/KerenelTryouts/test.o] Error 127
make[1]: *** [_module_/home/rahul/KerenelTryouts] Error 2
make[1]: Leaving directory `/home/rahul/linux-3.13.6'
make: *** [all] Error 2


Here is my make file for your reference

KERNELDIR=/home/rahul/linux-3.13.6

obj-m += test.o


all:
ifneq ($(KERNELDIR), )
make -C $(KERNELDIR) M=$(PWD) modules
else
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
endif

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean


Please help me out with this.

Regards
Rahul

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


Re:Re: A new way to dive into the kernel! [Eudyptula Challenge]

2014-03-11 Thread Rahul Garg
Hi all,

I am also thinking of taking this challenge. But I found very limited
information on submission.
So can you help me what we need to submit for the Assigment 1,
will dmesg (or /proc/kmsg) output and module(assignement1.c and
Makeflie) be enough ??

Also is there any group of forum where we can discuss assignments ?

Regards
Rahul

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