devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Mitch Bradley <wmb@firmworks.com>,
	sodaville@linutronix.de, devicetree-discuss@lists.ozlabs.org,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	"H. Peter Anvin" <hpa@linux.intel.com>
Subject: Re: [sodaville] [PATCH 03/11] x86/dtb: Add a device tree for CE4100
Date: Tue, 30 Nov 2010 07:14:34 +1100	[thread overview]
Message-ID: <1291061674.32570.307.camel@pasglop> (raw)
In-Reply-To: <4CF400B1.6060100@linutronix.de>

On Mon, 2010-11-29 at 20:36 +0100, Sebastian Andrzej Siewior wrote:
> 
> This also works with the flat tree, right?

Yes, of course. You use similar references in your interrupt-map :-)

> Okay, so we want this for a quirk at a later point in time. Now I
> understand.

More precisely, if something has to depend on a specific
revision/errata/feature, in the future, it would be problematic to have
to modify the device-tree.

The "rule" for compatible is to be a list going from a reasonably
precise description of the specific device to the more generic
programming interface the device implements.

> Would "isa-bridge" be acceptable? So I don't have to add a new bus to
> the probe list for every new SoC.

Just call it 'isa', as for device_type, we shouldn't need it.

The default "probe list" is crap. If you want to have platform devices
instanciated for the ISA devices from the device-tree, I'd rather you
explicitely do it from the architecture code. As Scott said, "isa"
doesn't quite qualify as a "generic" simple bus.

> Yes. of_address_to_resource() will do the right thing in this case. It
> can only be used after unflatten_device_tree() and I need this
> earlier.

This probably means you are doing the unflattening too late...

> Now using unflatten_device_tree() earlier isn't that easy, or is it.
> I defered the ioapic init a little, so it is now called from
> x86_init.mpparse.get_smp_config() so I have alloc_bootmem() working.

You can probably do the unflattening way before alloc_bootmem is
available.

The unflattening does a first pass to scan for the size, so all you need
is a way to get a single contiguous chunk of memory, I'm sure x86 has
ways to provide that sort of thing really early before bootmem is
initialized (what about memblock btw ?).

> So unflatten_device_tree() seems to work here. The ugly part comes
> now:
> early_init_dt_alloc_memory_arch() expects u64 which works with
> phys_to_virt() and the other way around. This isn't really the case
> with
> what __alloc_bootmem(). This looks like phys_map to me. Since the dtb
> code
> simply uses phys_to_virt() it doesn't really matter. So it works and
> I 
> probably can use of_address_to_resource().

Yeah just __pa what alloc_bootmem returns but as I said, it should
probably be unflattened earlier than that.

Peter (CC) should be able to help finding the right spot/API there.

Cheers,
Ben.

> > Cheers,
> > Ben.
> 
> Sebastian
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/ 

  reply	other threads:[~2010-11-29 20:14 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1290706801-7323-1-git-send-email-bigeasy@linutronix.de>
     [not found] ` <1290706801-7323-1-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-11-25 17:39   ` [PATCH 02/11] x86: Add device tree support Sebastian Andrzej Siewior
     [not found]     ` <1290706801-7323-3-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-11-25 22:53       ` Sam Ravnborg
     [not found]         ` <20101125225337.GA21223-OoSGOWW0KRunlFQ6Q1D1Y0B+6BGkLq7r@public.gmane.org>
2010-11-26  9:06           ` Sebastian Andrzej Siewior
2010-11-26 21:42       ` Benjamin Herrenschmidt
2010-11-28 13:49         ` Sebastian Andrzej Siewior
     [not found]           ` <20101128134907.GA30784-Hfxr4Dq0UpYb1SvskN2V4Q@public.gmane.org>
2010-11-28 22:28             ` Benjamin Herrenschmidt
2010-12-30  8:26             ` Grant Likely
2010-12-30  8:45               ` Rob Landley
     [not found]                 ` <AANLkTin2=T=v0ZNOpAGhwuM0i9Ts8Xr+kRtEJ95VGeOp-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-12-30 20:58                   ` Grant Likely
2011-01-03 16:05                     ` [sodaville] " H. Peter Anvin
2011-01-03 16:19                       ` H. Peter Anvin
     [not found]                         ` <4D21F718.8010600-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2011-01-03 17:52                           ` Grant Likely
2011-01-03 18:06                             ` H. Peter Anvin
     [not found]                               ` <4D22103C.2080705-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2011-01-03 18:10                                 ` H. Peter Anvin
     [not found]               ` <20101230082654.GB11721-MrY2KI0G/OVr83L8+7iqerDks+cytr/Z@public.gmane.org>
2010-12-30 20:57                 ` Grant Likely
2010-12-31  0:51                 ` [sodaville] " H. Peter Anvin
2010-11-25 17:39   ` [PATCH 03/11] x86/dtb: Add a device tree for CE4100 Sebastian Andrzej Siewior
     [not found]     ` <1290706801-7323-4-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-11-26 21:57       ` Benjamin Herrenschmidt
2010-11-28 16:04         ` Sebastian Andrzej Siewior
     [not found]           ` <20101128160449.GC30784-Hfxr4Dq0UpYb1SvskN2V4Q@public.gmane.org>
2010-11-28 22:53             ` Benjamin Herrenschmidt
2010-11-29  1:34               ` Mitch Bradley
2010-11-29 18:26                 ` [sodaville] " H. Peter Anvin
2010-11-29 20:03                   ` Benjamin Herrenschmidt
     [not found]                 ` <4CF30327.9020408-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2010-11-29 19:44                   ` Sebastian Andrzej Siewior
     [not found]                     ` <4CF402AD.2060000-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-12-02  0:40                       ` David Gibson
2010-11-29 19:07               ` Scott Wood
2010-11-29 20:05                 ` Benjamin Herrenschmidt
2010-11-29 20:32                   ` Mitch Bradley
2010-11-29 23:42                     ` Alan Cox
2010-11-30 21:18                       ` [sodaville] " H. Peter Anvin
     [not found]                     ` <4CF40DF4.9060204-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2010-11-29 20:44                       ` Benjamin Herrenschmidt
2010-11-29 21:32                         ` Mitch Bradley
2010-11-29 23:47                         ` Alan Cox
     [not found]                           ` <20101129234735.4ce3a933-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2010-11-30  2:50                             ` Benjamin Herrenschmidt
2010-11-30 11:20                               ` Sebastian Andrzej Siewior
2010-11-30 11:51                       ` Sebastian Andrzej Siewior
     [not found]                         ` <4CF4E54D.5040403-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-11-30 20:31                           ` Benjamin Herrenschmidt
     [not found]                 ` <20101129130720.7d060e1c-N/eSCTBpGwP7j4BuCOFQISmX4OfbXNuMKnGXBo5VDl8@public.gmane.org>
2010-11-29 23:58                   ` David Gibson
2010-11-29 19:36               ` [sodaville] " Sebastian Andrzej Siewior
2010-11-29 20:14                 ` Benjamin Herrenschmidt [this message]
2010-11-29  2:22         ` David Gibson
2010-11-25 17:39   ` [PATCH 04/11] x86/dtb: add irq host abstraction Sebastian Andrzej Siewior
2010-11-25 19:30     ` Jon Loeliger
     [not found]       ` <E1PLhWV-0004y7-44-CYoMK+44s/E@public.gmane.org>
2010-11-26 14:19         ` Sebastian Andrzej Siewior
     [not found]           ` <4CEFC1EC.7030507-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-11-26 21:36             ` Benjamin Herrenschmidt
2010-12-01 10:31               ` [sodaville] " Sebastian Andrzej Siewior
2010-11-27  3:11             ` Jon Loeliger
2010-11-25 17:39   ` [PATCH 05/11] x86/dtb: add early parsing of APIC and IO APIC Sebastian Andrzej Siewior
2010-11-25 17:39   ` [PATCH 06/11] x86/dtb: add support hpet Sebastian Andrzej Siewior
2010-11-25 17:39   ` [PATCH 07/11] x86/dtb: add support for PCI devices backed by dtb nodes Sebastian Andrzej Siewior
     [not found]     ` <1290706801-7323-8-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-11-27 22:33       ` Benjamin Herrenschmidt
2010-11-28 14:04         ` Sebastian Andrzej Siewior
     [not found]           ` <20101128140436.GB30784-Hfxr4Dq0UpYb1SvskN2V4Q@public.gmane.org>
2010-11-28 22:32             ` Benjamin Herrenschmidt
2010-12-02 16:17               ` Sebastian Andrzej Siewior
2010-11-25 17:39   ` [PATCH 08/11] x86/dtb: Add generic bus probe Sebastian Andrzej Siewior
2010-11-25 17:39   ` [PATCH 09/11] x86/ioapic: Add OF bindings for IO-APIC Sebastian Andrzej Siewior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1291061674.32570.307.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=bigeasy@linutronix.de \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sodaville@linutronix.de \
    --cc=wmb@firmworks.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).