Re: [PATCH v3 05/12] ARM: mvebu: Remove the harcoded BootROM window allocation

2013-06-19 Thread Ezequiel Garcia
On Tue, Jun 18, 2013 at 11:39:06AM -0600, Jason Gunthorpe wrote: On Tue, Jun 18, 2013 at 08:25:30AM -0300, Ezequiel Garcia wrote: The address decoding window to access the BootROM should not be allocated programatically, but instead declared in the device tree. Signed-off-by: Ezequiel

Re: [PATCH v3 05/12] ARM: mvebu: Remove the harcoded BootROM window allocation

2013-06-19 Thread Jason Gunthorpe
On Wed, Jun 19, 2013 at 07:02:00AM -0300, Ezequiel Garcia wrote: Verifying the DT is setup this way and aborting if it is not seems like a good idea.. I agree it's a nice idea, but I'm not too sure how to accomplish this in a simple and generic way. There's nothing in the DT that allows

Re: [PATCH v3 05/12] ARM: mvebu: Remove the harcoded BootROM window allocation

2013-06-19 Thread Ezequiel Garcia
On Wed, Jun 19, 2013 at 10:58:34AM -0600, Jason Gunthorpe wrote: On Wed, Jun 19, 2013 at 07:02:00AM -0300, Ezequiel Garcia wrote: Verifying the DT is setup this way and aborting if it is not seems like a good idea.. I agree it's a nice idea, but I'm not too sure how to accomplish

Re: [PATCH v3 05/12] ARM: mvebu: Remove the harcoded BootROM window allocation

2013-06-19 Thread Jason Gunthorpe
On Wed, Jun 19, 2013 at 02:58:24PM -0300, Ezequiel Garcia wrote: I wasn't sure you wanted to panic(), to clip on available CPUs, or to just do a pr_warn / WARN(), so here's a piece of code: (disclaimer: non-tested, non-compiled, etc.) Up to you, but you know it won't work if it isn't right so

Re: [PATCH v3 05/12] ARM: mvebu: Remove the harcoded BootROM window allocation

2013-06-19 Thread Ezequiel Garcia
On Wed, Jun 19, 2013 at 12:03:20PM -0600, Jason Gunthorpe wrote: On Wed, Jun 19, 2013 at 02:58:24PM -0300, Ezequiel Garcia wrote: I wasn't sure you wanted to panic(), to clip on available CPUs, or to just do a pr_warn / WARN(), so here's a piece of code: (disclaimer: non-tested,

Re: [PATCH v3 05/12] ARM: mvebu: Remove the harcoded BootROM window allocation

2013-06-18 Thread Jason Gunthorpe
On Tue, Jun 18, 2013 at 08:25:30AM -0300, Ezequiel Garcia wrote: The address decoding window to access the BootROM should not be allocated programatically, but instead declared in the device tree. Signed-off-by: Ezequiel Garcia ezequiel.gar...@free-electrons.com

Re: [PATCH v3 05/12] ARM: mvebu: Remove the harcoded BootROM window allocation

2013-06-18 Thread Ezequiel Garcia
On Tue, Jun 18, 2013 at 11:39:06AM -0600, Jason Gunthorpe wrote: On Tue, Jun 18, 2013 at 08:25:30AM -0300, Ezequiel Garcia wrote: The address decoding window to access the BootROM should not be allocated programatically, but instead declared in the device tree. Signed-off-by: Ezequiel

Re: [PATCH v3 05/12] ARM: mvebu: Remove the harcoded BootROM window allocation

2013-06-18 Thread Jason Gunthorpe
On Tue, Jun 18, 2013 at 04:43:31PM -0300, Ezequiel Garcia wrote: I think some kind of test is needed here. As I understand it the SMP startup uses a trampoline in the boot rom and the boot rom *must* be mapped to 0xfff0 ? Yes, that's my understanding as well, but I will do some

Re: [PATCH v3 05/12] ARM: mvebu: Remove the harcoded BootROM window allocation

2013-06-18 Thread Jason Gunthorpe
On Tue, Jun 18, 2013 at 05:02:42PM -0300, Ezequiel Garcia wrote: Having the kernel enforce that the DT node is present and at the right location, I think, is helpful for the bootloader folks to ensure they write correct DTs. Granted. But then I wonder... why do we bother to put the BootROM

Re: [PATCH v3 05/12] ARM: mvebu: Remove the harcoded BootROM window allocation

2013-06-18 Thread Ezequiel Garcia
On Tue, Jun 18, 2013 at 02:10:21PM -0600, Jason Gunthorpe wrote: On Tue, Jun 18, 2013 at 05:02:42PM -0300, Ezequiel Garcia wrote: Having the kernel enforce that the DT node is present and at the right location, I think, is helpful for the bootloader folks to ensure they write correct