Commit a8a44921 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin:
  Blackfin: bitops: fix include order after little endian inclusion
  Blackfin: defconfigs: update after misc devices defaulted to N
  Blackfin: use more standard pr_fmt in the module loader
parents 85eb1513 92a19d66
...@@ -46,7 +46,6 @@ CONFIG_UNIX=y ...@@ -46,7 +46,6 @@ CONFIG_UNIX=y
# CONFIG_WIRELESS is not set # CONFIG_WIRELESS is not set
CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
# CONFIG_MISC_DEVICES is not set
# CONFIG_INPUT_MOUSEDEV is not set # CONFIG_INPUT_MOUSEDEV is not set
CONFIG_INPUT_EVDEV=y CONFIG_INPUT_EVDEV=y
# CONFIG_INPUT_KEYBOARD is not set # CONFIG_INPUT_KEYBOARD is not set
......
...@@ -70,7 +70,6 @@ CONFIG_MTD_ROM=m ...@@ -70,7 +70,6 @@ CONFIG_MTD_ROM=m
CONFIG_MTD_PHYSMAP=m CONFIG_MTD_PHYSMAP=m
CONFIG_MTD_NAND=m CONFIG_MTD_NAND=m
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
# CONFIG_MISC_DEVICES is not set
CONFIG_NETDEVICES=y CONFIG_NETDEVICES=y
CONFIG_PHYLIB=y CONFIG_PHYLIB=y
CONFIG_SMSC_PHY=y CONFIG_SMSC_PHY=y
......
...@@ -63,7 +63,6 @@ CONFIG_BLK_DEV_LOOP=y ...@@ -63,7 +63,6 @@ CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=2 CONFIG_BLK_DEV_RAM_COUNT=2
CONFIG_BLK_DEV_RAM_SIZE=16384 CONFIG_BLK_DEV_RAM_SIZE=16384
# CONFIG_MISC_DEVICES is not set
CONFIG_SCSI=y CONFIG_SCSI=y
# CONFIG_SCSI_PROC_FS is not set # CONFIG_SCSI_PROC_FS is not set
CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SD=y
......
...@@ -58,6 +58,7 @@ CONFIG_MTD_M25P80=y ...@@ -58,6 +58,7 @@ CONFIG_MTD_M25P80=y
CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=y CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_AT25=y CONFIG_EEPROM_AT25=y
CONFIG_NETDEVICES=y CONFIG_NETDEVICES=y
CONFIG_NET_ETHERNET=y CONFIG_NET_ETHERNET=y
......
...@@ -64,7 +64,6 @@ CONFIG_MTD_ROM=m ...@@ -64,7 +64,6 @@ CONFIG_MTD_ROM=m
CONFIG_MTD_COMPLEX_MAPPINGS=y CONFIG_MTD_COMPLEX_MAPPINGS=y
CONFIG_MTD_GPIO_ADDR=y CONFIG_MTD_GPIO_ADDR=y
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
# CONFIG_MISC_DEVICES is not set
CONFIG_SCSI=y CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SD=y
# CONFIG_SCSI_LOWLEVEL is not set # CONFIG_SCSI_LOWLEVEL is not set
......
...@@ -44,7 +44,6 @@ CONFIG_MTD_CFI=y ...@@ -44,7 +44,6 @@ CONFIG_MTD_CFI=y
CONFIG_MTD_CFI_INTELEXT=y CONFIG_MTD_CFI_INTELEXT=y
CONFIG_MTD_RAM=y CONFIG_MTD_RAM=y
CONFIG_MTD_PHYSMAP=y CONFIG_MTD_PHYSMAP=y
# CONFIG_MISC_DEVICES is not set
CONFIG_NETDEVICES=y CONFIG_NETDEVICES=y
# CONFIG_NETDEV_1000 is not set # CONFIG_NETDEV_1000 is not set
# CONFIG_NETDEV_10000 is not set # CONFIG_NETDEV_10000 is not set
......
...@@ -63,7 +63,6 @@ CONFIG_MTD_RAM=y ...@@ -63,7 +63,6 @@ CONFIG_MTD_RAM=y
CONFIG_MTD_COMPLEX_MAPPINGS=y CONFIG_MTD_COMPLEX_MAPPINGS=y
CONFIG_MTD_PHYSMAP=y CONFIG_MTD_PHYSMAP=y
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
# CONFIG_MISC_DEVICES is not set
CONFIG_SCSI=m CONFIG_SCSI=m
CONFIG_BLK_DEV_SD=m CONFIG_BLK_DEV_SD=m
# CONFIG_SCSI_LOWLEVEL is not set # CONFIG_SCSI_LOWLEVEL is not set
......
...@@ -55,7 +55,6 @@ CONFIG_MTD_NAND=y ...@@ -55,7 +55,6 @@ CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_PLATFORM=y CONFIG_MTD_NAND_PLATFORM=y
CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
# CONFIG_MISC_DEVICES is not set
CONFIG_NETDEVICES=y CONFIG_NETDEVICES=y
CONFIG_DAVICOM_PHY=y CONFIG_DAVICOM_PHY=y
CONFIG_NET_ETHERNET=y CONFIG_NET_ETHERNET=y
......
...@@ -45,6 +45,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y ...@@ -45,6 +45,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
CONFIG_MTD_M25P80=y CONFIG_MTD_M25P80=y
# CONFIG_M25PXX_USE_FAST_READ is not set # CONFIG_M25PXX_USE_FAST_READ is not set
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_AT25=y CONFIG_EEPROM_AT25=y
CONFIG_NETDEVICES=y CONFIG_NETDEVICES=y
CONFIG_NET_ETHERNET=y CONFIG_NET_ETHERNET=y
......
...@@ -48,6 +48,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y ...@@ -48,6 +48,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
CONFIG_MTD_UCLINUX=y CONFIG_MTD_UCLINUX=y
CONFIG_MTD_NAND=m CONFIG_MTD_NAND=m
CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM=y
CONFIG_MISC_DEVICES=y
CONFIG_EEPROM_AT25=m CONFIG_EEPROM_AT25=m
CONFIG_NETDEVICES=y CONFIG_NETDEVICES=y
# CONFIG_NETDEV_1000 is not set # CONFIG_NETDEV_1000 is not set
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include <asm-generic/bitops/const_hweight.h> #include <asm-generic/bitops/const_hweight.h>
#include <asm-generic/bitops/lock.h> #include <asm-generic/bitops/lock.h>
#include <asm-generic/bitops/le.h>
#include <asm-generic/bitops/ext2-atomic.h> #include <asm-generic/bitops/ext2-atomic.h>
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
...@@ -113,6 +112,9 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr) ...@@ -113,6 +112,9 @@ static inline int test_and_change_bit(int nr, volatile unsigned long *addr)
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
/* Needs to be after test_bit and friends */
#include <asm-generic/bitops/le.h>
/* /*
* hweightN: returns the hamming weight (i.e. the number * hweightN: returns the hamming weight (i.e. the number
* of bits set) of a N-bit word * of bits set) of a N-bit word
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* Licensed under the GPL-2 or later * Licensed under the GPL-2 or later
*/ */
#define pr_fmt(fmt) "module %s: " fmt #define pr_fmt(fmt) "module %s: " fmt, mod->name
#include <linux/moduleloader.h> #include <linux/moduleloader.h>
#include <linux/elf.h> #include <linux/elf.h>
...@@ -57,8 +57,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, ...@@ -57,8 +57,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
dest = l1_inst_sram_alloc(s->sh_size); dest = l1_inst_sram_alloc(s->sh_size);
mod->arch.text_l1 = dest; mod->arch.text_l1 = dest;
if (dest == NULL) { if (dest == NULL) {
pr_err("L1 inst memory allocation failed\n", pr_err("L1 inst memory allocation failed\n");
mod->name);
return -1; return -1;
} }
dma_memcpy(dest, (void *)s->sh_addr, s->sh_size); dma_memcpy(dest, (void *)s->sh_addr, s->sh_size);
...@@ -70,8 +69,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, ...@@ -70,8 +69,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
dest = l1_data_sram_alloc(s->sh_size); dest = l1_data_sram_alloc(s->sh_size);
mod->arch.data_a_l1 = dest; mod->arch.data_a_l1 = dest;
if (dest == NULL) { if (dest == NULL) {
pr_err("L1 data memory allocation failed\n", pr_err("L1 data memory allocation failed\n");
mod->name);
return -1; return -1;
} }
memcpy(dest, (void *)s->sh_addr, s->sh_size); memcpy(dest, (void *)s->sh_addr, s->sh_size);
...@@ -83,8 +81,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, ...@@ -83,8 +81,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
dest = l1_data_sram_zalloc(s->sh_size); dest = l1_data_sram_zalloc(s->sh_size);
mod->arch.bss_a_l1 = dest; mod->arch.bss_a_l1 = dest;
if (dest == NULL) { if (dest == NULL) {
pr_err("L1 data memory allocation failed\n", pr_err("L1 data memory allocation failed\n");
mod->name);
return -1; return -1;
} }
...@@ -93,8 +90,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, ...@@ -93,8 +90,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
dest = l1_data_B_sram_alloc(s->sh_size); dest = l1_data_B_sram_alloc(s->sh_size);
mod->arch.data_b_l1 = dest; mod->arch.data_b_l1 = dest;
if (dest == NULL) { if (dest == NULL) {
pr_err("L1 data memory allocation failed\n", pr_err("L1 data memory allocation failed\n");
mod->name);
return -1; return -1;
} }
memcpy(dest, (void *)s->sh_addr, s->sh_size); memcpy(dest, (void *)s->sh_addr, s->sh_size);
...@@ -104,8 +100,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, ...@@ -104,8 +100,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
dest = l1_data_B_sram_alloc(s->sh_size); dest = l1_data_B_sram_alloc(s->sh_size);
mod->arch.bss_b_l1 = dest; mod->arch.bss_b_l1 = dest;
if (dest == NULL) { if (dest == NULL) {
pr_err("L1 data memory allocation failed\n", pr_err("L1 data memory allocation failed\n");
mod->name);
return -1; return -1;
} }
memset(dest, 0, s->sh_size); memset(dest, 0, s->sh_size);
...@@ -117,8 +112,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, ...@@ -117,8 +112,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
dest = l2_sram_alloc(s->sh_size); dest = l2_sram_alloc(s->sh_size);
mod->arch.text_l2 = dest; mod->arch.text_l2 = dest;
if (dest == NULL) { if (dest == NULL) {
pr_err("L2 SRAM allocation failed\n", pr_err("L2 SRAM allocation failed\n");
mod->name);
return -1; return -1;
} }
memcpy(dest, (void *)s->sh_addr, s->sh_size); memcpy(dest, (void *)s->sh_addr, s->sh_size);
...@@ -130,8 +124,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, ...@@ -130,8 +124,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
dest = l2_sram_alloc(s->sh_size); dest = l2_sram_alloc(s->sh_size);
mod->arch.data_l2 = dest; mod->arch.data_l2 = dest;
if (dest == NULL) { if (dest == NULL) {
pr_err("L2 SRAM allocation failed\n", pr_err("L2 SRAM allocation failed\n");
mod->name);
return -1; return -1;
} }
memcpy(dest, (void *)s->sh_addr, s->sh_size); memcpy(dest, (void *)s->sh_addr, s->sh_size);
...@@ -143,8 +136,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, ...@@ -143,8 +136,7 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
dest = l2_sram_zalloc(s->sh_size); dest = l2_sram_zalloc(s->sh_size);
mod->arch.bss_l2 = dest; mod->arch.bss_l2 = dest;
if (dest == NULL) { if (dest == NULL) {
pr_err("L2 SRAM allocation failed\n", pr_err("L2 SRAM allocation failed\n");
mod->name);
return -1; return -1;
} }
...@@ -160,9 +152,9 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, ...@@ -160,9 +152,9 @@ module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
int int
apply_relocate(Elf_Shdr * sechdrs, const char *strtab, apply_relocate(Elf_Shdr * sechdrs, const char *strtab,
unsigned int symindex, unsigned int relsec, struct module *me) unsigned int symindex, unsigned int relsec, struct module *mod)
{ {
pr_err(".rel unsupported\n", me->name); pr_err(".rel unsupported\n");
return -ENOEXEC; return -ENOEXEC;
} }
...@@ -186,7 +178,7 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, ...@@ -186,7 +178,7 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
Elf32_Sym *sym; Elf32_Sym *sym;
unsigned long location, value, size; unsigned long location, value, size;
pr_debug("applying relocate section %u to %u\n", mod->name, pr_debug("applying relocate section %u to %u\n",
relsec, sechdrs[relsec].sh_info); relsec, sechdrs[relsec].sh_info);
for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) { for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rel); i++) {
...@@ -203,14 +195,14 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, ...@@ -203,14 +195,14 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (location >= COREB_L1_DATA_A_START) { if (location >= COREB_L1_DATA_A_START) {
pr_err("cannot relocate in L1: %u (SMP kernel)", pr_err("cannot relocate in L1: %u (SMP kernel)\n",
mod->name, ELF32_R_TYPE(rel[i].r_info)); ELF32_R_TYPE(rel[i].r_info));
return -ENOEXEC; return -ENOEXEC;
} }
#endif #endif
pr_debug("location is %lx, value is %lx type is %d\n", pr_debug("location is %lx, value is %lx type is %d\n",
mod->name, location, value, ELF32_R_TYPE(rel[i].r_info)); location, value, ELF32_R_TYPE(rel[i].r_info));
switch (ELF32_R_TYPE(rel[i].r_info)) { switch (ELF32_R_TYPE(rel[i].r_info)) {
...@@ -230,11 +222,11 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, ...@@ -230,11 +222,11 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
case R_BFIN_PCREL12_JUMP_S: case R_BFIN_PCREL12_JUMP_S:
case R_BFIN_PCREL10: case R_BFIN_PCREL10:
pr_err("unsupported relocation: %u (no -mlong-calls?)\n", pr_err("unsupported relocation: %u (no -mlong-calls?)\n",
mod->name, ELF32_R_TYPE(rel[i].r_info)); ELF32_R_TYPE(rel[i].r_info));
return -ENOEXEC; return -ENOEXEC;
default: default:
pr_err("unknown relocation: %u\n", mod->name, pr_err("unknown relocation: %u\n",
ELF32_R_TYPE(rel[i].r_info)); ELF32_R_TYPE(rel[i].r_info));
return -ENOEXEC; return -ENOEXEC;
} }
...@@ -251,8 +243,7 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, ...@@ -251,8 +243,7 @@ apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
isram_memcpy((void *)location, &value, size); isram_memcpy((void *)location, &value, size);
break; break;
default: default:
pr_err("invalid relocation for %#lx\n", pr_err("invalid relocation for %#lx\n", location);
mod->name, location);
return -ENOEXEC; return -ENOEXEC;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment