* Allow compile with CONFIG_DEBUG_INFO=y, X86_PAE not set on gcc 3.4.5
@ 2008-08-08 5:04 Simon Horman
2008-08-08 6:37 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 11+ messages in thread
From: Simon Horman @ 2008-08-08 5:04 UTC (permalink / raw)
To: linux-kernel, xen-devel
Cc: Jeremy Fitzhardinge, Stephen Tweedie, Eduardo Habkost,
Mark McLoughlin, Ingo Molnar, Jan Beulich, Dhaval Giani,
Thomas Gleixner, H. Peter Anvin
Hi,
It appears that "x86: preallocate and prepopulate separately"
(d8d5900ef8afc562088f8470feeaf17c4747790f) introduced a minor regression.
The build fails on gcc 3.4.5 if CONFIG_DEBUG_INFO=y (that is gcc is
called with -g) and X86_PAE not set.
There was previously some discussion of this without resolution.
http://lkml.org/lkml/2008/7/18/250
arch/x86/mm/pgtable.c: In function `pgd_prepopulate_pmd':
arch/x86/mm/pgtable.c:222: internal compiler error: in remove_insn, at emit-rtl.c:3746
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
# i686-unknown-linux-gnu-gcc --version
i686-unknown-linux-gnu-gcc (GCC) 3.4.5
My investigations seem to show that gcc 3.4.5 can't cope with the following
construct:
for (i = 0; i < 0; i++)
...
or more specifically:
for (i = 0; i < PREALLOCTED_PMDS; i++)
...
when PREALLOCTED_PMDS is 0. That is, when X86_PAE is not set.
This patch resolves this problem by moving the relevant code inside
#define X86_PAE and providing dummy functions outside !X86_PAE.
Signed-off-by: Simon Horman <horms@verge.net.au>
Index: linux-2.6/arch/x86/mm/pgtable.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/pgtable.c 2008-08-08 14:35:29.000000000 +1000
+++ linux-2.6/arch/x86/mm/pgtable.c 2008-08-08 15:00:07.000000000 +1000
@@ -141,12 +141,6 @@ void pud_populate(struct mm_struct *mm,
if (mm == current->active_mm)
write_cr3(read_cr3());
}
-#else /* !CONFIG_X86_PAE */
-
-/* No need to prepopulate any pagetable entries in non-PAE modes. */
-#define PREALLOCATED_PMDS 0
-
-#endif /* CONFIG_X86_PAE */
static void free_pmds(pmd_t *pmds[])
{
@@ -221,6 +215,19 @@ static void pgd_prepopulate_pmd(struct m
}
}
+#else /* !CONFIG_X86_PAE */
+
+/* No need to prepopulate any pagetable entries in non-PAE modes. */
+#define PREALLOCATED_PMDS 0
+
+static int preallocate_pmds(pmd_t *pmds[]) { return 0; }
+static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[])
+{ }
+static void free_pmds(pmd_t *pmds[]) { }
+static void pgd_mop_up_pmds(struct mm_struct *mm, pgd_t *pgdp) { }
+
+#endif /* CONFIG_X86_PAE */
+
pgd_t *pgd_alloc(struct mm_struct *mm)
{
pgd_t *pgd;
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: Allow compile with CONFIG_DEBUG_INFO=y, X86_PAE not set on gcc 3.4.5
2008-08-08 5:04 Allow compile with CONFIG_DEBUG_INFO=y, X86_PAE not set on gcc 3.4.5 Simon Horman
@ 2008-08-08 6:37 ` Jeremy Fitzhardinge
2008-08-08 7:50 ` Simon Horman
2008-08-08 8:01 ` Adrian Bunk
0 siblings, 2 replies; 11+ messages in thread
From: Jeremy Fitzhardinge @ 2008-08-08 6:37 UTC (permalink / raw)
To: Simon Horman
Cc: linux-kernel, xen-devel, Stephen Tweedie, Eduardo Habkost,
Mark McLoughlin, Ingo Molnar, Jan Beulich, Dhaval Giani,
Thomas Gleixner, H. Peter Anvin
Simon Horman wrote:
> Hi,
>
> It appears that "x86: preallocate and prepopulate separately"
> (d8d5900ef8afc562088f8470feeaf17c4747790f) introduced a minor regression.
> The build fails on gcc 3.4.5 if CONFIG_DEBUG_INFO=y (that is gcc is
> called with -g) and X86_PAE not set.
>
> There was previously some discussion of this without resolution.
> http://lkml.org/lkml/2008/7/18/250
>
> arch/x86/mm/pgtable.c: In function `pgd_prepopulate_pmd':
> arch/x86/mm/pgtable.c:222: internal compiler error: in remove_insn, at emit-rtl.c:3746
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>
> # i686-unknown-linux-gnu-gcc --version
> i686-unknown-linux-gnu-gcc (GCC) 3.4.5
>
> My investigations seem to show that gcc 3.4.5 can't cope with the following
> construct:
>
> for (i = 0; i < 0; i++)
> ...
>
> or more specifically:
>
> for (i = 0; i < PREALLOCTED_PMDS; i++)
> ...
>
> when PREALLOCTED_PMDS is 0. That is, when X86_PAE is not set.
>
> This patch resolves this problem by moving the relevant code inside
> #define X86_PAE and providing dummy functions outside !X86_PAE.
>
> Signed-off-by: Simon Horman <horms@verge.net.au>
>
We resolved the other report by saying that gcc 3.4.4 is broken. It
seems 3.4.5 is as well. Could you just update the compiler? I'd rather
not have to clutter the code with more ifdefs if we can possibly avoid it.
Does putting
if (PREALLOCATED_PMDS == 0)
return;
before the for loop help?
J
> Index: linux-2.6/arch/x86/mm/pgtable.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/mm/pgtable.c 2008-08-08 14:35:29.000000000 +1000
> +++ linux-2.6/arch/x86/mm/pgtable.c 2008-08-08 15:00:07.000000000 +1000
> @@ -141,12 +141,6 @@ void pud_populate(struct mm_struct *mm,
> if (mm == current->active_mm)
> write_cr3(read_cr3());
> }
> -#else /* !CONFIG_X86_PAE */
> -
> -/* No need to prepopulate any pagetable entries in non-PAE modes. */
> -#define PREALLOCATED_PMDS 0
> -
> -#endif /* CONFIG_X86_PAE */
>
> static void free_pmds(pmd_t *pmds[])
> {
> @@ -221,6 +215,19 @@ static void pgd_prepopulate_pmd(struct m
> }
> }
>
> +#else /* !CONFIG_X86_PAE */
> +
> +/* No need to prepopulate any pagetable entries in non-PAE modes. */
> +#define PREALLOCATED_PMDS 0
> +
> +static int preallocate_pmds(pmd_t *pmds[]) { return 0; }
> +static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[])
> +{ }
> +static void free_pmds(pmd_t *pmds[]) { }
> +static void pgd_mop_up_pmds(struct mm_struct *mm, pgd_t *pgdp) { }
> +
> +#endif /* CONFIG_X86_PAE */
> +
> pgd_t *pgd_alloc(struct mm_struct *mm)
> {
> pgd_t *pgd;
>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: Allow compile with CONFIG_DEBUG_INFO=y, X86_PAE not set on gcc 3.4.5
2008-08-08 6:37 ` Jeremy Fitzhardinge
@ 2008-08-08 7:50 ` Simon Horman
2008-08-08 8:01 ` Adrian Bunk
1 sibling, 0 replies; 11+ messages in thread
From: Simon Horman @ 2008-08-08 7:50 UTC (permalink / raw)
To: Jeremy Fitzhardinge
Cc: linux-kernel, xen-devel, Stephen Tweedie, Eduardo Habkost,
Mark McLoughlin, Ingo Molnar, Jan Beulich, Dhaval Giani,
Thomas Gleixner, H. Peter Anvin
On Thu, Aug 07, 2008 at 11:37:55PM -0700, Jeremy Fitzhardinge wrote:
> Simon Horman wrote:
>> Hi,
>>
>> It appears that "x86: preallocate and prepopulate separately"
>> (d8d5900ef8afc562088f8470feeaf17c4747790f) introduced a minor regression.
>> The build fails on gcc 3.4.5 if CONFIG_DEBUG_INFO=y (that is gcc is
>> called with -g) and X86_PAE not set.
>>
>> There was previously some discussion of this without resolution.
>> http://lkml.org/lkml/2008/7/18/250
>>
>> arch/x86/mm/pgtable.c: In function `pgd_prepopulate_pmd':
>> arch/x86/mm/pgtable.c:222: internal compiler error: in remove_insn, at emit-rtl.c:3746
>> Please submit a full bug report,
>> with preprocessed source if appropriate.
>> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>>
>> # i686-unknown-linux-gnu-gcc --version
>> i686-unknown-linux-gnu-gcc (GCC) 3.4.5
>>
>> My investigations seem to show that gcc 3.4.5 can't cope with the following
>> construct:
>>
>> for (i = 0; i < 0; i++)
>> ...
>>
>> or more specifically:
>>
>> for (i = 0; i < PREALLOCTED_PMDS; i++)
>> ...
>>
>> when PREALLOCTED_PMDS is 0. That is, when X86_PAE is not set.
>>
>> This patch resolves this problem by moving the relevant code inside
>> #define X86_PAE and providing dummy functions outside !X86_PAE.
>>
>> Signed-off-by: Simon Horman <horms@verge.net.au>
>>
>
> We resolved the other report by saying that gcc 3.4.4 is broken. It
> seems 3.4.5 is as well. Could you just update the compiler? I'd rather
> not have to clutter the code with more ifdefs if we can possibly avoid
> it.
I'm not sure that I would call that resolved.
The patch doesn't add any extra ifdefs. It just explicitly provides
empty functions rather than relying on the compiler to optimise
things out.
If gcc 3.4.4 and 3.4.5 really aren't valid compilers to use that is fine.
But it seems rather silly that this somewhat simple change renders
them unusable for this config.
> Does putting
>
> if (PREALLOCATED_PMDS == 0)
> return;
>
>
> before the for loop help?
Yes, it does. The code does compile with the following:
diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c
index 557b2ab..938cfe2 100644
--- a/arch/x86/mm/pgtable.c
+++ b/arch/x86/mm/pgtable.c
@@ -152,6 +152,9 @@ static void free_pmds(pmd_t *pmds[])
{
int i;
+ if (PREALLOCATED_PMDS == 0)
+ return;
+
for(i = 0; i < PREALLOCATED_PMDS; i++)
if (pmds[i])
free_page((unsigned long)pmds[i]);
@@ -162,6 +165,9 @@ static int preallocate_pmds(pmd_t *pmds[])
int i;
bool failed = false;
+ if (PREALLOCATED_PMDS == 0)
+ return 0;
+
for(i = 0; i < PREALLOCATED_PMDS; i++) {
pmd_t *pmd = (pmd_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
if (pmd == NULL)
@@ -187,6 +193,9 @@ static void pgd_mop_up_pmds(struct mm_struct *mm, pgd_t *pgdp)
{
int i;
+ if (PREALLOCATED_PMDS == 0)
+ return;
+
for(i = 0; i < PREALLOCATED_PMDS; i++) {
pgd_t pgd = pgdp[i];
@@ -207,6 +216,9 @@ static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[])
unsigned long addr;
int i;
+ if (PREALLOCATED_PMDS == 0)
+ return;
+
pud = pud_offset(pgd, 0);
for (addr = i = 0; i < PREALLOCATED_PMDS;
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: Allow compile with CONFIG_DEBUG_INFO=y, X86_PAE not set on gcc 3.4.5
2008-08-08 6:37 ` Jeremy Fitzhardinge
2008-08-08 7:50 ` Simon Horman
@ 2008-08-08 8:01 ` Adrian Bunk
2008-08-08 15:21 ` [Xen-devel] " Jeremy Fitzhardinge
1 sibling, 1 reply; 11+ messages in thread
From: Adrian Bunk @ 2008-08-08 8:01 UTC (permalink / raw)
To: Jeremy Fitzhardinge
Cc: Simon Horman, linux-kernel, xen-devel, Stephen Tweedie,
Eduardo Habkost, Mark McLoughlin, Ingo Molnar, Jan Beulich,
Dhaval Giani, Thomas Gleixner, H. Peter Anvin
On Thu, Aug 07, 2008 at 11:37:55PM -0700, Jeremy Fitzhardinge wrote:
> Simon Horman wrote:
>> Hi,
>>
>> It appears that "x86: preallocate and prepopulate separately"
>> (d8d5900ef8afc562088f8470feeaf17c4747790f) introduced a minor regression.
>> The build fails on gcc 3.4.5 if CONFIG_DEBUG_INFO=y (that is gcc is
>> called with -g) and X86_PAE not set.
>>
>> There was previously some discussion of this without resolution.
>> http://lkml.org/lkml/2008/7/18/250
>>
>> arch/x86/mm/pgtable.c: In function `pgd_prepopulate_pmd':
>> arch/x86/mm/pgtable.c:222: internal compiler error: in remove_insn, at emit-rtl.c:3746
>> Please submit a full bug report,
>> with preprocessed source if appropriate.
>> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>>
>> # i686-unknown-linux-gnu-gcc --version
>> i686-unknown-linux-gnu-gcc (GCC) 3.4.5
>>
>> My investigations seem to show that gcc 3.4.5 can't cope with the following
>> construct:
>>
>> for (i = 0; i < 0; i++)
>> ...
>>
>> or more specifically:
>>
>> for (i = 0; i < PREALLOCTED_PMDS; i++)
>> ...
>>
>> when PREALLOCTED_PMDS is 0. That is, when X86_PAE is not set.
>>
>> This patch resolves this problem by moving the relevant code inside
>> #define X86_PAE and providing dummy functions outside !X86_PAE.
>>
>> Signed-off-by: Simon Horman <horms@verge.net.au>
>>
>
> We resolved the other report by saying that gcc 3.4.4 is broken. It
> seems 3.4.5 is as well. Could you just update the compiler? I'd rather
> not have to clutter the code with more ifdefs if we can possibly avoid
> it.
>...
CONFIG_DEBUG_INFO=y is why I never hit it before.
It does not seem to be just one dodgy Redhat compiler (as I assumed in
the Bugzilla entry) but the whole 3.4 series of gcc which makes our
resolution of saying that this specific compiler is broken invalid.
Considering that we officially support all compilers >= 3.2 this is just
one more case where we have to add to the kernel a workaround for a
broken compiler.
After all, we already have 2 or 3 workarounds for new 2.6.27-rc
breakages with gcc 3.2 included or at least submitted.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [Xen-devel] Re: Allow compile with CONFIG_DEBUG_INFO=y, X86_PAE not set on gcc 3.4.5
2008-08-08 8:01 ` Adrian Bunk
@ 2008-08-08 15:21 ` Jeremy Fitzhardinge
2008-08-08 16:13 ` Adrian Bunk
0 siblings, 1 reply; 11+ messages in thread
From: Jeremy Fitzhardinge @ 2008-08-08 15:21 UTC (permalink / raw)
To: Adrian Bunk
Cc: Mark McLoughlin, xen-devel, Eduardo Habkost, Stephen Tweedie,
linux-kernel, Simon Horman, H. Peter Anvin, Ingo Molnar,
Thomas Gleixner, Dhaval Giani
Adrian Bunk wrote:
> CONFIG_DEBUG_INFO=y is why I never hit it before.
>
> It does not seem to be just one dodgy Redhat compiler (as I assumed in
> the Bugzilla entry) but the whole 3.4 series of gcc which makes our
> resolution of saying that this specific compiler is broken invalid.
>
> Considering that we officially support all compilers >= 3.2 this is just
> one more case where we have to add to the kernel a workaround for a
> broken compiler.
>
Yes. I'm happy to write off a specific rpm package, but a whole series
is a different matter.
Adding
if (PREALLOCATED_PMDS == 0)
return;
in the appropriate places with a small comment seems like the right answer.
J
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [Xen-devel] Re: Allow compile with CONFIG_DEBUG_INFO=y, X86_PAE not set on gcc 3.4.5
2008-08-08 15:21 ` [Xen-devel] " Jeremy Fitzhardinge
@ 2008-08-08 16:13 ` Adrian Bunk
2008-08-08 18:01 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 11+ messages in thread
From: Adrian Bunk @ 2008-08-08 16:13 UTC (permalink / raw)
To: Jeremy Fitzhardinge
Cc: Mark McLoughlin, xen-devel, Eduardo Habkost, Stephen Tweedie,
linux-kernel, Simon Horman, H. Peter Anvin, Ingo Molnar,
Thomas Gleixner, Dhaval Giani
On Fri, Aug 08, 2008 at 08:21:41AM -0700, Jeremy Fitzhardinge wrote:
> Adrian Bunk wrote:
>> CONFIG_DEBUG_INFO=y is why I never hit it before.
>>
>> It does not seem to be just one dodgy Redhat compiler (as I assumed in
>> the Bugzilla entry) but the whole 3.4 series of gcc which makes our
>> resolution of saying that this specific compiler is broken invalid.
>>
>> Considering that we officially support all compilers >= 3.2 this is
>> just one more case where we have to add to the kernel a workaround for
>> a broken compiler.
>>
>
> Yes. I'm happy to write off a specific rpm package, but a whole series
> is a different matter.
>
> Adding
>
> if (PREALLOCATED_PMDS == 0)
> return;
>
> in the appropriate places with a small comment seems like the right answer.
The patch below you suggested fixes it for me with gcc 3.4.6.
> J
cu
Adrian
--- a/arch/x86/mm/pgtable.c
+++ b/arch/x86/mm/pgtable.c
@@ -209,6 +209,9 @@ static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[])
pud = pud_offset(pgd, 0);
+ if (PREALLOCATED_PMDS == 0)
+ return;
+
for (addr = i = 0; i < PREALLOCATED_PMDS;
i++, pud++, addr += PUD_SIZE) {
pmd_t *pmd = pmds[i];
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [Xen-devel] Re: Allow compile with CONFIG_DEBUG_INFO=y, X86_PAE not set on gcc 3.4.5
2008-08-08 16:13 ` Adrian Bunk
@ 2008-08-08 18:01 ` Jeremy Fitzhardinge
2008-08-08 18:37 ` Adrian Bunk
0 siblings, 1 reply; 11+ messages in thread
From: Jeremy Fitzhardinge @ 2008-08-08 18:01 UTC (permalink / raw)
To: Adrian Bunk
Cc: Mark McLoughlin, xen-devel, Eduardo Habkost, Stephen Tweedie,
linux-kernel, Simon Horman, H. Peter Anvin, Ingo Molnar,
Thomas Gleixner, Dhaval Giani
Adrian Bunk wrote:
> On Fri, Aug 08, 2008 at 08:21:41AM -0700, Jeremy Fitzhardinge wrote:
>
>> Adrian Bunk wrote:
>>
>>> CONFIG_DEBUG_INFO=y is why I never hit it before.
>>>
>>> It does not seem to be just one dodgy Redhat compiler (as I assumed in
>>> the Bugzilla entry) but the whole 3.4 series of gcc which makes our
>>> resolution of saying that this specific compiler is broken invalid.
>>>
>>> Considering that we officially support all compilers >= 3.2 this is
>>> just one more case where we have to add to the kernel a workaround for
>>> a broken compiler.
>>>
>>>
>> Yes. I'm happy to write off a specific rpm package, but a whole series
>> is a different matter.
>>
>> Adding
>>
>> if (PREALLOCATED_PMDS == 0)
>> return;
>>
>> in the appropriate places with a small comment seems like the right answer.
>>
>
> The patch below you suggested fixes it for me with gcc 3.4.6.
>
>
>> J
>>
>
> cu
> Adrian
>
OK. Want to submit this as a proper patch?
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Thanks,
J
>
> --- a/arch/x86/mm/pgtable.c
> +++ b/arch/x86/mm/pgtable.c
> @@ -209,6 +209,9 @@ static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[])
>
> pud = pud_offset(pgd, 0);
>
> + if (PREALLOCATED_PMDS == 0)
> + return;
> +
> for (addr = i = 0; i < PREALLOCATED_PMDS;
> i++, pud++, addr += PUD_SIZE) {
> pmd_t *pmd = pmds[i];
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [Xen-devel] Re: Allow compile with CONFIG_DEBUG_INFO=y, X86_PAE not set on gcc 3.4.5
2008-08-08 18:01 ` Jeremy Fitzhardinge
@ 2008-08-08 18:37 ` Adrian Bunk
2008-08-08 20:46 ` [PATCH] x86: work around gcc 3.4.x bug Jeremy Fitzhardinge
0 siblings, 1 reply; 11+ messages in thread
From: Adrian Bunk @ 2008-08-08 18:37 UTC (permalink / raw)
To: Jeremy Fitzhardinge
Cc: Mark McLoughlin, xen-devel, Eduardo Habkost, Stephen Tweedie,
linux-kernel, Simon Horman, H. Peter Anvin, Ingo Molnar,
Thomas Gleixner, Dhaval Giani
On Fri, Aug 08, 2008 at 11:01:30AM -0700, Jeremy Fitzhardinge wrote:
> Adrian Bunk wrote:
>> On Fri, Aug 08, 2008 at 08:21:41AM -0700, Jeremy Fitzhardinge wrote:
>>
>>> Adrian Bunk wrote:
>>>
>>>> CONFIG_DEBUG_INFO=y is why I never hit it before.
>>>>
>>>> It does not seem to be just one dodgy Redhat compiler (as I assumed
>>>> in the Bugzilla entry) but the whole 3.4 series of gcc which makes
>>>> our resolution of saying that this specific compiler is broken
>>>> invalid.
>>>>
>>>> Considering that we officially support all compilers >= 3.2 this is
>>>> just one more case where we have to add to the kernel a workaround
>>>> for a broken compiler.
>>>>
>>> Yes. I'm happy to write off a specific rpm package, but a whole
>>> series is a different matter.
>>>
>>> Adding
>>>
>>> if (PREALLOCATED_PMDS == 0)
>>> return;
>>>
>>> in the appropriate places with a small comment seems like the right answer.
>>>
>>
>> The patch below you suggested fixes it for me with gcc 3.4.6.
>>
>>
>>> J
>>>
>>
>> cu
>> Adrian
>>
>
> OK. Want to submit this as a proper patch?
>...
No, it's your patch. :-)
> Thanks,
> J
>...
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH] x86: work around gcc 3.4.x bug
2008-08-08 18:37 ` Adrian Bunk
@ 2008-08-08 20:46 ` Jeremy Fitzhardinge
2008-08-09 6:29 ` Simon Horman
0 siblings, 1 reply; 11+ messages in thread
From: Jeremy Fitzhardinge @ 2008-08-08 20:46 UTC (permalink / raw)
To: Adrian Bunk
Cc: Mark McLoughlin, xen-devel, Eduardo Habkost, Stephen Tweedie,
linux-kernel, Simon Horman, H. Peter Anvin, Ingo Molnar,
Thomas Gleixner, Dhaval Giani
gcc-3.4.x crashes when compiling pgd_prepopulate_pmd() when
PREALLOCATED_PMDS == 0 and CONFIG_DEBUG_INFO is enabled. This seems
to avoid the problem.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Adrian Bunk <bunk@kernel.org>
Cc: Simon Horman <horms@verge.net.au>
Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
---
arch/x86/mm/pgtable.c | 3 +++
1 file changed, 3 insertions(+)
===================================================================
--- a/arch/x86/mm/pgtable.c
+++ b/arch/x86/mm/pgtable.c
@@ -207,6 +207,9 @@
unsigned long addr;
int i;
+ if (PREALLOCATED_PMDS == 0) /* Work around gcc-3.4.x bug */
+ return;
+
pud = pud_offset(pgd, 0);
for (addr = i = 0; i < PREALLOCATED_PMDS;
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86: work around gcc 3.4.x bug
2008-08-08 20:46 ` [PATCH] x86: work around gcc 3.4.x bug Jeremy Fitzhardinge
@ 2008-08-09 6:29 ` Simon Horman
2008-08-11 16:44 ` Ingo Molnar
0 siblings, 1 reply; 11+ messages in thread
From: Simon Horman @ 2008-08-09 6:29 UTC (permalink / raw)
To: Jeremy Fitzhardinge
Cc: Adrian Bunk, Mark McLoughlin, xen-devel, Eduardo Habkost,
Stephen Tweedie, linux-kernel, H. Peter Anvin, Ingo Molnar,
Thomas Gleixner, Dhaval Giani
On Fri, Aug 08, 2008 at 01:46:07PM -0700, Jeremy Fitzhardinge wrote:
> gcc-3.4.x crashes when compiling pgd_prepopulate_pmd() when
> PREALLOCATED_PMDS == 0 and CONFIG_DEBUG_INFO is enabled. This seems
> to avoid the problem.
>
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
> Cc: Adrian Bunk <bunk@kernel.org>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Hi Jeremy,
This does solve the problem I was seeing on on 3.4.5.
Acked-by: Simon Horman <horms@verge.net.au>
> ---
> arch/x86/mm/pgtable.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> ===================================================================
> --- a/arch/x86/mm/pgtable.c
> +++ b/arch/x86/mm/pgtable.c
> @@ -207,6 +207,9 @@
> unsigned long addr;
> int i;
>
> + if (PREALLOCATED_PMDS == 0) /* Work around gcc-3.4.x bug */
> + return;
> +
> pud = pud_offset(pgd, 0);
>
> for (addr = i = 0; i < PREALLOCATED_PMDS;
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86: work around gcc 3.4.x bug
2008-08-09 6:29 ` Simon Horman
@ 2008-08-11 16:44 ` Ingo Molnar
0 siblings, 0 replies; 11+ messages in thread
From: Ingo Molnar @ 2008-08-11 16:44 UTC (permalink / raw)
To: Simon Horman
Cc: Jeremy Fitzhardinge, Adrian Bunk, Mark McLoughlin, xen-devel,
Eduardo Habkost, Stephen Tweedie, linux-kernel, H. Peter Anvin,
Thomas Gleixner, Dhaval Giani
* Simon Horman <horms@verge.net.au> wrote:
> On Fri, Aug 08, 2008 at 01:46:07PM -0700, Jeremy Fitzhardinge wrote:
> > gcc-3.4.x crashes when compiling pgd_prepopulate_pmd() when
> > PREALLOCATED_PMDS == 0 and CONFIG_DEBUG_INFO is enabled. This seems
> > to avoid the problem.
> >
> > Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
> > Cc: Adrian Bunk <bunk@kernel.org>
> > Cc: Simon Horman <horms@verge.net.au>
> > Cc: Dhaval Giani <dhaval@linux.vnet.ibm.com>
>
> Hi Jeremy,
>
> This does solve the problem I was seeing on on 3.4.5.
>
> Acked-by: Simon Horman <horms@verge.net.au>
applied to tip/x86/urgent - thanks for tracking this down.
Ingo
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-08-11 16:47 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08 5:04 Allow compile with CONFIG_DEBUG_INFO=y, X86_PAE not set on gcc 3.4.5 Simon Horman
2008-08-08 6:37 ` Jeremy Fitzhardinge
2008-08-08 7:50 ` Simon Horman
2008-08-08 8:01 ` Adrian Bunk
2008-08-08 15:21 ` [Xen-devel] " Jeremy Fitzhardinge
2008-08-08 16:13 ` Adrian Bunk
2008-08-08 18:01 ` Jeremy Fitzhardinge
2008-08-08 18:37 ` Adrian Bunk
2008-08-08 20:46 ` [PATCH] x86: work around gcc 3.4.x bug Jeremy Fitzhardinge
2008-08-09 6:29 ` Simon Horman
2008-08-11 16:44 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox