* [PATCH] Correct build warnings with CONFIG_TRANSPARENT_HUGEPAGE disabled
@ 2013-06-24 14:35 Nathan Fontenot
2013-06-24 15:05 ` Aneesh Kumar K.V
0 siblings, 1 reply; 4+ messages in thread
From: Nathan Fontenot @ 2013-06-24 14:35 UTC (permalink / raw)
To: linuxppc-dev; +Cc: aneesh.kumar
Building with CONFIG_TRANSPARENT_HUGEPAGE disabled causes the following
build wearnings;
powerpc/arch/powerpc/include/asm/mmu-hash64.h: In function ‘__hash_page_thp’:
powerpc/arch/powerpc/include/asm/mmu-hash64.h:354: warning: no return statement in function returning non-void
This patch adds a return -1 to the static inline for __hash_page_thp()
to correct the warnings.
Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/mmu-hash64.h | 1 +
1 file changed, 1 insertion(+)
Index: powerpc/arch/powerpc/include/asm/mmu-hash64.h
===================================================================
--- powerpc.orig/arch/powerpc/include/asm/mmu-hash64.h 2013-06-24 07:54:08.000000000 -0500
+++ powerpc/arch/powerpc/include/asm/mmu-hash64.h 2013-06-24 08:07:56.000000000 -0500
@@ -351,6 +351,7 @@
int ssize, unsigned int psize)
{
BUG();
+ return -1;
}
#endif
extern void hash_failure_debug(unsigned long ea, unsigned long access,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Correct build warnings with CONFIG_TRANSPARENT_HUGEPAGE disabled
2013-06-24 14:35 [PATCH] Correct build warnings with CONFIG_TRANSPARENT_HUGEPAGE disabled Nathan Fontenot
@ 2013-06-24 15:05 ` Aneesh Kumar K.V
2013-06-24 15:31 ` Aneesh Kumar K.V
0 siblings, 1 reply; 4+ messages in thread
From: Aneesh Kumar K.V @ 2013-06-24 15:05 UTC (permalink / raw)
To: Nathan Fontenot, linuxppc-dev
Nathan Fontenot <nfont@linux.vnet.ibm.com> writes:
> Building with CONFIG_TRANSPARENT_HUGEPAGE disabled causes the following
> build wearnings;
>
> powerpc/arch/powerpc/include/asm/mmu-hash64.h: In function =E2=80=98__has=
h_page_thp=E2=80=99:
> powerpc/arch/powerpc/include/asm/mmu-hash64.h:354: warning: no return sta=
tement in function returning non-void
>
> This patch adds a return -1 to the static inline for __hash_page_thp()
> to correct the warnings.
>
> Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Wondering why i am not finding this
[root@llmp24l02 thp]# make arch/powerpc/mm/hash_utils_64.o
....
.....
CC arch/powerpc/mm/hash_utils_64.o
[root@llmp24l02 thp]# grep TRANSPARENT_HUGEPAGE .config
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=3Dy
# CONFIG_TRANSPARENT_HUGEPAGE is not set
[root@llmp24l02 thp]#=20
[root@llmp24l02 thp]# gcc --version
gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> ---
> arch/powerpc/include/asm/mmu-hash64.h | 1 +
> 1 file changed, 1 insertion(+)
>
> Index: powerpc/arch/powerpc/include/asm/mmu-hash64.h
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- powerpc.orig/arch/powerpc/include/asm/mmu-hash64.h 2013-06-24 07:54:0=
8.000000000 -0500
> +++ powerpc/arch/powerpc/include/asm/mmu-hash64.h 2013-06-24 08:07:56.000=
000000 -0500
> @@ -351,6 +351,7 @@
> int ssize, unsigned int psize)
> {
> BUG();
> + return -1;
> }
> #endif
> extern void hash_failure_debug(unsigned long ea, unsigned long access,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Correct build warnings with CONFIG_TRANSPARENT_HUGEPAGE disabled
2013-06-24 15:05 ` Aneesh Kumar K.V
@ 2013-06-24 15:31 ` Aneesh Kumar K.V
2013-06-24 16:27 ` David Laight
0 siblings, 1 reply; 4+ messages in thread
From: Aneesh Kumar K.V @ 2013-06-24 15:31 UTC (permalink / raw)
To: Nathan Fontenot, linuxppc-dev
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:
> Nathan Fontenot <nfont@linux.vnet.ibm.com> writes:
>
>> Building with CONFIG_TRANSPARENT_HUGEPAGE disabled causes the following
>> build wearnings;
>>
>> powerpc/arch/powerpc/include/asm/mmu-hash64.h: In function =E2=80=98__ha=
sh_page_thp=E2=80=99:
>> powerpc/arch/powerpc/include/asm/mmu-hash64.h:354: warning: no return st=
atement in function returning non-void
>>
>> This patch adds a return -1 to the static inline for __hash_page_thp()
>> to correct the warnings.
>>
>> Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
>
> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>
> Wondering why i am not finding this
>
> [root@llmp24l02 thp]# make arch/powerpc/mm/hash_utils_64.o
> ....
> .....
> CC arch/powerpc/mm/hash_utils_64.o
> [root@llmp24l02 thp]# grep TRANSPARENT_HUGEPAGE .config
> CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=3Dy
> # CONFIG_TRANSPARENT_HUGEPAGE is not set
> [root@llmp24l02 thp]#=20
> [root@llmp24l02 thp]# gcc --version
> gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8)
> Copyright (C) 2012 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS=
E.
>
>
new compilers have __builtin_unreachable in BUG. That is why it didn't
trigger for me.=20
new compiler:
_____________
static inline __attribute__((always_inline)) __attribute__((no_instrument_f=
unction)) int __hash_page_thp(unsigned long ea, unsigned long access,
unsigned long vsid, pmd_t *pmdp,
unsigned long trap, int local,
int ssize, unsigned int psize)
{
do { __asm__ __volatile__( "1: twi 31,0,0\n" ".section __bug_table,\"a\"\n=
" "2:\t" ".llong" " " "1b, %0\n" "\t.short %1, %2\n" ".org 2b+%3\n" ".previ=
ous\n" : : "i" ("/home/opensource/sources/kernels/linux-powerpc/arch/powerp=
c/include/asm/mmu-hash64.h"), "i" (353), "i" (0), "i" (sizeof(struct bug_en=
try))); __builtin_unreachable(); } while (0);
}
failure:
__________
static inline __attribute__((always_inline)) __attribute__((no_instrument_f=
unction)) int __hash_page_thp(unsigned long ea, unsigned long access,
unsigned long vsid, pmd_t *pmdp,
unsigned long trap, int local,
int ssize, unsigned int psize)
{
do { __asm__ __volatile__( "1: twi 31,0,0\n" ".section __bug_table,\"a\"\n=
" "2:\t" ".llong" " " "1b, %0\n" "\t.short %1, %2\n" ".org 2b+%3\n" ".previ=
ous\n" : : "i" ("/home/nfont/src/powerpc/arch/powerpc/include/asm/mmu-hash6=
4.h"), "i" (353), "i" (0), "i" (sizeof(struct bug_entry))); do { } while (1=
); } while (0);
}
-aneesh
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] Correct build warnings with CONFIG_TRANSPARENT_HUGEPAGE disabled
2013-06-24 15:31 ` Aneesh Kumar K.V
@ 2013-06-24 16:27 ` David Laight
0 siblings, 0 replies; 4+ messages in thread
From: David Laight @ 2013-06-24 16:27 UTC (permalink / raw)
To: Aneesh Kumar K.V, Nathan Fontenot, linuxppc-dev
PiBmYWlsdXJlOg0KPiBfX19fX19fX19fDQo+IHN0YXRpYyBpbmxpbmUgX19hdHRyaWJ1dGVfXygo
YWx3YXlzX2lubGluZSkpIF9fYXR0cmlidXRlX18oKG5vX2luc3RydW1lbnRfZnVuY3Rpb24pKSBp
bnQNCj4gX19oYXNoX3BhZ2VfdGhwKHVuc2lnbmVkIGxvbmcgZWEsIHVuc2lnbmVkIGxvbmcgYWNj
ZXNzLA0KPiAgICAgICB1bnNpZ25lZCBsb25nIHZzaWQsIHBtZF90ICpwbWRwLA0KPiAgICAgICB1
bnNpZ25lZCBsb25nIHRyYXAsIGludCBsb2NhbCwNCj4gICAgICAgaW50IHNzaXplLCB1bnNpZ25l
ZCBpbnQgcHNpemUpDQo+IHsNCj4gIGRvIHsgX19hc21fXyBfX3ZvbGF0aWxlX18oICIxOiB0d2kg
MzEsMCwwXG4iICIuc2VjdGlvbiBfX2J1Z190YWJsZSxcImFcIlxuIiAiMjpcdCIgIi5sbG9uZyIg
IiAiICIxYiwNCj4gJTBcbiIgIlx0LnNob3J0ICUxLCAlMlxuIiAiLm9yZyAyYislM1xuIiAiLnBy
ZXZpb3VzXG4iIDogOiAiaSINCj4gKCIvaG9tZS9uZm9udC9zcmMvcG93ZXJwYy9hcmNoL3Bvd2Vy
cGMvaW5jbHVkZS9hc20vbW11LWhhc2g2NC5oIiksICJpIiAoMzUzKSwgImkiICgwKSwgImkiDQo+
IChzaXplb2Yoc3RydWN0IGJ1Z19lbnRyeSkpKTsgZG8geyB9IHdoaWxlICgxKTsgfSB3aGlsZSAo
MCk7DQo+IH0NCg0KV2h5IGlzbid0IHRoZSAiZG8geyB9IHdoaWxlICgxKTsiIGVub3VnaCB0byBz
dG9wIHRoZSBjb21waWxlcg0KZXhwZWN0aW5nIHRoZSBhYm92ZSB0byByZXR1cm4/DQpJIGtub3cg
SSd2ZSBhZGRlZCAiZm9yICg7Oyk7IiBpbiBzb21lIGNvZGUgYmVmb3JlIG5vdy4NCkRpc2FibGlu
ZyBvcHRpbWlzYXRpb25zIHdvdWxkIGJlIGVub3VnaCAtIGJ1dCB1bmxpa2VseSB0byBiZSB0cnVl
Lg0KDQoJRGF2aWQNCg0K
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-24 16:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-24 14:35 [PATCH] Correct build warnings with CONFIG_TRANSPARENT_HUGEPAGE disabled Nathan Fontenot
2013-06-24 15:05 ` Aneesh Kumar K.V
2013-06-24 15:31 ` Aneesh Kumar K.V
2013-06-24 16:27 ` David Laight
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).