Intro and some questions

2013-02-19 Thread NeonJohn
Greetings, I just discovered this list while beating my head against the wall (kernel noobs do that a lot, I hear). I thought I'd introduce myself. I'm mainly an EE but with fairly extensive Unix and Linux user space coding and with embedded system programming. I'm a newborn infant when it come

Re: SIGKILL and a sleeping kernel module

2013-02-19 Thread Srinivas Ganji
On Wed, Feb 20, 2013 at 11:59 AM, Srinivas Ganji < srinivasganji.ker...@gmail.com> wrote: > > On Tue, Feb 19, 2013 at 5:02 PM, Kevin Wilson wrote: > >> Hi, >> >> Thanks about the info about ps. >> This raises two new questions: >> 1) The following code is a very basic kernel module (based on my

Re: SIGKILL and a sleeping kernel module

2013-02-19 Thread Srinivas Ganji
On Tue, Feb 19, 2013 at 5:02 PM, Kevin Wilson wrote: > Hi, > > Thanks about the info about ps. > This raises two new questions: > 1) The following code is a very basic kernel module (based on my > previous code, removing somethings). > I do not understand something: > I call > /* sleep for a m

Re: cpu_relax(), rep: nop, and PAUSE

2013-02-19 Thread Adam Lee
On Tue, Feb 19, 2013 at 02:20:11PM +0200, David Shwatrz wrote: > Hi, kernel newbies, > > We have: > #define cpu_relax() asm volatile("rep; nop") > in arch/x86/boot/boot.h. > > Why don't we use the PAUSE assembler instruction here ? But rep_nop and pause ought to be the same, why we change it?

Re: Suppress all boot output (framebuffer?) - embedded linux distro

2013-02-19 Thread Ivan Nikolaev
Original Message Subject: Re: Suppress all boot output (framebuffer?) - embedded linux distro Date: Tue, 19 Feb 2013 22:52:25 +0100 From: Ivan Nikolaev To: Mulyadi Santosa On Tue 19 Feb 2013 08:00:52 PM CET, Mulyadi Santosa wrote: On Tue, Feb 19, 2013 at 8:50

Re: cpu_relax(), rep: nop, and PAUSE

2013-02-19 Thread Valdis . Kletnieks
On Wed, 20 Feb 2013 01:58:17 +0700, Mulyadi Santosa said: > On Tue, Feb 19, 2013 at 7:20 PM, David Shwatrz wrote: > > Hi, kernel newbies, > > > > We have: > > #define cpu_relax() asm volatile("rep; nop") > > in arch/x86/boot/boot.h. > > > > Why don't we use the PAUSE assembler instruction here

Re: Why kernel uImage to be loaded at 32KB offset ?

2013-02-19 Thread Dave Hylands
Hi Karthik, On Tue, Feb 19, 2013 at 1:02 AM, KARTHIK SEKURU wrote: > > Hi All, > > My board's physical memory starts at 0x8000_. > The kernel uImage is loaded at 0x80008000. > > I have seen in many other boards the uImage is loaded at 32KB. > > Why is this mandatory to load uImage at 32KB off

Re: SIGKILL and a sleeping kernel module

2013-02-19 Thread Anatol Pomozov
Hi On Tue, Feb 19, 2013 at 1:16 AM, Srivatsa S. Bhat wrote: > On 02/19/2013 02:07 PM, Kevin Wilson wrote: >> Hi all, >> I am trying to send a SIGKILL to a kernel module which is sleeping. >> I added a printk after the sleep command. >> Sending a SIGLKILL (by kill -9 SIGLKILL pidOfKernelThread) do

Re: cpu_relax(), rep: nop, and PAUSE

2013-02-19 Thread Mulyadi Santosa
On Tue, Feb 19, 2013 at 7:20 PM, David Shwatrz wrote: > Hi, kernel newbies, > > We have: > #define cpu_relax() asm volatile("rep; nop") > in arch/x86/boot/boot.h. > > Why don't we use the PAUSE assembler instruction here ? Just guessing, maybe rep+nop could do better power saving because proc

Re: Suppress all boot output (framebuffer?) - embedded linux distro

2013-02-19 Thread Mulyadi Santosa
On Tue, Feb 19, 2013 at 8:50 PM, Ivan Nikolaev wrote: > I'm developing an ubuntu 12.04 (LTS) based embedded distribution, which > basically is a normal ubuntu stripped down to bare minimal packages, > which runs a minimal XOrg server with one single full-screen > application. What I want is to sup

Re: SIGKILL and a sleeping kernel module

2013-02-19 Thread Mulyadi Santosa
On Tue, Feb 19, 2013 at 7:00 PM, Kevin Wilson wrote: > Hi, > 1) changing to msleep_interruptible() did not change the situation. > 2) What is strange is that I *do* see the printk messages > of kernel_init/kernel_exit, but I do not see the printk messages > in the thread function, thread_function(

Re: How controll is passed from uboot to kernel

2013-02-19 Thread Peter Teoh
Reading the uboot source code: In common/cmd_bootm.c: int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { And within this do_bootm_linux() is called: do_bootm_linux (cmdtp, flag, argc, argv, addr, len_ptr, verify); And inside do_bootm_l

Re: Tracing SIGKILL, is that possible?

2013-02-19 Thread daniel hilst
Em 18/02/2013 16:09, valdis.kletni...@vt.edu escreveu: > On Mon, 18 Feb 2013 15:46:58 -0300, "Daniel." said: >> Is there a way to track signals, specially SIGKILL. I would like to >> know if some process dies because reach some resource limit, because >> an OMM error or something likewise.. > > Dep

Suppress all boot output (framebuffer?) - embedded linux distro

2013-02-19 Thread Ivan Nikolaev
Hi everybody! I'm new to linux kernel development (very very little experience), time ago have began studying Operating Systems, even written a simple x86 2-stage bootloader for my supa-dupa-noob-os (which never ended up in something working). Anyway, that was just to explain what kind of a noo

Re: SIGKILL and a sleeping kernel module

2013-02-19 Thread Kevin Wilson
Hi, 1) changing to msleep_interruptible() did not change the situation. 2) What is strange is that I *do* see the printk messages of kernel_init/kernel_exit, but I do not see the printk messages in the thread function, thread_function() (also before the first mslee()/msleep_interruptible() ). And t

Re: SIGKILL and a sleeping kernel module

2013-02-19 Thread Kevin Wilson
Hi, Thanks about the info about ps. This raises two new questions: 1) The following code is a very basic kernel module (based on my previous code, removing somethings). I do not understand something: I call /* sleep for a millisecond */ msleep(1); printk("calling do_exit\n"); msleep

Re: SIGKILL and a sleeping kernel module

2013-02-19 Thread Valdis . Kletnieks
On Tue, 19 Feb 2013 10:37:28 +0200, Kevin Wilson said: > Hi all, > I am trying to send a SIGKILL to a kernel module which is sleeping. > I added a printk after the sleep command. > Sending a SIGLKILL (by kill -9 SIGLKILL pidOfKernelThread) does **not** > yield the message from printk("calling do_ex

Re: SIGKILL and a sleeping kernel module

2013-02-19 Thread Srivatsa S. Bhat
On 02/19/2013 02:07 PM, Kevin Wilson wrote: > Hi all, > I am trying to send a SIGKILL to a kernel module which is sleeping. > I added a printk after the sleep command. > Sending a SIGLKILL (by kill -9 SIGLKILL pidOfKernelThread) does **not** > yield the message from printk("calling do_exit\n"); >

Re: SIGKILL and a sleeping kernel module

2013-02-19 Thread Silviu Popescu
On Tue, Feb 19, 2013 at 10:37 AM, Kevin Wilson wrote: > Hi all, > I am trying to send a SIGKILL to a kernel module which is sleeping. > I added a printk after the sleep command. > Sending a SIGLKILL (by kill -9 SIGLKILL pidOfKernelThread) does **not** > yield the message from printk("calling do_e

Why kernel uImage to be loaded at 32KB offset ?

2013-02-19 Thread KARTHIK SEKURU
Hi All, My board's physical memory starts at 0x8000_. The kernel uImage is loaded at 0x80008000. I have seen in many other boards the uImage is loaded at 32KB. Why is this mandatory to load uImage at 32KB offset? Please let me know. Thanks, Karthik.

Re: How controll is passed from uboot to kernel

2013-02-19 Thread Prabhakar Lad
Hi, On Sat, Feb 16, 2013 at 10:13 AM, Chetan C.R. wrote: > Hi All, > > I need to know how the control is passed from u-boot to kernel in Linux > operating system > Refer this link http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html for booting ARM. Regards, --Prabhakar http:

SIGKILL and a sleeping kernel module

2013-02-19 Thread Kevin Wilson
Hi all, I am trying to send a SIGKILL to a kernel module which is sleeping. I added a printk after the sleep command. Sending a SIGLKILL (by kill -9 SIGLKILL pidOfKernelThread) does **not** yield the message from printk("calling do_exit\n"); which is immediately after the msleep() command, as I ex