All of lore.kernel.org
 help / color / mirror / Atom feed
* realview compulsory enables CONFIG_ARM_PATCH_PHYS_VIRT on me
@ 2011-12-05 21:22 Linus Walleij
  2011-12-05 21:57 ` Rob Herring
  2011-12-06 10:30 ` Linus Walleij
  0 siblings, 2 replies; 8+ messages in thread
From: Linus Walleij @ 2011-12-05 21:22 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Nico,

now I'm lost, I discussed by boot problems on ARM PB1176
with Marc and after some investigation I found this strange thing on
the lastest rc:s since -rc1:

In arch/arm/Kconfig ARM_PATCH_PHYS_VIRT is forcibly
disabled like so:

depends on !ARCH_REALVIEW || !SPARSEMEM

However if I just configure it for the realview_defconfig:

mkdir foo
make -f Makefile ARCH=arm CROSS_COMPILE=arm-none-eabi-
KBUILD_OUTPUT=foo realview_defconfig

It strangely selects this anyway, because now foo/.config has:
CONFIG_ARM_PATCH_PHYS_VIRT=y

Kconfig is a djungle to me, but I simply cannot find out
what is setting this anyway. The problem is not there on
v3.1, it does not get selected.

Any hints?

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 8+ messages in thread

* realview compulsory enables CONFIG_ARM_PATCH_PHYS_VIRT on me
  2011-12-05 21:22 realview compulsory enables CONFIG_ARM_PATCH_PHYS_VIRT on me Linus Walleij
@ 2011-12-05 21:57 ` Rob Herring
  2011-12-05 22:08   ` Nicolas Pitre
  2011-12-06 10:30 ` Linus Walleij
  1 sibling, 1 reply; 8+ messages in thread
From: Rob Herring @ 2011-12-05 21:57 UTC (permalink / raw)
  To: linux-arm-kernel

On 12/05/2011 03:22 PM, Linus Walleij wrote:
> Hi Nico,
> 
> now I'm lost, I discussed by boot problems on ARM PB1176
> with Marc and after some investigation I found this strange thing on
> the lastest rc:s since -rc1:
> 
> In arch/arm/Kconfig ARM_PATCH_PHYS_VIRT is forcibly
> disabled like so:
> 
> depends on !ARCH_REALVIEW || !SPARSEMEM

should be !ARCH_REALVIEW && !SPARSEMEM ?

Rob

> 
> However if I just configure it for the realview_defconfig:
> 
> mkdir foo
> make -f Makefile ARCH=arm CROSS_COMPILE=arm-none-eabi-
> KBUILD_OUTPUT=foo realview_defconfig
> 
> It strangely selects this anyway, because now foo/.config has:
> CONFIG_ARM_PATCH_PHYS_VIRT=y
> 
> Kconfig is a djungle to me, but I simply cannot find out
> what is setting this anyway. The problem is not there on
> v3.1, it does not get selected.
> 
> Any hints?
> 
> Yours,
> Linus Walleij
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* realview compulsory enables CONFIG_ARM_PATCH_PHYS_VIRT on me
  2011-12-05 21:57 ` Rob Herring
@ 2011-12-05 22:08   ` Nicolas Pitre
  2011-12-05 23:36     ` Russell King - ARM Linux
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Pitre @ 2011-12-05 22:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 5 Dec 2011, Rob Herring wrote:

> On 12/05/2011 03:22 PM, Linus Walleij wrote:
> > Hi Nico,
> > 
> > now I'm lost, I discussed by boot problems on ARM PB1176
> > with Marc and after some investigation I found this strange thing on
> > the lastest rc:s since -rc1:
> > 
> > In arch/arm/Kconfig ARM_PATCH_PHYS_VIRT is forcibly
> > disabled like so:
> > 
> > depends on !ARCH_REALVIEW || !SPARSEMEM
> 
> should be !ARCH_REALVIEW && !SPARSEMEM ?

Indeed.


Nicolas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* realview compulsory enables CONFIG_ARM_PATCH_PHYS_VIRT on me
  2011-12-05 22:08   ` Nicolas Pitre
@ 2011-12-05 23:36     ` Russell King - ARM Linux
  2011-12-06  0:37       ` Nicolas Pitre
  2011-12-06  8:29       ` Colin Tuckley
  0 siblings, 2 replies; 8+ messages in thread
From: Russell King - ARM Linux @ 2011-12-05 23:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 05, 2011 at 05:08:12PM -0500, Nicolas Pitre wrote:
> On Mon, 5 Dec 2011, Rob Herring wrote:
> 
> > On 12/05/2011 03:22 PM, Linus Walleij wrote:
> > > Hi Nico,
> > > 
> > > now I'm lost, I discussed by boot problems on ARM PB1176
> > > with Marc and after some investigation I found this strange thing on
> > > the lastest rc:s since -rc1:
> > > 
> > > In arch/arm/Kconfig ARM_PATCH_PHYS_VIRT is forcibly
> > > disabled like so:
> > > 
> > > depends on !ARCH_REALVIEW || !SPARSEMEM
> > 
> > should be !ARCH_REALVIEW && !SPARSEMEM ?
> 
> Indeed.

No, it's correct.  None of you are understanding the logic.

If you don't understand it, draw up a truth table:

ARCH_REALVIEW	SPARSEMEM	result
n		n		y
n		y		y
y		n		y
y		y		n

And this clearly shows that if we have realview _and_ sparsemem enabled,
then we don't want P2V patching in place.  The reason for this is quite
simple - here's Realview's memory.h:

#ifdef CONFIG_SPARSEMEM

#define __phys_to_virt(phys)                                            \
        ((phys) >= 0x80000000 ? (phys) - 0x80000000 + PAGE_OFFSET2 :    \
         (phys) >= 0x20000000 ? (phys) - 0x20000000 + PAGE_OFFSET1 :    \
         (phys) + PAGE_OFFSET)

#define __virt_to_phys(virt)                                            \
         ((virt) >= PAGE_OFFSET2 ? (virt) - PAGE_OFFSET2 + 0x80000000 : \
          (virt) >= PAGE_OFFSET1 ? (virt) - PAGE_OFFSET1 + 0x20000000 : \
          (virt) - PAGE_OFFSET)

#endif  /* CONFIG_SPARSEMEM */

Or to put it another way: on Realview if sparsemem is enabled, then we
are incompatible with P2V (due to the non-linear translation) so we have
a dependency there to disable it.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* realview compulsory enables CONFIG_ARM_PATCH_PHYS_VIRT on me
  2011-12-05 23:36     ` Russell King - ARM Linux
@ 2011-12-06  0:37       ` Nicolas Pitre
  2011-12-06  0:46         ` Russell King - ARM Linux
  2011-12-06  8:29       ` Colin Tuckley
  1 sibling, 1 reply; 8+ messages in thread
From: Nicolas Pitre @ 2011-12-06  0:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 5 Dec 2011, Russell King - ARM Linux wrote:

> On Mon, Dec 05, 2011 at 05:08:12PM -0500, Nicolas Pitre wrote:
> > On Mon, 5 Dec 2011, Rob Herring wrote:
> > 
> > > On 12/05/2011 03:22 PM, Linus Walleij wrote:
> > > > Hi Nico,
> > > > 
> > > > now I'm lost, I discussed by boot problems on ARM PB1176
> > > > with Marc and after some investigation I found this strange thing on
> > > > the lastest rc:s since -rc1:
> > > > 
> > > > In arch/arm/Kconfig ARM_PATCH_PHYS_VIRT is forcibly
> > > > disabled like so:
> > > > 
> > > > depends on !ARCH_REALVIEW || !SPARSEMEM
> > > 
> > > should be !ARCH_REALVIEW && !SPARSEMEM ?
> > 
> > Indeed.
> 
> No, it's correct.  None of you are understanding the logic.
> 
> If you don't understand it, draw up a truth table:
> 
> ARCH_REALVIEW	SPARSEMEM	result
> n		n		y
> n		y		y
> y		n		y
> y		y		n
> 
> And this clearly shows that if we have realview _and_ sparsemem enabled,
> then we don't want P2V patching in place.

I didn't look closely at Realview.  However the usefulness of P2V 
patching when sparsemem is used is somewhat questionable I would say. 


Nicolas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* realview compulsory enables CONFIG_ARM_PATCH_PHYS_VIRT on me
  2011-12-06  0:37       ` Nicolas Pitre
@ 2011-12-06  0:46         ` Russell King - ARM Linux
  0 siblings, 0 replies; 8+ messages in thread
From: Russell King - ARM Linux @ 2011-12-06  0:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 05, 2011 at 07:37:26PM -0500, Nicolas Pitre wrote:
> On Mon, 5 Dec 2011, Russell King - ARM Linux wrote:
> 
> > On Mon, Dec 05, 2011 at 05:08:12PM -0500, Nicolas Pitre wrote:
> > > On Mon, 5 Dec 2011, Rob Herring wrote:
> > > 
> > > > On 12/05/2011 03:22 PM, Linus Walleij wrote:
> > > > > Hi Nico,
> > > > > 
> > > > > now I'm lost, I discussed by boot problems on ARM PB1176
> > > > > with Marc and after some investigation I found this strange thing on
> > > > > the lastest rc:s since -rc1:
> > > > > 
> > > > > In arch/arm/Kconfig ARM_PATCH_PHYS_VIRT is forcibly
> > > > > disabled like so:
> > > > > 
> > > > > depends on !ARCH_REALVIEW || !SPARSEMEM
> > > > 
> > > > should be !ARCH_REALVIEW && !SPARSEMEM ?
> > > 
> > > Indeed.
> > 
> > No, it's correct.  None of you are understanding the logic.
> > 
> > If you don't understand it, draw up a truth table:
> > 
> > ARCH_REALVIEW	SPARSEMEM	result
> > n		n		y
> > n		y		y
> > y		n		y
> > y		y		n
> > 
> > And this clearly shows that if we have realview _and_ sparsemem enabled,
> > then we don't want P2V patching in place.
> 
> I didn't look closely at Realview.  However the usefulness of P2V 
> patching when sparsemem is used is somewhat questionable I would say. 

No it isn't.

Provided there's a linear v:p mapping, P2V can be used.  Only when
there's a non-linear mapping does P2V fail.  That's got nothing to do
with sparsemem, as you can be using sparsemem and still have a linear
v:p mapping (and several platforms do.)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* realview compulsory enables CONFIG_ARM_PATCH_PHYS_VIRT on me
  2011-12-05 23:36     ` Russell King - ARM Linux
  2011-12-06  0:37       ` Nicolas Pitre
@ 2011-12-06  8:29       ` Colin Tuckley
  1 sibling, 0 replies; 8+ messages in thread
From: Colin Tuckley @ 2011-12-06  8:29 UTC (permalink / raw)
  To: linux-arm-kernel

> -----Original Message-----

> depends on !ARCH_REALVIEW || !SPARSEMEM

> No, it's correct.  None of you are understanding the logic.

> And this clearly shows that if we have realview _and_ sparsemem
> enabled,
> then we don't want P2V patching in place.

In which case wouldn't it be clearer if it was written as:

depends on !(ARCH_REALVIEW && SPARSEMEM)

Colin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* realview compulsory enables CONFIG_ARM_PATCH_PHYS_VIRT on me
  2011-12-05 21:22 realview compulsory enables CONFIG_ARM_PATCH_PHYS_VIRT on me Linus Walleij
  2011-12-05 21:57 ` Rob Herring
@ 2011-12-06 10:30 ` Linus Walleij
  1 sibling, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2011-12-06 10:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 5, 2011 at 10:22 PM, Linus Walleij <linus.walleij@linaro.org> wrote:

> In arch/arm/Kconfig ARM_PATCH_PHYS_VIRT is forcibly
> disabled like so:
>
> depends on !ARCH_REALVIEW || !SPARSEMEM

OK so I understand from the discussion that P2V should work
perfectly well with the RealView as long as you're not using
sparsemem. And now something has changed in v3.2-rc1
kernel so it gets default-selected as opposed to being
disabled in v3.1.

So my boot problem is likely due to something else...
I'll keep looking.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-12-06 10:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-05 21:22 realview compulsory enables CONFIG_ARM_PATCH_PHYS_VIRT on me Linus Walleij
2011-12-05 21:57 ` Rob Herring
2011-12-05 22:08   ` Nicolas Pitre
2011-12-05 23:36     ` Russell King - ARM Linux
2011-12-06  0:37       ` Nicolas Pitre
2011-12-06  0:46         ` Russell King - ARM Linux
2011-12-06  8:29       ` Colin Tuckley
2011-12-06 10:30 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.