Jaap-Jan Boor | 1 Dec 09:18 2003

Re: mpc / linux kernel - user space

On Fri, 2003-11-28 at 16:42, Dan Malek wrote:
> Jaap-Jan Boor wrote:
> > If you want to send a signal to user code, you can use kill_proc()
> > I think.
> IMHO, trying to use signals to propagate a hardware interrupt to a
> user application is complicated and has design flaws (what happens
> if the application "misses" an interrupt or gets blocked for some
> reason).

Fortunately I never used it (that's the 'I think')

> A couple of other methods that I find simple and use extensively
> are multi-threading the application and then using a different
> minor ID device to wait on a read() or ioctl() to simply return.
> The driver just uses the standard sleep/wakeup mechanisms to
> synchronize with the application.
> Another, and I think most useful, method is to implement a select/poll
> entry point in the driver.  It provides the most flexibility when
> waiting for various events, plus provides a timeout should something
> fail to function properly.

Yes, especially the timeout is nice as 'this should never happen'
failures never happens except with the customer

(Continue reading)

Kevin A. Sapp | 1 Dec 13:51 2003

Peripherals Memory Mapping


Maybe this is a simple question, but I have searched the code
and played around with no luck.  This is for an 8260 FADS
board, later to be used on custom H/W.

How and where do I add peripherals memory to the memory
map?   I have tried adding it in the ads_map_io function but
when I try to access the 82xx internal memory space there to
add the memory to the base and option registers it dies.
io_block_mapping is called successfully for the internal
space, but appears to be inaccessable at this time.

Is there a function that adds memory ranges to both the Linux
map and the processor map (Base and Option registers) ?

Thank you

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Juergen Oberhofer | 1 Dec 14:47 2003

Re: mpc / linux kernel - user space

I tried to make use of wake_up_interruptible(wq) in my module as
following (I just wanted to test if I'm using it correctly):
If I'm doing insmod, the module blocks in the wake_up_interruptible call.
Does somebody know why? Maybe because there is no process sleeping? How do
I check this?


int sleepy_init(void) {
  test_file = create_proc_entry("test", 0666, NULL);
  if(test_file == NULL) {
    return -ENOMEM;


  return 0;

void sleepy_cleanup(void) {
remove_proc_entry("test", NULL);


Best regards,
(Continue reading)

praveen.nale | 1 Dec 09:17 2003

RE: pci mbx860

I could get PCI working on MBX860 with few changes to
qspan_pci.c file (see the patch below) on linux-2.4.21. Do
note that there are many copies of this file in different
directories (arch/ppc/kernel, arch/ppc/syslib,
arch/ppc/boot/simple). The one in boot/simple seems to be the
older one (qspan_init not required as PPC-BUG bootloader
initializes QSPAN correctly). I had patched the file in
ppc/kernel for linux-2.4.2x. Seems it is now moved to
ppc/syslib in linux-2.5/6 versions.

Another tip if you are working on MBX860 board. Both of my
boards had -12V on PC104-Plus bus missing! Do check pin A30 on
PC104+ for -12V. I had to provide an external -12V supply for
the PCI cards to make them work!



------% start of qspan.c patch %-------
--- qspan_pci-orig.c	2003-11-18 17:04:45.000000000 +0530
+++ qspan_pci.c	2003-11-24 09:21:58.000000000 +0530
 <at>  <at>  -83,7 +83,7  <at>  <at> 
 		"	.align 2\n"                   \
 		"	.long 1b,3b\n"                \
 		".text"                             \
-		: "=r"(x) : "r"(addr) : " %0")
(Continue reading)

Joakim Tjernlund | 1 Dec 15:35 2003

NAPI & 8xx/82xx enet.c driver?

Hi all

I wounder if anyone has done some measurement on 8xx/82xx
current driver v.s a NAPI(New API) converted driver and willing
to share the resluts?

NAPI(see Documentation/networking/NAPI_HOWTO.txt) is supposed to reduce #irqs
under high load, which will increase small packet throughput. It got backported
to 2.4(around 2.4.20)


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Brian Kuschak | 1 Dec 20:08 2003

Re: routing performance w/embedded linux on ppc?

Hi Vlad,

> Starting with 2.4.19 or so, I'd recommend looking at
> NAPI to do
> interrupt mitigation instead. Please look at
> ftp://robur.slu.se/pub/Linux/net-development/NAPI/

Yes, it looks interesting!  I'm glad this is being
introduced as a mechanism for all drivers to use.

I haven't had time to study it in detail, but I'm a
little concerned about NAPI using the softirq context.
 In the 2.4 kernels I've seen various performance
issues related to ksoftirqd.  Perhaps this has been
fixed in 2.6...

> > On top of that, you can implement
> > CONFIG_NET_FASTROUTE in the driver, bypassing most
> of
> > the IP stack.
> But, of course, you'll loose IP tables. Also,

Yes, an important point.


(Continue reading)

Mark A. Greer | 1 Dec 19:26 2003

Re: Cross Compiler running under Win32

Steven Scholz wrote:
> does someone know of a cross compiler (producing code for let's say
> MPC8xx) that is running natively under win32 (Windows2000/XP) without
> stuff like CYGWIN?
> I'am just wondering. Apparently MVISTA released their new "DevRocket"
> which is supposed to run under WindowsXP. So I assume they have cross
> compilers for "30 processors from 8 architectures" running under
> Windows...

FWIW, this is the mvista marketing spiel:


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Joakim Tjernlund | 2 Dec 00:00 2003

tx_full v.s tx_free race fix in 8xx_io/enet.c?

I don't see the race the tx_free patch fixes. So I tried to generate a race by running 3-4 parallel
ping floods from my Linux PC. Still no race/malfunction. So I removed the spin_lock_irq()/
spin_unlock_irq() in scc_enet_start_xmit(). Still no race/malfunction. I applied
the tx_free patch. Got an oops after only a few seconds. Added the spin_lock_irq()/
spin_unlock_irq() again. Now it worked again.

It seems to me that the old tx_full stuff is working better that the new tx_free. Which
race is it supposed to fix and how do I generate it?

This is the changeset that introduces tx_free:
http://ppc.bitkeeper.com:8080/linuxppc_2_4_devel/diffs/arch/ppc/8xx_io/enet.c <at>|src/.|src/arch|src/arch/ppc|src/arch/ppc/8xx_io|hist/arch/ppc/8xx_io/enet.c


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Marco Schramel | 2 Dec 08:48 2003



which is the most common kernel version used for embedded ppc (MPC8270)?
Where can i download it?



** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

hyding | 2 Dec 08:21 2003

gcc-3.3.1-glibc-2.3.2-binutils-2.14 cross compile kernel problems

    I have built cross-toolchain with gcc-3.3.1, binutils-2.14,
glibc-2.3.2 and linux-2.4.18 header files. I have succeeded in compiling
a test program with gcc into a static app. This test program runs well
in the target. But i failed to build kernel with gcc. The info is as

powerpc-ml300-linux-gnu-gcc -D__KERNEL__
-Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing
-fsigned-char -msoft-float -pipe -ffixed-r2 -Wno-uninitialized -mmultiple -mstring -Wa,-m405  
-DKBUILD_BASENAME=main -c -o init/main.o
In function
error: asm-specifier for variable `__sc_4' conflicts with asm clobber
error: asm-specifier for variable `__sc_5' conflicts with asm clobber
error: asm-specifier for variable `__sc_4' conflicts with asm clobber
error: asm-specifier for variable
(Continue reading)