LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: Re: SCC1 as serial console
From: Ladislav Klenovi? @ 2006-05-22 15:10 UTC (permalink / raw)
  To: linuxppc-embedded


>-----P?vodn? spr?va-----
>Od: Laurent Pinchart [mailto:laurent=2Epinchart@tbox=2Ebiz]
>Odoslan?: 22=2E m?ja 2006 14:12
>Komu: linuxppc-embedded@ozlabs=2Eorg
>Predmet: Re: SCC1 as serial console
>
>
>Hi Ladislav,
>
>> can anybody help me to setup the SCC1 port as serial console on MPC8=
60 with
>> kernel 2=2E6=2E15=2E4? I would like to use it as system console duri=
ng the
>> booting proccess=2E I can not get any output on serial console durin=
g booting
>> proccess, I use uboot=2E
>
>Does SCC1 work correctly in U-Boot ? If not, you should fix that first=
=2E I'll
>assume it does=2E

Yes, it works fine for kernel 2=2E4=2E22=2E

>There are many issues which could lead to a silent serial console=2E T=
he serial
>port could be misconfigured, or the kernel could crash for another rea=
son
>before the serial port is initialized=2E

I did a little experiment, I turn off the root file system so my kernel=
(system,=2E=2E) restart=20
after 180 seconds=2E When there was something wrong the there wasn't  s=
ystem restart=2E
But, ofcourse I CAN NOT be sure that this selince is due an another err=
or or I just can=20
not see the output=2E

>Have you been able to get a serial console on another serial port (SMC=
) ? Are
>the clock frequencies computed by U-Boot and passed to the Linux kerne=
l
>correct ?

Please can you explain how to get thi serial to SMC?

>
>Do you have a hardware debugger (BDI2000) that you can connect to the
>processor to see if Linux crashes before initializing the serial port =
? If
>not, you will probably have to take a try at led-debugging (make some =
leds
>blink at various point in the Linux kernel to try to find out what hap=
pens),
>but that's really no fun=2E
>
No I don't have any :(

Ladislav Klenovic_______________________________________________
>Linuxppc-embedded mailing list
>Linuxppc-embedded@ozlabs=2Eorg
>https://ozlabs=2Eorg/mailman/listinfo/linuxppc-embedded

^ permalink raw reply

* Re: [PATCH 1/5] powerpc: Make early xmon logic immune to location of early parsing
From: Tom Rini @ 2006-05-22 14:26 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <1148281388.24345.40.camel@localhost.localdomain>

On Mon, May 22, 2006 at 05:03:08PM +1000, Michael Ellerman wrote:
[snip]
> But as far as xmon and kgdb is concerned it really shouldn't matter that
> the parsing is happening earlier. Instead of calling directly into
> xmon/kgdb from the parsing code you set a global which is tested later.

Yes, so instead of one method of telling the kernel we want to have kgdb
asap, and one method of implementing that on all architectures we have
the command line parsed sometimes (and we just drop right in), other
architectures we need to write something to set a flag we check later,
and someone else writes something different for this on yet another
platform and we're back to where we started from.  That's my fear :)

-- 
Tom Rini

^ permalink raw reply

* Re: SCC1 as serial console
From: Laurent Pinchart @ 2006-05-22 14:12 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <e65a39032a7d4cdbbf87ecc1daa271cd@pobox.sk>

Hi Ladislav,

> can anybody help me to setup the SCC1 port as serial console on MPC860 with
> kernel 2.6.15.4? I would like to use it as system console during the
> booting proccess. I can not get any output on serial console during booting
> proccess, I use uboot.

Does SCC1 work correctly in U-Boot ? If not, you should fix that first. I'll 
assume it does.

There are many issues which could lead to a silent serial console. The serial 
port could be misconfigured, or the kernel could crash for another reason 
before the serial port is initialized.

Have you been able to get a serial console on another serial port (SMC) ? Are 
the clock frequencies computed by U-Boot and passed to the Linux kernel 
correct ?

Do you have a hardware debugger (BDI2000) that you can connect to the 
processor to see if Linux crashes before initializing the serial port ? If 
not, you will probably have to take a try at led-debugging (make some leds 
blink at various point in the Linux kernel to try to find out what happens), 
but that's really no fun.

Laurent Pinchart

^ permalink raw reply

* SCC1 as serial console
From: Ladislav Klenovič @ 2006-05-22 13:33 UTC (permalink / raw)
  To: linuxppc-embedded

Hi,
can anybody help me to setup the SCC1 port as serial console on MPC860 =
with kernel 2=2E6=2E15=2E4? I would like to use it as system console du=
ring the booting proccess=2E I can not get any output on serial console=
 during booting proccess, I use uboot=2E

thnx,
regards ladislav

^ permalink raw reply

* Preferred way to configure MTD physical mapping and partitioning
From: Thiago Galesi @ 2006-05-22 13:27 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linuxppc-embedded
In-Reply-To: <200605221500.00634.laurent.pinchart@tbox.biz>

> >
> > BTW, you can partition your flash via cmdline
>
> So would that be the preferred way to configure MTD partitions ?
>
> Laurent Pinchart
>
Using the mtdparts option in the boot cmdline. example

mtdparts=256k(partition1)ro,333k(partition2),444k(partition3),-(partition 4)

This will create /dev/mtd1, /dev/mtd2, etc, etc (and the corresponding
mtdblock devices) - you still have to create the inodes manually
(AFAIK) with the corresponding size, etc Using the '-' in the last
option uses all the remaining space. (as the ro option that makes the
partition read only. Useful for not overwriting your bootloader)

-- 
-
Thiago Galesi

^ permalink raw reply

* Re: "How to change the Magic number"
From: Wolfgang Denk @ 2006-05-22 13:00 UTC (permalink / raw)
  To: nreddy; +Cc: u-boot-users, linuxppc-embedded
In-Reply-To: <45530.61.95.208.2.1148300461.squirrel@61.95.208.2>

In message <45530.61.95.208.2.1148300461.squirrel@61.95.208.2> you wrote:
> 
>  I have a specific requirement to change the Magic number of the linux
> kernel in my embedded system.

You are off track.

>  I cound see the Magic number is defined in U-boot files:
>  1.include/image.h:#define IH_MAGIC        0x27051956
>  2.cpu/ppc4xx/start.S:     .long   0x27051956

This magic number is only used by U-Boot, and  ther  e  only  in  the
image header. It has no relevance in any way to the LInu xkernel.

>   So i can modify in u-boot to make it compatible to my Kernel (i am using
> montavista linux version 2.4.20), but i am not able to see this kindof
> info anywhere in the kernel source files.

You are looking at the wrong place. This magic number is not used  or
accessed anywhere in the Linu xkernel.

> If anyone knows how the linux magic number is generated and what are the
> files
>  need modifications inorder to change magic number please let me know.

Linux itself has no such magic number. Especially not on PPC.

[But if you find a way to change  that  magic  number,  I  would  not
protest  if  you  added 10 or 20 to the last 4 digits. Just make sure
the change is propagated back to it's origin. :-) ]

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
The easiest way to figure the cost of living is to take  your  income
and add ten percent.

^ permalink raw reply

* Preferred way to configure MTD physical mapping and partitioning
From: Thiago Galesi @ 2006-05-22 12:27 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linuxppc-embedded
In-Reply-To: <200605221232.14880.laurent.pinchart@tbox.biz>

What about configuring it in kernel configuration (using make
menuconfig for example). Most of the configurations can be done
through there (position, size, width, etc)?

Only if you have something out of the ordinary it would be advisable
to use a driver.

If you give us more detail we'll be able to help you better

BTW, you can partition your flash via cmdline

Cheers :)



-- 
-
Thiago Galesi

^ permalink raw reply

* "How to change the Magic number"
From: nreddy @ 2006-05-22 12:21 UTC (permalink / raw)
  To: u-boot-users; +Cc: linuxppc-embedded

Hi ALL,

 I have a specific requirement to change the Magic number of the linux
kernel in my embedded system.

 I cound see the Magic number is defined in U-boot files:
 1.include/image.h:#define IH_MAGIC        0x27051956
 2.cpu/ppc4xx/start.S:     .long   0x27051956

  So i can modify in u-boot to make it compatible to my Kernel (i am using
montavista linux version 2.4.20), but i am not able to see this kindof
info anywhere in the kernel source files.
If anyone knows how the linux magic number is generated and what are the
files
 need modifications inorder to change magic number please let me know.


Thnaks in Advance,
Nagi

^ permalink raw reply

* RE: [PATCH] Gianfar SKB Recycling Support
From: Haruki Dai-r35557 @ 2006-05-22  1:38 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, linuxppc-dev

> -----Original Message-----
> From: Stephen Hemminger [mailto:shemminger@osdl.org]=20
> Sent: Saturday, May 20, 2006 2:48 AM
> To: Haruki Dai-r35557
> Cc: netdev@vger.kernel.org; Fleming Andy-afleming; Kumar=20
> Gala; Haruki Dai-r35557
> Subject: Re: [PATCH] Gianfar SKB Recycling Support
>=20
> On Wed, 17 May 2006 15:45:14 -0700
> "Haruki Dai-r35557" <Dai.Haruki@freescale.com> wrote:
>=20
> > This patch improves the IP forwarding throughput of
> > the Freescale TSEC/eTSEC Gianfar driver. By recycling
> > the Socket buffer and Data buffer, reduce the unnecessary
> > memory allocation and de-allocation in the forwarding
> > processing chain.
> >=20
> > Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
> > Signed-off-by: Andy Fleming <afleming@freescale.com>
> >=20
>=20
> In case the general impression wasn't clear from the earlier comments.
> This patch is an interesting benchmark tweak, but unlikely to ever
> make it into the mainline kernel. The kernel needs to be a general
> purpose system and deal with multiple types of hardware and resource
> control.
>=20
> But don't give up looking at performance. If you can find ways to
> speed up the overall socket buffer handling without breaking existing
> semantics; then the patches would be positively received.
>

I admit the explanation of the implementation is indeed unclear. I will
put the recycling mechanism explanation. Is it better put as the
driver's comment? Or, the separate document like, say,
Document/net/skb_recycling.txt?

Just in case, I need to confirm that the patch is rejected even though
the expalanation is added?=20

I will surely work for making this mechanism more generic to the other
interface. I want to make sure that this patch is not the purpose of
benchmark tweak. This recycling mechanism makes the Linux's position in
the packet forwarding application better compare to the other
proprietary OS/Stack in terms of the throughput performance.=20
=20
 For the gianfar user, this patch also improves interrupt response under
the situation when previous gianfar tied up with the a lot of TX hw
interrupt even under NAPI (current gianfar NAPI implementation only help
Rx side since we have separate interrupt line). I will separate the
gianfar specific improvement, and post to this list again.



- Dai

^ permalink raw reply

* Re: MPC8xx: resolution of gettimeofday() ?
From: Steven Scholz @ 2006-05-22 11:03 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <20060519175513.GA12121@gate.ebshome.net>

Eugene,

>>> Usually on PPC we use timebase to interpolate time between Decrementer 
>>> interrupts. In this case gettimeofday resolution is determined by 
>>> timebase resolution which is quite high (megahertz range).
>> Sorry. I don't understand. What do you mean with "timebase"? Is there a
>> second timer/counter?
> 
> PowerPC has a facility called timebase. This is 64-bit counter which 
> can be accessed using special instructions (mftb, mftbu on 32-bit PPC).
> Counter resolution depends on particular chip implementation, some 
> use core clock, other use bus clock...
> 
> It's similar to the time-stamp counter in Intel CPUs (accessed 
> with rdtsc instruction).
Thanks very much for clearing this!

> Please, refer to PPC arch manuals for more information. Also, if you 
> really interested in how gettimeofday() is implemented, why don't you 
> look at the source code yourself?
I tried. But it's not obvious. Not for me anyway.

-- 
Steven

^ permalink raw reply

* CRAMFS: Error -3 while decompressing!
From: Igor Luri @ 2006-05-22  9:40 UTC (permalink / raw)
  To: linuxppc-embedded

Hi all!

We have a mpc5200liteB evaluation board with u-boot 1.1.4 and linux 
2.4.25 from Denx.  We have grabed a cramfs  root fs on a mtd partition 
and we are able to boot linux without problems:

    setenv bootargs root=/dev/mtdblock4 rw rootfstype=cramfs
    console=ttyS0 console=ttyS0 init=/sbin/init ip=on
    ....
    NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
    VFS: Mounted root (cramfs
    filesystem).                                                                         

    Freeing unused kernel memory: 96k
    init                                                                         
                                                                                                                                                                                                                                         

    BusyBox v1.00 (2006.03.06-10:43+0000) Built-in shell
    (ash)                                                     
    Enter 'help' for a list of built-in commands.           
    #


However, we are not able to boot linux with the same rootfs image (with 
the u-boot header) loaded from RAM.

        setenv bootargs root=/dev/rw rw console=ttyS0 console=ttyS0
        init=/sbin/init ip=on

        ## Booting image at 00500000 ...
           Image Name:   Linux-2.4.25-rthal5-TRACE
           Created:      2006-05-11   9:37:52 UTC
           Image Type:   PowerPC Linux Kernel Image (gzip compressed)
           Data Size:    1000166 Bytes = 976.7 kB
           Load Address: 00000000
           Entry Point:  00000000
           Verifying Checksum ... OK
           Uncompressing Kernel Image ... OK
        ## Loading RAMDisk Image at 01000000 ...
           Image Name:   Ramdisk Image
           Created:      2006-05-22   8:12:03 UTC
           Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
           Data Size:    1191936 Bytes =  1.1 MB
           Load Address: 00000000
           Entry Point:  00000000
           Verifying Checksum ... OK
           Loading Ramdisk to 0fe22000, end 0ff45000 ... OK
        Memory BAT mapping: BAT2=256Mb, BAT3=0Mb, residual: 0Mb
        Linux version 2.4.25-rthal5-TRACE (igor@ILURI_LINUX) (gcc
        version 3.3.6) #300 jue may 11 11:33:57 CEST 2006
        On node 0 totalpages: 65536
        zone(0): 65536 pages.
        zone(1): 0 pages.

        ....
        NET4: Unix domain sockets 1.0/SMP for Linux
        NET4.0.                                                             
        RAMDISK: cramfs filesystem found at block
        0                                                                   
         
        RAMDISK: Loading 1164 blocks [1 disk] into ram disk...
        done.                                                    
        Freeing initrd memory: 1164k
        freed                                                                            
         
        VFS: Mounted root (cramfs filesystem)
        readonly.                                                               
         
        Freeing unused kernel memory: 96k
        init                                                                        
         
        Error -3 while
        decompressing!                                                                                 
         
        c0224e84(1616147664)->c0214000(4096)                                                                          
         
        Error -3 while
        decompressing!                                                                                 
         
        c02286d8(-965246762)->cff41000(4096)                                                                          
         
        Kernel panic: No init found.  Try passing init= option to
        kernel.                                               
         <0>Rebooting in 180 seconds..                         

We have configured linux with option " Board uses U-Boot CONFIG_UBOOT " 
and CRAMFS image is built with correct endianess:

    file initrd.cramfs

    Linux Compressed ROM File System data, big endian size 1191936
    version #2 sorted_dirs CRC 0xac3c8f59, edition 0, 719 blocks, 433 files


We suspect it could be related with the SDRAM, but we are lost here.

Someone knows what we are doing wrong? Any help would be appretiated.


Thanks in advance.

^ permalink raw reply

* Preferred way to configure MTD physical mapping and partitioning
From: Laurent Pinchart @ 2006-05-22 10:32 UTC (permalink / raw)
  To: linuxppc-embedded

Hi everybody,

while browsing the kernel sources to find out how other boards configure MTD 
physical mapping and partitioning, I noticed that a couple of different 
approaches were possible:

- adding a board specific "driver" in drivers/mtd/maps and handle all mapping 
manually
- adding board specific MTD configuration in arch/ppc/platforms with calls to 
physmap_set_partitions() and physmap_configure()
- adding board specific MTD configuration in arch/ppc/platforms with a call to 
physmap_set_partitions(), and using the CONFIG_MTD_PHYSMAP option with 
physical mapping values provided in the kernel configuration.

Could anyone comment on the preferred approach ?

Best regards,

Laurent Pinchart

^ permalink raw reply

* Re: I2C bus issues on MPC8248
From: Laurent Pinchart @ 2006-05-22  9:06 UTC (permalink / raw)
  To: hs; +Cc: linuxppc-embedded
In-Reply-To: <1148056646.5943.20.camel@Zeus.EmbLux>

Hi Heiko,

> > I'm trying to use the MPC8248 hardware I2C bus in a 2.6.16 kernel. The
> > mailing
> > list archives mention a driver for the MPC8260
> > (http://ozlabs.org/pipermail/linuxppc-embedded/2006-May/022837.html)
> > which I modified to reflect the memory map differences between the
> > MPC8260 and the MPC8248, as mentionned in the e-mail.
> >
> > The good news is that the driver works. The bad news is that it doesn't
> > work
>
> OK.
>
> > correctly.
> >
> :-(
> :
> > The Linux I2C layer probes the I2C bus for peripherals when drivers are
> > loaded. The probing function writes a single byte with the device address
> > and check if the data is acked. I monitored the SCL and SDA lines using
> > an
>
> [...]
>
> > Using that code, no data is sent on the bus, the BD_SC_READY bit is never
> > cleared and no interrupt is generated. Once again I suspected a CPM bug
> > when writing a single byte on the bus, so I increased cbd_datlen to 2:
> >
> > tbdf[0].cbd_bufaddr = __pa(tb);
> > tbdf[0].cbd_datlen = 2;
> > tbdf[0].cbd_sc = count ? BD_SC_READY | BD_IIC_START :
> >                  BD_SC_READY | BD_IIC_START | BD_SC_INTRPT |
> >                  BD_SC_LAST | BD_SC_WRAP;
> >
> > This worked, and two bytes were written on the bus, leading me to believe
> > that the CPM was at fault.
>
> I don t know, if this is a CPM Bug, but it seems so to me ...

I've contacted Freescale's technical support about that issue. They answered 
that 0-byte buffer descriptors are not legal (even though no documentation 
states so), and that the address byte is output on the I2C bus when the next 
byte is written to the internal TX FIFO, making it impossible to send a 
single byte on the bus. Basically, that's a "feature", and they don't intend 
to fix it.

> > Has anyone noticed the same behaviour ? Is there a workaround available ?
> > I tried searching Freescale's website for CPM microcode updates but
> > haven't found anything related to the I2C controller.
>
> Yes, Holger Speck had the same problem. He solved it by doing the
> following:
>
> If the cpm_iic_write is called with count = 0. He made a read with count =
> 1
>
> I think this is safer than writing 2 Bytes to the Slave.
> Could you try this?

I've tried that with success. The I2C bus still gets stuck from time to time, 
I'll try to investigate that.

Thanks for your help.

Best regards,

Laurent Pinchart

^ permalink raw reply

* Re: [PATCH 1/5] powerpc: Make early xmon logic immune to location of early parsing
From: Michael Ellerman @ 2006-05-22  7:03 UTC (permalink / raw)
  To: Tom Rini; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20060518010826.GO22868@smtp.west.cox.net>

[-- Attachment #1: Type: text/plain, Size: 2437 bytes --]

On Wed, 2006-05-17 at 18:08 -0700, Tom Rini wrote:
> On Thu, May 18, 2006 at 10:03:05AM +1000, Michael Ellerman wrote:
> > On Wed, 2006-05-17 at 14:29 -0700, Tom Rini wrote:
> > > On Wed, May 17, 2006 at 06:00:41PM +1000, Michael Ellerman wrote:
> > > 
> > > > Currently early_xmon() calls directly into debugger() if xmon=early is passed.
> > > > This ties the invocation of early xmon to the location of parse_early_param(),
> > > > which might change.
> > > > 
> > > > Tested on P5 LPAR and F50.
> > > > 
> > > > Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> > > 
> > > Please no, parse_early_param() is there so things like xmon or kgdb can
> > > be dropped into as soon as we're able to parse any params that might be
> > > usable early on.
> > 
> > Sure, did you read the rest of the series? I want to parse parameters
> > eariler, so early that xmon isn't ready to run when we parse them, so I
> > have to defer jumping into xmon until after xmon is initialised. The net
> > effect on when xmon runs is zero. Or did I miss your point?
> 
> My point would be that xmon should either be fixed to work that early or
> parse things a bit later as a regular param.  I know the current system
> is flawed but I really don't like the idea (especially as a comaintainer
> of kgdb) of having to do a special plug here or there for one param
> because we parse early stuff too early, but regular stuff not early
> enough (which is why Andrew Morton got me to poke at the early param
> stuff a while back and then I think Rusty did something better, or
> something along those lines, anyhow).

Ok. I don't know the history so I can't comment on that. I don't think
we can make xmon run that early, the early parsing in my patch is before
we know what machine type we're on.

But as far as xmon and kgdb is concerned it really shouldn't matter that
the parsing is happening earlier. Instead of calling directly into
xmon/kgdb from the parsing code you set a global which is tested later.
If we ever get around to consolidating the 32/64 bit early setup code we
might even be able to move all the xmon logic into xmon_init(), which
would be even cleaner.

cheers

-- 
Michael Ellerman
IBM OzLabs

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply

* Re: snd-aoa status update / automatic driver loading
From: Johannes Berg @ 2006-05-22  6:42 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, Benjamin Berg, debian-powerpc
In-Reply-To: <1148169389.13249.44.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 3021 bytes --]

On Sun, 2006-05-21 at 09:56 +1000, Benjamin Herrenschmidt wrote:

> What do you mean by lost interrupts ?

Well, when our interrupt handler isn't run for each expected interrupt.

> DBDMA sends edge interrupts. Thus, if it emits interrupts A, then B and
> C, and for any reason, your kenrel is not able to service interrupts (is
> doing something with IRQs disabled) from before B happens to after C
> happens, you'll indeed get called only twice (A and C) and "B" will be
> sort-of lost.

Right. But I have a hard time believing that we had such a high latency,
I expect an interrupt about every 10ms under normal alsa programming.

> First thing about that is: what the heck is causing us to have such a
> latency !!! that would be useful to figure out. A way to do that would
> be maybe to "detect" when C happens that we missed B (see below how to
> do that) and print something along with the regs->nip & lr (or even a
> backtrace). That might give us an idea of there interrupts are
> re-enabled after the long latency which could perhaps lead us to the
> cause of the latency.

Yeah ok, we might be able to figure out what's causing this, but on an
otherwise idle system I assumed actual hardware problems, but it also
never happened on my machine, only on my brother's (same as your pbook).

> Now for detecting lost interrupts (and for being immune to them), the
> technique is not to just assume IRQ -> 1 period completed, but instead,
> when an irq happens, to go read the DBDMA descriptors in memory to see
> which ones have actually been completed. Their status field should be
> updated as their get comleted. Thus, you keep track of the "previous"
> last completed descriptor and you walk from that to recycle them.

Right, that's how snd-powermac does it. It has the nasty side-effect of
polluting the cache a lot though, since dbdma commands are 16 bytes
long. Am I wrong?

> Since we can only update the framecounter on a per-period basis, 

Alsa calls this thing the 'pointer' :) The frame counter we currently
use is the frame counter register of the i2s bus controller, and I don't
see why we shouldn't do that instead of reading back all the dbdma
command status fields.

> the
> driver would benefit from having lots of very small periods. I don't
> know if we can provide "hints" to userland about that though. 

Yes, we can set the minimum period count or maximum period length. Not a
hint though, it then makes it required.

> Using the
> i2s frame counter means we need some kind of calibration... it might
> still be counting if for the reason the DBDMA "misses" something or gets
> stopped....

Since the i2s bus is not shut down it also counts when we are not
transferring data. We currently calibrate on the first interrupt. That's
fine, since having multiple periods means that we don't need to be
absolutely precise here. If we miss one, that's fine, we can make it up
the next time by saying that 2 have elapsed.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 793 bytes --]

^ permalink raw reply

* Re: [PATCH][resend] udbg_printf() formatting attribute
From: Michael Ellerman @ 2006-05-22  6:33 UTC (permalink / raw)
  To: Jimi Xenidis; +Cc: linuxppc-dev
In-Reply-To: <68EF7C38-A8DB-445A-BC7F-439102E19BB9@watson.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 887 bytes --]

On Thu, 2006-05-18 at 12:52 -0400, Jimi Xenidis wrote:
> On May 18, 2006, at 11:56 AM, Michael Ellerman wrote:
> >
> > I'm actually hoping to get rid of udbg_printf(), but if I can't we
> > should stick this in I guess. The real problem IMHO is that debug
> > printks rot because they're rarely compiled, not sure what to do about
> > that.
> 
> Yeah, debug code always has that problem.  But I must say, whenever I  
> work with the x86 guys and I see how long they are _blind_ when they  
> boot it blows my mind.  Lets hope we don't go there.

Yeah nuts. Don't worry, when I say "get rid of udbg_printf()" I mean
"replace with printk".

cheers

-- 
Michael Ellerman
IBM OzLabs

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

^ permalink raw reply

* Re: [PATCH 4/6] Have x86_64 use add_active_range() and free_area_init_nodes
From: Mel Gorman @ 2006-05-21 22:23 UTC (permalink / raw)
  To: Andrew Morton
  Cc: davej, tony.luck, linux-mm, ak, bob.picco, linux-kernel,
	linuxppc-dev
In-Reply-To: <20060521120843.43babdc7.akpm@osdl.org>

On Sun, 21 May 2006, Andrew Morton wrote:

> Mel Gorman <mel@csn.ul.ie> wrote:
>>
>
>>> Anyway, I just don't get how this code can work.  We have an e820 map with
>>> up to 128 entries (this machine has ten) and we're trying to scrunch that
>>> all into the four-entry early_node_map[].
>>>
>>
>> Missing E820MAX was a mistake. On x86_64, CONFIG_MAX_ACTIVE_REGIONS should
>> have been used. I didn't expect x86_64 to have so many memory holes.
>
> x86 uses 128 e820 slots too.
>

That is true, but with x86, I am not expecting many regions. For flatmem, 
only one region will be registered. For NUMA, I would expect one 
registration per node *unless* SRAT is being used. With SRAT, MAXCHUNKS 
regions at most with is 4 * MAX_NUMNODES.

>>
>>> On my little x86 PC:
>>>
>>> BIOS-provided physical RAM map:
>>> BIOS-e820: 0000000000000000 - 000000000009bc00 (usable)
>>> BIOS-e820: 000000000009bc00 - 000000000009c000 (reserved)
>>> BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
>>> BIOS-e820: 0000000000100000 - 000000000ffc0000 (usable)
>>> BIOS-e820: 000000000ffc0000 - 000000000fff8000 (ACPI data)
>>> BIOS-e820: 000000000fff8000 - 0000000010000000 (ACPI NVS)
>>> BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
>>> BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
>>> BIOS-e820: 00000000ffb80000 - 00000000ffc00000 (reserved)
>>> BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)
>>> 0MB HIGHMEM available.
>>> 255MB LOWMEM available.
>>> found SMP MP-table at 000ff780
>>> Range (nid 0) 0 -> 65472, max 4
>>> On node 0 totalpages: 65472
>>>  DMA zone: 4096 pages, LIFO batch:0
>>>  Normal zone: 61376 pages, LIFO batch:15
>>>
>>> So here, the architecture code only called add_active_range() the once, for
>>> the entire memory map.
>>
>> Because in this case, the architecture reported that there was just one
>> range of available pages with no holes.
>
> So..  we're registering a simgle blob of pfns which includes the "reserved"
> memory as well as the "ACPI data" and the "ACPI NVS" (with an apparent
> off-by-one here).
>

The off-by-one is a surprise. On this machine, it must be because the 
arch-specific code calculated highend_pfn wrong. I don't use the e820 on 
i386 because it didn't seem necessary.

> How come the machine still works?  I guess the architecture went and marked
> those pfns reserved.
>

Yes, that is what I'd expect to happen. The ranges are registered and a 
memmap allocated but the freeing of memory from bootmem is still the same 
on i386. For i386, my patchset reports the same size of zones and 
start_pfn on each node so there should be no difference in the end result 
between my code and the arch-specific initialisation.

>>> If so, perhaps the bug is that the x86_64 code isn't doing that.  And that
>> > x86 isn't doing it for some people either.
>> >
>>
>>  I'm hoping in this case that having MAX_ACTIVE_REGIONS match E820MAX will
>>  fix the issue on your machine.
>
> I expect it will.
>
> One does wonder whether it's worth all this fuss though.  It's only a
> 24-byte structure and it's all thrown away in free_initmem().  One _could_
> just go and do
>
> 	#define MAX_ACTIVE_REGIONS 10000
>
> and be happy.
>

I could, but I thought I'd be shot for trying something like that. A fixed 
value of 128 would cover the largest tables I'm aware of on all 
architectures. Should I just set that fixed value?

>> I'm still confused why Christian's failed
>>  to boot with the patch backed out though.
>
> He didn't get any "Too many memory regions" messages, so it's something
> different.
>
> Maybe he hit my off-by-one on his "ACPI data"?
>

Possibly but the off-by-one error for you was on x86 not x86_64 and I 
suspect that highend_pfn was wrong in this case. I'll be checking tomorrow 
where I can see an off-by-one error.

> hm, I didn't mention this in the earlier email.   On my x86 I have
>
>  BIOS-provided physical RAM map:
>  BIOS-e820: 0000000000000000 - 000000000009bc00 (usable)
>  BIOS-e820: 000000000009bc00 - 000000000009c000 (reserved)
>  BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
>  BIOS-e820: 0000000000100000 - 000000000ffc0000 (usable)
>  BIOS-e820: 000000000ffc0000 - 000000000fff8000 (ACPI data)
>  BIOS-e820: 000000000fff8000 - 0000000010000000 (ACPI NVS)
>  BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
>  BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
>  BIOS-e820: 00000000ffb80000 - 00000000ffc00000 (reserved)
>  BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)
>
> I added some debug and saw that add_active_range() was getting a
> start_pfn=0 and an end_pfn which corresponds with 0x0fffc000.  So my "ACPI
> NVS" is getting chopped off.
>

Yes. However, this just means that the memory for that the PFN range will 
not be backed by memmap. This would only be a problem if free_bootmem() is 
called on those range of pages. If that was happening, I would be 
expecting oops early or bad_page reports during the boot process.

> If Christian is seeing a similar thing then his "ACPI data" will be getting
> only part-registered.
>
> I'd suggest that the next rev be liberal in its printking.  This is the
> debug patch I used:
>

I also have an old debug patch that was very printk happy. I will dust it 
off and add it with the additional information from your patch.

> mm/page_alloc.c |   25 +++++++++++++++++++++----
> 1 file changed, 21 insertions(+), 4 deletions(-)
>
> diff -puN mm/page_alloc.c~a mm/page_alloc.c
> --- devel/mm/page_alloc.c~a	2006-05-20 13:19:58.000000000 -0700
> +++ devel-akpm/mm/page_alloc.c	2006-05-20 13:20:42.000000000 -0700
> @@ -2463,22 +2463,36 @@ void __init add_active_range(unsigned in
> 						unsigned long end_pfn)
> {
> 	unsigned int i;
> -	printk(KERN_DEBUG "Range (%d) %lu -> %lu\n", nid, start_pfn, end_pfn);
> +
> +	printk("Range (nid %d) %lu -> %lu, max %d\n",
> +			nid, start_pfn, end_pfn, MAX_ACTIVE_REGIONS - 1);
>
> 	/* Merge with existing active regions if possible */
> 	for (i = 0; early_node_map[i].end_pfn; i++) {
> -		if (early_node_map[i].nid != nid)
> +		printk("i=%d early_node_map[i].nid=%d "
> +				"early_node_map[i].start_pfn=%lu "
> +				"early_node_map[i].end_pfn=%lu",
> +			i, early_node_map[i].nid,
> +			early_node_map[i].start_pfn,
> +			early_node_map[i].end_pfn);
> +
> +		if (early_node_map[i].nid != nid) {
> +			printk(" continue 1\n");
> 			continue;
> +		}
>
> 		/* Skip if an existing region covers this new one */
> 		if (start_pfn >= early_node_map[i].start_pfn &&
> -				end_pfn <= early_node_map[i].end_pfn)
> +				end_pfn <= early_node_map[i].end_pfn) {
> +			printk(" return 1\n");
> 			return;
> +		}
>
> 		/* Merge forward if suitable */
> 		if (start_pfn <= early_node_map[i].end_pfn &&
> 				end_pfn > early_node_map[i].end_pfn) {
> 			early_node_map[i].end_pfn = end_pfn;
> +			printk(" return 2\n");
> 			return;
> 		}
>
> @@ -2486,13 +2500,16 @@ void __init add_active_range(unsigned in
> 		if (start_pfn < early_node_map[i].end_pfn &&
> 				end_pfn >= early_node_map[i].start_pfn) {
> 			early_node_map[i].start_pfn = start_pfn;
> +			printk(" return 3\n");
> 			return;
> 		}
> +		printk("\n");
> 	}
>
> 	/* Leave last entry NULL, we use range.end_pfn to terminate the walk */
> 	if (i >= MAX_ACTIVE_REGIONS - 1) {
> -		printk(KERN_ERR "Too many memory regions, truncating\n");
> +		printk(KERN_ERR "More than %d memory regions, truncating\n",
> +				MAX_ACTIVE_REGIONS - 1);
> 		return;
> 	}
>
> _
>

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

^ permalink raw reply

* Re: [PATCH] powerpc: Fix ide-pmac sysfs entry
From: Benjamin Herrenschmidt @ 2006-05-21 21:46 UTC (permalink / raw)
  To: Gabriel Paubert
  Cc: Andrew Morton, Pete Popov, B.Zolnierkiewicz, linuxppc-dev, paulus,
	Alan Cox
In-Reply-To: <20060521213056.GA25721@iram.es>

On Sun, 2006-05-21 at 23:30 +0200, Gabriel Paubert wrote:
> On Mon, May 15, 2006 at 06:52:36PM +1000, Benjamin Herrenschmidt wrote:
> > 
> > > Actually I have one of these, and regularly use it and update 
> > > the kernel to the latest git once or twice per month, but I 
> > > typically have two batteries and have not swapped in the 
> > > media bay under Linux for a long time.
> > > 
> > > If you are interested, I could test the patch when I find 
> > > some time (not today: my 8 year old son went to the hospital
> > > for an emergency last Thursday, he is cured now and should 
> > > come out today).
> > 
> > Any test is welcome, glad to know your son is well !
> 
> The one liner works here, I can no more solidly hang
> the machine. There is still a bunch of error messages
> on drive removal though:

Yes, I noticed those. Looks like the IDE driver is trying to much around
with the drive when unregistered. In our case, it's not a very good idea
as we unregister it after we detect it's been physically removed :)
Seems harmless so far though.

Ben.

> mediabay0: switching to 7
> mediabay0: powering down
> media bay 0 is empty
> Unregistering mb 0 ide, index:2
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: DMA disabled
> hde: ATAPI reset complete
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: ATAPI reset complete
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: ATAPI reset complete
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> hde: ATAPI reset complete
> hde: status error: status=0x00 { }
> ide: failed opcode was: unknown
> mediabay0: end of power down
> 
> On insertion there are also a few messages
> but they seem normal:
> 
> mediabay0: switching to 3
> mediabay0: powering up
> mediabay0: enabling (kind:3)
> mediabay0: waiting reset (kind:3)
> mediabay0: waiting IDE reset (kind:3)
> mediabay0: waiting IDE ready (kind:3)
> mediabay 0, registering IDE...
> Probing IDE interface ide2...
> hde: LG DVD-ROM DRN-8080B, ATAPI CD/DVD-ROM drive
> hde: Enabling MultiWord DMA 2
> ide2 at 0xf1022000-0xf1022007,0xf1022160 on irq 20
> hde: ATAPI 24X DVD-ROM drive, 512kB Cache, DMA
> media-bay 0 is ide2
> mediabay 0 IDE ready
> 
> 	Regards,
> 	Gabriel

^ permalink raw reply

* Re: [PATCH] powerpc: Fix ide-pmac sysfs entry
From: Gabriel Paubert @ 2006-05-21 21:30 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Andrew Morton, Pete Popov, B.Zolnierkiewicz, linuxppc-dev, paulus,
	Alan Cox
In-Reply-To: <1147683156.21291.118.camel@localhost.localdomain>

On Mon, May 15, 2006 at 06:52:36PM +1000, Benjamin Herrenschmidt wrote:
> 
> > Actually I have one of these, and regularly use it and update 
> > the kernel to the latest git once or twice per month, but I 
> > typically have two batteries and have not swapped in the 
> > media bay under Linux for a long time.
> > 
> > If you are interested, I could test the patch when I find 
> > some time (not today: my 8 year old son went to the hospital
> > for an emergency last Thursday, he is cured now and should 
> > come out today).
> 
> Any test is welcome, glad to know your son is well !

The one liner works here, I can no more solidly hang
the machine. There is still a bunch of error messages
on drive removal though:

mediabay0: switching to 7
mediabay0: powering down
media bay 0 is empty
Unregistering mb 0 ide, index:2
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: DMA disabled
hde: ATAPI reset complete
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: ATAPI reset complete
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: ATAPI reset complete
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
hde: ATAPI reset complete
hde: status error: status=0x00 { }
ide: failed opcode was: unknown
mediabay0: end of power down

On insertion there are also a few messages
but they seem normal:

mediabay0: switching to 3
mediabay0: powering up
mediabay0: enabling (kind:3)
mediabay0: waiting reset (kind:3)
mediabay0: waiting IDE reset (kind:3)
mediabay0: waiting IDE ready (kind:3)
mediabay 0, registering IDE...
Probing IDE interface ide2...
hde: LG DVD-ROM DRN-8080B, ATAPI CD/DVD-ROM drive
hde: Enabling MultiWord DMA 2
ide2 at 0xf1022000-0xf1022007,0xf1022160 on irq 20
hde: ATAPI 24X DVD-ROM drive, 512kB Cache, DMA
media-bay 0 is ide2
mediabay 0 IDE ready

	Regards,
	Gabriel

^ permalink raw reply

* Re: HDLC synchronous
From: Wolfgang Denk @ 2006-05-21 19:55 UTC (permalink / raw)
  To: Antonio Di Bacco; +Cc: linuxppc-embedded
In-Reply-To: <200605211925.49946.antonio.dibacco@aruba.it>

In message <200605211925.49946.antonio.dibacco@aruba.it> you wrote:
> I had a look to hdlc_enet.c in 8xx_io and it seems to me that it only supports 
> asynchronous HDLC (speaks about cts rts). Is this true?

Our hdlc_enet.c driver is a custom driver that is designed to work in
a pretty specific environment. You can use it as a model for your own
implementation, but unless you understand exactly what it's doing you
better be careful.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
No, I'm not going to explain it. If you  can't  figure  it  out,  you
didn't want to know anyway... :-)
                   - Larry Wall in <1991Aug7.180856.2854@netlabs.com>

^ permalink raw reply

* Re: [PATCH 4/6] Have x86_64 use add_active_range() and free_area_init_nodes
From: Andrew Morton @ 2006-05-21 19:08 UTC (permalink / raw)
  To: Mel Gorman
  Cc: davej, tony.luck, linux-mm, ak, bob.picco, linux-kernel,
	linuxppc-dev
In-Reply-To: <Pine.LNX.4.64.0605211528390.16327@skynet.skynet.ie>

Mel Gorman <mel@csn.ul.ie> wrote:
>

> > Anyway, I just don't get how this code can work.  We have an e820 map with
> > up to 128 entries (this machine has ten) and we're trying to scrunch that
> > all into the four-entry early_node_map[].
> >
> 
> Missing E820MAX was a mistake. On x86_64, CONFIG_MAX_ACTIVE_REGIONS should 
> have been used. I didn't expect x86_64 to have so many memory holes.

x86 uses 128 e820 slots too.

>
> > On my little x86 PC:
> >
> > BIOS-provided physical RAM map:
> > BIOS-e820: 0000000000000000 - 000000000009bc00 (usable)
> > BIOS-e820: 000000000009bc00 - 000000000009c000 (reserved)
> > BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
> > BIOS-e820: 0000000000100000 - 000000000ffc0000 (usable)
> > BIOS-e820: 000000000ffc0000 - 000000000fff8000 (ACPI data)
> > BIOS-e820: 000000000fff8000 - 0000000010000000 (ACPI NVS)
> > BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
> > BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
> > BIOS-e820: 00000000ffb80000 - 00000000ffc00000 (reserved)
> > BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)
> > 0MB HIGHMEM available.
> > 255MB LOWMEM available.
> > found SMP MP-table at 000ff780
> > Range (nid 0) 0 -> 65472, max 4
> > On node 0 totalpages: 65472
> >  DMA zone: 4096 pages, LIFO batch:0
> >  Normal zone: 61376 pages, LIFO batch:15
> >
> > So here, the architecture code only called add_active_range() the once, for
> > the entire memory map.
>
> Because in this case, the architecture reported that there was just one 
> range of available pages with no holes.

So..  we're registering a simgle blob of pfns which includes the "reserved"
memory as well as the "ACPI data" and the "ACPI NVS" (with an apparent
off-by-one here).

How come the machine still works?  I guess the architecture went and marked
those pfns reserved.

> > If so, perhaps the bug is that the x86_64 code isn't doing that.  And that
>  > x86 isn't doing it for some people either.
>  >
> 
>  I'm hoping in this case that having MAX_ACTIVE_REGIONS match E820MAX will 
>  fix the issue on your machine.

I expect it will.

One does wonder whether it's worth all this fuss though.  It's only a
24-byte structure and it's all thrown away in free_initmem().  One _could_
just go and do

	#define MAX_ACTIVE_REGIONS 10000

and be happy.

> I'm still confused why Christian's failed 
>  to boot with the patch backed out though.

He didn't get any "Too many memory regions" messages, so it's something
different.

Maybe he hit my off-by-one on his "ACPI data"?

hm, I didn't mention this in the earlier email.   On my x86 I have

  BIOS-provided physical RAM map:
  BIOS-e820: 0000000000000000 - 000000000009bc00 (usable)
  BIOS-e820: 000000000009bc00 - 000000000009c000 (reserved)
  BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
  BIOS-e820: 0000000000100000 - 000000000ffc0000 (usable)
  BIOS-e820: 000000000ffc0000 - 000000000fff8000 (ACPI data)
  BIOS-e820: 000000000fff8000 - 0000000010000000 (ACPI NVS)
  BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
  BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
  BIOS-e820: 00000000ffb80000 - 00000000ffc00000 (reserved)
  BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)

I added some debug and saw that add_active_range() was getting a
start_pfn=0 and an end_pfn which corresponds with 0x0fffc000.  So my "ACPI
NVS" is getting chopped off.

If Christian is seeing a similar thing then his "ACPI data" will be getting
only part-registered.

I'd suggest that the next rev be liberal in its printking.  This is the
debug patch I used:

 mm/page_alloc.c |   25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff -puN mm/page_alloc.c~a mm/page_alloc.c
--- devel/mm/page_alloc.c~a	2006-05-20 13:19:58.000000000 -0700
+++ devel-akpm/mm/page_alloc.c	2006-05-20 13:20:42.000000000 -0700
@@ -2463,22 +2463,36 @@ void __init add_active_range(unsigned in
 						unsigned long end_pfn)
 {
 	unsigned int i;
-	printk(KERN_DEBUG "Range (%d) %lu -> %lu\n", nid, start_pfn, end_pfn);
+
+	printk("Range (nid %d) %lu -> %lu, max %d\n",
+			nid, start_pfn, end_pfn, MAX_ACTIVE_REGIONS - 1);
 
 	/* Merge with existing active regions if possible */
 	for (i = 0; early_node_map[i].end_pfn; i++) {
-		if (early_node_map[i].nid != nid)
+		printk("i=%d early_node_map[i].nid=%d "
+				"early_node_map[i].start_pfn=%lu "
+				"early_node_map[i].end_pfn=%lu",
+			i, early_node_map[i].nid,
+			early_node_map[i].start_pfn,
+			early_node_map[i].end_pfn);
+
+		if (early_node_map[i].nid != nid) {
+			printk(" continue 1\n");
 			continue;
+		}
 
 		/* Skip if an existing region covers this new one */
 		if (start_pfn >= early_node_map[i].start_pfn &&
-				end_pfn <= early_node_map[i].end_pfn)
+				end_pfn <= early_node_map[i].end_pfn) {
+			printk(" return 1\n");
 			return;
+		}
 
 		/* Merge forward if suitable */
 		if (start_pfn <= early_node_map[i].end_pfn &&
 				end_pfn > early_node_map[i].end_pfn) {
 			early_node_map[i].end_pfn = end_pfn;
+			printk(" return 2\n");
 			return;
 		}
 
@@ -2486,13 +2500,16 @@ void __init add_active_range(unsigned in
 		if (start_pfn < early_node_map[i].end_pfn &&
 				end_pfn >= early_node_map[i].start_pfn) {
 			early_node_map[i].start_pfn = start_pfn;
+			printk(" return 3\n");
 			return;
 		}
+		printk("\n");
 	}
 
 	/* Leave last entry NULL, we use range.end_pfn to terminate the walk */
 	if (i >= MAX_ACTIVE_REGIONS - 1) {
-		printk(KERN_ERR "Too many memory regions, truncating\n");
+		printk(KERN_ERR "More than %d memory regions, truncating\n",
+				MAX_ACTIVE_REGIONS - 1);
 		return;
 	}
 
_

^ permalink raw reply

* TI_LOCAL_FLAGS definition wrong?
From: Guennadi Liakhovetski @ 2006-05-21 18:36 UTC (permalink / raw)
  To: Linuxppc-dev

Hi all,

Is this define in arch/ppc/kernel/asm-offsets.c (as of 2.6.17-rc3):

	DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, flags));

correct? Or should it be local_flags? Or is it already fixed in later 
versions?

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply

* Re: HDLC synchronous
From: Antonio Di Bacco @ 2006-05-21 18:06 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <200605211925.49946.antonio.dibacco@aruba.it>

I 've understood well,  the hdlc_enet.c driver provided in denk kernel works 
if the hdlc controller can use cts and rts but my board has only INPUT, 
OUTPUT, CLK_INPUT and CLOCK_OUPUT pins. I imagine this is a synchronous 
interface, isn't it?

Bye,
Antonio.

On Sunday 21 May 2006 19:25, Antonio Di Bacco wrote:
> I had a look to hdlc_enet.c in 8xx_io and it seems to me that it only
> supports asynchronous HDLC (speaks about cts rts). Is this true?
>
> Bye,
> Antonio.
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded

^ permalink raw reply

* HDLC synchronous
From: Antonio Di Bacco @ 2006-05-21 17:25 UTC (permalink / raw)
  To: linuxppc-embedded

I had a look to hdlc_enet.c in 8xx_io and it seems to me that it only supports 
asynchronous HDLC (speaks about cts rts). Is this true?

Bye,
Antonio.

^ permalink raw reply

* HDLC ENET over SCC3
From: Antonio Di Bacco @ 2006-05-21 16:57 UTC (permalink / raw)
  To: linuxppc-embedded

I'm using Denk kernel 2.4.25 and eldk 3.1.1
Is is supporting HDLC over SCC3?

Bye,
Antonio.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox