aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Biederman <ebiederm@xmission.com>2006-09-29 05:00:06 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 12:18:12 -0400
commit959ed340f4867fda7684340625f60e211c2296d6 (patch)
tree61832d7f0a5c8a4864003949b7eb545154d9acec
parent3b9b8ab65d8eed784b9164d03807cb2bda7b5cd6 (diff)
[PATCH] Fix conflict with the is_init identifier on parisc
This appears to be the only usage of is_init in the kernel besides the usage in sched.h. On ia64 the same function is called in_init. So to remove the conflict and make the kernel more consistent rename is_init is_core is_local and is_local_section to in_init in_core in_local and in_local_section respectively. Thanks to Adrian Bunk who spotted this, and to Matthew Wilcox who suggested this fix. Signed-off-by: Eric Biederman <ebiederm@xmission.com> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Matthew Wilcox <willy@debian.org> Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/parisc/kernel/module.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c
index aee311884f3f..f50b982b0834 100644
--- a/arch/parisc/kernel/module.c
+++ b/arch/parisc/kernel/module.c
@@ -27,7 +27,7 @@
27 * - SEGREL32 handling 27 * - SEGREL32 handling
28 * We are not doing SEGREL32 handling correctly. According to the ABI, we 28 * We are not doing SEGREL32 handling correctly. According to the ABI, we
29 * should do a value offset, like this: 29 * should do a value offset, like this:
30 * if (is_init(me, (void *)val)) 30 * if (in_init(me, (void *)val))
31 * val -= (uint32_t)me->module_init; 31 * val -= (uint32_t)me->module_init;
32 * else 32 * else
33 * val -= (uint32_t)me->module_core; 33 * val -= (uint32_t)me->module_core;
@@ -72,27 +72,27 @@
72 72
73/* three functions to determine where in the module core 73/* three functions to determine where in the module core
74 * or init pieces the location is */ 74 * or init pieces the location is */
75static inline int is_init(struct module *me, void *loc) 75static inline int in_init(struct module *me, void *loc)
76{ 76{
77 return (loc >= me->module_init && 77 return (loc >= me->module_init &&
78 loc <= (me->module_init + me->init_size)); 78 loc <= (me->module_init + me->init_size));
79} 79}
80 80
81static inline int is_core(struct module *me, void *loc) 81static inline int in_core(struct module *me, void *loc)
82{ 82{
83 return (loc >= me->module_core && 83 return (loc >= me->module_core &&
84 loc <= (me->module_core + me->core_size)); 84 loc <= (me->module_core + me->core_size));
85} 85}
86 86
87static inline int is_local(struct module *me, void *loc) 87static inline int in_local(struct module *me, void *loc)
88{ 88{
89 return is_init(me, loc) || is_core(me, loc); 89 return in_init(me, loc) || in_core(me, loc);
90} 90}
91 91
92static inline int is_local_section(struct module *me, void *loc, void *dot) 92static inline int in_local_section(struct module *me, void *loc, void *dot)
93{ 93{
94 return (is_init(me, loc) && is_init(me, dot)) || 94 return (in_init(me, loc) && in_init(me, dot)) ||
95 (is_core(me, loc) && is_core(me, dot)); 95 (in_core(me, loc) && in_core(me, dot));
96} 96}
97 97
98 98
@@ -566,14 +566,14 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
566 break; 566 break;
567 case R_PARISC_PCREL17F: 567 case R_PARISC_PCREL17F:
568 /* 17-bit PC relative address */ 568 /* 17-bit PC relative address */
569 val = get_stub(me, val, addend, ELF_STUB_GOT, is_init(me, loc)); 569 val = get_stub(me, val, addend, ELF_STUB_GOT, in_init(me, loc));
570 val = (val - dot - 8)/4; 570 val = (val - dot - 8)/4;
571 CHECK_RELOC(val, 17) 571 CHECK_RELOC(val, 17)
572 *loc = (*loc & ~0x1f1ffd) | reassemble_17(val); 572 *loc = (*loc & ~0x1f1ffd) | reassemble_17(val);
573 break; 573 break;
574 case R_PARISC_PCREL22F: 574 case R_PARISC_PCREL22F:
575 /* 22-bit PC relative address; only defined for pa20 */ 575 /* 22-bit PC relative address; only defined for pa20 */
576 val = get_stub(me, val, addend, ELF_STUB_GOT, is_init(me, loc)); 576 val = get_stub(me, val, addend, ELF_STUB_GOT, in_init(me, loc));
577 DEBUGP("STUB FOR %s loc %lx+%lx at %lx\n", 577 DEBUGP("STUB FOR %s loc %lx+%lx at %lx\n",
578 strtab + sym->st_name, (unsigned long)loc, addend, 578 strtab + sym->st_name, (unsigned long)loc, addend,
579 val) 579 val)
@@ -670,9 +670,9 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
670 strtab + sym->st_name, 670 strtab + sym->st_name,
671 loc, val); 671 loc, val);
672 /* can we reach it locally? */ 672 /* can we reach it locally? */
673 if(!is_local_section(me, (void *)val, (void *)dot)) { 673 if(!in_local_section(me, (void *)val, (void *)dot)) {
674 674
675 if (is_local(me, (void *)val)) 675 if (in_local(me, (void *)val))
676 /* this is the case where the 676 /* this is the case where the
677 * symbol is local to the 677 * symbol is local to the
678 * module, but in a different 678 * module, but in a different
@@ -680,14 +680,14 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
680 * in case it's more than 22 680 * in case it's more than 22
681 * bits away */ 681 * bits away */
682 val = get_stub(me, val, addend, ELF_STUB_DIRECT, 682 val = get_stub(me, val, addend, ELF_STUB_DIRECT,
683 is_init(me, loc)); 683 in_init(me, loc));
684 else if (strncmp(strtab + sym->st_name, "$$", 2) 684 else if (strncmp(strtab + sym->st_name, "$$", 2)
685 == 0) 685 == 0)
686 val = get_stub(me, val, addend, ELF_STUB_MILLI, 686 val = get_stub(me, val, addend, ELF_STUB_MILLI,
687 is_init(me, loc)); 687 in_init(me, loc));
688 else 688 else
689 val = get_stub(me, val, addend, ELF_STUB_GOT, 689 val = get_stub(me, val, addend, ELF_STUB_GOT,
690 is_init(me, loc)); 690 in_init(me, loc));
691 } 691 }
692 DEBUGP("STUB FOR %s loc %lx, val %lx+%lx at %lx\n", 692 DEBUGP("STUB FOR %s loc %lx, val %lx+%lx at %lx\n",
693 strtab + sym->st_name, loc, sym->st_value, 693 strtab + sym->st_name, loc, sym->st_value,
@@ -720,7 +720,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
720 break; 720 break;
721 case R_PARISC_FPTR64: 721 case R_PARISC_FPTR64:
722 /* 64-bit function address */ 722 /* 64-bit function address */
723 if(is_local(me, (void *)(val + addend))) { 723 if(in_local(me, (void *)(val + addend))) {
724 *loc64 = get_fdesc(me, val+addend); 724 *loc64 = get_fdesc(me, val+addend);
725 DEBUGP("FDESC for %s at %p points to %lx\n", 725 DEBUGP("FDESC for %s at %p points to %lx\n",
726 strtab + sym->st_name, *loc64, 726 strtab + sym->st_name, *loc64,