diff options
Diffstat (limited to 'arch/blackfin/kernel/flat.c')
-rw-r--r-- | arch/blackfin/kernel/flat.c | 55 |
1 files changed, 26 insertions, 29 deletions
diff --git a/arch/blackfin/kernel/flat.c b/arch/blackfin/kernel/flat.c index a92587b628b5..d188b2430536 100644 --- a/arch/blackfin/kernel/flat.c +++ b/arch/blackfin/kernel/flat.c | |||
@@ -36,24 +36,22 @@ unsigned long bfin_get_addr_from_rp(unsigned long *ptr, | |||
36 | unsigned long val; | 36 | unsigned long val; |
37 | 37 | ||
38 | switch (type) { | 38 | switch (type) { |
39 | case FLAT_BFIN_RELOC_TYPE_16_BIT: | 39 | case FLAT_BFIN_RELOC_TYPE_16_BIT: |
40 | case FLAT_BFIN_RELOC_TYPE_16H_BIT: | 40 | case FLAT_BFIN_RELOC_TYPE_16H_BIT: |
41 | usptr = (unsigned short *)ptr; | 41 | usptr = (unsigned short *)ptr; |
42 | pr_debug("*usptr = %x", get_unaligned(usptr)); | 42 | pr_debug("*usptr = %x", get_unaligned(usptr)); |
43 | val = get_unaligned(usptr); | 43 | val = get_unaligned(usptr); |
44 | val += *persistent; | 44 | val += *persistent; |
45 | break; | 45 | break; |
46 | 46 | ||
47 | case FLAT_BFIN_RELOC_TYPE_32_BIT: | 47 | case FLAT_BFIN_RELOC_TYPE_32_BIT: |
48 | pr_debug("*ptr = %lx", get_unaligned(ptr)); | 48 | pr_debug("*ptr = %lx", get_unaligned(ptr)); |
49 | val = get_unaligned(ptr); | 49 | val = get_unaligned(ptr); |
50 | break; | 50 | break; |
51 | 51 | ||
52 | default: | 52 | default: |
53 | pr_debug("BINFMT_FLAT: Unknown relocation type %x\n", | 53 | pr_debug("BINFMT_FLAT: Unknown relocation type %x\n", type); |
54 | type); | 54 | return 0; |
55 | |||
56 | return 0; | ||
57 | } | 55 | } |
58 | 56 | ||
59 | /* | 57 | /* |
@@ -81,21 +79,20 @@ void bfin_put_addr_at_rp(unsigned long *ptr, unsigned long addr, | |||
81 | int type = (relval >> 26) & 7; | 79 | int type = (relval >> 26) & 7; |
82 | 80 | ||
83 | switch (type) { | 81 | switch (type) { |
84 | case FLAT_BFIN_RELOC_TYPE_16_BIT: | 82 | case FLAT_BFIN_RELOC_TYPE_16_BIT: |
85 | put_unaligned(addr, usptr); | 83 | put_unaligned(addr, usptr); |
86 | pr_debug("new value %x at %p", get_unaligned(usptr), | 84 | pr_debug("new value %x at %p", get_unaligned(usptr), usptr); |
87 | usptr); | 85 | break; |
88 | break; | ||
89 | 86 | ||
90 | case FLAT_BFIN_RELOC_TYPE_16H_BIT: | 87 | case FLAT_BFIN_RELOC_TYPE_16H_BIT: |
91 | put_unaligned(addr >> 16, usptr); | 88 | put_unaligned(addr >> 16, usptr); |
92 | pr_debug("new value %x", get_unaligned(usptr)); | 89 | pr_debug("new value %x", get_unaligned(usptr)); |
93 | break; | 90 | break; |
94 | 91 | ||
95 | case FLAT_BFIN_RELOC_TYPE_32_BIT: | 92 | case FLAT_BFIN_RELOC_TYPE_32_BIT: |
96 | put_unaligned(addr, ptr); | 93 | put_unaligned(addr, ptr); |
97 | pr_debug("new ptr =%lx", get_unaligned(ptr)); | 94 | pr_debug("new ptr =%lx", get_unaligned(ptr)); |
98 | break; | 95 | break; |
99 | } | 96 | } |
100 | } | 97 | } |
101 | EXPORT_SYMBOL(bfin_put_addr_at_rp); | 98 | EXPORT_SYMBOL(bfin_put_addr_at_rp); |