- 28 Nov, 2014 20 commits
-
-
Alessandro Rubini authored
This header is almost obsolete, as we'll move to SDB soon. Meanwhile, sort out the tab/space mess and indent with spaces only, so it looks good to everybody (including greg who insists on one tab every 2 spaces -- which works for indentation, but not for for alignment at end-of-line). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
We'd better use less CPU power to run the HAL, even if this shows down response times for management queries (until we move most of it to shmem). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The code was hardwired to /dev/ttyS2 and 115200 baud. So we are sure nobody is using it, and it actually can't be used at all. If needed, we know it's in the history. Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Ackec-by: Grzegorz Daniluk <grzegorz.daniluk@cern.ch>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The compiler noted already, by not generating code. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
I didn't take all suggestions by Lindent, I avoided to commit the stupid ones (when on separate hunks). This mainly changes the spacing of "if( condition)", spaces after commas in arguments, the placing of the pointer symbol and the placement of braces. I would have avoided the last item, but it's not simple. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is a semi-automatic pass. To work on this I need to have it in 80 columns, and sanely indented. This pass is not changing brace placement or whatever: it is just a "fill-region" in emacs plus manual split of strings and shortening of comments. You can "git diff --word-diff=color" to check. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This allows private headers to be clearly private (in userspace/wrsw_hal/). rt_ipc.h is used by phytool too, so it is not private and is now in include/. As a side effect, remove -I../wrs_hal from makefile. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
To delay for less than 1ms (was: 10ms) we must busy-loop, because the kernel is jiffy-based. No way out of it. The implementation, however, was based on gettimeofday(), which means we couldn't really strace the hal process, as it appeared to only call gettimeofday all the time. This code uses a local software loop, after a calibration step of around 20ms (depends on CPU speed). Moreover, by calling usleep() for longer-than-1ms delays it doesn't use 100% cpu power during the initial led blinking. Now strace on the process shows what it really is doing (besides user-spac-only i2c accesses). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
We don't need to print binary and get mad with static storage. If any, we print hex. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
shw_malloc and shw_free are not used (well, i2c_free used shw_free, but there is no associated alloc anywhere, so I removed it too). The idea of a "malloc-or-exit" kind of function is good, but we'd better make sense of things (and simplify where unused legacy remains) before finding and fixing all unlikely error paths. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is a completely automatic pass, before we start making order in this library (note: there is a missing semicolon in pps_gen.c:82 but it will be fixed in a later commit -- the bug is in the macro being called, so the missing semicolon is ok for the compiler). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is the new IPC mechanism (not RPC) to pass port status and other status-like information among processes, to avoid lenghty RPC calls. Each WR process has 32k of shared space. Thanks to Adam for some fixes. Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Adam Wujek <adam.wujek@cern.ch>
-
Alessandro Rubini authored
This changes the kernel configuration, in two ways: 1- It uses CONFIG_NOHZ, which enables Hight Resolution Timers Unfortunately this has no effect, as the timeevent device for AT91 doesn't support oneshot mode. This means that if you usleep(100) you'll wait 10ms. Thus, we can't remove the busy-looping in libwr/util.c . This is the output of my libstamp sample program: 0.003 -- stamping overhead 12.243 -- usleep 1 usec 10.005 -- usleep 1 usec 9.963 -- usleep 2 usec 10.037 -- usleep 5 usec 10.083 -- usleep 10 usec 9.905 -- usleep 100 usec 10.394 -- usleep 1000 usec 19.775 -- usleep 10000 usec 109.925 -- usleep 100000 usec 2- It moves CONFIG_HZ from 100 to 1000. Thus, we have 1000 timer interrupts per second. This means, in practice, that if you usleep(100) you wait 1ms. This costs around 2% of CPU power (measured by running a cpu-busy program before and after the change, in both cases after killing all processes), but makes stuff millisecond-grained instead of 10ms-grained. This is a benefit for the PTP daemon and everything uses timeouts in system calls. This is libstamp again: 0.003 -- stamping overhead 0.662 -- usleep 1 usec 0.869 -- usleep 1 usec 0.976 -- usleep 2 usec 0.951 -- usleep 5 usec 0.993 -- usleep 10 usec 0.999 -- usleep 100 usec 1.999 -- usleep 1000 usec 11.006 -- usleep 10000 usec 101.043 -- usleep 100000 usec Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This updates binaries/wrboot-* to be more commented and complete. It also adds wrboot-install and wrboot-nand, that I personally used. As a side effect, "mem=64m" is removed by all command lines, as it has been properly autodetected for a few years now, so it is not needed any more. Documentation is updated too. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Grzegorz Daniluk authored
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 20 Nov, 2014 2 commits
-
-
Alessandro Rubini authored
-
Adam Wujek authored
Also, fix Makefiles accordingly. Signed-off-by: Adam Wujek <adam.wujek@cern.ch>
-
- 19 Nov, 2014 13 commits
-
-
Alessandro Rubini authored
This commit makes no changes, as shown by "git diff -w" before committing, but blank spaces at end-of-line make my editor scream (because I'm pedanting in not pushing those to the kernel). Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The header is not private to the library, wr_phytool uses it. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
The header is not private to the library: it is used by elsewhere. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 18 Nov, 2014 4 commits
-
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
termio setup is restored at exit; si save it initially even if we are not going to modify it. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
For unknown reasons, setting stdin to nonblocking mode has global effects, and thus every later command will get EAGAIN instead of a blocking read: vi: can't read user input wrs-192.168.16.242#cat cat: read error: Resource temporarily unavailable But wr_mon doesn't need non-blocking mode, because it uses poll on stdin. So instead of fixing, remove the source of the bug. Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
-
- 13 Nov, 2014 1 commit
-
-
Alessandro Rubini authored
-