powerpc: fix udbg warning
PATCH 1/1 powerpc: fix udbg warning
Fix an implicit declaration warning in hash_utils_64.c when udbg is enabled.
hash_utils_64.c: In function =91htab_bolt_mapping=92:
hash_utils_64.c:169: warning: implicit declaration of function =91udbg_pr= intf=92
---
Index: a/arch/powerpc/mm/hash_utils_64.c =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
arch/powerpc/mm/hash_utils_64.c +1 -0
@@ -51,6 +51,7 @@#include <asm/cputable.h> #include <asm/abs_addr.h> #include <asm/sections.h> +#include <asm/udbg.h> #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt)
Here's an updated version that fixes a few more warnings.
-Geoff
Fix an implicit declaration warning in hash_utils_64.c when udbg is enabled.
hash_utils_64.c: In function =E2=80=98htab_bolt_mapping=E2=80=99:
hash_utils_64.c:169: warning: implicit declaration of function =E2=80=98u= dbg_printf=E2=80=99
hash_utils_64.c:251: warning: format =E2=80=98%04x=E2=80=99 expects type = =E2=80=98unsigned int=E2=80=99
---
Index: cell--common--4/arch/powerpc/mm/hash_utils_64.c =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
arch/powerpc/mm/hash_utils_64.c +4 -3
@@ -51,6 +51,7 @@#include <asm/cputable.h> #include <asm/abs_addr.h> #include <asm/sections.h> +#include <asm/udbg.h> #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt)
@@ -247,7 +248,7 @@ static int __init htab_dt_scan_page_sizeelse def->tlbiel =3D 0; -DBG (" %d: shift=3D%02x, sllp=3D%04x, avpnm=3D%08x, " +DBG (" %d: shift=3D%02x, sllp=3D%04lx, avpnm=3D%08lx, " "tlbiel=3D%d, penc=3D%d\n" , idx, shift, def->sllp, def->avpnm, def->tlbiel, def->penc);
@@ -773,7 +774,7 @@ void flush_hash_page(unsigned long va, r {unsigned long hash, index, shift, hidx, slot; -DBG_LOW ("flush_hash_page(va=3D%016x)\n" , va); +DBG_LOW ("flush_hash_page(va=3D%016lx)\n" , va); pte_iterate_hashed_subpages(pte, psize, va, index, shift) { hash =3D hpt_hash(va, shift); hidx =3D __rpte_to_hidx(pte, index);
@@ -781,7 +782,7 @@ void flush_hash_page(unsigned long va, r hash =3D ~hash; slot =3D (hash & htab_hash_mask) *HPTES_PER_GROUP ; slot +=3D hidx & _PTEIDX_GROUP_IX; -DBG_LOW (" sub %d: hash=3D%x, hidx=3D%x\n" , index, slot, hidx); +DBG_LOW (" sub %ld: hash=3D%lx, hidx=3D%lx\n" , index, slot, hidx); ppc_md.hpte_invalidate (slot, va, psize, local); }pte_iterate_hashed_end (); }
Quoted 1 line · Geoff Levand
Here's an updated version that fixes a few more warnings.
I get:
fatal: corrupt patch at line 12
* Patch failed.
from git-applymbox when I try to apply it. It looks like your mailer turns lines that contain only whitespace into empty lines. Please fix it or use a different mailer.
Paul.
Quoted 8 lines · Paul Mackerras
I get:
=20
fatal: corrupt patch at line 12
* Patch failed.
=20
from git-applymbox when I try to apply it. It looks like your mailer turns lines that contain only whitespace into empty lines. Please fix it or use a different mailer.
-user_pref("mailnews.wraplength", 0);
+user_pref("mailnews.wraplength", 10000);Sorry about that, seems I made that change back in December. I'm wondering if you changed something on your side that now chokes on it, or did you just get feedup with fixing my patches by hand...
Anyway, here's a new patch with some additional fixes for slb.c. Please let me know if you have trouble with it.
-Geoff=20
Fix some warnings when udbg is enabled.
hash_utils_64.c:169: warning: implicit declaration of function =E2=80=98u= dbg_printf=E2=80=99
hash_utils_64.c:251: warning: format =E2=80=98%04x=E2=80=99 expects type = =E2=80=98unsigned int=E2=80=99
slb.c:191: warning: format =E2=80=98%04x=E2=80=99 expects type =E2=80=98u= nsigned int=E2=80=99
--- arch/powerpc/mm/hash_utils_64.c | 7 ++++--- arch/powerpc/mm/slb.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-)
Index: cell--common--4/arch/powerpc/mm/hash_utils_64.c =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
arch/powerpc/mm/hash_utils_64.c +1 -0
@@ -51,6 +51,7 @@#include <asm/cputable.h> #include <asm/abs_addr.h> #include <asm/sections.h> +#include <asm/udbg.h>
=20
#ifdef DEBUG
#define DBG(fmt...) udbg_printf(fmt)
@@ -247,7 +248,7 @@
else
def->tlbiel =3D 0;
=20
- DBG(" %d: shift=3D%02x, sllp=3D%04x, avpnm=3D%08x, "
+ DBG(" %d: shift=3D%02x, sllp=3D%04lx, avpnm=3D%08lx, "
"tlbiel=3D%d, penc=3D%d\n",
idx, shift, def->sllp, def->avpnm, def->tlbiel, def->penc);
@@ -773,7 +774,7 @@
{
unsigned long hash, index, shift, hidx, slot;
=20
- DBG_LOW("flush_hash_page(va=3D%016x)\n", va);
+ DBG_LOW("flush_hash_page(va=3D%016lx)\n", va);
pte_iterate_hashed_subpages(pte, psize, va, index, shift) {
hash =3D hpt_hash(va, shift);
hidx =3D __rpte_to_hidx(pte, index);
@@ -781,7 +782,7 @@
hash =3D ~hash;
slot =3D (hash & htab_hash_mask) * HPTES_PER_GROUP; slot +=3D hidx & _PTEIDX_GROUP_IX;
- DBG_LOW(" sub %d: hash=3D%x, hidx=3D%x\n", index, slot, hidx);
+ DBG_LOW(" sub %ld: hash=3D%lx, hidx=3D%lx\n", index, slot, hidx);
ppc_md.hpte_invalidate(slot, va, psize, local);
} pte_iterate_hashed_end();
}
Index: cell--common--4/arch/powerpc/mm/slb.c =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
arch/powerpc/mm/slb.c +1 -0
@@ -22,6 +22,7 @@#include <asm/paca.h> #include <asm/cputable.h> #include <asm/cacheflush.h> +#include <asm/udbg.h>
=20
#ifdef DEBUG
#define DBG(fmt...) udbg_printf(fmt)
@@ -187,12 +188,12 @@
patch_slb_encoding(slb_miss_kernel_load_io,
SLB_VSID_KERNEL | io_llp);
=20
- DBG("SLB: linear LLP =3D %04x\n", linear_llp);
- DBG("SLB: io LLP =3D %04x\n", io_llp);
+ DBG("SLB: linear LLP =3D %04lx\n", linear_llp);
+ DBG("SLB: io LLP =3D %04lx\n", io_llp); #ifdef CONFIG_HUGETLB_PAGE
patch_slb_encoding(slb_miss_user_load_huge,
SLB_VSID_USER | huge_llp);
- DBG("SLB: huge LLP =3D %04x\n", huge_llp);
+ DBG("SLB: huge LLP =3D %04lx\n", huge_llp);
#endif
}
=20
=20