* [RFC|PATCH] MIPS: tlbex.c: Fix GCC 4.6.0 build error.
@ 2011-05-13 15:49 Alexander Clouter
2011-05-13 15:51 ` Alexander Clouter
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Clouter @ 2011-05-13 15:49 UTC (permalink / raw)
To: linux-mips; +Cc: ralf, ddaney
For !HUGETLB_PAGE htlb_info barfs, and when !64BIT we get vmalloc_mode
grumbling.
CC arch/mips/mm/tlbex.o
arch/mips/mm/tlbex.c: In function 'build_r4000_tlb_refill_handler':
arch/mips/mm/tlbex.c:1155:22: error: variable 'vmalloc_mode' set but not used [-Werror=unused-but-set-variable]
arch/mips/mm/tlbex.c:1154:28: error: variable 'htlb_info' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
Untested other than shovelling through a compiler, it really is turning
into an ifdef-fest though in there...
Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
---
arch/mips/mm/tlbex.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 04f9e17..814b3f4 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -1151,8 +1151,12 @@ static void __cpuinit build_r4000_tlb_refill_handler(void)
struct uasm_reloc *r = relocs;
u32 *f;
unsigned int final_len;
+#ifdef CONFIG_HUGETLB_PAGE
struct mips_huge_tlb_info htlb_info;
+#endif
+#ifdef CONFIG_64BIT
enum vmalloc64_mode vmalloc_mode;
+#endif
memset(tlb_handler, 0, sizeof(tlb_handler));
memset(labels, 0, sizeof(labels));
@@ -1163,13 +1167,24 @@ static void __cpuinit build_r4000_tlb_refill_handler(void)
scratch_reg = allocate_kscratch();
if ((scratch_reg > 0 || scratchpad_available()) && use_bbit_insns()) {
- htlb_info = build_fast_tlb_refill_handler(&p, &l, &r, K0, K1,
+#ifdef CONFIG_HUGETLB_PAGE
+ htlb_info =
+#else
+ (void)
+#endif
+ build_fast_tlb_refill_handler(&p, &l, &r, K0, K1,
scratch_reg);
+#ifdef CONFIG_64BIT
vmalloc_mode = refill_scratch;
+#endif
} else {
+#ifdef CONFIG_HUGETLB_PAGE
htlb_info.huge_pte = K0;
htlb_info.restore_scratch = 0;
+#endif
+#ifdef CONFIG_64BIT
vmalloc_mode = refill_noscratch;
+#endif
/*
* create the plain linear handler
*/
--
1.7.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC|PATCH] MIPS: tlbex.c: Fix GCC 4.6.0 build error.
2011-05-13 15:49 [RFC|PATCH] MIPS: tlbex.c: Fix GCC 4.6.0 build error Alexander Clouter
@ 2011-05-13 15:51 ` Alexander Clouter
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Clouter @ 2011-05-13 15:51 UTC (permalink / raw)
To: linux-mips; +Cc: ralf, ddaney
Forget this, just seen it in upstream as
4a9040f451c32cd62971ecda1cb5bc4aed444c78.
Cheers
* Alexander Clouter <alex@digriz.org.uk> [2011-05-13 16:49:41+0100]:
>
> For !HUGETLB_PAGE htlb_info barfs, and when !64BIT we get vmalloc_mode
> grumbling.
>
> CC arch/mips/mm/tlbex.o
> arch/mips/mm/tlbex.c: In function 'build_r4000_tlb_refill_handler':
> arch/mips/mm/tlbex.c:1155:22: error: variable 'vmalloc_mode' set but not used [-Werror=unused-but-set-variable]
> arch/mips/mm/tlbex.c:1154:28: error: variable 'htlb_info' set but not used [-Werror=unused-but-set-variable]
> cc1: all warnings being treated as errors
>
> Untested other than shovelling through a compiler, it really is turning
> into an ifdef-fest though in there...
>
> Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
> ---
> arch/mips/mm/tlbex.c | 17 ++++++++++++++++-
> 1 files changed, 16 insertions(+), 1 deletions(-)
>
> diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
> index 04f9e17..814b3f4 100644
> --- a/arch/mips/mm/tlbex.c
> +++ b/arch/mips/mm/tlbex.c
> @@ -1151,8 +1151,12 @@ static void __cpuinit build_r4000_tlb_refill_handler(void)
> struct uasm_reloc *r = relocs;
> u32 *f;
> unsigned int final_len;
> +#ifdef CONFIG_HUGETLB_PAGE
> struct mips_huge_tlb_info htlb_info;
> +#endif
> +#ifdef CONFIG_64BIT
> enum vmalloc64_mode vmalloc_mode;
> +#endif
>
> memset(tlb_handler, 0, sizeof(tlb_handler));
> memset(labels, 0, sizeof(labels));
> @@ -1163,13 +1167,24 @@ static void __cpuinit build_r4000_tlb_refill_handler(void)
> scratch_reg = allocate_kscratch();
>
> if ((scratch_reg > 0 || scratchpad_available()) && use_bbit_insns()) {
> - htlb_info = build_fast_tlb_refill_handler(&p, &l, &r, K0, K1,
> +#ifdef CONFIG_HUGETLB_PAGE
> + htlb_info =
> +#else
> + (void)
> +#endif
> + build_fast_tlb_refill_handler(&p, &l, &r, K0, K1,
> scratch_reg);
> +#ifdef CONFIG_64BIT
> vmalloc_mode = refill_scratch;
> +#endif
> } else {
> +#ifdef CONFIG_HUGETLB_PAGE
> htlb_info.huge_pte = K0;
> htlb_info.restore_scratch = 0;
> +#endif
> +#ifdef CONFIG_64BIT
> vmalloc_mode = refill_noscratch;
> +#endif
> /*
> * create the plain linear handler
> */
>
--
Alexander Clouter
.sigmonster says: Needs are a function of what other people have.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-13 15:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-13 15:49 [RFC|PATCH] MIPS: tlbex.c: Fix GCC 4.6.0 build error Alexander Clouter
2011-05-13 15:51 ` Alexander Clouter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox