Re: sanity check typo patch "quired"

2024-07-01 Thread daniel watson


Thanks!

"Ricardo B. Marliere"  writes:
> From a quick glance at the git blame, seems that "docs: admin-guide:
> ..." or ever "docs/admin-guide/mm" should suit better. Perhaps mention
> in the subject line that its a typo fix aswell.

I ended up going with this subject:

Subject: [PATCH] docs/admin-guide/mm: correct typo 'quired' to 'queried'

after reviewing the prior commit first lines.



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


sanity check typo patch "quired"

2024-06-26 Thread daniel watson


here's a patch to fix a typo in the memory management docs.  i'm
sending to this mailing list first for a sanity check.



From: Daniel Watson 
To: Jonathan Corbet 
,linux-...@vger.kernel.org,linux-ker...@vger.kernel.org
Date: Wed, 26 Jun 2024 21:18:22 -0700
Subject: [PATCH] mm: docs: correct 'quired' to 'queried'

Convert from the word "quired" to the word "queried" which makes more
sense in this context.

Signed-off-by: Daniel Watson 
---
 Documentation/admin-guide/mm/index.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/admin-guide/mm/index.rst 
b/Documentation/admin-guide/mm/index.rst
index 1f883abf3f00f..8b35795b664be 100644
--- a/Documentation/admin-guide/mm/index.rst
+++ b/Documentation/admin-guide/mm/index.rst
@@ -10,7 +10,7 @@ processes address space and many other cool things.
 
 Linux memory management is a complex system with many configurable
 settings. Most of these settings are available via ``/proc``
-filesystem and can be quired and adjusted using ``sysctl``. These APIs
+filesystem and can be queried and adjusted using ``sysctl``. These APIs
 are described in Documentation/admin-guide/sysctl/vm.rst and in `man 5 proc`_.
 
 .. _man 5 proc: http://man7.org/linux/man-pages/man5/proc.5.html
-- 
2.43.0

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


Fwd: Mail delivery failed: returning message to sender

2024-03-24 Thread daniel watson
my reply to the confirmation email for subscribing to this mailing list
failed.  my account was confirmed by visiting the url instead.

it seems like the "just reply to this email" option is broken.
hope this helps!

Mail Delivery System  writes:

> This message was created automatically by mail delivery software.
>
> A message that you sent could not be delivered to one or more of its
> recipients. This is a permanent error. The following address(es) failed:
>
>   
> kernelnewbies-confirm+dad8ab63e98c6c9aaa9b98b31156bcabb0d31...@kernelnewbies.org
>
> Reporting-MTA: dns; shelob.surriel.com
>
> Action: failed
> Final-Recipient: 
> rfc822;kernelnewbies-confirm+dad8ab63e98c6c9aaa9b98b31156bcabb0d31...@kernelnewbies.org
> Status: 5.0.0
>
> From: daniel watson 
> Subject: Re: Your confirmation is required to join the Kernelnewbies mailing
>  list
> To: 
> kernelnewbies-confirm+dad8ab63e98c6c9aaa9b98b31156bcabb0d31...@kernelnewbies.org
> Date: Sun, 24 Mar 2024 07:11:56 -0700 (38 minutes, 20 seconds ago)
> Flags: seen, personal
> Maildir: /
>
>
> confirm dad8ab63e98c6c9aaa9b98b31156bcabb0d3127f
>
> kernelnewbies-confirm+dad8ab63e98c6c9aaa9b98b31156bcabb0d31...@kernelnewbies.org
>  writes:
>
>> Mailing list subscription confirmation notice for mailing list
>> Kernelnewbies
>>
>> We have received a request from 67.160.243.62 for subscription of your
>> email address, "ozz...@each.do", to the
>> kernelnewbies@kernelnewbies.org mailing list.  To confirm that you
>> want to be added to this mailing list, simply reply to this message,
>> keeping the Subject: header intact.  Or visit this web page:
>>
>> 
>> https://lists.kernelnewbies.org/mailman/confirm/kernelnewbies/dad8ab63e98c6c9aaa9b98b31156bcabb0d3127f
>>
>>
>> Or include the following line -- and only the following line -- in a
>> message to kernelnewbies-requ...@kernelnewbies.org:
>>
>> confirm dad8ab63e98c6c9aaa9b98b31156bcabb0d3127f
>>
>> Note that simply sending a `reply' to this message should work from
>> most mail readers, since that usually leaves the Subject: line in the
>> right form (additional "Re:" text in the Subject: is okay).
>>
>> If you do not wish to be subscribed to this list, please simply
>> disregard this message.  If you think you are being maliciously
>> subscribed to the list, or have any other questions, send them to
>> kernelnewbies-ow...@kernelnewbies.org.
>
> --


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


Re: screening patch here before sending to devs

2023-03-28 Thread Daniel Watson
that's exciting! that means i can read it to see what is involved.

thanks for prompting me to check on whether it was possible.

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


Re: screening patch here before sending to devs

2023-03-28 Thread Daniel Watson
On Tue, Mar 28, 2023 at 09:57:52AM +0200, Greg KH wrote:
> Are you sure that it is even possible to change this from the operating
> system while the system is running?  It might be restricted only to the
> BIOS settings.

it is possible! it has already been done.
https://lkml.org/lkml/2022/1/4/1160


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


Re: screening patch here before sending to devs

2023-03-28 Thread Daniel Watson
On Tue, Mar 28, 2023 at 09:03:17AM +0200, Lukas Bulwahn wrote:
> Hi Daniel,
Hi! thanks for pre-reviewing!
> 
> Sometimes patches show up multiple times in lore.kernel.org archives,
> as some mailing list add further footers, so the same content sent is
> recorded slightly differently in the archives, leading to multiple
> copies. This is not considered double posting, though, as it is
> default to send a patch to multiple mailing lists, e.g., specific
> subsystem mailing list and the general linux-kernel mailing list. As
> long as the message has the same Message-ID, it is clear they were
> sent with one "git send-email" invocation.
cool.  must be something wrong with gmail then. it's showing twice in my
gmail.  i'm not using git send-email, i'm using mutt configured to send
through gmail.

> Usually "{" would be written out as "opening brackets" or as "curly
> brackets", just having a special character, like "{", is not seen
> often in commit message subject lines.
noted, i've changed that.
> 
> Usually, consistency beats style. So, check if this pattern appears in
> any files in drivers/staging/rtl8723bs/ and its subdirectories and try
> to fix all instances within that directory with one patch.
earlier in the same file, the curly bracket appears on the opening line,
except for functions.

> Other than that, it looks like a good newcomer's first submission patch.
that's great!  i've sent it in with the changes.


i would like to work on my laptop battery's charge threshold. it can be
changed in the bios, but not while running. there's a project for doing
this on some thinkpads, but not the framework laptop. any pointers for
where to get more info about this would be greatly appreciated.

thanks again!

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


screening patch here before sending to devs

2023-03-27 Thread Daniel Watson
i am learning from guides like this
https://kernelnewbies.org/FirstKernelPatch#FirstPatch

i sent an earlier patch, but was told to skip the drivers/staging/media
directory.

is this an acceptable patch?

is this message double-posting? it looks like my prior message
shows up twice.

thanks!

To: Greg Kroah-Hartman 
,linux-stag...@lists.linux.dev,linux-ker...@vger.kernel.org
Subject: [PATCH] staging: rtl8723bs: move { onto opening line of if

Checkpatch flagged this as a fixable style error.

Signed-off-by: Daniel Watson 
---
 drivers/staging/rtl8723bs/include/rtw_recv.h | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/rtw_recv.h 
b/drivers/staging/rtl8723bs/include/rtw_recv.h
index 44f67103503ae..fef2fd0e8c84f 100644
--- a/drivers/staging/rtl8723bs/include/rtw_recv.h
+++ b/drivers/staging/rtl8723bs/include/rtw_recv.h
@@ -398,8 +398,7 @@ static inline u8 *recvframe_pull(union recv_frame 
*precvframe, signed int sz)
 
precvframe->u.hdr.rx_data += sz;
 
-   if (precvframe->u.hdr.rx_data > precvframe->u.hdr.rx_tail)
-   {
+   if (precvframe->u.hdr.rx_data > precvframe->u.hdr.rx_tail) {
precvframe->u.hdr.rx_data -= sz;
return NULL;
}
@@ -425,8 +424,7 @@ static inline u8 *recvframe_put(union recv_frame 
*precvframe, signed int sz)
 
precvframe->u.hdr.rx_tail += sz;
 
-   if (precvframe->u.hdr.rx_tail > precvframe->u.hdr.rx_end)
-   {
+   if (precvframe->u.hdr.rx_tail > precvframe->u.hdr.rx_end) {
precvframe->u.hdr.rx_tail = prev_rx_tail;
return NULL;
}
@@ -451,8 +449,7 @@ static inline u8 *recvframe_pull_tail(union recv_frame 
*precvframe, signed int s
 
precvframe->u.hdr.rx_tail -= sz;
 
-   if (precvframe->u.hdr.rx_tail < precvframe->u.hdr.rx_data)
-   {
+   if (precvframe->u.hdr.rx_tail < precvframe->u.hdr.rx_data) {
precvframe->u.hdr.rx_tail += sz;
return NULL;
}
-- 
2.34.1


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


Re: Time: new clocksource

2021-12-05 Thread Daniel Lezcano
On 06/12/2021 07:00, Muni Sekhar wrote:
> On Sat, Dec 4, 2021 at 3:18 AM Daniel Lezcano  
> wrote:
>>
>> Hi Sekhar,
>>
>> On 03/12/2021 17:50, Muni Sekhar wrote:
>>> Hi All,
>>>
>>> We have a Digital PLL with 64 bit timer counter hardware and the
>>> counter is accessible from the CPU over the PCIe bus.
>>>
>>> Is it possible to add this timer counter hardware as new clocksource
>>> driver? To do this, can someone please point me to the existing
>>> reference source code(or patch) for this task.
>>
>> You can refer to the drivers located in drivers/clocksource
> I don't see the option in menuconfig to build the clocksource driver
> as a loadable kernel module, for example CONFIG_X86_PM_TIMER=m instead
> of CONFIG_X86_PM_TIMER=y.
> So a clocksource driver should always be part of the kernel built-in
> module?

Yes, that is the case today.

> If so, what's the reason for that?

The timer is a component needed at boot time, so a module version does
really not make sense.

So I would return back the question : what is the reason for a module?


>> git annotate on one of the driver can give you the initial commit where
>> recent submissions explain the timer internals.
>>
>>> Suppose if it is possible to add a new clocksource driver for this
>>> hardware then does any userspace get_timestamp* API would get the time
>>> from this new hardware?
>>
>> It should if the timer is selected as the clocksource
>>
>>
>> --
>> <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
>>
>> Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
>> <http://twitter.com/#!/linaroorg> Twitter |
>> <http://www.linaro.org/linaro-blog/> Blog
> 
> 
> 


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

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


Re: Time: new clocksource

2021-12-03 Thread Daniel Lezcano
Hi Sekhar,

On 03/12/2021 17:50, Muni Sekhar wrote:
> Hi All,
> 
> We have a Digital PLL with 64 bit timer counter hardware and the
> counter is accessible from the CPU over the PCIe bus.
> 
> Is it possible to add this timer counter hardware as new clocksource
> driver? To do this, can someone please point me to the existing
> reference source code(or patch) for this task.

You can refer to the drivers located in drivers/clocksource

git annotate on one of the driver can give you the initial commit where
recent submissions explain the timer internals.

> Suppose if it is possible to add a new clocksource driver for this
> hardware then does any userspace get_timestamp* API would get the time
> from this new hardware?

It should if the timer is selected as the clocksource


-- 
 Linaro.org │ Open source software for ARM SoCs

Follow Linaro:   Facebook |
 Twitter |
 Blog

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


how do you find the subsystem of a file?

2021-08-30 Thread daniel watson
i wrote a patch that got rejected because it did not apply cleanly to
the tree of greg kh
https://lkml.org/lkml/2021/8/18/304

the file i modified is
drivers/staging/rtl8723bs/include/rtl8192c_recv.h

get_maintainer.pl gave me the list of emails to send the patch to,
and i used it for that purpose.  the file
Documentation/process/submitting-patches.rst says to see the T: entry
for the subsystem in MAINTAINERS to find the right tree to base the
patch on.  i tried searching through MAINTAINERS and found that there
are a few subsystems that start with RTL8*.

greg kh is listed a few times in MAINTAINERS, so i'm not able to find
the exact tree to start with by looking for the maintainer.

is there a systematic way of finding the subsystem, given a file?

in addition, how do i know what branch to use?  the T: entries have a
repo, but not a branch name.

thanks!
:wq, danny

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


surround complex macros in ()

2021-08-26 Thread daniel watson
let me know if this is the right place to ask.

i recently tried to make a commit adding parentheses around a macro
value.

https://lore.kernel.org/linux-staging/20210817043038.ga9...@challenge-bot.com/

it was rejected as "This is not a real change that is needed."

at first, i thought this meant that the code would be identical with and
without parentheses surrounding a complex macro's definition, when the
macro is just typecasting an expression.  but then i came up with code
where having parens or not changes the meaning of the code.

---delete-me.c
#define with ((int)a)
#define sans (int)a

void main(void){
  int b = 0;
  with++;
  sans++;
}
---delete-me.c

---terminal
$ gcc -o delete-me delete-me.c 
delete-me.c: In function ‘main’:
delete-me.c:7:7: error: lvalue required as increment operand
7 |   with++;
  |   ^~
---terminal

the compiler complains about the macro defined with parentheses, and
does not have a problem with the other macro defined sans parentheses.
this is only a compile time difference, and maybe that's the only
possible difference that could be made by the parentheses.

i'm curious if there's a way to know for sure that there exists no
possible expression with such a macro in it that would cause a more
subtle difference.  for example, how do i rule out the possibility
that the code could compile and have a different value than expected
at runtime?


as a side note, i signed up for the kernelnewbies mailing list, and i do
not see any messages in my inbox, except a reply to a message i sent
out.  i checked here
in some expression
http://lists.kernelnewbies.org/pipermail/kernelnewbies/

and do not see the message i sent, or the reply to it.

am i seeing the right thing?  did i sign up correctly?  is that the
right page to view the mailing list messages online?


thanks!

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


Re: how do you find the subsystem of a file?

2021-08-21 Thread daniel watson
On Sat, Aug 21, 2021 at 12:30:27AM -0700, daniel watson wrote:
> i wrote a patch that got rejected because it did not apply cleanly to
> the tree of greg kh
> https://lkml.org/lkml/2021/8/18/304
> 
> the file i modified is
> drivers/staging/rtl8723bs/include/rtl8192c_recv.h
> 
> get_maintainer.pl gave me the list of emails to send the patch to,
> and i used it for that purpose.  the file
> Documentation/process/submitting-patches.rst says to see the T: entry
> for the subsystem in MAINTAINERS to find the right tree to base the
> patch on.  i tried searching through MAINTAINERS and found that there
> are a few subsystems that start with RTL8*.
> 
> greg kh is listed a few times in MAINTAINERS, so i'm not able to find
> the exact tree to start with by looking for the maintainer.
> 
> is there a systematic way of finding the subsystem, given a file?
> 
> in addition, how do i know what branch to use?  the T: entries have a
> repo, but not a branch name.
> 
> thanks!
> :wq, danny

answering my own question,

the output of

git log --oneline -1 

should have the subsystem listed at the beginning.

thanks!

C-x C-c, danny

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


Re: How to make /dev/ttyACM0 (and friends) exclusive?

2020-10-10 Thread Daniel Santos
Hello!

I'm not subscribed to this list, but I thought I would resurrect this
old thread, as I ran across it on the web.

> On Mon, 04 Mar 2019 16:38:44 +0100, Yann Droneaud said:
>
> > O_EXCL is intended to be used to prevent opening an existing file. Said
> > differently, it's used to ensure a new file is created, useful to
> > prevent race condition, where multiple processes compete to create a
> > file. For example think of temporary file created with random name.
>
> Which means that if you're trying to regulate exclusive use of a character
> device or similar, you use O_EXCL|O_CREAT to create a lock file, and
make sure
> that all the programs competing for the character device use the same
pathname
> to create the lock file - which has been a tried-and-true way of handling
> exclusive locking for serial ports for 4 decades now.
>
> The fact that 'strings /usr/sbin/ModemManager | grep /' proves pretty
clearly
> that ModemManager is trusting DBus to keep track of things rather than
using
> lock files on the modems is almost certainly part of the reason it's a
steaming
> pile of dingo's kidneys rather than a helpful piece of software.

My solution to this particular dingo terd is this:

cat << EOF >> /var/udev/rules.d/81-ttyUSB_ACM_no_mm.rules
KERNEL=="ttyUSB[0-9]*", ENV{ID_MM_DEVICE_IGNORE}="1"
KERNEL=="ttyACM[0-9]*", ENV{ID_MM_DEVICE_IGNORE}="1"
EOF

Very evil indeed.  I have a lot of strange devices attached to serial
ports or emulating USB CDC ACM devices, and this cost me a lot of time. 
The funny thing is that I went CDC ACM (on one device) instead of raw
URBs because I thought it would save me time, but I spent much longer
trying to figure this out than I saved.

Daniel

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


Re: Could we use jprobe to skip kprboed function

2019-02-26 Thread Daniel Baluta
On Tue, Feb 26, 2019 at 11:59 AM wuzhouhui  wrote:
>
> Hi,
>
> The documentation of jprobe says that we must call jprobe_return()
> before return. I'm wondering what if we don't call jprobe_return, and
> could we use it to skip probed function?

Hi,

Please keep in mind the jprobe is likely to be removed unless it was already.

https://lwn.net/Articles/735667/

thanks,
daniel.

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


Re: Problem of compiling linux2.6.11.12 kernel

2018-08-05 Thread Daniel.
Try with gcc 4 you may get it from AUR

Em dom, 5 de ago de 2018 23:07, He Huanyu  escreveu:

> As you know,4.x version is so complex. And
> it‘s difficult to read the source code for newbies like me.
>
> Of course one of the most important reasons is that I am reading
> 《UNDERSTANDING THE LINUX KERNEL》 :)  And it’s for 2.6.11 version. I am
> thinking about build a environment to practice.
>
> On 08/06/2018 05:36, valdis.kletnieks  wrote:
>
> On Mon, 06 Aug 2018 01:10:40 +0800, "He Huanyu" said:
>
> > linux 4.16.9-1-ARCH
> > gcc (GCC) 8.1.1 20180531
> > GNU ld (GNU Binutils) 2.30
>
> > And I get a problem like this, don't know if it is because of the
> version of gcc or ld:
>
> The problem is the version of Linux.  2.6.11 probably won't build with gcc
> 8.
>
> Why are you trying to build 2.6.11 if you have 4.16 available? That dates
> to June 2005,
> and is only of interest to software archaeologists.
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: what network driver routines are invoked via "ifup" and "ifdown"?

2018-07-31 Thread Daniel.
I guess you're looking for net_device_ops
https://elixir.bootlin.com/linux/latest/source/include/linux/netdevice.h#L874
Follow the comments, the definition is following it!

Regards,

2018-07-31 9:35 GMT-03:00 :

>
>   first time poking around network drivers, and i'm wondering what
> platform driver routines are called when invoking ifup/ifdown from
> user space (if any). i'm *assuming* (possibly incorrectly) that the
> probe() and remove() routines are invoked only on loading and
> unloading the driver, not simple ifup and ifdown.
>
>   guidance, anyone?
>
> rday
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
“If you're going to try, go all the way. Otherwise, don't even start. ..."
  Charles Bukowski
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Kernel API's for ADC

2018-07-25 Thread Daniel Baluta
On Wed, Jul 25, 2018 at 1:25 PM, chandrasekhar  wrote:
> Hi,
>
>
>
> Are there any kernel API's for ADC. I am using NXP IMX6UL processor. I have
> to read ADC values in kernel space instead of sysfs/userspace.

It depends on the type of driver used. Either input or IIO.

The sysfs interface for IIO is described here:

https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-iio


thanks,
Daniel.

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


Re: Need Suggestions

2018-07-18 Thread Daniel.
>
> It's OK.. just remember to trim out the non-important stuff next time. :)
>

Okay! Thanks!

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


Re: Need Suggestions

2018-07-18 Thread Daniel.
Em qua, 18 de jul de 2018 20:10,  escreveu:

> On Wed, 18 Jul 2018 14:29:41 -0700, Dave Stevens said:
> > On Wed, 18 Jul 2018 18:19:05 -0300 "Daniel." 
> wrote:
> >
> > > > Hi Athul...
> > > > This is my collegemate's writing, ... This will solve all your
> > > > confusions
> > > >
> >
> > is it the policy on this list to trim?
>
> Only the irrelevant parts, leave the parts that are the context for the
> reply.
> So that *should* have been trimmed down to:
>
> ---
> > 4) Without hesitation buy, Robert Love's Linux Kernel Programming book.
> It is
> > one of the best beginner material and start reading it parallel to the
> OS book.
> > This is easier to read than the previous one and more practical. But the
> > previous one adds more value and is more theoretical. Handle (3) and (4)
> in
> > parallel without blocking on any of the other activities.
>
> I can confirm, this book is GOOD! Also check LDD3,  it's open and
> online
> available, you may find some of it's authors in this mailist! :-). http://
> www.makelinux.net/ldd3/ it's a outdated but it was a very valuable source
> to
> me. You can find the examples updated on the internet.
> ---
>
> Also, MUAs the encourage top-posting and allowing quoting without a '> ' or
> other indicator of quoting depth are a pox on email.
>

Sorry. Do I did something bad? I wasn't intended to.. I didn't think that
trimming was a bad idea, I just want to reinforce the book suggestion ...
Sorry

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


Re: Need Suggestions

2018-07-18 Thread Daniel.
2018-07-18 1:39 GMT-03:00 inventsekar :

> Hi Athul...
> This is my collegemate's writing, ... This will solve all your
> confusions
>
> ---
>
> The most important quality that you need to inculcate if you want to do
> any kernel space programming is "Patience" (or persistence if you will).
> Though it is a good quality for any large scale project, it is a
> fundamental requirement for kernel programming. It is very easy to see
> progress and make an impact on userspace projects, but even simple changes
> in the kernel core will take a lot of time to get accepted, and will often
> require multiple rewrites. But fear not, as there are plenty of people who
> have conquered this mountain and it is not something to be worried about.
>
> The starting steps will be:
>
> 1) Try to understand how to use git . We were (are
> ?) not taught to use a version control system in our college and it is such
> a fundamental thing. So start using git for college assignments and get the
> hang of it.
>
> 2) Start writing a lot of C programs and get experienced with pointers,
> memory allocation, threading. You can start implementing things like Stack,
> Queue, Trees etc. (whatever you study in datastructures) in a simple,
> thread-safe way. Do not focus on how you can visualize these datastructures
> but how you can effectively implement their functionality and thread
> safety. Use pthreads for threading. Do not use any library (like Glib) for
> giving you convenient datastructures (like Strings). Implement each of the
> things on your own. (But when you are writing code for a product, use a
> standard library always instead of re-inventing the wheel)
>
> Write these C programs on Linux and compile using gcc. In our college days
> we were using turboc on windows and I hope things have changed. Use a linux
> distro (fedora , debian
> , openSUSE , Gentoo
>  etc.) exclusively; Do not use Windows (at least
> for a while) to make yourself aware of the sysadmin, shell-scripting parts
> of linux, which will come in handy.
>
> 3) Grab a (any) book on Operating Systems theory and read it. The dinosaur
> book  by
> Silberschatz et. al. is a good start.
>
> 4) Without hesitation buy, Robert Love's Linux Kernel Programming
>  book. It is one of the
> best beginner material and start reading it parallel to the OS book. This
> is easier to read than the previous one and more practical. But the
> previous one adds more value and is more theoretical. Handle (3) and (4) in
> parallel without blocking on any of the other activities.
>
I can confirm, this book is GOOD! Also check LDD3,  it's open and
online available, you may find some of it's authors in this mailist! :-).
http://www.makelinux.net/ldd3/ it's a outdated but it was a very valuable
source to me. You can find the examples updated on the internet.

>
>
> 5) After you are done with (1) and (2), and feel sufficiently confident
> with C and pointers, grab the  linux kernel sources from
> http://git.kernel.org/ and try to build the sources yourself. http://
> kernelnewbies.org/KernelBuild should help. Learn how to install and boot
> with the kernel that you have built.
>
> 6.1) Subscribe to Kernel Newbies mailing list http://kernelnewbies.org/
> MailingList and read every mail, *even* if you do not understand most of
> it.
>
> 6.2) Watch: https://www.youtube.com/watch?v=LLBrBBImJt4
>
> 6.3) Subscribe to http://lwn.net RSS feeds.
>
> After this, you should be able to fix and send any trivial, documentation,
> staging fixes. Once you have done this and get the hang of the process, you
> will know how to send patches for any parts of the kernel.
>
> By this time, you would have found your areas of interest in kernel
> (filesystems, memory management, io scheduler, CPU scheduling etc.). You
> will then have to dig deeper in those particular areas, by:
> a) subscribing to the individual mailing lists (such as fs-devel
> , etc.)
> b) reading about the bug reports for the individual component
> c) finding the literature that is relevant for your subsystem (The linux
> memory management book
> Mel Gorman, etc).
>
> Three other non-technical things that I would recommend are:
>
> 1) Create a new email address and use that for all your open source
> activities. That way you do not miss any important updates from your
> friends.
>
> 2) Kernel programming will not give you big money in the short and medium
> term (at least in India). If your motivation is not excellence in
> engineering, but becoming popular or rich (it is not wrong btw) then you
> should focus on some other areas of programming (developing apps, websites,
> solving user problems, making meaning etc.).
>
> It will o

Re: Leaving I/O pressure with memory!? How to do it?

2018-07-06 Thread Daniel.
It does. The idea is creating the VM disks over a tmpfs filesystem o the
hypervisor. It will even persist over guest reboots, but not host reboots,
but no problem, I just need a blank machine for testing ansible runs.

The hypervisor rarely reboots. :)

Em sex, 6 de jul de 2018 11:38,  escreveu:

> On Fri, 06 Jul 2018 08:26:52 -0300, "Daniel." said:
>
> > I'll try using a disk on memory (residing on a tmpfs mount) for improving
> > this. Good idea!
>
> Of course, actually getting the data *onto* the tmpfs will involve a lot
> of I/O, and
> it doesn't really fix the problem (just moves it around) unless your tmpfs
> is
> basically R/O and persists across multiple ansible runs...
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Leaving I/O pressure with memory!? How to do it?

2018-07-06 Thread Daniel.
Valdis, what a valuable answer. It opened my eyes. I didn't take the most
important thing in account, caches only help in cache hit!

I'll try using a disk on memory (residing on a tmpfs mount) for improving
this. Good idea!

Thank you so much for sharing this with me!!!

Regards

Em 05/07/2018 10:21 PM,  escreveu:

On Thu, 05 Jul 2018 19:30:22 -0300, "Daniel." said:

> Sometime we have a machine that we work on and that is really really slow
> when doing I/O. I know that kernel will use memory to avoid doing I/O, and
> that it would be a kind of conservative in avoiding keep to much data on
> volatile memory susceptible to being lost on power failure. My question
is,
> how to do the opposite, and avoid I/O as much as possible, doesn't matter
> the risks?

You're trying to solve a problem that isn't the one you have

The way the kernel avoids I/O is if a read or write is done, it keeps a
copy in memory
in case another request uses that same data again.

On most filesystems, a userspace write doesn't go directly to disk - it just
goes into the in-memory cache as a "dirty" page, and gets written out to
disk
later by a separate kernel thread.  In other words, unless your system has
gone
off the deep end into thrashing, writes to disk generally won't block.

Meanwhile, if a userspace read finds the data in the cache, it will just
return the
data, and again not block. Usually, the only time a disk I/O will block is
if it does
a read that is *not* in the in-memory cache already.

The end result is that the effectiveness of the cache depends on what
percent of
the reads are already in there.  And now the bad news...


> I'm using a virtual machine to test some ansible playbooks, the machine is
> just a testing environment so it will be created again and again and
again.
> (And again). The playbook generates a lot of I/O, from yum installs, and
> another commands that inspect ISO images to create repositories,  ... it

Ansible is famous for generating *lots* of disk reads (for example,
'lineinfile' will
usually end up reading most/all of the file, especially if the expected
line isn't in there.
And if you're testing against a blank system, the line probably isn't in
there, so you have
to read the whole file...   And how many times do you have more than one
'lineinfile'
that hits the same file? Because that's the only time the in-memory cache
will help, the
second time the file is referenced.   And I'll bet you that reading ISO
images to create
repositories generates a lot of non-cacheable data - almost guaranteed
unless you read
the same ISO image more than once.  Similarly for yum installs - each RPM
will only be
read once, clogging the in-memory cache.


> Anyway. The idea is that the flushing thread enters as soon as possible
and
> that the blocking happens as late as possible so that I leave disks
working but
> avoid I/O blocking.

Unfortunately, that's not how it works.  If you want to avoid blocking, you
want to
maximize the cache hits (which is unfortunately *very* difficult on a
system install
or ansible run).

You might be able to generate some win by either using a pre-populated tmpfs
and/or using an SSD for the VM's disk.

And you may want to look at more drastic solutions - for instance, using an
NFS
mount from the hypervisor machine as the source for your ISOs and
repositories.
 Under some conditions, that can be faster than the VM doing I/O that then
has
to be hypervisor handled, adding to the overhead.  (This sort of thing is an
*old* trick, dating back to Sun systems in the 3/50 class that had 4M of
memory.  It was faster to put the  swap space on a SCSI Fujitsu Eagle disk
attached
to a 3/280 server and accessed over NFS over Ethernet than using the much
slower 100M "shebox" IDE drive that could be directly attached to a 3/50)
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Leaving I/O pressure with memory!? How to do it?

2018-07-05 Thread Daniel.
Hi everybody!

This is a long doubt mine. And usually I want to apply this to testing
machines that would not be a problem if crashed or destroyed at all. For
the cases where I don't really care about the risks. In another words, not
production at all.

Sometime we have a machine that we work on and that is really really slow
when doing I/O. I know that kernel will use memory to avoid doing I/O, and
that it would be a kind of conservative in avoiding keep to much data on
volatile memory susceptible to being lost on power failure. My question is,
how to do the opposite, and avoid I/O as much as possible, doesn't matter
the risks?

I'm using a virtual machine to test some ansible playbooks, the machine is
just a testing environment so it will be created again and again and again.
(And again). The playbook generates a lot of I/O, from yum installs, and
another commands that inspect ISO images to create repositories,  ... it
doesn't matter, the problem is that it is really slow and that it doesn't
contains any important data. What can I do to avoid I/O (by using memory)
as much as possible? And how can I measure if it worked?

What I'm doing is keeping vm.dirty_background_ratio to the default (10) and
setting vm.dirty_ratio to 90. From what I could grasp the first controls
when the kernel thread will be scheduled to flush data to disk, and the
second when the kernel will block I/O entirely. By the way, this is where
the I/O wait from `top` comes from?

Anyway. The idea is that the flushing thread enters as soon as possible and
that the blocking happens as late as possible so that I leave disks working
but avoid I/O blocking.

How can I measure I/O blocking? Is there any counter for that so I can
measure its frequency and compare before and after messing up with
dirty_ratio?

Regards,

-- 
“If you're going to try, go all the way. Otherwise, don't even start. ..."
  Charles Bukowski
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Will RT patches be merged in main line?

2018-05-29 Thread Daniel.
Valdis, thank you so much for that valuable answers!! There are some
clusters running asterisk and they
want RT kernels. I saw that there are RT kernels in the Centos
repository so they may be easy to install,
I guess that audio stuff need RT to avoid audio flickering, so I
started to read about it. The technical stuff can
be hard to grasp at first... thanks for helping me out!

Cheers,

2018-05-28 21:48 GMT-03:00  :
> On Mon, 28 May 2018 15:04:41 -0300, "Daniel." said:
>
>> Does the RT patches have been merged in the main line? or, They will
>> be merged at all?
>
> Much of it has already been merged, the patchset used to be like 3-4 times the
> size it is now.
>
>> The main benefit of RT kernel is that decreases the latency right?
>
> The point isn't to decrease the latency - realtime is about guaranteeing
> a given process sufficient resources during each specified time interval.
> Lowering the latency to open up more time is just one way to achieve that.
>
>> I read that it make all parts of the kernel preemptive, is this right?
>
> Well, that helps.  If the CPU is currently busy in a non-preemptive chunk
> of code in a filesystem for the next 25ms, and an RT task needs at least
> 10ms of time during the next 20ms or a robot is going to crash into a wall
> and halt an assembly line, you have a problem.
>
>> Why aren't these parts preemptive in the main line?
>> What is the impact of making these parts preemptive?
>>
>> My general concept is that RT kernel has decreased latency, but
>> increased overhead, ... is this right?
>
> And that's why most of the rest isn't merged.  It does add overhead and
> decreases total system throughput.  And for 98% of the people who swear
> up and down they need RT for their gaming/music/whatever, it turns out that
> the current soft-RT code in the kernel is quite sufficient.
>



-- 
“If you're going to try, go all the way. Otherwise, don't even start. ..."
  Charles Bukowski

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


Will RT patches be merged in main line?

2018-05-28 Thread Daniel.
Hi everybody.

Does the RT patches have been merged in the main line? or, They will
be merged at all?

I found the RT wiki at
https://wiki.linuxfoundation.org/realtime/documentation/technical_details/start
but can't find if the patches were merged.

Also I have some questions about RT benefits/drawbacks:

The main benefit of RT kernel is that decreases the latency right?
I read that it make all parts of the kernel preemptive, is this right?
Why aren't these parts preemptive in the main line?
What is the impact of making these parts preemptive?

My general concept is that RT kernel has decreased latency, but
increased overhead, ... is this right?

Regards,

-- 
“If you're going to try, go all the way. Otherwise, don't even start. ..."
  Charles Bukowski

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


Re: New to the Kernel Newbie

2018-05-21 Thread Daniel Baluta
Hi,

You can have a look at our Linux kernel labs:

https://linux-kernel-labs.github.io/master/

For example, start with a short introduction to Linux kernel:

https://linux-kernel-labs.github.io/master/labs/introduction.html

then create a simple kernel module:

https://linux-kernel-labs.github.io/master/labs/kernel_modules.html

Hope this helps.

thanks,
Daniel.


On Mon, May 21, 2018 at 12:24 PM, Janakiramireddy Tamma
 wrote:
> Hello,
>
> I am completely new to the kernel newbie, can some one help me where can I
> get started.
>
> Thanks
> Janaki Rami Reddy
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

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


Re: Add IIO example to the kernelnewbies wiki

2018-05-09 Thread Daniel Baluta
Sure, you can do that. Nice to see that you are using Diolan DLN-2 adapter.

thanks,
Daniel.

On Mon, Apr 2, 2018 at 8:06 PM, Gaston Gonzalez  wrote:
> Hi,
>
> I'm testing an AD7746 eval board using a Diolan DLN-2 adapter. I wrote
> some basic notes about the installation an instanciation process for my
> own use. But then I thought it could be useful for someone else. So
> maybe I could put this in the kernel newbies page under the IIO section?
>
> If you think is worth it, I would be glad to add it to the wiki page.
>
> Best regards,
>
> Gaston
>
> Notes:
>
> The setup
> =
>
> AD7746-EVAL BOARD --> Diolan DLN-2 Adapter --> Thinkpad T430
>
> The connection between the AD7746 eval board and adapter is as detailed
> in [2] I2C Interface Configuration Options, External connection (pag 4).
>
> The connection between Diolan DLN-2 and the T430 is USB straighforward.
>
> Drivers
> ===
>
> Both in mainline kernel:
>
>  - Diolan DLN-2 driver: I2C_DLN2 (prompt Diolan DLN-2 USB I2C adapter)
> Loc: drivers/i2c/busses/
>  - AD7746: AD7746
> Loc: drivers/staging/iio/cdc/
>
> Bus of interest
> ===
>
>  $  sudo i2cdetect -l
>
> We get something like:
>
>  ...
>  i2c-10  i2c dln2-i2c-1-1.2:1.0-0I2C adapter
>  ...
>
> So our bus is the number 10.
>
> Getting the address
> ===
>
>  $ sudo i2cdetect -y -r 10
>
> We get something like:
>
>   0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
> 00:  -- -- -- -- -- -- -- -- -- -- -- -- --
> 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
> 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> 70: -- -- -- -- -- -- -- --
>
> 3. Device instantiation:
>
>  # echo add7746 0x48 > /sys/bus/i2c/devices/i2c-10/new_device
>
> We must see something like:
>
> $ cd /sys/bus/i2c/devices/i2c-10/10-0048/
> $ ls
> driver  iio:device0  modalias  name  power  subsystem  uevent
>
> $ cd iio:device0
> $ ls
> dev  in_capacitance-capacitance_calibbias
> in_capacitance0_calibbias_calibration
> in_capacitance-capacitance_sampling_frequency
> in_capacitance0_calibscale   in_capacitance-capacitance_scale
> in_capacitance0_calibscale_calibration   in_capacitance_sampling_frequency
> in_capacitance0-capacitance2_calibscale  
> in_capacitance_sampling_frequency_available
> in_capacitance0-capacitance2_offset  in_capacitance_scale
> in_capacitance0-capacitance2_raw in_temp0_input
> in_capacitance0_offset   in_temp1_input
> in_capacitance0_raw  in_voltage0_calibscale_calibration
> in_capacitance1_calibbias_calibrationin_voltage0_raw
> in_capacitance1_calibscale   in_voltage1_supply_raw
> in_capacitance1_calibscale_calibration   in_voltage_sampling_frequency
> in_capacitance1-capacitance3_calibscale  
> in_voltage_sampling_frequency_available
> in_capacitance1-capacitance3_offset  in_voltage_scale
> in_capacitance1-capacitance3_raw name
> in_capacitance1_offset   power
> in_capacitance1_raw  subsystem
> in_capacitance_calibbias uevent
>
> Checking the permits:
>
> $ ll
> -r--r--r-- 1 root root 4096 mar 31 09:57 dev
> --w--- 1 root root 4096 mar 31 09:57 in_capacitance0_calibbias_calibration
> -rw-r--r-- 1 root root 4096 mar 31 09:57 in_capacitance0_calibscale
> --w--- 1 root root 4096 mar 31 09:57 
> in_capacitance0_calibscale_calibration
> -rw-r--r-- 1 root root 4096 mar 31 09:57 
> in_capacitance0-capacitance2_calibscale
> -rw-r--r-- 1 root root 4096 mar 31 09:57 in_capacitance0-capacitance2_offset
> -rw-r--r-- 1 root root 4096 mar 31 09:57 in_capacitance0-capacitance2_raw
> -rw-r--r-- 1 root root 4096 mar 31 09:57 in_capacitance0_offset
> -rw-r--r-- 1 root root 4096 mar 31 09:57 in_capacitance0_raw
> --w--- 1 root root 4096 mar 31 09:57 in_capacitance1_calibbias_calibration
> -rw-r--r-- 1 root root 4096 mar 31 09:57 in_capacitance1_calibscale
> --w--- 1 root root 4096 mar 31 09:57 
> in_capacitance1_calibscale_calibration
> -rw-r--r-- 1 root root 4096 mar 31 09:57 
> in_capacitance1-capacitance3_calibscale
> -rw-r--r-- 1 root root 4096 mar 31 09:57 in_capacitance1-capacitance3_offset
> -rw-r--r-- 1 root root 4096 mar 31 09:57 in_capacitance1-capacitance3_raw
> -rw-r--r-- 1 root root 4096 mar 31 09:57 in_capacitance1_offse

Re: Building separate files for a kernel module

2018-04-18 Thread Daniel.
AFAIK if foo is GPL, you can't link bar to it except if it's GPL to. Doing
so would be license breaking. If foo is not GPL, you are tainting your
kernel and would be hard to get help with a tainted kernel.

2018-04-09 14:19 GMT-03:00 Martin Galvan :

> 2018-04-05 12:02 GMT-03:00 Greg KH :
> > On Thu, Apr 05, 2018 at 11:49:36AM -0300, Martin Galvan wrote:
> >> I want my module to be DKMS-enabled, but since the 'bar' binaries
> >> don't use anything Linux-specific I don't want to distribute the
> >> sources for it.
> >
> > Hahaha, good luck, please discuss this with a lawyer as to the
> > legalities involved.  You are on your own here.
>
> You're right, and I apologize if this practice is frowned upon. I just
> assumed it wasn't since the kbuild docs mention ways for having binary
> blobs included with kernel modules.
>
> Thanks for the answer.
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
“If you're going to try, go all the way. Otherwise, don't even start. ..."
  Charles Bukowski
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Building separate files for a kernel module

2018-04-18 Thread Daniel.
except if it's GPL too*

2018-04-18 12:57 GMT-03:00 Daniel. :

> AFAIK if foo is GPL, you can't link bar to it except if it's GPL to. Doing
> so would be license breaking. If foo is not GPL, you are tainting your
> kernel and would be hard to get help with a tainted kernel.
>
> 2018-04-09 14:19 GMT-03:00 Martin Galvan :
>
>> 2018-04-05 12:02 GMT-03:00 Greg KH :
>> > On Thu, Apr 05, 2018 at 11:49:36AM -0300, Martin Galvan wrote:
>> >> I want my module to be DKMS-enabled, but since the 'bar' binaries
>> >> don't use anything Linux-specific I don't want to distribute the
>> >> sources for it.
>> >
>> > Hahaha, good luck, please discuss this with a lawyer as to the
>> > legalities involved.  You are on your own here.
>>
>> You're right, and I apologize if this practice is frowned upon. I just
>> assumed it wasn't since the kbuild docs mention ways for having binary
>> blobs included with kernel modules.
>>
>> Thanks for the answer.
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>
>
>
> --
> “If you're going to try, go all the way. Otherwise, don't even start. ..."
>   Charles Bukowski
>



-- 
“If you're going to try, go all the way. Otherwise, don't even start. ..."
  Charles Bukowski
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Announce Linux kernel labs project

2018-02-15 Thread Daniel Baluta
Hi all,

The Linux kernel labs documentation is a collection of "labs" for
various device driver topics. For each topic there are two parts: a
walk-through which explain the basic concepts and a hands-on part which
contains a few exercises.

The kernel labs are integrated with Linux kernel Documentation
system:

https://github.com/linux-kernel-labs/linux

To view the generated Linux kernel labs documentation have a look at:

https://linux-kernel-labs.github.io/

We kindly appreciate your feedback, directly here or via
Issues/Pull Requests on github.

thanks,
Daniel.

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


Re: Linux Kernel contains only C code?

2018-02-02 Thread Daniel.
Oh, thank you so much!

I see dtc, the device tree compiler I guess. Parsing is a cool programming
subject but I didn't expect to see parsers in the kernel level, cool, cool!

Regards,

2018-02-02 8:27 GMT-02:00 Augusto Mecking Caringi 
:

> On Fri, Feb 2, 2018 at 11:11 AM, Daniel.  wrote:
> > I'm just curious. What problems in kernel involves parsing?
>
> $ find -name *.[yl]
> ./drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
> ./drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
> ./drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.l
> ./drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y
> ./tools/perf/util/pmu.l
> ./tools/perf/util/expr.y
> ./tools/perf/util/parse-events.y
> ./tools/perf/util/parse-events.l
> ./tools/perf/util/pmu.y
> ./tools/bpf/bpf_exp.y
> ./tools/bpf/bpf_exp.l
> ./scripts/genksyms/parse.y
> ./scripts/genksyms/lex.l
> ./scripts/dtc/dtc-lexer.l
> ./scripts/dtc/dtc-parser.y
> ./scripts/kconfig/zconf.l
> ./scripts/kconfig/zconf.y
>
> So, really in the kernel just a SCSI driver that needs to parse a
> "Host adapter sequencer assembler"...
>
> The others *[yl] files are in tools or scripts directories (userspace
> tools like perf or build support scripts).
>
> --
> Augusto Mecking Caringi
>



-- 
“If you're going to try, go all the way. Otherwise, don't even start. ..."
  Charles Bukowski
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Linux Kernel contains only C code?

2018-02-02 Thread Daniel.
I'm just curious. What problems in kernel involves parsing?

On Feb 2, 2018 5:01 AM,  wrote:

> On Thu, 01 Feb 2018 11:37:26 -0500, Aruna Hewapathirane said:
>
> > Somethings are not so obvious like what could possibly be a *.y file or
> > *.tc file ? If you type in find -name "*.y" in my case i see:
> >
> > aruna@debian:~/linux-4.15$ find -name "*.y"
>
> > Now if I pass that to the 'file' command ...
> >
> > aruna@debian:~/linux-4.15$ file `find -name "*.y"` // yes you need those
> > back ticks :)
> >
> > ./drivers/scsi/aic7xxx/aicasm/aicasm_macro_gram.y: C source, ASCII text
>
> > So 'file' tells us these are C program files ? Lets verify ? If you 'cat'
> > any of these files you will see it is actual C code. Why does it have a
> > file extension of .y ?
>
> Actually, if you look more closely at it, it's *not* actually C code.  The
> 'file'
> command makes its best guess, triggered off things like '#include', etc.
>
> The 'tl;dr' answer is "The *.y are input files for bison, and the *.l are
> input files for flex".
>
> The more detailed explanation, with 50 years of computer history
>
> [/usr/src/linux-next] head -20 tools/perf/util/expr.y
> /* Simple expression parser */
> %{
> #include "util.h"
> #include "util/debug.h"
> #define IN_EXPR_Y 1
> #include "expr.h"
> #include "smt.h"
> #include 
>
> #define MAXIDLEN 256
> %}
>
> %pure-parser
> %parse-param { double *final_val }
> %parse-param { struct parse_ctx *ctx }
> %parse-param { const char **pp }
> %lex-param { const char **pp }
>
> %union {
> double num;
>
> That's got a bunch of % in unusual places for C, doesn't it? :)
>
> Let's hit the rewind button back 5 decades or so, when tools for building
> programs were just becoming created.  And everybody who wanted to write a
> compiler for a language, or parsing data that wasn't strict 'ID is in
> columns
> 5-12' formatting, or a whole bunch of other stuff, had to write a parser
> to do
> the parsing.
>
> For those who have never done it, writing lexical scanners and parsers by
> hand
> is a thankless job. I know from experience that the parse table for an LALR
> parser for Pascal ends up being essentially a spreadsheet with some 300
> rows
> and 400 columns that you get to fill in by hand one at a time - and
> getting one
> entry wrong means you have a buggy compiler (I took Compiler Design in
> college
> the last year we had to do it by hand)
>
> The first few compiled languages (COBOL, FORTRAN, and a few others) also
> had to
> make do with hand-coded parsers.  And then in 1958, Algol happened, and it
> spawned all sorts of languages - everything from C to PL/I to Pascal and
> probably 200+ others (pretty much every language that allows nested
> declarations and has begin/end tokens of some sort owes it to Algol).  And
> the
> other thing about Algol was that it was a much "bigger" language than
> previous
> ones, so John Backus invented a meta-language called BNF to provide a
> formal
> specification of the syntax.
>
> (For those who are curious, a EBNF specification for Pascal syntax is here:
> http://www.fit.vutbr.cz/study/courses/APR/public/ebnf.html
>
> The interesting thing about BNF is that it has these things called
> "production
> rules" which define what legal programs look like - and the test for
> "legal"
> can be done with a parser using a software/mathematical construct called a
> "finite state machine" (and the 3 of you who understand the difference
> between
> a context-sensitive grammar and a context-free grammar can stop giggling
> right
> now.. ;)
>
> So somebody had the bright idea that if you had a formal BNF
> specification, you
> could write a program that would read the BNF, and spit out the C source
> for a
> parser skeleton based on a finite state machine.  And thus were born two
> programs called 'lex' (a lexical scanner - something that reads the
> source, and
> outputs code that says "Hey, that's the word 'struct'" or "we just saw a
> 'for"). and another called 'yacc' (Yet Another Compiler Compiler) which
> did the
> higher level "this is a legal function, but *that* right there is a
> messed-up
> 'if' statement that has a syntax error" stuff.  Oh, and generate output
> code, too.
>
> Of course, that was decades ago, and eventually somebody wrote a faster
> 'lex' -
> and thus was born /usr/bin/flex.  And yacc needed work, so the improved
> version
> was, of course, called bison (think about it for a bit..)
>
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: how to hard hang the kernel from userspace?

2017-12-08 Thread Daniel Walker
On 12/07/2017 06:40 PM, valdis.kletni...@vt.edu wrote:
> On Thu, 07 Dec 2017 15:12:15 -0800, Daniel Walker said:
>
>> So typically you have a process which updates the watchdog periodically
>> which I call a petting process. As I said the purpose is to trigger the
>> watchdog by starving the petting process (i.e. kick process) , then the
>> watchdog reboots the system.
> If you're doing the updating from userspace, a kill -9 will get the job done.
>

True, but that wasn't what I had in mind.. I was more interesting in 
simulating an actual lockup.


Daniel


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


Re: how to hard hang the kernel from userspace?

2017-12-07 Thread Daniel Walker
On 12/07/2017 07:49 AM, valdis.kletni...@vt.edu wrote:
> On Wed, 06 Dec 2017 16:32:26 -0800, Daniel Walker said:
>
>> and it works sometimes on UP, but it doesn't work on SMP. I also tried
> Thinking about *why* that hangs a UP should explain why it doesn't work
> on SMP.
>
>> adding in "taskset" to pin multiple version of the "yes" command to each
>> cpu in the system, but that just resulted in lots of rcu warnings.
> That's unexpected.

May have to do with not being able to start them all instantly enough, 
something like that.

>> The goal is to make the watchdog trigger by starving out the watchdog
>> petting process. Anyone have any ideas? I'd rather not make a kernel module.
> What are you trying to achieve by doing that?
>
> Have you tried just pointing a 'kill -9' at the watchdog monitor process?  
> Are you using
> in-kernel watchdogd, or one in userspace?


So typically you have a process which updates the watchdog periodically 
which I call a petting process. As I said the purpose is to trigger the 
watchdog by starving the petting process (i.e. kick process) , then the 
watchdog reboots the system.


Daniel


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


how to hard hang the kernel from userspace?

2017-12-07 Thread Daniel Walker

Hi,


I was able to formulate this command,

echo -1 > /proc/sys/kernel/sched_rt_runtime_us
chrt -f 99 yes &> /dev/null

and it works sometimes on UP, but it doesn't work on SMP. I also tried 
adding in "taskset" to pin multiple version of the "yes" command to each 
cpu in the system, but that just resulted in lots of rcu warnings.


The goal is to make the watchdog trigger by starving out the watchdog 
petting process. Anyone have any ideas? I'd rather not make a kernel module.


Thanks,

Daniel


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


Re: Debugging a kernel freeze

2017-12-01 Thread Daniel.
In this scenario I would isolate stuff until find at last the domain of the
problem. You say that it happens after some hours, can it be because of
temperature?, What is the workload?

2017-12-01 12:05 GMT-02:00 Victor Ascroft :

> Hello,
>
> I have a iMX6 running a 4.9 kernel with a custom kernel driver
> communicating
> with a FPGA over PCIe. The driver is not built in to the kernel but loaded
> as
> a module after complete boot up. During the running of the system, after a
> few
> hours the kernel completely freezes. No kernel panics or stack traces,
> nothing.
> I have access to the serial console.
>
> In such a scenario what are the ways to debug and try locating the source
> of
> the problem? I am not looking for a solution for my problem but things or
> approaches one can go about trying while trying to fix such a scenario?
>
> Thank you for any pointers in advance.
>
> Regards.
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
“If you're going to try, go all the way. Otherwise, don't even start. ..."
  Charles Bukowski
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Updating LDD3

2017-10-24 Thread Daniel.
You're welcome!

On Oct 24, 2017 10:38 AM, "Ozgur"  wrote:

>
> Hello,
>
> 24.10.2017, 15:31, "Daniel." :
>
> Here it is https://github.com/martinezjavier/ldd3
>
> Regards
>
>
> oh, it's very good, nice.
> Thank you
>
> Ozgur
>
>
>
> On Oct 24, 2017 9:58 AM, "Ozgur"  wrote:
>
> Hello Daniel,
>
> 24.10.2017, 14:50, "Daniel." :
>
> There is a repo at github with all the samples don't?
>
>
>
> I think that no, I not seen before on github.
>
> Regards
>
> Ozgur
>
>
>
> On Oct 24, 2017 9:06 AM, "Ozgur"  wrote:
>
> Hello Ryan,
>
> 24.10.2017, 13:58, "Liam Ryan" :
> > I'm currently working through the Linux Device Drivers 3rd edition
> > (https://lwn.net/Kernel/LDD3/) and much of the code is outdated.
> >
> > Right now I'm going through chapter 3 and rewriting the scull.c sample
> > code so that it will compile with 4.14.x
> >
> > I'm wondering about the Creative Commons license on the LDD3 book. I
> believe I would be able to annotate or alter the pdf files and re-publish
> them once I respect the license, however I'm wondering if this would be
> considered bad form? I assume there's a reason somebody else has not done
> this to date?
>
> I think you can update and re-publish the example code and don't break the
> original comment lines.
> At least I think this.
>
> > Obviously as a kernel newbie I'm not best positioned to do this work but
> > I'm happy to make a start and publish to a wiki or similar in a few
> > months once I've gone through everything.
> >
> > Thanks,
> > Liam
>
> Regards
>
> Ozgur
>
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Updating LDD3

2017-10-24 Thread Daniel.
Here it is https://github.com/martinezjavier/ldd3

Regards

On Oct 24, 2017 9:58 AM, "Ozgur"  wrote:

> Hello Daniel,
>
> 24.10.2017, 14:50, "Daniel." :
>
> There is a repo at github with all the samples don't?
>
>
>
> I think that no, I not seen before on github.
>
> Regards
>
> Ozgur
>
>
>
> On Oct 24, 2017 9:06 AM, "Ozgur"  wrote:
>
> Hello Ryan,
>
> 24.10.2017, 13:58, "Liam Ryan" :
> > I'm currently working through the Linux Device Drivers 3rd edition
> > (https://lwn.net/Kernel/LDD3/) and much of the code is outdated.
> >
> > Right now I'm going through chapter 3 and rewriting the scull.c sample
> > code so that it will compile with 4.14.x
> >
> > I'm wondering about the Creative Commons license on the LDD3 book. I
> believe I would be able to annotate or alter the pdf files and re-publish
> them once I respect the license, however I'm wondering if this would be
> considered bad form? I assume there's a reason somebody else has not done
> this to date?
>
> I think you can update and re-publish the example code and don't break the
> original comment lines.
> At least I think this.
>
> > Obviously as a kernel newbie I'm not best positioned to do this work but
> > I'm happy to make a start and publish to a wiki or similar in a few
> > months once I've gone through everything.
> >
> > Thanks,
> > Liam
>
> Regards
>
> Ozgur
>
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Updating LDD3

2017-10-24 Thread Daniel.
There is a repo at github with all the samples don't?

On Oct 24, 2017 9:06 AM, "Ozgur"  wrote:

> Hello Ryan,
>
> 24.10.2017, 13:58, "Liam Ryan" :
> > I'm currently working through the Linux Device Drivers 3rd edition
> > (https://lwn.net/Kernel/LDD3/) and much of the code is outdated.
> >
> > Right now I'm going through chapter 3 and rewriting the scull.c sample
> > code so that it will compile with 4.14.x
> >
> > I'm wondering about the Creative Commons license on the LDD3 book. I
> believe I would be able to annotate or alter the pdf files and re-publish
> them once I respect the license, however I'm wondering if this would be
> considered bad form? I assume there's a reason somebody else has not done
> this to date?
>
> I think you can update and re-publish the example code and don't break the
> original comment lines.
> At least I think this.
>
> > Obviously as a kernel newbie I'm not best positioned to do this work but
> > I'm happy to make a start and publish to a wiki or similar in a few
> > months once I've gone through everything.
> >
> > Thanks,
> > Liam
>
> Regards
>
> Ozgur
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Don't know where to start linux kernel programming

2017-08-23 Thread Daniel.
Go through LDD3: https://lwn.net/Kernel/LDD3/ :)

2017-08-23 6:34 GMT-03:00 Ruben Safir :

> On 08/22/2017 07:26 PM, Greg Freemyer wrote:
> > just send an email to the right address and all the
> > participants in the thread will do a reply-all so you can see the
> > responses without subscribing.??
>
> --
> So many immigrant groups have swept through our town
> that Brooklyn, like Atlantis, reaches mythological
> proportions in the mind of the world - RI Safir 1998
> http://www.mrbrklyn.com
>
> DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
> http://www.nylxs.com - Leadership Development in Free Software
> http://www2.mrbrklyn.com/resources - Unpublished Archive
> http://www.coinhangout.com - coins!
> http://www.brooklyn-living.com
>
> Being so tracked is for FARM ANIMALS and and extermination camps,
> but incompatible with living as a free human being. -RI Safir 2013
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
“If you're going to try, go all the way. Otherwise, don't even start. ..."
  Charles Bukowski
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to make per process firewall ?

2017-04-18 Thread Daniel.
I think docker or lxc may help you. You run the process(es) in a container
and attach a tap interface to the container, the process inside the
container can only see the attached interface.

Regards,

2017-04-18 4:28 GMT-03:00 Lev Olshvang :

> Hi all,
>
> I would like to constrain process (by name) or group of process to
> specific network interface and to specific port.
>
> Please advice if there is some cgroups controller or netfilter module?
>
> ThanX, Lev
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>


-- 
“If you're going to try, go all the way. Otherwise, don't even start. ..."
  Charles Bukowski
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Software and Hardware interrupt in top command

2017-04-18 Thread Daniel.
Hi,

top command show si (sw irq) and hi (hw irq). The linux has
request_threaded_irq(irq, handler, thread_fn, ...) ...

Is `si' the time spend on thread_fn and `hi' the time spend on handler


Regards,
-- 
“If you're going to try, go all the way. Otherwise, don't even start. ..."
  Charles Bukowski
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to browse the code

2017-04-13 Thread Daniel.
ctags + cscope + vim

The Makefile has targets for indexing the kernel.. Sometimes "find -exec
grep" helps... I will take a look in opengrok

Em 13/04/2017 7:40 AM, "manty kuma"  escreveu:

> Here you can see where sk_buff structure is delared.
> http://androidxref.com/kernel_3.18/xref/include/linux/skbuff.h#506
>
> May be you want to get familiar on how to use opengroks interface by
> seeing some youtube video or some online documents...
>
> Whatever you want to do wrt to source code browsing, this can do it for
> you very quickly.
>
> On Thu, Apr 13, 2017 at 6:24 AM, Code Soldier1 
> wrote:
>
>> Thanks a lot. I am still not able to lookup structures, such as
>> sk_buff and where does it's fields get set/used.
>>
>> On Tue, Apr 11, 2017 at 4:56 PM, manty kuma  wrote:
>> > I like Opengrok. It is insanely fast in giving search results. However
>> it
>> > takes sometime to setup and you need to index it before the first use.
>> >
>> > If you are ok with browsing someold kernels, then you can use this link
>> > http://androidxref.com/kernel_3.18/ which is maintained privately.
>> >
>> > If you want to use opengrok on more recent linux releases, you may have
>> to
>> > set it up yourself.
>> >
>> > On Wed, Apr 12, 2017 at 5:13 AM, Mandeep Sandhu
>> >  wrote:
>> >>>
>> >>>
>> >>> I am looking for something that can list all the places that a certain
>> >>> field of a certain structure is used. For example, sk_buff has a field
>> >>> called destructor, but so do many other data structures. How do I
>> >>> search for places where just the destructor field of sk_buff.
>> >>
>> >>
>> >> I think lxr has an identifier & free-text search (powered by google).
>> If
>> >> that doesn't do it for you, you can go "old school" and try cscope
>> maybe?
>> >>
>> >> HTH,
>> >> -mandeep
>> >>
>> >>
>> >>>
>> >>>
>> >>> Thanks a lot.
>> >>>
>> >>> --
>> >>> CS1
>> >>>
>> >>> ___
>> >>> Kernelnewbies mailing list
>> >>> Kernelnewbies@kernelnewbies.org
>> >>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>> >>
>> >>
>> >>
>> >> ___
>> >> Kernelnewbies mailing list
>> >> Kernelnewbies@kernelnewbies.org
>> >> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>> >>
>> >
>>
>>
>>
>> --
>> CS1
>>
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Problem in loading module of Software trigger

2017-03-27 Thread Daniel Baluta
Hi,

On Sun, Mar 26, 2017 at 9:51 PM, SIMRAN SINGHAL
 wrote:
> On Sun, Mar 26, 2017 at 1:47 PM, Jonathan Cameron
>  wrote:
>> Insmod will not pick up dependencies in the same way modprobe will.
>>
>> Make sure to also insmod industrialio.ko and iio-sw-trigger.ko before the sw 
>> trigger module. I
>>  think those are the only ones you will need.
>
> Thanks
>
> modprobe works for me as it's depended on industrialio-sw-trigger.ko
>
> But now I am facing one more probem with iio_generic_buffer in tools/iio
>
> I am trying to execute iio_generic_buffer:
> as given I can use -N   -t 
>
> I create trigger with name trig-sample present in
> /config/iio/triggers/trig-sample.

How did you create the trigger here?

The trigger must be created according to its type. So far
we have only hrtimer trigger type, so creating a trigger
implies creating a directory in:

/config/iio/triggers/hrtimer

See:

http://lxr.free-electrons.com/source/Documentation/iio/iio_configfs.txt#L83
>
> $./iio_generic_buffer -N iio_dummy_part_no
> iio device number being used is 0
> Failed to find the trigger my_dummy_device-trigger
>
> Its giving me ^ this error:
>
> What wrong I am doing?
>
> I have loaded all the modules including iio_dummy_evgen, iio_dummy.
>
> How I will be pass trig-sample as an argument to it?
> and one more question how can I find Trigger-number of a trigger.
>
> I am facing same problem with iio_event_monitor:-
>
> $ ./iio_event_monitor /sys/bus/iio/devices/iio_evgen/poke_ev0
>
Here you should use the device node. It is usually /dev/iio:device0.

If there is not already created by a daemon there, create it using

mknod /dev/iio:device0 c major minor.

The major and minor can be found in /sys/bus/iio/devices/iio:device0/dev file/

> getting following error:-
> Failed to retrieve event fd
>
> Same with all other events.
>
> This is working fine for me:
> echo 1 > /sys/bus/iio/devices/iio_evgen/poke_ev0

thanks,
Daniel.

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


Re: Kernel function sequence

2016-12-15 Thread Daniel.
There is: https://www.kernel.org/doc/Documentation/trace/ftrace.txt

2016-12-15 0:04 GMT-02:00 Aruna Hewapathirane :
>> How to know at what  sequence , what  function are being  called  when
>> kernel starts ? Any way to trace what function calling what ... so on
>> .?
>
> Google is your friend:
> https://0xax.gitbooks.io/linux-insides/content/Initialization/
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: easiest way to deactivate a driver at boot time?

2016-12-15 Thread Daniel.
I've never tried his brand new u-boot features, but yes, I guess is
possible to use ftd set to set status to "diabled" based on some
logic. Search for "5.9.7.5. fdt set - set node properties" at
http://www.denx.de/wiki/view/DULG/UBootCmdFDT

2016-12-15 10:55 GMT-02:00 Robert P. J. Day :
> On Thu, 15 Dec 2016, Daniel. wrote:
>
>> Or maybe using [status = "disabled"] at the device tree. Do you
>> control the compilation of these device-trees, kernel, drivers and
>> apps?
>
>   this sounds like the simplest approach -- u-boot can check things
> out and, if necessary, use the FDT utilities to disable the portion of
> the tree related to that driver. am i understanding this correctly?
>
> rday
>
> --
>
> 
> Robert P. J. Day Ottawa, Ontario, CANADA
> http://crashcourse.ca
>
> Twitter:   http://twitter.com/rpjday
> LinkedIn:   http://ca.linkedin.com/in/rpjday
> 
>



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: easiest way to deactivate a driver at boot time?

2016-12-15 Thread Daniel.
Or maybe using [status = "disabled"] at the device tree. Do you
control the compilation of these device-trees, kernel, drivers and
apps?

2016-12-15 10:20 GMT-02:00 Clemens Gruber :
> On Thu, Dec 15, 2016 at 03:49:01AM -0800, Greg KH wrote:
>> On Thu, Dec 15, 2016 at 04:56:18AM -0500, Robert P. J. Day wrote:
>> >
>> >   (Q asked by a colleague, a wee bit vague on details so i'm hoping
>> > i'm describing it correctly, seems like it should be easy to solve.)
>> >
>> >   short form of question: what is the standard way of, at boot time,
>> > passing the kernel information to specify that a built-in driver
>> > should *not* be started?
>>
>> Depends on the subsystem and driver, the only "standard way" is to just
>> not build the driver into the kernel in the first place and use modules
>> and load the module from userspace as-needed.
>>
>> Or, use the device tree that is passed to the kernel by the bootloader
>> to define the hardware and if the hardware isn't defined, then no driver
>> will get bound to it.
>
> What about "fixing up" the device tree in U-Boot with functions from
> common/fdt_support.(c|h)
>
> Maybe you could use fdt_del_node_and_alias to delete that drivers
> device tree node if it is not needed?
>
> Regards,
> Clemens
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: Kernelnewbies Digest, Vol 73, Issue 3

2016-12-03 Thread Daniel.
Some guys are likely to prefer complex tools, but I'm a simple guy. My
first try at debugging is printing. Using pr_debug is not always
possible so ftrace and early printk may be useful. Another tool that
comes with kernel and that is amazing is perf. You may find undercover
bottlenecks with this one. Really really useful. Being able to read
kernel stack traces is a good skill too,,

I tried kgdb over serial at some embedded system. Apparently the
serial driver was not capable of running kgdb.. Some polling mechanism
was needed, but not implemented.. at least, this was written at some
forum and I didn't do further investigation...

Here are some links:
http://elinux.org/Debugging_by_printing
https://www.kernel.org/doc/Documentation/trace/ftrace.txt
https://perf.wiki.kernel.org/index.php/Tutorial
http://www.dedoimedo.com/computers/crash-book.html

Regards,

2016-12-03 16:46 GMT-02:00 John Smith :
> Hi Andrey,
>
> Can you help post some good/still relevant links? Call me stupid, I did
> google, found a few websites, and most of them are kind of out of
> contexts(don't know how to follow). For beginners, step-by-step tutorials
> are the best. so far, sounds like kgdb is promising, but it requires a lot
> of backgrounds to start with. I still have not figured out the exact steps.
>
> Thank you,
>
> Message: 1
> Date: Fri, 2 Dec 2016 23:15:44 +
> From: Andrey Utkin 
> Subject: Re: Debugging tool for Linux kernel and driver development
> To: Teoh Choon Zone 
> Cc: kernelnewbies 
> Message-ID: <20161202231544.gb23...@dell-m4800.home>
> Content-Type: text/plain; charset=us-ascii
>
> On Fri, Dec 02, 2016 at 03:27:01PM +0800, Teoh Choon Zone wrote:
>> What are some widely used industrial tools (software/ hardware) for
>> debugging Linux kernel and driver? Recently my company allocate a budget
>> for purchasing this kind of tools, so I would like what are the tools that
>> would greatly ease our development.
>
> You'd better budget some time to google a bit and watch conference
> videos showing debugging techniques :) There are fine videos from past
> Kernel Recipes conferences.
>
>
>
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: disable input event device

2016-12-03 Thread Daniel.
it can be used*

2016-12-03 16:58 GMT-02:00 Daniel. :
> Is xinput avaible? I know that it can be use to disable input devices,
> but IFAIK android use custom GUI, that is not X...
>
>
> 2016-12-03 16:04 GMT-02:00 Ran Shalit :
>>
>>
>> On Sat, Dec 3, 2016 at 7:59 PM, Ran Shalit  wrote:
>>>
>>>
>>>
>>> On Sat, Dec 3, 2016 at 7:48 PM, Daniel.  wrote:
>>>>
>>>> Is blacklisting it an option??
>>>>
>>>
>>> I think not, because blacklist is only for loaded modules, Right ?
>>> While in android Linux, seems that all modules are built inside kernel
>>> image...
>>>
>>
>> Some more information about the touch device :
>>
>> I have sysfs entires for the touch device in kernel as following:
>>
>>  /sys/devices/virtual/input/input2/event2/
>>
>> root@mako:/sys/devices/virtual/input/input2 # ls
>> capabilities
>> event2
>> id
>> modalias
>> name
>> phys
>> power
>> properties
>> subsystem
>> uevent
>> uniq
>>
>> root@mako:/sys/devices/virtual/input/input2/event2/device # ls
>> capabilities
>> event2
>> id
>> modalias
>> name
>> phys
>> power
>> properties
>> subsystem
>> uevent
>> uniq
>>
>> root@mako:/sys/devices/virtual/input/input2/event2/device # cat name
>> touch_dev
>>
>>
>> Thanks,
>> Ran
>>
>>>
>>>
>>>
>>>>
>>>> Regards,
>>>>
>>>> 2016-12-03 15:18 GMT-02:00 Ran Shalit :
>>>> >
>>>> >
>>>> > On Sat, Dec 3, 2016 at 3:15 PM, Greg KH  wrote:
>>>> >>
>>>> >> On Sat, Dec 03, 2016 at 02:43:30PM +0200, Ran Shalit wrote:
>>>> >> > Hello,
>>>> >> >
>>>> >> > Is there some way to disable input event device ?
>>>> >> > Maybe a way to disable its irq usage ?
>>>> >> >
>>>> >> > I actually rather do that from shell, not from kernel, because the
>>>> >> > kernel
>>>> >> > source is not available, and I thought that issue is also relevant
>>>> >> > in
>>>> >> > the
>>>> >> > forum.
>>>> >>
>>>> >> But the Linux kernel source is available, why not just not load the
>>>> >> driver for the device you are wanting to not be "connected"?
>>>> >>
>>>> > Hi Greg,
>>>> >
>>>> > I am trying to do that from android, in a device where the kernel
>>>> > source is
>>>> > not available :( .
>>>> > By the way, I think the company (No.1 for D6 smartwatch) should supply
>>>> > the
>>>> > source because kernel is GPL , Right ?
>>>> >
>>>> > Therefore I try to achieve it by doing some actions in shell.
>>>> >
>>>> > Regards,
>>>> > Ran
>>>> >
>>>> >>
>>>> >> thanks,
>>>> >>
>>>> >> greg k-h
>>>> >
>>>> >
>>>> >
>>>> > ___
>>>> > Kernelnewbies mailing list
>>>> > Kernelnewbies@kernelnewbies.org
>>>> > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> "Do or do not. There is no try"
>>>>   Yoda Master
>>>>
>>>> ___
>>>> Kernelnewbies mailing list
>>>> Kernelnewbies@kernelnewbies.org
>>>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>
>>>
>>
>
>
>
> --
> "Do or do not. There is no try"
>   Yoda Master



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: disable input event device

2016-12-03 Thread Daniel.
Is xinput avaible? I know that it can be use to disable input devices,
but IFAIK android use custom GUI, that is not X...


2016-12-03 16:04 GMT-02:00 Ran Shalit :
>
>
> On Sat, Dec 3, 2016 at 7:59 PM, Ran Shalit  wrote:
>>
>>
>>
>> On Sat, Dec 3, 2016 at 7:48 PM, Daniel.  wrote:
>>>
>>> Is blacklisting it an option??
>>>
>>
>> I think not, because blacklist is only for loaded modules, Right ?
>> While in android Linux, seems that all modules are built inside kernel
>> image...
>>
>
> Some more information about the touch device :
>
> I have sysfs entires for the touch device in kernel as following:
>
>  /sys/devices/virtual/input/input2/event2/
>
> root@mako:/sys/devices/virtual/input/input2 # ls
> capabilities
> event2
> id
> modalias
> name
> phys
> power
> properties
> subsystem
> uevent
> uniq
>
> root@mako:/sys/devices/virtual/input/input2/event2/device # ls
> capabilities
> event2
> id
> modalias
> name
> phys
> power
> properties
> subsystem
> uevent
> uniq
>
> root@mako:/sys/devices/virtual/input/input2/event2/device # cat name
> touch_dev
>
>
> Thanks,
> Ran
>
>>
>>
>>
>>>
>>> Regards,
>>>
>>> 2016-12-03 15:18 GMT-02:00 Ran Shalit :
>>> >
>>> >
>>> > On Sat, Dec 3, 2016 at 3:15 PM, Greg KH  wrote:
>>> >>
>>> >> On Sat, Dec 03, 2016 at 02:43:30PM +0200, Ran Shalit wrote:
>>> >> > Hello,
>>> >> >
>>> >> > Is there some way to disable input event device ?
>>> >> > Maybe a way to disable its irq usage ?
>>> >> >
>>> >> > I actually rather do that from shell, not from kernel, because the
>>> >> > kernel
>>> >> > source is not available, and I thought that issue is also relevant
>>> >> > in
>>> >> > the
>>> >> > forum.
>>> >>
>>> >> But the Linux kernel source is available, why not just not load the
>>> >> driver for the device you are wanting to not be "connected"?
>>> >>
>>> > Hi Greg,
>>> >
>>> > I am trying to do that from android, in a device where the kernel
>>> > source is
>>> > not available :( .
>>> > By the way, I think the company (No.1 for D6 smartwatch) should supply
>>> > the
>>> > source because kernel is GPL , Right ?
>>> >
>>> > Therefore I try to achieve it by doing some actions in shell.
>>> >
>>> > Regards,
>>> > Ran
>>> >
>>> >>
>>> >> thanks,
>>> >>
>>> >> greg k-h
>>> >
>>> >
>>> >
>>> > ___
>>> > Kernelnewbies mailing list
>>> > Kernelnewbies@kernelnewbies.org
>>> > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>> >
>>>
>>>
>>>
>>> --
>>> "Do or do not. There is no try"
>>>   Yoda Master
>>>
>>> ___
>>> Kernelnewbies mailing list
>>> Kernelnewbies@kernelnewbies.org
>>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: disable input event device

2016-12-03 Thread Daniel.
Is blacklisting it an option??

Regards,

2016-12-03 15:18 GMT-02:00 Ran Shalit :
>
>
> On Sat, Dec 3, 2016 at 3:15 PM, Greg KH  wrote:
>>
>> On Sat, Dec 03, 2016 at 02:43:30PM +0200, Ran Shalit wrote:
>> > Hello,
>> >
>> > Is there some way to disable input event device ?
>> > Maybe a way to disable its irq usage ?
>> >
>> > I actually rather do that from shell, not from kernel, because the
>> > kernel
>> > source is not available, and I thought that issue is also relevant in
>> > the
>> > forum.
>>
>> But the Linux kernel source is available, why not just not load the
>> driver for the device you are wanting to not be "connected"?
>>
> Hi Greg,
>
> I am trying to do that from android, in a device where the kernel source is
> not available :( .
> By the way, I think the company (No.1 for D6 smartwatch) should supply the
> source because kernel is GPL , Right ?
>
> Therefore I try to achieve it by doing some actions in shell.
>
> Regards,
> Ran
>
>>
>> thanks,
>>
>> greg k-h
>
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: Cannot boot to compiled kernel

2016-11-10 Thread Daniel.
2016-11-10 2:48 GMT-02:00 Daniel Bokser :
>
>> On Nov 8, 2016, at 5:50 AM, Andrey Skvortsov  
>> wrote:
>>
>> On 16-11-07 23:26, Daniel Bokser wrote:
>>>
>>>> On Nov 3, 2016, at 11:22 AM, Matias Mucciolo  
>>>> wrote:
>>>>
>>>>
>>>
>>> Thanks everyone!  So I compiled keyboard, SATA, and BTRFS drivers in and 
>>> was able to get further, but it looks like it had trouble starting up LXDE 
>>> (it was repeatedly starting and stopping LXDE).  Booting up in single user 
>>> mode, I was able to get a prompt.  I attempted startx but it failed.  I 
>>> looked and it looked like it was attempting to use the Nvidia modules, but 
>>> they weren’t in the /lib/modules/4.9.0… directory (I have an Nvidia 670).  
>>> It looks like they are stored as extra modules in the extramodules softlink 
>>> in my default installation (now kernel 4.8).
>>>
>>> So I am gathering that many of the modules used in my default installation 
>>> are not making it over to 4.9.  When running make localmodconfig, I am 
>>> noticing error messages related to Nvidia and virtual box.  Some examples:
>>>
>>> Nvidia config not found!!
>>
>> You have used proprietary driver from Nvidia. It is not included in
>> the kernel. I think this is the reason for your problem with LXDE.
>>
>> The best way would be to use open source driver that is supported by
>> the mainline kernel - nouveau (config option DRM_NOUVEAU).
>> According to the nouveau site [1], your chip is supported. Try it.
>>
>> 1. https://nouveau.freedesktop.org/wiki/FeatureMatrix/
>>
>> --
>> Best regards,
>> Andrey Skvortsov
>
> Thanks!  I tried to use nouveau.  It seems that the kernel cannot load any 
> dynamically linked module, including nouveau.  I am kicked to the emergency 
> console (after statically linking all the necessary drivers to ready my SSD). 
> When I do a modprobe nouveau, I get a bunch of Unknown symbol errors similar 
> to the errors I stated in my previous email. It errors out stating ERROR: 
> could not insert nouveau: Invalid argument
>
> Some examples include:
>
> drm: no known symbol version for memcpy
> drm: Unknown symbol memcpy (err -22)
> drm: no known symbol version for __put_user_4
> drm: Unknown symbol __put_user_4 (err -22)
>
> It seems there is an underlying problem with loading the dynamically linked 
> modules.  lsmod reveals exactly 2 modules: crc16 and hid_generic.  Honestly I 
> am surprised there are any modules here.
>
> As was stated before, there might have been a problem compiling these 
> modules.  Has anyone encountered this issue before?
>
> Thanks!
>
> -Daniel

Usually this means that the modules you're trying to load wasn't
compiled to the running kernel. But it may be another problem. If you
have /proc/config.gz you may check if the CONFIG_* options that you
selected are really there, with something like `zcat /proc/config.gz |
grep CONFIG_SOME_OPTION'.

Regards,

-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: Cannot boot to compiled kernel

2016-11-09 Thread Daniel Bokser

> On Nov 8, 2016, at 5:50 AM, Andrey Skvortsov  
> wrote:
> 
> On 16-11-07 23:26, Daniel Bokser wrote:
>> 
>>> On Nov 3, 2016, at 11:22 AM, Matias Mucciolo  
>>> wrote:
>>> 
>>> 
>> 
>> Thanks everyone!  So I compiled keyboard, SATA, and BTRFS drivers in and was 
>> able to get further, but it looks like it had trouble starting up LXDE (it 
>> was repeatedly starting and stopping LXDE).  Booting up in single user mode, 
>> I was able to get a prompt.  I attempted startx but it failed.  I looked and 
>> it looked like it was attempting to use the Nvidia modules, but they weren’t 
>> in the /lib/modules/4.9.0… directory (I have an Nvidia 670).  It looks like 
>> they are stored as extra modules in the extramodules softlink in my default 
>> installation (now kernel 4.8).  
>> 
>> So I am gathering that many of the modules used in my default installation 
>> are not making it over to 4.9.  When running make localmodconfig, I am 
>> noticing error messages related to Nvidia and virtual box.  Some examples:
>> 
>> Nvidia config not found!!
> 
> You have used proprietary driver from Nvidia. It is not included in
> the kernel. I think this is the reason for your problem with LXDE.
> 
> The best way would be to use open source driver that is supported by
> the mainline kernel - nouveau (config option DRM_NOUVEAU).
> According to the nouveau site [1], your chip is supported. Try it.
> 
> 1. https://nouveau.freedesktop.org/wiki/FeatureMatrix/ 
> 
> -- 
> Best regards,
> Andrey Skvortsov

Thanks!  I tried to use nouveau.  It seems that the kernel cannot load any 
dynamically linked module, including nouveau.  I am kicked to the emergency 
console (after statically linking all the necessary drivers to ready my SSD). 
When I do a modprobe nouveau, I get a bunch of Unknown symbol errors similar to 
the errors I stated in my previous email. It errors out stating ERROR: could 
not insert nouveau: Invalid argument

Some examples include:

drm: no known symbol version for memcpy
drm: Unknown symbol memcpy (err -22)
drm: no known symbol version for __put_user_4
drm: Unknown symbol __put_user_4 (err -22)

It seems there is an underlying problem with loading the dynamically linked 
modules.  lsmod reveals exactly 2 modules: crc16 and hid_generic.  Honestly I 
am surprised there are any modules here.  

As was stated before, there might have been a problem compiling these modules.  
Has anyone encountered this issue before?

Thanks!

-Daniel
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Cannot boot to compiled kernel

2016-11-07 Thread Daniel Bokser

> On Nov 3, 2016, at 11:22 AM, Matias Mucciolo  wrote:
> 
> 
> 
> On Thursday 03 November 2016 00:56:21 Daniel. wrote:
>> 2016-11-02 9:27 GMT-02:00 Quentin Lambert :
>> 
>>> Hi,
>>> On 11/02/2016 12:05 PM, Daniel Bokser wrote:
>>>> Now I am thrown into the recovery shell with an 'Unable to find root
>>> device /dev/sdc2' (my SSD).
>>>> The real strange thing is that the (PS/2) keyboard doesn't work, so I
>>> can't even run commands.
>>>> Tried also USB keyboard to no avail.
>>>> I also have a bunch of "Unknown symbol" errors from scsi_mod which fill
>>> most of the screen.
>>>> 
>>>> I'm thinking the RAM disk is bad, but not sure. No amount of Google-fu
>>> was able to help me out with this one.
>>>> 
>>> I had a similar problem, check to see if the RAM is ok but the problem
>>> might be due to something else.
>>> 
>>> I was able to make it work thanks to this e-mail:
>>> 
>>> https://lkml.org/lkml/2016/10/19/271
>>> 
>>> 
>>> I changed to
>>> 
>>> CONFIG_MODVERSIONS=n
>>> 
>>> But naively applying the patches mentioned in the e-mail did not work for
>>> me
>>> and I haven't had the time to look further into the problem and give
>>> relevant
>>> feedback to the thread.
>>> 
>>> Quentin
>>> 
>>> ___
>>> Kernelnewbies mailing list
>>> Kernelnewbies@kernelnewbies.org
>>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>> 
>> 
>> 
>> I would suggest you to compile ssd and ps2 keyboard drivers built in, so
>> even if some goes wrong on initrd you may still mount rootfs and have
>> keyboard working. The "Unknown symbol" may mean that something was wrong in
>> kernel compilation.
>> 
>> Regards,
>> -- 
>> *"Do or do not. There is no try"*
>>  *Yoda Master*
> 
> 
> also the module for the filesystem you use in root part.
> 
> Matias
> 
> 

Thanks everyone!  So I compiled keyboard, SATA, and BTRFS drivers in and was 
able to get further, but it looks like it had trouble starting up LXDE (it was 
repeatedly starting and stopping LXDE).  Booting up in single user mode, I was 
able to get a prompt.  I attempted startx but it failed.  I looked and it 
looked like it was attempting to use the Nvidia modules, but they weren’t in 
the /lib/modules/4.9.0… directory (I have an Nvidia 670).  It looks like they 
are stored as extra modules in the extramodules softlink in my default 
installation (now kernel 4.8).  

So I am gathering that many of the modules used in my default installation are 
not making it over to 4.9.  When running make localmodconfig, I am noticing 
error messages related to Nvidia and virtual box.  Some examples:

Nvidia config not found!!
Vbox_pci config not found!!

I also did a diff on the modules.symbols files between 4.9 and the default 
kernel and noticed many missing symbols in the 4.9 modules.symbols.  So I feel 
I’m missing a step somewhere.  Isn’t it supposed to make sure all loaded and 
unloaded modules are copied to 4.9?

Thanks!

-Daniel




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


Re: Cannot boot to compiled kernel

2016-11-02 Thread Daniel.
2016-11-02 9:27 GMT-02:00 Quentin Lambert :

> Hi,
> On 11/02/2016 12:05 PM, Daniel Bokser wrote:
> > Now I am thrown into the recovery shell with an 'Unable to find root
> device /dev/sdc2' (my SSD).
> > The real strange thing is that the (PS/2) keyboard doesn't work, so I
> can't even run commands.
> > Tried also USB keyboard to no avail.
> > I also have a bunch of "Unknown symbol" errors from scsi_mod which fill
> most of the screen.
> >
> > I'm thinking the RAM disk is bad, but not sure. No amount of Google-fu
> was able to help me out with this one.
> >
> I had a similar problem, check to see if the RAM is ok but the problem
> might be due to something else.
>
> I was able to make it work thanks to this e-mail:
>
> https://lkml.org/lkml/2016/10/19/271
>
>
> I changed to
>
> CONFIG_MODVERSIONS=n
>
> But naively applying the patches mentioned in the e-mail did not work for
> me
> and I haven't had the time to look further into the problem and give
> relevant
> feedback to the thread.
>
> Quentin
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>


I would suggest you to compile ssd and ps2 keyboard drivers built in, so
even if some goes wrong on initrd you may still mount rootfs and have
keyboard working. The "Unknown symbol" may mean that something was wrong in
kernel compilation.

Regards,
-- 
*"Do or do not. There is no try"*
  *Yoda Master*
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Cannot boot to compiled kernel

2016-11-02 Thread Daniel Bokser
Hi Everyone,

I know this is probably the newbiest of questions, but I am trying to compile 
and boot off of the kernel.  
I am running Arch Linux and I am following this guide: 
https://wiki.archlinux.org/index.php/Kernels/Traditional_compilation

Despite using "linux480" below (I tried this a few weeks ago), the kernel 
version I am using is
Linux 4.9.0-rc3 "Psychotic Stoned Sheep" (I love these names). I use 
systemd-boot as a boot loader.

1) Pulled down kernel from git
2) Ran make localmodconfig
3) Ran make menuconfig and changed the local version to a custom string
4) Ran make 
5) Ran sudo make modules_install
6) Ran sudo cp arch/x86_64/bzImage /boot/vmlinuz-linux480
7) Added /etc/mkinitcpio.d/linux480.preset,
which is similar to linux.preset except with linux480 names
8) Ran mkinitcpio -p linux480
9) Ran sudo cp System.map /boot/System.map-linux480
10) Added entry file to /boot/entries called linux480 and used the current 
entry as a template
11) Rebooted and selected linux480

Now I am thrown into the recovery shell with an 'Unable to find root device 
/dev/sdc2' (my SSD).
The real strange thing is that the (PS/2) keyboard doesn't work, so I can't 
even run commands.
Tried also USB keyboard to no avail.
I also have a bunch of "Unknown symbol" errors from scsi_mod which fill most of 
the screen. 

I'm thinking the RAM disk is bad, but not sure. No amount of Google-fu was able 
to help me out with this one. 

Any help would be appreciated.  Thank you!

-Daniel


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


Re: omap watchdog

2016-10-27 Thread Daniel.
Seems a bug to me, you should post it to linux-omap :)

Regards,

2016-10-27 6:14 GMT-02:00 Cor Peters :
> Hello everybody
>
> I was looking into an issue with the omap-wdt.c. The  watchdog driver not is
> reporting a different boot status when a reset is being triggered by the
> watchdog.
>
> >From what I gathered, the issue is that in the omap_wdt_probe function,
> pdev->dev->platform_data requires to be a reference to the PRM module,
> however it has not been set, and I was wondering how this should work in
> an environment that uses the device tree method. (Link to usage:
> http://lxr.free-electrons.com/source/drivers/watchdog/omap_wdt.c#L268 ).
>
> My questions are as follows:
> 1) Is my assertion correct that the current method does not work when
>the driver is being initialised from an device tree instead of a old style
>board file.
> 2) If that is the case, what would be the best method of fixing this
>situation.
>
> Thank you very much in advance.
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: What subsystem!?

2016-10-25 Thread Daniel.
Vladis,

Thank you so much for your anwer. I had never thought that way, and
make totally sense. Challenge accepted, I'll look for interesting
applications and see how they interact with kernel. Thank you so
much!!!

Best regards!!!

2016-10-25 13:42 GMT-02:00  :
> On Tue, 25 Oct 2016 10:33:47 -0200, "Daniel." said:
>> I've been studying linux for some time now. I still see my self as an
>> begginer, but that's not a bad thing. I struggling to decide what
>> subsystem to focus right know.
>
> I've said it before, and I'll say it again:
>
> If you have to ask others which part of the kernel you should study,
> maybe you shouldn't be doing kernel work.  It's like a beginning
> author asking other people if they should write a mystery or a western.
> If you're only writing a murder mystery because somebody suggested it,
> it's probably not going to be very good.
>
> Note that for most systems all the *real* magic (and hard work) aren't in
> the kernel, they're in userspace.
>
> Let's look at the Internet of Things as an example.  Yes, networking is
> going to be important - but the kernel just gives userspace (for instance)
> TCP over IPv6.  All the code to actually *do* something with it is out in
> userspace.
>
> Just the other day, a large part of the Internet fell apart because of
> a DDoS attack on some important DNS servers.  The root cause?  Default
> passwords and other userspace security issues on a lot of DVRs and
> security cameras.  A userspace issue.
>
> I'm looking at buying some LED-based light bulbs that can change color on
> command.   Kernel support for the networking?  Get a packet, send a packet.
> All the code that says "during early evening, use a 5K color temperature,
> and slowly roll it back to 3.2K around midnight, but an hour later in the
> kitchen"?  Userspace.
>
> You mention database tuning.  Another case where you *really* need to
> understand what userspace is doing before you can do much in the kernel.
> Linux kernel hacking for tuning our Oracle servers?  Zip.  Zero. None.
> We just create yet another VM with X amount of RAM and Y amount of
> disk on a fiberchannel-connected EMC VNX storage unit.  However, our
> DBAs spend a *lot* of time tweaking Oracle parameters in userspace, and
> my co-worker who administers that storage keeps busy tuning it - but
> he has a nice userspace GUI that handles all the hard work so he can
> concentrate on higher-level issues like proper tiering of a high-activity
> disk.
>
> My current job is building petabyte-scale file systems for HPC clusters -
> and although I end up tweaking kernel parameters a fair amount, there's
> actually not much kernel hacking involved.  What *is* needed is the ability
> to talk to the computational scientists, and find out things like what
> blocksize their software wants to use, whether it's sequential or random
> access, what degree of parallelism is needed, and so on...
>
> You hopefully notice a pattern here... Find an application that *you* think
> is interesting - and first learn the userspace end of it.  You may not need
> to know very much about the kernel at all - and if you *do*, you'll have
> a better idea of which part of the kernel and what you need to know



-- 
"Do or do not. There is no try"
  Yoda Master

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


What subsystem!?

2016-10-25 Thread Daniel.
Hi everybody,

I've been studying linux for some time now. I still see my self as an
begginer, but that's not a bad thing. I struggling to decide what
subsystem to focus right know. I have three options and would like to
know what people think about, since listening (or reading) other
people aways help me to decide. My options are:

i. Memory
ii. Network
iii. Filesystems / Disk cache

Today I'm working on embedded market and have a crush on ARM
architecture. I have absolute no knowledge on (i), some fundations (in
userspace) on (ii) and nothing but mkfs experience on (iii). LoL.

The second question is: What are the (market) applications of these
expertise? I know that (ii) will be huge part ot IoT and IIoT. And the
(iii) can be used on database tunning for example. (i) seem just
f*** cool to me.

When I say (market) please, do not get me wrong. The jobs on kernel
are not popping out (especially on Brazil) like the Java & Big Data
ones, I still have to eat, but I'm not willing to move from my
passions(kernel-dev) for money.


Thanks in advance and regards to everybody!
-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: QEMU?

2016-10-19 Thread Daniel.
Did you see this? http://fedoraproject.org/wiki/Features/VirtioSerial

Regards,

2016-10-19 14:24 GMT-02:00 Kenneth Adam Miller :
> That doesn't work for our use case. We have special hardware for our use
> case.
>
>
> On Oct 19, 2016 12:21 PM, "Daniel."  wrote:
>>
>> Why not use networking?
>>
>> 2016-10-19 8:53 GMT-02:00 Kenneth Adam Miller
>> :
>> > So, we can use qemu within our development system here, but the
>> > problem is we have something that is a bit specialized in that the
>> > machines talk to one another over a special interface. It's a bit like
>> > named pipes, and to our applications, named pipes are a sufficient
>> > interface to test over.
>> >
>> >
>> > In any case, I was wondering, does anybody know of a way to share
>> > memory between two QEMU instances? Or even to communicate between two
>> > instances?
>> >
>> > ___
>> > Kernelnewbies mailing list
>> > Kernelnewbies@kernelnewbies.org
>> > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>>
>> --
>> "Do or do not. There is no try"
>>   Yoda Master



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: QEMU?

2016-10-19 Thread Daniel.
Why not use networking?

2016-10-19 8:53 GMT-02:00 Kenneth Adam Miller :
> So, we can use qemu within our development system here, but the
> problem is we have something that is a bit specialized in that the
> machines talk to one another over a special interface. It's a bit like
> named pipes, and to our applications, named pipes are a sufficient
> interface to test over.
>
>
> In any case, I was wondering, does anybody know of a way to share
> memory between two QEMU instances? Or even to communicate between two
> instances?
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: SocketCAN Driver

2016-10-17 Thread Daniel.
If you're dealing with network drivers you will want to know about socket
buffs: http://www.linuxjournal.com/article/1312
LDD3 has a chapter for network drivers too:
http://www.makelinux.net/ldd3/chp-17


Regards :)

2016-10-17 10:22 GMT-02:00 Daniel. :

> CAN drivers can be found here; http://lxr.free-electrons.com/
> source/drivers/net/can/
>
> The device driver interface is at dev.c
>
> AFAIK the only other files referencing to can outside of drivers/ folder
> is http://lxr.free-electrons.com/source/include/uapi/linux/if_ether.h#L120
> You may want to look at docs too: https://www.kernel.org/doc/
> Documentation/networking/can.txt
> Regards,
>
> 2016-10-17 9:05 GMT-02:00 Augusto Fraga Giachero :
>
>> I've been reading the source code for the ECI driver and discovered that
>> it only applies to PCI devices, the IXXAT CAN-to-USB Compact (V1.0) is
>> accessed through libusb, so please, ignore the ECI Kernel module that
>> I've attached in the last email.
>>
>> Thanks!
>>
>> On 17-10-2016 08:43, Augusto Fraga Giachero wrote:
>> > Hello!
>> >
>> >
>> > I recently started a project that uses the CAN serial protocol using
>> > microcontrollers. I've got an IXXAT CAN-to-USB Compact (V1.0) adapter to
>> > help debugging the CAN bus. The manufacturer of this adapter provides
>> > the kernel driver and and userspace  libraries for Linux, but it uses a
>> > custom API (ECI) instead of SocketCAN (and I really need to use
>> > SocketCAN). The manufacturer also provides a SocketCAN driver but only
>> > for the CAN-to-USB Compact (V2.0), so it doesn't with what I have.
>> >
>> >
>> > I'm thinking in modifying the the SocketCAN driver to support the V1.0
>> > adapter, but I don't have any experience in kernel driver development.
>> > I've a solid C knowledge and a lot of experience in firmware development
>> > for microcontrollers. Can someone show me where to find relevant
>> > information regarding SocketCAN, USB drivers development? I don't know
>> > if this challenge is above my skills.
>> >
>> >
>> > I've attached both drivers and a patch for the usb-to-can_v2_socketcan
>> > that substitutes the "netdev->trans_start =" deference to
>> > "netif_trans_update(netdev);", so you can compile for kernels newer than
>> > 4.4.
>> >
>> >
>> >
>> > Thanks!
>> >
>> >
>>
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>
>
>
> --
> *"Do or do not. There is no try"*
>   *Yoda Master*
>



-- 
*"Do or do not. There is no try"*
  *Yoda Master*
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: SocketCAN Driver

2016-10-17 Thread Daniel.
CAN drivers can be found here;
http://lxr.free-electrons.com/source/drivers/net/can/

The device driver interface is at dev.c

AFAIK the only other files referencing to can outside of drivers/ folder is
http://lxr.free-electrons.com/source/include/uapi/linux/if_ether.h#L120
You may want to look at docs too:
https://www.kernel.org/doc/Documentation/networking/can.txt
Regards,

2016-10-17 9:05 GMT-02:00 Augusto Fraga Giachero :

> I've been reading the source code for the ECI driver and discovered that
> it only applies to PCI devices, the IXXAT CAN-to-USB Compact (V1.0) is
> accessed through libusb, so please, ignore the ECI Kernel module that
> I've attached in the last email.
>
> Thanks!
>
> On 17-10-2016 08:43, Augusto Fraga Giachero wrote:
> > Hello!
> >
> >
> > I recently started a project that uses the CAN serial protocol using
> > microcontrollers. I've got an IXXAT CAN-to-USB Compact (V1.0) adapter to
> > help debugging the CAN bus. The manufacturer of this adapter provides
> > the kernel driver and and userspace  libraries for Linux, but it uses a
> > custom API (ECI) instead of SocketCAN (and I really need to use
> > SocketCAN). The manufacturer also provides a SocketCAN driver but only
> > for the CAN-to-USB Compact (V2.0), so it doesn't with what I have.
> >
> >
> > I'm thinking in modifying the the SocketCAN driver to support the V1.0
> > adapter, but I don't have any experience in kernel driver development.
> > I've a solid C knowledge and a lot of experience in firmware development
> > for microcontrollers. Can someone show me where to find relevant
> > information regarding SocketCAN, USB drivers development? I don't know
> > if this challenge is above my skills.
> >
> >
> > I've attached both drivers and a patch for the usb-to-can_v2_socketcan
> > that substitutes the "netdev->trans_start =" deference to
> > "netif_trans_update(netdev);", so you can compile for kernels newer than
> > 4.4.
> >
> >
> >
> > Thanks!
> >
> >
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
*"Do or do not. There is no try"*
  *Yoda Master*
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Char device write repeating

2016-10-04 Thread Daniel.
Because the libc is calling it again based on what has been passed as
argument and what was received as return value. Here is one example
https://gist.github.com/gkos/5479135. I don't really know if this code is
working since I made it a long time ago.

Regards,

2016-10-04 12:05 GMT-03:00 Greg KH :

> On Tue, Oct 04, 2016 at 10:58:16AM -0400, Kenneth Adam Miller wrote:
> > I have a character device that I am calling write on and which is
> succeeding,
> > but which is repeatedly executing. I have hard coded the return value to
> one,
> > so I don't think the userland standard library is retrying but I could be
> > wrong. Can anybody tell me why write would be re-executed by the kernel
> and how
> > to fix it? I dont actually copy_from_user, I just need this in order to
> signal
> > kernel land.
>
> Do you have a pointer to your code somewhere?  This is a very common bug
> that people have...
>
> thanks,
>
> greg k-h
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
*"Do or do not. There is no try"*
  *Yoda Master*
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Linux Kernel Based Research Projects

2016-10-03 Thread Daniel Baluta
On Tue, Oct 4, 2016 at 4:08 AM, Robert P. J. Day  wrote:
> On Sun, 2 Oct 2016, Daniel Baluta wrote:
>
>> On Sun, Oct 2, 2016 at 2:54 PM, Shyam Saini  wrote:
>> > Hi everyone,
>> >
>> > I'm final year computer science undergraduate student. I want to do my
>> > major project based on linux kernel.
>> >
>> > Would you please suggest me some areas in the kernel which have some
>> > projects. To be more specific, I want know on going research areas in
>> > kernel. Or some ideas which are not yet implemented.
>>
>> Would you be interested in taking a look at lguest? [1]
>>
>> I will be having a presentation about lguest and how one learn
>> linux kernel internals by studying lguest code
>> this week at LinuxCon Europe [2]
>>
>> Porting it on x86_64 or any other architecture will be a very cool project
>> but I warn you it won't be trivial :).
>>
>> thanks,
>> Daniel.
>>
>> [1] http://lguest.ozlabs.org/
>> [2] http://sched.co/7o92
>
>   Reference [1] claims, "Those crazy guys at Red Hat have an
> experimental port of lguest to x86-64: you can grab their git tree."
> so why do you say porting to x86_64 wouldn't be trivial?

First of all because the linux kernel changed a lot since then.
Second, because I think their code wasn't upstream ready.

Daniel.

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


Re: Linux Kernel Based Research Projects

2016-10-03 Thread Daniel Baluta
On Mon, Oct 3, 2016 at 12:48 PM, shyam  wrote:
> Thanks a lot for your reply,
> I'ld like attend your session but right now I'm in India. So, couldn't
> manage everything so early to attend linuxCon Europe.
>
> Apart from this thing,
> I'ld like to work on lguest to port it on x86_64 architecture.
> May you please tell me why it is not been ported yet for x86_64 architecture
> and can we discuss it further and start work on its porting.

It is not yet ported because lack of time and experience with
x86_64 arch specifics in my case :).

Also, note that this is not a trivial task :), but I think it
worths the effort.

See here the discussion with people who worked on
porting it to x86_64.

https://marc.info/?l=lguest&m=131810934128197&w=2

thanks,
Daniel.

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


Re: Linux Kernel Based Research Projects

2016-10-02 Thread Daniel Baluta
On Sun, Oct 2, 2016 at 2:54 PM, Shyam Saini  wrote:
> Hi everyone,
>
> I'm final year computer science undergraduate student. I want to do my
> major project based on linux kernel.
>
> Would you please suggest me some areas in the kernel which have some
> projects. To be more specific, I want know on going research areas in
> kernel. Or some ideas which are not yet implemented.

Would you be interested in taking a look at lguest? [1]

I will be having a presentation about lguest and how one learn
linux kernel internals by studying lguest code
this week at LinuxCon Europe [2]

Porting it on x86_64 or any other architecture will be a very cool project
but I warn you it won't be trivial :).

thanks,
Daniel.

[1] http://lguest.ozlabs.org/
[2] http://sched.co/7o92

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


Re: SMP on different cores.

2016-09-22 Thread Daniel.
I know about i.MX6 which has Cortex-A7 + Cortex-M4... but I don't
think that M4 is handled by Linux but by some RTOS

2016-09-22 9:17 GMT-03:00 Greg KH :
> On Thu, Sep 22, 2016 at 04:46:12PM +0530, Madhu K wrote:
>> Hi All,
>>
>> If i want to enable SMP, cores should be of same version( ex: both
>> core should ARM 7 ) or we could enable SMP on different version.
>
> Do you have a machine that has cores of different versions of a CPU?  If
> so, what are they?
>
> thanks,
>
> greg k-h
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: SMP on different cores.

2016-09-22 Thread Daniel.
s/iMX6/iMX7/

2016-09-22 10:04 GMT-03:00 Daniel. :
> I know about i.MX6 which has Cortex-A7 + Cortex-M4... but I don't
> think that M4 is handled by Linux but by some RTOS
>
> 2016-09-22 9:17 GMT-03:00 Greg KH :
>> On Thu, Sep 22, 2016 at 04:46:12PM +0530, Madhu K wrote:
>>> Hi All,
>>>
>>> If i want to enable SMP, cores should be of same version( ex: both
>>> core should ARM 7 ) or we could enable SMP on different version.
>>
>> Do you have a machine that has cores of different versions of a CPU?  If
>> so, what are they?
>>
>> thanks,
>>
>> greg k-h
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
> --
> "Do or do not. There is no try"
>   Yoda Master



-- 
"Do or do not. There is no try"
  Yoda Master

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


What causes a recv syscall for a socket to sometimes return less than the request len?

2016-09-21 Thread Daniel Ellis
Howdy,

I understand that data fragmentation happens across TCP packets, and in my
case that is what is happening.  The packets I'm seeing usually run around
1450 in length, and are always cut into two packets at the 1400 mark.  This
works fine most of the time, since the call to recv is being passed a len
of 4096 (via Python's socket.recv, which I'm assuming is just a wrapper
around the system call).  But sometimes I'll get all of the data I request,
even across TCP packet boundaries (so the full 1450 bytes), and other
times, it stops at a single packet, at which point I need to make another
recv call.

This seems to be happening more when the box is under more load (both in a
network and CPU sense), but that might be a coincidence.  Are there some
internal buffers that I could be monitoring that would correlate with these
packets being flushed out quicker?

I've changed the underlying code to correctly call recv until all the data
has been received, but I am curious as to what's going on under the hood
that made this so sporadic (and a bit of a headache to track down).  Any
help would be appreciated!

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


Re: RF class driver

2016-09-21 Thread Daniel.
I was trying to make it out-of-tree, but seems not possible or not
easy spottable for me :)

2016-09-21 10:05 GMT-03:00 Daniel. :
> I look into it,
>
> Still I need to patch if_ether.h and add some ETH_P_*
>
> 2016-09-21 9:57 GMT-03:00 Hayward, Shaun :
>> It might be worth taking a look at the Socket CAN drivers 
>> (https://www.kernel.org/doc/Documentation/networking/can.txt). It’s not the 
>> same type of hardware as the RF devices you’re working with, but it is a 
>> case where a network interface was created for devices that are very 
>> different than Ethernet.
>>
>> Shaun
>>
>> On 9/21/16, 8:43 AM, "kernelnewbies-boun...@kernelnewbies.org on behalf of 
>> Daniel." > danielhi...@gmail.com> wrote:
>>
>> I have a driver for nRF24L01+ (not L0) I'm planing to submit it to
>> main line but before that I was trying to make it a network device. My
>> dificult was to make it fit in the ethernet world since it does not
>> have anything in common to a network card. This one can be found here:
>> https://bitbucket.org/danielhilst/nrf24 the network try is here, but
>> is not finished: https://bitbucket.org/danielhilst/nrf24l01p
>>
>> 2016-09-21 7:08 GMT-03:00 Greg KH :
>> > On Wed, Sep 21, 2016 at 03:09:09PM +0530, Raul Piper wrote:
>> >> On Wed, Sep 21, 2016 at 1:13 PM, Greg KH  wrote:
>> >>  I wanted to know in which class RF Transceivers - (Sub 1 -Ghz
>> >> devices) Linux drivers will fall and where to find them in Linux
>> >> kernel ,
>> >>  I grepped keywords like Ghz, Sub , and it leads me to the folder
>> >> drivers/net/wireless/* but I am not getting whether they refer to the
>> >> RF class of drivers or something else.
>> >
>> > Those are wireless networking drivers.
>> >
>> >> Is there a framework for them or
>> >> all will come under Wireless device drivers or network device
>> >> drivers?What is the appropriate mailing list for the same?
>> >
>> > linux-wirel...@vger.kernel.org
>> >
>> >> Few example of such devices are -
>> >>
>> >> Sub-1 GHz CC1120-CC1190 - From Texas Instruments
>> >>
>> >> nRF905 - From Nordic Semiconductor
>> >>
>> >> nRF9E5 - From Nordic Semiconductor
>> >>
>> >> nRF24L01 - From Texas Instruments
>> >>
>> >> Si4455  - From Silicon Labs
>> >> OL23xx  - From Nxp.
>> >
>> > Those are almost always integrated directly into a wifi chipset, and 
>> not
>> > independant.  If you have an independant device, the GNU Radio project
>> > might be a good thing to look into.
>> >
>> > good luck!
>> >
>> > greg k-h
>> >
>> > ___
>> > Kernelnewbies mailing list
>> > Kernelnewbies@kernelnewbies.org
>> > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>>
>> --
>> "Do or do not. There is no try"
>>   Yoda Master
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>
>
>
> --
> "Do or do not. There is no try"
>   Yoda Master



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: RF class driver

2016-09-21 Thread Daniel.
I look into it,

Still I need to patch if_ether.h and add some ETH_P_*

2016-09-21 9:57 GMT-03:00 Hayward, Shaun :
> It might be worth taking a look at the Socket CAN drivers 
> (https://www.kernel.org/doc/Documentation/networking/can.txt). It’s not the 
> same type of hardware as the RF devices you’re working with, but it is a case 
> where a network interface was created for devices that are very different 
> than Ethernet.
>
> Shaun
>
> On 9/21/16, 8:43 AM, "kernelnewbies-boun...@kernelnewbies.org on behalf of 
> Daniel."  danielhi...@gmail.com> wrote:
>
> I have a driver for nRF24L01+ (not L0) I'm planing to submit it to
> main line but before that I was trying to make it a network device. My
> dificult was to make it fit in the ethernet world since it does not
> have anything in common to a network card. This one can be found here:
> https://bitbucket.org/danielhilst/nrf24 the network try is here, but
> is not finished: https://bitbucket.org/danielhilst/nrf24l01p
>
> 2016-09-21 7:08 GMT-03:00 Greg KH :
> > On Wed, Sep 21, 2016 at 03:09:09PM +0530, Raul Piper wrote:
> >> On Wed, Sep 21, 2016 at 1:13 PM, Greg KH  wrote:
> >>  I wanted to know in which class RF Transceivers - (Sub 1 -Ghz
> >> devices) Linux drivers will fall and where to find them in Linux
> >> kernel ,
> >>  I grepped keywords like Ghz, Sub , and it leads me to the folder
> >> drivers/net/wireless/* but I am not getting whether they refer to the
> >> RF class of drivers or something else.
> >
> > Those are wireless networking drivers.
> >
> >> Is there a framework for them or
> >> all will come under Wireless device drivers or network device
> >> drivers?What is the appropriate mailing list for the same?
> >
> > linux-wirel...@vger.kernel.org
> >
> >> Few example of such devices are -
> >>
> >> Sub-1 GHz CC1120-CC1190 - From Texas Instruments
> >>
> >> nRF905 - From Nordic Semiconductor
> >>
> >> nRF9E5 - From Nordic Semiconductor
> >>
> >> nRF24L01 - From Texas Instruments
> >>
> >> Si4455  - From Silicon Labs
> >> OL23xx  - From Nxp.
> >
> > Those are almost always integrated directly into a wifi chipset, and not
> > independant.  If you have an independant device, the GNU Radio project
> > might be a good thing to look into.
> >
> > good luck!
> >
> > greg k-h
> >
> > ___
> > Kernelnewbies mailing list
> > Kernelnewbies@kernelnewbies.org
> > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
> --
> "Do or do not. There is no try"
>   Yoda Master
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: RF class driver

2016-09-21 Thread Daniel.
I have a driver for nRF24L01+ (not L0) I'm planing to submit it to
main line but before that I was trying to make it a network device. My
dificult was to make it fit in the ethernet world since it does not
have anything in common to a network card. This one can be found here:
https://bitbucket.org/danielhilst/nrf24 the network try is here, but
is not finished: https://bitbucket.org/danielhilst/nrf24l01p

2016-09-21 7:08 GMT-03:00 Greg KH :
> On Wed, Sep 21, 2016 at 03:09:09PM +0530, Raul Piper wrote:
>> On Wed, Sep 21, 2016 at 1:13 PM, Greg KH  wrote:
>>  I wanted to know in which class RF Transceivers - (Sub 1 -Ghz
>> devices) Linux drivers will fall and where to find them in Linux
>> kernel ,
>>  I grepped keywords like Ghz, Sub , and it leads me to the folder
>> drivers/net/wireless/* but I am not getting whether they refer to the
>> RF class of drivers or something else.
>
> Those are wireless networking drivers.
>
>> Is there a framework for them or
>> all will come under Wireless device drivers or network device
>> drivers?What is the appropriate mailing list for the same?
>
> linux-wirel...@vger.kernel.org
>
>> Few example of such devices are -
>>
>> Sub-1 GHz CC1120-CC1190 - From Texas Instruments
>>
>> nRF905 - From Nordic Semiconductor
>>
>> nRF9E5 - From Nordic Semiconductor
>>
>> nRF24L01 - From Texas Instruments
>>
>> Si4455  - From Silicon Labs
>> OL23xx  - From Nxp.
>
> Those are almost always integrated directly into a wifi chipset, and not
> independant.  If you have an independant device, the GNU Radio project
> might be a good thing to look into.
>
> good luck!
>
> greg k-h
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
"Do or do not. There is no try"
  Yoda Master

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


ndo_start_xmit what to return when packet is too big!?

2016-09-19 Thread Daniel.
Hi everybody,

I was looking at network chapter of LDD3. The .ndo_start_xmit member
of struct net_device_ops should return netdev_tx_t which are:
enum netdev_tx {
__NETDEV_TX_MIN  = INT_MIN, /* make sure enum is signed */
NETDEV_TX_OK = 0x00,/* driver took care of packet */
NETDEV_TX_BUSY   = 0x10,/* driver tx path was busy*/
NETDEV_TX_LOCKED = 0x20,/* driver tx lock was already taken */
};


I'm deling with some awkward hardware where the MTU is only 32 bytes
and was wondering. What should that function return in case of "too
large packet"?!?!?

Best regards,

-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: Getting stacktrace for userspace applications on crash(SIGSEGV)

2016-09-12 Thread Daniel.
Ohhh, I see, Thansk Johannes, now everything make sense. If this was a
post I would mark it as SOLVED :)

Best regards,

2016-09-11 14:39 GMT-03:00 Johannes Thoma :
> Hi,
>
> Am 10.09.16 um 05:18 schrieb Daniel.:
>>
>> Yeap it is. The protocol takes 4 threads the other are user's threads.
>> Still, when getting some core dump and fatal error log I was expecting
>> to get backtrace from the thread responsible for the segmentation
>> fault? Am I wrong?
>
> AFAIK a signal (like SIGSEGV) is always sent to the whole process not to
> a specific thread. Therefore gdb cannot know which thread caused the
> segfault (except if it would analyse the assembly which it doesn't). So,
> unfortunately you'll have to find the misbehaving thread by yourself ..
>
> Best,
>
> - Johannes
>>
>> Thanks for the help and best regards!!!
>
> ;)
>



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: Extend device driver?

2016-09-10 Thread Daniel.
You may want to look at http://www.signal11.us/oss/hidapi/ too, it has
nice interface to HID device and supports libusb and hidraw backends
(y)

Regards,

2016-09-10 12:14 GMT-03:00 Greg KH :
> On Sat, Sep 10, 2016 at 04:41:34PM +0200, Pol Eyschen wrote:
>> Hi everyone,
>>
>> I want to implement some custom functions of my mouse (Madcatz RAT5) in
>> Linux, e.g custom DPI-values. As this requires writing over USB to the
>> firmware of the mouse I was thinking of writing a module to accomplish
>> this. However I don't want to reimplement a whole mouse-driver,so I
>> wanted to ask if there is a possibility of binding the device to 2
>> modules or having my module extend usbhid, so that my module would only
>> be used to perform these custom operations while usbhid stays in charge
>> of the whole "mouse business".
>
> Please just use the hidraw userspace driver/library instead, that way
> you don't have to unbind the kernel driver and everything should work
> just fine without having to touch the kernel at all.
>
> Hope this helps,
>
> greg k-h
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: Getting stacktrace for userspace applications on crash(SIGSEGV)

2016-09-09 Thread Daniel.
Yeap it is. The protocol takes 4 threads the other are user's threads.
Still, when getting some core dump and fatal error log I was expecting
to get backtrace from the thread responsible for the segmentation
fault? Am I wrong?

Thanks for the help and best regards!!!

2016-09-09 18:42 GMT-03:00 Johannes Thoma :
> Hi,
>
> Is it a multi threading application? Type
>
> info threads
>
> in gdb to find out. With
>
> thread threadnum
>
> you can switch between threads and then display the other backtraces with
>
> bt
>
> Hope that helps.
>
> Best
>
> Johannes



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: Getting stacktrace for userspace applications on crash(SIGSEGV)

2016-09-09 Thread Daniel.
Hi Harish, thank you for replying me :)

Here it is a sample of what I see:

(gdb) bt
#0  0x76e5ed64 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x76e627f8 in __GI_abort () at abort.c:89
#2  0x76831b7c in ?? () from /opt/jdk1.8.0_60/jre/lib/arm/client/libjvm.so
#3  0x76831b7c in ?? () from /opt/jdk1.8.0_60/jre/lib/arm/client/libjvm.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)


Best regards,

2016-09-09 17:00 GMT-03:00 Harish :
>
>My guess is that gdb is failing to walk the Java frames. Could you post 
> what you see in the gdb when you ask for the backtrace? I can possibly try 
> and help then.
>
> Regards,
> Harish
>
>> On 10-Sep-2016, at 12:46 AM, Rami Rosen  wrote:
>>
>> Hi,
>> Do u know where in the kernel it crashes and can add dump_stack()
>> there and try ? I used dump_stack() in the past many times and it
>> worked for me. IIRC, kernel hacking->Kernel debugging was selected in
>> my kernekl config, and I did not had to to anything else
>>
>> Regards,
>> Rami Rosen
>> http://ramirose.wix.com/ramirosen
>>
>>
>>> On 9 September 2016 at 21:21, Daniel.  wrote:
>>> Hi everybody,
>>>
>>> I'm debugging a library that implement some nasty protocol. This
>>> library is used by some JNI library which exports the native library
>>> to Java world. By the way I'm running on ARMv7.
>>>
>>> Well, some times, at random times, that library crashes. The problem
>>> is that I can't get stacktrace. Not from JVM's fatal errors logs, not
>>> from core dumps, not from libSegFault... I'm using "-g -rdynamic
>>> -funwind-tables -mapcs-frame" compiler options but still I can't get a
>>> stacktrace. I've tried using glibc backtrace too. What I don't tried
>>> yet: libunwind, valgrid and making kernel do the stacktrace. The cool
>>> part is that when I ran my library outside from the JVM (with native
>>> application) I do get backtraces! [Damn Java]
>>>
>>> I'm here to ask: Is it possible to make kernel print the stacktrace
>>> for some userspace application when it crashes?
>>>
>>> I saw USER_STACKTRACE_SUPPORT but can't find any help from it's
>>> Kconfig. I saw this https://kernelnewbies.org/FAQ/StackTrace and this
>>> http://processors.wiki.ti.com/index.php/Enabling_Stack_Dumping_in_Linux_Kernel
>>> but can't find "Kernel hacking -> Verbose kernel error messages" even
>>> with "Kernel hacking -> Kernel Debuggin" enabled.
>>>
>>> Any help is appreciated! Thanks !!!
>>>
>>> --
>>> "Do or do not. There is no try"
>>>  Yoda Master
>>>
>>> ___
>>> Kernelnewbies mailing list
>>> Kernelnewbies@kernelnewbies.org
>>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: Getting stacktrace for userspace applications on crash(SIGSEGV)

2016-09-09 Thread Daniel.
Hi Rami
Thanks for your reply

I'm asking if I can use kernel to dump a stacktrace for a userspace
app instead of kernel code. I'm trying that as last resource since
gdb, libSegFault and JVM's fatal error log had failed,


Best regards,

2016-09-09 16:16 GMT-03:00 Rami Rosen :
> Hi,
> Do u know where in the kernel it crashes and can add dump_stack()
> there and try ? I used dump_stack() in the past many times and it
> worked for me. IIRC, kernel hacking->Kernel debugging was selected in
> my kernekl config, and I did not had to to anything else
>
> Regards,
> Rami Rosen
> http://ramirose.wix.com/ramirosen
>
>
> On 9 September 2016 at 21:21, Daniel.  wrote:
>> Hi everybody,
>>
>> I'm debugging a library that implement some nasty protocol. This
>> library is used by some JNI library which exports the native library
>> to Java world. By the way I'm running on ARMv7.
>>
>> Well, some times, at random times, that library crashes. The problem
>> is that I can't get stacktrace. Not from JVM's fatal errors logs, not
>> from core dumps, not from libSegFault... I'm using "-g -rdynamic
>> -funwind-tables -mapcs-frame" compiler options but still I can't get a
>> stacktrace. I've tried using glibc backtrace too. What I don't tried
>> yet: libunwind, valgrid and making kernel do the stacktrace. The cool
>> part is that when I ran my library outside from the JVM (with native
>> application) I do get backtraces! [Damn Java]
>>
>> I'm here to ask: Is it possible to make kernel print the stacktrace
>> for some userspace application when it crashes?
>>
>> I saw USER_STACKTRACE_SUPPORT but can't find any help from it's
>> Kconfig. I saw this https://kernelnewbies.org/FAQ/StackTrace and this
>> http://processors.wiki.ti.com/index.php/Enabling_Stack_Dumping_in_Linux_Kernel
>> but can't find "Kernel hacking -> Verbose kernel error messages" even
>> with "Kernel hacking -> Kernel Debuggin" enabled.
>>
>> Any help is appreciated! Thanks !!!
>>
>> --
>> "Do or do not. There is no try"
>>   Yoda Master
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
"Do or do not. There is no try"
  Yoda Master

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


Getting stacktrace for userspace applications on crash(SIGSEGV)

2016-09-09 Thread Daniel.
Hi everybody,

I'm debugging a library that implement some nasty protocol. This
library is used by some JNI library which exports the native library
to Java world. By the way I'm running on ARMv7.

Well, some times, at random times, that library crashes. The problem
is that I can't get stacktrace. Not from JVM's fatal errors logs, not
from core dumps, not from libSegFault... I'm using "-g -rdynamic
-funwind-tables -mapcs-frame" compiler options but still I can't get a
stacktrace. I've tried using glibc backtrace too. What I don't tried
yet: libunwind, valgrid and making kernel do the stacktrace. The cool
part is that when I ran my library outside from the JVM (with native
application) I do get backtraces! [Damn Java]

I'm here to ask: Is it possible to make kernel print the stacktrace
for some userspace application when it crashes?

I saw USER_STACKTRACE_SUPPORT but can't find any help from it's
Kconfig. I saw this https://kernelnewbies.org/FAQ/StackTrace and this
http://processors.wiki.ti.com/index.php/Enabling_Stack_Dumping_in_Linux_Kernel
but can't find "Kernel hacking -> Verbose kernel error messages" even
with "Kernel hacking -> Kernel Debuggin" enabled.

Any help is appreciated! Thanks !!!

-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: Request Chinese mail list and FrontPage

2016-09-06 Thread Daniel.
I agree with Ruben

We're opensource developers, when we are not happy with something, we
fork it... lol. Still, I'm brazillian and have already found other
brazillians at this list. When I want to talk in portuguese I send a
message directly to they, no problem at all. If you see some good
chinese hacker, talk to him. People are more accessible than we think.

2016-09-06 18:15 GMT-03:00 ruben :
>
>
> On 09/06/2016 08:29 AM, Anuz Pratap Singh Tomar wrote:
>> I don't see a reason why you shouldn't start one yourself and may be add
>> an entry to newbies website. The mention of such entry may or may not be
>> on front page of newbie website, that is something admins of site will
>> decide.
>
>
> it doesn't really matter and this is a waste of time.  We are not
> Chinese.  If we want a mailing list we just make one and post it on our
> web pages, we don't ask for permission.  If you want a chinese mailing
> list, go make one.
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: Network unreachable error when sending mail from mutt

2016-09-05 Thread Daniel.
I think this is not the best place to ask, you should look for some
network mail list, but, ... this type of message means that the
network layer can't find a route to google's smtp. See if you can ping
that addresses, probally no.. Looking at that timeout message, yes it
seems that you're being trolled by some firewall. I've tested here and
I do really can connect, see:

[geckos@csi24 ~]$ telnet smtp.gmail.com 465
Trying 74.125.141.109...
Connected to smtp.gmail.com.
Escape character is '^]'.
^C^PConnection closed by foreign host.
[geckos@csi24 ~]$ telnet smtp.gmail.com 587
Trying 74.125.141.108...
Connected to smtp.gmail.com.
Escape character is '^]'.
220 smtp.gmail.com ESMTP 21sm4315126uaj.17 - gsmtp
^C^C^C^]
telnet> quit
Connection closed.
[geckos@csi24 ~]$


Regards,

2016-09-05 13:29 GMT-03:00 Gargi Sharma :
> Hi all,
>
> I'm getting a "SMTP server problem Network is unreachable"  "Error sending
> message, child exited 69 (Service unavailable.). " when trying to send a
> mail using mutt.
>
> When I used  telnet smtp.gmail.com 587 or change the port to 465 I get
> Unable to connect to remote host: Network is unreachable.
>
> On trying
> openssl s_client -starttls smtp -crlf -connect smtp.gmail.com:587 I get -->
> connect: Connection timed out
> connect:errno=110
>
> How do I solve this? Is there a problem with the firewall?
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: Kernel Panic - not syncing: Attempted to kill init! exitcode=0x0000000b

2016-08-22 Thread Daniel.
The first process that the *nix starts after booting up is init. The
init process
which has pid 1 live for as long as the host do not reboot. That message
means that something has made init exit prematurely. Check your init.d, systemd
or whatever init system you're using...

Regards,

2016-08-22 9:04 GMT-03:00 Ricardo Ribalda Delgado :
> On Wed, Aug 17, 2016 at 7:05 AM, shobhit bhadani  
> wrote:
>>
>>>Which version of kernel are you using?
>>
>> I am using kernel 3.8
>
> Are you from the past? 3.8 was released more than 3 years ago!, Around
> the same day the metor exploted over Russia and the Pope resigned
> (coincidence, I do not think so).
>
>
> Jokes aside, no one is going to help you unless you use the latest
> version of the kernel.
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: doubt on schedule_work() - work task getting scheduled lately

2016-08-05 Thread Daniel.
ftrace :)

2016-08-05 4:22 GMT-03:00 Muni Sekhar :
> On Mon, Aug 1, 2016 at 6:34 PM, Daniel.  wrote:
>> Did you tried ftrace? 
>> https://www.kernel.org/doc/Documentation/trace/ftrace.txt
>>
>> I've been using this to measure some latencies. The problem here is
>> visualizing the output. If you need someting more elaborated than
>> simple prints with timestamps and delta calculations, then you should
>> try something more complex. If not you can enable FTRACE and generate
>> trace output with delta timestamps on it, event for interrupts :)
>
> No, I haven't tried ftrace.
>
>
> I need to measure latencies between schedule_work() and actual
> execution start of my work function. workqueue_queue_work &
> workqueue_execute_start are their corresponding lttng events.
>
>  I installed the lttng in my test setup and simply enabled all
> available kernel events.
>
> I am able to start & stop tracing.
>
>
> Few lines of lttng view trace:
>
> [11:07:08.208795325] (+0.01677) testbox irq_handler_entry: {
> cpu_id = 1 }, { irq = 16, name = "debug_irq" }
>
> [11:07:08.208822703] (+0.27378) testbox workqueue_queue_work: {
> cpu_id = 1 }, { work = 0x8801396D4F18, function =
> 0xC07273B0, req_cpu = 256 }
>
> [11:07:08.208824380] (+0.01677) testbox workqueue_activate_work: {
> cpu_id = 1 }, { work = 0x8801396D4F18 }
>
> [11:07:08.208826615] (+0.02235) testbox irq_handler_exit: { cpu_id
> = 1 }, { irq = 16, ret = 1 }
>
> [11:07:08.208831364] (+0.04749) testbox workqueue_execute_start: {
> cpu_id = 1 }, { work = 0x8801396D4F18, function =
> 0xC07273B0 }
>
> [11:07:08.208841422] (+0.10058) testbox workqueue_execute_end: {
> cpu_id = 1 }, { work = 0x8801396D4F18 }
>
>
> Can it be possible to print function name instead of ‘function =
> 0xC07273B0’?
>
>
>
> Reproducing the 100 msec latency in between workqueue_queue_work &
> workqueue_execute_start needs to trigger the longer soak test anything
> over 24 hours.
>
>
> If I record the lttng trace for longer hours and when I 'lttng view'
> the trace, I get all sorts of messages like:
>
>
> "[warning] Tracer discarded  events between  and
> .  You  should consider recording a new trace with larger
> buffers or with fewer events enabled."
>
>
> Any better ideas to catch the kernel trace event log for millisecond
> latency in between workqueue_queue_work & workqueue_execute_start?
>
>
>
>>
>> Best regards,
>>
>> 2016-08-01 7:32 GMT-03:00 Muni Sekhar :
>>> On Fri, Jul 29, 2016 at 9:05 PM, Daniel.  wrote:
>>>> Nice tool @Ricardo!
>>>>
>>>> 2016-07-29 10:48 GMT-03:00 Ricardo Ribalda Delgado 
>>>> :
>>>>> you can use http://lttng.org/ for analyzing this
>>> Thanks Ricardo, I will use this.
>>>
>>>>>
>>>>> Regards!
>>>>>
>>>>> On Fri, Jul 29, 2016 at 12:44 PM, Pranay Srivastava  
>>>>> wrote:
>>>>>> On Fri, Jul 29, 2016 at 4:02 PM, Muni Sekhar  
>>>>>> wrote:
>>>>>>> Hi All,
>>>>>>>
>>>>>>> I have a doubt regarding the workqueue scheduling.
>>>>>>>
>>>>>>> I am using the workqueue for processing the Rx Interrupt data. I am
>>>>>>> calling schedule_work() on receiving the Rx interrupt from hardware.
>>>>>>>
>>>>>>> I calculated the time between calling the schedule_work() and
>>>>>>> workqueue task actually getting executed, Here I see many cases of
>>>>>>> less than 100 us(It is fairly good).
>>>>>>>
>>>>>>> But sometimes I see 10’s of ms and a lot in the 100’s of ms. I have
>>>>>>> seen over 0.5 secs too. I would like to know why does sometimes kernel
>>>>>>> takes longer time(in milli seconds) to schedule it? Is there any way
>>>>>>> to reduce this time gap?
>>>>>>>
>>>>>>>
>>>>>>> My code:
>>>>>>>
>>>>>>> static void my_workqueuetask(struct work_struct *work)
>>>>>>> {
>>>>>>> printk("In %s() \n",__func__);
>>>>>>>
>>>>>> You probably don't need this if it's just for your work_fn, yeah but
>>>>>> if there's race be

spi device probe not carring device tree pointer, how to troubleshoot?

2016-08-04 Thread Daniel.
Hi everybody.

I'm trying to get one of my drivers working on top of this[1]. My
driver gets probed but spi->dev.of_node is NULL. Does anybody knows
where spi->dev.of_node gets setted!? Here is a sample [2].

[1] https://github.com/daniel-santos/mcp2210-linux
[2] https://gist.github.com/gkos/b54054b345afc4239e92f8adde99788e

-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: How to debug ethernet driver ?

2016-08-04 Thread Daniel Baluta
On Mon, Aug 1, 2016 at 10:26 PM, Ran Shalit  wrote:
> Hello,
>
> I am writing ethernet network driver.
> I would like to ask if there are any steps which can help when
> debugging ethernet driver, or is it that the first test should already
> involve transmit/recieve packets to/from ip stack ?
>
> Any tips for debugging and testing a new ethernet driver will be appreciated,

You can start by testing the loopback mode (perhaps). Also, use wireshark
or tcpdump for capturing the packets.

Daniel.

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


Re: Stupid question regarding bogomips and udelay()

2016-08-02 Thread Daniel.
I *guess* that the value is calculated at boot, in real mode (for x86)
when no clock variation takes place. Take a look at the source... :)

http://lxr.free-electrons.com/source/arch/x86/realmode/rm/wakemain.c?v=4.0#L4

It brings me to some io magic which I can't grasp :) good luck!

Regards,

2016-08-02 5:27 GMT-03:00 Aleksander Alekseev :
>> Makes sense. Do you have such machine? Did you try to get bogomips
>> and then reduce your CPU count / speed and get that number again?
>>
>> Maybe this value is now dynamic.
>
> Doesn't look like this. On my laptop CPU frequency changes all the time
> by "powersafe" governor, but bogomips doesn't change:
>
> $ cpufreq-info | grep 'current CPU frequency'
>   current CPU frequency is 2.30 GHz.
>   current CPU frequency is 2.09 GHz.
>   current CPU frequency is 2.30 GHz.
>   current CPU frequency is 1.78 GHz.
>   current CPU frequency is 2.30 GHz.
>   current CPU frequency is 2.14 GHz.
>   current CPU frequency is 2.30 GHz.
>   current CPU frequency is 2.30 GHz.
>
> $ cat /proc/cpuinfo | grep bogomips
> bogomips: 4589.79
> bogomips: 4589.79
> bogomips: 4589.79
> bogomips: 4589.79
> bogomips: 4589.79
> bogomips: 4589.79
> bogomips: 4589.79
> bogomips: 4589.79
>
> It should also be noted that 4 of 8 cores are in fact not real, Hyper
> Threading cores. In best case they execute like 10% of a real core time.
>
>> Also, did you actually try udealay() in high/low frequency to see
>> wether you see an actual difference between runs?
>
> I'm afraid I didn't write a single LKM so far. Sounds like a good idea
> for the first one though. However I wonder how exactly should I measure
> this difference? IIRC absolute time is measured by kernel in tens of
> _milli_seconds [1]. So to get accurate results I should block a kernel
> with udelay() for hundreds of millisends at least.
>
> Is it even save? And can I really do this without affecting measurement
> results? Let's say interrupt handler will be disabled somehow for this
> time. In this case time couldn't be measured. Otherwise udelay() will
> be interrupted many times. I doubt we can call measurement results
> accurate in this case.
>
> As I understand an experiment should be like this:
>
> 1. set cpu frequencies to X
> 2. x <- current jiffies value
> 3. udelay for say 1 second
> 4. y <- current jiffies value
> 5. calculate delta1 = y - x
> 6. set cpu frequencies to X / 2
> 7. delta2 = { repeat steps 2-5 }
> 8. compare delta1 and delta2
> 9. repeat 1-8 N times just in case
>
> In theory, if udelay() really guarantees something, delta1 and delta2
> sould be approximately equal. Otherwise delta1 and delta2 should always
> differ significantly. It also makes sense to cross-check set of
> delta1's values to make sure that HT doesn't affect it (or does it?).
>
> Does all this sounds reasonable?
>
> [1] http://www.makelinux.net/books/lkd2/ch10lev1sec2
>
> --
> Best regards,
> Aleksander Alekseev
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: doubt on schedule_work() - work task getting scheduled lately

2016-08-01 Thread Daniel.
Did you tried ftrace? https://www.kernel.org/doc/Documentation/trace/ftrace.txt

I've been using this to measure some latencies. The problem here is
visualizing the output. If you need someting more elaborated than
simple prints with timestamps and delta calculations, then you should
try something more complex. If not you can enable FTRACE and generate
trace output with delta timestamps on it, event for interrupts :)

Best regards,

2016-08-01 7:32 GMT-03:00 Muni Sekhar :
> On Fri, Jul 29, 2016 at 9:05 PM, Daniel.  wrote:
>> Nice tool @Ricardo!
>>
>> 2016-07-29 10:48 GMT-03:00 Ricardo Ribalda Delgado 
>> :
>>> you can use http://lttng.org/ for analyzing this
> Thanks Ricardo, I will use this.
>
>>>
>>> Regards!
>>>
>>> On Fri, Jul 29, 2016 at 12:44 PM, Pranay Srivastava  
>>> wrote:
>>>> On Fri, Jul 29, 2016 at 4:02 PM, Muni Sekhar  
>>>> wrote:
>>>>> Hi All,
>>>>>
>>>>> I have a doubt regarding the workqueue scheduling.
>>>>>
>>>>> I am using the workqueue for processing the Rx Interrupt data. I am
>>>>> calling schedule_work() on receiving the Rx interrupt from hardware.
>>>>>
>>>>> I calculated the time between calling the schedule_work() and
>>>>> workqueue task actually getting executed, Here I see many cases of
>>>>> less than 100 us(It is fairly good).
>>>>>
>>>>> But sometimes I see 10’s of ms and a lot in the 100’s of ms. I have
>>>>> seen over 0.5 secs too. I would like to know why does sometimes kernel
>>>>> takes longer time(in milli seconds) to schedule it? Is there any way
>>>>> to reduce this time gap?
>>>>>
>>>>>
>>>>> My code:
>>>>>
>>>>> static void my_workqueuetask(struct work_struct *work)
>>>>> {
>>>>> printk("In %s() \n",__func__);
>>>>>
>>>> You probably don't need this if it's just for your work_fn, yeah but
>>>> if there's race between this and something else...
>>>>> mutex_lock(&bh_mutex);
>>>>>
>>>>> //Do something here
>>>>>
>>>>> mutex_unlock(&bh_mutex);
>>>>> }
>>>>>
>>>>>
>>>>> static irqreturn_t my_irq_handler(int irq, void *dev)
>>>>> {
>>>>> ……;
>>>>>
>>>>> if(Rx Interrupt)
>>>>>  schedule_work(&rx_work);
>>>>
>>>> Maybe system_wq has too much already on it's plate?
>>>> Have you tried the same with completion and a kthread? or
>>>> with your own workqueue, overkill but you can give it a shot.
> I have not tried this. First I will analyze with lttng and then
> attempts this. Does using our own workqueue reduces the latency?
>
>>>>>
>>>>> return IRQ_HANDLED;
>>>>> }
>>>>>
>>>>> --
>>>>> Thanks,
>>>>> Sekhar
>>>>>
>>>>> ___
>>>>> Kernelnewbies mailing list
>>>>> Kernelnewbies@kernelnewbies.org
>>>>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>>
>>>>
>>>>
>>>> --
>>>> ---P.K.S
>>>>
>>>> ___
>>>> Kernelnewbies mailing list
>>>> Kernelnewbies@kernelnewbies.org
>>>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>
>>>
>>>
>>> --
>>> Ricardo Ribalda
>>>
>>> ___
>>> Kernelnewbies mailing list
>>> Kernelnewbies@kernelnewbies.org
>>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>>
>> --
>> "Do or do not. There is no try"
>>   Yoda Master
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
> --
> Thanks,
> Sekhar



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: doubt on schedule_work() - work task getting scheduled lately

2016-07-29 Thread Daniel.
Nice tool @Ricardo!

2016-07-29 10:48 GMT-03:00 Ricardo Ribalda Delgado :
> you can use http://lttng.org/ for analyzing this
>
> Regards!
>
> On Fri, Jul 29, 2016 at 12:44 PM, Pranay Srivastava  wrote:
>> On Fri, Jul 29, 2016 at 4:02 PM, Muni Sekhar  wrote:
>>> Hi All,
>>>
>>> I have a doubt regarding the workqueue scheduling.
>>>
>>> I am using the workqueue for processing the Rx Interrupt data. I am
>>> calling schedule_work() on receiving the Rx interrupt from hardware.
>>>
>>> I calculated the time between calling the schedule_work() and
>>> workqueue task actually getting executed, Here I see many cases of
>>> less than 100 us(It is fairly good).
>>>
>>> But sometimes I see 10’s of ms and a lot in the 100’s of ms. I have
>>> seen over 0.5 secs too. I would like to know why does sometimes kernel
>>> takes longer time(in milli seconds) to schedule it? Is there any way
>>> to reduce this time gap?
>>>
>>>
>>> My code:
>>>
>>> static void my_workqueuetask(struct work_struct *work)
>>> {
>>> printk("In %s() \n",__func__);
>>>
>> You probably don't need this if it's just for your work_fn, yeah but
>> if there's race between this and something else...
>>> mutex_lock(&bh_mutex);
>>>
>>> //Do something here
>>>
>>> mutex_unlock(&bh_mutex);
>>> }
>>>
>>>
>>> static irqreturn_t my_irq_handler(int irq, void *dev)
>>> {
>>> ……;
>>>
>>> if(Rx Interrupt)
>>>  schedule_work(&rx_work);
>>
>> Maybe system_wq has too much already on it's plate?
>> Have you tried the same with completion and a kthread? or
>> with your own workqueue, overkill but you can give it a shot.
>>>
>>> return IRQ_HANDLED;
>>> }
>>>
>>> --
>>> Thanks,
>>> Sekhar
>>>
>>> ___
>>> Kernelnewbies mailing list
>>> Kernelnewbies@kernelnewbies.org
>>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>>
>> --
>> ---P.K.S
>>
>> ___
>> Kernelnewbies mailing list
>> Kernelnewbies@kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
> --
> Ricardo Ribalda
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
"Do or do not. There is no try"
  Yoda Master

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


Interrutp from USB I/O Expander.

2016-07-19 Thread Daniel.
Hi everybody.

I know that there are some GPIO lines that needs sleeping to get
actived/deactived, this is why we have the gpio_cansleep_*()
functions.

So, I'm planing using the Microchip MCP2210 which act as USB->SPI
bridge. The problem is that the SPI slave device has two extra lines,
one for IRQ and another for enabling the chip (CE). Since MCP2210 has
GPIOs too I was wondering about wiring IRQ and CE to some GPIO lines
and using it as general GPIO at host. My concern is if the IRQ line
through USB, if it would sleep, if would be possible to use it as
IRQ!?

The summarized setup is this

HOST -> usb bus -> MCP2210 <-- SPI bridge <- slave device spi lines
   '- GPIO 0
   <- slave device IRQ line
   '- GPIO 1
   <- slave device CE line

Any help is appreciated,
Best regards and thanks in advance!
-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: pushing other commits upstream

2016-07-18 Thread Daniel Baluta
On Mon, Jul 18, 2016 at 1:49 AM, Alexander Couzens  wrote:
> Hi,
>
> I would like to push patches from somebody else upstream.
> I'm talking of commits of the TI's beagleboard repo [1].
>
> What do I need to take care of?

Well, basically apply the patch from beagleboard repo into your repo. This
will keep the patch author and Signed-off-by line.

Then, add your Signed-off-by line and don't forget to Cc the original author.

Good luck.

:)

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


Re: spi can't read more than 64 bytes

2016-07-06 Thread Daniel.
Hi, isn't it possible that your hal_frame_read be called again prior
rf_rx_completion_handler is called, and because of this calling
spi_message_init on a spi_message that is in spi queue yet?

2016-07-06 10:25 GMT-03:00 Moti Cohen :
> Hi all,
>
>
>
> I'm trying to write a kernel device driver for a Freescale imx6 processor
> based board.
>
> This driver is using spi to communicate with a radio module (using linux
> spi.c).
>
> I managed to wr/rd from the module, however once I'm trying to read more
> than 64 bytes I'm getting coruppted data. here are some details:
>
>
>
>
> The SPI reading process goes as follows:
>
> 1.  Interrupt function is invoked from SPI device via dedicated GPIO
> line.
>
> 2.   The interrupt function performs asynchronous SPI read in the
> following order:
>
> 2.1   radio_trx_end_callback is called, as it is the registered call back
> function.
>
> 2.2   radio_trx_end_callback calls hal_frame_read function which prepares
> spi_message and spi_transfer structures and fill them with relevant data:
> spi_device , data tx, transfer len , complete handler , …
>
> 3.  The read itself  is done by calling to function spi_async
>
> 4.  The completion handler function is called and prints the read
> message, but trying to read more than 64 bytes in one transaction causes the
> read data to be corrupted.
>
> Any idea why am I seeing this behavior ?
>
> Is there (in Linux) any definition for the size to be read via the SPI ?
>
> The relevant variables and functions can be seen below:
>
> Thanks in advance for helping..
>
> __
>
> uint8_t rx_buf[200];
>
> uint8_t reg[200] = {HAL_TRX_CMD_FR, 0xff, 0xff};
>
> struct spi_transfer transfer;
>
> struct spi_message  spi_msg;
>
>
>
> // interrupt function
>
> //---
>
> static irq_handler_t radio_trx_end_callback(unsigned int irq, void *dev_id,
> struct pt_regs *regs)
>
> {
>
> hal_frame_read(irq, dev_id);
>
> return (irq_handler_t) IRQ_HANDLED;  // Announce that the IRQ has
> been handled correctly
>
> }
>
>
>
> //read function
>
> //---
>
> void hal_frame_read(unsigned int irq, void *dev_id)
>
> {
>
> int status;
>
> spi_device->irq = irq;
>
> spi_message_init(&spi_msg);
>
> spi_msg.spi = spi_device;
>
> spi_msg.complete = rf_rx_completion_handler;
>
> spi_msg.context = NULL;
>
> memset((uint8_t*)&transfer, 0, sizeof(transfer));
>
>
>
> memset(rx_buf, 0xFF, sizeof(rx_buf));
>
> memset(reg, 0xFF, sizeof(reg));
>
> reg[0] = HAL_TRX_CMD_FR;
>
> transfer.tx_buf = reg;
>
> transfer.len =64;
>
> transfer.rx_buf = rx_buf;
>
> spi_message_add_tail(&transfer, &spi_msg);
>
>
>
> memset(rx_buf, 0x0, sizeof(rx_buf));
>
> status = spi_async(spi_device, &spi_msg);
>
> return;
>
> }
>
>
>
> //read completion handler
>
> //---
>
> static void rf_rx_completion_handler(void *arg)
>
> {
>
> int ii;
>
>
>
> //print the received message
>
> printk("\npure message: rx_buf [1]-2=%02X\n  ", rx_buf [1]-2);
>
> for (ii=0; ii< rx_buf [1]-2; ii++)
>
> printk("%02X ", rx_buf [2+ii]);
>
>
>
>
>
> printk("\nframe len=%X actual len=%X
> status=%i\n",spi_msg.frame_length, spi_msg.actual_length, spi_msg.status);
>
>
>
> send_up_rf_event_to_workque(TRX_END_EVENT);
>
> }
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
"Do or do not. There is no try"
  Yoda Master

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


Linux Regulator userspace-consumer driver binding

2016-06-24 Thread Daniel Steger
I'm working on developing a driver for the max15301/15303 linear supply. I
eventually want to push this upstream. The regulator driver for the supply
has been created and loads properly. What I would like to do now is
regression test the driver from userspace. I noticed that there are two
different userspace drivers already present in the regulator framework. The
first is the userpsace-consumer driver. The second is the virtual regulator
driver. Both seem to create sysfs hooks for regulators.

I have enabled the userspace-consumer and virtual driver in the kernel
config. I can see that the modules are listed in the modules.builtin file.
What seems to confuse me is how to bind the consumer driver to the
regulator. Typically I would think this can be done in the device tree but
the userspace-consumer driver doesn't support device tree.

My question is, what is a good method to bind the userspace-consumer driver
to the regulator under test? Would it be more appropriate to use the
userspace-consumer driver or virtual driver?

Thank you,
Daniel
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: What is the point of this function?

2016-06-22 Thread Daniel.
The function body you see will be use only when CONFIG_SMP is not
present. Take a look at
https://www.kernel.org/doc/Documentation/CodingStyle
Chapter 20: Conditional Compilation

Regards,

2016-06-21 8:56 GMT-03:00 Andrea Benelli :
> So, it's just an override?
> Why return true and not false?
>
> Il 21 giu 2016 4:32 AM, "Nathan Williams"  ha scritto:
>>
>> On Tue, 2016-06-21 at 00:48 +0200, Andrea Benelli wrote:
>> > Hello, i was looking at the linux/sched.h (kernel version 4.6.2)
>> > source code and i found this function at line 1174:
>> >
>> > static inline bool cpus_share_cache(int this_cpu, int that_cpu)
>> > {
>> > return true;
>> > }
>> >
>> > I'm not able to understand the utility of a function that just return
>> > a true value.
>> > i've noticed that there are a lot of functions like this (function
>> > that just return a constant).
>>
>> Hi Andrea,
>>
>> That's the case for when CONFIG_SMP isn't defined. What happens when
>> CONFIG_SMP is defined?
>>
>> I suggest having a look through the code with a Linux cross reference:
>>
>> http://lxr.free-electrons.com/ident?v=4.6;i=cpus_share_cache
>>
>> Regards,
>> Nathan
>>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>



-- 
"Do or do not. There is no try"
  Yoda Master

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


Re: looking for tutorials

2016-06-21 Thread Daniel Baluta
On Mon, Jun 13, 2016 at 5:43 PM, ty armour  wrote:
> I need tutorials on kernel development. And on complete operating system
> development. I would prefer them to be in assembly because it is faster, but
> it seriously needs to get done.
>
> If you are interested, simply post all of the tutorials and other relevant
> information to coding kernels that you can
>
> and show the references, like actually say okay so in order to do this we
> need to look for this in the assembler manual.
>
> Thanks and have fun

You can start by reading the code for lguest:

http://lxr.free-electrons.com/source/drivers/lguest

It has very good documentation and it covers a lot of
OS fundamental blocks.

Daniel.

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


Re: [PATCH] HC-SR04 ultrasonic ranger IIO driver

2016-06-01 Thread Daniel Baluta
On Wed, Jun 1, 2016 at 12:05 AM,   wrote:
> From: Johannes Thoma 
>
> The HC-SR04 is an ultrasonic distance sensor attached to two GPIO
> pins. The driver based on Industrial I/O (iio) subsystem and is
> controlled via configfs and sysfs. It supports an (in theory) unlimited
> number of HC-SR04 devices.
>
> Datasheet to the device can be found at:
>
> http://www.micropik.com/PDF/HCSR04.pdf
> Signed-off-by: Johannes Thoma 

Please send this to the linux-iio mailing list (linux-...@vger.kernel.org )

thanks,
Daniel.

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


Re: How to enable IIO driver in 3.18 kernel

2016-06-01 Thread Daniel Baluta
On Wed, Jun 1, 2016 at 5:26 PM, Munagala Naresh
 wrote:
> Thanks for the response.
>
> From the "cat /proc/devices", I could see "iio" listed like this.
>
> / # cat /proc/devices
> cat /proc/devices
> Character devices:
>   1 mem
>   4 /dev/vc/0
>   4 tty
>   5 /dev/tty
>   5 /dev/console
>   5 /dev/ptmx
>  --
> 250 iio
> 251 pps
>  -
>
> I could see few other deices @ /dev/. CONFIG_DEVTMPFS is not set in the
> def config. I will try it by adding "CONFIG_DEVTMPFS=y" and
> "CONFIG_DEVTMPFS_MOUNT=y".

Please don't use top posting.

You can look into /sys/bus/iio/devices/iio:device0/dev and get the
MAJOR and MINOR,
then create the device node manually, using:

mknod /dev/iio:device0 c MAJOR MINOR

Not sure why are you mentioning /proc/devices here.

thanks,
Daniel.

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


Re: make oldconfig forces HWMON to be inbuilt

2016-05-25 Thread Daniel Baluta
On Fri, May 20, 2016 at 7:35 AM, Ani Sinha  wrote:
> Hi guys :
>
> I am seeing this weird issue where even though my original kernel
> configuration tries to build HWMON as a module, when I do 'make
> oldconfig', it forces HWMON to be built into the kernel. Is there
> anyway I can find what configuration is forcing this change?
> CONFIG_HWMEM is a tristate symbol.

Did you mean CONFIG_HWMON?

Run make menuconfig and use / CONFIG_HWMON to find its
place in config hierarchy. It should be under "Device Drivers" ->
Hardware Monitoring Support.

Then press "?" to find more info about CONFIG_HWMON symbol.
Look for "Selected by".

thanks,
Daniel.

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


Re: git send-email

2016-05-22 Thread Daniel Baluta
On Sun, May 22, 2016 at 2:29 PM, Tobin Harding  wrote:
> Workflow -
>
> $ git format-patch -s -1
>
> add patch comment then
>
> $ git send-email
>
> Question please -
>
> Who should the email be sent to without having a 'To' address repeated in the 
> CC
> field generated by `git send-email`.
>
> To rephrase the question: git send-email CC's everyone who may be interested
> according to get_maintainers.pl. Will I annoy people if I address them in the 
> To
> field as well as the CC field.

I usually add only the maintainer and the mailing list as To: and the
rest in Cc.

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


Re: if block style when condition spams to multiple lines.

2016-05-20 Thread Daniel Baluta
On Thu, May 19, 2016 at 9:07 PM, Daniel.  wrote:
> What is the preferred way to ident if statement when the condition
> spams to multiple lines, ex:
>
> if (cond1 &&
> cond2 &&
> cond3) {
> ...
> ...
> }

^ this one is preferred.

>
> or
>
> if (cond1 &&
> cond2 &&
> cond3)
> {
>...
>...
> }
>
> or if only one statement inside body
>
> if (cond1 &&
> cond2 &&
> cond3
> ...
>
> Also, usualy, I align the remaining lines from codition to one
> column after the parenthesis that starts the condition and usually
> I need spaces to do that. Is that okay? With no spaces would be:
> if (cond1 &&
> cond2)
> {
> ...
>
> Regards,
> --
> "Do or do not. There is no try"
>   Yoda Master
>
> ___
> 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


  1   2   3   4   >