keyboard behavior change

2017-09-29 Thread John de la Garza
I have changed drivers/tty/vt/keyboard.c to allow me to use my return key (or any other key) as a control key if pressed with another key or simply as the return key when pressed and released. This only works in virtual consoles. I would like to figure out where to move this code to make it work

naming conventions

2017-07-22 Thread John de la Garza
Are there naming conventions that are preferred for functions? I'm seeing somethings named foo_free, free_foo, foo_init, init_foo, etc. Consistency provides names that are easy to guess/learn. examples from: linux/kernel/fork.c static void

Re: Minimum build config for boot messages

2016-08-22 Thread John de la Garza
On Fri, Aug 19, 2016 at 04:17:22PM +0200, Andre Schmidt wrote: > make ARCH=x86_64 allnoconfig > make all > qemu-system-x86_64 -kernel arch/x86/boot/bzImage > > Those commands above used to be enough, but now the produced kernel doesn't > print any messages on the qemu screen. > > With some

Re: unable to find function definition

2016-04-26 Thread John de la Garza
On Tue, Apr 26, 2016 at 02:00:02PM +0530, Jay Aurabind wrote: > On 20 April 2016 at 12:56, Cihangir Akturk wrote: > > On Wed, Apr 20, 2016 at 06:17:38AM +, Nijam Haider wrote: > >> i was going through the code leds-gpio.c. > >> i found a function "platform_gpio_blink_set"

Re: msleep() in interrupt handler?

2015-08-20 Thread John de la Garza
On Thu, Aug 20, 2015 at 01:45:34PM +0800, Woody Wu wrote: I did not see the message. Actually my interrupt handler is calling i2c_transfer which in turn used msleep() somewhere in its code. Is this normal or dangerous? Can you have the interrupt handler put the work on a workqueue and

Re: How do _you_ read the linux source?

2015-04-21 Thread John de la Garza
On Mon, Apr 20, 2015 at 05:46:57PM -0700, r0...@simplecpu.com wrote: I figured rather then trying to parse those and come up with a model that probably isn't true, I'd just directly ask. I dunno. Maybe its not an appropriate question for this mailing list. I appreciate the question and

Re: Achieve multi-threading in MIPS assembly

2015-04-21 Thread John de la Garza
On Mon, Apr 20, 2015 at 09:52:26PM -0400, valdis.kletni...@vt.edu wrote: On Tue, 21 Apr 2015 01:05:19 -, Chaturvedi, Akash said: I am writing MIPS assembly code for a 'Word guessing game'. Why? gcc -O2 will almost certainly generate faster code than you can (unless you're *really*

Re: Write and understand Assembly code in .S file for ARM

2015-04-20 Thread John de la Garza
On Sun, Apr 19, 2015 at 05:46:20PM +0530, harshkdev wrote: Hi, Please refer some online tutorials or pdf books to write and understand assembly code written in .S file. this helped me: http://thinkingeek.com/2013/01/09/arm-assembler-raspberry-pi-chapter-1/

Re: Kernel thread scheduling

2015-04-16 Thread John de la Garza
On Thu, Apr 16, 2015 at 10:56:46AM -0400, Ruben Safir wrote: I'm trying to find rb_node's structure and I can't find it with ctags or in the http://lxr.linux.no website. How do you search these things out? I run: make ctags run vim type: :ts rb_node then I scanned the

Re: cross-compiling kernel using a 32-bit toolchain on a 64-bit machine

2015-04-06 Thread John de la Garza
On Mon, Apr 06, 2015 at 03:50:41PM -0700, Mandeep Sandhu wrote: I'm having trouble compiling my kernel using a 32-bit toolchain (for ARM) on a 64-bit host (Ubuntu 14.10). The kernel version is 3.14.17. Any hints on how to get make to use the toolchain? after you export CROSS_COMPILE

Re: Perf API vs Ftrace

2015-03-02 Thread John de la Garza
On Tue, Mar 03, 2015 at 11:07:21AM +0530, sahil aggarwal wrote: Hi all Do anybody have experience using Perf API and Ftrace.? I am writing an application to profile a process and using Ftrace. But came to know that Perf provide API too so looking for some facts to benchmark efficiency.

Re: ACCESS_ONCE usage inside llist_add_batch function

2015-03-02 Thread John de la Garza
On Sat, Feb 28, 2015 at 10:12:23PM +0200, Cihangir Akturk wrote: Reading the lib/llist.c file in the kernel sources, I came across the llist_add_bach function defined like this; bool llist_add_batch(struct llist_node *new_first, struct llist_node *new_last, struct

Re: what should be a simple question about sysfs attributes ...

2015-02-01 Thread John de la Garza
On Fri, Jan 30, 2015 at 04:30:02AM -0800, Robert P. J. Day wrote: i'll try this one more time, but much more concisely. so far, i've seen two different ways to create a kobject's attributes and register callback routines for them: the first general way i've seen is in mm/ksm.c, where

Re: New member

2015-01-26 Thread John de la Garza
On Sun, Jan 25, 2015 at 08:10:15PM +, Anuz Pratap Singh Tomar wrote: On Sun, Jan 25, 2015 at 7:38 PM, srinivas bakki srinivas.ba...@gmail.com wrote: Valdis, You got to be polite with people.Not everybody is as smart as you, but they would like to contribute. Just keep in

Re: New member

2015-01-26 Thread John de la Garza
On Mon, Jan 26, 2015 at 01:46:26AM +0530, srinivas bakki wrote: Anuz, Sorry about that. But am also sorry that you could find a problem as silly as that. We have a greater problem at hand. I don't think top posting is a silly problem. I think it makes it hard to follow the thread

booting arm board

2015-01-11 Thread John de la Garza
I am trying to boot a foxg20 board. It uses an at91sam9g20 chip an used to work in linux 3.5. I am looking for some advice on how to get mainline linux to boot on it. I first tried bisecting and found this commit: 4cf3326ab5f34a333a46c59d0d3783db9cef13bf which is where it wouldn't boot I

Re: ternary vs double exclamation

2015-01-07 Thread John de la Garza
On Sun, Jan 04, 2015 at 04:50:58PM -0800, Greg KH wrote: On Sun, Jan 04, 2015 at 06:43:22PM -0500, John de la Garza wrote: I assume it is a bad idea to depend on true being 1, right? I mean, I should assume that true could be changed to any non 0 value in the future, right? Why would

Re: ternary vs double exclamation

2015-01-07 Thread John de la Garza
On Sun, Jan 04, 2015 at 08:17:15PM -0500, valdis.kletni...@vt.edu wrote: On Sun, 04 Jan 2015 18:43:22 -0500, John de la Garza said: On Sat, Jan 03, 2015 at 11:20:29PM -0500, valdis.kletni...@vt.edu wrote: On Sat, 03 Jan 2015 18:54:00 -0500, John de la Garza said: It should

Re: ternary vs double exclamation

2015-01-04 Thread John de la Garza
On Sat, Jan 03, 2015 at 11:20:29PM -0500, valdis.kletni...@vt.edu wrote: On Sat, 03 Jan 2015 18:54:00 -0500, John de la Garza said: It should not be assumed that true will always be 1 as defined in include/linux/stddef.h, right? No, I mean use an actual 'bool' type rather than 'int

Re: ternary vs double exclamation

2015-01-03 Thread John de la Garza
On Mon, Dec 29, 2014 at 08:00:08PM -0500, valdis.kletni...@vt.edu wrote: If you're *really* ambitious, converting stuff to use a boolean rather than an int where appropriate would be nice - we don't do that enough currently. But that will require actually reading and understanding the code.

Re: Doubt In Char Drivers

2014-12-29 Thread John de la Garza
On Mon, Dec 29, 2014 at 12:09:30AM +0530, me storage wrote: Hi All, I am following LDD3 for Char Drivers. So we writing a kernel module(char driver) after that creating a char file which is representation of Character Device. So my doubt is how we will communicate with real hardware device

Re: Stack register value in the kernel setup code

2014-12-24 Thread John de la Garza
On Wed, Dec 24, 2014 at 03:23:15PM +0600, Alexander Kuleshov wrote: Hello, I runn kernel with grub in qemu, connected with gdb and put break point to 0x10200 (to this jump - https://github.com/torvalds/linux/blob/master/arch/x86/boot/header.S#L297) What kernel version are you running?

Re: kobject sample code

2014-12-13 Thread John de la Garza
On Tue, Dec 09, 2014 at 10:26:03AM +0100, Paul Bolle wrote: On Mon, 2014-12-08 at 21:20 -0500, John de la Garza wrote: I'm looking at samples/kobject/kobject-example.c at line 39 foo is read: sscanf(buf, %du, foo); foo is an int so why is it read using %du not %d? My

kobject sample code

2014-12-08 Thread John de la Garza
I'm looking at samples/kobject/kobject-example.c at line 39 foo is read: sscanf(buf, %du, foo); foo is an int so why is it read using %du not %d? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org

lkml archive

2014-12-06 Thread John de la Garza
I'm trying to catch up on a thread here: https://lkml.org/lkml/2014/10/29/854 does anyone here use lkml.org to read kernel mailing list archives? If so, how does the threading on the left work? I click on a link then the whole list shrinks. I have noticed that somethings are not visible at the

Re: the cost of inlining?

2014-12-05 Thread John de la Garza
On Fri, Dec 05, 2014 at 10:35:13PM +, Jeff Haran wrote: John, Would you mind sharing what kernel version/distro you are using? john@vega:~$ cat /proc/version Linux version 3.18.0-rc7+ (john@vega) (gcc version 4.9.1 (Debian 4.9.1-16) ) #88 SMP Thu Dec 4 21:55:41 EST 2014 john@vega:~$

Re: the cost of inlining?

2014-12-04 Thread John de la Garza
On Fri, Dec 05, 2014 at 01:32:35AM +, Jeff Haran wrote: $ cat atomic_read.c #include asm/atomic.h #include asm/system.h int samp_atomic_read(atomic_t *v) { int val; val = atomic_read(v); return val; } I couldn't get it to build with the #inclue

Re: [PATCH] staging: rtl8723au: Fix brace coding style issues reported by checkpatch

2014-10-28 Thread John de la Garza
On Tue, Oct 28, 2014 at 12:39:17PM -0500, Greg Donald wrote: The WARNING line over 80 characters currently accounts for 216K of the total violations. IMHO checkpatch should just stop complaining about the 80 char limit since that's the main offender causing new kernel developers to

Re: [PATCH] staging: rtl8723au: Fix brace coding style issues reported by checkpatch

2014-10-28 Thread John de la Garza
On Tue, Oct 28, 2014 at 03:55:53PM -0500, Greg Donald wrote: On Tue, Oct 28, 2014 at 2:04 PM, John de la Garza j...@jjdev.com wrote: It seems like you assuming the limit is based on terminal size? Hmm, I thought it was because of 80 column punch cards and ancient printers that didn't wrap

Re: Kconfig options and make command line

2014-10-26 Thread John de la Garza
On Sun, Oct 26, 2014 at 09:25:01AM +0100, Peter Senna Tschudin wrote: Sorry for the noise. $ make allyesconfig drivers/staging/rtl8723au/ does the trick. that seems like overkill, why not just enable the CONFIG_8723AU_AP_MODE setting? ___

Re: i2c-dev

2014-10-26 Thread John de la Garza
On Thu, Oct 23, 2014 at 08:15:53PM +0200, Paul Bolle wrote: I'm afraid I can't really help you here, sorry. That is, except for the obvious question whether this is a regression (ie, do releases v3.17 or earlier show something in /sys/bus/i2c/devices/?) or a configuration issue (perhaps a

i2c-dev

2014-10-21 Thread John de la Garza
I have my kernel built with dev-i2c and i2c_i801 but do not have a /dev entry. lspci shows this: 00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06) dmesg shows this: [1.566003] i801_smbus :00:1f.3: enabling device ( - 0003) ls

Re: [PATCH] staging: Fix spacing between function name and parentheses

2014-10-14 Thread John de la Garza
On Tue, Oct 14, 2014 at 03:38:55PM +, Adrian Cornish wrote: What is wrong with you people - were you never on nntp and learned how to ignore trolls? This is what I have been thinking ___ Kernelnewbies mailing list

Re: Linux kernel Network Programing

2014-10-01 Thread John de la Garza
On Wed, Oct 01, 2014 at 03:07:46PM +0530, Mohit Varma wrote: I know a book ...linux kernel network programming which will help me get started. Are there any more books which can help me. there are some great reads here: http://haifux.org/rami_rosen.html this guy also has a recent book on:

Re: How do we determine IP Address of interface the packet arrived on

2014-09-24 Thread John de la Garza
On Wed, Sep 24, 2014 at 10:41:54AM +0300, Vlad Dogaru wrote: On Wed, Sep 24, 2014 at 10:19:34AM +0530, Maninder Singh wrote: Hi, Each time a packet arrives at a router in a subnet during transit, I need to determine the IP address of the incoming interface of the router for that

Re: console fonts

2014-09-20 Thread John de la Garza
On Fri, Sep 19, 2014 at 08:12:23PM -0700, Greg KH wrote: the kernel EFI framebuffer driver is odd, and probably can not support your console fonts. I know mine can not, sorry. When the machine first starts loading the kernel it swtiches from the tiny fonts that gummiboot uses to the Sparc

Re: console fonts

2014-09-20 Thread John de la Garza
On Sat, Sep 20, 2014 at 07:41:17AM -0700, Greg KH wrote: Good luck, and let us know if you get this working, as my machines would like to see it happen as well, but I don't know if it is possible. It is possible! I just got it working the way I want. I saw that the kernel messages where

console fonts

2014-09-19 Thread John de la Garza
When I boot up I see the 12x22 fonts for a while then it switches to the tiny fonts default font about half way throught the boot process. My goal is to have the system running with the 12x22 fonts. I do not plan to run X. Does anyone know how why it swtiches away from my custom fonts ?

Re: A quick guide to why stand-alone checkpatch patches suck...

2014-09-17 Thread John de la Garza
On Wed, Sep 17, 2014 at 05:13:58PM +, Bruno Guedes Souto wrote: This was a great discussion, until you guys started feeding the troll again. It seems like a lot of people here don't get it and continue to keep basically repeating themselves. ___

Re: Resources to teach from C to Kernel Development?

2014-09-02 Thread John de la Garza
On Thu, Aug 28, 2014 at 08:49:01PM +0100, Ed Holmes wrote: Can you recommend me any books or online resources to teach a C programmer Kernel development? I can program in C but I don't really know where to go from there. I've tried the Eucalyptus challenge but it just suggests things to

cdev_init and struct file_operations

2014-08-26 Thread John de la Garza
In the book Linux Device Drivers a struct cdev is setup like this: static void scull_setup_cdev(struct scull_dev *dev, int index) { int err, devno = MKDEV(scull_major, scull_minor + index); cdev_init(dev-cdev, scull_fops); dev-cdev.owner = THIS_MODULE; dev-cdev.ops =

serial console in early boot

2014-08-24 Thread John de la Garza
I'm using qemu like this: qemu -nographic -kernel /home/john/dev-linux/arch/x86/boot/bzImage \ -append console=ttyS0 I noticed that I can do a printk in arch/x86/kernel/head64.c right after the call to clear_bss (line 162 in x86_64_start_kernel). I see the output of the printk on the serial

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

2014-07-16 Thread John de la Garza
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 directly being used by the user side code via misc interface. . Now when I am unloading module A, via modprobe -r A it is also unloading the module B

Re: pow calculation in kernel

2014-06-19 Thread John de la Garza
On Fri, Jun 20, 2014 at 09:55:02AM +0800, 张晗 wrote: Hi: I am doing a research on D2TCP(http://dl.acm.org/citation.cfm?id=2342388), I just want to implement it into the linux kernel. When calculating the penalty function, it is p = a^d, where 0 a 1 and 0 d 1. Since the kernel only

Re: Man pages for Kernel API

2014-06-03 Thread John de la Garza
On Tue, Jun 03, 2014 at 10:12:24AM +0530, Dipanjan Das wrote: Hi, Like there is section #2 of man pages dedicated to syscalls, is there any official way to get the list of all supported Kernal APIs? check out the man page for man itself (man man) look for this: 9 Kernel routines [Non

Re: Completely open sourced ARM board

2014-05-30 Thread John de la Garza
On Fri, May 30, 2014 at 02:13:14PM +0530, Saurabh Jain wrote: Hello every one ! I am learning how to customize Linux kernel to make it portable on embedded systems. To test my customized kernel , i want a completely open sourced ARM board . I listened about Raspberry pi but it's firmware

Re: Writing kernel in C

2014-05-26 Thread John de la Garza
On Mon, May 26, 2014 at 05:19:59PM +0530, Saurabh Jain wrote: Hello every one ! I want to make a new kernel in C for educational purpose . Any one can help me , from where i should start , any step by step guide to tell what i should do next ? This helped me:

Re: Update kernel source to latest?

2014-03-29 Thread John de la Garza
On Sun, Mar 30, 2014 at 05:55:00AM +0400, Max Filippov wrote: On Sun, Mar 30, 2014 at 4:51 AM, habisravi habi...@gmail.com wrote: I cloned the linux kernel source from git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git. When i type git tag in the source folder i see version

Re: How to use pr_debug

2014-02-26 Thread John de la Garza
On Wed, Feb 26, 2014 at 11:35:23AM -0800, m silverstri wrote: I am using 'pr_debug()' to print debug statements. But I don't see anything in my serial console. But when I use pr_info(), I see the debug statements. Do I need to do anything to see pr_debug()? add this to the top of the file

Re: Kernel Development

2014-02-23 Thread John de la Garza
On Sun, Feb 23, 2014 at 10:54:31PM +0530, subham soni wrote: Hello, I am a newbie to kernel development. I would like to develop my own kernel from scratch. From where should I start from? http://www.jamesmolloy.co.uk/tutorial_html/ ___

Re: Verify checksum of IP header and TCP header

2014-02-11 Thread John de la Garza
On Tue, Feb 11, 2014 at 03:03:42PM -0500, Guibin(Bill) Tian wrote: Hi, I am looking for the code in linux kernel that verifies the checksum of TCP header and IP header for inbound packet. The packet supposes to be dropped if the checksum doesn't match. Here is some code that checks the TCP

Bug 12665

2013-12-16 Thread John de la Garza
I found a bug that appears to be simple to fix. I assume I am missing something. here is a link to the bug description: https://bugzilla.kernel.org/show_bug.cgi?id=12665 the man page for the function in the bug report mentions that linux does not impliment the desired functionality It seems