From: santosh.shilimkar@ti.com (Santosh Shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: Regression (ARM) arch/arm/mm/init.c doesn't build without CONFIG_ARM_PATCH_PHYS_VIRT.
Date: Mon, 6 Jan 2014 17:27:30 -0500 [thread overview]
Message-ID: <52CB2DD2.1070005@ti.com> (raw)
In-Reply-To: <m3ppo4sqz1.fsf@t19.piap.pl>
On Monday 06 January 2014 05:08 PM, Krzysztof Ha?asa wrote:
> Santosh Shilimkar <santosh.shilimkar@ti.com> writes:
>
>> I am afraid you didn't understood what the fix is if you say above.
>> arm_dma_limit is broken without this fix for LPAE machines with
>> memory starting 4 GB physical boundary.
>
> I wonder what CONFIG_ARM_PATCH_PHYS_VIRT and CONFIG_ZONE_DMA do they
> use?
>
You need to grep where the CONFIG_ARM_PATCH_PHYS_VIRT is used ;)
> Of course, CONFIG_ZONE_DMA must be set, because otherwise the patch
> changes a part disabled with #ifdef. CONFIG_ARM_PATCH_PHYS_VIRT must be
> set because otherwise the kernel will not compile at all.
>
> Do you accept the fact the configurations with CONFIG_ZONE_DMA and
> without CONFIG_ARM_PATCH_PHYS_VIRT are now broken - by this very commit?
>
> Now, what "fix" does this commit in its entirety do:
>
> - arm_dma_limit = PHYS_OFFSET + arm_dma_zone_size - 1;
> + arm_dma_limit = __pv_phys_offset + arm_dma_zone_size - 1;
>
> if under the above circumstances (CONFIG_*) in
> arch/arm/include/asm/memory.h we have:
>
> extern u64 __pv_phys_offset;
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the only usable declaration of this variable
> extern u64 __pv_offset;
> extern void fixup_pv_table(const void *, unsigned long);
> extern const void *__pv_table_begin, *__pv_table_end;
>
> #define PHYS_OFFSET __pv_phys_offset
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
Your grep actually missed the assembly files where the actual patching
happens. Please have a look at "arch/arm/kernel/head.S"
The "CONFIG_ARM_PATCH_PHYS_VIRT" is always enabled on almost all ARM builds
since its needed for multi-config kernel to work. May be its time to
make it default enabled but I let Russell comment if there is any
better way to handle this.
Regards,
Santosh
WARNING: multiple messages have this Message-ID (diff)
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: "Krzysztof Hałasa" <khalasa@piap.pl>,
"Russell King - ARM Linux" <linux@arm.linux.org.uk>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>,
Linus Torvalds <torvalds@linux-foundation.org>,
lkml <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: Regression (ARM) arch/arm/mm/init.c doesn't build without CONFIG_ARM_PATCH_PHYS_VIRT.
Date: Mon, 6 Jan 2014 17:27:30 -0500 [thread overview]
Message-ID: <52CB2DD2.1070005@ti.com> (raw)
In-Reply-To: <m3ppo4sqz1.fsf@t19.piap.pl>
On Monday 06 January 2014 05:08 PM, Krzysztof Hałasa wrote:
> Santosh Shilimkar <santosh.shilimkar@ti.com> writes:
>
>> I am afraid you didn't understood what the fix is if you say above.
>> arm_dma_limit is broken without this fix for LPAE machines with
>> memory starting 4 GB physical boundary.
>
> I wonder what CONFIG_ARM_PATCH_PHYS_VIRT and CONFIG_ZONE_DMA do they
> use?
>
You need to grep where the CONFIG_ARM_PATCH_PHYS_VIRT is used ;)
> Of course, CONFIG_ZONE_DMA must be set, because otherwise the patch
> changes a part disabled with #ifdef. CONFIG_ARM_PATCH_PHYS_VIRT must be
> set because otherwise the kernel will not compile at all.
>
> Do you accept the fact the configurations with CONFIG_ZONE_DMA and
> without CONFIG_ARM_PATCH_PHYS_VIRT are now broken - by this very commit?
>
> Now, what "fix" does this commit in its entirety do:
>
> - arm_dma_limit = PHYS_OFFSET + arm_dma_zone_size - 1;
> + arm_dma_limit = __pv_phys_offset + arm_dma_zone_size - 1;
>
> if under the above circumstances (CONFIG_*) in
> arch/arm/include/asm/memory.h we have:
>
> extern u64 __pv_phys_offset;
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the only usable declaration of this variable
> extern u64 __pv_offset;
> extern void fixup_pv_table(const void *, unsigned long);
> extern const void *__pv_table_begin, *__pv_table_end;
>
> #define PHYS_OFFSET __pv_phys_offset
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
Your grep actually missed the assembly files where the actual patching
happens. Please have a look at "arch/arm/kernel/head.S"
The "CONFIG_ARM_PATCH_PHYS_VIRT" is always enabled on almost all ARM builds
since its needed for multi-config kernel to work. May be its time to
make it default enabled but I let Russell comment if there is any
better way to handle this.
Regards,
Santosh
next prev parent reply other threads:[~2014-01-06 22:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-31 11:20 Regression (ARM) arch/arm/mm/init.c doesn't build without CONFIG_ARM_PATCH_PHYS_VIRT Krzysztof Hałasa
2013-12-31 11:20 ` Krzysztof Hałasa
2013-12-31 11:23 ` Russell King - ARM Linux
2013-12-31 11:23 ` Russell King - ARM Linux
2014-01-01 14:40 ` Krzysztof Hałasa
2014-01-01 14:40 ` Krzysztof Hałasa
2014-01-06 19:28 ` Krzysztof Hałasa
2014-01-06 19:28 ` Krzysztof Hałasa
2014-01-06 19:33 ` Santosh Shilimkar
2014-01-06 19:33 ` Santosh Shilimkar
2014-01-06 22:08 ` Krzysztof Hałasa
2014-01-06 22:08 ` Krzysztof Hałasa
2014-01-06 22:27 ` Santosh Shilimkar [this message]
2014-01-06 22:27 ` Santosh Shilimkar
2014-01-06 22:39 ` Russell King - ARM Linux
2014-01-06 22:39 ` Russell King - ARM Linux
2014-01-06 23:42 ` Santosh Shilimkar
2014-01-06 23:42 ` Santosh Shilimkar
2014-01-07 1:11 ` Russell King - ARM Linux
2014-01-07 1:11 ` Russell King - ARM Linux
2014-01-07 17:45 ` Santosh Shilimkar
2014-01-07 17:45 ` Santosh Shilimkar
2014-01-07 17:55 ` Russell King - ARM Linux
2014-01-07 17:55 ` Russell King - ARM Linux
2014-01-08 6:40 ` Krzysztof Hałasa
2014-01-08 6:40 ` Krzysztof Hałasa
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=52CB2DD2.1070005@ti.com \
--to=santosh.shilimkar@ti.com \
--cc=linux-arm-kernel@lists.infradead.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 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.