LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: Kernel bug reports welcome here?
From: Olof Johansson @ 2006-05-10 15:24 UTC (permalink / raw)
  To: Wolfgang Pfeiffer; +Cc: linuxppc-dev
In-Reply-To: <20060510135139.GB3878@localhost>

On Wed, May 10, 2006 at 03:51:39PM +0200, Wolfgang Pfeiffer wrote:
> Hi All
> 
> I'm running a git kernel with sources from about last Sunday, on a
> alubook5.8, and I would like to know whether bug reports, if things
> don't work with this kernel (there are a few ... :), will be welcome
> here.
> 
> If not: Where's the better place for reports like that: Linux kernel
> mailing list?

They are welcome here, but keep in mind that some of them could be
better suited for LKML. It depends on what the problem is. If it seems
to be machine/PPC-specific, post here. If it's generic kernel (MM, other
things), post on LKML. If unsure, you could also crosspost on both lists,
but try to keep that to a minimum.

There's also the debian-ppc mailing list, for things not directly related
to the kernel but to the rest of the distro you run (some kernel problems
are also discussed there, but I'm not sure if they're interested in
mainline kernel bugs there or not).


-Olof

^ permalink raw reply

* Re: IMAP_ADDR on PPC 8xx
From: Walter L. Wimer III @ 2006-05-10 15:23 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <3A4FA660-AD13-4E2B-846B-B9ACD901444F@embeddedalley.com>


Thanks, Dan!  This is exactly the kind of feedback I was seeking.

Based on your comments and Wolfgang's comments, I conclude that:

     1. The U-Boots on my MPC885ADS and MPC8272ADS boards are
        unequivocally broken and should be replaced with ones from the
        official U-Boot source repositories that use IMMR values
        matching the Linux kernel source.
     2. For now, there is no pressing need to fix the existing drivers;
        they may continue dereferencing IMAP_ADDR directly as they
        currently do.
     3. In the future, the drivers will ultimately migrate toward
        individually calling ioremap() and maintaining their own private
        pointers.


Thanks again,

Walt 



On Tue, 2006-05-09 at 17:51 -0400, Dan Malek wrote:
> On May 9, 2006, at 3:52 PM, Walter L. Wimer III wrote:
> 
> > Exactly.  I think this kind of "automatic adaption" to the particular
> > platform is what should be in the vanilla kernel.
> 
> This does not mean you can choose some arbitrary value.
> There is a small range of high memory addresses that will
> work successfully for IMMR.  You may not see any problems
> right away, but depending upon drivers selected and the
> software features used, some problems will crop up.
> There are also MMU performance enhancements that may
> be used with certain values, and guaranteed kernel crashes
> at some point in the future when abused.
> 
> With Linux, the IMMR should always have a value of
> 0xf0000000 or 0xff000000 for best results.
> 
> > This was the second major part of our 2.6.11.7-based patch.  It
> > performed a single ioremap(), stored the result in a global  
> > pointer, and
> > then used that pointer in all the drivers instead of using IMAP_ADDR
> > directly.
> 
> This is not an acceptable practice.  We are removing all
> global pointers like this, and any driver that needs access to
> some or all of the IMMR space should be individually mapping
> those regions it needs.  Under the covers of ioremap() we are
> performing various alignment and reuse of address spaces
> in order to support things like performance enhancements
> and cache coherent regions.
> 
> Thanks.
> 
> 	-- Dan
> 

^ permalink raw reply

* Alubook 5,8: No sound with 2.6.17-rc3-g5528e568-dirty
From: Wolfgang Pfeiffer @ 2006-05-10 15:49 UTC (permalink / raw)
  To: linuxppc-dev list

Hi All

First a *Thanks* to all those, here or elsewhere, who spend their time
on the development of usable software for PPC Linux: I don't think I
ever would have bought the latest alu Powerbook with the option that
this machine will be an MacOSX-only one ... :)

As to the reason why I came here: 
As I can't be sure whether the issue announced in the subject line is
really a kernel issue I put some sound relevant config files in a
tarball (~ 12 KB) to my homepage:

wolfgangpfeiffer.com/alsa.configs.tar.gz

In the tarball above you'll find
these local /etc/ dirs with all files below them: 
alsa  modprobe.d   modutils

and these single files, also from /etc/ here:
modules  modules.conf pbbuttonsd.conf

The kernel config
http://wolfgangpfeiffer.com/config-2.6.17-rc3-g5528e568-dirty.txt

(Geocities, which my site actually is hosted by, does not allow
uploading the file without the file type suffix, IIRC ...)

The kernel, made with non-edited (except the kernel .config), as I hope,
git sources, and with the 'make-kpkg' Debian package:

$ cat /proc/version 
Linux version 2.6.17-rc3-g5528e568-dirty (root@debby1-6) (gcc version
4.1.1 20060428 (prerelease) (Debian 4.1.0-2)) #1 Sun May 7 23:51:15
CEST 2006

OS is Debian/unstable.

Machine:

$ cat /proc/cpuinfo
processor       : 0
cpu             : 7447A, altivec supported
clock           : 833.333000MHz
revision        : 0.5 (pvr 8003 0105)
bogomips        : 16.57
timebase        : 8320000
platform        : PowerMac
machine         : PowerBook5,8
motherboard     : PowerBook5,8 MacRISC3 Power Macintosh 
detected as     : 287 (PowerBook G4 15")
pmac flags      : 00000019
L2 cache        : 512K unified
pmac-generation : NewWorld


lspci -v:
---------------------
0000:00:0b.0 Host bridge: Apple Computer Inc.: Unknown device 0066
	Flags: bus master, 66MHz, medium devsel, latency 16
	Capabilities: [80] AGP version 1.0

0000:00:10.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10] (prog-if 00 [VGA])
	Subsystem: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10]
	Flags: bus master, 66MHz, medium devsel, latency 255, IRQ 48
	Memory at b8000000 (32-bit, prefetchable) [size=128M]
	I/O ports at f0000400 [size=256]
	Memory at b0000000 (32-bit, non-prefetchable) [size=64K]
	Expansion ROM at f1000000 [disabled] [size=128K]
	Capabilities: [58] AGP version 2.0
	Capabilities: [50] Power Management version 2

0001:10:0b.0 Host bridge: Apple Computer Inc.: Unknown device 0067
	Flags: bus master, 66MHz, medium devsel, latency 16

0001:10:11.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller (rev 02)
	Subsystem: Apple Computer Inc.: Unknown device 4318
	Flags: bus master, fast devsel, latency 16, IRQ 52
	Memory at a0004000 (32-bit, non-prefetchable) [size=8K]

0001:10:14.0 CardBus bridge: Texas Instruments PCI1510 PC card Cardbus Controller
	Flags: bus master, medium devsel, latency 168, IRQ 53
	Memory at a0003000 (32-bit, non-prefetchable) [size=4K]
	Bus: primary=10, secondary=11, subordinate=14, sec-latency=176
	Memory window 0: 90000000-9ffff000 (prefetchable)
	Memory window 1: f3000000-f33ff000
	I/O window 0: 00001000-000011ff
	I/O window 1: 00001400-000015ff
	16-bit legacy interface ports at 0001

0001:10:15.0 USB Controller: NEC Corporation USB (rev 43) (prog-if 10 [OHCI])
	Subsystem: NEC Corporation USB
	Flags: bus master, medium devsel, latency 16, IRQ 54
	Memory at a0002000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: [40] Power Management version 2

0001:10:15.1 USB Controller: NEC Corporation USB (rev 43) (prog-if 10 [OHCI])
	Subsystem: NEC Corporation USB
	Flags: bus master, medium devsel, latency 16, IRQ 54
	Memory at a0001000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: [40] Power Management version 2

0001:10:15.2 USB Controller: NEC Corporation USB 2.0 (rev 04) (prog-if 20 [EHCI])
	Subsystem: NEC Corporation USB 2.0
	Flags: bus master, medium devsel, latency 16, IRQ 54
	Memory at a0000000 (32-bit, non-prefetchable) [size=256]
	Capabilities: [40] Power Management version 2

0001:10:17.0 ff00: Apple Computer Inc. KeyLargo/Intrepid Mac I/O
	Flags: bus master, medium devsel, latency 16
	Memory at 80000000 (32-bit, non-prefetchable) [size=512K]

0002:24:0b.0 Host bridge: Apple Computer Inc.: Unknown device 0068
	Flags: bus master, 66MHz, medium devsel, latency 16

0002:24:0d.0 ff00: Apple Computer Inc.: Unknown device 0069
	Flags: bus master, medium devsel, latency 32, IRQ 39
	Memory at f5004000 (32-bit, non-prefetchable) [size=16K]

0002:24:0e.0 FireWire (IEEE 1394): Apple Computer Inc.: Unknown device 006a (prog-if 10 [OHCI])
	Subsystem: Apple Computer Inc.: Unknown device 5811
	Flags: bus master, medium devsel, latency 64, IRQ 40
	Memory at f5000000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: [44] Power Management version 2

0002:24:0f.0 Ethernet controller: Apple Computer Inc.: Unknown device 006b
	Flags: bus master, 66MHz, slow devsel, latency 16, IRQ 41
	Memory at f5200000 (32-bit, non-prefetchable) [size=2M]
	Expansion ROM at f5100000 [disabled] [size=1M]


---------------------


So with the settings from the files above I run 'alsaconf', and it
can't find any sound card:


x                                                          x          
x                                                          x          
x         No supported PnP or PCI card found.              x          
x                                                          x          
x  Would you like to probe legacy ISA sound cards/chips?   x          
x                                                          x          
x                                                          x          
x               <Yes>                  <No>                x          
x                                                          x          



Either answering No or Yes does not help to get sound.

KDE also is complaining. Something like:

---------------------
Sound server informational message:
Error while initializing the sound driver:
device: default can't be opened for playback (No such device)
The sound server will continue, using the null output device.
-----------------------


The alsapackages seem to be the latest ones I can get:

# apt-get install alsa-base alsa-utils alsaplayer-alsa alsaplayer-common alsaplayer-gtk
Reading package lists... Done
Building dependency tree... Done
alsa-base is already the newest version.
alsa-utils is already the newest version.
alsaplayer-alsa is already the newest version.
alsaplayer-common is already the newest version.
alsaplayer-gtk is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 322 not upgraded.

Please let me know in case you need more information ..

Best Regards
Wolfgang


-- 
Wolfgang Pfeiffer: /ICQ: 286585973/ + + +  /AIM: crashinglinux/
http://profiles.yahoo.com/wolfgangpfeiffer

Key ID: E3037113
http://keyserver.mine.nu/pks/lookup?search=0xE3037113&fingerprint=on

^ permalink raw reply

* Re: Alubook 5,8: No sound with 2.6.17-rc3-g5528e568-dirty
From: Johannes Berg @ 2006-05-10 16:04 UTC (permalink / raw)
  To: Wolfgang Pfeiffer; +Cc: linuxppc-dev list
In-Reply-To: <20060510154930.GD3878@localhost>

> As to the reason why I came here:
> As I can't be sure whether the issue announced in the subject line is
> really a kernel issue

Did it ever work? I don't quite know what machine a 5,8 is since I have a
5,6 only. Also, try snd-aoa.

johannes

^ permalink raw reply

* Re: [RFC/PATCH] Make powerpc64 use __thread for per-cpu variables
From: Richard Henderson @ 2006-05-10 15:47 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linux-arch, linuxppc-dev, linux-kernel
In-Reply-To: <17505.26159.807484.477212@cargo.ozlabs.ibm.com>

On Wed, May 10, 2006 at 02:03:59PM +1000, Paul Mackerras wrote:
> With this patch, 64-bit powerpc uses __thread for per-cpu variables.

How do you plan to address the compiler optimizing

	__thread int foo;
	{
	  use(foo);
	  schedule();
	  use(foo);
	}

into

	{
	  int *tmp = &foo;	// tls arithmetic here
	  use(*tmp);
	  schedule();
	  use(*tmp);
	}

Across the schedule, we may have changed cpus, making the cached
address invalid.


r~

^ permalink raw reply

* RE: Information for setting up SMT related parameters on linux 2.6.16 on POWER5
From: Will Schmidt @ 2006-05-10 16:27 UTC (permalink / raw)
  To: Meswani, Mitesh; +Cc: linuxppc-dev, Arnd Bergmann
In-Reply-To: <C26C730943E01145B4F89E37FE0A022002BBC74D@itdsrvmail02.utep.edu>

On Tue, 2006-05-09 at 17:17 -0600, Meswani, Mitesh wrote:
> Thanks guys 
>  
> That answered so many of my questions. 
>  
> If I were to use these macros from user space, would they remain set
> until next reboot or change ? POWER5 allows priorities 2 through 4 for
> user apps, so considering this, and the fact that the normal prioirity
> is level 4, if a user app resets it to say 2 and then finishes without
> changing it back to 4 , would all the subsequent user apps run at the
> new level 2. I wonder what I am saying even makes sense, because the
> kernel internally throttles the priority for various sections of the
> kernel code and it may even overwrite it. 

I dont believe there is any mechanism that ever saves the current
priority between user and kernel, or between threads, etc.  So if you
were to set it, it would remain set until the next HMT_ macro was
touched.  A brief source search shows that the HMT_ macros are
referenced in idle loops, spin locks, exceptions, and hcalls, so not
likely that it would remain set for long. 

>  
> On a slightly unrelated note, I appended some boot parameters like
> smt-enabled=on/off to /etc/lilo.conf and unfortunately I am not able
> to see any effect and it boots the same way. I am switching from the

Perhaps bad notation in my first note.    "smt-enabled=on" is a default,
and will give you threads.   "smt-enabled=off"  will cause those threads
to be off by default. 

>  AIX world so I maybe doing something dumb, please point out if I am !
> This kind of seems to effect the bind processor calls using
> sys_setaffinity when there are 4 logical processors 0-3 on two
> physical processors, bind only allows me to set affinity to either cpu
> 0 or 2, this seems weird to me because my system is booting with two
> logical cpus and then I set online bit to 1 to turn the remaining on,
> thereafter I try binding and havent been very successful. 

Dont know about the affinity stuff.. 

>  
>  
> Thanks for all your replies. 
>  
>  
>  
> 
> Mitesh R. Meswani 
> Ph.D. Candidate 
> Research Associate, PLS2 Group
> Room 106 F, Department of Computer Science
> The University of Texas at El Paso, 
> El Paso, Texas 79968
> Tel: 915 747 8012 (O)
> Email: mmeswani@utep.edu
> 
> 
> ______________________________________________________________________
> From: Segher Boessenkool [mailto:segher@kernel.crashing.org]
> Sent: Mon 5/8/2006 5:04 PM
> To: will_schmidt@vnet.ibm.com
> Cc: Meswani, Mitesh; linuxppc-dev@ozlabs.org; Arnd Bergmann;
> linux-kernel@vger.kernel.org; cbe-oss-dev@ozlabs.org
> Subject: Re: Information for setting up SMT related parameters on
> linux 2.6.16 on POWER5
> 
> 
> > the HMT_* macros are telling firmware that "this processor thread 
> > should
> > run at this priority".  Typically used when we're waiting on a 
> > spinlock.
> > I.e. When we are waiting on a spinlock, we hit the HMT_low macro to 
> > drop
> > our threads priority, allowing the other thread to use those extra
> > cycles finish it's stuff quicker, and maybe even release the lock 
> > we're
> > waiting for.          HMT_* is all within the kernel though, no 
> > exposure
> > to userspace apps.
> 
> Actually, those macros translate straight into a single machine insn.
> No firmware is involved.  See include/asm-powerpc/processor.h.  For
> example:
> 
> #define HMT_very_low()   asm volatile("or 31,31,31   # very low 
> priority")
> 
> You can use those same macros from user space, although it is CPU
> implementation dependent which priorities you can actually set (you
> probably can do low and medium priority).
> 
> 
> Segher
> 
> 
> 
> 

^ permalink raw reply

* Re: Calculating virtual address from physical address
From: Eugene Surovegin @ 2006-05-10 16:43 UTC (permalink / raw)
  To: dhlii; +Cc: Chris Dumoulin, linuxppc-embedded
In-Reply-To: <4461C8BE.4050504@dlasys.net>

On Wed, May 10, 2006 at 07:04:30AM -0400, David H. Lynch Jr. wrote:

[skip]

>     Unless I am completely mistaken, machine checks are not cause by
> softwded are or programming errors, they are cause by hardware problems,

You can trivially trigger MachineChecks without any hardware problems 
- just map some non-existent physical address and try to access it.

-- 
Eugene

^ permalink raw reply

* Re: Viable PPC platform?
From: Eugene Surovegin @ 2006-05-10 16:48 UTC (permalink / raw)
  To: Alex Zeffertt; +Cc: linuxppc-embedded, gd.smth
In-Reply-To: <20060510121141.0a866b8f.ajz@cambridgebroadband.com>

On Wed, May 10, 2006 at 12:11:41PM +0100, Alex Zeffertt wrote:
> On Tue, 9 May 2006 10:15:20 -0700
> Eugene Surovegin <ebs@ebshome.net> wrote:
> 
> > On Tue, May 09, 2006 at 05:41:01PM +0100, Alex Zeffertt wrote:
> > > On Tue, 09 May 2006 10:38:19 -0400
> > > geneSmith <gd.smth@gmail.com> wrote:
> > > 
> > > > I have a ppc405gpr system with 64M ram and 4Meg flash in a
> > > > AM29LV320. Is this a viable platform for linux? Can a filesystem
> > > > (JFFS2?) be put this flash type?
> > > > 
> > > 
> > > I would create an initrd and put every file that doesn't need
> > > to be changed persistently into it instead of JFFS2.
> > 
> > After many years of doing embedded Linux stuff I still don't 
> > understand why people are so fond of initrd.
> > 
> > For temporary stuff - tempfs is much better and flexible. For r/o 
> > stuff - just make separate MTD partition (cramfs, squashfs) and
> > mount it directly as root. Both options will waste significantly
> > less memory.
> > 
> 
> Okay, let me qualify my answer.  It depends on whether you need to
> make persistent changes to the filesystem in flash.  If so, and given
> that your flash is only 4MB, I would recommend moving files to
> somewhere else, e.g. an initrd, because if when a JFFS2 FS is
> approaching full, you often find that writes to flash hang
> while JFFS2 searches for blocks to use as a scratchpad.  This has been
> my experience anyway.
> 
> If you don't need to make persistent changes to files, then I'm sure
> cramfs in flash as a rootfs would work well, with a tmpfs partition
> mounted on /tmp and /var.

You missed my point. initrd should be stored somewhere - in the same 
flash . In this case there is no reason to actually use initrd instead 
of just direct mount from flash.

-- 
Eugene

^ permalink raw reply

* Re: IMAP_ADDR on PPC 8xx
From: Walter L. Wimer III @ 2006-05-10 16:49 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <1147274635.23931.17.camel@excalibur.timesys.com>

On Wed, 2006-05-10 at 11:23 -0400, Walter L. Wimer III wrote:
> Based on your comments and Wolfgang's comments, I conclude that:
> 
>      1. The U-Boots on my MPC885ADS and MPC8272ADS boards are
>         unequivocally broken and should be replaced with ones from the
>         official U-Boot source repositories that use IMMR values
>         matching the Linux kernel source.


FYI, here's a table from the "MPC885ADS PowerQUICC(tm) Application
Development System User's Guide", available on Freescale's website.
This table seems to confirm how they've configured their U-Boot -- the
IMMR is set to 0x02200000...

This may be fine for non-Linux purposes, but it looks like we need to
spread some gospel to Freescale regarding the correct IMMR address for
U-Boot / Linux....

(Or they need to convince folks on this list why their way is
right.... :-)

(In any case I'm convinced.  I'm switching over to the community U-Boot
that uses 0xFF000000.)


FYI-ly,

Walt



               Freescale Semiconductor, Inc.

             Table 3-2. Memory Map in MP885ADS

                                                            Port
ADDESS RANGE                       Memory Type              Size
------------------------    -----------------------------   ----
00000000 - 007FFFFF (8M)    SDRAM -- CS4                     32

02000000 - 020FFFFF (1M)    Communication ports -- CS5
     02000000 - 020000FF                         ATM25
     02000100 - 020001FF                        ATM155
     02000200 - 020002FF                  T1/E1 framer
     02000300 - 020003FF       BCSR5, control register
     02000400 - 020004FF                      Reserved

02100000 - 02107FFF (32K)   BCSR[0-4] (1) -- CS1             32 (2)
     02100000 - 02107FE3                         BCSR0
     02100004 - 02107FE7                         BCSR1
     02100008 - 02107FEB                         BCSR2
     0210000C - 02107FEF                         BCSR3
     02100010 - 02107FF3                         BCSR4

02108000 - 021FFFFF         Empty space

02200000 - 02203FFF         MPC885 internal MAP (3)          32

02204000 - 0221FFFF         Empty space

02220000 - 02227FFF         Security engine (SEC)            64

02228000 - 027FFFFF         Empty space

02800000 - 029FFFFF (2M)                                     32
02A00000 - 02BFFFFF (2M)    Flash SIMM -- CS0
02C00000 - 02FFFFFF (4M)

03000000 - FFFFFFFF         Empty space
-----------------------------------------------------------------
 (1) The device appears repeatedly in multiples of its size.
     That is, BCSR0 appears at memory locations 2100000, 2100020,
     2100040..., while BCSR1 appears at 2100004, 2100024,
     2100044, and so on.
 (2) Only the upper 16 bits (D0\u2013D15) are used.
 (3) Refer to the MPC885 PowerQUICC Family Reference Manual for
     a complete description of the MPC885 internal memory map.

^ permalink raw reply

* Re: Alubook 5,8: No sound with 2.6.17-rc3-g5528e568-dirty
From: Wolfgang Pfeiffer @ 2006-05-10 17:24 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linuxppc-dev list
In-Reply-To: <2829.131.234.104.112.1147277053.squirrel@secure.sipsolutions.net>

On Wed, May 10, 2006 at 06:04:13PM +0200, Johannes Berg wrote:
> > As to the reason why I came here:
> > As I can't be sure whether the issue announced in the subject line is
> > really a kernel issue
> 
> Did it ever work? 

Not with Debian, but with this Ubuntu live CD I have sound: 
Ubuntu 6.06 "Dapper Drake" Beta 2 powerpc (20060427)

The kernel on their CD is a 2.6.15-21-powerpc

> I don't quite know what machine a 5,8 is since I have a
> 5,6 only. 


5.8 is, IINM, the last PPC 15" Powerbook that Apple made

> Also, try snd-aoa.

With the git kernel mentioned in my previous mail there's no snd-aoa
available, IINM. I'll try figure out how to get the source and compile
another kernel with this driver ...

Best Regards
Wolfgang


-- 
Wolfgang Pfeiffer: /ICQ: 286585973/ + + +  /AIM: crashinglinux/
http://profiles.yahoo.com/wolfgangpfeiffer

Key ID: E3037113
http://keyserver.mine.nu/pks/lookup?search=0xE3037113&fingerprint=on

^ permalink raw reply

* Re: IMAP_ADDR on PPC 8xx
From: Dan Malek @ 2006-05-10 17:45 UTC (permalink / raw)
  To: Walter L. Wimer III; +Cc: linuxppc-embedded
In-Reply-To: <1147279763.23931.32.camel@excalibur.timesys.com>


On May 10, 2006, at 12:49 PM, Walter L. Wimer III wrote:

> FYI, here's a table from the "MPC885ADS PowerQUICC(tm) Application
> Development System User's Guide", available on Freescale's website.
> This table seems to confirm how they've configured their U-Boot -- the
> IMMR is set to 0x02200000...

Freescale never ported U-Boot to the MPC855ADS platform, and
I don't believe it came with any software at all.  This IMMR value was
chosen to be backward compatible with some old software tools to
get a compact address space without the need of using the MMU,
long before we had Linux running on the platform.

> This may be fine for non-Linux purposes, but it looks like we need to
> spread some gospel to Freescale regarding the correct IMMR address for
> U-Boot / Linux....

I think you better be pointing fingers at the clueless person that
provided the software you have, as it didn't come from Freescale nor
any of the public U-Boot sources.

Thanks.

	-- Dan

^ permalink raw reply

* Need help debugging
From: Steve Iribarne (GMail) @ 2006-05-10 18:04 UTC (permalink / raw)
  To: linuxppc-embedded

ok, so I've got my BDI2000 working and talking to my 8260.
I read as much info as I could find on this but I still think I'm
missing something.

I have a uBoot image and I wait for the system to download my kernel.=20
Not through the BDI, I just let the uBoot boot image do it the normal
way.  I start it by telling the BDI to "go".

Then what I want to do is connect to my linux kernel after the kernel
is up and running so I do:

(gdb) target remote bdi:2001
Remote debugging using bdi:2001
0xc000c9cc in ??()
(gdb)

Then I add my symbol table.

(gdb) add-symbol-file vmlinux 0xc0000000

at that point I get a reset.

I turn off the software watchdog in the BDI config file.  Is there
something I am missing?

Thanks in advance.

-stv

^ permalink raw reply

* Re: [RFC/PATCH] Make powerpc64 use __thread for per-cpu variables
From: Steven Rostedt @ 2006-05-10 18:04 UTC (permalink / raw)
  To: Richard Henderson
  Cc: linux-arch, linuxppc-dev, Paul Mackerras, linux-kernel, t
In-Reply-To: <20060510154702.GA28938@twiddle.net>


On Wed, 10 May 2006, Richard Henderson wrote:

> On Wed, May 10, 2006 at 02:03:59PM +1000, Paul Mackerras wrote:
> > With this patch, 64-bit powerpc uses __thread for per-cpu variables.
>
> How do you plan to address the compiler optimizing
>
> 	__thread int foo;
> 	{
> 	  use(foo);
> 	  schedule();
> 	  use(foo);
> 	}
>
> into
>
> 	{
> 	  int *tmp = &foo;	// tls arithmetic here
> 	  use(*tmp);
> 	  schedule();
> 	  use(*tmp);
> 	}
>
> Across the schedule, we may have changed cpus, making the cached
> address invalid.
>

If you mean use(foo) is the same as per_cpu(foo), I can't see the compile
optimizing this:

+#define per_cpu(var, cpu)                                      \
+       (*(__typeof__(&per_cpu__##var))({                       \
+               void *__ptr;                                    \
+               asm("addi %0,%1,per_cpu__"#var"@tprel"          \
+                   : "=b" (__ptr)                              \
+                   : "b" (paca[(cpu)].thread_ptr));            \
+               __ptr;                                          \
+       }))


Anyway, per_cpu variables are usually used with preemption turned off and
no need to schedule.

-- Steve

^ permalink raw reply

* Help: Linux porting to custom target hw
From: Jayanta Das @ 2006-05-10 18:01 UTC (permalink / raw)
  To: linuxppc-embedded

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

Hello:
 
Can someone point me in the right direction for some good documentation
on the above topic. Following is what I so far have done and what I need
to do.
 
1. Set up host environment based on Fedora Core 4
2. Downloaded 'ppc4xx' tool chain, ELDK and kernel
3. Built U-Boot and uImage
4. Flashed U-Boot on the 2nd flash on the Ocotea board (AMCC440GX
PowerPC)
5. Changed the environment variable for NFS mounted root fs and other
MAC and IP addresses as needed
6. TFTP uImage at 400000
7. bootm and kernel boots all right with root fs mounted on the host
 
I am expecting my hardware based on 440GX end of the month. I told the
HW engineer to follow the peripheral i/f as much possible close to the
ref. design. We are putting 32MB of Flash and 256MB of RAM.
 
I need some guidance so that I can port U-Boot and the kernel (minimal
changes) so that I can bring up the board initially with root fs NFS
minted and later on the RAMDISK.
 
Appreciate the help.
 
Regards.

[-- Attachment #2: Type: text/html, Size: 2863 bytes --]

^ permalink raw reply

* Re: [RFC/PATCH] Make powerpc64 use __thread for per-cpu variables
From: David S. Miller @ 2006-05-10 19:40 UTC (permalink / raw)
  To: rth; +Cc: linux-arch, linuxppc-dev, paulus, linux-kernel
In-Reply-To: <20060510154702.GA28938@twiddle.net>

From: Richard Henderson <rth@twiddle.net>
Date: Wed, 10 May 2006 08:47:13 -0700

> How do you plan to address the compiler optimizing
 ...
> Across the schedule, we may have changed cpus, making the cached
> address invalid.

Per-cpu variables need to be accessed only with preemption
disabled.  And the preemption enable/disable operations
provide a compiler memory barrier.

#define preempt_disable() \
do { \
	inc_preempt_count(); \
	barrier(); \
} while (0)

 ...

#define preempt_enable() \
do { \
	preempt_enable_no_resched(); \
	barrier(); \
	preempt_check_resched(); \
} while (0)

The scheduler itself need to take care to not cause the situation
you mention either.

Therefore this is an issue we had already, not some new thing
introduced by using __thread for per-cpu variables.

^ permalink raw reply

* Re: IMAP_ADDR on PPC 8xx
From: John Rigby @ 2006-05-10 19:58 UTC (permalink / raw)
  To: Dan Malek; +Cc: linuxppc-embedded
In-Reply-To: <6CE25E1C-0F7A-4644-926E-746C17A7A851@embeddedalley.com>

Thanks Dan for the extra info.

Just to let everyone know even though this turned out to not
be our problem we here at Freescale are looking at how we
can make sure this does not happen in the future.  We want
any uboot shipped with future Freescale boards to have the
correct behavior.  We also understand the board documentation
needs to be changed to mention the appropriate value for IMMR
for linux.

John
jrigby@freescale.com

On 5/10/06, Dan Malek <dan@embeddedalley.com> wrote:
>
> On May 10, 2006, at 12:49 PM, Walter L. Wimer III wrote:
>
> > FYI, here's a table from the "MPC885ADS PowerQUICC(tm) Application
> > Development System User's Guide", available on Freescale's website.
> > This table seems to confirm how they've configured their U-Boot -- the
> > IMMR is set to 0x02200000...
>
> Freescale never ported U-Boot to the MPC855ADS platform, and
> I don't believe it came with any software at all.  This IMMR value was
> chosen to be backward compatible with some old software tools to
> get a compact address space without the need of using the MMU,
> long before we had Linux running on the platform.
>
> > This may be fine for non-Linux purposes, but it looks like we need to
> > spread some gospel to Freescale regarding the correct IMMR address for
> > U-Boot / Linux....
>
> I think you better be pointing fingers at the clueless person that
> provided the software you have, as it didn't come from Freescale nor
> any of the public U-Boot sources.
>
> Thanks.
>
>         -- Dan
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>

^ permalink raw reply

* Re: IMAP_ADDR on PPC 8xx
From: Walter L. Wimer III @ 2006-05-10 20:19 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <6CE25E1C-0F7A-4644-926E-746C17A7A851@embeddedalley.com>

On Wed, 2006-05-10 at 13:45 -0400, Dan Malek wrote:
> > This may be fine for non-Linux purposes, but it looks like we need
> > to spread some gospel to Freescale regarding the correct IMMR
> > address for U-Boot / Linux....
> 
> I think you better be pointing fingers at the clueless person that
> provided the software you have, as it didn't come from Freescale nor
> any of the public U-Boot sources.


My sincerest apologies to Freescale.  Upon further research, it appears
that it was another TimeSys engineer (who has since moved on to another
job) who built and installed U-Boot on our MPC885ADS board.  Strangely,
it appears that he started with the community U-Boot 1.1.3 and then
added a patch to change the IMMR value (plus a few other things).  I'm
not sure why.  He's a very bright guy, so I'm very puzzled....

Anyway, mystery solved.

Again, my sincerest apologies to Freescale.

I built the community U-Boot 1.1.4 and flashed it onto our board.  Linux
2.6.16.11 now boots much farther than before (I'm now getting printk()
output).  The kernel is hitting a new problem now, but I suspect it may
be related to the TLB code that Marcello has discussed recently.  I'm
going to go look at that patch next.  :-)


> Thanks.
> 
>         -- Dan


Thanks again to everyone!!!

Walt Wimer
TimeSys Corporation

^ permalink raw reply

* Re: [RFC/PATCH] Make powerpc64 use __thread for per-cpu variables
From: Paul Mackerras @ 2006-05-10 21:05 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-arch, linuxppc-dev, linux-kernel, rth
In-Reply-To: <20060510.124003.04457042.davem@davemloft.net>

David S. Miller writes:

> From: Richard Henderson <rth@twiddle.net>
> Date: Wed, 10 May 2006 08:47:13 -0700
> 
> > How do you plan to address the compiler optimizing
>  ...
> > Across the schedule, we may have changed cpus, making the cached
> > address invalid.
> 
> Per-cpu variables need to be accessed only with preemption
> disabled.  And the preemption enable/disable operations
> provide a compiler memory barrier.

No, Richard has a point, it's not the value that is the concern, it's
the address, which gcc could assume is still valid after a barrier.
Drat.

Paul.

^ permalink raw reply

* Re: Alubook 5,8: No sound with 2.6.17-rc3-g5528e568-dirty
From: Christoph Cebulla @ 2006-05-10 20:54 UTC (permalink / raw)
  To: Wolfgang Pfeiffer; +Cc: linuxppc-dev list, Johannes Berg
In-Reply-To: <20060510172443.GF3878@localhost>

Hi,

> > Did it ever work? 

Kind of... with a patch[1] originally by Ben Collins and adapted by
Gaudenz Steinlin it at least lets you play your favorite music. The
kernel I use is a 2.6.17-rc3-git5.

> Not with Debian, but with this Ubuntu live CD I have sound: 
> Ubuntu 6.06 "Dapper Drake" Beta 2 powerpc (20060427)
> 
> The kernel on their CD is a 2.6.15-21-powerpc

This patch applied cleanly on every kernel I tried since 2.6.15...

> 5.8 is, IINM, the last PPC 15" Powerbook that Apple made
> 
> > Also, try snd-aoa.

Best regards,
Christoph


[1] http://lists.debian.org/debian-powerpc/2006/03/msg00226.html

^ permalink raw reply

* Re: Alubook 5,8: No sound with 2.6.17-rc3-g5528e568-dirty
From: Wolfgang Pfeiffer @ 2006-05-10 21:30 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linuxppc-dev list
In-Reply-To: <2829.131.234.104.112.1147277053.squirrel@secure.sipsolutions.net>

On Wed, May 10, 2006 at 06:04:13PM +0200, Johannes Berg wrote:

> Also, try snd-aoa.

Impossible here, it does not compile here. Neither with gcc 4.0 or 4.1

I took your instructions from
http://lists.debian.org/debian-powerpc/2006/03/msg00470.html

And if I understand them correctly it's not necessary to descend to
some directory level of the kernel source for my current kernel. I
slightly modified your instructions (being addicted to git, Sorry
about that ... :) .. :

Something like:

mkdir snd-aoa
cd snd-aoa/
git clone http://johannes.sipsolutions.net/snd-aoa.git/ 
cd snd-aoa/ 
make


The above did not work: compile problems:
-----------------
include/sound/pcm.h:742: error: dereferencing pointer to incomplete type
include/sound/pcm.h: In function 'snd_pcm_capture_empty':
include/sound/pcm.h:755: error: dereferencing pointer to incomplete type
include/sound/pcm.h: In function 'snd_pcm_trigger_done':
include/sound/pcm.h:762: error: dereferencing pointer to incomplete type
include/sound/pcm.h: At top level:
include/sound/pcm.h:844: error: syntax error before 'u_int32_t'
include/sound/pcm.h:844: warning: function declaration isn't a prototype
include/sound/pcm.h:846: error: syntax error before 'u_int64_t'
include/sound/pcm.h:846: warning: function declaration isn't a prototype
include/sound/pcm.h:901: error: syntax error before 'snd_pcm_format_size'
include/sound/pcm.h:901: error: syntax error before 'size_t'
include/sound/pcm.h:901: warning: type defaults to 'int' in declaration of 'snd_pcm_format_size'
include/sound/pcm.h:901: warning: function declaration isn't a prototype
include/sound/pcm.h:901: warning: data definition has no type or storage class
include/sound/pcm.h: In function 'snd_pcm_set_runtime_buffer':
include/sound/pcm.h:936: error: dereferencing pointer to incomplete type
include/sound/pcm.h:938: error: dereferencing pointer to incomplete type
include/sound/pcm.h:939: error: dereferencing pointer to incomplete type
include/sound/pcm.h:939: error: dereferencing pointer to incomplete type
include/sound/pcm.h:940: error: dereferencing pointer to incomplete type
include/sound/pcm.h:940: error: dereferencing pointer to incomplete type
include/sound/pcm.h:941: error: dereferencing pointer to incomplete type
include/sound/pcm.h:941: error: dereferencing pointer to incomplete type
include/sound/pcm.h:943: error: dereferencing pointer to incomplete type
include/sound/pcm.h:944: error: dereferencing pointer to incomplete type
include/sound/pcm.h:945: error: dereferencing pointer to incomplete type
include/sound/pcm.h:946: error: dereferencing pointer to incomplete type
include/sound/pcm.h: At top level:
include/sound/pcm.h:966: error: syntax error before 'size_t'
include/sound/pcm.h:966: warning: function declaration isn't a prototype
include/sound/pcm.h:969: error: syntax error before 'size_t'
include/sound/pcm.h:969: warning: function declaration isn't a prototype
include/sound/pcm.h:970: error: syntax error before 'size_t'
include/sound/pcm.h:970: warning: function declaration isn't a prototype
include/sound/pcm.h: In function 'snd_pcm_mmap_data_open':
include/sound/pcm.h:981: error: dereferencing pointer to incomplete type
include/sound/pcm.h:982: error: dereferencing pointer to incomplete type
include/sound/pcm.h: In function 'snd_pcm_mmap_data_close':
include/sound/pcm.h:987: error: dereferencing pointer to incomplete type
include/sound/pcm.h:988: error: dereferencing pointer to incomplete type
include/sound/pcm.h: At top level:
include/sound/pcm.h:1000: error: syntax error before 'size_t'
include/sound/pcm.h:1001: warning: function declaration isn't a prototype
include/sound/pcm.h: In function 'snd_pcm_limit_isa_dma_size':
include/sound/pcm.h:1002: error: 'max' undeclared (first use in this function)
include/sound/pcm.h:1002: error: 'dma' undeclared (first use in this function)
In file included from /home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/aoa.h:21,
                 from /home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.c:14:
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/../soundbus/soundbus.h: At top level:
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/../soundbus/soundbus.h:37: error: syntax error before 'u64'
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/../soundbus/soundbus.h:37: warning: no semicolon at end of struct or union
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/../soundbus/soundbus.h:40: error: syntax error before 'transfer_in'
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/../soundbus/soundbus.h:44: error: syntax error before '}' token
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/../soundbus/soundbus.h:142: error: field 'ofdev' has incomplete type
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/../soundbus/soundbus.h:169: error: syntax error before 'u32'
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/../soundbus/soundbus.h:169: warning: no semicolon at end of struct or union
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/../soundbus/soundbus.h:193: error: field 'driver' has incomplete type
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.c: In function 'attach_codec_to_fabric':
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.c:33: error: 'ENOENT' undeclared (first use in this function)
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.c: In function 'aoa_fabric_register':
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.c:85: error: 'EALREADY' undeclared (first use in this function)
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.c:89: error: 'EEXIST' undeclared (first use in this function)
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.c:91: error: 'EINVAL' undeclared (first use in this function)
make[3]: *** [/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.o] Error 1
make[2]: *** [/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa] Error 2
make[1]: *** [_module_/home/shorty/kernel-factory/git/snd-aoa/snd-aoa] Error 2
make[1]: Leaving directory `/home/shorty/kernel-factory/git/linux-2.6'
make: *** [modules] Error 2
----------------

FYI:
------------------------
$ gcc --version
gcc (GCC) 4.0.4 20060422 (prerelease) (Debian 4.0.3-2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-------------------------------------------

Same being true for this:


$ pwd 
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa
$ make clean
$ MAKEFLAGS="CC=gcc-4.1" make

The end from the latter command:

--------------
include/sound/pcm.h:669: error: 'struct snd_pcm_runtime' has no member named 'status'
include/sound/pcm.h:669: error: 'struct snd_pcm_runtime' has no member named 'control'
include/sound/pcm.h:671: error: 'struct snd_pcm_runtime' has no member named 'boundary'
include/sound/pcm.h: In function 'snd_pcm_playback_ready':
include/sound/pcm.h:695: error: 'struct snd_pcm_substream' has no member named 'runtime'
include/sound/pcm.h:696: error: 'struct snd_pcm_runtime' has no member named 'control'
include/sound/pcm.h: In function 'snd_pcm_capture_ready':
include/sound/pcm.h:709: error: 'struct snd_pcm_substream' has no member named 'runtime'
include/sound/pcm.h:710: error: 'struct snd_pcm_runtime' has no member named 'control'
include/sound/pcm.h: In function 'snd_pcm_playback_data':
include/sound/pcm.h:724: error: 'struct snd_pcm_substream' has no member named 'runtime'
include/sound/pcm.h:726: error: 'struct snd_pcm_runtime' has no member named 'stop_threshold'
include/sound/pcm.h:726: error: 'struct snd_pcm_runtime' has no member named 'boundary'
include/sound/pcm.h: In function 'snd_pcm_playback_empty':
include/sound/pcm.h:741: error: 'struct snd_pcm_substream' has no member named 'runtime'
include/sound/pcm.h: In function 'snd_pcm_capture_empty':
include/sound/pcm.h:755: error: 'struct snd_pcm_substream' has no member named 'runtime'
include/sound/pcm.h: In function 'snd_pcm_trigger_done':
include/sound/pcm.h:762: error: 'struct snd_pcm_substream' has no member named 'runtime'
include/sound/pcm.h: At top level:
include/sound/pcm.h:844: error: expected declaration specifiers or '...' before 'u_int32_t'
include/sound/pcm.h:846: error: expected declaration specifiers or '...' before 'u_int64_t'
include/sound/pcm.h:901: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'snd_pcm_format_size'
include/sound/pcm.h: In function 'snd_pcm_set_runtime_buffer':
include/sound/pcm.h:936: error: 'struct snd_pcm_substream' has no member named 'runtime'
include/sound/pcm.h:938: error: 'struct snd_pcm_runtime' has no member named 'dma_buffer_p'
include/sound/pcm.h:939: error: 'struct snd_pcm_runtime' has no member named 'dma_area'
include/sound/pcm.h:940: error: 'struct snd_pcm_runtime' has no member named 'dma_addr'
include/sound/pcm.h:940: error: 'struct snd_dma_buffer' has no member named 'addr'
include/sound/pcm.h:941: error: 'struct snd_pcm_runtime' has no member named 'dma_bytes'
include/sound/pcm.h:941: error: 'struct snd_dma_buffer' has no member named 'bytes'
include/sound/pcm.h:943: error: 'struct snd_pcm_runtime' has no member named 'dma_buffer_p'
include/sound/pcm.h:944: error: 'struct snd_pcm_runtime' has no member named 'dma_area'
include/sound/pcm.h:945: error: 'struct snd_pcm_runtime' has no member named 'dma_addr'
include/sound/pcm.h:946: error: 'struct snd_pcm_runtime' has no member named 'dma_bytes'
include/sound/pcm.h: At top level:
include/sound/pcm.h:966: error: expected declaration specifiers or '...' before 'size_t'
include/sound/pcm.h:966: error: expected declaration specifiers or '...' before 'size_t'
include/sound/pcm.h:969: error: expected declaration specifiers or '...' before 'size_t'
include/sound/pcm.h:969: error: expected declaration specifiers or '...' before 'size_t'
include/sound/pcm.h:970: error: expected declaration specifiers or '...' before 'size_t'
include/sound/pcm.h: In function 'snd_pcm_mmap_data_open':
include/sound/pcm.h:981: error: 'struct vm_area_struct' has no member named 'vm_private_data'
include/sound/pcm.h:982: error: 'struct snd_pcm_substream' has no member named 'runtime'
include/sound/pcm.h: In function 'snd_pcm_mmap_data_close':
include/sound/pcm.h:987: error: 'struct vm_area_struct' has no member named 'vm_private_data'
include/sound/pcm.h:988: error: 'struct snd_pcm_substream' has no member named 'runtime'
include/sound/pcm.h: At top level:
include/sound/pcm.h:1000: error: expected declaration specifiers or '...' before 'size_t'
include/sound/pcm.h: In function 'snd_pcm_limit_isa_dma_size':
include/sound/pcm.h:1002: error: 'max' undeclared (first use in this function)
In file included from /home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/aoa.h:21,
                 from /home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.c:14:
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/../soundbus/soundbus.h: At top level:
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/../soundbus/soundbus.h:37: error: expected specifier-qualifier-list before 'u64'
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/../soundbus/soundbus.h:142: error: field 'ofdev' has incomplete type
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/../soundbus/soundbus.h:169: error: expected specifier-qualifier-list before 'u32'
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/../soundbus/soundbus.h:193: error: field 'driver' has incomplete type
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.c: In function 'attach_codec_to_fabric':
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.c:33: error: 'ENOENT' undeclared (first use in this function)
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.c: In function 'aoa_fabric_register':
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.c:85: error: 'EALREADY' undeclared (first use in this function)
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.c:89: error: 'EEXIST' undeclared (first use in this function)
/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.c:91: error: 'EINVAL' undeclared (first use in this function)
make[3]: *** [/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa/snd-aoa-core.o] Error 1
make[2]: *** [/home/shorty/kernel-factory/git/snd-aoa/snd-aoa/aoa] Error 2
make[1]: *** [_module_/home/shorty/kernel-factory/git/snd-aoa/snd-aoa] Error 2
make[1]: Leaving directory `/home/shorty/kernel-factory/git/linux-2.6'
make: *** [modules] Error 2
-------------

I should compile with gcc 4.1, IINM:

$ cat /proc/version
 Linux version 2.6.17-rc3-g5528e568-dirty (root@debby1-6) (gcc version
4.1.1 20060428 (prerelease) (Debian 4.1.0-2)) #1 Sun May 7 23:51:15
CEST 2006

Does it help?

Regards
Wolfgang

-- 
Wolfgang Pfeiffer: /ICQ: 286585973/ + + +  /AIM: crashinglinux/
http://profiles.yahoo.com/wolfgangpfeiffer

Key ID: E3037113
http://keyserver.mine.nu/pks/lookup?search=0xE3037113&fingerprint=on

^ permalink raw reply

* Re: [RFC/PATCH] Make powerpc64 use __thread for per-cpu variables
From: David S. Miller @ 2006-05-10 22:25 UTC (permalink / raw)
  To: paulus; +Cc: linux-arch, linuxppc-dev, linux-kernel, rth
In-Reply-To: <17506.21908.857189.645889@cargo.ozlabs.ibm.com>

From: Paul Mackerras <paulus@samba.org>
Date: Thu, 11 May 2006 07:05:24 +1000

> No, Richard has a point, it's not the value that is the concern, it's
> the address, which gcc could assume is still valid after a barrier.
> Drat.

Oh right, and that's currently part of why we obfuscate the
address computation with the RELOC_HIDE() buisness.

Once we expose what's really going on with something like
__thread, gcc can now be "smart" about it.

^ permalink raw reply

* Re: [RFC/PATCH] Make powerpc64 use __thread for per-cpu variables
From: Paul Mackerras @ 2006-05-10 23:05 UTC (permalink / raw)
  To: Richard Henderson; +Cc: linux-arch, linuxppc-dev, linux-kernel, t
In-Reply-To: <20060510154702.GA28938@twiddle.net>

Richard Henderson writes:

> How do you plan to address the compiler optimizing
> 
> 	__thread int foo;
> 	{
> 	  use(foo);
> 	  schedule();
> 	  use(foo);
> 	}
> 
> into
> 
> 	{
> 	  int *tmp = &foo;	// tls arithmetic here
> 	  use(*tmp);
> 	  schedule();
> 	  use(*tmp);
> 	}

Hmmm...  Would it be sufficient to use a RELOC_HIDE in __get_cpu_var,
like this?

#define __get_cpu_var(x)	(*(RELOC_HIDE(&per_cpu__##x, 0)))

Paul.

^ permalink raw reply

* Re: Alubook 5,8: No sound with 2.6.17-rc3-g5528e568-dirty
From: Wolfgang Pfeiffer @ 2006-05-10 23:08 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linuxppc-dev list
In-Reply-To: <20060510213028.GG3878@localhost>

On Wed, May 10, 2006 at 11:30:28PM +0200, Wolfgang Pfeiffer wrote:
> On Wed, May 10, 2006 at 06:04:13PM +0200, Johannes Berg wrote:
> 
> > Also, try snd-aoa.
> 
> Impossible here, it does not compile here. Neither with gcc 4.0 or 4.1
> 

Not being sure tho' whether the fact my source dir for the running
kernel is cleaned up, IINM, (like "fakeroot make-kpkg clean") is the
culprit for the failed compile ... I'll have a look into that at
next daylight ... :)

Until then

Wolfgang 

-- 
Wolfgang Pfeiffer: /ICQ: 286585973/ + + +  /AIM: crashinglinux/
http://profiles.yahoo.com/wolfgangpfeiffer

Key ID: E3037113
http://keyserver.mine.nu/pks/lookup?search=0xE3037113&fingerprint=on

^ permalink raw reply

* Re: [RFC/PATCH] Make powerpc64 use __thread for per-cpu variables
From: Segher Boessenkool @ 2006-05-10 23:17 UTC (permalink / raw)
  To: Paul Mackerras
  Cc: linux-arch, linuxppc-dev, rth, David S. Miller, linux-kernel
In-Reply-To: <17506.21908.857189.645889@cargo.ozlabs.ibm.com>

>>> How do you plan to address the compiler optimizing
>>  ...
>>> Across the schedule, we may have changed cpus, making the cached
>>> address invalid.
>>
>> Per-cpu variables need to be accessed only with preemption
>> disabled.  And the preemption enable/disable operations
>> provide a compiler memory barrier.
>
> No, Richard has a point, it's not the value that is the concern, it's
> the address, which gcc could assume is still valid after a barrier.
> Drat.

Would an asm clobber of GPR13 in the schedule routines (or a wrapper
for them, or whatever) work?


Segher

^ permalink raw reply

* [RFC-PATCH] Prevent tasks from sleeping in die()
From: David Wilder @ 2006-05-11  0:19 UTC (permalink / raw)
  To: linuxppc-dev

I am seeing an issue in die() when voluntary preemption is enabled.
die() 
->>show_regs()->>show_instructions()->>__get_user_nocheck()->>might_sleep()
If multiple CPUs call die() and one should sleep other CPUs may block on 
the die_lock held by the sleeping CPU.  This problem is seen when a 
soft-reset is issued as all CPUs call die() at roughly the same time.

Is this the correct way to fix this problem?

Signed-of-by: <wilder@us.ibm.com>

diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 064a525..dc45bcd 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -101,6 +101,15 @@ int die(const char *str, struct pt_regs
    if (debugger(regs))
        return 1;

+    /* If voluntary preemption is on we can sleep
+     * in show_regs().  This is bad as we hold the
+    * die_lock. Ether the task is exiting or the system
+    * is crashing so there is no need to restore the
+    * NEED_RESCHED flag.
+    */
+    clear_need_resched();
+
+
        console_verbose();
        spin_lock_irq(&die_lock);
        bust_spinlocks(1);

-- 
David Wilder
IBM Linux Technology Center
Beaverton, Oregon, USA 
dwilder@us.ibm.com
(503)578-3789

^ permalink raw reply related


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