LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2] pasemi: process i2c device tree entries at boot
From: Scott Wood @ 2007-10-15 22:54 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, paulus
In-Reply-To: <20071015224932.GA23875@lixom.net>

Olof Johansson wrote:
> Setup i2c_board_info based on device tree contents. This has to be
> a device_initcall since we need PCI to be probed by the time we
> run it, but before the actual driver is initialized.

Can we factor at least some of this stuff out into common code?

We certainly shouldn't need more than one translation table, and this loop:

> +static int __init pasemi_register_i2c_devices(void)
> +{
> +	struct pci_dev *pdev;
> +	struct device_node *adap_node;
> +	struct device_node *node;
> +
> +	pdev = NULL;
> +	while ((pdev = pci_get_device(PCI_VENDOR_ID_PASEMI, 0xa003, pdev))) {
> +		adap_node = pci_device_to_OF_node(pdev);

Should be in the pasemi code, and pass a bus number and device node to 
generic code that does this:

> +		node = NULL;
> +		while ((node = of_get_next_child(adap_node, node))) {

-Scott

^ permalink raw reply

* Re: [PATCH] PowerPC: Add BCM5248 and Marvell 88E1111 PHY support to NEW EMAC.
From: Josh Boyer @ 2007-10-15 22:47 UTC (permalink / raw)
  To: benh; +Cc: netdev, Jeff Garzik, linuxppc-dev
In-Reply-To: <1192482323.11795.38.camel@pasglop>

On Tue, 2007-10-16 at 07:05 +1000, Benjamin Herrenschmidt wrote:
> On Mon, 2007-10-15 at 15:04 -0400, Jeff Garzik wrote:
> > I would ideally like a single active patch generator (even if they
> > are 
> > merely reviewed others work sometimes).
> > 
> > Outside of that, I'm hoping you and the other people listed making 
> > changes will self-organize without my help :)
> 
> Josh, do you want to be the central point / maintainer for it or do you
> want me to do it ? There's a lot of code from me in there and I did this
> fork in the first place so I have a pretty good idea of what's going on
> in this driver and what still needs to be done :-)

As always, you're welcome to it.  You probably don't want to own it long
term, but I'd appreciate the help for the time being.

josh

^ permalink raw reply

* Re: [PATCH v2 1/4] Implement {read,update}_persistent_clock.
From: Benjamin Herrenschmidt @ 2007-10-15 23:02 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linuxppc-dev, Thomas Gleixner, Paul Mackerras, Realtime Kernel,
	Steven Rostedt
In-Reply-To: <4713AC4E.4050002@ru.mvista.com>


On Mon, 2007-10-15 at 22:07 +0400, Sergei Shtylyov wrote:
> > Proper approach is to rip off what is altready in -rt there and
> replace
> > it with Tony patch set.
> 
>     Tony's patchset is broken at places compared to what is in -rt. So
> that 
> would be proper *double standard* approach. :-/

Rather than tony patchset, can you look at what paulus has been
submitting, which should fix a few issues in tony initial patch and is
working, and tell us if you think something is still broken ?

Cheers,
Ben.

^ permalink raw reply

* boards in arch/ppc -> arch/powerpc for 85xx
From: Kumar Gala @ 2007-10-15 23:07 UTC (permalink / raw)
  To: Stefan Roese, Dan Malek, David Woodhouse; +Cc: linuxppc-dev list

Guys,

I was wondering if you cared about the following boards existing in  
arch/powerpc:

* STX GP3
* TQM 85xx
* SBC 8560

I'm told WR doesn't care about the SBC 8560, so I'll see if David does.

I'm willing to look into doing the port over, but would need some  
help testing.

- k

^ permalink raw reply

* Re: [PATCH 1/5] Update ibm_newemac to use dcr_host_t.base
From: Michael Ellerman @ 2007-10-15 23:22 UTC (permalink / raw)
  To: benh; +Cc: Paul Mackerras, Jeff Garzik, linuxppc-dev
In-Reply-To: <1192481682.11795.23.camel@pasglop>

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

On Tue, 2007-10-16 at 06:54 +1000, Benjamin Herrenschmidt wrote:
> On Mon, 2007-10-15 at 14:34 -0400, Jeff Garzik wrote:
> > Michael Ellerman wrote:
> > > Now that dcr_host_t contains the base address, we can use that in the
> > > ibm_newemac code, rather than storing it separately.
> > > 
> > > Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> > > ---
> > >  drivers/net/ibm_newemac/mal.c |    9 +++++----
> > >  drivers/net/ibm_newemac/mal.h |    5 ++---
> > >  2 files changed, 7 insertions(+), 7 deletions(-)
> > 
> > applied 1-5
> 
> Those patches have been around for some time now, they didn't make
> paulus initial merge for reasons I'm not sure about but I think they
> should go into 2.6.24. Now the question is via Jeff or via Paulus ? :-)

The first three went in already, these are the following cleanups. I
wanted to wait for the newemac driver to go into Linus' tree via Jeff. I
have no opinion on who's tree they should go through from here.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

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: 189 bytes --]

^ permalink raw reply

* RE: Override timer interrupt
From: Paul Mackerras @ 2007-10-15 23:30 UTC (permalink / raw)
  To: Rune Torgersen; +Cc: linuxppc-embedded, linuxppc-dev
In-Reply-To: <DCEAAC0833DD314AB0B58112AD99B93B037D4F05@ismail.innsys.innovsys.com>

Rune Torgersen writes:

> The main couse is that our main bus frequency cannort be divided into
> 1kHz evently by the decrementer.
> Main bus freq = 99532800 Hz.
> Decrementer then becomes 24883, which gives us 999991.9624485600nsec per
> jiffy.
> That is not a number easilly converted into time without drift.

That shouldn't be a problem any more with the CONFIG_GENERIC_TIME
stuff.  What happens is that update_wall_time will accumulate
clock->xtime_interval to xtime for every clock->cycle_interval
timebase ticks.  The clock->xtime_interval is in units of 2^-22
nanoseconds, so it is very accurate.  It is computed from
clock->cycle_interval and clock->mult in
clocksource_calculate_interval() (in include/linux/clocksource.h).

Paul.

^ permalink raw reply

* Re: boards in arch/ppc -> arch/powerpc for 85xx
From: Wolfgang Denk @ 2007-10-15 23:34 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev list
In-Reply-To: <7DBC0977-0367-40F5-8A30-ACA02FD4E9FA@kernel.crashing.org>

Dear Kumar,

in message <7DBC0977-0367-40F5-8A30-ACA02FD4E9FA@kernel.crashing.org> you wrote:
> 
> I was wondering if you cared about the following boards existing in  
> arch/powerpc:
> 
...
> * TQM 85xx
...

We definitely care about the TQM8xx{L,M,D}, TQM5200, TQM82xx, TQM834x,
TQM85xx and TQM86xx boards.

> I'm willing to look into doing the port over, but would need some  
> help testing.

Ah! Excellent!

As for 85xx, I can test any time on  TQM8540,  TQM8541,  TQM8555  and
TQM8560.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"The hottest places in Hell are reserved for those who, in  times  of
moral crisis, preserved their neutrality."                    - Dante

^ permalink raw reply

* Re: can and mpc5200b
From: Wolfgang Denk @ 2007-10-15 23:36 UTC (permalink / raw)
  To: S. Fricke; +Cc: linuxppc-dev
In-Reply-To: <20071015133233.GB4859@sfrouter>

In message <20071015133233.GB4859@sfrouter> you wrote:
> 
> what is the reasonable can-driver for a mpc5200b?

socket-can.

> I have seen for the peak-3.17 driver a port for the mpc5200 from denx on their
> website, but with kernel 2.6.23 I dont have a chance to use this?

No, but socket-can is part of our kernel tree already, and of the
kernel.org tree in 2.6.24

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
The human mind ordinarily operates at only ten percent of its capaci-
ty - the rest is overhead for the operating system.

^ permalink raw reply

* Re: mpc 860 boot linux2.6.23 problem
From: Wolfgang Denk @ 2007-10-15 23:38 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-embedded@ozlabs.org
In-Reply-To: <4713A08C.3060204@freescale.com>

In message <4713A08C.3060204@freescale.com> you wrote:
> keng_629 wrote:
> >  
> > i am proting linux2.63.23 to mpc860t board with uboot1.1.4 as bootloader.
> > my bootargs is root=/dev/ram rw init=/linuxrc.
> > i use debugger to see the regedits, find pc is run in the cpu_idle().
> > what is wrong with my kernel, plese give me some advice.thank you .
> 
> Posting the same thing over and over again isn't going to change the 
> response.  Try head-of-Linus's-git, make sure you're using arch/powerpc, 
> and post the device tree you're using.  Without more information, we 
> can't help you.

Just to point out the obvious: U-Boot 1.1.4 is *way* too old to
support any device-tree based kernel, so the fist step is to update
U-Boot to a somewhat recent version (i. e. 1.3.0-rcX).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"Faith: not *wanting* to know what is true."    - Friedrich Nietzsche

^ permalink raw reply

* Re: [PATCH v2 3/4] Implement clockevents driver for powerpc
From: Paul Mackerras @ 2007-10-15 23:44 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linuxppc-dev, Thomas Gleixner, Realtime Kernel
In-Reply-To: <4713A616.3090103@ru.mvista.com>

Sergei Shtylyov writes:

>     I don't see my own signoff or at least a reference to my prior work in
> this patch or even at -rt patch -- despite this code ha clearly borrowed from
> it.  And I'm not sure why this crippled version (lacking 40x/ Book E specific
> clockevents implementation) is preferred over mine, unless this implementation
> was only aimed at PPC64 machines...

Tony started from an earlier patch by John Stultz, not from your
patches.

The main reason your patches were rejected were that you completely
broke the VDSO and the deterministic time accounting, and made no
attempt to fix them.

As for 40x/Book E, the main thing there is the auto-reload.  However,
since the generic core can use a oneshot clock event source to
generate periodic ticks, there is no advantage to using the
auto-reload.

>     Also, have the deterministic CPU accounting incompatibility with
> clockevents been dealt with?

The S390 guys looked at that and solved it with Ingo's and Thomas's
help (although I did see something on linux-kernel about some further
problems).

>     I'd use (evt - 1) since the interrupt gets generated at 0xffffffff count, 
> not 0 (on classic CPUs).  With you removing of the code that compensated for 

See commit d968014b7280e2c447b20363e576999040ac72ef; I already fixed
that.

> the errors, they will accumulate.  And no, this wouldn't be enough anyway, 

No, they don't accumulate.  See tick_setup_periodic().  The interval
until the next tick is determined using ktime_get() rather than just
being a constant.

> since on 40x and Book E you'll need to set it for evt anyway, since the 
> interrupt happens at 0 count...
>     NAK the patch.  And I really don't understand why you're throwing alway 
> already tested/working code...

Because you broke important features and because you seem to have some
fundamental misconceptions (e.g. the comment about errors accumulating
you just made).

Paul.

^ permalink raw reply

* Re: [PATCH v2 1/4] Implement {read,update}_persistent_clock.
From: Paul Mackerras @ 2007-10-15 23:46 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linuxppc-dev, Thomas Gleixner, Steven Rostedt, Realtime Kernel
In-Reply-To: <4713ABDA.2000506@ru.mvista.com>

Sergei Shtylyov writes:

>    Eh... poor you. Tony got clockevent driver reengineered for no apparent 
> reason.  And he's introduced the jiffy drift by deleting the main loop from 
> timer_interrupt().

The main loop in timer_interrupt() became unnecessary, because
update_wall_time contains an equivalent loop.

Paul.

^ permalink raw reply

* Re: [PATCH v2] pasemi: process i2c device tree entries at boot
From: Olof Johansson @ 2007-10-16  0:17 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev, paulus
In-Reply-To: <4713EFBB.3070203@freescale.com>

On Mon, Oct 15, 2007 at 05:54:51PM -0500, Scott Wood wrote:
> Olof Johansson wrote:
>> Setup i2c_board_info based on device tree contents. This has to be
>> a device_initcall since we need PCI to be probed by the time we
>> run it, but before the actual driver is initialized.
>
> Can we factor at least some of this stuff out into common code?

I didn't really feel strong motivations to do so, given that the amount
of shared code is quite small, and the official bindings are not yet
determined.

Chances are whenever the bindings are done they might be incompatible
with what we already have in our firmware, so the code would need to be
separated out again.

> We certainly shouldn't need more than one translation table, and this loop:
>
>> +static int __init pasemi_register_i2c_devices(void)
>> +{
>> +	struct pci_dev *pdev;
>> +	struct device_node *adap_node;
>> +	struct device_node *node;
>> +
>> +	pdev = NULL;
>> +	while ((pdev = pci_get_device(PCI_VENDOR_ID_PASEMI, 0xa003, pdev))) {
>> +		adap_node = pci_device_to_OF_node(pdev);
>
> Should be in the pasemi code, and pass a bus number and device node to 
> generic code that does this:

Yeah, it'd be the natural way of doing it, if it was needed.


-Olof

^ permalink raw reply

* Re: aty128fb PCI card on ppc 405ep taihu board
From: Bill F @ 2007-10-16  0:37 UTC (permalink / raw)
  To: linuxppc-embedded
In-Reply-To: <616984B041004305BF2F004AEC6B3BA5@neukxpax3m59t7>

T24gMTAvMTQvMDcsIKT9rasgPGxhY3JpbW9zYTAyQHNpbmEuY29tPiB3cm90ZToKPiAgICAgICAg
ICBJIGdvdCBhIHRhaWh1IGJvYXJkLiBOb3cgSSB3YW50IHRvIGRpc3BsYXkgZ3JhcGhpY3MgKGJh
c2VkIG9uIFF0KQo+IHRocm91Z2ggYW4gQVRJIDEyOFJBR0UgUENJIGNhcmQuIFRoZSBrZXJuZWwg
aXMgREVOWCBMaW51eCBLZXJuZWwgMi42LjE5LiBJCj4gZm91bmQgYXR5MTI4ZmIgZnJhbWVidWZm
ZXIgZHJpdmVyIGluIG1lbnUgY29uZmlndXJhdGlvbiBhbmQgYnVpbGQtaW4ga2VybmVsLgo+IFRo
ZW4gSSBjb21waWxlIHRoZSBib290IGxvZ28gaW50byB0aGUga2VybmVsLiBJIGFwcGVuZAo+ICJ2
aWRlbz1hdHkxMjhmYjo2NDB4NDgwLTE2QDcwIiB0byB0aGUga2VybmVsIGNvbW1hbmQgbGluZSB0
byBlbmFibGUKPiBmcmFtZWJ1ZmZlci4gV2hlbiB0aGUga2VybmVsIGlzIGJvb3RpbmcsIHRoZXJl
IHNob3VsZCBiZSBhIHBlbmd1aW4gbG9nbyBvbgo+IHRoZSBWR0EgZGlzcGxheSAoYSBDUlQpLCBi
dXQgdGhlcmUncyBub3RpbmcuIFRoZSBkaXNwbGF5IGdvdCBubyBzaWduYWwgYWxsCj4gdGhlIHRp
bWUuCj4KPiAgICAgICAgICBCb290bG9hZGVyIGlzIFUtQm9vdCAxLjEuNC4gSXQgY2FuIHJlY29n
bml6ZSB0aGUgUENJIGRldmljZToKClRoZSBBVEkgY2FyZCBuZWVkcyB0byBiZSBpbml0aWFsaXNl
ZCBieSB0aGUgVmlkZW8gQklPUyBiZWZvcmUgaXQgY2FuCmJlIHVzZWQgYXMgYSBncmFwaGljcyBj
YXJkLiAgSWYgeW91ciBBVEkgY2FyZCB3YXMgYnVpbHQgZm9yIHVzZSBpbiBhCng4NiBQQyB0aGVu
IHRoZSBWaWRlbyBCSU9TIHdpbGwgYmUgd3JpdHRlbiBpbiB4ODYgYXNzZW1ibGVyIGFuZCBub3QK
UFBDIGFzc2VtYmVyLgoKWW91IHdpbGwgbmVlZCB0byB1c2UgYW4geDg2IGVtdWxhdG9yIHRvIHJ1
biB0aGUgVmlkZW8gQklPUyBmcm9tIHRoZQpBVEkgY2FyZC4gIEJvdGggdS1ib290IGFuZCBYb3Jn
IGhhdmUgeDg2IGVtdWxhdG9ycyBmb3IgdGhpcyBwdXJwb3NlLgpIYXZlIGEgbG9vayBhdCB0aGUg
bGF0ZXN0IHUtYm9vdCBjb2RlLiAgVGhlcmUgaGFzIGJlZW4gc29tZSByZWNlbnQKd29yayBkb25l
IGluIHUtYm9vdCB0byBtYWtlIHRoZSB4ODYgZW11bGF0b3IgYW5kIGF0aSBjYXJkIGhhbmRsaW5n
IG5vbgpib2FyZCBzcGVjaWZpYy4KCiAgdS1ib290L2RyaXZlcnMvYXRpX3JhZGVvbl9mYi5jCiAg
dS1ib290L2RyaXZlcnMvYmlvc19lbXVsYXRvci9hdGliaW9zLmMKCkJpbGwK

^ permalink raw reply

* Re: [PATCH v2 2/2] [POWERPC] MPC8568E-MDS: add support for flash
From: David Gibson @ 2007-10-16  1:12 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <F248D8A0-B412-41B8-B7F8-FD158576785D@kernel.crashing.org>

On Mon, Oct 15, 2007 at 01:00:24PM -0500, Kumar Gala wrote:
> 
> On Oct 15, 2007, at 12:33 PM, Sergei Shtylyov wrote:
> 
> > Anton Vorontsov wrote:
> >
> >> MPC8568E-MDS have 1 32MB Spansion x16 CFI flash chip. Let's use it.
> >
> >> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> >
> >> diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/ 
> >> boot/dts/mpc8568mds.dts
> >> index 8e15dba..1198363 100644
> >> --- a/arch/powerpc/boot/dts/mpc8568mds.dts
> >> +++ b/arch/powerpc/boot/dts/mpc8568mds.dts
> >> @@ -47,12 +47,45 @@
> >>  		#address-cells = <2>;
> >>  		#size-cells = <1>;
> >>  		reg = <e0005000 d8>;
> >> -		ranges = <1 0 f8000000 0008000>;
> >> +		ranges = <1 0 f8000000 0008000
> >> +			  0 0 fe000000 2000000>;
> >>
> >>  		bcsr@1,0 {
> >>  			device_type = "board-control";
> >>  			reg = <1 0 8000>;
> >>  		};
> >> +
> >> +		flash@0,0 {
> >> +			compatible = "Spansion,S29GL256N11TFIV2O", "cfi-flash";
> >> +			reg = <0 0 2000000>;
> >> +			probe-type = "CFI";
> >
> >     I don't get it -- has physmap_of.c rewrite been already committed?
> > If yes, you don't need probe_type; if no, your "compatible" won't  
> > work...
> > Well, I see that the driver rewrite has been committed (when I  
> > wasn't looking
> > 8-)...
> 
> Any NOR flash nodes should conform to the "new" bindings from David  
> Gibson, et al.  Not sure about the status of those being in  
> physmap_of.c w/regards to 2.6.24.

Yes, in which case probe_type should be dropped, as should the low bit
in the read-only partitions.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* Re: [PATCH v4 9/9] add MPC837x MDS board default device tree
From: David Gibson @ 2007-10-16  1:15 UTC (permalink / raw)
  To: Li Yang; +Cc: linuxppc-dev, paulus
In-Reply-To: <1192460210-26920-1-git-send-email-leoli@freescale.com>

On Mon, Oct 15, 2007 at 10:56:50PM +0800, Li Yang wrote:
> Signed-off-by: Li Yang <leoli@freescale.com>

[snip]
> +		mdio@24520 {
> +			device_type = "mdio";
> +			compatible = "gianfar";
> +			reg = <24520 20>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			phy2: ethernet-phy@2 {
> +				interrupt-parent = < &ipic >;
> +				interrupts = <11 8>;
> +				reg = <2>;
> +				device_type = "ethernet-phy";
> +			};
> +			phy3: ethernet-phy@3 {
> +				interrupt-parent = < &ipic >;
> +				interrupts = <12 8>;
> +				reg = <3>;
> +				device_type = "ethernet-phy";
> +			};
> +		};
> +
> +		ethernet@24000 {
> +			device_type = "network";
> +			model = "eTSEC";
> +			compatible = "gianfar";

This isn't a problem with *this* patch per se, but we have *got* to
fix that fucked up binding which gives both the mdio and ethernet
devices the same compatible property.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* Re: [PATCH v2 1/4] Implement {read,update}_persistent_clock.
From: Benjamin Herrenschmidt @ 2007-10-16  1:19 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: linuxppc-dev, Thomas Gleixner, Paul Mackerras, Realtime Kernel,
	Steven Rostedt
In-Reply-To: <4713ABDA.2000506@ru.mvista.com>


>    Eh... poor you. Tony got clockevent driver reengineered for no apparent 
> reason.  And he's introduced the jiffy drift by deleting the main loop from 
> timer_interrupt(). Yet this borken version was preferred to what was known 
> working since about 2.6.18 and included into 2.6.21-rt patchset.  I don't like 
> that policy. Will you be pushing fixes from -rt to PowerPC, or will it fall on 
> my shoulders now?

Possibly because whatever implementation existed before was never
provided in a mergeable form and pushed to -rt bypassing the powerpc
architecture maintainer ?

Ben.

^ permalink raw reply

* Re: Refactor booting-without-of.txt
From: David Gibson @ 2007-10-16  2:38 UTC (permalink / raw)
  To: Grant Likely; +Cc: Olof Johansson, linuxppc-dev, microblaze-uclinux
In-Reply-To: <fa686aa40710151014q5e151ea9w3f589d9e89e95905@mail.gmail.com>

On Mon, Oct 15, 2007 at 11:14:44AM -0600, Grant Likely wrote:
> On 10/15/07, Olof Johansson <olof@lixom.net> wrote:
> > On Mon, Oct 15, 2007 at 10:08:44AM -0600, Grant Likely wrote:
> > > Adding the Linux expected device tree bindings to
> > > booting-without-of.txt seems to be getting a little unwieldy.  Plus
> > > with more than one arch using the device tree (powerpc, sparc &
> > > microblaze) the device tree bindings aren't necessarily powerpc only
> > > (the Xilinx devices certainly fall in this category).
> > >
> > > Anyone have comments about splitting the expected device tree bindings
> > > out of booting-without-of.txt into a separate directory?
> >
> > The flat device tree is, in spite of what some people would like it to be,
> > not open firmware, nor is it the same as their bindings. So I think we'd
> > be doing ourselves a disservice by continuing to associate them together.
> > All it would take is a rename of the directory, unfortunately i don't
> > have any suggestions on better names though.
> 
> I think I need to stick with the of prefix.  All the support API in
> include/linux/of_* is prefixed with "of_" already, so convention is
> established.
> 
> How about Documentation/of-device-tree?

It seems a little counterintuitive to change names from "booting
*without* of" to "of *"...

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* About resevation of kernel code and data section in e500 part.
From: Michael.Kang @ 2007-10-16  2:49 UTC (permalink / raw)
  To: linuxppc-embedded

Hi:
         I have some confusions about where the page of kernel text
and data is reserved in linux source ? Hope get some hints here and
thanks in advance.
         I had digged into some related code, but got no anwser:

1. in set_phys_avail [ arch/ppc/mm/init.c : 456] , it seems memory
used by kernel text and data is reserved for bootmem.

2. Then in memmap_init_zone [mm/page_alloc.c:1925] , all the page is
set reserved including the pages used by kernel text and data. And it
seems page->virtual in all the page is set here.

So my question is where the pages used by kernel text and data is set
to reserved in linux source?


-- Thanks
-- Michael.Kang

-- 
www.skyeye.org

^ permalink raw reply

* Re: Refactor booting-without-of.txt
From: Grant Likely @ 2007-10-16  3:02 UTC (permalink / raw)
  To: Grant Likely, Olof Johansson, linuxppc-dev, microblaze-uclinux
In-Reply-To: <20071016023845.GK26787@localhost.localdomain>

On 10/15/07, David Gibson <david@gibson.dropbear.id.au> wrote:
> On Mon, Oct 15, 2007 at 11:14:44AM -0600, Grant Likely wrote:
> > On 10/15/07, Olof Johansson <olof@lixom.net> wrote:
> > > On Mon, Oct 15, 2007 at 10:08:44AM -0600, Grant Likely wrote:
> > > > Adding the Linux expected device tree bindings to
> > > > booting-without-of.txt seems to be getting a little unwieldy.  Plus
> > > > with more than one arch using the device tree (powerpc, sparc &
> > > > microblaze) the device tree bindings aren't necessarily powerpc only
> > > > (the Xilinx devices certainly fall in this category).
> > > >
> > > > Anyone have comments about splitting the expected device tree bindings
> > > > out of booting-without-of.txt into a separate directory?
> > >
> > > The flat device tree is, in spite of what some people would like it to be,
> > > not open firmware, nor is it the same as their bindings. So I think we'd
> > > be doing ourselves a disservice by continuing to associate them together.
> > > All it would take is a rename of the directory, unfortunately i don't
> > > have any suggestions on better names though.
> >
> > I think I need to stick with the of prefix.  All the support API in
> > include/linux/of_* is prefixed with "of_" already, so convention is
> > established.
> >
> > How about Documentation/of-device-tree?
>
> It seems a little counterintuitive to change names from "booting
> *without* of" to "of *"...

Heh; true.  The *only* reason I think it should be 'of-<anything>' is
because *all* the support APIs are named that way.  I'll happily use
another name if I get the impression that most of us in our little
group think it should be something else.

Cheers,
g.


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

^ permalink raw reply

* Re: [PATCH 2/2] i2c: Add devtree-aware iic support for PPC4xx
From: David Gibson @ 2007-10-16  3:20 UTC (permalink / raw)
  To: Grant Likely; +Cc: Jean Delvare, Stefan Roese, i2c, linuxppc-dev
In-Reply-To: <fa686aa40710151213r670bea49i63fa5f5402aa150d@mail.gmail.com>

On Mon, Oct 15, 2007 at 01:13:14PM -0600, Grant Likely wrote:
> On 10/15/07, Scott Wood <scottwood@freescale.com> wrote:
> > On Mon, Oct 15, 2007 at 10:57:48AM -0600, Grant Likely wrote:
> > > Segher is recommending that we use an aliases node as per the open
> > > firmware example for this.  I think in this case it would look
> > > something like this (but I'm not the expert):
> > >
> > > aliases {
> > >      IIC0 = "/path/to/bus/iic@0x2000";
> > >      IIC1 = "/path/to/bus/iic@0x2000";
> > > };
> >
> > I think this is overly complicated; something like linux,i2c-index in the
> > i2c adapter node would be simpler.
> 
> But not perhaps better.  Enumeration is a system-wide thing.  It does
> make sense to group all the device enumerations in one place.  It
> eliminates two nodes trying to enumerate to the same device number and
> since device numbers are something that the user will potentially want
> to modify, it separates enumeration from hardware description.
> 
> As per your point below; if all the i2c devices are children of the
> adapter, then yes you are right that the bus number doesn't matter to
> the user.  But it *does* matter for things like serial and ethernet
> ports.

As the inventor of "linux,network-index", please don't invent
"linux,i2c-index".  linux,network-index was and is a hack - it's
badness is limited by the fact that it's essentially local to the
bootwrapper.  It's only used in the bootwrapper, and I only really
intended it for use in bootwrappers which provide their own device
tree, so as to match the device nodes against whatever order the MAC
addresses were supplied by the firmware.

I plan to replace the linux,network-index thing with aliases
(including some dtc support to make that easy) just as soon as I get
around to it... don't hold your breath.

Using a similar property from an actual kernel driver would be much
uglier, and harder to clean up later.

Using aliases would be.. less bad, but it would still require that
the device tree always supply an alias for the iic driver to work
which is kind of nasty.

In fact I think it may be acceptle to do the idx++ thing in this
situation.  Bus numbers are ugly, but it's not the worst ugliness in
the horrible mess that is the Linux i2c subsystem.  It means that bus
numbers are theoretically unstable, but that's increasingly true of
devices of all sorts - it's up to udev to assign meaningful labels at
the user level.

> > Though, I don't see what the problem with the original approach is, as long
> > as the numbers are chosen in the same way when registering i2c clients based
> > on the children of the adapter node.  There's no concept in the hardware
> > itself of a bus number.
> 
> Even if you take this approach, the driver still need to know what bus
> number to use (as per the i2c infrastructure).  It is not sane for an
> i2c bus driver to attempt to assign the bus number itself because it
> could conflict with another arbitrarily chosen bus number from another
> driver.
> 
> Cheers,
> g.
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* Re: Refactor booting-without-of.txt
From: David Gibson @ 2007-10-16  3:24 UTC (permalink / raw)
  To: Grant Likely; +Cc: Olof Johansson, linuxppc-dev, microblaze-uclinux
In-Reply-To: <fa686aa40710152002l5bb2c746i8174827e8d66c746@mail.gmail.com>

On Mon, Oct 15, 2007 at 09:02:09PM -0600, Grant Likely wrote:
> On 10/15/07, David Gibson <david@gibson.dropbear.id.au> wrote:
> > On Mon, Oct 15, 2007 at 11:14:44AM -0600, Grant Likely wrote:
> > > On 10/15/07, Olof Johansson <olof@lixom.net> wrote:
> > > > On Mon, Oct 15, 2007 at 10:08:44AM -0600, Grant Likely wrote:
> > > > > Adding the Linux expected device tree bindings to
> > > > > booting-without-of.txt seems to be getting a little unwieldy.  Plus
> > > > > with more than one arch using the device tree (powerpc, sparc &
> > > > > microblaze) the device tree bindings aren't necessarily powerpc only
> > > > > (the Xilinx devices certainly fall in this category).
> > > > >
> > > > > Anyone have comments about splitting the expected device tree bindings
> > > > > out of booting-without-of.txt into a separate directory?
> > > >
> > > > The flat device tree is, in spite of what some people would like it to be,
> > > > not open firmware, nor is it the same as their bindings. So I think we'd
> > > > be doing ourselves a disservice by continuing to associate them together.
> > > > All it would take is a rename of the directory, unfortunately i don't
> > > > have any suggestions on better names though.
> > >
> > > I think I need to stick with the of prefix.  All the support API in
> > > include/linux/of_* is prefixed with "of_" already, so convention is
> > > established.
> > >
> > > How about Documentation/of-device-tree?
> >
> > It seems a little counterintuitive to change names from "booting
> > *without* of" to "of *"...
> 
> Heh; true.  The *only* reason I think it should be 'of-<anything>' is
> because *all* the support APIs are named that way.  I'll happily use

No, not all, just most...

And do bear in mind that a lot of those accessor functions are at
least valid both on of and flat-tree systems.

> another name if I get the impression that most of us in our little
> group think it should be something else.
> 
> Cheers,
> g.
> 
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* [PATCH] powerpc64 vDSO: linker script indentation
From: Roland McGrath @ 2007-10-16  3:43 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton
  Cc: linuxppc-dev, Paul Mackerras, Sam Ravnborg, linux-kernel,
	Anton Blanchard


This cleans up the formatting in the vDSO linker script, mostly just the
use of whitespace.  It's intended to approximate the kernel standard
conventions for indenting C, treating elements of the linker script about
like initialized variable definitions.

Signed-off-by: Roland McGrath <roland@redhat.com>
CC: Sam Ravnborg <sam@ravnborg.org>
---
 arch/powerpc/kernel/vdso64/vdso64.lds.S |  225 +++++++++++++++++--------------
 1 files changed, 122 insertions(+), 103 deletions(-)

diff --git a/arch/powerpc/kernel/vdso64/vdso64.lds.S b/arch/powerpc/kernel/vdso64/vdso64.lds.S
index 2d70f35..932b3fd 100644
--- a/arch/powerpc/kernel/vdso64/vdso64.lds.S
+++ b/arch/powerpc/kernel/vdso64/vdso64.lds.S
@@ -10,100 +10,114 @@ ENTRY(_start)
 
 SECTIONS
 {
-  . = VDSO64_LBASE + SIZEOF_HEADERS;
-  .hash           : { *(.hash) }		:text
-  .gnu.hash       : { *(.gnu.hash) }
-  .dynsym         : { *(.dynsym) }
-  .dynstr         : { *(.dynstr) }
-  .gnu.version    : { *(.gnu.version) }
-  .gnu.version_d  : { *(.gnu.version_d) }
-  .gnu.version_r  : { *(.gnu.version_r) }
-
-  .note		  : { *(.note.*) }		:text	:note
-
-  . = ALIGN (16);
-  .text           :
-  {
-    *(.text .stub .text.* .gnu.linkonce.t.*)
-    *(.sfpr .glink)
-  }						:text
-  PROVIDE (__etext = .);
-  PROVIDE (_etext = .);
-  PROVIDE (etext = .);
-
-  . = ALIGN(8);
-  __ftr_fixup : {
-    *(__ftr_fixup)
-  }
-
-  . = ALIGN(8);
-  __fw_ftr_fixup : {
-    *(__fw_ftr_fixup)
-  }
-
-  /* Other stuff is appended to the text segment: */
-  .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
-  .rodata1        : { *(.rodata1) }
-  .eh_frame_hdr   : { *(.eh_frame_hdr) }	:text	:eh_frame_hdr
-  .eh_frame       : { KEEP (*(.eh_frame)) }	:text
-  .gcc_except_table   : { *(.gcc_except_table) }
-
-  .opd           ALIGN(8) : { KEEP (*(.opd)) }
-  .got		 ALIGN(8) : { *(.got .toc) }
-  .rela.dyn	 ALIGN(8) : { *(.rela.dyn) }
-
-  .dynamic        : { *(.dynamic) }		:text	:dynamic
-
-  _end = .;
-  PROVIDE (end = .);
-
-  /* Stabs debugging sections are here too
-   */
-  .stab          0 : { *(.stab) }
-  .stabstr       0 : { *(.stabstr) }
-  .stab.excl     0 : { *(.stab.excl) }
-  .stab.exclstr  0 : { *(.stab.exclstr) }
-  .stab.index    0 : { *(.stab.index) }
-  .stab.indexstr 0 : { *(.stab.indexstr) }
-  .comment       0 : { *(.comment) }
-  /* DWARF debug sectio/ns.
-     Symbols in the DWARF debugging sections are relative to the beginning
-     of the section so we begin them at 0.  */
-  /* DWARF 1 */
-  .debug          0 : { *(.debug) }
-  .line           0 : { *(.line) }
-  /* GNU DWARF 1 extensions */
-  .debug_srcinfo  0 : { *(.debug_srcinfo) }
-  .debug_sfnames  0 : { *(.debug_sfnames) }
-  /* DWARF 1.1 and DWARF 2 */
-  .debug_aranges  0 : { *(.debug_aranges) }
-  .debug_pubnames 0 : { *(.debug_pubnames) }
-  /* DWARF 2 */
-  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
-  .debug_abbrev   0 : { *(.debug_abbrev) }
-  .debug_line     0 : { *(.debug_line) }
-  .debug_frame    0 : { *(.debug_frame) }
-  .debug_str      0 : { *(.debug_str) }
-  .debug_loc      0 : { *(.debug_loc) }
-  .debug_macinfo  0 : { *(.debug_macinfo) }
-  /* SGI/MIPS DWARF 2 extensions */
-  .debug_weaknames 0 : { *(.debug_weaknames) }
-  .debug_funcnames 0 : { *(.debug_funcnames) }
-  .debug_typenames 0 : { *(.debug_typenames) }
-  .debug_varnames  0 : { *(.debug_varnames) }
-
-  /DISCARD/ : { *(.note.GNU-stack) }
-  /DISCARD/ : { *(.branch_lt) }
-  /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.*) }
-  /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) }
+	. = VDSO64_LBASE + SIZEOF_HEADERS;
+
+	.hash		: { *(.hash) }			:text
+	.gnu.hash	: { *(.gnu.hash) }
+	.dynsym		: { *(.dynsym) }
+	.dynstr		: { *(.dynstr) }
+	.gnu.version	: { *(.gnu.version) }
+	.gnu.version_d	: { *(.gnu.version_d) }
+	.gnu.version_r	: { *(.gnu.version_r) }
+
+	.note		: { *(.note.*) }		:text	:note
+
+	. = ALIGN(16);
+	.text		: {
+		*(.text .stub .text.* .gnu.linkonce.t.*)
+		*(.sfpr .glink)
+	}						:text
+	PROVIDE(__etext = .);
+	PROVIDE(_etext = .);
+	PROVIDE(etext = .);
+
+	. = ALIGN(8);
+	__ftr_fixup	: { *(__ftr_fixup) }
+
+	. = ALIGN(8);
+	__fw_ftr_fixup	: { *(__fw_ftr_fixup) }
+
+	/*
+	 * Other stuff is appended to the text segment:
+	 */
+	.rodata		: { *(.rodata .rodata.* .gnu.linkonce.r.*) }
+	.rodata1	: { *(.rodata1) }
+
+	.eh_frame_hdr	: { *(.eh_frame_hdr) }		:text	:eh_frame_hdr
+	.eh_frame	: { KEEP (*(.eh_frame)) }	:text
+	.gcc_except_table : { *(.gcc_except_table) }
+
+	.opd ALIGN(8)	: { KEEP (*(.opd)) }
+	.got ALIGN(8)	: { *(.got .toc) }
+	.rela.dyn ALIGN(8) : { *(.rela.dyn) }
+
+	.dynamic	: { *(.dynamic) }		:text	:dynamic
+
+	_end = .;
+	PROVIDE(end = .);
+
+	/*
+	 * Stabs debugging sections are here too.
+	 */
+	.stab          0 : { *(.stab) }
+	.stabstr       0 : { *(.stabstr) }
+	.stab.excl     0 : { *(.stab.excl) }
+	.stab.exclstr  0 : { *(.stab.exclstr) }
+	.stab.index    0 : { *(.stab.index) }
+	.stab.indexstr 0 : { *(.stab.indexstr) }
+	.comment       0 : { *(.comment) }
+
+	/*
+	 * DWARF debug sections.
+	 * Symbols in the DWARF debugging sections are relative to the beginning
+	 * of the section so we begin them at 0.
+	 */
+	/* DWARF 1 */
+	.debug          0 : { *(.debug) }
+	.line           0 : { *(.line) }
+	/* GNU DWARF 1 extensions */
+	.debug_srcinfo  0 : { *(.debug_srcinfo) }
+	.debug_sfnames  0 : { *(.debug_sfnames) }
+	/* DWARF 1.1 and DWARF 2 */
+	.debug_aranges  0 : { *(.debug_aranges) }
+	.debug_pubnames 0 : { *(.debug_pubnames) }
+	/* DWARF 2 */
+	.debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
+	.debug_abbrev   0 : { *(.debug_abbrev) }
+	.debug_line     0 : { *(.debug_line) }
+	.debug_frame    0 : { *(.debug_frame) }
+	.debug_str      0 : { *(.debug_str) }
+	.debug_loc      0 : { *(.debug_loc) }
+	.debug_macinfo  0 : { *(.debug_macinfo) }
+	/* SGI/MIPS DWARF 2 extensions */
+	.debug_weaknames 0 : { *(.debug_weaknames) }
+	.debug_funcnames 0 : { *(.debug_funcnames) }
+	.debug_typenames 0 : { *(.debug_typenames) }
+	.debug_varnames  0 : { *(.debug_varnames) }
+
+	/DISCARD/	: {
+		*(.note.GNU-stack)
+		*(.branch_lt)
+		*(.data .data.* .gnu.linkonce.d.* .sdata*)
+		*(.bss .sbss .dynbss .dynsbss)
+	}
 }
 
+/*
+ * Very old versions of ld do not recognize this name token; use the constant.
+ */
+#define PT_GNU_EH_FRAME	0x6474e550
+
+/*
+ * We must supply the ELF program headers explicitly to get just one
+ * PT_LOAD segment, and set the flags explicitly to make segments read-only.
+ */
 PHDRS
 {
-  text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
-  note PT_NOTE FLAGS(4); /* PF_R */
-  dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
-  eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */
+	text		PT_LOAD FILEHDR PHDRS FLAGS(5);	/* PF_R|PF_X */
+	dynamic		PT_DYNAMIC FLAGS(4);		/* PF_R */
+	note		PT_NOTE FLAGS(4);		/* PF_R */
+	eh_frame_hdr	PT_GNU_EH_FRAME;
 }
 
 /*
@@ -111,17 +125,22 @@ PHDRS
  */
 VERSION
 {
-  VDSO_VERSION_STRING {
-    global:
-	__kernel_datapage_offset; /* Has to be there for the kernel to find */
-	__kernel_get_syscall_map;
-    	__kernel_gettimeofday;
-	__kernel_clock_gettime;
-	__kernel_clock_getres;
-	__kernel_get_tbfreq;
-	__kernel_sync_dicache;
-	__kernel_sync_dicache_p5;
-	__kernel_sigtramp_rt64;
-    local: *;
-  };
+	VDSO_VERSION_STRING {
+	global:
+		/*
+		 * Has to be there for the kernel to find
+		 */
+		__kernel_datapage_offset;
+
+		__kernel_get_syscall_map;
+		__kernel_gettimeofday;
+		__kernel_clock_gettime;
+		__kernel_clock_getres;
+		__kernel_get_tbfreq;
+		__kernel_sync_dicache;
+		__kernel_sync_dicache_p5;
+		__kernel_sigtramp_rt64;
+
+	local: *;
+	};
 }

^ permalink raw reply related

* [PATCH] powerpc32 vDSO: linker script indentation
From: Roland McGrath @ 2007-10-16  3:44 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton
  Cc: linuxppc-dev, Paul Mackerras, Sam Ravnborg, linux-kernel,
	Anton Blanchard


This cleans up the formatting in the vDSO linker script, mostly just the
use of whitespace.  It's intended to approximate the kernel standard
conventions for indenting C, treating elements of the linker script about
like initialized variable definitions.

Signed-off-by: Roland McGrath <roland@redhat.com>
CC: Sam Ravnborg <sam@ravnborg.org>
---
 arch/powerpc/kernel/vdso32/vdso32.lds.S |  219 +++++++++++++++++--------------
 1 files changed, 118 insertions(+), 101 deletions(-)

diff --git a/arch/powerpc/kernel/vdso32/vdso32.lds.S b/arch/powerpc/kernel/vdso32/vdso32.lds.S
index 26e138c..9352ab5 100644
--- a/arch/powerpc/kernel/vdso32/vdso32.lds.S
+++ b/arch/powerpc/kernel/vdso32/vdso32.lds.S
@@ -1,130 +1,147 @@
-
 /*
  * This is the infamous ld script for the 32 bits vdso
  * library
  */
 #include <asm/vdso.h>
 
-/* Default link addresses for the vDSOs */
 OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
 OUTPUT_ARCH(powerpc:common)
 ENTRY(_start)
 
 SECTIONS
 {
-  . = VDSO32_LBASE + SIZEOF_HEADERS;
-  .hash           : { *(.hash) }			:text
-  .gnu.hash       : { *(.gnu.hash) }
-  .dynsym         : { *(.dynsym) }
-  .dynstr         : { *(.dynstr) }
-  .gnu.version    : { *(.gnu.version) }
-  .gnu.version_d  : { *(.gnu.version_d) }
-  .gnu.version_r  : { *(.gnu.version_r) }
-
-  .note		  : { *(.note.*) } 			:text	:note
-
-  . = ALIGN (16);
-  .text :
-  {
-    *(.text .stub .text.* .gnu.linkonce.t.*)
-  }
-  PROVIDE (__etext = .);
-  PROVIDE (_etext = .);
-  PROVIDE (etext = .);
-
-  . = ALIGN(8);
-  __ftr_fixup : {
-    *(__ftr_fixup)
-  }
+	. = VDSO32_LBASE + SIZEOF_HEADERS;
+
+	.hash          	: { *(.hash) }			:text
+	.gnu.hash      	: { *(.gnu.hash) }
+	.dynsym        	: { *(.dynsym) }
+	.dynstr        	: { *(.dynstr) }
+	.gnu.version   	: { *(.gnu.version) }
+	.gnu.version_d 	: { *(.gnu.version_d) }
+	.gnu.version_r 	: { *(.gnu.version_r) }
+
+	.note		: { *(.note.*) }		:text	:note
+
+	. = ALIGN(16);
+	.text		: {
+		*(.text .stub .text.* .gnu.linkonce.t.*)
+	}
+	PROVIDE(__etext = .);
+	PROVIDE(_etext = .);
+	PROVIDE(etext = .);
+
+	. = ALIGN(8);
+	__ftr_fixup	: { *(__ftr_fixup) }
 
 #ifdef CONFIG_PPC64
-  . = ALIGN(8);
-  __fw_ftr_fixup : {
-    *(__fw_ftr_fixup)
-  }
+	. = ALIGN(8);
+	__fw_ftr_fixup	: { *(__fw_ftr_fixup) }
 #endif
 
-  /* Other stuff is appended to the text segment: */
-  .rodata		: { *(.rodata .rodata.* .gnu.linkonce.r.*) }
-  .rodata1		: { *(.rodata1) }
-
-  .eh_frame_hdr		: { *(.eh_frame_hdr) }		:text	:eh_frame_hdr
-  .eh_frame		: { KEEP (*(.eh_frame)) }	:text
-  .gcc_except_table	: { *(.gcc_except_table) }
-  .fixup		: { *(.fixup) }
-
-  .dynamic		: { *(.dynamic) }		:text	:dynamic
-  .got : { *(.got) }
-  .plt : { *(.plt) }
-
-  _end = .;
-  __end = .;
-  PROVIDE (end = .);
-
-
-  /* Stabs debugging sections are here too
-   */
-  .stab 0 : { *(.stab) }
-  .stabstr 0 : { *(.stabstr) }
-  .stab.excl 0 : { *(.stab.excl) }
-  .stab.exclstr 0 : { *(.stab.exclstr) }
-  .stab.index 0 : { *(.stab.index) }
-  .stab.indexstr 0 : { *(.stab.indexstr) }
-  .comment 0 : { *(.comment) }
-  .debug 0 : { *(.debug) }
-  .line 0 : { *(.line) }
-
-  .debug_srcinfo 0 : { *(.debug_srcinfo) }
-  .debug_sfnames 0 : { *(.debug_sfnames) }
-
-  .debug_aranges 0 : { *(.debug_aranges) }
-  .debug_pubnames 0 : { *(.debug_pubnames) }
-
-  .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
-  .debug_abbrev 0 : { *(.debug_abbrev) }
-  .debug_line 0 : { *(.debug_line) }
-  .debug_frame 0 : { *(.debug_frame) }
-  .debug_str 0 : { *(.debug_str) }
-  .debug_loc 0 : { *(.debug_loc) }
-  .debug_macinfo 0 : { *(.debug_macinfo) }
-
-  .debug_weaknames 0 : { *(.debug_weaknames) }
-  .debug_funcnames 0 : { *(.debug_funcnames) }
-  .debug_typenames 0 : { *(.debug_typenames) }
-  .debug_varnames 0 : { *(.debug_varnames) }
-
-  /DISCARD/ : { *(.note.GNU-stack) }
-  /DISCARD/ : { *(.data .data.* .gnu.linkonce.d.* .sdata*) }
-  /DISCARD/ : { *(.bss .sbss .dynbss .dynsbss) }
+	/*
+	 * Other stuff is appended to the text segment:
+	 */
+	.rodata		: { *(.rodata .rodata.* .gnu.linkonce.r.*) }
+	.rodata1	: { *(.rodata1) }
+
+	.eh_frame_hdr	: { *(.eh_frame_hdr) }		:text	:eh_frame_hdr
+	.eh_frame	: { KEEP (*(.eh_frame)) }	:text
+	.gcc_except_table : { *(.gcc_except_table) }
+	.fixup		: { *(.fixup) }
+
+	.dynamic	: { *(.dynamic) }		:text	:dynamic
+	.got		: { *(.got) }
+	.plt		: { *(.plt) }
+
+	_end = .;
+	__end = .;
+	PROVIDE(end = .);
+
+	/*
+	 * Stabs debugging sections are here too.
+	 */
+	.stab 0 : { *(.stab) }
+	.stabstr 0 : { *(.stabstr) }
+	.stab.excl 0 : { *(.stab.excl) }
+	.stab.exclstr 0 : { *(.stab.exclstr) }
+	.stab.index 0 : { *(.stab.index) }
+	.stab.indexstr 0 : { *(.stab.indexstr) }
+	.comment       0 : { *(.comment) }
+
+	/*
+	 * DWARF debug sections.
+	 * Symbols in the DWARF debugging sections are relative to the beginning
+	 * of the section so we begin them at 0.
+	 */
+	/* DWARF 1 */
+	.debug          0 : { *(.debug) }
+	.line           0 : { *(.line) }
+	/* GNU DWARF 1 extensions */
+	.debug_srcinfo  0 : { *(.debug_srcinfo) }
+	.debug_sfnames  0 : { *(.debug_sfnames) }
+	/* DWARF 1.1 and DWARF 2 */
+	.debug_aranges  0 : { *(.debug_aranges) }
+	.debug_pubnames 0 : { *(.debug_pubnames) }
+	/* DWARF 2 */
+	.debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
+	.debug_abbrev   0 : { *(.debug_abbrev) }
+	.debug_line     0 : { *(.debug_line) }
+	.debug_frame    0 : { *(.debug_frame) }
+	.debug_str      0 : { *(.debug_str) }
+	.debug_loc      0 : { *(.debug_loc) }
+	.debug_macinfo  0 : { *(.debug_macinfo) }
+	/* SGI/MIPS DWARF 2 extensions */
+	.debug_weaknames 0 : { *(.debug_weaknames) }
+	.debug_funcnames 0 : { *(.debug_funcnames) }
+	.debug_typenames 0 : { *(.debug_typenames) }
+	.debug_varnames  0 : { *(.debug_varnames) }
+
+	/DISCARD/	: {
+		*(.note.GNU-stack)
+		*(.data .data.* .gnu.linkonce.d.* .sdata*)
+		*(.bss .sbss .dynbss .dynsbss)
+	}
 }
 
+/*
+ * Very old versions of ld do not recognize this name token; use the constant.
+ */
+#define PT_GNU_EH_FRAME	0x6474e550
 
+/*
+ * We must supply the ELF program headers explicitly to get just one
+ * PT_LOAD segment, and set the flags explicitly to make segments read-only.
+ */
 PHDRS
 {
-  text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
-  note PT_NOTE FLAGS(4); /* PF_R */
-  dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
-  eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */
+	text		PT_LOAD FILEHDR PHDRS FLAGS(5);	/* PF_R|PF_X */
+	dynamic		PT_DYNAMIC FLAGS(4);		/* PF_R */
+	note		PT_NOTE FLAGS(4);		/* PF_R */
+	eh_frame_hdr	PT_GNU_EH_FRAME;
 }
 
-
 /*
  * This controls what symbols we export from the DSO.
  */
 VERSION
 {
-  VDSO_VERSION_STRING {
-    global:
-	__kernel_datapage_offset; /* Has to be there for the kernel to find */
-	__kernel_get_syscall_map;
-	__kernel_gettimeofday;
-	__kernel_clock_gettime;
-	__kernel_clock_getres;
-	__kernel_get_tbfreq;
-	__kernel_sync_dicache;
-	__kernel_sync_dicache_p5;
-	__kernel_sigtramp32;
-	__kernel_sigtramp_rt32;
-    local: *;
-  };
+	VDSO_VERSION_STRING {
+	global:
+		/*
+		 * Has to be there for the kernel to find
+		 */
+		__kernel_datapage_offset;
+
+		__kernel_get_syscall_map;
+		__kernel_gettimeofday;
+		__kernel_clock_gettime;
+		__kernel_clock_getres;
+		__kernel_get_tbfreq;
+		__kernel_sync_dicache;
+		__kernel_sync_dicache_p5;
+		__kernel_sigtramp32;
+		__kernel_sigtramp_rt32;
+
+	local: *;
+	};
 }

^ permalink raw reply related

* libfdt: libfdt_env.h must be included first
From: David Gibson @ 2007-10-16  3:50 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev

libfdt.h currently includes fdt.h, then libfdt_env.h.  This is
incorrect, because depending on the environment into which libfdt is
embedded, libfdt_env.h may be needed to define datatypes used in
fdt.h.  This patch corrects the problem.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---

I've sent this one before, but I guess it got lost in the backlog.

Index: dtc/libfdt/libfdt.h
===================================================================
--- dtc.orig/libfdt/libfdt.h	2007-09-27 15:23:10.000000000 +1000
+++ dtc/libfdt/libfdt.h	2007-09-27 15:23:50.000000000 +1000
@@ -51,8 +51,8 @@
  *     EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <fdt.h>
 #include <libfdt_env.h>
+#include <fdt.h>
 
 #define FDT_FIRST_SUPPORTED_VERSION	0x10
 #define FDT_LAST_SUPPORTED_VERSION	0x11


-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply

* dtc: Don't delete *.test.dtb between testgroups
From: David Gibson @ 2007-10-16  3:53 UTC (permalink / raw)
  To: Jon Loeliger; +Cc: linuxppc-dev

The dtc/libfdt testsuite creates a number of .dtb files during its
run.  To ensure a clean test run, these are currently deleted before
each group of tests.

This is, in fact, a mistake, since if something goes wrong in the
first group of tests, deleting the .dtb at the beginning of the second
group of tests makes it harder to figure out what the problem was.

This patch changes the script to only delete the files once, before
the whole test run.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

Index: dtc/tests/run_tests.sh
===================================================================
--- dtc.orig/tests/run_tests.sh	2007-10-12 15:09:43.000000000 +1000
+++ dtc/tests/run_tests.sh	2007-10-12 15:10:13.000000000 +1000
@@ -60,9 +60,6 @@ tree1_tests_rw () {
 }
 
 libfdt_tests () {
-    # Make sure we don't have stale blobs lying around
-    rm -f *.test.dtb
-
     tree1_tests test_tree1.dtb
 
     # Sequential write tests
@@ -102,9 +99,6 @@ libfdt_tests () {
 }
 
 dtc_tests () {
-    # Make sure we don't have stale blobs lying around
-    rm -f *.test.dtb
-
     run_test dtc.sh -f -I dts -O dtb -o dtc_tree1.test.dtb test_tree1.dts
     tree1_tests dtc_tree1.test.dtb
     tree1_tests_rw dtc_tree1.test.dtb
@@ -125,6 +119,9 @@ if [ -z "$TESTSETS" ]; then
     TESTSETS="libfdt dtc"
 fi
 
+# Make sure we don't have stale blobs lying around
+rm -f *.test.dtb
+
 for set in $TESTSETS; do
     case $set in
 	"libfdt")

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ 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