diff options
Diffstat (limited to 'arch')
150 files changed, 3294 insertions, 642 deletions
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index 4d25e49a14f7..9bd1870d980e 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c | |||
@@ -26,9 +26,9 @@ | |||
26 | #include <linux/fs.h> | 26 | #include <linux/fs.h> |
27 | #include <linux/file.h> | 27 | #include <linux/file.h> |
28 | #include <linux/utsname.h> | 28 | #include <linux/utsname.h> |
29 | #include <linux/ipc.h> | ||
29 | 30 | ||
30 | #include <asm/uaccess.h> | 31 | #include <asm/uaccess.h> |
31 | #include <asm/ipc.h> | ||
32 | 32 | ||
33 | extern unsigned long do_mremap(unsigned long addr, unsigned long old_len, | 33 | extern unsigned long do_mremap(unsigned long addr, unsigned long old_len, |
34 | unsigned long new_len, unsigned long flags, | 34 | unsigned long new_len, unsigned long flags, |
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index 8e2f9bc3368b..e8b98046895b 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c | |||
@@ -80,7 +80,7 @@ | |||
80 | #include <linux/sem.h> | 80 | #include <linux/sem.h> |
81 | #include <linux/socket.h> | 81 | #include <linux/socket.h> |
82 | #include <linux/net.h> | 82 | #include <linux/net.h> |
83 | #include <asm/ipc.h> | 83 | #include <linux/ipc.h> |
84 | #include <asm/uaccess.h> | 84 | #include <asm/uaccess.h> |
85 | 85 | ||
86 | struct oldabi_stat64 { | 86 | struct oldabi_stat64 { |
diff --git a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c index ef6ccc8993e9..c261472208cb 100644 --- a/arch/arm/mach-footbridge/cats-hw.c +++ b/arch/arm/mach-footbridge/cats-hw.c | |||
@@ -78,9 +78,9 @@ static void __init | |||
78 | fixup_cats(struct machine_desc *desc, struct tag *tags, | 78 | fixup_cats(struct machine_desc *desc, struct tag *tags, |
79 | char **cmdline, struct meminfo *mi) | 79 | char **cmdline, struct meminfo *mi) |
80 | { | 80 | { |
81 | ORIG_VIDEO_LINES = 25; | 81 | screen_info.orig_video_lines = 25; |
82 | ORIG_VIDEO_POINTS = 16; | 82 | screen_info.orig_video_points = 16; |
83 | ORIG_Y = 24; | 83 | screen_info.orig_y = 24; |
84 | } | 84 | } |
85 | 85 | ||
86 | MACHINE_START(CATS, "Chalice-CATS") | 86 | MACHINE_START(CATS, "Chalice-CATS") |
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 992ca435a922..29696e46ed65 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -1272,7 +1272,7 @@ struct sysdev_class dma_sysclass = { | |||
1272 | 1272 | ||
1273 | /* kmem cache implementation */ | 1273 | /* kmem cache implementation */ |
1274 | 1274 | ||
1275 | static void s3c2410_dma_cache_ctor(void *p, struct kmem_cache *c, unsigned long f) | 1275 | static void s3c2410_dma_cache_ctor(struct kmem_cache *c, void *p) |
1276 | { | 1276 | { |
1277 | memset(p, 0, sizeof(struct s3c2410_dma_buf)); | 1277 | memset(p, 0, sizeof(struct s3c2410_dma_buf)); |
1278 | } | 1278 | } |
diff --git a/arch/avr32/mm/dma-coherent.c b/arch/avr32/mm/dma-coherent.c index 099212d4567c..177fea8f7b71 100644 --- a/arch/avr32/mm/dma-coherent.c +++ b/arch/avr32/mm/dma-coherent.c | |||
@@ -21,13 +21,13 @@ void dma_cache_sync(struct device *dev, void *vaddr, size_t size, int direction) | |||
21 | 21 | ||
22 | switch (direction) { | 22 | switch (direction) { |
23 | case DMA_FROM_DEVICE: /* invalidate only */ | 23 | case DMA_FROM_DEVICE: /* invalidate only */ |
24 | dma_cache_inv(vaddr, size); | 24 | invalidate_dcache_region(vaddr, size); |
25 | break; | 25 | break; |
26 | case DMA_TO_DEVICE: /* writeback only */ | 26 | case DMA_TO_DEVICE: /* writeback only */ |
27 | dma_cache_wback(vaddr, size); | 27 | clean_dcache_region(vaddr, size); |
28 | break; | 28 | break; |
29 | case DMA_BIDIRECTIONAL: /* writeback and invalidate */ | 29 | case DMA_BIDIRECTIONAL: /* writeback and invalidate */ |
30 | dma_cache_wback_inv(vaddr, size); | 30 | flush_dcache_region(vaddr, size); |
31 | break; | 31 | break; |
32 | default: | 32 | default: |
33 | BUG(); | 33 | BUG(); |
diff --git a/arch/cris/kernel/sys_cris.c b/arch/cris/kernel/sys_cris.c index 0aa0e0ebb3a9..514359b8122e 100644 --- a/arch/cris/kernel/sys_cris.c +++ b/arch/cris/kernel/sys_cris.c | |||
@@ -21,9 +21,9 @@ | |||
21 | #include <linux/stat.h> | 21 | #include <linux/stat.h> |
22 | #include <linux/mman.h> | 22 | #include <linux/mman.h> |
23 | #include <linux/file.h> | 23 | #include <linux/file.h> |
24 | #include <linux/ipc.h> | ||
24 | 25 | ||
25 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
26 | #include <asm/ipc.h> | ||
27 | #include <asm/segment.h> | 27 | #include <asm/segment.h> |
28 | 28 | ||
29 | /* | 29 | /* |
diff --git a/arch/frv/kernel/sys_frv.c b/arch/frv/kernel/sys_frv.c index 6fbe2665c577..04c6b1677ccf 100644 --- a/arch/frv/kernel/sys_frv.c +++ b/arch/frv/kernel/sys_frv.c | |||
@@ -23,10 +23,10 @@ | |||
23 | #include <linux/file.h> | 23 | #include <linux/file.h> |
24 | #include <linux/utsname.h> | 24 | #include <linux/utsname.h> |
25 | #include <linux/syscalls.h> | 25 | #include <linux/syscalls.h> |
26 | #include <linux/ipc.h> | ||
26 | 27 | ||
27 | #include <asm/setup.h> | 28 | #include <asm/setup.h> |
28 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
29 | #include <asm/ipc.h> | ||
30 | 30 | ||
31 | /* | 31 | /* |
32 | * sys_pipe() is the normal C calling standard for creating | 32 | * sys_pipe() is the normal C calling standard for creating |
diff --git a/arch/h8300/kernel/sys_h8300.c b/arch/h8300/kernel/sys_h8300.c index ddc62727dc9f..00608be6d567 100644 --- a/arch/h8300/kernel/sys_h8300.c +++ b/arch/h8300/kernel/sys_h8300.c | |||
@@ -19,12 +19,12 @@ | |||
19 | #include <linux/file.h> | 19 | #include <linux/file.h> |
20 | #include <linux/utsname.h> | 20 | #include <linux/utsname.h> |
21 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
22 | #include <linux/ipc.h> | ||
22 | 23 | ||
23 | #include <asm/setup.h> | 24 | #include <asm/setup.h> |
24 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
25 | #include <asm/cachectl.h> | 26 | #include <asm/cachectl.h> |
26 | #include <asm/traps.h> | 27 | #include <asm/traps.h> |
27 | #include <asm/ipc.h> | ||
28 | #include <asm/unistd.h> | 28 | #include <asm/unistd.h> |
29 | 29 | ||
30 | /* | 30 | /* |
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index bf9aafad4978..7a95c58947e4 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -831,12 +831,13 @@ config CRASH_DUMP | |||
831 | depends on HIGHMEM | 831 | depends on HIGHMEM |
832 | help | 832 | help |
833 | Generate crash dump after being started by kexec. | 833 | Generate crash dump after being started by kexec. |
834 | This should be normally only set in special crash dump kernels | 834 | This should be normally only set in special crash dump kernels |
835 | which are loaded in the main kernel with kexec-tools into | 835 | which are loaded in the main kernel with kexec-tools into |
836 | a specially reserved region and then later executed after | 836 | a specially reserved region and then later executed after |
837 | a crash by kdump/kexec. The crash dump kernel must be compiled | 837 | a crash by kdump/kexec. The crash dump kernel must be compiled |
838 | to a memory address not used by the main kernel or BIOS using | 838 | to a memory address not used by the main kernel or BIOS using |
839 | PHYSICAL_START. | 839 | PHYSICAL_START, or it must be built as a relocatable image |
840 | (CONFIG_RELOCATABLE=y). | ||
840 | For more details see Documentation/kdump/kdump.txt | 841 | For more details see Documentation/kdump/kdump.txt |
841 | 842 | ||
842 | config PHYSICAL_START | 843 | config PHYSICAL_START |
@@ -882,17 +883,17 @@ config PHYSICAL_START | |||
882 | Don't change this unless you know what you are doing. | 883 | Don't change this unless you know what you are doing. |
883 | 884 | ||
884 | config RELOCATABLE | 885 | config RELOCATABLE |
885 | bool "Build a relocatable kernel(EXPERIMENTAL)" | 886 | bool "Build a relocatable kernel (EXPERIMENTAL)" |
886 | depends on EXPERIMENTAL | 887 | depends on EXPERIMENTAL |
887 | help | 888 | help |
888 | This builds a kernel image that retains relocation information | 889 | This builds a kernel image that retains relocation information |
889 | so it can be loaded someplace besides the default 1MB. | 890 | so it can be loaded someplace besides the default 1MB. |
890 | The relocations tend to make the kernel binary about 10% larger, | 891 | The relocations tend to make the kernel binary about 10% larger, |
891 | but are discarded at runtime. | 892 | but are discarded at runtime. |
892 | 893 | ||
893 | One use is for the kexec on panic case where the recovery kernel | 894 | One use is for the kexec on panic case where the recovery kernel |
894 | must live at a different physical address than the primary | 895 | must live at a different physical address than the primary |
895 | kernel. | 896 | kernel. |
896 | 897 | ||
897 | config PHYSICAL_ALIGN | 898 | config PHYSICAL_ALIGN |
898 | hex "Alignment value to which kernel should be aligned" | 899 | hex "Alignment value to which kernel should be aligned" |
@@ -1256,7 +1257,6 @@ source "fs/Kconfig" | |||
1256 | 1257 | ||
1257 | menuconfig INSTRUMENTATION | 1258 | menuconfig INSTRUMENTATION |
1258 | bool "Instrumentation Support" | 1259 | bool "Instrumentation Support" |
1259 | depends on EXPERIMENTAL | ||
1260 | default y | 1260 | default y |
1261 | ---help--- | 1261 | ---help--- |
1262 | Say Y here to get to see options related to performance measurement, | 1262 | Say Y here to get to see options related to performance measurement, |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 59b91ac861ac..c60532d93c54 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -593,7 +593,6 @@ config IRQ_PER_CPU | |||
593 | source "arch/ia64/hp/sim/Kconfig" | 593 | source "arch/ia64/hp/sim/Kconfig" |
594 | 594 | ||
595 | menu "Instrumentation Support" | 595 | menu "Instrumentation Support" |
596 | depends on EXPERIMENTAL | ||
597 | 596 | ||
598 | source "arch/ia64/oprofile/Kconfig" | 597 | source "arch/ia64/oprofile/Kconfig" |
599 | 598 | ||
diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c index 1cfab326fb7e..f6ae3ec93810 100644 --- a/arch/ia64/ia32/binfmt_elf32.c +++ b/arch/ia64/ia32/binfmt_elf32.c | |||
@@ -240,7 +240,7 @@ static int __init check_elf32_binfmt(void) | |||
240 | { | 240 | { |
241 | if (cpu_uses_ia32el()) { | 241 | if (cpu_uses_ia32el()) { |
242 | printk("Please use IA-32 EL for executing IA-32 binaries\n"); | 242 | printk("Please use IA-32 EL for executing IA-32 binaries\n"); |
243 | return unregister_binfmt(&elf_format); | 243 | unregister_binfmt(&elf_format); |
244 | } | 244 | } |
245 | return 0; | 245 | return 0; |
246 | } | 246 | } |
diff --git a/arch/ia64/ia32/elfcore32.h b/arch/ia64/ia32/elfcore32.h index a47f63b204fb..446c9aac924d 100644 --- a/arch/ia64/ia32/elfcore32.h +++ b/arch/ia64/ia32/elfcore32.h | |||
@@ -117,6 +117,7 @@ elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpr | |||
117 | } | 117 | } |
118 | 118 | ||
119 | #define ELF_CORE_COPY_XFPREGS 1 | 119 | #define ELF_CORE_COPY_XFPREGS 1 |
120 | #define ELF_CORE_XFPREG_TYPE NT_PRXFPREG | ||
120 | static inline int | 121 | static inline int |
121 | elf_core_copy_task_xfpregs(struct task_struct *tsk, elf_fpxregset_t *xfpu) | 122 | elf_core_copy_task_xfpregs(struct task_struct *tsk, elf_fpxregset_t *xfpu) |
122 | { | 123 | { |
diff --git a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c index 58e943a5d95c..0dd3b2394cdd 100644 --- a/arch/ia64/kernel/machine_kexec.c +++ b/arch/ia64/kernel/machine_kexec.c | |||
@@ -15,10 +15,13 @@ | |||
15 | #include <linux/cpu.h> | 15 | #include <linux/cpu.h> |
16 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
17 | #include <linux/efi.h> | 17 | #include <linux/efi.h> |
18 | #include <linux/numa.h> | ||
19 | #include <linux/mmzone.h> | ||
18 | #include <asm/mmu_context.h> | 20 | #include <asm/mmu_context.h> |
19 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
20 | #include <asm/delay.h> | 22 | #include <asm/delay.h> |
21 | #include <asm/meminit.h> | 23 | #include <asm/meminit.h> |
24 | #include <asm/processor.h> | ||
22 | 25 | ||
23 | typedef NORET_TYPE void (*relocate_new_kernel_t)( | 26 | typedef NORET_TYPE void (*relocate_new_kernel_t)( |
24 | unsigned long indirection_page, | 27 | unsigned long indirection_page, |
@@ -121,3 +124,28 @@ void machine_kexec(struct kimage *image) | |||
121 | unw_init_running(ia64_machine_kexec, image); | 124 | unw_init_running(ia64_machine_kexec, image); |
122 | for(;;); | 125 | for(;;); |
123 | } | 126 | } |
127 | |||
128 | void arch_crash_save_vmcoreinfo(void) | ||
129 | { | ||
130 | #ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE | ||
131 | VMCOREINFO_SYMBOL(pgdat_list); | ||
132 | VMCOREINFO_LENGTH(pgdat_list, MAX_NUMNODES); | ||
133 | |||
134 | VMCOREINFO_SYMBOL(node_memblk); | ||
135 | VMCOREINFO_LENGTH(node_memblk, NR_NODE_MEMBLKS); | ||
136 | VMCOREINFO_SIZE(node_memblk_s); | ||
137 | VMCOREINFO_OFFSET(node_memblk_s, start_paddr); | ||
138 | VMCOREINFO_OFFSET(node_memblk_s, size); | ||
139 | #endif | ||
140 | #ifdef CONFIG_PGTABLE_3 | ||
141 | VMCOREINFO_CONFIG(PGTABLE_3); | ||
142 | #elif CONFIG_PGTABLE_4 | ||
143 | VMCOREINFO_CONFIG(PGTABLE_4); | ||
144 | #endif | ||
145 | } | ||
146 | |||
147 | unsigned long paddr_vmcoreinfo_note(void) | ||
148 | { | ||
149 | return ia64_tpa((unsigned long)(char *)&vmcoreinfo_note); | ||
150 | } | ||
151 | |||
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c index 5628067a74d2..0b567398f38e 100644 --- a/arch/ia64/mm/discontig.c +++ b/arch/ia64/mm/discontig.c | |||
@@ -48,7 +48,7 @@ struct early_node_data { | |||
48 | static struct early_node_data mem_data[MAX_NUMNODES] __initdata; | 48 | static struct early_node_data mem_data[MAX_NUMNODES] __initdata; |
49 | static nodemask_t memory_less_mask __initdata; | 49 | static nodemask_t memory_less_mask __initdata; |
50 | 50 | ||
51 | static pg_data_t *pgdat_list[MAX_NUMNODES]; | 51 | pg_data_t *pgdat_list[MAX_NUMNODES]; |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * To prevent cache aliasing effects, align per-node structures so that they | 54 | * To prevent cache aliasing effects, align per-node structures so that they |
diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c index b13dbbeaeafa..0fc2efec18f6 100644 --- a/arch/m32r/kernel/sys_m32r.c +++ b/arch/m32r/kernel/sys_m32r.c | |||
@@ -20,11 +20,11 @@ | |||
20 | #include <linux/mman.h> | 20 | #include <linux/mman.h> |
21 | #include <linux/file.h> | 21 | #include <linux/file.h> |
22 | #include <linux/utsname.h> | 22 | #include <linux/utsname.h> |
23 | #include <linux/ipc.h> | ||
23 | 24 | ||
24 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
25 | #include <asm/cachectl.h> | 26 | #include <asm/cachectl.h> |
26 | #include <asm/cacheflush.h> | 27 | #include <asm/cacheflush.h> |
27 | #include <asm/ipc.h> | ||
28 | #include <asm/syscall.h> | 28 | #include <asm/syscall.h> |
29 | #include <asm/unistd.h> | 29 | #include <asm/unistd.h> |
30 | 30 | ||
diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c index 36d78cf1a7bc..e892f17ba3fa 100644 --- a/arch/m68k/kernel/sys_m68k.c +++ b/arch/m68k/kernel/sys_m68k.c | |||
@@ -21,12 +21,12 @@ | |||
21 | #include <linux/mman.h> | 21 | #include <linux/mman.h> |
22 | #include <linux/file.h> | 22 | #include <linux/file.h> |
23 | #include <linux/utsname.h> | 23 | #include <linux/utsname.h> |
24 | #include <linux/ipc.h> | ||
24 | 25 | ||
25 | #include <asm/setup.h> | 26 | #include <asm/setup.h> |
26 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
27 | #include <asm/cachectl.h> | 28 | #include <asm/cachectl.h> |
28 | #include <asm/traps.h> | 29 | #include <asm/traps.h> |
29 | #include <asm/ipc.h> | ||
30 | #include <asm/page.h> | 30 | #include <asm/page.h> |
31 | #include <asm/unistd.h> | 31 | #include <asm/unistd.h> |
32 | 32 | ||
diff --git a/arch/m68knommu/kernel/sys_m68k.c b/arch/m68knommu/kernel/sys_m68k.c index 15d62c5279a9..65f7a95f056e 100644 --- a/arch/m68knommu/kernel/sys_m68k.c +++ b/arch/m68knommu/kernel/sys_m68k.c | |||
@@ -18,13 +18,13 @@ | |||
18 | #include <linux/mman.h> | 18 | #include <linux/mman.h> |
19 | #include <linux/file.h> | 19 | #include <linux/file.h> |
20 | #include <linux/utsname.h> | 20 | #include <linux/utsname.h> |
21 | #include <linux/ipc.h> | ||
21 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
22 | 23 | ||
23 | #include <asm/setup.h> | 24 | #include <asm/setup.h> |
24 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
25 | #include <asm/cachectl.h> | 26 | #include <asm/cachectl.h> |
26 | #include <asm/traps.h> | 27 | #include <asm/traps.h> |
27 | #include <asm/ipc.h> | ||
28 | #include <asm/cacheflush.h> | 28 | #include <asm/cacheflush.h> |
29 | #include <asm/unistd.h> | 29 | #include <asm/unistd.h> |
30 | 30 | ||
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 6b663bec4752..14164c2b8791 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -279,7 +279,6 @@ core-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/ | |||
279 | cflags-$(CONFIG_MACH_DECSTATION)+= -Iinclude/asm-mips/mach-dec | 279 | cflags-$(CONFIG_MACH_DECSTATION)+= -Iinclude/asm-mips/mach-dec |
280 | libs-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/prom/ | 280 | libs-$(CONFIG_MACH_DECSTATION) += arch/mips/dec/prom/ |
281 | load-$(CONFIG_MACH_DECSTATION) += 0xffffffff80040000 | 281 | load-$(CONFIG_MACH_DECSTATION) += 0xffffffff80040000 |
282 | CLEAN_FILES += drivers/tc/lk201-map.c | ||
283 | 282 | ||
284 | # | 283 | # |
285 | # Wind River PPMC Board (4KC + GT64120) | 284 | # Wind River PPMC Board (4KC + GT64120) |
diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c index 8ef5cf4cc423..b997af713eb3 100644 --- a/arch/mips/kernel/irixelf.c +++ b/arch/mips/kernel/irixelf.c | |||
@@ -44,11 +44,14 @@ | |||
44 | static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs); | 44 | static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs); |
45 | static int load_irix_library(struct file *); | 45 | static int load_irix_library(struct file *); |
46 | static int irix_core_dump(long signr, struct pt_regs * regs, | 46 | static int irix_core_dump(long signr, struct pt_regs * regs, |
47 | struct file *file); | 47 | struct file *file, unsigned long limit); |
48 | 48 | ||
49 | static struct linux_binfmt irix_format = { | 49 | static struct linux_binfmt irix_format = { |
50 | NULL, THIS_MODULE, load_irix_binary, load_irix_library, | 50 | .module = THIS_MODULE, |
51 | irix_core_dump, PAGE_SIZE | 51 | .load_binary = load_irix_binary, |
52 | .load_shlib = load_irix_library, | ||
53 | .core_dump = irix_core_dump, | ||
54 | .min_coredump = PAGE_SIZE, | ||
52 | }; | 55 | }; |
53 | 56 | ||
54 | /* Debugging routines. */ | 57 | /* Debugging routines. */ |
@@ -1088,7 +1091,7 @@ end_coredump: | |||
1088 | * and then they are actually written out. If we run out of core limit | 1091 | * and then they are actually written out. If we run out of core limit |
1089 | * we just truncate. | 1092 | * we just truncate. |
1090 | */ | 1093 | */ |
1091 | static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file) | 1094 | static int irix_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit) |
1092 | { | 1095 | { |
1093 | int has_dumped = 0; | 1096 | int has_dumped = 0; |
1094 | mm_segment_t fs; | 1097 | mm_segment_t fs; |
@@ -1098,7 +1101,6 @@ static int irix_core_dump(long signr, struct pt_regs * regs, struct file *file) | |||
1098 | struct vm_area_struct *vma; | 1101 | struct vm_area_struct *vma; |
1099 | struct elfhdr elf; | 1102 | struct elfhdr elf; |
1100 | off_t offset = 0, dataoff; | 1103 | off_t offset = 0, dataoff; |
1101 | int limit = current->signal->rlim[RLIMIT_CORE].rlim_cur; | ||
1102 | int numnote = 3; | 1104 | int numnote = 3; |
1103 | struct memelfnote notes[3]; | 1105 | struct memelfnote notes[3]; |
1104 | struct elf_prstatus prstatus; /* NT_PRSTATUS */ | 1106 | struct elf_prstatus prstatus; /* NT_PRSTATUS */ |
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index d6e01215fb2b..2b8ec1102e86 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -35,12 +35,12 @@ | |||
35 | #include <linux/security.h> | 35 | #include <linux/security.h> |
36 | #include <linux/compat.h> | 36 | #include <linux/compat.h> |
37 | #include <linux/vfs.h> | 37 | #include <linux/vfs.h> |
38 | #include <linux/ipc.h> | ||
38 | 39 | ||
39 | #include <net/sock.h> | 40 | #include <net/sock.h> |
40 | #include <net/scm.h> | 41 | #include <net/scm.h> |
41 | 42 | ||
42 | #include <asm/compat-signal.h> | 43 | #include <asm/compat-signal.h> |
43 | #include <asm/ipc.h> | ||
44 | #include <asm/sim.h> | 44 | #include <asm/sim.h> |
45 | #include <asm/uaccess.h> | 45 | #include <asm/uaccess.h> |
46 | #include <asm/mmu_context.h> | 46 | #include <asm/mmu_context.h> |
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index 17c4374d2209..b95fe93dd646 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c | |||
@@ -28,11 +28,11 @@ | |||
28 | #include <linux/shm.h> | 28 | #include <linux/shm.h> |
29 | #include <linux/compiler.h> | 29 | #include <linux/compiler.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/ipc.h> | ||
31 | 32 | ||
32 | #include <asm/branch.h> | 33 | #include <asm/branch.h> |
33 | #include <asm/cachectl.h> | 34 | #include <asm/cachectl.h> |
34 | #include <asm/cacheflush.h> | 35 | #include <asm/cacheflush.h> |
35 | #include <asm/ipc.h> | ||
36 | #include <asm/asm-offsets.h> | 36 | #include <asm/asm-offsets.h> |
37 | #include <asm/signal.h> | 37 | #include <asm/signal.h> |
38 | #include <asm/sim.h> | 38 | #include <asm/sim.h> |
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index 43dde874f414..81f30ac2bff9 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c | |||
@@ -47,8 +47,6 @@ void (*_dma_cache_wback)(unsigned long start, unsigned long size); | |||
47 | void (*_dma_cache_inv)(unsigned long start, unsigned long size); | 47 | void (*_dma_cache_inv)(unsigned long start, unsigned long size); |
48 | 48 | ||
49 | EXPORT_SYMBOL(_dma_cache_wback_inv); | 49 | EXPORT_SYMBOL(_dma_cache_wback_inv); |
50 | EXPORT_SYMBOL(_dma_cache_wback); | ||
51 | EXPORT_SYMBOL(_dma_cache_inv); | ||
52 | 50 | ||
53 | #endif /* CONFIG_DMA_NONCOHERENT */ | 51 | #endif /* CONFIG_DMA_NONCOHERENT */ |
54 | 52 | ||
diff --git a/arch/mips/pci/ops-pmcmsp.c b/arch/mips/pci/ops-pmcmsp.c index 09fa007c1d1b..059eade96f2e 100644 --- a/arch/mips/pci/ops-pmcmsp.c +++ b/arch/mips/pci/ops-pmcmsp.c | |||
@@ -206,7 +206,7 @@ static void pci_proc_init(void) | |||
206 | } | 206 | } |
207 | #endif /* CONFIG_PROC_FS && PCI_COUNTERS */ | 207 | #endif /* CONFIG_PROC_FS && PCI_COUNTERS */ |
208 | 208 | ||
209 | spinlock_t bpci_lock = SPIN_LOCK_UNLOCKED; | 209 | DEFINE_SPINLOCK(bpci_lock); |
210 | 210 | ||
211 | /***************************************************************************** | 211 | /***************************************************************************** |
212 | * | 212 | * |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 5e001ad588a7..3763f681ce4c 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -670,7 +670,6 @@ source "arch/powerpc/sysdev/qe_lib/Kconfig" | |||
670 | source "lib/Kconfig" | 670 | source "lib/Kconfig" |
671 | 671 | ||
672 | menu "Instrumentation Support" | 672 | menu "Instrumentation Support" |
673 | depends on EXPERIMENTAL | ||
674 | 673 | ||
675 | source "arch/powerpc/oprofile/Kconfig" | 674 | source "arch/powerpc/oprofile/Kconfig" |
676 | 675 | ||
@@ -699,3 +698,7 @@ source "crypto/Kconfig" | |||
699 | config PPC_CLOCK | 698 | config PPC_CLOCK |
700 | bool | 699 | bool |
701 | default n | 700 | default n |
701 | |||
702 | config PPC_LIB_RHEAP | ||
703 | bool | ||
704 | |||
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts index a6bb1d0558ef..6582c9a39b27 100644 --- a/arch/powerpc/boot/dts/lite5200b.dts +++ b/arch/powerpc/boot/dts/lite5200b.dts | |||
@@ -277,10 +277,26 @@ | |||
277 | ethernet@3000 { | 277 | ethernet@3000 { |
278 | device_type = "network"; | 278 | device_type = "network"; |
279 | compatible = "mpc5200b-fec","mpc5200-fec"; | 279 | compatible = "mpc5200b-fec","mpc5200-fec"; |
280 | reg = <3000 800>; | 280 | reg = <3000 400>; |
281 | mac-address = [ 02 03 04 05 06 07 ]; // Bad! | 281 | mac-address = [ 02 03 04 05 06 07 ]; // Bad! |
282 | interrupts = <2 5 0>; | 282 | interrupts = <2 5 0>; |
283 | interrupt-parent = <&mpc5200_pic>; | 283 | interrupt-parent = <&mpc5200_pic>; |
284 | phy-handle = <&phy0>; | ||
285 | }; | ||
286 | |||
287 | mdio@3000 { | ||
288 | #address-cells = <1>; | ||
289 | #size-cells = <0>; | ||
290 | device_type = "mdio"; | ||
291 | compatible = "mpc5200b-fec-phy"; | ||
292 | reg = <3000 400>; // fec range, since we need to setup fec interrupts | ||
293 | interrupts = <2 5 0>; // these are for "mii command finished", not link changes & co. | ||
294 | interrupt-parent = <&mpc5200_pic>; | ||
295 | |||
296 | phy0:ethernet-phy@0 { | ||
297 | device_type = "ethernet-phy"; | ||
298 | reg = <0>; | ||
299 | }; | ||
284 | }; | 300 | }; |
285 | 301 | ||
286 | ata@3a00 { | 302 | ata@3a00 { |
diff --git a/arch/powerpc/configs/bamboo_defconfig b/arch/powerpc/configs/bamboo_defconfig index b592dec4640f..d22fed6d2cd9 100644 --- a/arch/powerpc/configs/bamboo_defconfig +++ b/arch/powerpc/configs/bamboo_defconfig | |||
@@ -91,8 +91,9 @@ CONFIG_TIMERFD=y | |||
91 | CONFIG_EVENTFD=y | 91 | CONFIG_EVENTFD=y |
92 | CONFIG_SHMEM=y | 92 | CONFIG_SHMEM=y |
93 | CONFIG_VM_EVENT_COUNTERS=y | 93 | CONFIG_VM_EVENT_COUNTERS=y |
94 | CONFIG_SLAB=y | 94 | CONFIG_SLUB_DEBUG=y |
95 | # CONFIG_SLUB is not set | 95 | # CONFIG_SLAB is not set |
96 | CONFIG_SLUB=y | ||
96 | # CONFIG_SLOB is not set | 97 | # CONFIG_SLOB is not set |
97 | CONFIG_RT_MUTEXES=y | 98 | CONFIG_RT_MUTEXES=y |
98 | # CONFIG_TINY_SHMEM is not set | 99 | # CONFIG_TINY_SHMEM is not set |
@@ -695,7 +696,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
695 | CONFIG_SCHED_DEBUG=y | 696 | CONFIG_SCHED_DEBUG=y |
696 | # CONFIG_SCHEDSTATS is not set | 697 | # CONFIG_SCHEDSTATS is not set |
697 | # CONFIG_TIMER_STATS is not set | 698 | # CONFIG_TIMER_STATS is not set |
698 | # CONFIG_DEBUG_SLAB is not set | 699 | # CONFIG_SLUB_DEBUG_ON is not set |
699 | # CONFIG_DEBUG_RT_MUTEXES is not set | 700 | # CONFIG_DEBUG_RT_MUTEXES is not set |
700 | # CONFIG_RT_MUTEX_TESTER is not set | 701 | # CONFIG_RT_MUTEX_TESTER is not set |
701 | # CONFIG_DEBUG_SPINLOCK is not set | 702 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/celleb_defconfig b/arch/powerpc/configs/celleb_defconfig index b4ac498c3cce..2c5969801bd6 100644 --- a/arch/powerpc/configs/celleb_defconfig +++ b/arch/powerpc/configs/celleb_defconfig | |||
@@ -92,8 +92,9 @@ CONFIG_TIMERFD=y | |||
92 | CONFIG_EVENTFD=y | 92 | CONFIG_EVENTFD=y |
93 | CONFIG_SHMEM=y | 93 | CONFIG_SHMEM=y |
94 | CONFIG_VM_EVENT_COUNTERS=y | 94 | CONFIG_VM_EVENT_COUNTERS=y |
95 | CONFIG_SLAB=y | 95 | CONFIG_SLUB_DEBUG=y |
96 | # CONFIG_SLUB is not set | 96 | # CONFIG_SLAB is not set |
97 | CONFIG_SLUB=y | ||
97 | # CONFIG_SLOB is not set | 98 | # CONFIG_SLOB is not set |
98 | CONFIG_RT_MUTEXES=y | 99 | CONFIG_RT_MUTEXES=y |
99 | # CONFIG_TINY_SHMEM is not set | 100 | # CONFIG_TINY_SHMEM is not set |
@@ -1218,7 +1219,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1218 | CONFIG_SCHED_DEBUG=y | 1219 | CONFIG_SCHED_DEBUG=y |
1219 | # CONFIG_SCHEDSTATS is not set | 1220 | # CONFIG_SCHEDSTATS is not set |
1220 | # CONFIG_TIMER_STATS is not set | 1221 | # CONFIG_TIMER_STATS is not set |
1221 | # CONFIG_DEBUG_SLAB is not set | 1222 | # CONFIG_SLUB_DEBUG_ON is not set |
1222 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1223 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1223 | # CONFIG_RT_MUTEX_TESTER is not set | 1224 | # CONFIG_RT_MUTEX_TESTER is not set |
1224 | # CONFIG_DEBUG_SPINLOCK is not set | 1225 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig index c3977e334b3b..6f27e57331d5 100644 --- a/arch/powerpc/configs/chrp32_defconfig +++ b/arch/powerpc/configs/chrp32_defconfig | |||
@@ -92,8 +92,9 @@ CONFIG_TIMERFD=y | |||
92 | CONFIG_EVENTFD=y | 92 | CONFIG_EVENTFD=y |
93 | CONFIG_SHMEM=y | 93 | CONFIG_SHMEM=y |
94 | CONFIG_VM_EVENT_COUNTERS=y | 94 | CONFIG_VM_EVENT_COUNTERS=y |
95 | CONFIG_SLAB=y | 95 | CONFIG_SLUB_DEBUG=y |
96 | # CONFIG_SLUB is not set | 96 | # CONFIG_SLAB is not set |
97 | CONFIG_SLUB=y | ||
97 | # CONFIG_SLOB is not set | 98 | # CONFIG_SLOB is not set |
98 | CONFIG_RT_MUTEXES=y | 99 | CONFIG_RT_MUTEXES=y |
99 | # CONFIG_TINY_SHMEM is not set | 100 | # CONFIG_TINY_SHMEM is not set |
@@ -1373,7 +1374,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1373 | CONFIG_SCHED_DEBUG=y | 1374 | CONFIG_SCHED_DEBUG=y |
1374 | # CONFIG_SCHEDSTATS is not set | 1375 | # CONFIG_SCHEDSTATS is not set |
1375 | # CONFIG_TIMER_STATS is not set | 1376 | # CONFIG_TIMER_STATS is not set |
1376 | # CONFIG_DEBUG_SLAB is not set | 1377 | # CONFIG_SLUB_DEBUG_ON is not set |
1377 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1378 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1378 | # CONFIG_RT_MUTEX_TESTER is not set | 1379 | # CONFIG_RT_MUTEX_TESTER is not set |
1379 | # CONFIG_DEBUG_SPINLOCK is not set | 1380 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/ebony_defconfig b/arch/powerpc/configs/ebony_defconfig index 3a50467b1f75..35a95dda681e 100644 --- a/arch/powerpc/configs/ebony_defconfig +++ b/arch/powerpc/configs/ebony_defconfig | |||
@@ -90,8 +90,9 @@ CONFIG_TIMERFD=y | |||
90 | CONFIG_EVENTFD=y | 90 | CONFIG_EVENTFD=y |
91 | CONFIG_SHMEM=y | 91 | CONFIG_SHMEM=y |
92 | CONFIG_VM_EVENT_COUNTERS=y | 92 | CONFIG_VM_EVENT_COUNTERS=y |
93 | CONFIG_SLAB=y | 93 | CONFIG_SLUB_DEBUG=y |
94 | # CONFIG_SLUB is not set | 94 | # CONFIG_SLAB is not set |
95 | CONFIG_SLUB=y | ||
95 | # CONFIG_SLOB is not set | 96 | # CONFIG_SLOB is not set |
96 | CONFIG_RT_MUTEXES=y | 97 | CONFIG_RT_MUTEXES=y |
97 | # CONFIG_TINY_SHMEM is not set | 98 | # CONFIG_TINY_SHMEM is not set |
@@ -773,7 +774,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
773 | CONFIG_SCHED_DEBUG=y | 774 | CONFIG_SCHED_DEBUG=y |
774 | # CONFIG_SCHEDSTATS is not set | 775 | # CONFIG_SCHEDSTATS is not set |
775 | # CONFIG_TIMER_STATS is not set | 776 | # CONFIG_TIMER_STATS is not set |
776 | # CONFIG_DEBUG_SLAB is not set | 777 | # CONFIG_SLUB_DEBUG_ON is not set |
777 | # CONFIG_DEBUG_RT_MUTEXES is not set | 778 | # CONFIG_DEBUG_RT_MUTEXES is not set |
778 | # CONFIG_RT_MUTEX_TESTER is not set | 779 | # CONFIG_RT_MUTEX_TESTER is not set |
779 | # CONFIG_DEBUG_SPINLOCK is not set | 780 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig index a655d87b3f8b..0a6fa1fc9766 100644 --- a/arch/powerpc/configs/g5_defconfig +++ b/arch/powerpc/configs/g5_defconfig | |||
@@ -92,8 +92,9 @@ CONFIG_TIMERFD=y | |||
92 | CONFIG_EVENTFD=y | 92 | CONFIG_EVENTFD=y |
93 | CONFIG_SHMEM=y | 93 | CONFIG_SHMEM=y |
94 | CONFIG_VM_EVENT_COUNTERS=y | 94 | CONFIG_VM_EVENT_COUNTERS=y |
95 | CONFIG_SLAB=y | 95 | CONFIG_SLUB_DEBUG=y |
96 | # CONFIG_SLUB is not set | 96 | # CONFIG_SLAB is not set |
97 | CONFIG_SLUB=y | ||
97 | # CONFIG_SLOB is not set | 98 | # CONFIG_SLOB is not set |
98 | CONFIG_RT_MUTEXES=y | 99 | CONFIG_RT_MUTEXES=y |
99 | # CONFIG_TINY_SHMEM is not set | 100 | # CONFIG_TINY_SHMEM is not set |
@@ -1580,7 +1581,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1580 | CONFIG_SCHED_DEBUG=y | 1581 | CONFIG_SCHED_DEBUG=y |
1581 | # CONFIG_SCHEDSTATS is not set | 1582 | # CONFIG_SCHEDSTATS is not set |
1582 | # CONFIG_TIMER_STATS is not set | 1583 | # CONFIG_TIMER_STATS is not set |
1583 | # CONFIG_DEBUG_SLAB is not set | 1584 | # CONFIG_SLUB_DEBUG_ON is not set |
1584 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1585 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1585 | # CONFIG_RT_MUTEX_TESTER is not set | 1586 | # CONFIG_RT_MUTEX_TESTER is not set |
1586 | # CONFIG_DEBUG_SPINLOCK is not set | 1587 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/holly_defconfig b/arch/powerpc/configs/holly_defconfig index 97d0202a9fe0..11009185d230 100644 --- a/arch/powerpc/configs/holly_defconfig +++ b/arch/powerpc/configs/holly_defconfig | |||
@@ -88,8 +88,9 @@ CONFIG_TIMERFD=y | |||
88 | CONFIG_EVENTFD=y | 88 | CONFIG_EVENTFD=y |
89 | CONFIG_SHMEM=y | 89 | CONFIG_SHMEM=y |
90 | CONFIG_VM_EVENT_COUNTERS=y | 90 | CONFIG_VM_EVENT_COUNTERS=y |
91 | CONFIG_SLAB=y | 91 | CONFIG_SLUB_DEBUG=y |
92 | # CONFIG_SLUB is not set | 92 | # CONFIG_SLAB is not set |
93 | CONFIG_SLUB=y | ||
93 | # CONFIG_SLOB is not set | 94 | # CONFIG_SLOB is not set |
94 | CONFIG_RT_MUTEXES=y | 95 | CONFIG_RT_MUTEXES=y |
95 | # CONFIG_TINY_SHMEM is not set | 96 | # CONFIG_TINY_SHMEM is not set |
@@ -909,7 +910,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
909 | # CONFIG_SCHED_DEBUG is not set | 910 | # CONFIG_SCHED_DEBUG is not set |
910 | # CONFIG_SCHEDSTATS is not set | 911 | # CONFIG_SCHEDSTATS is not set |
911 | # CONFIG_TIMER_STATS is not set | 912 | # CONFIG_TIMER_STATS is not set |
912 | # CONFIG_DEBUG_SLAB is not set | 913 | # CONFIG_SLUB_DEBUG_ON is not set |
913 | # CONFIG_DEBUG_RT_MUTEXES is not set | 914 | # CONFIG_DEBUG_RT_MUTEXES is not set |
914 | # CONFIG_RT_MUTEX_TESTER is not set | 915 | # CONFIG_RT_MUTEX_TESTER is not set |
915 | # CONFIG_DEBUG_SPINLOCK is not set | 916 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig index 3fe1929460e7..d78e3a6fc68c 100644 --- a/arch/powerpc/configs/iseries_defconfig +++ b/arch/powerpc/configs/iseries_defconfig | |||
@@ -93,8 +93,9 @@ CONFIG_TIMERFD=y | |||
93 | CONFIG_EVENTFD=y | 93 | CONFIG_EVENTFD=y |
94 | CONFIG_SHMEM=y | 94 | CONFIG_SHMEM=y |
95 | CONFIG_VM_EVENT_COUNTERS=y | 95 | CONFIG_VM_EVENT_COUNTERS=y |
96 | CONFIG_SLAB=y | 96 | CONFIG_SLUB_DEBUG=y |
97 | # CONFIG_SLUB is not set | 97 | # CONFIG_SLAB is not set |
98 | CONFIG_SLUB=y | ||
98 | # CONFIG_SLOB is not set | 99 | # CONFIG_SLOB is not set |
99 | CONFIG_RT_MUTEXES=y | 100 | CONFIG_RT_MUTEXES=y |
100 | # CONFIG_TINY_SHMEM is not set | 101 | # CONFIG_TINY_SHMEM is not set |
@@ -1056,7 +1057,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1056 | CONFIG_SCHED_DEBUG=y | 1057 | CONFIG_SCHED_DEBUG=y |
1057 | # CONFIG_SCHEDSTATS is not set | 1058 | # CONFIG_SCHEDSTATS is not set |
1058 | # CONFIG_TIMER_STATS is not set | 1059 | # CONFIG_TIMER_STATS is not set |
1059 | # CONFIG_DEBUG_SLAB is not set | 1060 | # CONFIG_SLUB_DEBUG_ON is not set |
1060 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1061 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1061 | # CONFIG_RT_MUTEX_TESTER is not set | 1062 | # CONFIG_RT_MUTEX_TESTER is not set |
1062 | # CONFIG_DEBUG_SPINLOCK is not set | 1063 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/kilauea_defconfig b/arch/powerpc/configs/kilauea_defconfig index 31790d329269..fd1c530aa3ec 100644 --- a/arch/powerpc/configs/kilauea_defconfig +++ b/arch/powerpc/configs/kilauea_defconfig | |||
@@ -91,8 +91,9 @@ CONFIG_SIGNALFD=y | |||
91 | CONFIG_EVENTFD=y | 91 | CONFIG_EVENTFD=y |
92 | CONFIG_SHMEM=y | 92 | CONFIG_SHMEM=y |
93 | CONFIG_VM_EVENT_COUNTERS=y | 93 | CONFIG_VM_EVENT_COUNTERS=y |
94 | CONFIG_SLAB=y | 94 | CONFIG_SLUB_DEBUG=y |
95 | # CONFIG_SLUB is not set | 95 | # CONFIG_SLAB is not set |
96 | CONFIG_SLUB=y | ||
96 | # CONFIG_SLOB is not set | 97 | # CONFIG_SLOB is not set |
97 | CONFIG_RT_MUTEXES=y | 98 | CONFIG_RT_MUTEXES=y |
98 | # CONFIG_TINY_SHMEM is not set | 99 | # CONFIG_TINY_SHMEM is not set |
@@ -700,7 +701,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
700 | CONFIG_SCHED_DEBUG=y | 701 | CONFIG_SCHED_DEBUG=y |
701 | # CONFIG_SCHEDSTATS is not set | 702 | # CONFIG_SCHEDSTATS is not set |
702 | # CONFIG_TIMER_STATS is not set | 703 | # CONFIG_TIMER_STATS is not set |
703 | # CONFIG_DEBUG_SLAB is not set | 704 | # CONFIG_SLUB_DEBUG_ON is not set |
704 | # CONFIG_DEBUG_RT_MUTEXES is not set | 705 | # CONFIG_DEBUG_RT_MUTEXES is not set |
705 | # CONFIG_RT_MUTEX_TESTER is not set | 706 | # CONFIG_RT_MUTEX_TESTER is not set |
706 | # CONFIG_DEBUG_SPINLOCK is not set | 707 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/configs/linkstation_defconfig index a4e3ee045a6a..401033aefd40 100644 --- a/arch/powerpc/configs/linkstation_defconfig +++ b/arch/powerpc/configs/linkstation_defconfig | |||
@@ -89,8 +89,9 @@ CONFIG_TIMERFD=y | |||
89 | CONFIG_EVENTFD=y | 89 | CONFIG_EVENTFD=y |
90 | CONFIG_SHMEM=y | 90 | CONFIG_SHMEM=y |
91 | CONFIG_VM_EVENT_COUNTERS=y | 91 | CONFIG_VM_EVENT_COUNTERS=y |
92 | CONFIG_SLAB=y | 92 | CONFIG_SLUB_DEBUG=y |
93 | # CONFIG_SLUB is not set | 93 | # CONFIG_SLAB is not set |
94 | CONFIG_SLUB=y | ||
94 | # CONFIG_SLOB is not set | 95 | # CONFIG_SLOB is not set |
95 | CONFIG_RT_MUTEXES=y | 96 | CONFIG_RT_MUTEXES=y |
96 | # CONFIG_TINY_SHMEM is not set | 97 | # CONFIG_TINY_SHMEM is not set |
@@ -1459,7 +1460,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1459 | CONFIG_SCHED_DEBUG=y | 1460 | CONFIG_SCHED_DEBUG=y |
1460 | # CONFIG_SCHEDSTATS is not set | 1461 | # CONFIG_SCHEDSTATS is not set |
1461 | # CONFIG_TIMER_STATS is not set | 1462 | # CONFIG_TIMER_STATS is not set |
1462 | # CONFIG_DEBUG_SLAB is not set | 1463 | # CONFIG_SLUB_DEBUG_ON is not set |
1463 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1464 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1464 | # CONFIG_RT_MUTEX_TESTER is not set | 1465 | # CONFIG_RT_MUTEX_TESTER is not set |
1465 | # CONFIG_DEBUG_SPINLOCK is not set | 1466 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/lite5200_defconfig b/arch/powerpc/configs/lite5200_defconfig index d42e226d3a28..dd78ed955eb0 100644 --- a/arch/powerpc/configs/lite5200_defconfig +++ b/arch/powerpc/configs/lite5200_defconfig | |||
@@ -87,8 +87,9 @@ CONFIG_TIMERFD=y | |||
87 | CONFIG_EVENTFD=y | 87 | CONFIG_EVENTFD=y |
88 | CONFIG_SHMEM=y | 88 | CONFIG_SHMEM=y |
89 | CONFIG_VM_EVENT_COUNTERS=y | 89 | CONFIG_VM_EVENT_COUNTERS=y |
90 | CONFIG_SLAB=y | 90 | CONFIG_SLUB_DEBUG=y |
91 | # CONFIG_SLUB is not set | 91 | # CONFIG_SLAB is not set |
92 | CONFIG_SLUB=y | ||
92 | # CONFIG_SLOB is not set | 93 | # CONFIG_SLOB is not set |
93 | CONFIG_RT_MUTEXES=y | 94 | CONFIG_RT_MUTEXES=y |
94 | # CONFIG_TINY_SHMEM is not set | 95 | # CONFIG_TINY_SHMEM is not set |
@@ -816,7 +817,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
816 | CONFIG_SCHED_DEBUG=y | 817 | CONFIG_SCHED_DEBUG=y |
817 | # CONFIG_SCHEDSTATS is not set | 818 | # CONFIG_SCHEDSTATS is not set |
818 | # CONFIG_TIMER_STATS is not set | 819 | # CONFIG_TIMER_STATS is not set |
819 | # CONFIG_DEBUG_SLAB is not set | 820 | # CONFIG_SLUB_DEBUG_ON is not set |
820 | # CONFIG_DEBUG_RT_MUTEXES is not set | 821 | # CONFIG_DEBUG_RT_MUTEXES is not set |
821 | # CONFIG_RT_MUTEX_TESTER is not set | 822 | # CONFIG_RT_MUTEX_TESTER is not set |
822 | # CONFIG_DEBUG_SPINLOCK is not set | 823 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig index 96b538bc676b..84b9ab4a5a92 100644 --- a/arch/powerpc/configs/maple_defconfig +++ b/arch/powerpc/configs/maple_defconfig | |||
@@ -90,8 +90,9 @@ CONFIG_TIMERFD=y | |||
90 | CONFIG_EVENTFD=y | 90 | CONFIG_EVENTFD=y |
91 | CONFIG_SHMEM=y | 91 | CONFIG_SHMEM=y |
92 | CONFIG_VM_EVENT_COUNTERS=y | 92 | CONFIG_VM_EVENT_COUNTERS=y |
93 | CONFIG_SLAB=y | 93 | CONFIG_SLUB_DEBUG=y |
94 | # CONFIG_SLUB is not set | 94 | # CONFIG_SLAB is not set |
95 | CONFIG_SLUB=y | ||
95 | # CONFIG_SLOB is not set | 96 | # CONFIG_SLOB is not set |
96 | CONFIG_RT_MUTEXES=y | 97 | CONFIG_RT_MUTEXES=y |
97 | # CONFIG_TINY_SHMEM is not set | 98 | # CONFIG_TINY_SHMEM is not set |
@@ -1095,8 +1096,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1095 | CONFIG_SCHED_DEBUG=y | 1096 | CONFIG_SCHED_DEBUG=y |
1096 | # CONFIG_SCHEDSTATS is not set | 1097 | # CONFIG_SCHEDSTATS is not set |
1097 | # CONFIG_TIMER_STATS is not set | 1098 | # CONFIG_TIMER_STATS is not set |
1098 | CONFIG_DEBUG_SLAB=y | 1099 | # CONFIG_SLUB_DEBUG_ON is not set |
1099 | # CONFIG_DEBUG_SLAB_LEAK is not set | ||
1100 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1100 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1101 | # CONFIG_RT_MUTEX_TESTER is not set | 1101 | # CONFIG_RT_MUTEX_TESTER is not set |
1102 | # CONFIG_DEBUG_SPINLOCK is not set | 1102 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/mpc7448_hpc2_defconfig b/arch/powerpc/configs/mpc7448_hpc2_defconfig index 05814a3b0e33..87ae894551b7 100644 --- a/arch/powerpc/configs/mpc7448_hpc2_defconfig +++ b/arch/powerpc/configs/mpc7448_hpc2_defconfig | |||
@@ -87,8 +87,9 @@ CONFIG_TIMERFD=y | |||
87 | CONFIG_EVENTFD=y | 87 | CONFIG_EVENTFD=y |
88 | CONFIG_SHMEM=y | 88 | CONFIG_SHMEM=y |
89 | CONFIG_VM_EVENT_COUNTERS=y | 89 | CONFIG_VM_EVENT_COUNTERS=y |
90 | CONFIG_SLAB=y | 90 | CONFIG_SLUB_DEBUG=y |
91 | # CONFIG_SLUB is not set | 91 | # CONFIG_SLAB is not set |
92 | CONFIG_SLUB=y | ||
92 | # CONFIG_SLOB is not set | 93 | # CONFIG_SLOB is not set |
93 | CONFIG_RT_MUTEXES=y | 94 | CONFIG_RT_MUTEXES=y |
94 | # CONFIG_TINY_SHMEM is not set | 95 | # CONFIG_TINY_SHMEM is not set |
diff --git a/arch/powerpc/configs/mpc8272_ads_defconfig b/arch/powerpc/configs/mpc8272_ads_defconfig index 6b7951ec941a..865a942ecc69 100644 --- a/arch/powerpc/configs/mpc8272_ads_defconfig +++ b/arch/powerpc/configs/mpc8272_ads_defconfig | |||
@@ -85,8 +85,9 @@ CONFIG_TIMERFD=y | |||
85 | CONFIG_EVENTFD=y | 85 | CONFIG_EVENTFD=y |
86 | CONFIG_SHMEM=y | 86 | CONFIG_SHMEM=y |
87 | CONFIG_VM_EVENT_COUNTERS=y | 87 | CONFIG_VM_EVENT_COUNTERS=y |
88 | CONFIG_SLAB=y | 88 | CONFIG_SLUB_DEBUG=y |
89 | # CONFIG_SLUB is not set | 89 | # CONFIG_SLAB is not set |
90 | CONFIG_SLUB=y | ||
90 | # CONFIG_SLOB is not set | 91 | # CONFIG_SLOB is not set |
91 | CONFIG_RT_MUTEXES=y | 92 | CONFIG_RT_MUTEXES=y |
92 | # CONFIG_TINY_SHMEM is not set | 93 | # CONFIG_TINY_SHMEM is not set |
@@ -867,7 +868,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
867 | CONFIG_SCHED_DEBUG=y | 868 | CONFIG_SCHED_DEBUG=y |
868 | # CONFIG_SCHEDSTATS is not set | 869 | # CONFIG_SCHEDSTATS is not set |
869 | # CONFIG_TIMER_STATS is not set | 870 | # CONFIG_TIMER_STATS is not set |
870 | # CONFIG_DEBUG_SLAB is not set | 871 | # CONFIG_SLUB_DEBUG_ON is not set |
871 | # CONFIG_DEBUG_RT_MUTEXES is not set | 872 | # CONFIG_DEBUG_RT_MUTEXES is not set |
872 | # CONFIG_RT_MUTEX_TESTER is not set | 873 | # CONFIG_RT_MUTEX_TESTER is not set |
873 | # CONFIG_DEBUG_SPINLOCK is not set | 874 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/mpc8313_rdb_defconfig b/arch/powerpc/configs/mpc8313_rdb_defconfig index f387dac69d09..259d40d1eb5a 100644 --- a/arch/powerpc/configs/mpc8313_rdb_defconfig +++ b/arch/powerpc/configs/mpc8313_rdb_defconfig | |||
@@ -87,8 +87,9 @@ CONFIG_TIMERFD=y | |||
87 | CONFIG_EVENTFD=y | 87 | CONFIG_EVENTFD=y |
88 | CONFIG_SHMEM=y | 88 | CONFIG_SHMEM=y |
89 | CONFIG_VM_EVENT_COUNTERS=y | 89 | CONFIG_VM_EVENT_COUNTERS=y |
90 | CONFIG_SLAB=y | 90 | CONFIG_SLUB_DEBUG=y |
91 | # CONFIG_SLUB is not set | 91 | # CONFIG_SLAB is not set |
92 | CONFIG_SLUB=y | ||
92 | # CONFIG_SLOB is not set | 93 | # CONFIG_SLOB is not set |
93 | CONFIG_RT_MUTEXES=y | 94 | CONFIG_RT_MUTEXES=y |
94 | # CONFIG_TINY_SHMEM is not set | 95 | # CONFIG_TINY_SHMEM is not set |
@@ -1272,7 +1273,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1272 | CONFIG_SCHED_DEBUG=y | 1273 | CONFIG_SCHED_DEBUG=y |
1273 | # CONFIG_SCHEDSTATS is not set | 1274 | # CONFIG_SCHEDSTATS is not set |
1274 | # CONFIG_TIMER_STATS is not set | 1275 | # CONFIG_TIMER_STATS is not set |
1275 | # CONFIG_DEBUG_SLAB is not set | 1276 | # CONFIG_SLUB_DEBUG_ON is not set |
1276 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1277 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1277 | # CONFIG_RT_MUTEX_TESTER is not set | 1278 | # CONFIG_RT_MUTEX_TESTER is not set |
1278 | # CONFIG_DEBUG_SPINLOCK is not set | 1279 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/mpc832x_mds_defconfig b/arch/powerpc/configs/mpc832x_mds_defconfig index fc6695302cc8..dd68d1818d6b 100644 --- a/arch/powerpc/configs/mpc832x_mds_defconfig +++ b/arch/powerpc/configs/mpc832x_mds_defconfig | |||
@@ -87,8 +87,9 @@ CONFIG_TIMERFD=y | |||
87 | CONFIG_EVENTFD=y | 87 | CONFIG_EVENTFD=y |
88 | CONFIG_SHMEM=y | 88 | CONFIG_SHMEM=y |
89 | CONFIG_VM_EVENT_COUNTERS=y | 89 | CONFIG_VM_EVENT_COUNTERS=y |
90 | CONFIG_SLAB=y | 90 | CONFIG_SLUB_DEBUG=y |
91 | # CONFIG_SLUB is not set | 91 | # CONFIG_SLAB is not set |
92 | CONFIG_SLUB=y | ||
92 | # CONFIG_SLOB is not set | 93 | # CONFIG_SLOB is not set |
93 | CONFIG_RT_MUTEXES=y | 94 | CONFIG_RT_MUTEXES=y |
94 | # CONFIG_TINY_SHMEM is not set | 95 | # CONFIG_TINY_SHMEM is not set |
diff --git a/arch/powerpc/configs/mpc832x_rdb_defconfig b/arch/powerpc/configs/mpc832x_rdb_defconfig index 6d1c3e842051..4f391028c79c 100644 --- a/arch/powerpc/configs/mpc832x_rdb_defconfig +++ b/arch/powerpc/configs/mpc832x_rdb_defconfig | |||
@@ -87,8 +87,9 @@ CONFIG_TIMERFD=y | |||
87 | CONFIG_EVENTFD=y | 87 | CONFIG_EVENTFD=y |
88 | CONFIG_SHMEM=y | 88 | CONFIG_SHMEM=y |
89 | CONFIG_VM_EVENT_COUNTERS=y | 89 | CONFIG_VM_EVENT_COUNTERS=y |
90 | CONFIG_SLAB=y | 90 | CONFIG_SLUB_DEBUG=y |
91 | # CONFIG_SLUB is not set | 91 | # CONFIG_SLAB is not set |
92 | CONFIG_SLUB=y | ||
92 | # CONFIG_SLOB is not set | 93 | # CONFIG_SLOB is not set |
93 | CONFIG_RT_MUTEXES=y | 94 | CONFIG_RT_MUTEXES=y |
94 | # CONFIG_TINY_SHMEM is not set | 95 | # CONFIG_TINY_SHMEM is not set |
diff --git a/arch/powerpc/configs/mpc834x_itx_defconfig b/arch/powerpc/configs/mpc834x_itx_defconfig index ddafa6b9af05..eb28dd85cb2b 100644 --- a/arch/powerpc/configs/mpc834x_itx_defconfig +++ b/arch/powerpc/configs/mpc834x_itx_defconfig | |||
@@ -87,8 +87,9 @@ CONFIG_TIMERFD=y | |||
87 | CONFIG_EVENTFD=y | 87 | CONFIG_EVENTFD=y |
88 | CONFIG_SHMEM=y | 88 | CONFIG_SHMEM=y |
89 | CONFIG_VM_EVENT_COUNTERS=y | 89 | CONFIG_VM_EVENT_COUNTERS=y |
90 | CONFIG_SLAB=y | 90 | CONFIG_SLUB_DEBUG=y |
91 | # CONFIG_SLUB is not set | 91 | # CONFIG_SLAB is not set |
92 | CONFIG_SLUB=y | ||
92 | # CONFIG_SLOB is not set | 93 | # CONFIG_SLOB is not set |
93 | CONFIG_RT_MUTEXES=y | 94 | CONFIG_RT_MUTEXES=y |
94 | # CONFIG_TINY_SHMEM is not set | 95 | # CONFIG_TINY_SHMEM is not set |
diff --git a/arch/powerpc/configs/mpc834x_itxgp_defconfig b/arch/powerpc/configs/mpc834x_itxgp_defconfig index 8241c6985861..22b95462c913 100644 --- a/arch/powerpc/configs/mpc834x_itxgp_defconfig +++ b/arch/powerpc/configs/mpc834x_itxgp_defconfig | |||
@@ -87,8 +87,9 @@ CONFIG_TIMERFD=y | |||
87 | CONFIG_EVENTFD=y | 87 | CONFIG_EVENTFD=y |
88 | CONFIG_SHMEM=y | 88 | CONFIG_SHMEM=y |
89 | CONFIG_VM_EVENT_COUNTERS=y | 89 | CONFIG_VM_EVENT_COUNTERS=y |
90 | CONFIG_SLAB=y | 90 | CONFIG_SLUB_DEBUG=y |
91 | # CONFIG_SLUB is not set | 91 | # CONFIG_SLAB is not set |
92 | CONFIG_SLUB=y | ||
92 | # CONFIG_SLOB is not set | 93 | # CONFIG_SLOB is not set |
93 | CONFIG_RT_MUTEXES=y | 94 | CONFIG_RT_MUTEXES=y |
94 | # CONFIG_TINY_SHMEM is not set | 95 | # CONFIG_TINY_SHMEM is not set |
diff --git a/arch/powerpc/configs/mpc834x_mds_defconfig b/arch/powerpc/configs/mpc834x_mds_defconfig index 06233b1a9418..e59a88e95486 100644 --- a/arch/powerpc/configs/mpc834x_mds_defconfig +++ b/arch/powerpc/configs/mpc834x_mds_defconfig | |||
@@ -87,8 +87,9 @@ CONFIG_TIMERFD=y | |||
87 | CONFIG_EVENTFD=y | 87 | CONFIG_EVENTFD=y |
88 | CONFIG_SHMEM=y | 88 | CONFIG_SHMEM=y |
89 | CONFIG_VM_EVENT_COUNTERS=y | 89 | CONFIG_VM_EVENT_COUNTERS=y |
90 | CONFIG_SLAB=y | 90 | CONFIG_SLUB_DEBUG=y |
91 | # CONFIG_SLUB is not set | 91 | # CONFIG_SLAB is not set |
92 | CONFIG_SLUB=y | ||
92 | # CONFIG_SLOB is not set | 93 | # CONFIG_SLOB is not set |
93 | CONFIG_RT_MUTEXES=y | 94 | CONFIG_RT_MUTEXES=y |
94 | # CONFIG_TINY_SHMEM is not set | 95 | # CONFIG_TINY_SHMEM is not set |
diff --git a/arch/powerpc/configs/mpc836x_mds_defconfig b/arch/powerpc/configs/mpc836x_mds_defconfig index 3045749d62fe..75657528518e 100644 --- a/arch/powerpc/configs/mpc836x_mds_defconfig +++ b/arch/powerpc/configs/mpc836x_mds_defconfig | |||
@@ -87,8 +87,9 @@ CONFIG_TIMERFD=y | |||
87 | CONFIG_EVENTFD=y | 87 | CONFIG_EVENTFD=y |
88 | CONFIG_SHMEM=y | 88 | CONFIG_SHMEM=y |
89 | CONFIG_VM_EVENT_COUNTERS=y | 89 | CONFIG_VM_EVENT_COUNTERS=y |
90 | CONFIG_SLAB=y | 90 | CONFIG_SLUB_DEBUG=y |
91 | # CONFIG_SLUB is not set | 91 | # CONFIG_SLAB is not set |
92 | CONFIG_SLUB=y | ||
92 | # CONFIG_SLOB is not set | 93 | # CONFIG_SLOB is not set |
93 | CONFIG_RT_MUTEXES=y | 94 | CONFIG_RT_MUTEXES=y |
94 | # CONFIG_TINY_SHMEM is not set | 95 | # CONFIG_TINY_SHMEM is not set |
diff --git a/arch/powerpc/configs/mpc8540_ads_defconfig b/arch/powerpc/configs/mpc8540_ads_defconfig index b282c3521dd5..b953b2c51453 100644 --- a/arch/powerpc/configs/mpc8540_ads_defconfig +++ b/arch/powerpc/configs/mpc8540_ads_defconfig | |||
@@ -90,8 +90,9 @@ CONFIG_TIMERFD=y | |||
90 | CONFIG_EVENTFD=y | 90 | CONFIG_EVENTFD=y |
91 | CONFIG_SHMEM=y | 91 | CONFIG_SHMEM=y |
92 | CONFIG_VM_EVENT_COUNTERS=y | 92 | CONFIG_VM_EVENT_COUNTERS=y |
93 | CONFIG_SLAB=y | 93 | CONFIG_SLUB_DEBUG=y |
94 | # CONFIG_SLUB is not set | 94 | # CONFIG_SLAB is not set |
95 | CONFIG_SLUB=y | ||
95 | # CONFIG_SLOB is not set | 96 | # CONFIG_SLOB is not set |
96 | CONFIG_RT_MUTEXES=y | 97 | CONFIG_RT_MUTEXES=y |
97 | # CONFIG_TINY_SHMEM is not set | 98 | # CONFIG_TINY_SHMEM is not set |
@@ -704,7 +705,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
704 | CONFIG_SCHED_DEBUG=y | 705 | CONFIG_SCHED_DEBUG=y |
705 | # CONFIG_SCHEDSTATS is not set | 706 | # CONFIG_SCHEDSTATS is not set |
706 | # CONFIG_TIMER_STATS is not set | 707 | # CONFIG_TIMER_STATS is not set |
707 | # CONFIG_DEBUG_SLAB is not set | 708 | # CONFIG_SLUB_DEBUG_ON is not set |
708 | # CONFIG_DEBUG_RT_MUTEXES is not set | 709 | # CONFIG_DEBUG_RT_MUTEXES is not set |
709 | # CONFIG_RT_MUTEX_TESTER is not set | 710 | # CONFIG_RT_MUTEX_TESTER is not set |
710 | # CONFIG_DEBUG_SPINLOCK is not set | 711 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/mpc8544_ds_defconfig b/arch/powerpc/configs/mpc8544_ds_defconfig index 150221f6f723..9a3e08bcd188 100644 --- a/arch/powerpc/configs/mpc8544_ds_defconfig +++ b/arch/powerpc/configs/mpc8544_ds_defconfig | |||
@@ -93,8 +93,9 @@ CONFIG_TIMERFD=y | |||
93 | CONFIG_EVENTFD=y | 93 | CONFIG_EVENTFD=y |
94 | CONFIG_SHMEM=y | 94 | CONFIG_SHMEM=y |
95 | CONFIG_VM_EVENT_COUNTERS=y | 95 | CONFIG_VM_EVENT_COUNTERS=y |
96 | CONFIG_SLAB=y | 96 | CONFIG_SLUB_DEBUG=y |
97 | # CONFIG_SLUB is not set | 97 | # CONFIG_SLAB is not set |
98 | CONFIG_SLUB=y | ||
98 | # CONFIG_SLOB is not set | 99 | # CONFIG_SLOB is not set |
99 | CONFIG_RT_MUTEXES=y | 100 | CONFIG_RT_MUTEXES=y |
100 | # CONFIG_TINY_SHMEM is not set | 101 | # CONFIG_TINY_SHMEM is not set |
@@ -1427,7 +1428,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1427 | CONFIG_SCHED_DEBUG=y | 1428 | CONFIG_SCHED_DEBUG=y |
1428 | # CONFIG_SCHEDSTATS is not set | 1429 | # CONFIG_SCHEDSTATS is not set |
1429 | # CONFIG_TIMER_STATS is not set | 1430 | # CONFIG_TIMER_STATS is not set |
1430 | # CONFIG_DEBUG_SLAB is not set | 1431 | # CONFIG_SLUB_DEBUG_ON is not set |
1431 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1432 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1432 | # CONFIG_RT_MUTEX_TESTER is not set | 1433 | # CONFIG_RT_MUTEX_TESTER is not set |
1433 | # CONFIG_DEBUG_SPINLOCK is not set | 1434 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/mpc8560_ads_defconfig b/arch/powerpc/configs/mpc8560_ads_defconfig index 3d68c65212cf..0211e6b68e1a 100644 --- a/arch/powerpc/configs/mpc8560_ads_defconfig +++ b/arch/powerpc/configs/mpc8560_ads_defconfig | |||
@@ -94,8 +94,9 @@ CONFIG_SIGNALFD=y | |||
94 | CONFIG_EVENTFD=y | 94 | CONFIG_EVENTFD=y |
95 | CONFIG_SHMEM=y | 95 | CONFIG_SHMEM=y |
96 | CONFIG_VM_EVENT_COUNTERS=y | 96 | CONFIG_VM_EVENT_COUNTERS=y |
97 | CONFIG_SLAB=y | 97 | CONFIG_SLUB_DEBUG=y |
98 | # CONFIG_SLUB is not set | 98 | # CONFIG_SLAB is not set |
99 | CONFIG_SLUB=y | ||
99 | # CONFIG_SLOB is not set | 100 | # CONFIG_SLOB is not set |
100 | CONFIG_RT_MUTEXES=y | 101 | CONFIG_RT_MUTEXES=y |
101 | # CONFIG_TINY_SHMEM is not set | 102 | # CONFIG_TINY_SHMEM is not set |
@@ -791,7 +792,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
791 | CONFIG_SCHED_DEBUG=y | 792 | CONFIG_SCHED_DEBUG=y |
792 | # CONFIG_SCHEDSTATS is not set | 793 | # CONFIG_SCHEDSTATS is not set |
793 | # CONFIG_TIMER_STATS is not set | 794 | # CONFIG_TIMER_STATS is not set |
794 | # CONFIG_DEBUG_SLAB is not set | 795 | # CONFIG_SLUB_DEBUG_ON is not set |
795 | # CONFIG_DEBUG_RT_MUTEXES is not set | 796 | # CONFIG_DEBUG_RT_MUTEXES is not set |
796 | # CONFIG_RT_MUTEX_TESTER is not set | 797 | # CONFIG_RT_MUTEX_TESTER is not set |
797 | # CONFIG_DEBUG_SPINLOCK is not set | 798 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/mpc8568mds_defconfig b/arch/powerpc/configs/mpc8568mds_defconfig index 0307fe7b0487..883d8af9debd 100644 --- a/arch/powerpc/configs/mpc8568mds_defconfig +++ b/arch/powerpc/configs/mpc8568mds_defconfig | |||
@@ -88,8 +88,9 @@ CONFIG_TIMERFD=y | |||
88 | CONFIG_EVENTFD=y | 88 | CONFIG_EVENTFD=y |
89 | CONFIG_SHMEM=y | 89 | CONFIG_SHMEM=y |
90 | CONFIG_VM_EVENT_COUNTERS=y | 90 | CONFIG_VM_EVENT_COUNTERS=y |
91 | CONFIG_SLAB=y | 91 | CONFIG_SLUB_DEBUG=y |
92 | # CONFIG_SLUB is not set | 92 | # CONFIG_SLAB is not set |
93 | CONFIG_SLUB=y | ||
93 | # CONFIG_SLOB is not set | 94 | # CONFIG_SLOB is not set |
94 | CONFIG_RT_MUTEXES=y | 95 | CONFIG_RT_MUTEXES=y |
95 | # CONFIG_TINY_SHMEM is not set | 96 | # CONFIG_TINY_SHMEM is not set |
@@ -949,7 +950,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
949 | CONFIG_SCHED_DEBUG=y | 950 | CONFIG_SCHED_DEBUG=y |
950 | # CONFIG_SCHEDSTATS is not set | 951 | # CONFIG_SCHEDSTATS is not set |
951 | # CONFIG_TIMER_STATS is not set | 952 | # CONFIG_TIMER_STATS is not set |
952 | # CONFIG_DEBUG_SLAB is not set | 953 | # CONFIG_SLUB_DEBUG_ON is not set |
953 | # CONFIG_DEBUG_RT_MUTEXES is not set | 954 | # CONFIG_DEBUG_RT_MUTEXES is not set |
954 | # CONFIG_RT_MUTEX_TESTER is not set | 955 | # CONFIG_RT_MUTEX_TESTER is not set |
955 | # CONFIG_DEBUG_SPINLOCK is not set | 956 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/mpc8572_ds_defconfig b/arch/powerpc/configs/mpc8572_ds_defconfig index 7f1a3e987138..4e85b2e88525 100644 --- a/arch/powerpc/configs/mpc8572_ds_defconfig +++ b/arch/powerpc/configs/mpc8572_ds_defconfig | |||
@@ -93,8 +93,9 @@ CONFIG_TIMERFD=y | |||
93 | CONFIG_EVENTFD=y | 93 | CONFIG_EVENTFD=y |
94 | CONFIG_SHMEM=y | 94 | CONFIG_SHMEM=y |
95 | CONFIG_VM_EVENT_COUNTERS=y | 95 | CONFIG_VM_EVENT_COUNTERS=y |
96 | CONFIG_SLAB=y | 96 | CONFIG_SLUB_DEBUG=y |
97 | # CONFIG_SLUB is not set | 97 | # CONFIG_SLAB is not set |
98 | CONFIG_SLUB=y | ||
98 | # CONFIG_SLOB is not set | 99 | # CONFIG_SLOB is not set |
99 | CONFIG_RT_MUTEXES=y | 100 | CONFIG_RT_MUTEXES=y |
100 | # CONFIG_TINY_SHMEM is not set | 101 | # CONFIG_TINY_SHMEM is not set |
@@ -1427,7 +1428,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1427 | CONFIG_SCHED_DEBUG=y | 1428 | CONFIG_SCHED_DEBUG=y |
1428 | # CONFIG_SCHEDSTATS is not set | 1429 | # CONFIG_SCHEDSTATS is not set |
1429 | # CONFIG_TIMER_STATS is not set | 1430 | # CONFIG_TIMER_STATS is not set |
1430 | # CONFIG_DEBUG_SLAB is not set | 1431 | # CONFIG_SLUB_DEBUG_ON is not set |
1431 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1432 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1432 | # CONFIG_RT_MUTEX_TESTER is not set | 1433 | # CONFIG_RT_MUTEX_TESTER is not set |
1433 | # CONFIG_DEBUG_SPINLOCK is not set | 1434 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/mpc85xx_cds_defconfig b/arch/powerpc/configs/mpc85xx_cds_defconfig index e6850c619f88..a4f33d110542 100644 --- a/arch/powerpc/configs/mpc85xx_cds_defconfig +++ b/arch/powerpc/configs/mpc85xx_cds_defconfig | |||
@@ -90,8 +90,9 @@ CONFIG_TIMERFD=y | |||
90 | CONFIG_EVENTFD=y | 90 | CONFIG_EVENTFD=y |
91 | CONFIG_SHMEM=y | 91 | CONFIG_SHMEM=y |
92 | CONFIG_VM_EVENT_COUNTERS=y | 92 | CONFIG_VM_EVENT_COUNTERS=y |
93 | CONFIG_SLAB=y | 93 | CONFIG_SLUB_DEBUG=y |
94 | # CONFIG_SLUB is not set | 94 | # CONFIG_SLAB is not set |
95 | CONFIG_SLUB=y | ||
95 | # CONFIG_SLOB is not set | 96 | # CONFIG_SLOB is not set |
96 | CONFIG_RT_MUTEXES=y | 97 | CONFIG_RT_MUTEXES=y |
97 | # CONFIG_TINY_SHMEM is not set | 98 | # CONFIG_TINY_SHMEM is not set |
@@ -832,7 +833,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
832 | CONFIG_SCHED_DEBUG=y | 833 | CONFIG_SCHED_DEBUG=y |
833 | # CONFIG_SCHEDSTATS is not set | 834 | # CONFIG_SCHEDSTATS is not set |
834 | # CONFIG_TIMER_STATS is not set | 835 | # CONFIG_TIMER_STATS is not set |
835 | # CONFIG_DEBUG_SLAB is not set | 836 | # CONFIG_SLUB_DEBUG_ON is not set |
836 | # CONFIG_DEBUG_RT_MUTEXES is not set | 837 | # CONFIG_DEBUG_RT_MUTEXES is not set |
837 | # CONFIG_RT_MUTEX_TESTER is not set | 838 | # CONFIG_RT_MUTEX_TESTER is not set |
838 | # CONFIG_DEBUG_SPINLOCK is not set | 839 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/mpc8610_hpcd_defconfig b/arch/powerpc/configs/mpc8610_hpcd_defconfig index de19b781937f..0483211f52be 100644 --- a/arch/powerpc/configs/mpc8610_hpcd_defconfig +++ b/arch/powerpc/configs/mpc8610_hpcd_defconfig | |||
@@ -88,8 +88,9 @@ CONFIG_SIGNALFD=y | |||
88 | CONFIG_EVENTFD=y | 88 | CONFIG_EVENTFD=y |
89 | CONFIG_SHMEM=y | 89 | CONFIG_SHMEM=y |
90 | CONFIG_VM_EVENT_COUNTERS=y | 90 | CONFIG_VM_EVENT_COUNTERS=y |
91 | CONFIG_SLAB=y | 91 | CONFIG_SLUB_DEBUG=y |
92 | # CONFIG_SLUB is not set | 92 | # CONFIG_SLAB is not set |
93 | CONFIG_SLUB=y | ||
93 | # CONFIG_SLOB is not set | 94 | # CONFIG_SLOB is not set |
94 | CONFIG_RT_MUTEXES=y | 95 | CONFIG_RT_MUTEXES=y |
95 | # CONFIG_TINY_SHMEM is not set | 96 | # CONFIG_TINY_SHMEM is not set |
@@ -993,7 +994,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
993 | CONFIG_SCHED_DEBUG=y | 994 | CONFIG_SCHED_DEBUG=y |
994 | # CONFIG_SCHEDSTATS is not set | 995 | # CONFIG_SCHEDSTATS is not set |
995 | # CONFIG_TIMER_STATS is not set | 996 | # CONFIG_TIMER_STATS is not set |
996 | # CONFIG_DEBUG_SLAB is not set | 997 | # CONFIG_SLUB_DEBUG_ON is not set |
997 | # CONFIG_DEBUG_RT_MUTEXES is not set | 998 | # CONFIG_DEBUG_RT_MUTEXES is not set |
998 | # CONFIG_RT_MUTEX_TESTER is not set | 999 | # CONFIG_RT_MUTEX_TESTER is not set |
999 | # CONFIG_DEBUG_SPINLOCK is not set | 1000 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/mpc8641_hpcn_defconfig b/arch/powerpc/configs/mpc8641_hpcn_defconfig index b2f389dcaded..ed214fcd8abe 100644 --- a/arch/powerpc/configs/mpc8641_hpcn_defconfig +++ b/arch/powerpc/configs/mpc8641_hpcn_defconfig | |||
@@ -94,8 +94,9 @@ CONFIG_TIMERFD=y | |||
94 | CONFIG_EVENTFD=y | 94 | CONFIG_EVENTFD=y |
95 | CONFIG_SHMEM=y | 95 | CONFIG_SHMEM=y |
96 | CONFIG_VM_EVENT_COUNTERS=y | 96 | CONFIG_VM_EVENT_COUNTERS=y |
97 | CONFIG_SLAB=y | 97 | CONFIG_SLUB_DEBUG=y |
98 | # CONFIG_SLUB is not set | 98 | # CONFIG_SLAB is not set |
99 | CONFIG_SLUB=y | ||
99 | # CONFIG_SLOB is not set | 100 | # CONFIG_SLOB is not set |
100 | CONFIG_RT_MUTEXES=y | 101 | CONFIG_RT_MUTEXES=y |
101 | # CONFIG_TINY_SHMEM is not set | 102 | # CONFIG_TINY_SHMEM is not set |
@@ -1432,7 +1433,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1432 | CONFIG_SCHED_DEBUG=y | 1433 | CONFIG_SCHED_DEBUG=y |
1433 | # CONFIG_SCHEDSTATS is not set | 1434 | # CONFIG_SCHEDSTATS is not set |
1434 | # CONFIG_TIMER_STATS is not set | 1435 | # CONFIG_TIMER_STATS is not set |
1435 | # CONFIG_DEBUG_SLAB is not set | 1436 | # CONFIG_SLUB_DEBUG_ON is not set |
1436 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1437 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1437 | # CONFIG_RT_MUTEX_TESTER is not set | 1438 | # CONFIG_RT_MUTEX_TESTER is not set |
1438 | # CONFIG_DEBUG_SPINLOCK is not set | 1439 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/mpc866_ads_defconfig b/arch/powerpc/configs/mpc866_ads_defconfig index 143a0cd83327..070b0a5b9c0d 100644 --- a/arch/powerpc/configs/mpc866_ads_defconfig +++ b/arch/powerpc/configs/mpc866_ads_defconfig | |||
@@ -83,8 +83,9 @@ CONFIG_TIMERFD=y | |||
83 | CONFIG_EVENTFD=y | 83 | CONFIG_EVENTFD=y |
84 | CONFIG_SHMEM=y | 84 | CONFIG_SHMEM=y |
85 | # CONFIG_VM_EVENT_COUNTERS is not set | 85 | # CONFIG_VM_EVENT_COUNTERS is not set |
86 | CONFIG_SLAB=y | 86 | CONFIG_SLUB_DEBUG=y |
87 | # CONFIG_SLUB is not set | 87 | # CONFIG_SLAB is not set |
88 | CONFIG_SLUB=y | ||
88 | # CONFIG_SLOB is not set | 89 | # CONFIG_SLOB is not set |
89 | CONFIG_RT_MUTEXES=y | 90 | CONFIG_RT_MUTEXES=y |
90 | # CONFIG_TINY_SHMEM is not set | 91 | # CONFIG_TINY_SHMEM is not set |
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig index 295207030c60..1ccf3ed7693e 100644 --- a/arch/powerpc/configs/pasemi_defconfig +++ b/arch/powerpc/configs/pasemi_defconfig | |||
@@ -90,8 +90,9 @@ CONFIG_TIMERFD=y | |||
90 | CONFIG_EVENTFD=y | 90 | CONFIG_EVENTFD=y |
91 | CONFIG_SHMEM=y | 91 | CONFIG_SHMEM=y |
92 | CONFIG_VM_EVENT_COUNTERS=y | 92 | CONFIG_VM_EVENT_COUNTERS=y |
93 | CONFIG_SLAB=y | 93 | CONFIG_SLUB_DEBUG=y |
94 | # CONFIG_SLUB is not set | 94 | # CONFIG_SLAB is not set |
95 | CONFIG_SLUB=y | ||
95 | # CONFIG_SLOB is not set | 96 | # CONFIG_SLOB is not set |
96 | CONFIG_RT_MUTEXES=y | 97 | CONFIG_RT_MUTEXES=y |
97 | # CONFIG_TINY_SHMEM is not set | 98 | # CONFIG_TINY_SHMEM is not set |
@@ -1588,7 +1589,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1588 | CONFIG_SCHED_DEBUG=y | 1589 | CONFIG_SCHED_DEBUG=y |
1589 | # CONFIG_SCHEDSTATS is not set | 1590 | # CONFIG_SCHEDSTATS is not set |
1590 | # CONFIG_TIMER_STATS is not set | 1591 | # CONFIG_TIMER_STATS is not set |
1591 | # CONFIG_DEBUG_SLAB is not set | 1592 | # CONFIG_SLUB_DEBUG_ON is not set |
1592 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1593 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1593 | # CONFIG_RT_MUTEX_TESTER is not set | 1594 | # CONFIG_RT_MUTEX_TESTER is not set |
1594 | # CONFIG_DEBUG_SPINLOCK is not set | 1595 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig index cfc9c6573a3c..95b823b60c97 100644 --- a/arch/powerpc/configs/pmac32_defconfig +++ b/arch/powerpc/configs/pmac32_defconfig | |||
@@ -91,8 +91,9 @@ CONFIG_TIMERFD=y | |||
91 | CONFIG_EVENTFD=y | 91 | CONFIG_EVENTFD=y |
92 | CONFIG_SHMEM=y | 92 | CONFIG_SHMEM=y |
93 | CONFIG_VM_EVENT_COUNTERS=y | 93 | CONFIG_VM_EVENT_COUNTERS=y |
94 | CONFIG_SLAB=y | 94 | CONFIG_SLUB_DEBUG=y |
95 | # CONFIG_SLUB is not set | 95 | # CONFIG_SLAB is not set |
96 | CONFIG_SLUB=y | ||
96 | # CONFIG_SLOB is not set | 97 | # CONFIG_SLOB is not set |
97 | CONFIG_RT_MUTEXES=y | 98 | CONFIG_RT_MUTEXES=y |
98 | # CONFIG_TINY_SHMEM is not set | 99 | # CONFIG_TINY_SHMEM is not set |
@@ -1829,7 +1830,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1829 | CONFIG_SCHED_DEBUG=y | 1830 | CONFIG_SCHED_DEBUG=y |
1830 | # CONFIG_SCHEDSTATS is not set | 1831 | # CONFIG_SCHEDSTATS is not set |
1831 | # CONFIG_TIMER_STATS is not set | 1832 | # CONFIG_TIMER_STATS is not set |
1832 | # CONFIG_DEBUG_SLAB is not set | 1833 | # CONFIG_SLUB_DEBUG_ON is not set |
1833 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1834 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1834 | # CONFIG_RT_MUTEX_TESTER is not set | 1835 | # CONFIG_RT_MUTEX_TESTER is not set |
1835 | # CONFIG_DEBUG_SPINLOCK is not set | 1836 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig index 5f6224a1feb8..bb8d4e46f0c5 100644 --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs/ppc64_defconfig | |||
@@ -96,8 +96,9 @@ CONFIG_TIMERFD=y | |||
96 | CONFIG_EVENTFD=y | 96 | CONFIG_EVENTFD=y |
97 | CONFIG_SHMEM=y | 97 | CONFIG_SHMEM=y |
98 | CONFIG_VM_EVENT_COUNTERS=y | 98 | CONFIG_VM_EVENT_COUNTERS=y |
99 | CONFIG_SLAB=y | 99 | CONFIG_SLUB_DEBUG=y |
100 | # CONFIG_SLUB is not set | 100 | # CONFIG_SLAB is not set |
101 | CONFIG_SLUB=y | ||
101 | # CONFIG_SLOB is not set | 102 | # CONFIG_SLOB is not set |
102 | CONFIG_RT_MUTEXES=y | 103 | CONFIG_RT_MUTEXES=y |
103 | # CONFIG_TINY_SHMEM is not set | 104 | # CONFIG_TINY_SHMEM is not set |
@@ -216,6 +217,10 @@ CONFIG_AXON_RAM=m | |||
216 | # | 217 | # |
217 | # Kernel options | 218 | # Kernel options |
218 | # | 219 | # |
220 | CONFIG_TICK_ONESHOT=y | ||
221 | CONFIG_NO_HZ=y | ||
222 | CONFIG_HIGH_RES_TIMERS=y | ||
223 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
219 | # CONFIG_HZ_100 is not set | 224 | # CONFIG_HZ_100 is not set |
220 | CONFIG_HZ_250=y | 225 | CONFIG_HZ_250=y |
221 | # CONFIG_HZ_300 is not set | 226 | # CONFIG_HZ_300 is not set |
@@ -1750,7 +1755,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1750 | CONFIG_SCHED_DEBUG=y | 1755 | CONFIG_SCHED_DEBUG=y |
1751 | # CONFIG_SCHEDSTATS is not set | 1756 | # CONFIG_SCHEDSTATS is not set |
1752 | # CONFIG_TIMER_STATS is not set | 1757 | # CONFIG_TIMER_STATS is not set |
1753 | # CONFIG_DEBUG_SLAB is not set | 1758 | # CONFIG_SLUB_DEBUG_ON is not set |
1754 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1759 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1755 | # CONFIG_RT_MUTEX_TESTER is not set | 1760 | # CONFIG_RT_MUTEX_TESTER is not set |
1756 | # CONFIG_DEBUG_SPINLOCK is not set | 1761 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/pq2fads_defconfig b/arch/powerpc/configs/pq2fads_defconfig index a51fc39dea4e..9191f557b044 100644 --- a/arch/powerpc/configs/pq2fads_defconfig +++ b/arch/powerpc/configs/pq2fads_defconfig | |||
@@ -86,8 +86,9 @@ CONFIG_TIMERFD=y | |||
86 | CONFIG_EVENTFD=y | 86 | CONFIG_EVENTFD=y |
87 | CONFIG_SHMEM=y | 87 | CONFIG_SHMEM=y |
88 | CONFIG_VM_EVENT_COUNTERS=y | 88 | CONFIG_VM_EVENT_COUNTERS=y |
89 | CONFIG_SLAB=y | 89 | CONFIG_SLUB_DEBUG=y |
90 | # CONFIG_SLUB is not set | 90 | # CONFIG_SLAB is not set |
91 | CONFIG_SLUB=y | ||
91 | # CONFIG_SLOB is not set | 92 | # CONFIG_SLOB is not set |
92 | CONFIG_RT_MUTEXES=y | 93 | CONFIG_RT_MUTEXES=y |
93 | # CONFIG_TINY_SHMEM is not set | 94 | # CONFIG_TINY_SHMEM is not set |
@@ -930,7 +931,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
930 | # CONFIG_SCHED_DEBUG is not set | 931 | # CONFIG_SCHED_DEBUG is not set |
931 | # CONFIG_SCHEDSTATS is not set | 932 | # CONFIG_SCHEDSTATS is not set |
932 | # CONFIG_TIMER_STATS is not set | 933 | # CONFIG_TIMER_STATS is not set |
933 | # CONFIG_DEBUG_SLAB is not set | 934 | # CONFIG_SLUB_DEBUG_ON is not set |
934 | # CONFIG_DEBUG_RT_MUTEXES is not set | 935 | # CONFIG_DEBUG_RT_MUTEXES is not set |
935 | # CONFIG_RT_MUTEX_TESTER is not set | 936 | # CONFIG_RT_MUTEX_TESTER is not set |
936 | # CONFIG_DEBUG_SPINLOCK is not set | 937 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/prpmc2800_defconfig b/arch/powerpc/configs/prpmc2800_defconfig index cce3d3da086b..3e87faf9b5c2 100644 --- a/arch/powerpc/configs/prpmc2800_defconfig +++ b/arch/powerpc/configs/prpmc2800_defconfig | |||
@@ -89,8 +89,9 @@ CONFIG_TIMERFD=y | |||
89 | CONFIG_EVENTFD=y | 89 | CONFIG_EVENTFD=y |
90 | CONFIG_SHMEM=y | 90 | CONFIG_SHMEM=y |
91 | CONFIG_VM_EVENT_COUNTERS=y | 91 | CONFIG_VM_EVENT_COUNTERS=y |
92 | CONFIG_SLAB=y | 92 | CONFIG_SLUB_DEBUG=y |
93 | # CONFIG_SLUB is not set | 93 | # CONFIG_SLAB is not set |
94 | CONFIG_SLUB=y | ||
94 | # CONFIG_SLOB is not set | 95 | # CONFIG_SLOB is not set |
95 | CONFIG_RT_MUTEXES=y | 96 | CONFIG_RT_MUTEXES=y |
96 | # CONFIG_TINY_SHMEM is not set | 97 | # CONFIG_TINY_SHMEM is not set |
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig index ca7a197998ee..3566c448bdc0 100644 --- a/arch/powerpc/configs/ps3_defconfig +++ b/arch/powerpc/configs/ps3_defconfig | |||
@@ -91,8 +91,9 @@ CONFIG_TIMERFD=y | |||
91 | CONFIG_EVENTFD=y | 91 | CONFIG_EVENTFD=y |
92 | CONFIG_SHMEM=y | 92 | CONFIG_SHMEM=y |
93 | CONFIG_VM_EVENT_COUNTERS=y | 93 | CONFIG_VM_EVENT_COUNTERS=y |
94 | CONFIG_SLAB=y | 94 | CONFIG_SLUB_DEBUG=y |
95 | # CONFIG_SLUB is not set | 95 | # CONFIG_SLAB is not set |
96 | CONFIG_SLUB=y | ||
96 | # CONFIG_SLOB is not set | 97 | # CONFIG_SLOB is not set |
97 | CONFIG_RT_MUTEXES=y | 98 | CONFIG_RT_MUTEXES=y |
98 | # CONFIG_TINY_SHMEM is not set | 99 | # CONFIG_TINY_SHMEM is not set |
@@ -1059,7 +1060,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1059 | CONFIG_SCHED_DEBUG=y | 1060 | CONFIG_SCHED_DEBUG=y |
1060 | # CONFIG_SCHEDSTATS is not set | 1061 | # CONFIG_SCHEDSTATS is not set |
1061 | # CONFIG_TIMER_STATS is not set | 1062 | # CONFIG_TIMER_STATS is not set |
1062 | # CONFIG_DEBUG_SLAB is not set | 1063 | # CONFIG_SLUB_DEBUG_ON is not set |
1063 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1064 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1064 | # CONFIG_RT_MUTEX_TESTER is not set | 1065 | # CONFIG_RT_MUTEX_TESTER is not set |
1065 | CONFIG_DEBUG_SPINLOCK=y | 1066 | CONFIG_DEBUG_SPINLOCK=y |
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig index 0f274e5f6926..c09eb8cfbe71 100644 --- a/arch/powerpc/configs/pseries_defconfig +++ b/arch/powerpc/configs/pseries_defconfig | |||
@@ -96,8 +96,9 @@ CONFIG_TIMERFD=y | |||
96 | CONFIG_EVENTFD=y | 96 | CONFIG_EVENTFD=y |
97 | CONFIG_SHMEM=y | 97 | CONFIG_SHMEM=y |
98 | CONFIG_VM_EVENT_COUNTERS=y | 98 | CONFIG_VM_EVENT_COUNTERS=y |
99 | CONFIG_SLAB=y | 99 | CONFIG_SLUB_DEBUG=y |
100 | # CONFIG_SLUB is not set | 100 | # CONFIG_SLAB is not set |
101 | CONFIG_SLUB=y | ||
101 | # CONFIG_SLOB is not set | 102 | # CONFIG_SLOB is not set |
102 | CONFIG_RT_MUTEXES=y | 103 | CONFIG_RT_MUTEXES=y |
103 | # CONFIG_TINY_SHMEM is not set | 104 | # CONFIG_TINY_SHMEM is not set |
@@ -176,6 +177,10 @@ CONFIG_IBMEBUS=y | |||
176 | # | 177 | # |
177 | # Kernel options | 178 | # Kernel options |
178 | # | 179 | # |
180 | CONFIG_TICK_ONESHOT=y | ||
181 | CONFIG_NO_HZ=y | ||
182 | CONFIG_HIGH_RES_TIMERS=y | ||
183 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
179 | # CONFIG_HZ_100 is not set | 184 | # CONFIG_HZ_100 is not set |
180 | CONFIG_HZ_250=y | 185 | CONFIG_HZ_250=y |
181 | # CONFIG_HZ_300 is not set | 186 | # CONFIG_HZ_300 is not set |
@@ -1504,7 +1509,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1504 | CONFIG_SCHED_DEBUG=y | 1509 | CONFIG_SCHED_DEBUG=y |
1505 | # CONFIG_SCHEDSTATS is not set | 1510 | # CONFIG_SCHEDSTATS is not set |
1506 | # CONFIG_TIMER_STATS is not set | 1511 | # CONFIG_TIMER_STATS is not set |
1507 | # CONFIG_DEBUG_SLAB is not set | 1512 | # CONFIG_SLUB_DEBUG_ON is not set |
1508 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1513 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1509 | # CONFIG_RT_MUTEX_TESTER is not set | 1514 | # CONFIG_RT_MUTEX_TESTER is not set |
1510 | # CONFIG_DEBUG_SPINLOCK is not set | 1515 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/sequoia_defconfig b/arch/powerpc/configs/sequoia_defconfig index bc7f5089a894..45a4ca0e0d7d 100644 --- a/arch/powerpc/configs/sequoia_defconfig +++ b/arch/powerpc/configs/sequoia_defconfig | |||
@@ -91,8 +91,9 @@ CONFIG_TIMERFD=y | |||
91 | CONFIG_EVENTFD=y | 91 | CONFIG_EVENTFD=y |
92 | CONFIG_SHMEM=y | 92 | CONFIG_SHMEM=y |
93 | CONFIG_VM_EVENT_COUNTERS=y | 93 | CONFIG_VM_EVENT_COUNTERS=y |
94 | CONFIG_SLAB=y | 94 | CONFIG_SLUB_DEBUG=y |
95 | # CONFIG_SLUB is not set | 95 | # CONFIG_SLAB is not set |
96 | CONFIG_SLUB=y | ||
96 | # CONFIG_SLOB is not set | 97 | # CONFIG_SLOB is not set |
97 | CONFIG_RT_MUTEXES=y | 98 | CONFIG_RT_MUTEXES=y |
98 | # CONFIG_TINY_SHMEM is not set | 99 | # CONFIG_TINY_SHMEM is not set |
@@ -781,7 +782,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
781 | CONFIG_SCHED_DEBUG=y | 782 | CONFIG_SCHED_DEBUG=y |
782 | # CONFIG_SCHEDSTATS is not set | 783 | # CONFIG_SCHEDSTATS is not set |
783 | # CONFIG_TIMER_STATS is not set | 784 | # CONFIG_TIMER_STATS is not set |
784 | # CONFIG_DEBUG_SLAB is not set | 785 | # CONFIG_SLUB_DEBUG_ON is not set |
785 | # CONFIG_DEBUG_RT_MUTEXES is not set | 786 | # CONFIG_DEBUG_RT_MUTEXES is not set |
786 | # CONFIG_RT_MUTEX_TESTER is not set | 787 | # CONFIG_RT_MUTEX_TESTER is not set |
787 | # CONFIG_DEBUG_SPINLOCK is not set | 788 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/configs/walnut_defconfig b/arch/powerpc/configs/walnut_defconfig index 766bf840c18d..7724292cc06d 100644 --- a/arch/powerpc/configs/walnut_defconfig +++ b/arch/powerpc/configs/walnut_defconfig | |||
@@ -87,8 +87,9 @@ CONFIG_TIMERFD=y | |||
87 | CONFIG_EVENTFD=y | 87 | CONFIG_EVENTFD=y |
88 | CONFIG_SHMEM=y | 88 | CONFIG_SHMEM=y |
89 | CONFIG_VM_EVENT_COUNTERS=y | 89 | CONFIG_VM_EVENT_COUNTERS=y |
90 | CONFIG_SLAB=y | 90 | CONFIG_SLUB_DEBUG=y |
91 | # CONFIG_SLUB is not set | 91 | # CONFIG_SLAB is not set |
92 | CONFIG_SLUB=y | ||
92 | # CONFIG_SLOB is not set | 93 | # CONFIG_SLOB is not set |
93 | CONFIG_RT_MUTEXES=y | 94 | CONFIG_RT_MUTEXES=y |
94 | # CONFIG_TINY_SHMEM is not set | 95 | # CONFIG_TINY_SHMEM is not set |
@@ -706,7 +707,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
706 | CONFIG_SCHED_DEBUG=y | 707 | CONFIG_SCHED_DEBUG=y |
707 | # CONFIG_SCHEDSTATS is not set | 708 | # CONFIG_SCHEDSTATS is not set |
708 | # CONFIG_TIMER_STATS is not set | 709 | # CONFIG_TIMER_STATS is not set |
709 | # CONFIG_DEBUG_SLAB is not set | 710 | # CONFIG_SLUB_DEBUG_ON is not set |
710 | # CONFIG_DEBUG_RT_MUTEXES is not set | 711 | # CONFIG_DEBUG_RT_MUTEXES is not set |
711 | # CONFIG_RT_MUTEX_TESTER is not set | 712 | # CONFIG_RT_MUTEX_TESTER is not set |
712 | # CONFIG_DEBUG_SPINLOCK is not set | 713 | # CONFIG_DEBUG_SPINLOCK is not set |
diff --git a/arch/powerpc/kernel/binfmt_elf32.c b/arch/powerpc/kernel/binfmt_elf32.c index 5cb58757e1b1..1d45d7782d4e 100644 --- a/arch/powerpc/kernel/binfmt_elf32.c +++ b/arch/powerpc/kernel/binfmt_elf32.c | |||
@@ -13,49 +13,44 @@ | |||
13 | * 2 of the License, or (at your option) any later version. | 13 | * 2 of the License, or (at your option) any later version. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #define ELF_ARCH EM_PPC | ||
17 | #define ELF_CLASS ELFCLASS32 | ||
18 | #define ELF_DATA ELFDATA2MSB; | ||
19 | |||
20 | #include <asm/processor.h> | 16 | #include <asm/processor.h> |
21 | #include <linux/module.h> | 17 | #include <linux/module.h> |
22 | #include <linux/elfcore.h> | ||
23 | #include <linux/compat.h> | 18 | #include <linux/compat.h> |
19 | #include <linux/elfcore-compat.h> | ||
20 | |||
21 | #undef ELF_ARCH | ||
22 | #undef ELF_CLASS | ||
23 | #define ELF_CLASS ELFCLASS32 | ||
24 | #define ELF_ARCH EM_PPC | ||
25 | |||
26 | #undef elfhdr | ||
27 | #undef elf_phdr | ||
28 | #undef elf_note | ||
29 | #undef elf_addr_t | ||
30 | #define elfhdr elf32_hdr | ||
31 | #define elf_phdr elf32_phdr | ||
32 | #define elf_note elf32_note | ||
33 | #define elf_addr_t Elf32_Off | ||
24 | 34 | ||
25 | #define elf_prstatus elf_prstatus32 | 35 | #define elf_prstatus compat_elf_prstatus |
26 | struct elf_prstatus32 | 36 | #define elf_prpsinfo compat_elf_prpsinfo |
37 | |||
38 | #define elf_core_copy_regs compat_elf_core_copy_regs | ||
39 | static inline void compat_elf_core_copy_regs(compat_elf_gregset_t *elf_regs, | ||
40 | struct pt_regs *regs) | ||
27 | { | 41 | { |
28 | struct elf_siginfo pr_info; /* Info associated with signal */ | 42 | PPC_ELF_CORE_COPY_REGS((*elf_regs), regs); |
29 | short pr_cursig; /* Current signal */ | 43 | } |
30 | unsigned int pr_sigpend; /* Set of pending signals */ | ||
31 | unsigned int pr_sighold; /* Set of held signals */ | ||
32 | pid_t pr_pid; | ||
33 | pid_t pr_ppid; | ||
34 | pid_t pr_pgrp; | ||
35 | pid_t pr_sid; | ||
36 | struct compat_timeval pr_utime; /* User time */ | ||
37 | struct compat_timeval pr_stime; /* System time */ | ||
38 | struct compat_timeval pr_cutime; /* Cumulative user time */ | ||
39 | struct compat_timeval pr_cstime; /* Cumulative system time */ | ||
40 | elf_gregset_t pr_reg; /* General purpose registers. */ | ||
41 | int pr_fpvalid; /* True if math co-processor being used. */ | ||
42 | }; | ||
43 | 44 | ||
44 | #define elf_prpsinfo elf_prpsinfo32 | 45 | #define elf_core_copy_task_regs compat_elf_core_copy_task_regs |
45 | struct elf_prpsinfo32 | 46 | static int compat_elf_core_copy_task_regs(struct task_struct *tsk, |
47 | compat_elf_gregset_t *elf_regs) | ||
46 | { | 48 | { |
47 | char pr_state; /* numeric process state */ | 49 | struct pt_regs *regs = tsk->thread.regs; |
48 | char pr_sname; /* char for pr_state */ | 50 | if (regs) |
49 | char pr_zomb; /* zombie */ | 51 | compat_elf_core_copy_regs(elf_regs, regs); |
50 | char pr_nice; /* nice val */ | 52 | return 1; |
51 | unsigned int pr_flag; /* flags */ | 53 | } |
52 | u32 pr_uid; | ||
53 | u32 pr_gid; | ||
54 | pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid; | ||
55 | /* Lots missing */ | ||
56 | char pr_fname[16]; /* filename of executable */ | ||
57 | char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */ | ||
58 | }; | ||
59 | 54 | ||
60 | #include <linux/time.h> | 55 | #include <linux/time.h> |
61 | 56 | ||
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 0ec134034899..148a3547c9aa 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -408,6 +408,12 @@ END_FTR_SECTION_IFSET(CPU_FTR_1T_SEGMENT) | |||
408 | std r7,SLBSHADOW_STACKVSID(r9) /* Save VSID */ | 408 | std r7,SLBSHADOW_STACKVSID(r9) /* Save VSID */ |
409 | std r0,SLBSHADOW_STACKESID(r9) /* Save ESID */ | 409 | std r0,SLBSHADOW_STACKESID(r9) /* Save ESID */ |
410 | 410 | ||
411 | /* No need to check for CPU_FTR_NO_SLBIE_B here, since when | ||
412 | * we have 1TB segments, the only CPUs known to have the errata | ||
413 | * only support less than 1TB of system memory and we'll never | ||
414 | * actually hit this code path. | ||
415 | */ | ||
416 | |||
411 | slbie r6 | 417 | slbie r6 |
412 | slbie r6 /* Workaround POWER5 < DD2.1 issue */ | 418 | slbie r6 /* Workaround POWER5 < DD2.1 issue */ |
413 | slbmte r7,r0 | 419 | slbmte r7,r0 |
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c index 2e16ca5778a3..289d7e935918 100644 --- a/arch/powerpc/kernel/ibmebus.c +++ b/arch/powerpc/kernel/ibmebus.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/kobject.h> | 41 | #include <linux/kobject.h> |
42 | #include <linux/dma-mapping.h> | 42 | #include <linux/dma-mapping.h> |
43 | #include <linux/interrupt.h> | 43 | #include <linux/interrupt.h> |
44 | #include <linux/of_platform.h> | ||
44 | #include <asm/ibmebus.h> | 45 | #include <asm/ibmebus.h> |
45 | #include <asm/abs_addr.h> | 46 | #include <asm/abs_addr.h> |
46 | 47 | ||
@@ -50,6 +51,13 @@ static struct device ibmebus_bus_device = { /* fake "parent" device */ | |||
50 | 51 | ||
51 | struct bus_type ibmebus_bus_type; | 52 | struct bus_type ibmebus_bus_type; |
52 | 53 | ||
54 | /* These devices will automatically be added to the bus during init */ | ||
55 | static struct of_device_id builtin_matches[] = { | ||
56 | { .compatible = "IBM,lhca" }, | ||
57 | { .compatible = "IBM,lhea" }, | ||
58 | {}, | ||
59 | }; | ||
60 | |||
53 | static void *ibmebus_alloc_coherent(struct device *dev, | 61 | static void *ibmebus_alloc_coherent(struct device *dev, |
54 | size_t size, | 62 | size_t size, |
55 | dma_addr_t *dma_handle, | 63 | dma_addr_t *dma_handle, |
@@ -124,190 +132,87 @@ static struct dma_mapping_ops ibmebus_dma_ops = { | |||
124 | .dma_supported = ibmebus_dma_supported, | 132 | .dma_supported = ibmebus_dma_supported, |
125 | }; | 133 | }; |
126 | 134 | ||
127 | static int ibmebus_bus_probe(struct device *dev) | 135 | static int ibmebus_match_path(struct device *dev, void *data) |
128 | { | 136 | { |
129 | struct ibmebus_dev *ibmebusdev = to_ibmebus_dev(dev); | 137 | struct device_node *dn = to_of_device(dev)->node; |
130 | struct ibmebus_driver *ibmebusdrv = to_ibmebus_driver(dev->driver); | 138 | return (dn->full_name && |
131 | const struct of_device_id *id; | 139 | (strcasecmp((char *)data, dn->full_name) == 0)); |
132 | int error = -ENODEV; | ||
133 | |||
134 | if (!ibmebusdrv->probe) | ||
135 | return error; | ||
136 | |||
137 | id = of_match_device(ibmebusdrv->id_table, &ibmebusdev->ofdev); | ||
138 | if (id) { | ||
139 | error = ibmebusdrv->probe(ibmebusdev, id); | ||
140 | } | ||
141 | |||
142 | return error; | ||
143 | } | 140 | } |
144 | 141 | ||
145 | static int ibmebus_bus_remove(struct device *dev) | 142 | static int ibmebus_match_node(struct device *dev, void *data) |
146 | { | 143 | { |
147 | struct ibmebus_dev *ibmebusdev = to_ibmebus_dev(dev); | 144 | return to_of_device(dev)->node == data; |
148 | struct ibmebus_driver *ibmebusdrv = to_ibmebus_driver(dev->driver); | ||
149 | |||
150 | if (ibmebusdrv->remove) { | ||
151 | return ibmebusdrv->remove(ibmebusdev); | ||
152 | } | ||
153 | |||
154 | return 0; | ||
155 | } | 145 | } |
156 | 146 | ||
157 | static void __devinit ibmebus_dev_release(struct device *dev) | 147 | static int ibmebus_create_device(struct device_node *dn) |
158 | { | 148 | { |
159 | of_node_put(to_ibmebus_dev(dev)->ofdev.node); | 149 | struct of_device *dev; |
160 | kfree(to_ibmebus_dev(dev)); | 150 | int ret; |
161 | } | ||
162 | |||
163 | static int __devinit ibmebus_register_device_common( | ||
164 | struct ibmebus_dev *dev, const char *name) | ||
165 | { | ||
166 | int err = 0; | ||
167 | |||
168 | dev->ofdev.dev.parent = &ibmebus_bus_device; | ||
169 | dev->ofdev.dev.bus = &ibmebus_bus_type; | ||
170 | dev->ofdev.dev.release = ibmebus_dev_release; | ||
171 | 151 | ||
172 | dev->ofdev.dev.archdata.of_node = dev->ofdev.node; | 152 | dev = of_device_alloc(dn, NULL, &ibmebus_bus_device); |
173 | dev->ofdev.dev.archdata.dma_ops = &ibmebus_dma_ops; | ||
174 | dev->ofdev.dev.archdata.numa_node = of_node_to_nid(dev->ofdev.node); | ||
175 | |||
176 | /* An ibmebusdev is based on a of_device. We have to change the | ||
177 | * bus type to use our own DMA mapping operations. | ||
178 | */ | ||
179 | if ((err = of_device_register(&dev->ofdev)) != 0) { | ||
180 | printk(KERN_ERR "%s: failed to register device (%d).\n", | ||
181 | __FUNCTION__, err); | ||
182 | return -ENODEV; | ||
183 | } | ||
184 | |||
185 | return 0; | ||
186 | } | ||
187 | |||
188 | static struct ibmebus_dev* __devinit ibmebus_register_device_node( | ||
189 | struct device_node *dn) | ||
190 | { | ||
191 | struct ibmebus_dev *dev; | ||
192 | int i, len, bus_len; | ||
193 | |||
194 | dev = kzalloc(sizeof(struct ibmebus_dev), GFP_KERNEL); | ||
195 | if (!dev) | 153 | if (!dev) |
196 | return ERR_PTR(-ENOMEM); | 154 | return -ENOMEM; |
197 | |||
198 | dev->ofdev.node = of_node_get(dn); | ||
199 | |||
200 | len = strlen(dn->full_name + 1); | ||
201 | bus_len = min(len, BUS_ID_SIZE - 1); | ||
202 | memcpy(dev->ofdev.dev.bus_id, dn->full_name + 1 | ||
203 | + (len - bus_len), bus_len); | ||
204 | for (i = 0; i < bus_len; i++) | ||
205 | if (dev->ofdev.dev.bus_id[i] == '/') | ||
206 | dev->ofdev.dev.bus_id[i] = '_'; | ||
207 | |||
208 | /* Register with generic device framework. */ | ||
209 | if (ibmebus_register_device_common(dev, dn->name) != 0) { | ||
210 | kfree(dev); | ||
211 | return ERR_PTR(-ENODEV); | ||
212 | } | ||
213 | |||
214 | return dev; | ||
215 | } | ||
216 | |||
217 | static void ibmebus_probe_of_nodes(char* name) | ||
218 | { | ||
219 | struct device_node *dn = NULL; | ||
220 | |||
221 | while ((dn = of_find_node_by_name(dn, name))) { | ||
222 | if (IS_ERR(ibmebus_register_device_node(dn))) { | ||
223 | of_node_put(dn); | ||
224 | return; | ||
225 | } | ||
226 | } | ||
227 | |||
228 | of_node_put(dn); | ||
229 | 155 | ||
230 | return; | 156 | dev->dev.bus = &ibmebus_bus_type; |
231 | } | 157 | dev->dev.archdata.dma_ops = &ibmebus_dma_ops; |
232 | 158 | ||
233 | static void ibmebus_add_devices_by_id(struct of_device_id *idt) | 159 | ret = of_device_register(dev); |
234 | { | 160 | if (ret) { |
235 | while (strlen(idt->name) > 0) { | 161 | of_device_free(dev); |
236 | ibmebus_probe_of_nodes(idt->name); | 162 | return ret; |
237 | idt++; | ||
238 | } | 163 | } |
239 | 164 | ||
240 | return; | ||
241 | } | ||
242 | |||
243 | static int ibmebus_match_name(struct device *dev, void *data) | ||
244 | { | ||
245 | const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); | ||
246 | const char *name; | ||
247 | |||
248 | name = of_get_property(ebus_dev->ofdev.node, "name", NULL); | ||
249 | |||
250 | if (name && (strcmp(data, name) == 0)) | ||
251 | return 1; | ||
252 | |||
253 | return 0; | 165 | return 0; |
254 | } | 166 | } |
255 | 167 | ||
256 | static int ibmebus_unregister_device(struct device *dev) | 168 | static int ibmebus_create_devices(const struct of_device_id *matches) |
257 | { | 169 | { |
258 | of_device_unregister(to_of_device(dev)); | 170 | struct device_node *root, *child; |
171 | int ret = 0; | ||
259 | 172 | ||
260 | return 0; | 173 | root = of_find_node_by_path("/"); |
261 | } | ||
262 | 174 | ||
263 | static void ibmebus_remove_devices_by_id(struct of_device_id *idt) | 175 | for (child = NULL; (child = of_get_next_child(root, child)); ) { |
264 | { | 176 | if (!of_match_node(matches, child)) |
265 | struct device *dev; | 177 | continue; |
266 | 178 | ||
267 | while (strlen(idt->name) > 0) { | 179 | if (bus_find_device(&ibmebus_bus_type, NULL, child, |
268 | while ((dev = bus_find_device(&ibmebus_bus_type, NULL, | 180 | ibmebus_match_node)) |
269 | (void*)idt->name, | 181 | continue; |
270 | ibmebus_match_name))) { | 182 | |
271 | ibmebus_unregister_device(dev); | 183 | ret = ibmebus_create_device(child); |
184 | if (ret) { | ||
185 | printk(KERN_ERR "%s: failed to create device (%i)", | ||
186 | __FUNCTION__, ret); | ||
187 | of_node_put(child); | ||
188 | break; | ||
272 | } | 189 | } |
273 | idt++; | ||
274 | } | 190 | } |
275 | 191 | ||
276 | return; | 192 | of_node_put(root); |
193 | return ret; | ||
277 | } | 194 | } |
278 | 195 | ||
279 | int ibmebus_register_driver(struct ibmebus_driver *drv) | 196 | int ibmebus_register_driver(struct of_platform_driver *drv) |
280 | { | 197 | { |
281 | int err = 0; | 198 | /* If the driver uses devices that ibmebus doesn't know, add them */ |
199 | ibmebus_create_devices(drv->match_table); | ||
282 | 200 | ||
283 | drv->driver.name = drv->name; | 201 | drv->driver.name = drv->name; |
284 | drv->driver.bus = &ibmebus_bus_type; | 202 | drv->driver.bus = &ibmebus_bus_type; |
285 | drv->driver.probe = ibmebus_bus_probe; | ||
286 | drv->driver.remove = ibmebus_bus_remove; | ||
287 | 203 | ||
288 | if ((err = driver_register(&drv->driver) != 0)) | 204 | return driver_register(&drv->driver); |
289 | return err; | ||
290 | |||
291 | /* remove all supported devices first, in case someone | ||
292 | * probed them manually before registering the driver */ | ||
293 | ibmebus_remove_devices_by_id(drv->id_table); | ||
294 | ibmebus_add_devices_by_id(drv->id_table); | ||
295 | |||
296 | return 0; | ||
297 | } | 205 | } |
298 | EXPORT_SYMBOL(ibmebus_register_driver); | 206 | EXPORT_SYMBOL(ibmebus_register_driver); |
299 | 207 | ||
300 | void ibmebus_unregister_driver(struct ibmebus_driver *drv) | 208 | void ibmebus_unregister_driver(struct of_platform_driver *drv) |
301 | { | 209 | { |
302 | driver_unregister(&drv->driver); | 210 | driver_unregister(&drv->driver); |
303 | ibmebus_remove_devices_by_id(drv->id_table); | ||
304 | } | 211 | } |
305 | EXPORT_SYMBOL(ibmebus_unregister_driver); | 212 | EXPORT_SYMBOL(ibmebus_unregister_driver); |
306 | 213 | ||
307 | int ibmebus_request_irq(struct ibmebus_dev *dev, | 214 | int ibmebus_request_irq(u32 ist, irq_handler_t handler, |
308 | u32 ist, | 215 | unsigned long irq_flags, const char *devname, |
309 | irq_handler_t handler, | ||
310 | unsigned long irq_flags, const char * devname, | ||
311 | void *dev_id) | 216 | void *dev_id) |
312 | { | 217 | { |
313 | unsigned int irq = irq_create_mapping(NULL, ist); | 218 | unsigned int irq = irq_create_mapping(NULL, ist); |
@@ -315,12 +220,11 @@ int ibmebus_request_irq(struct ibmebus_dev *dev, | |||
315 | if (irq == NO_IRQ) | 220 | if (irq == NO_IRQ) |
316 | return -EINVAL; | 221 | return -EINVAL; |
317 | 222 | ||
318 | return request_irq(irq, handler, | 223 | return request_irq(irq, handler, irq_flags, devname, dev_id); |
319 | irq_flags, devname, dev_id); | ||
320 | } | 224 | } |
321 | EXPORT_SYMBOL(ibmebus_request_irq); | 225 | EXPORT_SYMBOL(ibmebus_request_irq); |
322 | 226 | ||
323 | void ibmebus_free_irq(struct ibmebus_dev *dev, u32 ist, void *dev_id) | 227 | void ibmebus_free_irq(u32 ist, void *dev_id) |
324 | { | 228 | { |
325 | unsigned int irq = irq_find_mapping(NULL, ist); | 229 | unsigned int irq = irq_find_mapping(NULL, ist); |
326 | 230 | ||
@@ -328,29 +232,10 @@ void ibmebus_free_irq(struct ibmebus_dev *dev, u32 ist, void *dev_id) | |||
328 | } | 232 | } |
329 | EXPORT_SYMBOL(ibmebus_free_irq); | 233 | EXPORT_SYMBOL(ibmebus_free_irq); |
330 | 234 | ||
331 | static int ibmebus_bus_match(struct device *dev, struct device_driver *drv) | ||
332 | { | ||
333 | const struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); | ||
334 | struct ibmebus_driver *ebus_drv = to_ibmebus_driver(drv); | ||
335 | const struct of_device_id *ids = ebus_drv->id_table; | ||
336 | const struct of_device_id *found_id; | ||
337 | |||
338 | if (!ids) | ||
339 | return 0; | ||
340 | |||
341 | found_id = of_match_device(ids, &ebus_dev->ofdev); | ||
342 | if (found_id) | ||
343 | return 1; | ||
344 | |||
345 | return 0; | ||
346 | } | ||
347 | |||
348 | static ssize_t name_show(struct device *dev, | 235 | static ssize_t name_show(struct device *dev, |
349 | struct device_attribute *attr, char *buf) | 236 | struct device_attribute *attr, char *buf) |
350 | { | 237 | { |
351 | struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev); | 238 | return sprintf(buf, "%s\n", to_of_device(dev)->node->name); |
352 | const char *name = of_get_property(ebus_dev->ofdev.node, "name", NULL); | ||
353 | return sprintf(buf, "%s\n", name); | ||
354 | } | 239 | } |
355 | 240 | ||
356 | static struct device_attribute ibmebus_dev_attrs[] = { | 241 | static struct device_attribute ibmebus_dev_attrs[] = { |
@@ -358,18 +243,6 @@ static struct device_attribute ibmebus_dev_attrs[] = { | |||
358 | __ATTR_NULL | 243 | __ATTR_NULL |
359 | }; | 244 | }; |
360 | 245 | ||
361 | static int ibmebus_match_path(struct device *dev, void *data) | ||
362 | { | ||
363 | int rc; | ||
364 | struct device_node *dn = | ||
365 | of_node_get(to_ibmebus_dev(dev)->ofdev.node); | ||
366 | |||
367 | rc = (dn->full_name && (strcasecmp((char*)data, dn->full_name) == 0)); | ||
368 | |||
369 | of_node_put(dn); | ||
370 | return rc; | ||
371 | } | ||
372 | |||
373 | static char *ibmebus_chomp(const char *in, size_t count) | 246 | static char *ibmebus_chomp(const char *in, size_t count) |
374 | { | 247 | { |
375 | char *out = kmalloc(count + 1, GFP_KERNEL); | 248 | char *out = kmalloc(count + 1, GFP_KERNEL); |
@@ -389,9 +262,8 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus, | |||
389 | const char *buf, size_t count) | 262 | const char *buf, size_t count) |
390 | { | 263 | { |
391 | struct device_node *dn = NULL; | 264 | struct device_node *dn = NULL; |
392 | struct ibmebus_dev *dev; | ||
393 | char *path; | 265 | char *path; |
394 | ssize_t rc; | 266 | ssize_t rc = 0; |
395 | 267 | ||
396 | path = ibmebus_chomp(buf, count); | 268 | path = ibmebus_chomp(buf, count); |
397 | if (!path) | 269 | if (!path) |
@@ -406,9 +278,8 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus, | |||
406 | } | 278 | } |
407 | 279 | ||
408 | if ((dn = of_find_node_by_path(path))) { | 280 | if ((dn = of_find_node_by_path(path))) { |
409 | dev = ibmebus_register_device_node(dn); | 281 | rc = ibmebus_create_device(dn); |
410 | of_node_put(dn); | 282 | of_node_put(dn); |
411 | rc = IS_ERR(dev) ? PTR_ERR(dev) : count; | ||
412 | } else { | 283 | } else { |
413 | printk(KERN_WARNING "%s: no such device node: %s\n", | 284 | printk(KERN_WARNING "%s: no such device node: %s\n", |
414 | __FUNCTION__, path); | 285 | __FUNCTION__, path); |
@@ -417,7 +288,9 @@ static ssize_t ibmebus_store_probe(struct bus_type *bus, | |||
417 | 288 | ||
418 | out: | 289 | out: |
419 | kfree(path); | 290 | kfree(path); |
420 | return rc; | 291 | if (rc) |
292 | return rc; | ||
293 | return count; | ||
421 | } | 294 | } |
422 | 295 | ||
423 | static ssize_t ibmebus_store_remove(struct bus_type *bus, | 296 | static ssize_t ibmebus_store_remove(struct bus_type *bus, |
@@ -432,7 +305,7 @@ static ssize_t ibmebus_store_remove(struct bus_type *bus, | |||
432 | 305 | ||
433 | if ((dev = bus_find_device(&ibmebus_bus_type, NULL, path, | 306 | if ((dev = bus_find_device(&ibmebus_bus_type, NULL, path, |
434 | ibmebus_match_path))) { | 307 | ibmebus_match_path))) { |
435 | ibmebus_unregister_device(dev); | 308 | of_device_unregister(to_of_device(dev)); |
436 | 309 | ||
437 | kfree(path); | 310 | kfree(path); |
438 | return count; | 311 | return count; |
@@ -452,8 +325,7 @@ static struct bus_attribute ibmebus_bus_attrs[] = { | |||
452 | }; | 325 | }; |
453 | 326 | ||
454 | struct bus_type ibmebus_bus_type = { | 327 | struct bus_type ibmebus_bus_type = { |
455 | .name = "ibmebus", | 328 | .uevent = of_device_uevent, |
456 | .match = ibmebus_bus_match, | ||
457 | .dev_attrs = ibmebus_dev_attrs, | 329 | .dev_attrs = ibmebus_dev_attrs, |
458 | .bus_attrs = ibmebus_bus_attrs | 330 | .bus_attrs = ibmebus_bus_attrs |
459 | }; | 331 | }; |
@@ -465,9 +337,9 @@ static int __init ibmebus_bus_init(void) | |||
465 | 337 | ||
466 | printk(KERN_INFO "IBM eBus Device Driver\n"); | 338 | printk(KERN_INFO "IBM eBus Device Driver\n"); |
467 | 339 | ||
468 | err = bus_register(&ibmebus_bus_type); | 340 | err = of_bus_type_init(&ibmebus_bus_type, "ibmebus"); |
469 | if (err) { | 341 | if (err) { |
470 | printk(KERN_ERR ":%s: failed to register IBM eBus.\n", | 342 | printk(KERN_ERR "%s: failed to register IBM eBus.\n", |
471 | __FUNCTION__); | 343 | __FUNCTION__); |
472 | return err; | 344 | return err; |
473 | } | 345 | } |
@@ -481,6 +353,13 @@ static int __init ibmebus_bus_init(void) | |||
481 | return err; | 353 | return err; |
482 | } | 354 | } |
483 | 355 | ||
356 | err = ibmebus_create_devices(builtin_matches); | ||
357 | if (err) { | ||
358 | device_unregister(&ibmebus_bus_device); | ||
359 | bus_unregister(&ibmebus_bus_type); | ||
360 | return err; | ||
361 | } | ||
362 | |||
484 | return 0; | 363 | return 0; |
485 | } | 364 | } |
486 | __initcall(ibmebus_bus_init); | 365 | postcore_initcall(ibmebus_bus_init); |
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c index 8f3db32fac8b..3388ad619996 100644 --- a/arch/powerpc/kernel/of_device.c +++ b/arch/powerpc/kernel/of_device.c | |||
@@ -7,8 +7,88 @@ | |||
7 | #include <linux/slab.h> | 7 | #include <linux/slab.h> |
8 | 8 | ||
9 | #include <asm/errno.h> | 9 | #include <asm/errno.h> |
10 | #include <asm/dcr.h> | ||
10 | #include <asm/of_device.h> | 11 | #include <asm/of_device.h> |
11 | 12 | ||
13 | static void of_device_make_bus_id(struct of_device *dev) | ||
14 | { | ||
15 | static atomic_t bus_no_reg_magic; | ||
16 | struct device_node *node = dev->node; | ||
17 | char *name = dev->dev.bus_id; | ||
18 | const u32 *reg; | ||
19 | u64 addr; | ||
20 | int magic; | ||
21 | |||
22 | /* | ||
23 | * If it's a DCR based device, use 'd' for native DCRs | ||
24 | * and 'D' for MMIO DCRs. | ||
25 | */ | ||
26 | #ifdef CONFIG_PPC_DCR | ||
27 | reg = of_get_property(node, "dcr-reg", NULL); | ||
28 | if (reg) { | ||
29 | #ifdef CONFIG_PPC_DCR_NATIVE | ||
30 | snprintf(name, BUS_ID_SIZE, "d%x.%s", | ||
31 | *reg, node->name); | ||
32 | #else /* CONFIG_PPC_DCR_NATIVE */ | ||
33 | addr = of_translate_dcr_address(node, *reg, NULL); | ||
34 | if (addr != OF_BAD_ADDR) { | ||
35 | snprintf(name, BUS_ID_SIZE, | ||
36 | "D%llx.%s", (unsigned long long)addr, | ||
37 | node->name); | ||
38 | return; | ||
39 | } | ||
40 | #endif /* !CONFIG_PPC_DCR_NATIVE */ | ||
41 | } | ||
42 | #endif /* CONFIG_PPC_DCR */ | ||
43 | |||
44 | /* | ||
45 | * For MMIO, get the physical address | ||
46 | */ | ||
47 | reg = of_get_property(node, "reg", NULL); | ||
48 | if (reg) { | ||
49 | addr = of_translate_address(node, reg); | ||
50 | if (addr != OF_BAD_ADDR) { | ||
51 | snprintf(name, BUS_ID_SIZE, | ||
52 | "%llx.%s", (unsigned long long)addr, | ||
53 | node->name); | ||
54 | return; | ||
55 | } | ||
56 | } | ||
57 | |||
58 | /* | ||
59 | * No BusID, use the node name and add a globally incremented | ||
60 | * counter (and pray...) | ||
61 | */ | ||
62 | magic = atomic_add_return(1, &bus_no_reg_magic); | ||
63 | snprintf(name, BUS_ID_SIZE, "%s.%d", node->name, magic - 1); | ||
64 | } | ||
65 | |||
66 | struct of_device *of_device_alloc(struct device_node *np, | ||
67 | const char *bus_id, | ||
68 | struct device *parent) | ||
69 | { | ||
70 | struct of_device *dev; | ||
71 | |||
72 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); | ||
73 | if (!dev) | ||
74 | return NULL; | ||
75 | |||
76 | dev->node = of_node_get(np); | ||
77 | dev->dev.dma_mask = &dev->dma_mask; | ||
78 | dev->dev.parent = parent; | ||
79 | dev->dev.release = of_release_dev; | ||
80 | dev->dev.archdata.of_node = np; | ||
81 | dev->dev.archdata.numa_node = of_node_to_nid(np); | ||
82 | |||
83 | if (bus_id) | ||
84 | strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE); | ||
85 | else | ||
86 | of_device_make_bus_id(dev); | ||
87 | |||
88 | return dev; | ||
89 | } | ||
90 | EXPORT_SYMBOL(of_device_alloc); | ||
91 | |||
12 | ssize_t of_device_get_modalias(struct of_device *ofdev, | 92 | ssize_t of_device_get_modalias(struct of_device *ofdev, |
13 | char *str, ssize_t len) | 93 | char *str, ssize_t len) |
14 | { | 94 | { |
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index eca8ccc3fa12..aeaa20268ce2 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/of_platform.h> | 23 | #include <linux/of_platform.h> |
24 | 24 | ||
25 | #include <asm/errno.h> | 25 | #include <asm/errno.h> |
26 | #include <asm/dcr.h> | ||
27 | #include <asm/topology.h> | 26 | #include <asm/topology.h> |
28 | #include <asm/pci-bridge.h> | 27 | #include <asm/pci-bridge.h> |
29 | #include <asm/ppc-pci.h> | 28 | #include <asm/ppc-pci.h> |
@@ -53,8 +52,6 @@ static struct of_device_id of_default_bus_ids[] = { | |||
53 | {}, | 52 | {}, |
54 | }; | 53 | }; |
55 | 54 | ||
56 | static atomic_t bus_no_reg_magic; | ||
57 | |||
58 | struct bus_type of_platform_bus_type = { | 55 | struct bus_type of_platform_bus_type = { |
59 | .uevent = of_device_uevent, | 56 | .uevent = of_device_uevent, |
60 | }; | 57 | }; |
@@ -87,89 +84,26 @@ void of_unregister_platform_driver(struct of_platform_driver *drv) | |||
87 | } | 84 | } |
88 | EXPORT_SYMBOL(of_unregister_platform_driver); | 85 | EXPORT_SYMBOL(of_unregister_platform_driver); |
89 | 86 | ||
90 | static void of_platform_make_bus_id(struct of_device *dev) | ||
91 | { | ||
92 | struct device_node *node = dev->node; | ||
93 | char *name = dev->dev.bus_id; | ||
94 | const u32 *reg; | ||
95 | u64 addr; | ||
96 | int magic; | ||
97 | |||
98 | /* | ||
99 | * If it's a DCR based device, use 'd' for native DCRs | ||
100 | * and 'D' for MMIO DCRs. | ||
101 | */ | ||
102 | #ifdef CONFIG_PPC_DCR | ||
103 | reg = of_get_property(node, "dcr-reg", NULL); | ||
104 | if (reg) { | ||
105 | #ifdef CONFIG_PPC_DCR_NATIVE | ||
106 | snprintf(name, BUS_ID_SIZE, "d%x.%s", | ||
107 | *reg, node->name); | ||
108 | #else /* CONFIG_PPC_DCR_NATIVE */ | ||
109 | addr = of_translate_dcr_address(node, *reg, NULL); | ||
110 | if (addr != OF_BAD_ADDR) { | ||
111 | snprintf(name, BUS_ID_SIZE, | ||
112 | "D%llx.%s", (unsigned long long)addr, | ||
113 | node->name); | ||
114 | return; | ||
115 | } | ||
116 | #endif /* !CONFIG_PPC_DCR_NATIVE */ | ||
117 | } | ||
118 | #endif /* CONFIG_PPC_DCR */ | ||
119 | |||
120 | /* | ||
121 | * For MMIO, get the physical address | ||
122 | */ | ||
123 | reg = of_get_property(node, "reg", NULL); | ||
124 | if (reg) { | ||
125 | addr = of_translate_address(node, reg); | ||
126 | if (addr != OF_BAD_ADDR) { | ||
127 | snprintf(name, BUS_ID_SIZE, | ||
128 | "%llx.%s", (unsigned long long)addr, | ||
129 | node->name); | ||
130 | return; | ||
131 | } | ||
132 | } | ||
133 | |||
134 | /* | ||
135 | * No BusID, use the node name and add a globally incremented | ||
136 | * counter (and pray...) | ||
137 | */ | ||
138 | magic = atomic_add_return(1, &bus_no_reg_magic); | ||
139 | snprintf(name, BUS_ID_SIZE, "%s.%d", node->name, magic - 1); | ||
140 | } | ||
141 | |||
142 | struct of_device* of_platform_device_create(struct device_node *np, | 87 | struct of_device* of_platform_device_create(struct device_node *np, |
143 | const char *bus_id, | 88 | const char *bus_id, |
144 | struct device *parent) | 89 | struct device *parent) |
145 | { | 90 | { |
146 | struct of_device *dev; | 91 | struct of_device *dev; |
147 | 92 | ||
148 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); | 93 | dev = of_device_alloc(np, bus_id, parent); |
149 | if (!dev) | 94 | if (!dev) |
150 | return NULL; | 95 | return NULL; |
151 | 96 | ||
152 | dev->node = of_node_get(np); | ||
153 | dev->dma_mask = 0xffffffffUL; | 97 | dev->dma_mask = 0xffffffffUL; |
154 | dev->dev.dma_mask = &dev->dma_mask; | ||
155 | dev->dev.parent = parent; | ||
156 | dev->dev.bus = &of_platform_bus_type; | 98 | dev->dev.bus = &of_platform_bus_type; |
157 | dev->dev.release = of_release_dev; | ||
158 | dev->dev.archdata.of_node = np; | ||
159 | dev->dev.archdata.numa_node = of_node_to_nid(np); | ||
160 | 99 | ||
161 | /* We do not fill the DMA ops for platform devices by default. | 100 | /* We do not fill the DMA ops for platform devices by default. |
162 | * This is currently the responsibility of the platform code | 101 | * This is currently the responsibility of the platform code |
163 | * to do such, possibly using a device notifier | 102 | * to do such, possibly using a device notifier |
164 | */ | 103 | */ |
165 | 104 | ||
166 | if (bus_id) | ||
167 | strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE); | ||
168 | else | ||
169 | of_platform_make_bus_id(dev); | ||
170 | |||
171 | if (of_device_register(dev) != 0) { | 105 | if (of_device_register(dev) != 0) { |
172 | kfree(dev); | 106 | of_device_free(dev); |
173 | return NULL; | 107 | return NULL; |
174 | } | 108 | } |
175 | 109 | ||
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 7949c203cb89..ea6ad7a2a7e3 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -149,10 +149,32 @@ void flush_altivec_to_thread(struct task_struct *tsk) | |||
149 | } | 149 | } |
150 | } | 150 | } |
151 | 151 | ||
152 | int dump_task_altivec(struct pt_regs *regs, elf_vrregset_t *vrregs) | 152 | int dump_task_altivec(struct task_struct *tsk, elf_vrregset_t *vrregs) |
153 | { | 153 | { |
154 | flush_altivec_to_thread(current); | 154 | /* ELF_NVRREG includes the VSCR and VRSAVE which we need to save |
155 | memcpy(vrregs, ¤t->thread.vr[0], sizeof(*vrregs)); | 155 | * separately, see below */ |
156 | const int nregs = ELF_NVRREG - 2; | ||
157 | elf_vrreg_t *reg; | ||
158 | u32 *dest; | ||
159 | |||
160 | if (tsk == current) | ||
161 | flush_altivec_to_thread(tsk); | ||
162 | |||
163 | reg = (elf_vrreg_t *)vrregs; | ||
164 | |||
165 | /* copy the 32 vr registers */ | ||
166 | memcpy(reg, &tsk->thread.vr[0], nregs * sizeof(*reg)); | ||
167 | reg += nregs; | ||
168 | |||
169 | /* copy the vscr */ | ||
170 | memcpy(reg, &tsk->thread.vscr, sizeof(*reg)); | ||
171 | reg++; | ||
172 | |||
173 | /* vrsave is stored in the high 32bit slot of the final 128bits */ | ||
174 | memset(reg, 0, sizeof(*reg)); | ||
175 | dest = (u32 *)reg; | ||
176 | *dest = tsk->thread.vrsave; | ||
177 | |||
156 | return 1; | 178 | return 1; |
157 | } | 179 | } |
158 | #endif /* CONFIG_ALTIVEC */ | 180 | #endif /* CONFIG_ALTIVEC */ |
diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c index 62b7bf2f3eab..f2276593f416 100644 --- a/arch/powerpc/kernel/rtas_flash.c +++ b/arch/powerpc/kernel/rtas_flash.c | |||
@@ -286,7 +286,7 @@ static ssize_t rtas_flash_read(struct file *file, char __user *buf, | |||
286 | } | 286 | } |
287 | 287 | ||
288 | /* constructor for flash_block_cache */ | 288 | /* constructor for flash_block_cache */ |
289 | void rtas_block_ctor(void *ptr, struct kmem_cache *cache, unsigned long flags) | 289 | void rtas_block_ctor(struct kmem_cache *cache, void *ptr) |
290 | { | 290 | { |
291 | memset(ptr, 0, RTAS_BLK_SIZE); | 291 | memset(ptr, 0, RTAS_BLK_SIZE); |
292 | } | 292 | } |
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 0e014550b83f..ede77dbbd4df 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -426,11 +426,14 @@ void __init setup_system(void) | |||
426 | printk("-----------------------------------------------------\n"); | 426 | printk("-----------------------------------------------------\n"); |
427 | printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); | 427 | printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); |
428 | printk("physicalMemorySize = 0x%lx\n", lmb_phys_mem_size()); | 428 | printk("physicalMemorySize = 0x%lx\n", lmb_phys_mem_size()); |
429 | printk("ppc64_caches.dcache_line_size = 0x%x\n", | 429 | if (ppc64_caches.dline_size != 0x80) |
430 | ppc64_caches.dline_size); | 430 | printk("ppc64_caches.dcache_line_size = 0x%x\n", |
431 | printk("ppc64_caches.icache_line_size = 0x%x\n", | 431 | ppc64_caches.dline_size); |
432 | ppc64_caches.iline_size); | 432 | if (ppc64_caches.iline_size != 0x80) |
433 | printk("htab_address = 0x%p\n", htab_address); | 433 | printk("ppc64_caches.icache_line_size = 0x%x\n", |
434 | ppc64_caches.iline_size); | ||
435 | if (htab_address) | ||
436 | printk("htab_address = 0x%p\n", htab_address); | ||
434 | printk("htab_hash_mask = 0x%lx\n", htab_hash_mask); | 437 | printk("htab_hash_mask = 0x%lx\n", htab_hash_mask); |
435 | #if PHYSICAL_START > 0 | 438 | #if PHYSICAL_START > 0 |
436 | printk("physical_start = 0x%x\n", PHYSICAL_START); | 439 | printk("physical_start = 0x%x\n", PHYSICAL_START); |
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c index bd85b5fd08c8..4a4f5c6b560b 100644 --- a/arch/powerpc/kernel/sys_ppc32.c +++ b/arch/powerpc/kernel/sys_ppc32.c | |||
@@ -41,10 +41,10 @@ | |||
41 | #include <linux/compat.h> | 41 | #include <linux/compat.h> |
42 | #include <linux/ptrace.h> | 42 | #include <linux/ptrace.h> |
43 | #include <linux/elf.h> | 43 | #include <linux/elf.h> |
44 | #include <linux/ipc.h> | ||
44 | 45 | ||
45 | #include <asm/ptrace.h> | 46 | #include <asm/ptrace.h> |
46 | #include <asm/types.h> | 47 | #include <asm/types.h> |
47 | #include <asm/ipc.h> | ||
48 | #include <asm/uaccess.h> | 48 | #include <asm/uaccess.h> |
49 | #include <asm/unistd.h> | 49 | #include <asm/unistd.h> |
50 | #include <asm/semaphore.h> | 50 | #include <asm/semaphore.h> |
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c index f85f402ceaef..3b1d5dd65643 100644 --- a/arch/powerpc/kernel/syscalls.c +++ b/arch/powerpc/kernel/syscalls.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <linux/personality.h> | 38 | #include <linux/personality.h> |
39 | 39 | ||
40 | #include <asm/uaccess.h> | 40 | #include <asm/uaccess.h> |
41 | #include <asm/ipc.h> | ||
42 | #include <asm/semaphore.h> | 41 | #include <asm/semaphore.h> |
43 | #include <asm/syscalls.h> | 42 | #include <asm/syscalls.h> |
44 | #include <asm/time.h> | 43 | #include <asm/time.h> |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index 9368da371f36..863a5d6d9b18 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -829,7 +829,7 @@ static void register_decrementer_clockevent(int cpu) | |||
829 | *dec = decrementer_clockevent; | 829 | *dec = decrementer_clockevent; |
830 | dec->cpumask = cpumask_of_cpu(cpu); | 830 | dec->cpumask = cpumask_of_cpu(cpu); |
831 | 831 | ||
832 | printk(KERN_ERR "clockevent: %s mult[%lx] shift[%d] cpu[%d]\n", | 832 | printk(KERN_INFO "clockevent: %s mult[%lx] shift[%d] cpu[%d]\n", |
833 | dec->name, dec->mult, dec->shift, cpu); | 833 | dec->name, dec->mult, dec->shift, cpu); |
834 | 834 | ||
835 | clockevents_register_device(dec); | 835 | clockevents_register_device(dec); |
diff --git a/arch/powerpc/kernel/vdso64/sigtramp.S b/arch/powerpc/kernel/vdso64/sigtramp.S index 17a83fa6dc52..59eb59bb4082 100644 --- a/arch/powerpc/kernel/vdso64/sigtramp.S +++ b/arch/powerpc/kernel/vdso64/sigtramp.S | |||
@@ -134,13 +134,16 @@ V_FUNCTION_END(__kernel_sigtramp_rt64) | |||
134 | 9: | 134 | 9: |
135 | 135 | ||
136 | /* This is where the pt_regs pointer can be found on the stack. */ | 136 | /* This is where the pt_regs pointer can be found on the stack. */ |
137 | #define PTREGS 128+168+56 | 137 | #define PTREGS 128+168+56 |
138 | 138 | ||
139 | /* Size of regs. */ | 139 | /* Size of regs. */ |
140 | #define RSIZE 8 | 140 | #define RSIZE 8 |
141 | |||
142 | /* Size of CR reg in DWARF unwind info. */ | ||
143 | #define CRSIZE 4 | ||
141 | 144 | ||
142 | /* This is the offset of the VMX reg pointer. */ | 145 | /* This is the offset of the VMX reg pointer. */ |
143 | #define VREGS 48*RSIZE+33*8 | 146 | #define VREGS 48*RSIZE+33*8 |
144 | 147 | ||
145 | /* Describe where general purpose regs are saved. */ | 148 | /* Describe where general purpose regs are saved. */ |
146 | #define EH_FRAME_GEN \ | 149 | #define EH_FRAME_GEN \ |
@@ -178,7 +181,7 @@ V_FUNCTION_END(__kernel_sigtramp_rt64) | |||
178 | rsave (31, 31*RSIZE); \ | 181 | rsave (31, 31*RSIZE); \ |
179 | rsave (67, 32*RSIZE); /* ap, used as temp for nip */ \ | 182 | rsave (67, 32*RSIZE); /* ap, used as temp for nip */ \ |
180 | rsave (65, 36*RSIZE); /* lr */ \ | 183 | rsave (65, 36*RSIZE); /* lr */ \ |
181 | rsave (70, 38*RSIZE) /* cr */ | 184 | rsave (70, 38*RSIZE + (RSIZE - CRSIZE)) /* cr */ |
182 | 185 | ||
183 | /* Describe where the FP regs are saved. */ | 186 | /* Describe where the FP regs are saved. */ |
184 | #define EH_FRAME_FP \ | 187 | #define EH_FRAME_FP \ |
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile index 65d492e316a6..4bb023f4c869 100644 --- a/arch/powerpc/lib/Makefile +++ b/arch/powerpc/lib/Makefile | |||
@@ -14,7 +14,6 @@ endif | |||
14 | 14 | ||
15 | obj-$(CONFIG_PPC64) += copypage_64.o copyuser_64.o \ | 15 | obj-$(CONFIG_PPC64) += copypage_64.o copyuser_64.o \ |
16 | memcpy_64.o usercopy_64.o mem_64.o string.o | 16 | memcpy_64.o usercopy_64.o mem_64.o string.o |
17 | obj-$(CONFIG_QUICC_ENGINE) += rheap.o | ||
18 | obj-$(CONFIG_XMON) += sstep.o | 17 | obj-$(CONFIG_XMON) += sstep.o |
19 | obj-$(CONFIG_KPROBES) += sstep.o | 18 | obj-$(CONFIG_KPROBES) += sstep.o |
20 | obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o | 19 | obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o |
@@ -23,6 +22,4 @@ ifeq ($(CONFIG_PPC64),y) | |||
23 | obj-$(CONFIG_SMP) += locks.o | 22 | obj-$(CONFIG_SMP) += locks.o |
24 | endif | 23 | endif |
25 | 24 | ||
26 | # Temporary hack until we have migrated to asm-powerpc | 25 | obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o |
27 | obj-$(CONFIG_8xx) += rheap.o | ||
28 | obj-$(CONFIG_CPM2) += rheap.o | ||
diff --git a/arch/powerpc/lib/rheap.c b/arch/powerpc/lib/rheap.c index ada5b42dd231..22c3b4f53de7 100644 --- a/arch/powerpc/lib/rheap.c +++ b/arch/powerpc/lib/rheap.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/module.h> | ||
18 | #include <linux/mm.h> | 19 | #include <linux/mm.h> |
19 | #include <linux/err.h> | 20 | #include <linux/err.h> |
20 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
@@ -275,6 +276,7 @@ rh_info_t *rh_create(unsigned int alignment) | |||
275 | 276 | ||
276 | return info; | 277 | return info; |
277 | } | 278 | } |
279 | EXPORT_SYMBOL_GPL(rh_create); | ||
278 | 280 | ||
279 | /* | 281 | /* |
280 | * Destroy a dynamically created remote heap. Deallocate only if the areas | 282 | * Destroy a dynamically created remote heap. Deallocate only if the areas |
@@ -288,6 +290,7 @@ void rh_destroy(rh_info_t * info) | |||
288 | if ((info->flags & RHIF_STATIC_INFO) == 0) | 290 | if ((info->flags & RHIF_STATIC_INFO) == 0) |
289 | kfree(info); | 291 | kfree(info); |
290 | } | 292 | } |
293 | EXPORT_SYMBOL_GPL(rh_destroy); | ||
291 | 294 | ||
292 | /* | 295 | /* |
293 | * Initialize in place a remote heap info block. This is needed to support | 296 | * Initialize in place a remote heap info block. This is needed to support |
@@ -320,6 +323,7 @@ void rh_init(rh_info_t * info, unsigned int alignment, int max_blocks, | |||
320 | for (i = 0, blk = block; i < max_blocks; i++, blk++) | 323 | for (i = 0, blk = block; i < max_blocks; i++, blk++) |
321 | list_add(&blk->list, &info->empty_list); | 324 | list_add(&blk->list, &info->empty_list); |
322 | } | 325 | } |
326 | EXPORT_SYMBOL_GPL(rh_init); | ||
323 | 327 | ||
324 | /* Attach a free memory region, coalesces regions if adjuscent */ | 328 | /* Attach a free memory region, coalesces regions if adjuscent */ |
325 | int rh_attach_region(rh_info_t * info, unsigned long start, int size) | 329 | int rh_attach_region(rh_info_t * info, unsigned long start, int size) |
@@ -360,6 +364,7 @@ int rh_attach_region(rh_info_t * info, unsigned long start, int size) | |||
360 | 364 | ||
361 | return 0; | 365 | return 0; |
362 | } | 366 | } |
367 | EXPORT_SYMBOL_GPL(rh_attach_region); | ||
363 | 368 | ||
364 | /* Detatch given address range, splits free block if needed. */ | 369 | /* Detatch given address range, splits free block if needed. */ |
365 | unsigned long rh_detach_region(rh_info_t * info, unsigned long start, int size) | 370 | unsigned long rh_detach_region(rh_info_t * info, unsigned long start, int size) |
@@ -428,6 +433,7 @@ unsigned long rh_detach_region(rh_info_t * info, unsigned long start, int size) | |||
428 | 433 | ||
429 | return s; | 434 | return s; |
430 | } | 435 | } |
436 | EXPORT_SYMBOL_GPL(rh_detach_region); | ||
431 | 437 | ||
432 | /* Allocate a block of memory at the specified alignment. The value returned | 438 | /* Allocate a block of memory at the specified alignment. The value returned |
433 | * is an offset into the buffer initialized by rh_init(), or a negative number | 439 | * is an offset into the buffer initialized by rh_init(), or a negative number |
@@ -502,6 +508,7 @@ unsigned long rh_alloc_align(rh_info_t * info, int size, int alignment, const ch | |||
502 | 508 | ||
503 | return start; | 509 | return start; |
504 | } | 510 | } |
511 | EXPORT_SYMBOL_GPL(rh_alloc_align); | ||
505 | 512 | ||
506 | /* Allocate a block of memory at the default alignment. The value returned is | 513 | /* Allocate a block of memory at the default alignment. The value returned is |
507 | * an offset into the buffer initialized by rh_init(), or a negative number if | 514 | * an offset into the buffer initialized by rh_init(), or a negative number if |
@@ -511,6 +518,7 @@ unsigned long rh_alloc(rh_info_t * info, int size, const char *owner) | |||
511 | { | 518 | { |
512 | return rh_alloc_align(info, size, info->alignment, owner); | 519 | return rh_alloc_align(info, size, info->alignment, owner); |
513 | } | 520 | } |
521 | EXPORT_SYMBOL_GPL(rh_alloc); | ||
514 | 522 | ||
515 | /* Allocate a block of memory at the given offset, rounded up to the default | 523 | /* Allocate a block of memory at the given offset, rounded up to the default |
516 | * alignment. The value returned is an offset into the buffer initialized by | 524 | * alignment. The value returned is an offset into the buffer initialized by |
@@ -594,6 +602,7 @@ unsigned long rh_alloc_fixed(rh_info_t * info, unsigned long start, int size, co | |||
594 | 602 | ||
595 | return start; | 603 | return start; |
596 | } | 604 | } |
605 | EXPORT_SYMBOL_GPL(rh_alloc_fixed); | ||
597 | 606 | ||
598 | /* Deallocate the memory previously allocated by one of the rh_alloc functions. | 607 | /* Deallocate the memory previously allocated by one of the rh_alloc functions. |
599 | * The return value is the size of the deallocated block, or a negative number | 608 | * The return value is the size of the deallocated block, or a negative number |
@@ -626,6 +635,7 @@ int rh_free(rh_info_t * info, unsigned long start) | |||
626 | 635 | ||
627 | return size; | 636 | return size; |
628 | } | 637 | } |
638 | EXPORT_SYMBOL_GPL(rh_free); | ||
629 | 639 | ||
630 | int rh_get_stats(rh_info_t * info, int what, int max_stats, rh_stats_t * stats) | 640 | int rh_get_stats(rh_info_t * info, int what, int max_stats, rh_stats_t * stats) |
631 | { | 641 | { |
@@ -663,6 +673,7 @@ int rh_get_stats(rh_info_t * info, int what, int max_stats, rh_stats_t * stats) | |||
663 | 673 | ||
664 | return nr; | 674 | return nr; |
665 | } | 675 | } |
676 | EXPORT_SYMBOL_GPL(rh_get_stats); | ||
666 | 677 | ||
667 | int rh_set_owner(rh_info_t * info, unsigned long start, const char *owner) | 678 | int rh_set_owner(rh_info_t * info, unsigned long start, const char *owner) |
668 | { | 679 | { |
@@ -687,6 +698,7 @@ int rh_set_owner(rh_info_t * info, unsigned long start, const char *owner) | |||
687 | 698 | ||
688 | return size; | 699 | return size; |
689 | } | 700 | } |
701 | EXPORT_SYMBOL_GPL(rh_set_owner); | ||
690 | 702 | ||
691 | void rh_dump(rh_info_t * info) | 703 | void rh_dump(rh_info_t * info) |
692 | { | 704 | { |
@@ -722,6 +734,7 @@ void rh_dump(rh_info_t * info) | |||
722 | st[i].size, st[i].owner != NULL ? st[i].owner : ""); | 734 | st[i].size, st[i].owner != NULL ? st[i].owner : ""); |
723 | printk(KERN_INFO "\n"); | 735 | printk(KERN_INFO "\n"); |
724 | } | 736 | } |
737 | EXPORT_SYMBOL_GPL(rh_dump); | ||
725 | 738 | ||
726 | void rh_dump_blk(rh_info_t * info, rh_block_t * blk) | 739 | void rh_dump_blk(rh_info_t * info, rh_block_t * blk) |
727 | { | 740 | { |
@@ -729,3 +742,5 @@ void rh_dump_blk(rh_info_t * info, rh_block_t * blk) | |||
729 | "blk @0x%p: 0x%lx-0x%lx (%u)\n", | 742 | "blk @0x%p: 0x%lx-0x%lx (%u)\n", |
730 | blk, blk->start, blk->start + blk->size, blk->size); | 743 | blk, blk->start, blk->start + blk->size, blk->size); |
731 | } | 744 | } |
745 | EXPORT_SYMBOL_GPL(rh_dump_blk); | ||
746 | |||
diff --git a/arch/powerpc/math-emu/math.c b/arch/powerpc/math-emu/math.c index 69058b2873de..381306bb1590 100644 --- a/arch/powerpc/math-emu/math.c +++ b/arch/powerpc/math-emu/math.c | |||
@@ -407,11 +407,16 @@ do_mathemu(struct pt_regs *regs) | |||
407 | 407 | ||
408 | case XE: | 408 | case XE: |
409 | idx = (insn >> 16) & 0x1f; | 409 | idx = (insn >> 16) & 0x1f; |
410 | if (!idx) | ||
411 | goto illegal; | ||
412 | |||
413 | op0 = (void *)¤t->thread.fpr[(insn >> 21) & 0x1f]; | 410 | op0 = (void *)¤t->thread.fpr[(insn >> 21) & 0x1f]; |
414 | op1 = (void *)(regs->gpr[idx] + regs->gpr[(insn >> 11) & 0x1f]); | 411 | if (!idx) { |
412 | if (((insn >> 1) & 0x3ff) == STFIWX) | ||
413 | op1 = (void *)(regs->gpr[(insn >> 11) & 0x1f]); | ||
414 | else | ||
415 | goto illegal; | ||
416 | } else { | ||
417 | op1 = (void *)(regs->gpr[idx] + regs->gpr[(insn >> 11) & 0x1f]); | ||
418 | } | ||
419 | |||
415 | break; | 420 | break; |
416 | 421 | ||
417 | case XEU: | 422 | case XEU: |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 611ad084b7e7..c78dc912411f 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -209,9 +209,10 @@ static int __init htab_dt_scan_seg_sizes(unsigned long node, | |||
209 | if (prop[0] == 40) { | 209 | if (prop[0] == 40) { |
210 | DBG("1T segment support detected\n"); | 210 | DBG("1T segment support detected\n"); |
211 | cur_cpu_spec->cpu_features |= CPU_FTR_1T_SEGMENT; | 211 | cur_cpu_spec->cpu_features |= CPU_FTR_1T_SEGMENT; |
212 | return 1; | ||
212 | } | 213 | } |
213 | return 1; | ||
214 | } | 214 | } |
215 | cur_cpu_spec->cpu_features &= ~CPU_FTR_NO_SLBIE_B; | ||
215 | return 0; | 216 | return 0; |
216 | } | 217 | } |
217 | 218 | ||
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 08f0d9ff7712..71efb38d599b 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c | |||
@@ -526,7 +526,7 @@ repeat: | |||
526 | return err; | 526 | return err; |
527 | } | 527 | } |
528 | 528 | ||
529 | static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags) | 529 | static void zero_ctor(struct kmem_cache *cache, void *addr) |
530 | { | 530 | { |
531 | memset(addr, 0, kmem_cache_size(cache)); | 531 | memset(addr, 0, kmem_cache_size(cache)); |
532 | } | 532 | } |
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c index 702d884a338a..d9c82d3d6482 100644 --- a/arch/powerpc/mm/init_64.c +++ b/arch/powerpc/mm/init_64.c | |||
@@ -142,7 +142,7 @@ static int __init setup_kcore(void) | |||
142 | module_init(setup_kcore); | 142 | module_init(setup_kcore); |
143 | #endif | 143 | #endif |
144 | 144 | ||
145 | static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags) | 145 | static void zero_ctor(struct kmem_cache *cache, void *addr) |
146 | { | 146 | { |
147 | memset(addr, 0, kmem_cache_size(cache)); | 147 | memset(addr, 0, kmem_cache_size(cache)); |
148 | } | 148 | } |
@@ -240,7 +240,7 @@ int __meminit vmemmap_populate(struct page *start_page, | |||
240 | return -ENOMEM; | 240 | return -ENOMEM; |
241 | 241 | ||
242 | printk(KERN_WARNING "vmemmap %08lx allocated at %p, " | 242 | printk(KERN_WARNING "vmemmap %08lx allocated at %p, " |
243 | "physical %p.\n", start, p, __pa(p)); | 243 | "physical %08lx.\n", start, p, __pa(p)); |
244 | 244 | ||
245 | mapped = htab_bolt_mapping(start, start + page_size, | 245 | mapped = htab_bolt_mapping(start, start + page_size, |
246 | __pa(p), mode_rw, mmu_linear_psize, | 246 | __pa(p), mode_rw, mmu_linear_psize, |
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c index 6c164cec9d2c..bbd2c512ee05 100644 --- a/arch/powerpc/mm/slb.c +++ b/arch/powerpc/mm/slb.c | |||
@@ -157,7 +157,8 @@ void switch_slb(struct task_struct *tsk, struct mm_struct *mm) | |||
157 | unsigned long stack = KSTK_ESP(tsk); | 157 | unsigned long stack = KSTK_ESP(tsk); |
158 | unsigned long unmapped_base; | 158 | unsigned long unmapped_base; |
159 | 159 | ||
160 | if (offset <= SLB_CACHE_ENTRIES) { | 160 | if (!cpu_has_feature(CPU_FTR_NO_SLBIE_B) && |
161 | offset <= SLB_CACHE_ENTRIES) { | ||
161 | int i; | 162 | int i; |
162 | asm volatile("isync" : : : "memory"); | 163 | asm volatile("isync" : : : "memory"); |
163 | for (i = 0; i < offset; i++) { | 164 | for (i = 0; i < offset; i++) { |
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c index 319826ef1645..ad928edafb0a 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm/slice.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <asm/mmu.h> | 34 | #include <asm/mmu.h> |
35 | #include <asm/spu.h> | 35 | #include <asm/spu.h> |
36 | 36 | ||
37 | static spinlock_t slice_convert_lock = SPIN_LOCK_UNLOCKED; | 37 | static DEFINE_SPINLOCK(slice_convert_lock); |
38 | 38 | ||
39 | 39 | ||
40 | #ifdef DEBUG | 40 | #ifdef DEBUG |
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index 186397f283bb..229d355ed86a 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig | |||
@@ -264,6 +264,7 @@ config TAU_AVERAGE | |||
264 | 264 | ||
265 | config QUICC_ENGINE | 265 | config QUICC_ENGINE |
266 | bool | 266 | bool |
267 | select PPC_LIB_RHEAP | ||
267 | help | 268 | help |
268 | The QUICC Engine (QE) is a new generation of communications | 269 | The QUICC Engine (QE) is a new generation of communications |
269 | coprocessors on Freescale embedded CPUs (akin to CPM in older chips). | 270 | coprocessors on Freescale embedded CPUs (akin to CPM in older chips). |
@@ -274,6 +275,7 @@ config CPM2 | |||
274 | bool | 275 | bool |
275 | default n | 276 | default n |
276 | select CPM | 277 | select CPM |
278 | select PPC_LIB_RHEAP | ||
277 | help | 279 | help |
278 | The CPM2 (Communications Processor Module) is a coprocessor on | 280 | The CPM2 (Communications Processor Module) is a coprocessor on |
279 | embedded CPUs made by Freescale. Selecting this option means that | 281 | embedded CPUs made by Freescale. Selecting this option means that |
@@ -313,4 +315,6 @@ config FSL_ULI1575 | |||
313 | config CPM | 315 | config CPM |
314 | bool | 316 | bool |
315 | 317 | ||
318 | source "arch/powerpc/sysdev/bestcomm/Kconfig" | ||
319 | |||
316 | endmenu | 320 | endmenu |
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 4c315be25015..3c7325ec36ec 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
@@ -37,6 +37,7 @@ config PPC_8xx | |||
37 | select FSL_SOC | 37 | select FSL_SOC |
38 | select 8xx | 38 | select 8xx |
39 | select WANT_DEVICE_TREE | 39 | select WANT_DEVICE_TREE |
40 | select PPC_LIB_RHEAP | ||
40 | 41 | ||
41 | config 40x | 42 | config 40x |
42 | bool "AMCC 40x" | 43 | bool "AMCC 40x" |
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 11098747d09b..0966d093db43 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -68,7 +68,7 @@ spufs_destroy_inode(struct inode *inode) | |||
68 | } | 68 | } |
69 | 69 | ||
70 | static void | 70 | static void |
71 | spufs_init_once(void *p, struct kmem_cache * cachep, unsigned long flags) | 71 | spufs_init_once(struct kmem_cache *cachep, void *p) |
72 | { | 72 | { |
73 | struct spufs_inode_info *ei = p; | 73 | struct spufs_inode_info *ei = p; |
74 | 74 | ||
diff --git a/arch/powerpc/platforms/iseries/htab.c b/arch/powerpc/platforms/iseries/htab.c index 15a7097e5dd7..f99c6c4b6985 100644 --- a/arch/powerpc/platforms/iseries/htab.c +++ b/arch/powerpc/platforms/iseries/htab.c | |||
@@ -39,9 +39,9 @@ static inline void iSeries_hunlock(unsigned long slot) | |||
39 | spin_unlock(&iSeries_hlocks[(slot >> 4) & 0x3f]); | 39 | spin_unlock(&iSeries_hlocks[(slot >> 4) & 0x3f]); |
40 | } | 40 | } |
41 | 41 | ||
42 | long iSeries_hpte_insert(unsigned long hpte_group, unsigned long va, | 42 | static long iSeries_hpte_insert(unsigned long hpte_group, unsigned long va, |
43 | unsigned long pa, unsigned long rflags, | 43 | unsigned long pa, unsigned long rflags, |
44 | unsigned long vflags, int psize) | 44 | unsigned long vflags, int psize, int ssize) |
45 | { | 45 | { |
46 | long slot; | 46 | long slot; |
47 | struct hash_pte lhpte; | 47 | struct hash_pte lhpte; |
diff --git a/arch/powerpc/platforms/iseries/vio.c b/arch/powerpc/platforms/iseries/vio.c index 910b00b4703e..d6435b03971f 100644 --- a/arch/powerpc/platforms/iseries/vio.c +++ b/arch/powerpc/platforms/iseries/vio.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Legacy iSeries specific vio initialisation | 2 | * Legacy iSeries specific vio initialisation |
3 | * that needs to be built in (not a module). | 3 | * that needs to be built in (not a module). |
4 | * | 4 | * |
5 | * © Copyright 2007 IBM Corporation | 5 | * © Copyright 2007 IBM Corporation |
6 | * Author: Stephen Rothwell | 6 | * Author: Stephen Rothwell |
7 | * Some parts collected from various other files | 7 | * Some parts collected from various other files |
8 | * | 8 | * |
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index 5ddf40a66ae8..3a5d112af5e0 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c | |||
@@ -37,6 +37,10 @@ | |||
37 | #include <asm/time.h> | 37 | #include <asm/time.h> |
38 | #include <asm/of_platform.h> | 38 | #include <asm/of_platform.h> |
39 | 39 | ||
40 | #include <pcmcia/ss.h> | ||
41 | #include <pcmcia/cistpl.h> | ||
42 | #include <pcmcia/ds.h> | ||
43 | |||
40 | #include "pasemi.h" | 44 | #include "pasemi.h" |
41 | 45 | ||
42 | /* SDC reset register, must be pre-mapped at reset time */ | 46 | /* SDC reset register, must be pre-mapped at reset time */ |
@@ -308,7 +312,57 @@ static void __init pas_init_early(void) | |||
308 | iommu_init_early_pasemi(); | 312 | iommu_init_early_pasemi(); |
309 | } | 313 | } |
310 | 314 | ||
315 | #ifdef CONFIG_PCMCIA | ||
316 | static int pcmcia_notify(struct notifier_block *nb, unsigned long action, | ||
317 | void *data) | ||
318 | { | ||
319 | struct device *dev = data; | ||
320 | struct device *parent; | ||
321 | struct pcmcia_device *pdev = to_pcmcia_dev(dev); | ||
322 | |||
323 | /* We are only intereted in device addition */ | ||
324 | if (action != BUS_NOTIFY_ADD_DEVICE) | ||
325 | return 0; | ||
326 | |||
327 | parent = pdev->socket->dev.parent; | ||
328 | |||
329 | /* We know electra_cf devices will always have of_node set, since | ||
330 | * electra_cf is an of_platform driver. | ||
331 | */ | ||
332 | if (!parent->archdata.of_node) | ||
333 | return 0; | ||
334 | |||
335 | if (!of_device_is_compatible(parent->archdata.of_node, "electra-cf")) | ||
336 | return 0; | ||
337 | |||
338 | /* We use the direct ops for localbus */ | ||
339 | dev->archdata.dma_ops = &dma_direct_ops; | ||
340 | |||
341 | return 0; | ||
342 | } | ||
343 | |||
344 | static struct notifier_block pcmcia_notifier = { | ||
345 | .notifier_call = pcmcia_notify, | ||
346 | }; | ||
347 | |||
348 | static inline void pasemi_pcmcia_init(void) | ||
349 | { | ||
350 | extern struct bus_type pcmcia_bus_type; | ||
351 | |||
352 | bus_register_notifier(&pcmcia_bus_type, &pcmcia_notifier); | ||
353 | } | ||
354 | |||
355 | #else | ||
356 | |||
357 | static inline void pasemi_pcmcia_init(void) | ||
358 | { | ||
359 | } | ||
360 | |||
361 | #endif | ||
362 | |||
363 | |||
311 | static struct of_device_id pasemi_bus_ids[] = { | 364 | static struct of_device_id pasemi_bus_ids[] = { |
365 | { .type = "localbus", }, | ||
312 | { .type = "sdc", }, | 366 | { .type = "sdc", }, |
313 | {}, | 367 | {}, |
314 | }; | 368 | }; |
@@ -318,6 +372,8 @@ static int __init pasemi_publish_devices(void) | |||
318 | if (!machine_is(pasemi)) | 372 | if (!machine_is(pasemi)) |
319 | return 0; | 373 | return 0; |
320 | 374 | ||
375 | pasemi_pcmcia_init(); | ||
376 | |||
321 | /* Publish OF platform devices for SDC and other non-PCI devices */ | 377 | /* Publish OF platform devices for SDC and other non-PCI devices */ |
322 | of_platform_bus_probe(NULL, pasemi_bus_ids, NULL); | 378 | of_platform_bus_probe(NULL, pasemi_bus_ids, NULL); |
323 | 379 | ||
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index 1a6f5641ebc8..99a77d743d48 100644 --- a/arch/powerpc/sysdev/Makefile +++ b/arch/powerpc/sysdev/Makefile | |||
@@ -14,6 +14,7 @@ obj-$(CONFIG_FSL_SOC) += fsl_soc.o | |||
14 | obj-$(CONFIG_FSL_PCI) += fsl_pci.o | 14 | obj-$(CONFIG_FSL_PCI) += fsl_pci.o |
15 | obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o | 15 | obj-$(CONFIG_TSI108_BRIDGE) += tsi108_pci.o tsi108_dev.o |
16 | obj-$(CONFIG_QUICC_ENGINE) += qe_lib/ | 16 | obj-$(CONFIG_QUICC_ENGINE) += qe_lib/ |
17 | obj-$(CONFIG_PPC_BESTCOMM) += bestcomm/ | ||
17 | mv64x60-$(CONFIG_PCI) += mv64x60_pci.o | 18 | mv64x60-$(CONFIG_PCI) += mv64x60_pci.o |
18 | obj-$(CONFIG_MV64X60) += $(mv64x60-y) mv64x60_pic.o mv64x60_dev.o \ | 19 | obj-$(CONFIG_MV64X60) += $(mv64x60-y) mv64x60_pic.o mv64x60_dev.o \ |
19 | mv64x60_udbg.o | 20 | mv64x60_udbg.o |
diff --git a/arch/powerpc/sysdev/bestcomm/Kconfig b/arch/powerpc/sysdev/bestcomm/Kconfig new file mode 100644 index 000000000000..57cc56562567 --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/Kconfig | |||
@@ -0,0 +1,39 @@ | |||
1 | # | ||
2 | # Kconfig options for Bestcomm | ||
3 | # | ||
4 | |||
5 | config PPC_BESTCOMM | ||
6 | tristate "Bestcomm DMA engine support" | ||
7 | depends on PPC_MPC52xx | ||
8 | default n | ||
9 | select PPC_LIB_RHEAP | ||
10 | help | ||
11 | BestComm is the name of the communication coprocessor found | ||
12 | on the Freescale MPC5200 family of processor. It's usage is | ||
13 | optionnal for some drivers (like ATA), but required for | ||
14 | others (like FEC). | ||
15 | |||
16 | If you want to use drivers that require DMA operations, | ||
17 | answer Y or M. Otherwise say N. | ||
18 | |||
19 | config PPC_BESTCOMM_ATA | ||
20 | tristate "Bestcomm ATA task support" | ||
21 | depends on PPC_BESTCOMM | ||
22 | default n | ||
23 | help | ||
24 | This option enables the support for the ATA task. | ||
25 | |||
26 | config PPC_BESTCOMM_FEC | ||
27 | tristate "Bestcomm FEC tasks support" | ||
28 | depends on PPC_BESTCOMM | ||
29 | default n | ||
30 | help | ||
31 | This option enables the support for the FEC tasks. | ||
32 | |||
33 | config PPC_BESTCOMM_GEN_BD | ||
34 | tristate "Bestcomm GenBD tasks support" | ||
35 | depends on PPC_BESTCOMM | ||
36 | default n | ||
37 | help | ||
38 | This option enables the support for the GenBD tasks. | ||
39 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/Makefile b/arch/powerpc/sysdev/bestcomm/Makefile new file mode 100644 index 000000000000..aed2df2a6580 --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/Makefile | |||
@@ -0,0 +1,14 @@ | |||
1 | # | ||
2 | # Makefile for BestComm & co | ||
3 | # | ||
4 | |||
5 | bestcomm-core-objs := bestcomm.o sram.o | ||
6 | bestcomm-ata-objs := ata.o bcom_ata_task.o | ||
7 | bestcomm-fec-objs := fec.o bcom_fec_rx_task.o bcom_fec_tx_task.o | ||
8 | bestcomm-gen-bd-objs := gen_bd.o bcom_gen_bd_rx_task.o bcom_gen_bd_tx_task.o | ||
9 | |||
10 | obj-$(CONFIG_PPC_BESTCOMM) += bestcomm-core.o | ||
11 | obj-$(CONFIG_PPC_BESTCOMM_ATA) += bestcomm-ata.o | ||
12 | obj-$(CONFIG_PPC_BESTCOMM_FEC) += bestcomm-fec.o | ||
13 | obj-$(CONFIG_PPC_BESTCOMM_GEN_BD) += bestcomm-gen-bd.o | ||
14 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/ata.c b/arch/powerpc/sysdev/bestcomm/ata.c new file mode 100644 index 000000000000..1f5258fb38c3 --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/ata.c | |||
@@ -0,0 +1,154 @@ | |||
1 | /* | ||
2 | * Bestcomm ATA task driver | ||
3 | * | ||
4 | * | ||
5 | * Patterned after bestcomm/fec.c by Dale Farnsworth <dfarnsworth@mvista.com> | ||
6 | * 2003-2004 (c) MontaVista, Software, Inc. | ||
7 | * | ||
8 | * Copyright (C) 2006-2007 Sylvain Munaut <tnt@246tNt.com> | ||
9 | * Copyright (C) 2006 Freescale - John Rigby | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/types.h> | ||
19 | #include <asm/io.h> | ||
20 | |||
21 | #include "bestcomm.h" | ||
22 | #include "bestcomm_priv.h" | ||
23 | #include "ata.h" | ||
24 | |||
25 | |||
26 | /* ======================================================================== */ | ||
27 | /* Task image/var/inc */ | ||
28 | /* ======================================================================== */ | ||
29 | |||
30 | /* ata task image */ | ||
31 | extern u32 bcom_ata_task[]; | ||
32 | |||
33 | /* ata task vars that need to be set before enabling the task */ | ||
34 | struct bcom_ata_var { | ||
35 | u32 enable; /* (u16*) address of task's control register */ | ||
36 | u32 bd_base; /* (struct bcom_bd*) beginning of ring buffer */ | ||
37 | u32 bd_last; /* (struct bcom_bd*) end of ring buffer */ | ||
38 | u32 bd_start; /* (struct bcom_bd*) current bd */ | ||
39 | u32 buffer_size; /* size of receive buffer */ | ||
40 | }; | ||
41 | |||
42 | /* ata task incs that need to be set before enabling the task */ | ||
43 | struct bcom_ata_inc { | ||
44 | u16 pad0; | ||
45 | s16 incr_bytes; | ||
46 | u16 pad1; | ||
47 | s16 incr_dst; | ||
48 | u16 pad2; | ||
49 | s16 incr_src; | ||
50 | }; | ||
51 | |||
52 | |||
53 | /* ======================================================================== */ | ||
54 | /* Task support code */ | ||
55 | /* ======================================================================== */ | ||
56 | |||
57 | struct bcom_task * | ||
58 | bcom_ata_init(int queue_len, int maxbufsize) | ||
59 | { | ||
60 | struct bcom_task *tsk; | ||
61 | struct bcom_ata_var *var; | ||
62 | struct bcom_ata_inc *inc; | ||
63 | |||
64 | tsk = bcom_task_alloc(queue_len, sizeof(struct bcom_ata_bd), 0); | ||
65 | if (!tsk) | ||
66 | return NULL; | ||
67 | |||
68 | tsk->flags = BCOM_FLAGS_NONE; | ||
69 | |||
70 | bcom_ata_reset_bd(tsk); | ||
71 | |||
72 | var = (struct bcom_ata_var *) bcom_task_var(tsk->tasknum); | ||
73 | inc = (struct bcom_ata_inc *) bcom_task_inc(tsk->tasknum); | ||
74 | |||
75 | if (bcom_load_image(tsk->tasknum, bcom_ata_task)) { | ||
76 | bcom_task_free(tsk); | ||
77 | return NULL; | ||
78 | } | ||
79 | |||
80 | var->enable = bcom_eng->regs_base + | ||
81 | offsetof(struct mpc52xx_sdma, tcr[tsk->tasknum]); | ||
82 | var->bd_base = tsk->bd_pa; | ||
83 | var->bd_last = tsk->bd_pa + ((tsk->num_bd-1) * tsk->bd_size); | ||
84 | var->bd_start = tsk->bd_pa; | ||
85 | var->buffer_size = maxbufsize; | ||
86 | |||
87 | /* Configure some stuff */ | ||
88 | bcom_set_task_pragma(tsk->tasknum, BCOM_ATA_PRAGMA); | ||
89 | bcom_set_task_auto_start(tsk->tasknum, tsk->tasknum); | ||
90 | |||
91 | out_8(&bcom_eng->regs->ipr[BCOM_INITIATOR_ATA_RX], BCOM_IPR_ATA_RX); | ||
92 | out_8(&bcom_eng->regs->ipr[BCOM_INITIATOR_ATA_TX], BCOM_IPR_ATA_TX); | ||
93 | |||
94 | out_be32(&bcom_eng->regs->IntPend, 1<<tsk->tasknum); /* Clear ints */ | ||
95 | |||
96 | return tsk; | ||
97 | } | ||
98 | EXPORT_SYMBOL_GPL(bcom_ata_init); | ||
99 | |||
100 | void bcom_ata_rx_prepare(struct bcom_task *tsk) | ||
101 | { | ||
102 | struct bcom_ata_inc *inc; | ||
103 | |||
104 | inc = (struct bcom_ata_inc *) bcom_task_inc(tsk->tasknum); | ||
105 | |||
106 | inc->incr_bytes = -(s16)sizeof(u32); | ||
107 | inc->incr_src = 0; | ||
108 | inc->incr_dst = sizeof(u32); | ||
109 | |||
110 | bcom_set_initiator(tsk->tasknum, BCOM_INITIATOR_ATA_RX); | ||
111 | } | ||
112 | EXPORT_SYMBOL_GPL(bcom_ata_rx_prepare); | ||
113 | |||
114 | void bcom_ata_tx_prepare(struct bcom_task *tsk) | ||
115 | { | ||
116 | struct bcom_ata_inc *inc; | ||
117 | |||
118 | inc = (struct bcom_ata_inc *) bcom_task_inc(tsk->tasknum); | ||
119 | |||
120 | inc->incr_bytes = -(s16)sizeof(u32); | ||
121 | inc->incr_src = sizeof(u32); | ||
122 | inc->incr_dst = 0; | ||
123 | |||
124 | bcom_set_initiator(tsk->tasknum, BCOM_INITIATOR_ATA_TX); | ||
125 | } | ||
126 | EXPORT_SYMBOL_GPL(bcom_ata_tx_prepare); | ||
127 | |||
128 | void bcom_ata_reset_bd(struct bcom_task *tsk) | ||
129 | { | ||
130 | struct bcom_ata_var *var; | ||
131 | |||
132 | /* Reset all BD */ | ||
133 | memset(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); | ||
134 | |||
135 | tsk->index = 0; | ||
136 | tsk->outdex = 0; | ||
137 | |||
138 | var = (struct bcom_ata_var *) bcom_task_var(tsk->tasknum); | ||
139 | var->bd_start = var->bd_base; | ||
140 | } | ||
141 | EXPORT_SYMBOL_GPL(bcom_ata_reset_bd); | ||
142 | |||
143 | void bcom_ata_release(struct bcom_task *tsk) | ||
144 | { | ||
145 | /* Nothing special for the ATA tasks */ | ||
146 | bcom_task_free(tsk); | ||
147 | } | ||
148 | EXPORT_SYMBOL_GPL(bcom_ata_release); | ||
149 | |||
150 | |||
151 | MODULE_DESCRIPTION("BestComm ATA task driver"); | ||
152 | MODULE_AUTHOR("John Rigby"); | ||
153 | MODULE_LICENSE("GPL v2"); | ||
154 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/ata.h b/arch/powerpc/sysdev/bestcomm/ata.h new file mode 100644 index 000000000000..10982769c465 --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/ata.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * Header for Bestcomm ATA task driver | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 2006 Freescale - John Rigby | ||
6 | * Copyright (C) 2006 Sylvain Munaut <tnt@246tNt.com> | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public License | ||
9 | * version 2. This program is licensed "as is" without any warranty of any | ||
10 | * kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #ifndef __BESTCOMM_ATA_H__ | ||
14 | #define __BESTCOMM_ATA_H__ | ||
15 | |||
16 | |||
17 | struct bcom_ata_bd { | ||
18 | u32 status; | ||
19 | u32 dst_pa; | ||
20 | u32 src_pa; | ||
21 | }; | ||
22 | |||
23 | extern struct bcom_task * | ||
24 | bcom_ata_init(int queue_len, int maxbufsize); | ||
25 | |||
26 | extern void | ||
27 | bcom_ata_rx_prepare(struct bcom_task *tsk); | ||
28 | |||
29 | extern void | ||
30 | bcom_ata_tx_prepare(struct bcom_task *tsk); | ||
31 | |||
32 | extern void | ||
33 | bcom_ata_reset_bd(struct bcom_task *tsk); | ||
34 | |||
35 | |||
36 | #endif /* __BESTCOMM_ATA_H__ */ | ||
37 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/bcom_ata_task.c b/arch/powerpc/sysdev/bestcomm/bcom_ata_task.c new file mode 100644 index 000000000000..cc6049a4e469 --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/bcom_ata_task.c | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | * Bestcomm ATA task microcode | ||
3 | * | ||
4 | * Copyright (c) 2004 Freescale Semiconductor, Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License version 2 as published | ||
8 | * by the Free Software Foundation. | ||
9 | * | ||
10 | * Created based on bestcom/code_dma/image_rtos1/dma_image.hex | ||
11 | */ | ||
12 | |||
13 | #include <asm/types.h> | ||
14 | |||
15 | /* | ||
16 | * The header consists of the following fields: | ||
17 | * u32 magic; | ||
18 | * u8 desc_size; | ||
19 | * u8 var_size; | ||
20 | * u8 inc_size; | ||
21 | * u8 first_var; | ||
22 | * u8 reserved[8]; | ||
23 | * | ||
24 | * The size fields contain the number of 32-bit words. | ||
25 | */ | ||
26 | |||
27 | u32 bcom_ata_task[] = { | ||
28 | /* header */ | ||
29 | 0x4243544b, | ||
30 | 0x0e060709, | ||
31 | 0x00000000, | ||
32 | 0x00000000, | ||
33 | |||
34 | /* Task descriptors */ | ||
35 | 0x8198009b, /* LCD: idx0 = var3; idx0 <= var2; idx0 += inc3 */ | ||
36 | 0x13e00c08, /* DRD1A: var3 = var1; FN=0 MORE init=31 WS=0 RS=0 */ | ||
37 | 0xb8000264, /* LCD: idx1 = *idx0, idx2 = var0; idx1 < var9; idx1 += inc4, idx2 += inc4 */ | ||
38 | 0x10000f00, /* DRD1A: var3 = idx0; FN=0 MORE init=0 WS=0 RS=0 */ | ||
39 | 0x60140002, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=2 RS=2 */ | ||
40 | 0x0c8cfc8a, /* DRD2B1: *idx2 = EU3(); EU3(*idx2,var10) */ | ||
41 | 0xd8988240, /* LCDEXT: idx1 = idx1; idx1 > var9; idx1 += inc0 */ | ||
42 | 0xf845e011, /* LCDEXT: idx2 = *(idx0 + var00000015); ; idx2 += inc2 */ | ||
43 | 0xb845e00a, /* LCD: idx3 = *(idx0 + var00000019); ; idx3 += inc1 */ | ||
44 | 0x0bfecf90, /* DRD1A: *idx3 = *idx2; FN=0 TFD init=31 WS=3 RS=3 */ | ||
45 | 0x9898802d, /* LCD: idx1 = idx1; idx1 once var0; idx1 += inc5 */ | ||
46 | 0x64000005, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=5 INT EXT init=0 WS=0 RS=0 */ | ||
47 | 0x0c0cf849, /* DRD2B1: *idx0 = EU3(); EU3(idx1,var9) */ | ||
48 | 0x000001f8, /* NOP */ | ||
49 | |||
50 | /* VAR[9]-VAR[14] */ | ||
51 | 0x40000000, | ||
52 | 0x7fff7fff, | ||
53 | 0x00000000, | ||
54 | 0x00000000, | ||
55 | 0x00000000, | ||
56 | 0x00000000, | ||
57 | |||
58 | /* INC[0]-INC[6] */ | ||
59 | 0x40000000, | ||
60 | 0xe0000000, | ||
61 | 0xe0000000, | ||
62 | 0xa000000c, | ||
63 | 0x20000000, | ||
64 | 0x00000000, | ||
65 | 0x00000000, | ||
66 | }; | ||
67 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/bcom_fec_rx_task.c b/arch/powerpc/sysdev/bestcomm/bcom_fec_rx_task.c new file mode 100644 index 000000000000..a1ad6a02fcef --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/bcom_fec_rx_task.c | |||
@@ -0,0 +1,78 @@ | |||
1 | /* | ||
2 | * Bestcomm FEC RX task microcode | ||
3 | * | ||
4 | * Copyright (c) 2004 Freescale Semiconductor, Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License version 2 as published | ||
8 | * by the Free Software Foundation. | ||
9 | * | ||
10 | * Automatically created based on BestCommAPI-2.2/code_dma/image_rtos1/dma_image.hex | ||
11 | * on Tue Mar 22 11:19:38 2005 GMT | ||
12 | */ | ||
13 | |||
14 | #include <asm/types.h> | ||
15 | |||
16 | /* | ||
17 | * The header consists of the following fields: | ||
18 | * u32 magic; | ||
19 | * u8 desc_size; | ||
20 | * u8 var_size; | ||
21 | * u8 inc_size; | ||
22 | * u8 first_var; | ||
23 | * u8 reserved[8]; | ||
24 | * | ||
25 | * The size fields contain the number of 32-bit words. | ||
26 | */ | ||
27 | |||
28 | u32 bcom_fec_rx_task[] = { | ||
29 | /* header */ | ||
30 | 0x4243544b, | ||
31 | 0x18060709, | ||
32 | 0x00000000, | ||
33 | 0x00000000, | ||
34 | |||
35 | /* Task descriptors */ | ||
36 | 0x808220e3, /* LCD: idx0 = var1, idx1 = var4; idx1 <= var3; idx0 += inc4, idx1 += inc3 */ | ||
37 | 0x10601010, /* DRD1A: var4 = var2; FN=0 MORE init=3 WS=0 RS=0 */ | ||
38 | 0xb8800264, /* LCD: idx2 = *idx1, idx3 = var0; idx2 < var9; idx2 += inc4, idx3 += inc4 */ | ||
39 | 0x10001308, /* DRD1A: var4 = idx1; FN=0 MORE init=0 WS=0 RS=0 */ | ||
40 | 0x60140002, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=2 RS=2 */ | ||
41 | 0x0cccfcca, /* DRD2B1: *idx3 = EU3(); EU3(*idx3,var10) */ | ||
42 | 0x80004000, /* LCDEXT: idx2 = 0x00000000; ; */ | ||
43 | 0xb8c58029, /* LCD: idx3 = *(idx1 + var00000015); idx3 once var0; idx3 += inc5 */ | ||
44 | 0x60000002, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=0 RS=0 */ | ||
45 | 0x088cf8cc, /* DRD2B1: idx2 = EU3(); EU3(idx3,var12) */ | ||
46 | 0x991982f2, /* LCD: idx2 = idx2, idx3 = idx3; idx2 > var11; idx2 += inc6, idx3 += inc2 */ | ||
47 | 0x006acf80, /* DRD1A: *idx3 = *idx0; FN=0 init=3 WS=1 RS=1 */ | ||
48 | 0x80004000, /* LCDEXT: idx2 = 0x00000000; ; */ | ||
49 | 0x9999802d, /* LCD: idx3 = idx3; idx3 once var0; idx3 += inc5 */ | ||
50 | 0x70000002, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT MORE init=0 WS=0 RS=0 */ | ||
51 | 0x034cfc4e, /* DRD2B1: var13 = EU3(); EU3(*idx1,var14) */ | ||
52 | 0x00008868, /* DRD1A: idx2 = var13; FN=0 init=0 WS=0 RS=0 */ | ||
53 | 0x99198341, /* LCD: idx2 = idx2, idx3 = idx3; idx2 > var13; idx2 += inc0, idx3 += inc1 */ | ||
54 | 0x007ecf80, /* DRD1A: *idx3 = *idx0; FN=0 init=3 WS=3 RS=3 */ | ||
55 | 0x99198272, /* LCD: idx2 = idx2, idx3 = idx3; idx2 > var9; idx2 += inc6, idx3 += inc2 */ | ||
56 | 0x046acf80, /* DRD1A: *idx3 = *idx0; FN=0 INT init=3 WS=1 RS=1 */ | ||
57 | 0x9819002d, /* LCD: idx2 = idx0; idx2 once var0; idx2 += inc5 */ | ||
58 | 0x0060c790, /* DRD1A: *idx1 = *idx2; FN=0 init=3 WS=0 RS=0 */ | ||
59 | 0x000001f8, /* NOP */ | ||
60 | |||
61 | /* VAR[9]-VAR[14] */ | ||
62 | 0x40000000, | ||
63 | 0x7fff7fff, | ||
64 | 0x00000000, | ||
65 | 0x00000003, | ||
66 | 0x40000008, | ||
67 | 0x43ffffff, | ||
68 | |||
69 | /* INC[0]-INC[6] */ | ||
70 | 0x40000000, | ||
71 | 0xe0000000, | ||
72 | 0xe0000000, | ||
73 | 0xa0000008, | ||
74 | 0x20000000, | ||
75 | 0x00000000, | ||
76 | 0x4000ffff, | ||
77 | }; | ||
78 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/bcom_fec_tx_task.c b/arch/powerpc/sysdev/bestcomm/bcom_fec_tx_task.c new file mode 100644 index 000000000000..b1c495c3a65a --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/bcom_fec_tx_task.c | |||
@@ -0,0 +1,91 @@ | |||
1 | /* | ||
2 | * Bestcomm FEC TX task microcode | ||
3 | * | ||
4 | * Copyright (c) 2004 Freescale Semiconductor, Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License version 2 as published | ||
8 | * by the Free Software Foundation. | ||
9 | * | ||
10 | * Automatically created based on BestCommAPI-2.2/code_dma/image_rtos1/dma_image.hex | ||
11 | * on Tue Mar 22 11:19:29 2005 GMT | ||
12 | */ | ||
13 | |||
14 | #include <asm/types.h> | ||
15 | |||
16 | /* | ||
17 | * The header consists of the following fields: | ||
18 | * u32 magic; | ||
19 | * u8 desc_size; | ||
20 | * u8 var_size; | ||
21 | * u8 inc_size; | ||
22 | * u8 first_var; | ||
23 | * u8 reserved[8]; | ||
24 | * | ||
25 | * The size fields contain the number of 32-bit words. | ||
26 | */ | ||
27 | |||
28 | u32 bcom_fec_tx_task[] = { | ||
29 | /* header */ | ||
30 | 0x4243544b, | ||
31 | 0x2407070d, | ||
32 | 0x00000000, | ||
33 | 0x00000000, | ||
34 | |||
35 | /* Task descriptors */ | ||
36 | 0x8018001b, /* LCD: idx0 = var0; idx0 <= var0; idx0 += inc3 */ | ||
37 | 0x60000005, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=5 EXT init=0 WS=0 RS=0 */ | ||
38 | 0x01ccfc0d, /* DRD2B1: var7 = EU3(); EU3(*idx0,var13) */ | ||
39 | 0x8082a123, /* LCD: idx0 = var1, idx1 = var5; idx1 <= var4; idx0 += inc4, idx1 += inc3 */ | ||
40 | 0x10801418, /* DRD1A: var5 = var3; FN=0 MORE init=4 WS=0 RS=0 */ | ||
41 | 0xf88103a4, /* LCDEXT: idx2 = *idx1, idx3 = var2; idx2 < var14; idx2 += inc4, idx3 += inc4 */ | ||
42 | 0x801a6024, /* LCD: idx4 = var0; ; idx4 += inc4 */ | ||
43 | 0x10001708, /* DRD1A: var5 = idx1; FN=0 MORE init=0 WS=0 RS=0 */ | ||
44 | 0x60140002, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=2 RS=2 */ | ||
45 | 0x0cccfccf, /* DRD2B1: *idx3 = EU3(); EU3(*idx3,var15) */ | ||
46 | 0x991a002c, /* LCD: idx2 = idx2, idx3 = idx4; idx2 once var0; idx2 += inc5, idx3 += inc4 */ | ||
47 | 0x70000002, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT MORE init=0 WS=0 RS=0 */ | ||
48 | 0x024cfc4d, /* DRD2B1: var9 = EU3(); EU3(*idx1,var13) */ | ||
49 | 0x60000003, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=3 EXT init=0 WS=0 RS=0 */ | ||
50 | 0x0cccf247, /* DRD2B1: *idx3 = EU3(); EU3(var9,var7) */ | ||
51 | 0x80004000, /* LCDEXT: idx2 = 0x00000000; ; */ | ||
52 | 0xb8c80029, /* LCD: idx3 = *(idx1 + var0000001a); idx3 once var0; idx3 += inc5 */ | ||
53 | 0x70000002, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT MORE init=0 WS=0 RS=0 */ | ||
54 | 0x088cf8d1, /* DRD2B1: idx2 = EU3(); EU3(idx3,var17) */ | ||
55 | 0x00002f10, /* DRD1A: var11 = idx2; FN=0 init=0 WS=0 RS=0 */ | ||
56 | 0x99198432, /* LCD: idx2 = idx2, idx3 = idx3; idx2 > var16; idx2 += inc6, idx3 += inc2 */ | ||
57 | 0x008ac398, /* DRD1A: *idx0 = *idx3; FN=0 init=4 WS=1 RS=1 */ | ||
58 | 0x80004000, /* LCDEXT: idx2 = 0x00000000; ; */ | ||
59 | 0x9999802d, /* LCD: idx3 = idx3; idx3 once var0; idx3 += inc5 */ | ||
60 | 0x70000002, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT MORE init=0 WS=0 RS=0 */ | ||
61 | 0x048cfc53, /* DRD2B1: var18 = EU3(); EU3(*idx1,var19) */ | ||
62 | 0x60000008, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=8 EXT init=0 WS=0 RS=0 */ | ||
63 | 0x088cf48b, /* DRD2B1: idx2 = EU3(); EU3(var18,var11) */ | ||
64 | 0x99198481, /* LCD: idx2 = idx2, idx3 = idx3; idx2 > var18; idx2 += inc0, idx3 += inc1 */ | ||
65 | 0x009ec398, /* DRD1A: *idx0 = *idx3; FN=0 init=4 WS=3 RS=3 */ | ||
66 | 0x991983b2, /* LCD: idx2 = idx2, idx3 = idx3; idx2 > var14; idx2 += inc6, idx3 += inc2 */ | ||
67 | 0x088ac398, /* DRD1A: *idx0 = *idx3; FN=0 TFD init=4 WS=1 RS=1 */ | ||
68 | 0x9919002d, /* LCD: idx2 = idx2; idx2 once var0; idx2 += inc5 */ | ||
69 | 0x60000005, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=5 EXT init=0 WS=0 RS=0 */ | ||
70 | 0x0c4cf88e, /* DRD2B1: *idx1 = EU3(); EU3(idx2,var14) */ | ||
71 | 0x000001f8, /* NOP */ | ||
72 | |||
73 | /* VAR[13]-VAR[19] */ | ||
74 | 0x0c000000, | ||
75 | 0x40000000, | ||
76 | 0x7fff7fff, | ||
77 | 0x00000000, | ||
78 | 0x00000003, | ||
79 | 0x40000004, | ||
80 | 0x43ffffff, | ||
81 | |||
82 | /* INC[0]-INC[6] */ | ||
83 | 0x40000000, | ||
84 | 0xe0000000, | ||
85 | 0xe0000000, | ||
86 | 0xa0000008, | ||
87 | 0x20000000, | ||
88 | 0x00000000, | ||
89 | 0x4000ffff, | ||
90 | }; | ||
91 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/bcom_gen_bd_rx_task.c b/arch/powerpc/sysdev/bestcomm/bcom_gen_bd_rx_task.c new file mode 100644 index 000000000000..efee022b0256 --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/bcom_gen_bd_rx_task.c | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * Bestcomm GenBD RX task microcode | ||
3 | * | ||
4 | * Copyright (C) 2006 AppSpec Computer Technologies Corp. | ||
5 | * Jeff Gibbons <jeff.gibbons@appspec.com> | ||
6 | * Copyright (c) 2004 Freescale Semiconductor, Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License version 2 as published | ||
10 | * by the Free Software Foundation. | ||
11 | * | ||
12 | * Based on BestCommAPI-2.2/code_dma/image_rtos1/dma_image.hex | ||
13 | * on Tue Mar 4 10:14:12 2006 GMT | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <asm/types.h> | ||
18 | |||
19 | /* | ||
20 | * The header consists of the following fields: | ||
21 | * u32 magic; | ||
22 | * u8 desc_size; | ||
23 | * u8 var_size; | ||
24 | * u8 inc_size; | ||
25 | * u8 first_var; | ||
26 | * u8 reserved[8]; | ||
27 | * | ||
28 | * The size fields contain the number of 32-bit words. | ||
29 | */ | ||
30 | |||
31 | u32 bcom_gen_bd_rx_task[] = { | ||
32 | /* header */ | ||
33 | 0x4243544b, | ||
34 | 0x0d020409, | ||
35 | 0x00000000, | ||
36 | 0x00000000, | ||
37 | |||
38 | /* Task descriptors */ | ||
39 | 0x808220da, /* LCD: idx0 = var1, idx1 = var4; idx1 <= var3; idx0 += inc3, idx1 += inc2 */ | ||
40 | 0x13e01010, /* DRD1A: var4 = var2; FN=0 MORE init=31 WS=0 RS=0 */ | ||
41 | 0xb880025b, /* LCD: idx2 = *idx1, idx3 = var0; idx2 < var9; idx2 += inc3, idx3 += inc3 */ | ||
42 | 0x10001308, /* DRD1A: var4 = idx1; FN=0 MORE init=0 WS=0 RS=0 */ | ||
43 | 0x60140002, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=2 RS=2 */ | ||
44 | 0x0cccfcca, /* DRD2B1: *idx3 = EU3(); EU3(*idx3,var10) */ | ||
45 | 0xd9190240, /* LCDEXT: idx2 = idx2; idx2 > var9; idx2 += inc0 */ | ||
46 | 0xb8c5e009, /* LCD: idx3 = *(idx1 + var00000015); ; idx3 += inc1 */ | ||
47 | 0x07fecf80, /* DRD1A: *idx3 = *idx0; FN=0 INT init=31 WS=3 RS=3 */ | ||
48 | 0x99190024, /* LCD: idx2 = idx2; idx2 once var0; idx2 += inc4 */ | ||
49 | 0x60000005, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=5 EXT init=0 WS=0 RS=0 */ | ||
50 | 0x0c4cf889, /* DRD2B1: *idx1 = EU3(); EU3(idx2,var9) */ | ||
51 | 0x000001f8, /* NOP */ | ||
52 | |||
53 | /* VAR[9]-VAR[10] */ | ||
54 | 0x40000000, | ||
55 | 0x7fff7fff, | ||
56 | |||
57 | /* INC[0]-INC[3] */ | ||
58 | 0x40000000, | ||
59 | 0xe0000000, | ||
60 | 0xa0000008, | ||
61 | 0x20000000, | ||
62 | }; | ||
63 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/bcom_gen_bd_tx_task.c b/arch/powerpc/sysdev/bestcomm/bcom_gen_bd_tx_task.c new file mode 100644 index 000000000000..c605aa42ecbb --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/bcom_gen_bd_tx_task.c | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * Bestcomm GenBD TX task microcode | ||
3 | * | ||
4 | * Copyright (C) 2006 AppSpec Computer Technologies Corp. | ||
5 | * Jeff Gibbons <jeff.gibbons@appspec.com> | ||
6 | * Copyright (c) 2004 Freescale Semiconductor, Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License version 2 as published | ||
10 | * by the Free Software Foundation. | ||
11 | * | ||
12 | * Based on BestCommAPI-2.2/code_dma/image_rtos1/dma_image.hex | ||
13 | * on Tue Mar 4 10:14:12 2006 GMT | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <asm/types.h> | ||
18 | |||
19 | /* | ||
20 | * The header consists of the following fields: | ||
21 | * u32 magic; | ||
22 | * u8 desc_size; | ||
23 | * u8 var_size; | ||
24 | * u8 inc_size; | ||
25 | * u8 first_var; | ||
26 | * u8 reserved[8]; | ||
27 | * | ||
28 | * The size fields contain the number of 32-bit words. | ||
29 | */ | ||
30 | |||
31 | u32 bcom_gen_bd_tx_task[] = { | ||
32 | /* header */ | ||
33 | 0x4243544b, | ||
34 | 0x0f040609, | ||
35 | 0x00000000, | ||
36 | 0x00000000, | ||
37 | |||
38 | /* Task descriptors */ | ||
39 | 0x800220e3, /* LCD: idx0 = var0, idx1 = var4; idx1 <= var3; idx0 += inc4, idx1 += inc3 */ | ||
40 | 0x13e01010, /* DRD1A: var4 = var2; FN=0 MORE init=31 WS=0 RS=0 */ | ||
41 | 0xb8808264, /* LCD: idx2 = *idx1, idx3 = var1; idx2 < var9; idx2 += inc4, idx3 += inc4 */ | ||
42 | 0x10001308, /* DRD1A: var4 = idx1; FN=0 MORE init=0 WS=0 RS=0 */ | ||
43 | 0x60140002, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=2 RS=2 */ | ||
44 | 0x0cccfcca, /* DRD2B1: *idx3 = EU3(); EU3(*idx3,var10) */ | ||
45 | 0xd9190300, /* LCDEXT: idx2 = idx2; idx2 > var12; idx2 += inc0 */ | ||
46 | 0xb8c5e009, /* LCD: idx3 = *(idx1 + var00000015); ; idx3 += inc1 */ | ||
47 | 0x03fec398, /* DRD1A: *idx0 = *idx3; FN=0 init=31 WS=3 RS=3 */ | ||
48 | 0x9919826a, /* LCD: idx2 = idx2, idx3 = idx3; idx2 > var9; idx2 += inc5, idx3 += inc2 */ | ||
49 | 0x0feac398, /* DRD1A: *idx0 = *idx3; FN=0 TFD INT init=31 WS=1 RS=1 */ | ||
50 | 0x99190036, /* LCD: idx2 = idx2; idx2 once var0; idx2 += inc6 */ | ||
51 | 0x60000005, /* DRD2A: EU0=0 EU1=0 EU2=0 EU3=5 EXT init=0 WS=0 RS=0 */ | ||
52 | 0x0c4cf889, /* DRD2B1: *idx1 = EU3(); EU3(idx2,var9) */ | ||
53 | 0x000001f8, /* NOP */ | ||
54 | |||
55 | /* VAR[9]-VAR[12] */ | ||
56 | 0x40000000, | ||
57 | 0x7fff7fff, | ||
58 | 0x00000000, | ||
59 | 0x40000004, | ||
60 | |||
61 | /* INC[0]-INC[5] */ | ||
62 | 0x40000000, | ||
63 | 0xe0000000, | ||
64 | 0xe0000000, | ||
65 | 0xa0000008, | ||
66 | 0x20000000, | ||
67 | 0x4000ffff, | ||
68 | }; | ||
69 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c new file mode 100644 index 000000000000..48492a83e5a7 --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c | |||
@@ -0,0 +1,528 @@ | |||
1 | /* | ||
2 | * Driver for MPC52xx processor BestComm peripheral controller | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 2006-2007 Sylvain Munaut <tnt@246tNt.com> | ||
6 | * Copyright (C) 2005 Varma Electronics Oy, | ||
7 | * ( by Andrey Volkov <avolkov@varma-el.com> ) | ||
8 | * Copyright (C) 2003-2004 MontaVista, Software, Inc. | ||
9 | * ( by Dale Farnsworth <dfarnsworth@mvista.com> ) | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | #include <linux/module.h> | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/slab.h> | ||
19 | #include <linux/of.h> | ||
20 | #include <linux/of_device.h> | ||
21 | #include <linux/of_platform.h> | ||
22 | #include <asm/io.h> | ||
23 | #include <asm/irq.h> | ||
24 | #include <asm/mpc52xx.h> | ||
25 | |||
26 | #include "sram.h" | ||
27 | #include "bestcomm_priv.h" | ||
28 | #include "bestcomm.h" | ||
29 | |||
30 | #define DRIVER_NAME "bestcomm-core" | ||
31 | |||
32 | |||
33 | struct bcom_engine *bcom_eng = NULL; | ||
34 | EXPORT_SYMBOL_GPL(bcom_eng); /* needed for inline functions */ | ||
35 | |||
36 | |||
37 | /* ======================================================================== */ | ||
38 | /* Public and private API */ | ||
39 | /* ======================================================================== */ | ||
40 | |||
41 | /* Private API */ | ||
42 | |||
43 | struct bcom_task * | ||
44 | bcom_task_alloc(int bd_count, int bd_size, int priv_size) | ||
45 | { | ||
46 | int i, tasknum = -1; | ||
47 | struct bcom_task *tsk; | ||
48 | |||
49 | /* Get and reserve a task num */ | ||
50 | spin_lock(&bcom_eng->lock); | ||
51 | |||
52 | for (i=0; i<BCOM_MAX_TASKS; i++) | ||
53 | if (!bcom_eng->tdt[i].stop) { /* we use stop as a marker */ | ||
54 | bcom_eng->tdt[i].stop = 0xfffffffful; /* dummy addr */ | ||
55 | tasknum = i; | ||
56 | break; | ||
57 | } | ||
58 | |||
59 | spin_unlock(&bcom_eng->lock); | ||
60 | |||
61 | if (tasknum < 0) | ||
62 | return NULL; | ||
63 | |||
64 | /* Allocate our structure */ | ||
65 | tsk = kzalloc(sizeof(struct bcom_task) + priv_size, GFP_KERNEL); | ||
66 | if (!tsk) | ||
67 | goto error; | ||
68 | |||
69 | tsk->tasknum = tasknum; | ||
70 | if (priv_size) | ||
71 | tsk->priv = (void*)tsk + sizeof(struct bcom_task); | ||
72 | |||
73 | /* Get IRQ of that task */ | ||
74 | tsk->irq = irq_of_parse_and_map(bcom_eng->ofnode, tsk->tasknum); | ||
75 | if (tsk->irq == NO_IRQ) | ||
76 | goto error; | ||
77 | |||
78 | /* Init the BDs, if needed */ | ||
79 | if (bd_count) { | ||
80 | tsk->cookie = kmalloc(sizeof(void*) * bd_count, GFP_KERNEL); | ||
81 | if (!tsk->cookie) | ||
82 | goto error; | ||
83 | |||
84 | tsk->bd = bcom_sram_alloc(bd_count * bd_size, 4, &tsk->bd_pa); | ||
85 | if (!tsk->bd) | ||
86 | goto error; | ||
87 | memset(tsk->bd, 0x00, bd_count * bd_size); | ||
88 | |||
89 | tsk->num_bd = bd_count; | ||
90 | tsk->bd_size = bd_size; | ||
91 | } | ||
92 | |||
93 | return tsk; | ||
94 | |||
95 | error: | ||
96 | if (tsk) { | ||
97 | if (tsk->irq != NO_IRQ) | ||
98 | irq_dispose_mapping(tsk->irq); | ||
99 | bcom_sram_free(tsk->bd); | ||
100 | kfree(tsk->cookie); | ||
101 | kfree(tsk); | ||
102 | } | ||
103 | |||
104 | bcom_eng->tdt[tasknum].stop = 0; | ||
105 | |||
106 | return NULL; | ||
107 | } | ||
108 | EXPORT_SYMBOL_GPL(bcom_task_alloc); | ||
109 | |||
110 | void | ||
111 | bcom_task_free(struct bcom_task *tsk) | ||
112 | { | ||
113 | /* Stop the task */ | ||
114 | bcom_disable_task(tsk->tasknum); | ||
115 | |||
116 | /* Clear TDT */ | ||
117 | bcom_eng->tdt[tsk->tasknum].start = 0; | ||
118 | bcom_eng->tdt[tsk->tasknum].stop = 0; | ||
119 | |||
120 | /* Free everything */ | ||
121 | irq_dispose_mapping(tsk->irq); | ||
122 | bcom_sram_free(tsk->bd); | ||
123 | kfree(tsk->cookie); | ||
124 | kfree(tsk); | ||
125 | } | ||
126 | EXPORT_SYMBOL_GPL(bcom_task_free); | ||
127 | |||
128 | int | ||
129 | bcom_load_image(int task, u32 *task_image) | ||
130 | { | ||
131 | struct bcom_task_header *hdr = (struct bcom_task_header *)task_image; | ||
132 | struct bcom_tdt *tdt; | ||
133 | u32 *desc, *var, *inc; | ||
134 | u32 *desc_src, *var_src, *inc_src; | ||
135 | |||
136 | /* Safety checks */ | ||
137 | if (hdr->magic != BCOM_TASK_MAGIC) { | ||
138 | printk(KERN_ERR DRIVER_NAME | ||
139 | ": Trying to load invalid microcode\n"); | ||
140 | return -EINVAL; | ||
141 | } | ||
142 | |||
143 | if ((task < 0) || (task >= BCOM_MAX_TASKS)) { | ||
144 | printk(KERN_ERR DRIVER_NAME | ||
145 | ": Trying to load invalid task %d\n", task); | ||
146 | return -EINVAL; | ||
147 | } | ||
148 | |||
149 | /* Initial load or reload */ | ||
150 | tdt = &bcom_eng->tdt[task]; | ||
151 | |||
152 | if (tdt->start) { | ||
153 | desc = bcom_task_desc(task); | ||
154 | if (hdr->desc_size != bcom_task_num_descs(task)) { | ||
155 | printk(KERN_ERR DRIVER_NAME | ||
156 | ": Trying to reload wrong task image " | ||
157 | "(%d size %d/%d)!\n", | ||
158 | task, | ||
159 | hdr->desc_size, | ||
160 | bcom_task_num_descs(task)); | ||
161 | return -EINVAL; | ||
162 | } | ||
163 | } else { | ||
164 | phys_addr_t start_pa; | ||
165 | |||
166 | desc = bcom_sram_alloc(hdr->desc_size * sizeof(u32), 4, &start_pa); | ||
167 | if (!desc) | ||
168 | return -ENOMEM; | ||
169 | |||
170 | tdt->start = start_pa; | ||
171 | tdt->stop = start_pa + ((hdr->desc_size-1) * sizeof(u32)); | ||
172 | } | ||
173 | |||
174 | var = bcom_task_var(task); | ||
175 | inc = bcom_task_inc(task); | ||
176 | |||
177 | /* Clear & copy */ | ||
178 | memset(var, 0x00, BCOM_VAR_SIZE); | ||
179 | memset(inc, 0x00, BCOM_INC_SIZE); | ||
180 | |||
181 | desc_src = (u32 *)(hdr + 1); | ||
182 | var_src = desc_src + hdr->desc_size; | ||
183 | inc_src = var_src + hdr->var_size; | ||
184 | |||
185 | memcpy(desc, desc_src, hdr->desc_size * sizeof(u32)); | ||
186 | memcpy(var + hdr->first_var, var_src, hdr->var_size * sizeof(u32)); | ||
187 | memcpy(inc, inc_src, hdr->inc_size * sizeof(u32)); | ||
188 | |||
189 | return 0; | ||
190 | } | ||
191 | EXPORT_SYMBOL_GPL(bcom_load_image); | ||
192 | |||
193 | void | ||
194 | bcom_set_initiator(int task, int initiator) | ||
195 | { | ||
196 | int i; | ||
197 | int num_descs; | ||
198 | u32 *desc; | ||
199 | int next_drd_has_initiator; | ||
200 | |||
201 | bcom_set_tcr_initiator(task, initiator); | ||
202 | |||
203 | /* Just setting tcr is apparently not enough due to some problem */ | ||
204 | /* with it. So we just go thru all the microcode and replace in */ | ||
205 | /* the DRD directly */ | ||
206 | |||
207 | desc = bcom_task_desc(task); | ||
208 | next_drd_has_initiator = 1; | ||
209 | num_descs = bcom_task_num_descs(task); | ||
210 | |||
211 | for (i=0; i<num_descs; i++, desc++) { | ||
212 | if (!bcom_desc_is_drd(*desc)) | ||
213 | continue; | ||
214 | if (next_drd_has_initiator) | ||
215 | if (bcom_desc_initiator(*desc) != BCOM_INITIATOR_ALWAYS) | ||
216 | bcom_set_desc_initiator(desc, initiator); | ||
217 | next_drd_has_initiator = !bcom_drd_is_extended(*desc); | ||
218 | } | ||
219 | } | ||
220 | EXPORT_SYMBOL_GPL(bcom_set_initiator); | ||
221 | |||
222 | |||
223 | /* Public API */ | ||
224 | |||
225 | void | ||
226 | bcom_enable(struct bcom_task *tsk) | ||
227 | { | ||
228 | bcom_enable_task(tsk->tasknum); | ||
229 | } | ||
230 | EXPORT_SYMBOL_GPL(bcom_enable); | ||
231 | |||
232 | void | ||
233 | bcom_disable(struct bcom_task *tsk) | ||
234 | { | ||
235 | bcom_disable_task(tsk->tasknum); | ||
236 | } | ||
237 | EXPORT_SYMBOL_GPL(bcom_disable); | ||
238 | |||
239 | |||
240 | /* ======================================================================== */ | ||
241 | /* Engine init/cleanup */ | ||
242 | /* ======================================================================== */ | ||
243 | |||
244 | /* Function Descriptor table */ | ||
245 | /* this will need to be updated if Freescale changes their task code FDT */ | ||
246 | static u32 fdt_ops[] = { | ||
247 | 0xa0045670, /* FDT[48] - load_acc() */ | ||
248 | 0x80045670, /* FDT[49] - unload_acc() */ | ||
249 | 0x21800000, /* FDT[50] - and() */ | ||
250 | 0x21e00000, /* FDT[51] - or() */ | ||
251 | 0x21500000, /* FDT[52] - xor() */ | ||
252 | 0x21400000, /* FDT[53] - andn() */ | ||
253 | 0x21500000, /* FDT[54] - not() */ | ||
254 | 0x20400000, /* FDT[55] - add() */ | ||
255 | 0x20500000, /* FDT[56] - sub() */ | ||
256 | 0x20800000, /* FDT[57] - lsh() */ | ||
257 | 0x20a00000, /* FDT[58] - rsh() */ | ||
258 | 0xc0170000, /* FDT[59] - crc8() */ | ||
259 | 0xc0145670, /* FDT[60] - crc16() */ | ||
260 | 0xc0345670, /* FDT[61] - crc32() */ | ||
261 | 0xa0076540, /* FDT[62] - endian32() */ | ||
262 | 0xa0000760, /* FDT[63] - endian16() */ | ||
263 | }; | ||
264 | |||
265 | |||
266 | static int __devinit | ||
267 | bcom_engine_init(void) | ||
268 | { | ||
269 | int task; | ||
270 | phys_addr_t tdt_pa, ctx_pa, var_pa, fdt_pa; | ||
271 | unsigned int tdt_size, ctx_size, var_size, fdt_size; | ||
272 | |||
273 | /* Allocate & clear SRAM zones for FDT, TDTs, contexts and vars/incs */ | ||
274 | tdt_size = BCOM_MAX_TASKS * sizeof(struct bcom_tdt); | ||
275 | ctx_size = BCOM_MAX_TASKS * BCOM_CTX_SIZE; | ||
276 | var_size = BCOM_MAX_TASKS * (BCOM_VAR_SIZE + BCOM_INC_SIZE); | ||
277 | fdt_size = BCOM_FDT_SIZE; | ||
278 | |||
279 | bcom_eng->tdt = bcom_sram_alloc(tdt_size, sizeof(u32), &tdt_pa); | ||
280 | bcom_eng->ctx = bcom_sram_alloc(ctx_size, BCOM_CTX_ALIGN, &ctx_pa); | ||
281 | bcom_eng->var = bcom_sram_alloc(var_size, BCOM_VAR_ALIGN, &var_pa); | ||
282 | bcom_eng->fdt = bcom_sram_alloc(fdt_size, BCOM_FDT_ALIGN, &fdt_pa); | ||
283 | |||
284 | if (!bcom_eng->tdt || !bcom_eng->ctx || !bcom_eng->var || !bcom_eng->fdt) { | ||
285 | printk(KERN_ERR "DMA: SRAM alloc failed in engine init !\n"); | ||
286 | |||
287 | bcom_sram_free(bcom_eng->tdt); | ||
288 | bcom_sram_free(bcom_eng->ctx); | ||
289 | bcom_sram_free(bcom_eng->var); | ||
290 | bcom_sram_free(bcom_eng->fdt); | ||
291 | |||
292 | return -ENOMEM; | ||
293 | } | ||
294 | |||
295 | memset(bcom_eng->tdt, 0x00, tdt_size); | ||
296 | memset(bcom_eng->ctx, 0x00, ctx_size); | ||
297 | memset(bcom_eng->var, 0x00, var_size); | ||
298 | memset(bcom_eng->fdt, 0x00, fdt_size); | ||
299 | |||
300 | /* Copy the FDT for the EU#3 */ | ||
301 | memcpy(&bcom_eng->fdt[48], fdt_ops, sizeof(fdt_ops)); | ||
302 | |||
303 | /* Initialize Task base structure */ | ||
304 | for (task=0; task<BCOM_MAX_TASKS; task++) | ||
305 | { | ||
306 | out_be16(&bcom_eng->regs->tcr[task], 0); | ||
307 | out_8(&bcom_eng->regs->ipr[task], 0); | ||
308 | |||
309 | bcom_eng->tdt[task].context = ctx_pa; | ||
310 | bcom_eng->tdt[task].var = var_pa; | ||
311 | bcom_eng->tdt[task].fdt = fdt_pa; | ||
312 | |||
313 | var_pa += BCOM_VAR_SIZE + BCOM_INC_SIZE; | ||
314 | ctx_pa += BCOM_CTX_SIZE; | ||
315 | } | ||
316 | |||
317 | out_be32(&bcom_eng->regs->taskBar, tdt_pa); | ||
318 | |||
319 | /* Init 'always' initiator */ | ||
320 | out_8(&bcom_eng->regs->ipr[BCOM_INITIATOR_ALWAYS], BCOM_IPR_ALWAYS); | ||
321 | |||
322 | /* Disable COMM Bus Prefetch, apparently it's not reliable yet */ | ||
323 | /* FIXME: This should be done on 5200 and not 5200B ... */ | ||
324 | out_be16(&bcom_eng->regs->PtdCntrl, in_be16(&bcom_eng->regs->PtdCntrl) | 1); | ||
325 | |||
326 | /* Init lock */ | ||
327 | spin_lock_init(&bcom_eng->lock); | ||
328 | |||
329 | return 0; | ||
330 | } | ||
331 | |||
332 | static void | ||
333 | bcom_engine_cleanup(void) | ||
334 | { | ||
335 | int task; | ||
336 | |||
337 | /* Stop all tasks */ | ||
338 | for (task=0; task<BCOM_MAX_TASKS; task++) | ||
339 | { | ||
340 | out_be16(&bcom_eng->regs->tcr[task], 0); | ||
341 | out_8(&bcom_eng->regs->ipr[task], 0); | ||
342 | } | ||
343 | |||
344 | out_be32(&bcom_eng->regs->taskBar, 0ul); | ||
345 | |||
346 | /* Release the SRAM zones */ | ||
347 | bcom_sram_free(bcom_eng->tdt); | ||
348 | bcom_sram_free(bcom_eng->ctx); | ||
349 | bcom_sram_free(bcom_eng->var); | ||
350 | bcom_sram_free(bcom_eng->fdt); | ||
351 | } | ||
352 | |||
353 | |||
354 | /* ======================================================================== */ | ||
355 | /* OF platform driver */ | ||
356 | /* ======================================================================== */ | ||
357 | |||
358 | static int __devinit | ||
359 | mpc52xx_bcom_probe(struct of_device *op, const struct of_device_id *match) | ||
360 | { | ||
361 | struct device_node *ofn_sram; | ||
362 | struct resource res_bcom; | ||
363 | |||
364 | int rv; | ||
365 | |||
366 | /* Inform user we're ok so far */ | ||
367 | printk(KERN_INFO "DMA: MPC52xx BestComm driver\n"); | ||
368 | |||
369 | /* Get the bestcomm node */ | ||
370 | of_node_get(op->node); | ||
371 | |||
372 | /* Prepare SRAM */ | ||
373 | ofn_sram = of_find_compatible_node(NULL, "sram", "mpc5200-sram"); | ||
374 | if (!ofn_sram) { | ||
375 | printk(KERN_ERR DRIVER_NAME ": " | ||
376 | "No SRAM found in device tree\n"); | ||
377 | rv = -ENODEV; | ||
378 | goto error_ofput; | ||
379 | } | ||
380 | rv = bcom_sram_init(ofn_sram, DRIVER_NAME); | ||
381 | of_node_put(ofn_sram); | ||
382 | |||
383 | if (rv) { | ||
384 | printk(KERN_ERR DRIVER_NAME ": " | ||
385 | "Error in SRAM init\n"); | ||
386 | goto error_ofput; | ||
387 | } | ||
388 | |||
389 | /* Get a clean struct */ | ||
390 | bcom_eng = kzalloc(sizeof(struct bcom_engine), GFP_KERNEL); | ||
391 | if (!bcom_eng) { | ||
392 | printk(KERN_ERR DRIVER_NAME ": " | ||
393 | "Can't allocate state structure\n"); | ||
394 | rv = -ENOMEM; | ||
395 | goto error_sramclean; | ||
396 | } | ||
397 | |||
398 | /* Save the node */ | ||
399 | bcom_eng->ofnode = op->node; | ||
400 | |||
401 | /* Get, reserve & map io */ | ||
402 | if (of_address_to_resource(op->node, 0, &res_bcom)) { | ||
403 | printk(KERN_ERR DRIVER_NAME ": " | ||
404 | "Can't get resource\n"); | ||
405 | rv = -EINVAL; | ||
406 | goto error_sramclean; | ||
407 | } | ||
408 | |||
409 | if (!request_mem_region(res_bcom.start, sizeof(struct mpc52xx_sdma), | ||
410 | DRIVER_NAME)) { | ||
411 | printk(KERN_ERR DRIVER_NAME ": " | ||
412 | "Can't request registers region\n"); | ||
413 | rv = -EBUSY; | ||
414 | goto error_sramclean; | ||
415 | } | ||
416 | |||
417 | bcom_eng->regs_base = res_bcom.start; | ||
418 | bcom_eng->regs = ioremap(res_bcom.start, sizeof(struct mpc52xx_sdma)); | ||
419 | if (!bcom_eng->regs) { | ||
420 | printk(KERN_ERR DRIVER_NAME ": " | ||
421 | "Can't map registers\n"); | ||
422 | rv = -ENOMEM; | ||
423 | goto error_release; | ||
424 | } | ||
425 | |||
426 | /* Now, do the real init */ | ||
427 | rv = bcom_engine_init(); | ||
428 | if (rv) | ||
429 | goto error_unmap; | ||
430 | |||
431 | /* Done ! */ | ||
432 | printk(KERN_INFO "DMA: MPC52xx BestComm engine @%08lx ok !\n", | ||
433 | bcom_eng->regs_base); | ||
434 | |||
435 | return 0; | ||
436 | |||
437 | /* Error path */ | ||
438 | error_unmap: | ||
439 | iounmap(bcom_eng->regs); | ||
440 | error_release: | ||
441 | release_mem_region(res_bcom.start, sizeof(struct mpc52xx_sdma)); | ||
442 | error_sramclean: | ||
443 | kfree(bcom_eng); | ||
444 | bcom_sram_cleanup(); | ||
445 | error_ofput: | ||
446 | of_node_put(op->node); | ||
447 | |||
448 | printk(KERN_ERR "DMA: MPC52xx BestComm init failed !\n"); | ||
449 | |||
450 | return rv; | ||
451 | } | ||
452 | |||
453 | |||
454 | static int | ||
455 | mpc52xx_bcom_remove(struct of_device *op) | ||
456 | { | ||
457 | /* Clean up the engine */ | ||
458 | bcom_engine_cleanup(); | ||
459 | |||
460 | /* Cleanup SRAM */ | ||
461 | bcom_sram_cleanup(); | ||
462 | |||
463 | /* Release regs */ | ||
464 | iounmap(bcom_eng->regs); | ||
465 | release_mem_region(bcom_eng->regs_base, sizeof(struct mpc52xx_sdma)); | ||
466 | |||
467 | /* Release the node */ | ||
468 | of_node_put(bcom_eng->ofnode); | ||
469 | |||
470 | /* Release memory */ | ||
471 | kfree(bcom_eng); | ||
472 | bcom_eng = NULL; | ||
473 | |||
474 | return 0; | ||
475 | } | ||
476 | |||
477 | static struct of_device_id mpc52xx_bcom_of_match[] = { | ||
478 | { | ||
479 | .type = "dma-controller", | ||
480 | .compatible = "mpc5200-bestcomm", | ||
481 | }, | ||
482 | {}, | ||
483 | }; | ||
484 | |||
485 | MODULE_DEVICE_TABLE(of, mpc52xx_bcom_of_match); | ||
486 | |||
487 | |||
488 | static struct of_platform_driver mpc52xx_bcom_of_platform_driver = { | ||
489 | .owner = THIS_MODULE, | ||
490 | .name = DRIVER_NAME, | ||
491 | .match_table = mpc52xx_bcom_of_match, | ||
492 | .probe = mpc52xx_bcom_probe, | ||
493 | .remove = mpc52xx_bcom_remove, | ||
494 | .driver = { | ||
495 | .name = DRIVER_NAME, | ||
496 | .owner = THIS_MODULE, | ||
497 | }, | ||
498 | }; | ||
499 | |||
500 | |||
501 | /* ======================================================================== */ | ||
502 | /* Module */ | ||
503 | /* ======================================================================== */ | ||
504 | |||
505 | static int __init | ||
506 | mpc52xx_bcom_init(void) | ||
507 | { | ||
508 | return of_register_platform_driver(&mpc52xx_bcom_of_platform_driver); | ||
509 | } | ||
510 | |||
511 | static void __exit | ||
512 | mpc52xx_bcom_exit(void) | ||
513 | { | ||
514 | of_unregister_platform_driver(&mpc52xx_bcom_of_platform_driver); | ||
515 | } | ||
516 | |||
517 | /* If we're not a module, we must make sure everything is setup before */ | ||
518 | /* anyone tries to use us ... that's why we use subsys_initcall instead */ | ||
519 | /* of module_init. */ | ||
520 | subsys_initcall(mpc52xx_bcom_init); | ||
521 | module_exit(mpc52xx_bcom_exit); | ||
522 | |||
523 | MODULE_DESCRIPTION("Freescale MPC52xx BestComm DMA"); | ||
524 | MODULE_AUTHOR("Sylvain Munaut <tnt@246tNt.com>"); | ||
525 | MODULE_AUTHOR("Andrey Volkov <avolkov@varma-el.com>"); | ||
526 | MODULE_AUTHOR("Dale Farnsworth <dfarnsworth@mvista.com>"); | ||
527 | MODULE_LICENSE("GPL v2"); | ||
528 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.h b/arch/powerpc/sysdev/bestcomm/bestcomm.h new file mode 100644 index 000000000000..e802cb4eb69a --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/bestcomm.h | |||
@@ -0,0 +1,190 @@ | |||
1 | /* | ||
2 | * Public header for the MPC52xx processor BestComm driver | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 2006 Sylvain Munaut <tnt@246tNt.com> | ||
6 | * Copyright (C) 2005 Varma Electronics Oy, | ||
7 | * ( by Andrey Volkov <avolkov@varma-el.com> ) | ||
8 | * Copyright (C) 2003-2004 MontaVista, Software, Inc. | ||
9 | * ( by Dale Farnsworth <dfarnsworth@mvista.com> ) | ||
10 | * | ||
11 | * This file is licensed under the terms of the GNU General Public License | ||
12 | * version 2. This program is licensed "as is" without any warranty of any | ||
13 | * kind, whether express or implied. | ||
14 | */ | ||
15 | |||
16 | #ifndef __BESTCOMM_H__ | ||
17 | #define __BESTCOMM_H__ | ||
18 | |||
19 | struct bcom_bd; /* defined later on ... */ | ||
20 | |||
21 | |||
22 | /* ======================================================================== */ | ||
23 | /* Generic task managment */ | ||
24 | /* ======================================================================== */ | ||
25 | |||
26 | /** | ||
27 | * struct bcom_task - Structure describing a loaded BestComm task | ||
28 | * | ||
29 | * This structure is never built by the driver it self. It's built and | ||
30 | * filled the intermediate layer of the BestComm API, the task dependent | ||
31 | * support code. | ||
32 | * | ||
33 | * Most likely you don't need to poke around inside this structure. The | ||
34 | * fields are exposed in the header just for the sake of inline functions | ||
35 | */ | ||
36 | struct bcom_task { | ||
37 | unsigned int tasknum; | ||
38 | unsigned int flags; | ||
39 | int irq; | ||
40 | |||
41 | struct bcom_bd *bd; | ||
42 | phys_addr_t bd_pa; | ||
43 | void **cookie; | ||
44 | unsigned short index; | ||
45 | unsigned short outdex; | ||
46 | unsigned int num_bd; | ||
47 | unsigned int bd_size; | ||
48 | |||
49 | void* priv; | ||
50 | }; | ||
51 | |||
52 | #define BCOM_FLAGS_NONE 0x00000000ul | ||
53 | #define BCOM_FLAGS_ENABLE_TASK (1ul << 0) | ||
54 | |||
55 | /** | ||
56 | * bcom_enable - Enable a BestComm task | ||
57 | * @tsk: The BestComm task structure | ||
58 | * | ||
59 | * This function makes sure the given task is enabled and can be run | ||
60 | * by the BestComm engine as needed | ||
61 | */ | ||
62 | extern void bcom_enable(struct bcom_task *tsk); | ||
63 | |||
64 | /** | ||
65 | * bcom_disable - Disable a BestComm task | ||
66 | * @tsk: The BestComm task structure | ||
67 | * | ||
68 | * This function disable a given task, making sure it's not executed | ||
69 | * by the BestComm engine. | ||
70 | */ | ||
71 | extern void bcom_disable(struct bcom_task *tsk); | ||
72 | |||
73 | |||
74 | /** | ||
75 | * bcom_get_task_irq - Returns the irq number of a BestComm task | ||
76 | * @tsk: The BestComm task structure | ||
77 | */ | ||
78 | static inline int | ||
79 | bcom_get_task_irq(struct bcom_task *tsk) { | ||
80 | return tsk->irq; | ||
81 | } | ||
82 | |||
83 | /* ======================================================================== */ | ||
84 | /* BD based tasks helpers */ | ||
85 | /* ======================================================================== */ | ||
86 | |||
87 | /** | ||
88 | * struct bcom_bd - Structure describing a generic BestComm buffer descriptor | ||
89 | * @status: The current status of this buffer. Exact meaning depends on the | ||
90 | * task type | ||
91 | * @data: An array of u32 whose meaning depends on the task type. | ||
92 | */ | ||
93 | struct bcom_bd { | ||
94 | u32 status; | ||
95 | u32 data[1]; /* variable, but at least 1 */ | ||
96 | }; | ||
97 | |||
98 | #define BCOM_BD_READY 0x40000000ul | ||
99 | |||
100 | /** _bcom_next_index - Get next input index. | ||
101 | * @tsk: pointer to task structure | ||
102 | * | ||
103 | * Support function; Device drivers should not call this | ||
104 | */ | ||
105 | static inline int | ||
106 | _bcom_next_index(struct bcom_task *tsk) | ||
107 | { | ||
108 | return ((tsk->index + 1) == tsk->num_bd) ? 0 : tsk->index + 1; | ||
109 | } | ||
110 | |||
111 | /** _bcom_next_outdex - Get next output index. | ||
112 | * @tsk: pointer to task structure | ||
113 | * | ||
114 | * Support function; Device drivers should not call this | ||
115 | */ | ||
116 | static inline int | ||
117 | _bcom_next_outdex(struct bcom_task *tsk) | ||
118 | { | ||
119 | return ((tsk->outdex + 1) == tsk->num_bd) ? 0 : tsk->outdex + 1; | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * bcom_queue_empty - Checks if a BestComm task BD queue is empty | ||
124 | * @tsk: The BestComm task structure | ||
125 | */ | ||
126 | static inline int | ||
127 | bcom_queue_empty(struct bcom_task *tsk) | ||
128 | { | ||
129 | return tsk->index == tsk->outdex; | ||
130 | } | ||
131 | |||
132 | /** | ||
133 | * bcom_queue_full - Checks if a BestComm task BD queue is full | ||
134 | * @tsk: The BestComm task structure | ||
135 | */ | ||
136 | static inline int | ||
137 | bcom_queue_full(struct bcom_task *tsk) | ||
138 | { | ||
139 | return tsk->outdex == _bcom_next_index(tsk); | ||
140 | } | ||
141 | |||
142 | /** | ||
143 | * bcom_buffer_done - Checks if a BestComm | ||
144 | * @tsk: The BestComm task structure | ||
145 | */ | ||
146 | static inline int | ||
147 | bcom_buffer_done(struct bcom_task *tsk) | ||
148 | { | ||
149 | if (bcom_queue_empty(tsk)) | ||
150 | return 0; | ||
151 | return !(tsk->bd[tsk->outdex].status & BCOM_BD_READY); | ||
152 | } | ||
153 | |||
154 | /** | ||
155 | * bcom_prepare_next_buffer - clear status of next available buffer. | ||
156 | * @tsk: The BestComm task structure | ||
157 | * | ||
158 | * Returns pointer to next buffer descriptor | ||
159 | */ | ||
160 | static inline struct bcom_bd * | ||
161 | bcom_prepare_next_buffer(struct bcom_task *tsk) | ||
162 | { | ||
163 | tsk->bd[tsk->index].status = 0; /* cleanup last status */ | ||
164 | return &tsk->bd[tsk->index]; | ||
165 | } | ||
166 | |||
167 | static inline void | ||
168 | bcom_submit_next_buffer(struct bcom_task *tsk, void *cookie) | ||
169 | { | ||
170 | tsk->cookie[tsk->index] = cookie; | ||
171 | mb(); /* ensure the bd is really up-to-date */ | ||
172 | tsk->bd[tsk->index].status |= BCOM_BD_READY; | ||
173 | tsk->index = _bcom_next_index(tsk); | ||
174 | if (tsk->flags & BCOM_FLAGS_ENABLE_TASK) | ||
175 | bcom_enable(tsk); | ||
176 | } | ||
177 | |||
178 | static inline void * | ||
179 | bcom_retrieve_buffer(struct bcom_task *tsk, u32 *p_status, struct bcom_bd **p_bd) | ||
180 | { | ||
181 | void *cookie = tsk->cookie[tsk->outdex]; | ||
182 | if (p_status) | ||
183 | *p_status = tsk->bd[tsk->outdex].status; | ||
184 | if (p_bd) | ||
185 | *p_bd = &tsk->bd[tsk->outdex]; | ||
186 | tsk->outdex = _bcom_next_outdex(tsk); | ||
187 | return cookie; | ||
188 | } | ||
189 | |||
190 | #endif /* __BESTCOMM_H__ */ | ||
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h b/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h new file mode 100644 index 000000000000..866a2915ef2f --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/bestcomm_priv.h | |||
@@ -0,0 +1,334 @@ | |||
1 | /* | ||
2 | * Private header for the MPC52xx processor BestComm driver | ||
3 | * | ||
4 | * By private, we mean that driver should not use it directly. It's meant | ||
5 | * to be used by the BestComm engine driver itself and by the intermediate | ||
6 | * layer between the core and the drivers. | ||
7 | * | ||
8 | * Copyright (C) 2006 Sylvain Munaut <tnt@246tNt.com> | ||
9 | * Copyright (C) 2005 Varma Electronics Oy, | ||
10 | * ( by Andrey Volkov <avolkov@varma-el.com> ) | ||
11 | * Copyright (C) 2003-2004 MontaVista, Software, Inc. | ||
12 | * ( by Dale Farnsworth <dfarnsworth@mvista.com> ) | ||
13 | * | ||
14 | * This file is licensed under the terms of the GNU General Public License | ||
15 | * version 2. This program is licensed "as is" without any warranty of any | ||
16 | * kind, whether express or implied. | ||
17 | */ | ||
18 | |||
19 | #ifndef __BESTCOMM_PRIV_H__ | ||
20 | #define __BESTCOMM_PRIV_H__ | ||
21 | |||
22 | #include <linux/spinlock.h> | ||
23 | #include <linux/of.h> | ||
24 | #include <asm/io.h> | ||
25 | #include <asm/mpc52xx.h> | ||
26 | |||
27 | #include "sram.h" | ||
28 | |||
29 | |||
30 | /* ======================================================================== */ | ||
31 | /* Engine related stuff */ | ||
32 | /* ======================================================================== */ | ||
33 | |||
34 | /* Zones sizes and needed alignments */ | ||
35 | #define BCOM_MAX_TASKS 16 | ||
36 | #define BCOM_MAX_VAR 24 | ||
37 | #define BCOM_MAX_INC 8 | ||
38 | #define BCOM_MAX_FDT 64 | ||
39 | #define BCOM_MAX_CTX 20 | ||
40 | #define BCOM_CTX_SIZE (BCOM_MAX_CTX * sizeof(u32)) | ||
41 | #define BCOM_CTX_ALIGN 0x100 | ||
42 | #define BCOM_VAR_SIZE (BCOM_MAX_VAR * sizeof(u32)) | ||
43 | #define BCOM_INC_SIZE (BCOM_MAX_INC * sizeof(u32)) | ||
44 | #define BCOM_VAR_ALIGN 0x80 | ||
45 | #define BCOM_FDT_SIZE (BCOM_MAX_FDT * sizeof(u32)) | ||
46 | #define BCOM_FDT_ALIGN 0x100 | ||
47 | |||
48 | /** | ||
49 | * struct bcom_tdt - Task Descriptor Table Entry | ||
50 | * | ||
51 | */ | ||
52 | struct bcom_tdt { | ||
53 | u32 start; | ||
54 | u32 stop; | ||
55 | u32 var; | ||
56 | u32 fdt; | ||
57 | u32 exec_status; /* used internally by BestComm engine */ | ||
58 | u32 mvtp; /* used internally by BestComm engine */ | ||
59 | u32 context; | ||
60 | u32 litbase; | ||
61 | }; | ||
62 | |||
63 | /** | ||
64 | * struct bcom_engine | ||
65 | * | ||
66 | * This holds all info needed globaly to handle the engine | ||
67 | */ | ||
68 | struct bcom_engine { | ||
69 | struct device_node *ofnode; | ||
70 | struct mpc52xx_sdma __iomem *regs; | ||
71 | phys_addr_t regs_base; | ||
72 | |||
73 | struct bcom_tdt *tdt; | ||
74 | u32 *ctx; | ||
75 | u32 *var; | ||
76 | u32 *fdt; | ||
77 | |||
78 | spinlock_t lock; | ||
79 | }; | ||
80 | |||
81 | extern struct bcom_engine *bcom_eng; | ||
82 | |||
83 | |||
84 | /* ======================================================================== */ | ||
85 | /* Tasks related stuff */ | ||
86 | /* ======================================================================== */ | ||
87 | |||
88 | /* Tasks image header */ | ||
89 | #define BCOM_TASK_MAGIC 0x4243544B /* 'BCTK' */ | ||
90 | |||
91 | struct bcom_task_header { | ||
92 | u32 magic; | ||
93 | u8 desc_size; /* the size fields */ | ||
94 | u8 var_size; /* are given in number */ | ||
95 | u8 inc_size; /* of 32-bits words */ | ||
96 | u8 first_var; | ||
97 | u8 reserved[8]; | ||
98 | }; | ||
99 | |||
100 | /* Descriptors stucture & co */ | ||
101 | #define BCOM_DESC_NOP 0x000001f8 | ||
102 | #define BCOM_LCD_MASK 0x80000000 | ||
103 | #define BCOM_DRD_EXTENDED 0x40000000 | ||
104 | #define BCOM_DRD_INITIATOR_SHIFT 21 | ||
105 | |||
106 | /* Tasks pragma */ | ||
107 | #define BCOM_PRAGMA_BIT_RSV 7 /* reserved pragma bit */ | ||
108 | #define BCOM_PRAGMA_BIT_PRECISE_INC 6 /* increment 0=when possible, */ | ||
109 | /* 1=iter end */ | ||
110 | #define BCOM_PRAGMA_BIT_RST_ERROR_NO 5 /* don't reset errors on */ | ||
111 | /* task enable */ | ||
112 | #define BCOM_PRAGMA_BIT_PACK 4 /* pack data enable */ | ||
113 | #define BCOM_PRAGMA_BIT_INTEGER 3 /* data alignment */ | ||
114 | /* 0=frac(msb), 1=int(lsb) */ | ||
115 | #define BCOM_PRAGMA_BIT_SPECREAD 2 /* XLB speculative read */ | ||
116 | #define BCOM_PRAGMA_BIT_CW 1 /* write line buffer enable */ | ||
117 | #define BCOM_PRAGMA_BIT_RL 0 /* read line buffer enable */ | ||
118 | |||
119 | /* Looks like XLB speculative read generates XLB errors when a buffer | ||
120 | * is at the end of the physical memory. i.e. when accessing the | ||
121 | * lasts words, the engine tries to prefetch the next but there is no | ||
122 | * next ... | ||
123 | */ | ||
124 | #define BCOM_STD_PRAGMA ((0 << BCOM_PRAGMA_BIT_RSV) | \ | ||
125 | (0 << BCOM_PRAGMA_BIT_PRECISE_INC) | \ | ||
126 | (0 << BCOM_PRAGMA_BIT_RST_ERROR_NO) | \ | ||
127 | (0 << BCOM_PRAGMA_BIT_PACK) | \ | ||
128 | (0 << BCOM_PRAGMA_BIT_INTEGER) | \ | ||
129 | (0 << BCOM_PRAGMA_BIT_SPECREAD) | \ | ||
130 | (1 << BCOM_PRAGMA_BIT_CW) | \ | ||
131 | (1 << BCOM_PRAGMA_BIT_RL)) | ||
132 | |||
133 | #define BCOM_PCI_PRAGMA ((0 << BCOM_PRAGMA_BIT_RSV) | \ | ||
134 | (0 << BCOM_PRAGMA_BIT_PRECISE_INC) | \ | ||
135 | (0 << BCOM_PRAGMA_BIT_RST_ERROR_NO) | \ | ||
136 | (0 << BCOM_PRAGMA_BIT_PACK) | \ | ||
137 | (1 << BCOM_PRAGMA_BIT_INTEGER) | \ | ||
138 | (0 << BCOM_PRAGMA_BIT_SPECREAD) | \ | ||
139 | (1 << BCOM_PRAGMA_BIT_CW) | \ | ||
140 | (1 << BCOM_PRAGMA_BIT_RL)) | ||
141 | |||
142 | #define BCOM_ATA_PRAGMA BCOM_STD_PRAGMA | ||
143 | #define BCOM_CRC16_DP_0_PRAGMA BCOM_STD_PRAGMA | ||
144 | #define BCOM_CRC16_DP_1_PRAGMA BCOM_STD_PRAGMA | ||
145 | #define BCOM_FEC_RX_BD_PRAGMA BCOM_STD_PRAGMA | ||
146 | #define BCOM_FEC_TX_BD_PRAGMA BCOM_STD_PRAGMA | ||
147 | #define BCOM_GEN_DP_0_PRAGMA BCOM_STD_PRAGMA | ||
148 | #define BCOM_GEN_DP_1_PRAGMA BCOM_STD_PRAGMA | ||
149 | #define BCOM_GEN_DP_2_PRAGMA BCOM_STD_PRAGMA | ||
150 | #define BCOM_GEN_DP_3_PRAGMA BCOM_STD_PRAGMA | ||
151 | #define BCOM_GEN_DP_BD_0_PRAGMA BCOM_STD_PRAGMA | ||
152 | #define BCOM_GEN_DP_BD_1_PRAGMA BCOM_STD_PRAGMA | ||
153 | #define BCOM_GEN_RX_BD_PRAGMA BCOM_STD_PRAGMA | ||
154 | #define BCOM_GEN_TX_BD_PRAGMA BCOM_STD_PRAGMA | ||
155 | #define BCOM_GEN_LPC_PRAGMA BCOM_STD_PRAGMA | ||
156 | #define BCOM_PCI_RX_PRAGMA BCOM_PCI_PRAGMA | ||
157 | #define BCOM_PCI_TX_PRAGMA BCOM_PCI_PRAGMA | ||
158 | |||
159 | /* Initiators number */ | ||
160 | #define BCOM_INITIATOR_ALWAYS 0 | ||
161 | #define BCOM_INITIATOR_SCTMR_0 1 | ||
162 | #define BCOM_INITIATOR_SCTMR_1 2 | ||
163 | #define BCOM_INITIATOR_FEC_RX 3 | ||
164 | #define BCOM_INITIATOR_FEC_TX 4 | ||
165 | #define BCOM_INITIATOR_ATA_RX 5 | ||
166 | #define BCOM_INITIATOR_ATA_TX 6 | ||
167 | #define BCOM_INITIATOR_SCPCI_RX 7 | ||
168 | #define BCOM_INITIATOR_SCPCI_TX 8 | ||
169 | #define BCOM_INITIATOR_PSC3_RX 9 | ||
170 | #define BCOM_INITIATOR_PSC3_TX 10 | ||
171 | #define BCOM_INITIATOR_PSC2_RX 11 | ||
172 | #define BCOM_INITIATOR_PSC2_TX 12 | ||
173 | #define BCOM_INITIATOR_PSC1_RX 13 | ||
174 | #define BCOM_INITIATOR_PSC1_TX 14 | ||
175 | #define BCOM_INITIATOR_SCTMR_2 15 | ||
176 | #define BCOM_INITIATOR_SCLPC 16 | ||
177 | #define BCOM_INITIATOR_PSC5_RX 17 | ||
178 | #define BCOM_INITIATOR_PSC5_TX 18 | ||
179 | #define BCOM_INITIATOR_PSC4_RX 19 | ||
180 | #define BCOM_INITIATOR_PSC4_TX 20 | ||
181 | #define BCOM_INITIATOR_I2C2_RX 21 | ||
182 | #define BCOM_INITIATOR_I2C2_TX 22 | ||
183 | #define BCOM_INITIATOR_I2C1_RX 23 | ||
184 | #define BCOM_INITIATOR_I2C1_TX 24 | ||
185 | #define BCOM_INITIATOR_PSC6_RX 25 | ||
186 | #define BCOM_INITIATOR_PSC6_TX 26 | ||
187 | #define BCOM_INITIATOR_IRDA_RX 25 | ||
188 | #define BCOM_INITIATOR_IRDA_TX 26 | ||
189 | #define BCOM_INITIATOR_SCTMR_3 27 | ||
190 | #define BCOM_INITIATOR_SCTMR_4 28 | ||
191 | #define BCOM_INITIATOR_SCTMR_5 29 | ||
192 | #define BCOM_INITIATOR_SCTMR_6 30 | ||
193 | #define BCOM_INITIATOR_SCTMR_7 31 | ||
194 | |||
195 | /* Initiators priorities */ | ||
196 | #define BCOM_IPR_ALWAYS 7 | ||
197 | #define BCOM_IPR_SCTMR_0 2 | ||
198 | #define BCOM_IPR_SCTMR_1 2 | ||
199 | #define BCOM_IPR_FEC_RX 6 | ||
200 | #define BCOM_IPR_FEC_TX 5 | ||
201 | #define BCOM_IPR_ATA_RX 4 | ||
202 | #define BCOM_IPR_ATA_TX 3 | ||
203 | #define BCOM_IPR_SCPCI_RX 2 | ||
204 | #define BCOM_IPR_SCPCI_TX 2 | ||
205 | #define BCOM_IPR_PSC3_RX 2 | ||
206 | #define BCOM_IPR_PSC3_TX 2 | ||
207 | #define BCOM_IPR_PSC2_RX 2 | ||
208 | #define BCOM_IPR_PSC2_TX 2 | ||
209 | #define BCOM_IPR_PSC1_RX 2 | ||
210 | #define BCOM_IPR_PSC1_TX 2 | ||
211 | #define BCOM_IPR_SCTMR_2 2 | ||
212 | #define BCOM_IPR_SCLPC 2 | ||
213 | #define BCOM_IPR_PSC5_RX 2 | ||
214 | #define BCOM_IPR_PSC5_TX 2 | ||
215 | #define BCOM_IPR_PSC4_RX 2 | ||
216 | #define BCOM_IPR_PSC4_TX 2 | ||
217 | #define BCOM_IPR_I2C2_RX 2 | ||
218 | #define BCOM_IPR_I2C2_TX 2 | ||
219 | #define BCOM_IPR_I2C1_RX 2 | ||
220 | #define BCOM_IPR_I2C1_TX 2 | ||
221 | #define BCOM_IPR_PSC6_RX 2 | ||
222 | #define BCOM_IPR_PSC6_TX 2 | ||
223 | #define BCOM_IPR_IRDA_RX 2 | ||
224 | #define BCOM_IPR_IRDA_TX 2 | ||
225 | #define BCOM_IPR_SCTMR_3 2 | ||
226 | #define BCOM_IPR_SCTMR_4 2 | ||
227 | #define BCOM_IPR_SCTMR_5 2 | ||
228 | #define BCOM_IPR_SCTMR_6 2 | ||
229 | #define BCOM_IPR_SCTMR_7 2 | ||
230 | |||
231 | |||
232 | /* ======================================================================== */ | ||
233 | /* API */ | ||
234 | /* ======================================================================== */ | ||
235 | |||
236 | extern struct bcom_task *bcom_task_alloc(int bd_count, int bd_size, int priv_size); | ||
237 | extern void bcom_task_free(struct bcom_task *tsk); | ||
238 | extern int bcom_load_image(int task, u32 *task_image); | ||
239 | extern void bcom_set_initiator(int task, int initiator); | ||
240 | |||
241 | |||
242 | #define TASK_ENABLE 0x8000 | ||
243 | |||
244 | static inline void | ||
245 | bcom_enable_task(int task) | ||
246 | { | ||
247 | u16 reg; | ||
248 | reg = in_be16(&bcom_eng->regs->tcr[task]); | ||
249 | out_be16(&bcom_eng->regs->tcr[task], reg | TASK_ENABLE); | ||
250 | } | ||
251 | |||
252 | static inline void | ||
253 | bcom_disable_task(int task) | ||
254 | { | ||
255 | u16 reg = in_be16(&bcom_eng->regs->tcr[task]); | ||
256 | out_be16(&bcom_eng->regs->tcr[task], reg & ~TASK_ENABLE); | ||
257 | } | ||
258 | |||
259 | |||
260 | static inline u32 * | ||
261 | bcom_task_desc(int task) | ||
262 | { | ||
263 | return bcom_sram_pa2va(bcom_eng->tdt[task].start); | ||
264 | } | ||
265 | |||
266 | static inline int | ||
267 | bcom_task_num_descs(int task) | ||
268 | { | ||
269 | return (bcom_eng->tdt[task].stop - bcom_eng->tdt[task].start)/sizeof(u32) + 1; | ||
270 | } | ||
271 | |||
272 | static inline u32 * | ||
273 | bcom_task_var(int task) | ||
274 | { | ||
275 | return bcom_sram_pa2va(bcom_eng->tdt[task].var); | ||
276 | } | ||
277 | |||
278 | static inline u32 * | ||
279 | bcom_task_inc(int task) | ||
280 | { | ||
281 | return &bcom_task_var(task)[BCOM_MAX_VAR]; | ||
282 | } | ||
283 | |||
284 | |||
285 | static inline int | ||
286 | bcom_drd_is_extended(u32 desc) | ||
287 | { | ||
288 | return (desc) & BCOM_DRD_EXTENDED; | ||
289 | } | ||
290 | |||
291 | static inline int | ||
292 | bcom_desc_is_drd(u32 desc) | ||
293 | { | ||
294 | return !(desc & BCOM_LCD_MASK) && desc != BCOM_DESC_NOP; | ||
295 | } | ||
296 | |||
297 | static inline int | ||
298 | bcom_desc_initiator(u32 desc) | ||
299 | { | ||
300 | return (desc >> BCOM_DRD_INITIATOR_SHIFT) & 0x1f; | ||
301 | } | ||
302 | |||
303 | static inline void | ||
304 | bcom_set_desc_initiator(u32 *desc, int initiator) | ||
305 | { | ||
306 | *desc = (*desc & ~(0x1f << BCOM_DRD_INITIATOR_SHIFT)) | | ||
307 | ((initiator & 0x1f) << BCOM_DRD_INITIATOR_SHIFT); | ||
308 | } | ||
309 | |||
310 | |||
311 | static inline void | ||
312 | bcom_set_task_pragma(int task, int pragma) | ||
313 | { | ||
314 | u32 *fdt = &bcom_eng->tdt[task].fdt; | ||
315 | *fdt = (*fdt & ~0xff) | pragma; | ||
316 | } | ||
317 | |||
318 | static inline void | ||
319 | bcom_set_task_auto_start(int task, int next_task) | ||
320 | { | ||
321 | u16 __iomem *tcr = &bcom_eng->regs->tcr[task]; | ||
322 | out_be16(tcr, (in_be16(tcr) & ~0xff) | 0x00c0 | next_task); | ||
323 | } | ||
324 | |||
325 | static inline void | ||
326 | bcom_set_tcr_initiator(int task, int initiator) | ||
327 | { | ||
328 | u16 __iomem *tcr = &bcom_eng->regs->tcr[task]; | ||
329 | out_be16(tcr, (in_be16(tcr) & ~0x1f00) | ((initiator & 0x1f) << 8)); | ||
330 | } | ||
331 | |||
332 | |||
333 | #endif /* __BESTCOMM_PRIV_H__ */ | ||
334 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/fec.c b/arch/powerpc/sysdev/bestcomm/fec.c new file mode 100644 index 000000000000..957a988d23ea --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/fec.c | |||
@@ -0,0 +1,270 @@ | |||
1 | /* | ||
2 | * Bestcomm FEC tasks driver | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 2006-2007 Sylvain Munaut <tnt@246tNt.com> | ||
6 | * Copyright (C) 2003-2004 MontaVista, Software, Inc. | ||
7 | * ( by Dale Farnsworth <dfarnsworth@mvista.com> ) | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/types.h> | ||
17 | #include <asm/io.h> | ||
18 | |||
19 | #include "bestcomm.h" | ||
20 | #include "bestcomm_priv.h" | ||
21 | #include "fec.h" | ||
22 | |||
23 | |||
24 | /* ======================================================================== */ | ||
25 | /* Task image/var/inc */ | ||
26 | /* ======================================================================== */ | ||
27 | |||
28 | /* fec tasks images */ | ||
29 | extern u32 bcom_fec_rx_task[]; | ||
30 | extern u32 bcom_fec_tx_task[]; | ||
31 | |||
32 | /* rx task vars that need to be set before enabling the task */ | ||
33 | struct bcom_fec_rx_var { | ||
34 | u32 enable; /* (u16*) address of task's control register */ | ||
35 | u32 fifo; /* (u32*) address of fec's fifo */ | ||
36 | u32 bd_base; /* (struct bcom_bd*) beginning of ring buffer */ | ||
37 | u32 bd_last; /* (struct bcom_bd*) end of ring buffer */ | ||
38 | u32 bd_start; /* (struct bcom_bd*) current bd */ | ||
39 | u32 buffer_size; /* size of receive buffer */ | ||
40 | }; | ||
41 | |||
42 | /* rx task incs that need to be set before enabling the task */ | ||
43 | struct bcom_fec_rx_inc { | ||
44 | u16 pad0; | ||
45 | s16 incr_bytes; | ||
46 | u16 pad1; | ||
47 | s16 incr_dst; | ||
48 | u16 pad2; | ||
49 | s16 incr_dst_ma; | ||
50 | }; | ||
51 | |||
52 | /* tx task vars that need to be set before enabling the task */ | ||
53 | struct bcom_fec_tx_var { | ||
54 | u32 DRD; /* (u32*) address of self-modified DRD */ | ||
55 | u32 fifo; /* (u32*) address of fec's fifo */ | ||
56 | u32 enable; /* (u16*) address of task's control register */ | ||
57 | u32 bd_base; /* (struct bcom_bd*) beginning of ring buffer */ | ||
58 | u32 bd_last; /* (struct bcom_bd*) end of ring buffer */ | ||
59 | u32 bd_start; /* (struct bcom_bd*) current bd */ | ||
60 | u32 buffer_size; /* set by uCode for each packet */ | ||
61 | }; | ||
62 | |||
63 | /* tx task incs that need to be set before enabling the task */ | ||
64 | struct bcom_fec_tx_inc { | ||
65 | u16 pad0; | ||
66 | s16 incr_bytes; | ||
67 | u16 pad1; | ||
68 | s16 incr_src; | ||
69 | u16 pad2; | ||
70 | s16 incr_src_ma; | ||
71 | }; | ||
72 | |||
73 | /* private structure in the task */ | ||
74 | struct bcom_fec_priv { | ||
75 | phys_addr_t fifo; | ||
76 | int maxbufsize; | ||
77 | }; | ||
78 | |||
79 | |||
80 | /* ======================================================================== */ | ||
81 | /* Task support code */ | ||
82 | /* ======================================================================== */ | ||
83 | |||
84 | struct bcom_task * | ||
85 | bcom_fec_rx_init(int queue_len, phys_addr_t fifo, int maxbufsize) | ||
86 | { | ||
87 | struct bcom_task *tsk; | ||
88 | struct bcom_fec_priv *priv; | ||
89 | |||
90 | tsk = bcom_task_alloc(queue_len, sizeof(struct bcom_fec_bd), | ||
91 | sizeof(struct bcom_fec_priv)); | ||
92 | if (!tsk) | ||
93 | return NULL; | ||
94 | |||
95 | tsk->flags = BCOM_FLAGS_NONE; | ||
96 | |||
97 | priv = tsk->priv; | ||
98 | priv->fifo = fifo; | ||
99 | priv->maxbufsize = maxbufsize; | ||
100 | |||
101 | if (bcom_fec_rx_reset(tsk)) { | ||
102 | bcom_task_free(tsk); | ||
103 | return NULL; | ||
104 | } | ||
105 | |||
106 | return tsk; | ||
107 | } | ||
108 | EXPORT_SYMBOL_GPL(bcom_fec_rx_init); | ||
109 | |||
110 | int | ||
111 | bcom_fec_rx_reset(struct bcom_task *tsk) | ||
112 | { | ||
113 | struct bcom_fec_priv *priv = tsk->priv; | ||
114 | struct bcom_fec_rx_var *var; | ||
115 | struct bcom_fec_rx_inc *inc; | ||
116 | |||
117 | /* Shutdown the task */ | ||
118 | bcom_disable_task(tsk->tasknum); | ||
119 | |||
120 | /* Reset the microcode */ | ||
121 | var = (struct bcom_fec_rx_var *) bcom_task_var(tsk->tasknum); | ||
122 | inc = (struct bcom_fec_rx_inc *) bcom_task_inc(tsk->tasknum); | ||
123 | |||
124 | if (bcom_load_image(tsk->tasknum, bcom_fec_rx_task)) | ||
125 | return -1; | ||
126 | |||
127 | var->enable = bcom_eng->regs_base + | ||
128 | offsetof(struct mpc52xx_sdma, tcr[tsk->tasknum]); | ||
129 | var->fifo = (u32) priv->fifo; | ||
130 | var->bd_base = tsk->bd_pa; | ||
131 | var->bd_last = tsk->bd_pa + ((tsk->num_bd-1) * tsk->bd_size); | ||
132 | var->bd_start = tsk->bd_pa; | ||
133 | var->buffer_size = priv->maxbufsize; | ||
134 | |||
135 | inc->incr_bytes = -(s16)sizeof(u32); /* These should be in the */ | ||
136 | inc->incr_dst = sizeof(u32); /* task image, but we stick */ | ||
137 | inc->incr_dst_ma= sizeof(u8); /* to the official ones */ | ||
138 | |||
139 | /* Reset the BDs */ | ||
140 | tsk->index = 0; | ||
141 | tsk->outdex = 0; | ||
142 | |||
143 | memset(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); | ||
144 | |||
145 | /* Configure some stuff */ | ||
146 | bcom_set_task_pragma(tsk->tasknum, BCOM_FEC_RX_BD_PRAGMA); | ||
147 | bcom_set_task_auto_start(tsk->tasknum, tsk->tasknum); | ||
148 | |||
149 | out_8(&bcom_eng->regs->ipr[BCOM_INITIATOR_FEC_RX], BCOM_IPR_FEC_RX); | ||
150 | |||
151 | out_be32(&bcom_eng->regs->IntPend, 1<<tsk->tasknum); /* Clear ints */ | ||
152 | |||
153 | return 0; | ||
154 | } | ||
155 | EXPORT_SYMBOL_GPL(bcom_fec_rx_reset); | ||
156 | |||
157 | void | ||
158 | bcom_fec_rx_release(struct bcom_task *tsk) | ||
159 | { | ||
160 | /* Nothing special for the FEC tasks */ | ||
161 | bcom_task_free(tsk); | ||
162 | } | ||
163 | EXPORT_SYMBOL_GPL(bcom_fec_rx_release); | ||
164 | |||
165 | |||
166 | |||
167 | /* Return 2nd to last DRD */ | ||
168 | /* This is an ugly hack, but at least it's only done | ||
169 | once at initialization */ | ||
170 | static u32 *self_modified_drd(int tasknum) | ||
171 | { | ||
172 | u32 *desc; | ||
173 | int num_descs; | ||
174 | int drd_count; | ||
175 | int i; | ||
176 | |||
177 | num_descs = bcom_task_num_descs(tasknum); | ||
178 | desc = bcom_task_desc(tasknum) + num_descs - 1; | ||
179 | drd_count = 0; | ||
180 | for (i=0; i<num_descs; i++, desc--) | ||
181 | if (bcom_desc_is_drd(*desc) && ++drd_count == 3) | ||
182 | break; | ||
183 | return desc; | ||
184 | } | ||
185 | |||
186 | struct bcom_task * | ||
187 | bcom_fec_tx_init(int queue_len, phys_addr_t fifo) | ||
188 | { | ||
189 | struct bcom_task *tsk; | ||
190 | struct bcom_fec_priv *priv; | ||
191 | |||
192 | tsk = bcom_task_alloc(queue_len, sizeof(struct bcom_fec_bd), | ||
193 | sizeof(struct bcom_fec_priv)); | ||
194 | if (!tsk) | ||
195 | return NULL; | ||
196 | |||
197 | tsk->flags = BCOM_FLAGS_ENABLE_TASK; | ||
198 | |||
199 | priv = tsk->priv; | ||
200 | priv->fifo = fifo; | ||
201 | |||
202 | if (bcom_fec_tx_reset(tsk)) { | ||
203 | bcom_task_free(tsk); | ||
204 | return NULL; | ||
205 | } | ||
206 | |||
207 | return tsk; | ||
208 | } | ||
209 | EXPORT_SYMBOL_GPL(bcom_fec_tx_init); | ||
210 | |||
211 | int | ||
212 | bcom_fec_tx_reset(struct bcom_task *tsk) | ||
213 | { | ||
214 | struct bcom_fec_priv *priv = tsk->priv; | ||
215 | struct bcom_fec_tx_var *var; | ||
216 | struct bcom_fec_tx_inc *inc; | ||
217 | |||
218 | /* Shutdown the task */ | ||
219 | bcom_disable_task(tsk->tasknum); | ||
220 | |||
221 | /* Reset the microcode */ | ||
222 | var = (struct bcom_fec_tx_var *) bcom_task_var(tsk->tasknum); | ||
223 | inc = (struct bcom_fec_tx_inc *) bcom_task_inc(tsk->tasknum); | ||
224 | |||
225 | if (bcom_load_image(tsk->tasknum, bcom_fec_tx_task)) | ||
226 | return -1; | ||
227 | |||
228 | var->enable = bcom_eng->regs_base + | ||
229 | offsetof(struct mpc52xx_sdma, tcr[tsk->tasknum]); | ||
230 | var->fifo = (u32) priv->fifo; | ||
231 | var->DRD = bcom_sram_va2pa(self_modified_drd(tsk->tasknum)); | ||
232 | var->bd_base = tsk->bd_pa; | ||
233 | var->bd_last = tsk->bd_pa + ((tsk->num_bd-1) * tsk->bd_size); | ||
234 | var->bd_start = tsk->bd_pa; | ||
235 | |||
236 | inc->incr_bytes = -(s16)sizeof(u32); /* These should be in the */ | ||
237 | inc->incr_src = sizeof(u32); /* task image, but we stick */ | ||
238 | inc->incr_src_ma= sizeof(u8); /* to the official ones */ | ||
239 | |||
240 | /* Reset the BDs */ | ||
241 | tsk->index = 0; | ||
242 | tsk->outdex = 0; | ||
243 | |||
244 | memset(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); | ||
245 | |||
246 | /* Configure some stuff */ | ||
247 | bcom_set_task_pragma(tsk->tasknum, BCOM_FEC_TX_BD_PRAGMA); | ||
248 | bcom_set_task_auto_start(tsk->tasknum, tsk->tasknum); | ||
249 | |||
250 | out_8(&bcom_eng->regs->ipr[BCOM_INITIATOR_FEC_TX], BCOM_IPR_FEC_TX); | ||
251 | |||
252 | out_be32(&bcom_eng->regs->IntPend, 1<<tsk->tasknum); /* Clear ints */ | ||
253 | |||
254 | return 0; | ||
255 | } | ||
256 | EXPORT_SYMBOL_GPL(bcom_fec_tx_reset); | ||
257 | |||
258 | void | ||
259 | bcom_fec_tx_release(struct bcom_task *tsk) | ||
260 | { | ||
261 | /* Nothing special for the FEC tasks */ | ||
262 | bcom_task_free(tsk); | ||
263 | } | ||
264 | EXPORT_SYMBOL_GPL(bcom_fec_tx_release); | ||
265 | |||
266 | |||
267 | MODULE_DESCRIPTION("BestComm FEC tasks driver"); | ||
268 | MODULE_AUTHOR("Dale Farnsworth <dfarnsworth@mvista.com>"); | ||
269 | MODULE_LICENSE("GPL v2"); | ||
270 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/fec.h b/arch/powerpc/sysdev/bestcomm/fec.h new file mode 100644 index 000000000000..ee565d94d503 --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/fec.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * Header for Bestcomm FEC tasks driver | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 2006-2007 Sylvain Munaut <tnt@246tNt.com> | ||
6 | * Copyright (C) 2003-2004 MontaVista, Software, Inc. | ||
7 | * ( by Dale Farnsworth <dfarnsworth@mvista.com> ) | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __BESTCOMM_FEC_H__ | ||
15 | #define __BESTCOMM_FEC_H__ | ||
16 | |||
17 | |||
18 | struct bcom_fec_bd { | ||
19 | u32 status; | ||
20 | u32 skb_pa; | ||
21 | }; | ||
22 | |||
23 | #define BCOM_FEC_TX_BD_TFD 0x08000000ul /* transmit frame done */ | ||
24 | #define BCOM_FEC_TX_BD_TC 0x04000000ul /* transmit CRC */ | ||
25 | #define BCOM_FEC_TX_BD_ABC 0x02000000ul /* append bad CRC */ | ||
26 | |||
27 | #define BCOM_FEC_RX_BD_L 0x08000000ul /* buffer is last in frame */ | ||
28 | #define BCOM_FEC_RX_BD_BC 0x00800000ul /* DA is broadcast */ | ||
29 | #define BCOM_FEC_RX_BD_MC 0x00400000ul /* DA is multicast and not broadcast */ | ||
30 | #define BCOM_FEC_RX_BD_LG 0x00200000ul /* Rx frame length violation */ | ||
31 | #define BCOM_FEC_RX_BD_NO 0x00100000ul /* Rx non-octet aligned frame */ | ||
32 | #define BCOM_FEC_RX_BD_CR 0x00040000ul /* Rx CRC error */ | ||
33 | #define BCOM_FEC_RX_BD_OV 0x00020000ul /* overrun */ | ||
34 | #define BCOM_FEC_RX_BD_TR 0x00010000ul /* Rx frame truncated */ | ||
35 | #define BCOM_FEC_RX_BD_LEN_MASK 0x000007fful /* mask for length of received frame */ | ||
36 | #define BCOM_FEC_RX_BD_ERRORS (BCOM_FEC_RX_BD_LG | BCOM_FEC_RX_BD_NO | \ | ||
37 | BCOM_FEC_RX_BD_CR | BCOM_FEC_RX_BD_OV | BCOM_FEC_RX_BD_TR) | ||
38 | |||
39 | |||
40 | extern struct bcom_task * | ||
41 | bcom_fec_rx_init(int queue_len, phys_addr_t fifo, int maxbufsize); | ||
42 | |||
43 | extern int | ||
44 | bcom_fec_rx_reset(struct bcom_task *tsk); | ||
45 | |||
46 | extern void | ||
47 | bcom_fec_rx_release(struct bcom_task *tsk); | ||
48 | |||
49 | |||
50 | extern struct bcom_task * | ||
51 | bcom_fec_tx_init(int queue_len, phys_addr_t fifo); | ||
52 | |||
53 | extern int | ||
54 | bcom_fec_tx_reset(struct bcom_task *tsk); | ||
55 | |||
56 | extern void | ||
57 | bcom_fec_tx_release(struct bcom_task *tsk); | ||
58 | |||
59 | |||
60 | #endif /* __BESTCOMM_FEC_H__ */ | ||
61 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/gen_bd.c b/arch/powerpc/sysdev/bestcomm/gen_bd.c new file mode 100644 index 000000000000..8d33eafbb3f4 --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/gen_bd.c | |||
@@ -0,0 +1,260 @@ | |||
1 | /* | ||
2 | * Driver for MPC52xx processor BestComm General Buffer Descriptor | ||
3 | * | ||
4 | * Copyright (C) 2007 Sylvain Munaut <tnt@246tNt.com> | ||
5 | * Copyright (C) 2006 AppSpec Computer Technologies Corp. | ||
6 | * Jeff Gibbons <jeff.gibbons@appspec.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License version 2 as published | ||
10 | * by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #include <linux/version.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/string.h> | ||
18 | #include <linux/types.h> | ||
19 | #include <asm/errno.h> | ||
20 | #include <asm/io.h> | ||
21 | |||
22 | #include <asm/mpc52xx.h> | ||
23 | |||
24 | #include "bestcomm.h" | ||
25 | #include "bestcomm_priv.h" | ||
26 | #include "gen_bd.h" | ||
27 | |||
28 | |||
29 | /* ======================================================================== */ | ||
30 | /* Task image/var/inc */ | ||
31 | /* ======================================================================== */ | ||
32 | |||
33 | /* gen_bd tasks images */ | ||
34 | extern u32 bcom_gen_bd_rx_task[]; | ||
35 | extern u32 bcom_gen_bd_tx_task[]; | ||
36 | |||
37 | /* rx task vars that need to be set before enabling the task */ | ||
38 | struct bcom_gen_bd_rx_var { | ||
39 | u32 enable; /* (u16*) address of task's control register */ | ||
40 | u32 fifo; /* (u32*) address of gen_bd's fifo */ | ||
41 | u32 bd_base; /* (struct bcom_bd*) beginning of ring buffer */ | ||
42 | u32 bd_last; /* (struct bcom_bd*) end of ring buffer */ | ||
43 | u32 bd_start; /* (struct bcom_bd*) current bd */ | ||
44 | u32 buffer_size; /* size of receive buffer */ | ||
45 | }; | ||
46 | |||
47 | /* rx task incs that need to be set before enabling the task */ | ||
48 | struct bcom_gen_bd_rx_inc { | ||
49 | u16 pad0; | ||
50 | s16 incr_bytes; | ||
51 | u16 pad1; | ||
52 | s16 incr_dst; | ||
53 | }; | ||
54 | |||
55 | /* tx task vars that need to be set before enabling the task */ | ||
56 | struct bcom_gen_bd_tx_var { | ||
57 | u32 fifo; /* (u32*) address of gen_bd's fifo */ | ||
58 | u32 enable; /* (u16*) address of task's control register */ | ||
59 | u32 bd_base; /* (struct bcom_bd*) beginning of ring buffer */ | ||
60 | u32 bd_last; /* (struct bcom_bd*) end of ring buffer */ | ||
61 | u32 bd_start; /* (struct bcom_bd*) current bd */ | ||
62 | u32 buffer_size; /* set by uCode for each packet */ | ||
63 | }; | ||
64 | |||
65 | /* tx task incs that need to be set before enabling the task */ | ||
66 | struct bcom_gen_bd_tx_inc { | ||
67 | u16 pad0; | ||
68 | s16 incr_bytes; | ||
69 | u16 pad1; | ||
70 | s16 incr_src; | ||
71 | u16 pad2; | ||
72 | s16 incr_src_ma; | ||
73 | }; | ||
74 | |||
75 | /* private structure */ | ||
76 | struct bcom_gen_bd_priv { | ||
77 | phys_addr_t fifo; | ||
78 | int initiator; | ||
79 | int ipr; | ||
80 | int maxbufsize; | ||
81 | }; | ||
82 | |||
83 | |||
84 | /* ======================================================================== */ | ||
85 | /* Task support code */ | ||
86 | /* ======================================================================== */ | ||
87 | |||
88 | struct bcom_task * | ||
89 | bcom_gen_bd_rx_init(int queue_len, phys_addr_t fifo, | ||
90 | int initiator, int ipr, int maxbufsize) | ||
91 | { | ||
92 | struct bcom_task *tsk; | ||
93 | struct bcom_gen_bd_priv *priv; | ||
94 | |||
95 | tsk = bcom_task_alloc(queue_len, sizeof(struct bcom_gen_bd), | ||
96 | sizeof(struct bcom_gen_bd_priv)); | ||
97 | if (!tsk) | ||
98 | return NULL; | ||
99 | |||
100 | tsk->flags = BCOM_FLAGS_NONE; | ||
101 | |||
102 | priv = tsk->priv; | ||
103 | priv->fifo = fifo; | ||
104 | priv->initiator = initiator; | ||
105 | priv->ipr = ipr; | ||
106 | priv->maxbufsize = maxbufsize; | ||
107 | |||
108 | if (bcom_gen_bd_rx_reset(tsk)) { | ||
109 | bcom_task_free(tsk); | ||
110 | return NULL; | ||
111 | } | ||
112 | |||
113 | return tsk; | ||
114 | } | ||
115 | EXPORT_SYMBOL_GPL(bcom_gen_bd_rx_init); | ||
116 | |||
117 | int | ||
118 | bcom_gen_bd_rx_reset(struct bcom_task *tsk) | ||
119 | { | ||
120 | struct bcom_gen_bd_priv *priv = tsk->priv; | ||
121 | struct bcom_gen_bd_rx_var *var; | ||
122 | struct bcom_gen_bd_rx_inc *inc; | ||
123 | |||
124 | /* Shutdown the task */ | ||
125 | bcom_disable_task(tsk->tasknum); | ||
126 | |||
127 | /* Reset the microcode */ | ||
128 | var = (struct bcom_gen_bd_rx_var *) bcom_task_var(tsk->tasknum); | ||
129 | inc = (struct bcom_gen_bd_rx_inc *) bcom_task_inc(tsk->tasknum); | ||
130 | |||
131 | if (bcom_load_image(tsk->tasknum, bcom_gen_bd_rx_task)) | ||
132 | return -1; | ||
133 | |||
134 | var->enable = bcom_eng->regs_base + | ||
135 | offsetof(struct mpc52xx_sdma, tcr[tsk->tasknum]); | ||
136 | var->fifo = (u32) priv->fifo; | ||
137 | var->bd_base = tsk->bd_pa; | ||
138 | var->bd_last = tsk->bd_pa + ((tsk->num_bd-1) * tsk->bd_size); | ||
139 | var->bd_start = tsk->bd_pa; | ||
140 | var->buffer_size = priv->maxbufsize; | ||
141 | |||
142 | inc->incr_bytes = -(s16)sizeof(u32); | ||
143 | inc->incr_dst = sizeof(u32); | ||
144 | |||
145 | /* Reset the BDs */ | ||
146 | tsk->index = 0; | ||
147 | tsk->outdex = 0; | ||
148 | |||
149 | memset(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); | ||
150 | |||
151 | /* Configure some stuff */ | ||
152 | bcom_set_task_pragma(tsk->tasknum, BCOM_GEN_RX_BD_PRAGMA); | ||
153 | bcom_set_task_auto_start(tsk->tasknum, tsk->tasknum); | ||
154 | |||
155 | out_8(&bcom_eng->regs->ipr[priv->initiator], priv->ipr); | ||
156 | bcom_set_initiator(tsk->tasknum, priv->initiator); | ||
157 | |||
158 | out_be32(&bcom_eng->regs->IntPend, 1<<tsk->tasknum); /* Clear ints */ | ||
159 | |||
160 | return 0; | ||
161 | } | ||
162 | EXPORT_SYMBOL_GPL(bcom_gen_bd_rx_reset); | ||
163 | |||
164 | void | ||
165 | bcom_gen_bd_rx_release(struct bcom_task *tsk) | ||
166 | { | ||
167 | /* Nothing special for the GenBD tasks */ | ||
168 | bcom_task_free(tsk); | ||
169 | } | ||
170 | EXPORT_SYMBOL_GPL(bcom_gen_bd_rx_release); | ||
171 | |||
172 | |||
173 | extern struct bcom_task * | ||
174 | bcom_gen_bd_tx_init(int queue_len, phys_addr_t fifo, | ||
175 | int initiator, int ipr) | ||
176 | { | ||
177 | struct bcom_task *tsk; | ||
178 | struct bcom_gen_bd_priv *priv; | ||
179 | |||
180 | tsk = bcom_task_alloc(queue_len, sizeof(struct bcom_gen_bd), | ||
181 | sizeof(struct bcom_gen_bd_priv)); | ||
182 | if (!tsk) | ||
183 | return NULL; | ||
184 | |||
185 | tsk->flags = BCOM_FLAGS_NONE; | ||
186 | |||
187 | priv = tsk->priv; | ||
188 | priv->fifo = fifo; | ||
189 | priv->initiator = initiator; | ||
190 | priv->ipr = ipr; | ||
191 | |||
192 | if (bcom_gen_bd_tx_reset(tsk)) { | ||
193 | bcom_task_free(tsk); | ||
194 | return NULL; | ||
195 | } | ||
196 | |||
197 | return tsk; | ||
198 | } | ||
199 | EXPORT_SYMBOL_GPL(bcom_gen_bd_tx_init); | ||
200 | |||
201 | int | ||
202 | bcom_gen_bd_tx_reset(struct bcom_task *tsk) | ||
203 | { | ||
204 | struct bcom_gen_bd_priv *priv = tsk->priv; | ||
205 | struct bcom_gen_bd_tx_var *var; | ||
206 | struct bcom_gen_bd_tx_inc *inc; | ||
207 | |||
208 | /* Shutdown the task */ | ||
209 | bcom_disable_task(tsk->tasknum); | ||
210 | |||
211 | /* Reset the microcode */ | ||
212 | var = (struct bcom_gen_bd_tx_var *) bcom_task_var(tsk->tasknum); | ||
213 | inc = (struct bcom_gen_bd_tx_inc *) bcom_task_inc(tsk->tasknum); | ||
214 | |||
215 | if (bcom_load_image(tsk->tasknum, bcom_gen_bd_tx_task)) | ||
216 | return -1; | ||
217 | |||
218 | var->enable = bcom_eng->regs_base + | ||
219 | offsetof(struct mpc52xx_sdma, tcr[tsk->tasknum]); | ||
220 | var->fifo = (u32) priv->fifo; | ||
221 | var->bd_base = tsk->bd_pa; | ||
222 | var->bd_last = tsk->bd_pa + ((tsk->num_bd-1) * tsk->bd_size); | ||
223 | var->bd_start = tsk->bd_pa; | ||
224 | |||
225 | inc->incr_bytes = -(s16)sizeof(u32); | ||
226 | inc->incr_src = sizeof(u32); | ||
227 | inc->incr_src_ma = sizeof(u8); | ||
228 | |||
229 | /* Reset the BDs */ | ||
230 | tsk->index = 0; | ||
231 | tsk->outdex = 0; | ||
232 | |||
233 | memset(tsk->bd, 0x00, tsk->num_bd * tsk->bd_size); | ||
234 | |||
235 | /* Configure some stuff */ | ||
236 | bcom_set_task_pragma(tsk->tasknum, BCOM_GEN_TX_BD_PRAGMA); | ||
237 | bcom_set_task_auto_start(tsk->tasknum, tsk->tasknum); | ||
238 | |||
239 | out_8(&bcom_eng->regs->ipr[priv->initiator], priv->ipr); | ||
240 | bcom_set_initiator(tsk->tasknum, priv->initiator); | ||
241 | |||
242 | out_be32(&bcom_eng->regs->IntPend, 1<<tsk->tasknum); /* Clear ints */ | ||
243 | |||
244 | return 0; | ||
245 | } | ||
246 | EXPORT_SYMBOL_GPL(bcom_gen_bd_tx_reset); | ||
247 | |||
248 | void | ||
249 | bcom_gen_bd_tx_release(struct bcom_task *tsk) | ||
250 | { | ||
251 | /* Nothing special for the GenBD tasks */ | ||
252 | bcom_task_free(tsk); | ||
253 | } | ||
254 | EXPORT_SYMBOL_GPL(bcom_gen_bd_tx_release); | ||
255 | |||
256 | |||
257 | MODULE_DESCRIPTION("BestComm General Buffer Descriptor tasks driver"); | ||
258 | MODULE_AUTHOR("Jeff Gibbons <jeff.gibbons@appspec.com>"); | ||
259 | MODULE_LICENSE("GPL v2"); | ||
260 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/gen_bd.h b/arch/powerpc/sysdev/bestcomm/gen_bd.h new file mode 100644 index 000000000000..5b6fa803c6aa --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/gen_bd.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * Header for Bestcomm General Buffer Descriptor tasks driver | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 2007 Sylvain Munaut <tnt@246tNt.com> | ||
6 | * Copyright (C) 2006 AppSpec Computer Technologies Corp. | ||
7 | * Jeff Gibbons <jeff.gibbons@appspec.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License version 2 as published | ||
11 | * by the Free Software Foundation. | ||
12 | * | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __BESTCOMM_GEN_BD_H__ | ||
17 | #define __BESTCOMM_GEN_BD_H__ | ||
18 | |||
19 | struct bcom_gen_bd { | ||
20 | u32 status; | ||
21 | u32 buf_pa; | ||
22 | }; | ||
23 | |||
24 | |||
25 | extern struct bcom_task * | ||
26 | bcom_gen_bd_rx_init(int queue_len, phys_addr_t fifo, | ||
27 | int initiator, int ipr, int maxbufsize); | ||
28 | |||
29 | extern int | ||
30 | bcom_gen_bd_rx_reset(struct bcom_task *tsk); | ||
31 | |||
32 | extern void | ||
33 | bcom_gen_bd_rx_release(struct bcom_task *tsk); | ||
34 | |||
35 | |||
36 | extern struct bcom_task * | ||
37 | bcom_gen_bd_tx_init(int queue_len, phys_addr_t fifo, | ||
38 | int initiator, int ipr); | ||
39 | |||
40 | extern int | ||
41 | bcom_gen_bd_tx_reset(struct bcom_task *tsk); | ||
42 | |||
43 | extern void | ||
44 | bcom_gen_bd_tx_release(struct bcom_task *tsk); | ||
45 | |||
46 | |||
47 | #endif /* __BESTCOMM_GEN_BD_H__ */ | ||
48 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/sram.c b/arch/powerpc/sysdev/bestcomm/sram.c new file mode 100644 index 000000000000..99784383a843 --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/sram.c | |||
@@ -0,0 +1,177 @@ | |||
1 | /* | ||
2 | * Simple memory allocator for on-board SRAM | ||
3 | * | ||
4 | * | ||
5 | * Maintainer : Sylvain Munaut <tnt@246tNt.com> | ||
6 | * | ||
7 | * Copyright (C) 2005 Sylvain Munaut <tnt@246tNt.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public License | ||
10 | * version 2. This program is licensed "as is" without any warranty of any | ||
11 | * kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/slab.h> | ||
17 | #include <linux/spinlock.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/ioport.h> | ||
20 | #include <linux/of.h> | ||
21 | |||
22 | #include <asm/io.h> | ||
23 | #include <asm/mmu.h> | ||
24 | |||
25 | #include "sram.h" | ||
26 | |||
27 | |||
28 | /* Struct keeping our 'state' */ | ||
29 | struct bcom_sram *bcom_sram = NULL; | ||
30 | EXPORT_SYMBOL_GPL(bcom_sram); /* needed for inline functions */ | ||
31 | |||
32 | |||
33 | /* ======================================================================== */ | ||
34 | /* Public API */ | ||
35 | /* ======================================================================== */ | ||
36 | /* DO NOT USE in interrupts, if needed in irq handler, we should use the | ||
37 | _irqsave version of the spin_locks */ | ||
38 | |||
39 | int bcom_sram_init(struct device_node *sram_node, char *owner) | ||
40 | { | ||
41 | int rv; | ||
42 | const u32 *regaddr_p; | ||
43 | u64 regaddr64, size64; | ||
44 | unsigned int psize; | ||
45 | |||
46 | /* Create our state struct */ | ||
47 | if (bcom_sram) { | ||
48 | printk(KERN_ERR "%s: bcom_sram_init: " | ||
49 | "Already initialized !\n", owner); | ||
50 | return -EBUSY; | ||
51 | } | ||
52 | |||
53 | bcom_sram = kmalloc(sizeof(struct bcom_sram), GFP_KERNEL); | ||
54 | if (!bcom_sram) { | ||
55 | printk(KERN_ERR "%s: bcom_sram_init: " | ||
56 | "Couldn't allocate internal state !\n", owner); | ||
57 | return -ENOMEM; | ||
58 | } | ||
59 | |||
60 | /* Get address and size of the sram */ | ||
61 | regaddr_p = of_get_address(sram_node, 0, &size64, NULL); | ||
62 | if (!regaddr_p) { | ||
63 | printk(KERN_ERR "%s: bcom_sram_init: " | ||
64 | "Invalid device node !\n", owner); | ||
65 | rv = -EINVAL; | ||
66 | goto error_free; | ||
67 | } | ||
68 | |||
69 | regaddr64 = of_translate_address(sram_node, regaddr_p); | ||
70 | |||
71 | bcom_sram->base_phys = (phys_addr_t) regaddr64; | ||
72 | bcom_sram->size = (unsigned int) size64; | ||
73 | |||
74 | /* Request region */ | ||
75 | if (!request_mem_region(bcom_sram->base_phys, bcom_sram->size, owner)) { | ||
76 | printk(KERN_ERR "%s: bcom_sram_init: " | ||
77 | "Couldn't request region !\n", owner); | ||
78 | rv = -EBUSY; | ||
79 | goto error_free; | ||
80 | } | ||
81 | |||
82 | /* Map SRAM */ | ||
83 | /* sram is not really __iomem */ | ||
84 | bcom_sram->base_virt = (void*) ioremap(bcom_sram->base_phys, bcom_sram->size); | ||
85 | |||
86 | if (!bcom_sram->base_virt) { | ||
87 | printk(KERN_ERR "%s: bcom_sram_init: " | ||
88 | "Map error SRAM zone 0x%08lx (0x%0x)!\n", | ||
89 | owner, bcom_sram->base_phys, bcom_sram->size ); | ||
90 | rv = -ENOMEM; | ||
91 | goto error_release; | ||
92 | } | ||
93 | |||
94 | /* Create an rheap (defaults to 32 bits word alignment) */ | ||
95 | bcom_sram->rh = rh_create(4); | ||
96 | |||
97 | /* Attach the free zones */ | ||
98 | #if 0 | ||
99 | /* Currently disabled ... for future use only */ | ||
100 | reg_addr_p = of_get_property(sram_node, "available", &psize); | ||
101 | #else | ||
102 | regaddr_p = NULL; | ||
103 | psize = 0; | ||
104 | #endif | ||
105 | |||
106 | if (!regaddr_p || !psize) { | ||
107 | /* Attach the whole zone */ | ||
108 | rh_attach_region(bcom_sram->rh, 0, bcom_sram->size); | ||
109 | } else { | ||
110 | /* Attach each zone independently */ | ||
111 | while (psize >= 2 * sizeof(u32)) { | ||
112 | phys_addr_t zbase = of_translate_address(sram_node, regaddr_p); | ||
113 | rh_attach_region(bcom_sram->rh, zbase - bcom_sram->base_phys, regaddr_p[1]); | ||
114 | regaddr_p += 2; | ||
115 | psize -= 2 * sizeof(u32); | ||
116 | } | ||
117 | } | ||
118 | |||
119 | /* Init our spinlock */ | ||
120 | spin_lock_init(&bcom_sram->lock); | ||
121 | |||
122 | return 0; | ||
123 | |||
124 | error_release: | ||
125 | release_mem_region(bcom_sram->base_phys, bcom_sram->size); | ||
126 | error_free: | ||
127 | kfree(bcom_sram); | ||
128 | bcom_sram = NULL; | ||
129 | |||
130 | return rv; | ||
131 | } | ||
132 | EXPORT_SYMBOL_GPL(bcom_sram_init); | ||
133 | |||
134 | void bcom_sram_cleanup(void) | ||
135 | { | ||
136 | /* Free resources */ | ||
137 | if (bcom_sram) { | ||
138 | rh_destroy(bcom_sram->rh); | ||
139 | iounmap((void __iomem *)bcom_sram->base_virt); | ||
140 | release_mem_region(bcom_sram->base_phys, bcom_sram->size); | ||
141 | kfree(bcom_sram); | ||
142 | bcom_sram = NULL; | ||
143 | } | ||
144 | } | ||
145 | EXPORT_SYMBOL_GPL(bcom_sram_cleanup); | ||
146 | |||
147 | void* bcom_sram_alloc(int size, int align, phys_addr_t *phys) | ||
148 | { | ||
149 | unsigned long offset; | ||
150 | |||
151 | spin_lock(&bcom_sram->lock); | ||
152 | offset = rh_alloc_align(bcom_sram->rh, size, align, NULL); | ||
153 | spin_unlock(&bcom_sram->lock); | ||
154 | |||
155 | if (IS_ERR_VALUE(offset)) | ||
156 | return NULL; | ||
157 | |||
158 | *phys = bcom_sram->base_phys + offset; | ||
159 | return bcom_sram->base_virt + offset; | ||
160 | } | ||
161 | EXPORT_SYMBOL_GPL(bcom_sram_alloc); | ||
162 | |||
163 | void bcom_sram_free(void *ptr) | ||
164 | { | ||
165 | unsigned long offset; | ||
166 | |||
167 | if (!ptr) | ||
168 | return; | ||
169 | |||
170 | offset = ptr - bcom_sram->base_virt; | ||
171 | |||
172 | spin_lock(&bcom_sram->lock); | ||
173 | rh_free(bcom_sram->rh, offset); | ||
174 | spin_unlock(&bcom_sram->lock); | ||
175 | } | ||
176 | EXPORT_SYMBOL_GPL(bcom_sram_free); | ||
177 | |||
diff --git a/arch/powerpc/sysdev/bestcomm/sram.h b/arch/powerpc/sysdev/bestcomm/sram.h new file mode 100644 index 000000000000..b6d668963cce --- /dev/null +++ b/arch/powerpc/sysdev/bestcomm/sram.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * Handling of a sram zone for bestcomm | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 2007 Sylvain Munaut <tnt@246tNt.com> | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public License | ||
8 | * version 2. This program is licensed "as is" without any warranty of any | ||
9 | * kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef __BESTCOMM_SRAM_H__ | ||
13 | #define __BESTCOMM_SRAM_H__ | ||
14 | |||
15 | #include <asm/rheap.h> | ||
16 | #include <asm/mmu.h> | ||
17 | #include <linux/spinlock.h> | ||
18 | |||
19 | |||
20 | /* Structure used internally */ | ||
21 | /* The internals are here for the inline functions | ||
22 | * sake, certainly not for the user to mess with ! | ||
23 | */ | ||
24 | struct bcom_sram { | ||
25 | phys_addr_t base_phys; | ||
26 | void *base_virt; | ||
27 | unsigned int size; | ||
28 | rh_info_t *rh; | ||
29 | spinlock_t lock; | ||
30 | }; | ||
31 | |||
32 | extern struct bcom_sram *bcom_sram; | ||
33 | |||
34 | |||
35 | /* Public API */ | ||
36 | extern int bcom_sram_init(struct device_node *sram_node, char *owner); | ||
37 | extern void bcom_sram_cleanup(void); | ||
38 | |||
39 | extern void* bcom_sram_alloc(int size, int align, phys_addr_t *phys); | ||
40 | extern void bcom_sram_free(void *ptr); | ||
41 | |||
42 | static inline phys_addr_t bcom_sram_va2pa(void *va) { | ||
43 | return bcom_sram->base_phys + | ||
44 | (unsigned long)(va - bcom_sram->base_virt); | ||
45 | } | ||
46 | |||
47 | static inline void *bcom_sram_pa2va(phys_addr_t pa) { | ||
48 | return bcom_sram->base_virt + | ||
49 | (unsigned long)(pa - bcom_sram->base_phys); | ||
50 | } | ||
51 | |||
52 | |||
53 | #endif /* __BESTCOMM_SRAM_H__ */ | ||
54 | |||
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index af090c93be10..33df4c347ca7 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
@@ -255,7 +255,7 @@ DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8533E, quirk_fsl_pcie_transpare | |||
255 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8533, quirk_fsl_pcie_transparent); | 255 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8533, quirk_fsl_pcie_transparent); |
256 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544E, quirk_fsl_pcie_transparent); | 256 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544E, quirk_fsl_pcie_transparent); |
257 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544, quirk_fsl_pcie_transparent); | 257 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8544, quirk_fsl_pcie_transparent); |
258 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572E, quirk_fsl_pcie_transparent) | 258 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572E, quirk_fsl_pcie_transparent); |
259 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572, quirk_fsl_pcie_transparent); | 259 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8572, quirk_fsl_pcie_transparent); |
260 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_transparent); | 260 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_transparent); |
261 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_transparent); | 261 | DECLARE_PCI_FIXUP_EARLY(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_transparent); |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 20dce4681259..607925c8a99e 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -102,6 +102,7 @@ config 44x | |||
102 | 102 | ||
103 | config 8xx | 103 | config 8xx |
104 | bool "8xx" | 104 | bool "8xx" |
105 | select PPC_LIB_RHEAP | ||
105 | 106 | ||
106 | config E200 | 107 | config E200 |
107 | bool "e200" | 108 | bool "e200" |
@@ -798,6 +799,7 @@ config CPM1 | |||
798 | config CPM2 | 799 | config CPM2 |
799 | bool | 800 | bool |
800 | depends on 8260 || MPC8560 || MPC8555 | 801 | depends on 8260 || MPC8560 || MPC8555 |
802 | select PPC_LIB_RHEAP | ||
801 | default y | 803 | default y |
802 | help | 804 | help |
803 | The CPM2 (Communications Processor Module) is a coprocessor on | 805 | The CPM2 (Communications Processor Module) is a coprocessor on |
@@ -1277,6 +1279,10 @@ config BOOT_LOAD | |||
1277 | config PIN_TLB | 1279 | config PIN_TLB |
1278 | bool "Pinned Kernel TLBs (860 ONLY)" | 1280 | bool "Pinned Kernel TLBs (860 ONLY)" |
1279 | depends on ADVANCED_OPTIONS && 8xx | 1281 | depends on ADVANCED_OPTIONS && 8xx |
1282 | |||
1283 | config PPC_LIB_RHEAP | ||
1284 | bool | ||
1285 | |||
1280 | endmenu | 1286 | endmenu |
1281 | 1287 | ||
1282 | source "net/Kconfig" | 1288 | source "net/Kconfig" |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 5236fdb17fcb..50b85d07ddd2 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -58,9 +58,9 @@ | |||
58 | #include <linux/vfs.h> | 58 | #include <linux/vfs.h> |
59 | #include <linux/ptrace.h> | 59 | #include <linux/ptrace.h> |
60 | #include <linux/fadvise.h> | 60 | #include <linux/fadvise.h> |
61 | #include <linux/ipc.h> | ||
61 | 62 | ||
62 | #include <asm/types.h> | 63 | #include <asm/types.h> |
63 | #include <asm/ipc.h> | ||
64 | #include <asm/uaccess.h> | 64 | #include <asm/uaccess.h> |
65 | #include <asm/semaphore.h> | 65 | #include <asm/semaphore.h> |
66 | 66 | ||
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c index 1eaff84a1eb6..fefee99f28aa 100644 --- a/arch/s390/kernel/sys_s390.c +++ b/arch/s390/kernel/sys_s390.c | |||
@@ -28,9 +28,9 @@ | |||
28 | #include <linux/utsname.h> | 28 | #include <linux/utsname.h> |
29 | #include <linux/personality.h> | 29 | #include <linux/personality.h> |
30 | #include <linux/unistd.h> | 30 | #include <linux/unistd.h> |
31 | #include <linux/ipc.h> | ||
31 | 32 | ||
32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
33 | #include <asm/ipc.h> | ||
34 | 34 | ||
35 | /* | 35 | /* |
36 | * sys_pipe() is the normal C calling standard for creating | 36 | * sys_pipe() is the normal C calling standard for creating |
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index fabc50adc46a..d4ed93dfb9c7 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/ctype.h> | 17 | #include <linux/ctype.h> |
18 | #include <linux/swap.h> | 18 | #include <linux/swap.h> |
19 | #include <linux/kthread.h> | 19 | #include <linux/kthread.h> |
20 | #include <linux/oom.h> | ||
20 | 21 | ||
21 | #include <asm/pgalloc.h> | 22 | #include <asm/pgalloc.h> |
22 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
diff --git a/arch/sh/drivers/pci/dma-dreamcast.c b/arch/sh/drivers/pci/dma-dreamcast.c index 230d6ec0d239..888a34050599 100644 --- a/arch/sh/drivers/pci/dma-dreamcast.c +++ b/arch/sh/drivers/pci/dma-dreamcast.c | |||
@@ -51,7 +51,7 @@ void *dreamcast_consistent_alloc(struct device *dev, size_t size, | |||
51 | buf = P2SEGADDR(buf); | 51 | buf = P2SEGADDR(buf); |
52 | 52 | ||
53 | /* Flush the dcache before we hand off the buffer */ | 53 | /* Flush the dcache before we hand off the buffer */ |
54 | dma_cache_wback_inv((void *)buf, size); | 54 | __flush_purge_region((void *)buf, size); |
55 | 55 | ||
56 | return (void *)buf; | 56 | return (void *)buf; |
57 | } | 57 | } |
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c index 024ce5dedd8c..d545a686a201 100644 --- a/arch/sh/kernel/sys_sh.c +++ b/arch/sh/kernel/sys_sh.c | |||
@@ -22,9 +22,9 @@ | |||
22 | #include <linux/utsname.h> | 22 | #include <linux/utsname.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
25 | #include <linux/ipc.h> | ||
25 | #include <asm/cacheflush.h> | 26 | #include <asm/cacheflush.h> |
26 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
27 | #include <asm/ipc.h> | ||
28 | #include <asm/unistd.h> | 28 | #include <asm/unistd.h> |
29 | 29 | ||
30 | /* | 30 | /* |
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c index 38c82d890ffd..e220c29a3c00 100644 --- a/arch/sh/mm/consistent.c +++ b/arch/sh/mm/consistent.c | |||
@@ -34,7 +34,7 @@ void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *handle) | |||
34 | /* | 34 | /* |
35 | * We must flush the cache before we pass it on to the device | 35 | * We must flush the cache before we pass it on to the device |
36 | */ | 36 | */ |
37 | dma_cache_wback_inv(ret, size); | 37 | __flush_purge_region(ret, size); |
38 | 38 | ||
39 | page = virt_to_page(ret); | 39 | page = virt_to_page(ret); |
40 | free = page + (size >> PAGE_SHIFT); | 40 | free = page + (size >> PAGE_SHIFT); |
@@ -68,13 +68,13 @@ void consistent_sync(void *vaddr, size_t size, int direction) | |||
68 | 68 | ||
69 | switch (direction) { | 69 | switch (direction) { |
70 | case DMA_FROM_DEVICE: /* invalidate only */ | 70 | case DMA_FROM_DEVICE: /* invalidate only */ |
71 | dma_cache_inv(p1addr, size); | 71 | __flush_invalidate_region(p1addr, size); |
72 | break; | 72 | break; |
73 | case DMA_TO_DEVICE: /* writeback only */ | 73 | case DMA_TO_DEVICE: /* writeback only */ |
74 | dma_cache_wback(p1addr, size); | 74 | __flush_wback_region(p1addr, size); |
75 | break; | 75 | break; |
76 | case DMA_BIDIRECTIONAL: /* writeback and invalidate */ | 76 | case DMA_BIDIRECTIONAL: /* writeback and invalidate */ |
77 | dma_cache_wback_inv(p1addr, size); | 77 | __flush_purge_region(p1addr, size); |
78 | break; | 78 | break; |
79 | default: | 79 | default: |
80 | BUG(); | 80 | BUG(); |
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index 7d43758dc244..1d45b82f0a63 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c | |||
@@ -292,8 +292,7 @@ void pmb_unmap(unsigned long addr) | |||
292 | } while (pmbe); | 292 | } while (pmbe); |
293 | } | 293 | } |
294 | 294 | ||
295 | static void pmb_cache_ctor(void *pmb, struct kmem_cache *cachep, | 295 | static void pmb_cache_ctor(struct kmem_cache *cachep, void *pmb) |
296 | unsigned long flags) | ||
297 | { | 296 | { |
298 | struct pmb_entry *pmbe = pmb; | 297 | struct pmb_entry *pmbe = pmb; |
299 | 298 | ||
diff --git a/arch/sh64/kernel/sys_sh64.c b/arch/sh64/kernel/sys_sh64.c index b7f18e298a20..de0a303ba26f 100644 --- a/arch/sh64/kernel/sys_sh64.c +++ b/arch/sh64/kernel/sys_sh64.c | |||
@@ -29,8 +29,8 @@ | |||
29 | #include <linux/file.h> | 29 | #include <linux/file.h> |
30 | #include <linux/utsname.h> | 30 | #include <linux/utsname.h> |
31 | #include <linux/syscalls.h> | 31 | #include <linux/syscalls.h> |
32 | #include <linux/ipc.h> | ||
32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
33 | #include <asm/ipc.h> | ||
34 | #include <asm/ptrace.h> | 34 | #include <asm/ptrace.h> |
35 | #include <asm/unistd.h> | 35 | #include <asm/unistd.h> |
36 | 36 | ||
diff --git a/arch/sh64/mm/consistent.c b/arch/sh64/mm/consistent.c index 8875a2a40da7..c439620402cb 100644 --- a/arch/sh64/mm/consistent.c +++ b/arch/sh64/mm/consistent.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
14 | #include <linux/dma-mapping.h> | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <asm/io.h> | 16 | #include <asm/io.h> |
16 | 17 | ||
@@ -32,7 +33,7 @@ void *consistent_alloc(struct pci_dev *hwdev, size_t size, | |||
32 | if (vp != NULL) { | 33 | if (vp != NULL) { |
33 | memset(vp, 0, size); | 34 | memset(vp, 0, size); |
34 | *dma_handle = virt_to_phys(ret); | 35 | *dma_handle = virt_to_phys(ret); |
35 | dma_cache_wback_inv((unsigned long)ret, size); | 36 | dma_cache_sync(NULL, ret, size, DMA_BIDIRECTIONAL); |
36 | } | 37 | } |
37 | 38 | ||
38 | return vp; | 39 | return vp; |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 9d327ec59759..c0f4ba109daa 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -321,7 +321,6 @@ endmenu | |||
321 | source "fs/Kconfig" | 321 | source "fs/Kconfig" |
322 | 322 | ||
323 | menu "Instrumentation Support" | 323 | menu "Instrumentation Support" |
324 | depends on EXPERIMENTAL | ||
325 | 324 | ||
326 | source "arch/sparc/oprofile/Kconfig" | 325 | source "arch/sparc/oprofile/Kconfig" |
327 | 326 | ||
diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c index a954a0c00000..6c0221e9a9f5 100644 --- a/arch/sparc/kernel/sys_sparc.c +++ b/arch/sparc/kernel/sys_sparc.c | |||
@@ -21,9 +21,9 @@ | |||
21 | #include <linux/utsname.h> | 21 | #include <linux/utsname.h> |
22 | #include <linux/smp.h> | 22 | #include <linux/smp.h> |
23 | #include <linux/smp_lock.h> | 23 | #include <linux/smp_lock.h> |
24 | #include <linux/ipc.h> | ||
24 | 25 | ||
25 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
26 | #include <asm/ipc.h> | ||
27 | #include <asm/unistd.h> | 27 | #include <asm/unistd.h> |
28 | 28 | ||
29 | /* #define DEBUG_UNIMP_SYSCALL */ | 29 | /* #define DEBUG_UNIMP_SYSCALL */ |
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 2f22fa90461a..59c4d752d286 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -461,7 +461,6 @@ source "drivers/fc4/Kconfig" | |||
461 | source "fs/Kconfig" | 461 | source "fs/Kconfig" |
462 | 462 | ||
463 | menu "Instrumentation Support" | 463 | menu "Instrumentation Support" |
464 | depends on EXPERIMENTAL | ||
465 | 464 | ||
466 | source "arch/sparc64/oprofile/Kconfig" | 465 | source "arch/sparc64/oprofile/Kconfig" |
467 | 466 | ||
diff --git a/arch/sparc64/kernel/binfmt_aout32.c b/arch/sparc64/kernel/binfmt_aout32.c index d208cc7804f2..92c1b36a2e16 100644 --- a/arch/sparc64/kernel/binfmt_aout32.c +++ b/arch/sparc64/kernel/binfmt_aout32.c | |||
@@ -35,11 +35,14 @@ | |||
35 | 35 | ||
36 | static int load_aout32_binary(struct linux_binprm *, struct pt_regs * regs); | 36 | static int load_aout32_binary(struct linux_binprm *, struct pt_regs * regs); |
37 | static int load_aout32_library(struct file*); | 37 | static int load_aout32_library(struct file*); |
38 | static int aout32_core_dump(long signr, struct pt_regs * regs, struct file *file); | 38 | static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit); |
39 | 39 | ||
40 | static struct linux_binfmt aout32_format = { | 40 | static struct linux_binfmt aout32_format = { |
41 | NULL, THIS_MODULE, load_aout32_binary, load_aout32_library, aout32_core_dump, | 41 | .module = THIS_MODULE, |
42 | PAGE_SIZE | 42 | .load_binary = load_aout32_binary, |
43 | .load_shlib = load_aout32_library, | ||
44 | .core_dump = aout32_core_dump, | ||
45 | .min_coredump = PAGE_SIZE, | ||
43 | }; | 46 | }; |
44 | 47 | ||
45 | static void set_brk(unsigned long start, unsigned long end) | 48 | static void set_brk(unsigned long start, unsigned long end) |
@@ -83,7 +86,7 @@ if (file->f_op->llseek) { \ | |||
83 | * dumping of the process results in another error.. | 86 | * dumping of the process results in another error.. |
84 | */ | 87 | */ |
85 | 88 | ||
86 | static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file) | 89 | static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit) |
87 | { | 90 | { |
88 | mm_segment_t fs; | 91 | mm_segment_t fs; |
89 | int has_dumped = 0; | 92 | int has_dumped = 0; |
@@ -102,13 +105,11 @@ static int aout32_core_dump(long signr, struct pt_regs *regs, struct file *file) | |||
102 | 105 | ||
103 | /* If the size of the dump file exceeds the rlimit, then see what would happen | 106 | /* If the size of the dump file exceeds the rlimit, then see what would happen |
104 | if we wrote the stack, but not the data area. */ | 107 | if we wrote the stack, but not the data area. */ |
105 | if ((dump.u_dsize+dump.u_ssize) > | 108 | if (dump.u_dsize + dump.u_ssize > limit) |
106 | current->signal->rlim[RLIMIT_CORE].rlim_cur) | ||
107 | dump.u_dsize = 0; | 109 | dump.u_dsize = 0; |
108 | 110 | ||
109 | /* Make sure we have enough room to write the stack and data areas. */ | 111 | /* Make sure we have enough room to write the stack and data areas. */ |
110 | if ((dump.u_ssize) > | 112 | if (dump.u_ssize > limit) |
111 | current->signal->rlim[RLIMIT_CORE].rlim_cur) | ||
112 | dump.u_ssize = 0; | 113 | dump.u_ssize = 0; |
113 | 114 | ||
114 | /* make sure we actually have a data and stack area to dump */ | 115 | /* make sure we actually have a data and stack area to dump */ |
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c index 0d5c50264945..560cb1edb1d0 100644 --- a/arch/sparc64/kernel/sys_sparc.c +++ b/arch/sparc64/kernel/sys_sparc.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/random.h> | 26 | #include <linux/random.h> |
27 | 27 | ||
28 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
29 | #include <asm/ipc.h> | ||
30 | #include <asm/utrap.h> | 29 | #include <asm/utrap.h> |
31 | #include <asm/perfctr.h> | 30 | #include <asm/perfctr.h> |
32 | #include <asm/a.out.h> | 31 | #include <asm/a.out.h> |
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c index e8dce90d05d4..78caff926737 100644 --- a/arch/sparc64/kernel/sys_sparc32.c +++ b/arch/sparc64/kernel/sys_sparc32.c | |||
@@ -54,7 +54,6 @@ | |||
54 | #include <linux/highuid.h> | 54 | #include <linux/highuid.h> |
55 | 55 | ||
56 | #include <asm/types.h> | 56 | #include <asm/types.h> |
57 | #include <asm/ipc.h> | ||
58 | #include <asm/uaccess.h> | 57 | #include <asm/uaccess.h> |
59 | #include <asm/fpumacro.h> | 58 | #include <asm/fpumacro.h> |
60 | #include <asm/semaphore.h> | 59 | #include <asm/semaphore.h> |
diff --git a/arch/sparc64/solaris/ipc.c b/arch/sparc64/solaris/ipc.c index a531a2cdb381..499135fa7060 100644 --- a/arch/sparc64/solaris/ipc.c +++ b/arch/sparc64/solaris/ipc.c | |||
@@ -11,10 +11,10 @@ | |||
11 | #include <linux/shm.h> | 11 | #include <linux/shm.h> |
12 | #include <linux/sem.h> | 12 | #include <linux/sem.h> |
13 | #include <linux/msg.h> | 13 | #include <linux/msg.h> |
14 | #include <linux/ipc.h> | ||
14 | 15 | ||
15 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
16 | #include <asm/string.h> | 17 | #include <asm/string.h> |
17 | #include <asm/ipc.h> | ||
18 | 18 | ||
19 | #include "conv.h" | 19 | #include "conv.h" |
20 | 20 | ||
diff --git a/arch/um/sys-i386/syscalls.c b/arch/um/sys-i386/syscalls.c index 710d5fb807e1..e2d142684412 100644 --- a/arch/um/sys-i386/syscalls.c +++ b/arch/um/sys-i386/syscalls.c | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | #include "linux/sched.h" | 6 | #include "linux/sched.h" |
7 | #include "linux/shm.h" | 7 | #include "linux/shm.h" |
8 | #include "asm/ipc.h" | 8 | #include "linux/ipc.h" |
9 | #include "asm/mman.h" | 9 | #include "asm/mman.h" |
10 | #include "asm/uaccess.h" | 10 | #include "asm/uaccess.h" |
11 | #include "asm/unistd.h" | 11 | #include "asm/unistd.h" |
diff --git a/arch/v850/kernel/syscalls.c b/arch/v850/kernel/syscalls.c index f9f00ccf5324..0a4df4d6e05f 100644 --- a/arch/v850/kernel/syscalls.c +++ b/arch/v850/kernel/syscalls.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/file.h> | 30 | #include <linux/file.h> |
31 | 31 | ||
32 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
33 | #include <asm/ipc.h> | ||
34 | #include <asm/semaphore.h> | 33 | #include <asm/semaphore.h> |
35 | #include <asm/unistd.h> | 34 | #include <asm/unistd.h> |
36 | 35 | ||
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index e8756e5f6b29..89dbf970e058 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
@@ -39,6 +39,7 @@ setup-y += printf.o string.o tty.o video.o version.o voyager.o | |||
39 | setup-y += video-vga.o | 39 | setup-y += video-vga.o |
40 | setup-y += video-vesa.o | 40 | setup-y += video-vesa.o |
41 | setup-y += video-bios.o | 41 | setup-y += video-bios.o |
42 | |||
42 | targets += $(setup-y) | 43 | targets += $(setup-y) |
43 | hostprogs-y := tools/build | 44 | hostprogs-y := tools/build |
44 | 45 | ||
diff --git a/arch/x86/ia32/ia32_aout.c b/arch/x86/ia32/ia32_aout.c index 08781370256d..7cf1c29bf90e 100644 --- a/arch/x86/ia32/ia32_aout.c +++ b/arch/x86/ia32/ia32_aout.c | |||
@@ -40,7 +40,7 @@ static int load_aout_binary(struct linux_binprm *, struct pt_regs * regs); | |||
40 | static int load_aout_library(struct file*); | 40 | static int load_aout_library(struct file*); |
41 | 41 | ||
42 | #ifdef CORE_DUMP | 42 | #ifdef CORE_DUMP |
43 | static int aout_core_dump(long signr, struct pt_regs * regs, struct file *file); | 43 | static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit); |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * fill in the user structure for a core dump.. | 46 | * fill in the user structure for a core dump.. |
@@ -148,7 +148,7 @@ if (file->f_op->llseek) { \ | |||
148 | * dumping of the process results in another error.. | 148 | * dumping of the process results in another error.. |
149 | */ | 149 | */ |
150 | 150 | ||
151 | static int aout_core_dump(long signr, struct pt_regs * regs, struct file *file) | 151 | static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit) |
152 | { | 152 | { |
153 | mm_segment_t fs; | 153 | mm_segment_t fs; |
154 | int has_dumped = 0; | 154 | int has_dumped = 0; |
@@ -168,13 +168,11 @@ static int aout_core_dump(long signr, struct pt_regs * regs, struct file *file) | |||
168 | 168 | ||
169 | /* If the size of the dump file exceeds the rlimit, then see what would happen | 169 | /* If the size of the dump file exceeds the rlimit, then see what would happen |
170 | if we wrote the stack, but not the data area. */ | 170 | if we wrote the stack, but not the data area. */ |
171 | if ((dump.u_dsize+dump.u_ssize+1) * PAGE_SIZE > | 171 | if ((dump.u_dsize + dump.u_ssize + 1) * PAGE_SIZE > limit) |
172 | current->signal->rlim[RLIMIT_CORE].rlim_cur) | ||
173 | dump.u_dsize = 0; | 172 | dump.u_dsize = 0; |
174 | 173 | ||
175 | /* Make sure we have enough room to write the stack and data areas. */ | 174 | /* Make sure we have enough room to write the stack and data areas. */ |
176 | if ((dump.u_ssize+1) * PAGE_SIZE > | 175 | if ((dump.u_ssize + 1) * PAGE_SIZE > limit) |
177 | current->signal->rlim[RLIMIT_CORE].rlim_cur) | ||
178 | dump.u_ssize = 0; | 176 | dump.u_ssize = 0; |
179 | 177 | ||
180 | /* make sure we actually have a data and stack area to dump */ | 178 | /* make sure we actually have a data and stack area to dump */ |
diff --git a/arch/x86/ia32/ia32_binfmt.c b/arch/x86/ia32/ia32_binfmt.c index dffd2ac72747..d3c53e8b05c0 100644 --- a/arch/x86/ia32/ia32_binfmt.c +++ b/arch/x86/ia32/ia32_binfmt.c | |||
@@ -188,6 +188,7 @@ elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpr | |||
188 | } | 188 | } |
189 | 189 | ||
190 | #define ELF_CORE_COPY_XFPREGS 1 | 190 | #define ELF_CORE_COPY_XFPREGS 1 |
191 | #define ELF_CORE_XFPREG_TYPE NT_PRXFPREG | ||
191 | static inline int | 192 | static inline int |
192 | elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu) | 193 | elf_core_copy_task_xfpregs(struct task_struct *t, elf_fpxregset_t *xfpu) |
193 | { | 194 | { |
diff --git a/arch/x86/ia32/ipc32.c b/arch/x86/ia32/ipc32.c index 2e1869ec4db4..7b3342e5aab5 100644 --- a/arch/x86/ia32/ipc32.c +++ b/arch/x86/ia32/ipc32.c | |||
@@ -9,8 +9,6 @@ | |||
9 | #include <linux/ipc.h> | 9 | #include <linux/ipc.h> |
10 | #include <linux/compat.h> | 10 | #include <linux/compat.h> |
11 | 11 | ||
12 | #include <asm/ipc.h> | ||
13 | |||
14 | asmlinkage long | 12 | asmlinkage long |
15 | sys32_ipc(u32 call, int first, int second, int third, | 13 | sys32_ipc(u32 call, int first, int second, int third, |
16 | compat_uptr_t ptr, u32 fifth) | 14 | compat_uptr_t ptr, u32 fifth) |
diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c index 0f4d5e209e9b..e422b8159f69 100644 --- a/arch/x86/kernel/e820_64.c +++ b/arch/x86/kernel/e820_64.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include <asm/page.h> | 24 | #include <asm/page.h> |
25 | #include <asm/e820.h> | 25 | #include <asm/e820.h> |
26 | #include <asm/proto.h> | 26 | #include <asm/proto.h> |
27 | #include <asm/bootsetup.h> | 27 | #include <asm/setup.h> |
28 | #include <asm/sections.h> | 28 | #include <asm/sections.h> |
29 | 29 | ||
30 | struct e820map e820; | 30 | struct e820map e820; |
@@ -68,10 +68,15 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size) | |||
68 | 68 | ||
69 | /* initrd */ | 69 | /* initrd */ |
70 | #ifdef CONFIG_BLK_DEV_INITRD | 70 | #ifdef CONFIG_BLK_DEV_INITRD |
71 | if (LOADER_TYPE && INITRD_START && last >= INITRD_START && | 71 | if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) { |
72 | addr < INITRD_START+INITRD_SIZE) { | 72 | unsigned long ramdisk_image = boot_params.hdr.ramdisk_image; |
73 | *addrp = PAGE_ALIGN(INITRD_START + INITRD_SIZE); | 73 | unsigned long ramdisk_size = boot_params.hdr.ramdisk_size; |
74 | return 1; | 74 | unsigned long ramdisk_end = ramdisk_image+ramdisk_size; |
75 | |||
76 | if (last >= ramdisk_image && addr < ramdisk_end) { | ||
77 | *addrp = PAGE_ALIGN(ramdisk_end); | ||
78 | return 1; | ||
79 | } | ||
75 | } | 80 | } |
76 | #endif | 81 | #endif |
77 | /* kernel code */ | 82 | /* kernel code */ |
@@ -594,8 +599,8 @@ void __init setup_memory_region(void) | |||
594 | * Otherwise fake a memory map; one section from 0k->640k, | 599 | * Otherwise fake a memory map; one section from 0k->640k, |
595 | * the next section from 1mb->appropriate_mem_k | 600 | * the next section from 1mb->appropriate_mem_k |
596 | */ | 601 | */ |
597 | sanitize_e820_map(E820_MAP, &E820_MAP_NR); | 602 | sanitize_e820_map(boot_params.e820_map, &boot_params.e820_entries); |
598 | if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) | 603 | if (copy_e820_map(boot_params.e820_map, boot_params.e820_entries) < 0) |
599 | early_panic("Cannot find a valid memory map"); | 604 | early_panic("Cannot find a valid memory map"); |
600 | printk(KERN_INFO "BIOS-provided physical RAM map:\n"); | 605 | printk(KERN_INFO "BIOS-provided physical RAM map:\n"); |
601 | e820_print_map("BIOS-e820"); | 606 | e820_print_map("BIOS-e820"); |
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c index fd9aff3f3890..b7d6c23f2871 100644 --- a/arch/x86/kernel/early_printk.c +++ b/arch/x86/kernel/early_printk.c | |||
@@ -6,15 +6,10 @@ | |||
6 | #include <asm/io.h> | 6 | #include <asm/io.h> |
7 | #include <asm/processor.h> | 7 | #include <asm/processor.h> |
8 | #include <asm/fcntl.h> | 8 | #include <asm/fcntl.h> |
9 | #include <asm/setup.h> | ||
9 | #include <xen/hvc-console.h> | 10 | #include <xen/hvc-console.h> |
10 | 11 | ||
11 | /* Simple VGA output */ | 12 | /* Simple VGA output */ |
12 | |||
13 | #ifdef __i386__ | ||
14 | #include <asm/setup.h> | ||
15 | #else | ||
16 | #include <asm/bootsetup.h> | ||
17 | #endif | ||
18 | #define VGABASE (__ISA_IO_base + 0xb8000) | 13 | #define VGABASE (__ISA_IO_base + 0xb8000) |
19 | 14 | ||
20 | static int max_ypos = 25, max_xpos = 80; | 15 | static int max_ypos = 25, max_xpos = 80; |
@@ -234,10 +229,10 @@ static int __init setup_early_printk(char *buf) | |||
234 | early_serial_init(buf); | 229 | early_serial_init(buf); |
235 | early_console = &early_serial_console; | 230 | early_console = &early_serial_console; |
236 | } else if (!strncmp(buf, "vga", 3) | 231 | } else if (!strncmp(buf, "vga", 3) |
237 | && SCREEN_INFO.orig_video_isVGA == 1) { | 232 | && boot_params.screen_info.orig_video_isVGA == 1) { |
238 | max_xpos = SCREEN_INFO.orig_video_cols; | 233 | max_xpos = boot_params.screen_info.orig_video_cols; |
239 | max_ypos = SCREEN_INFO.orig_video_lines; | 234 | max_ypos = boot_params.screen_info.orig_video_lines; |
240 | current_ypos = SCREEN_INFO.orig_y; | 235 | current_ypos = boot_params.screen_info.orig_y; |
241 | early_console = &early_vga_console; | 236 | early_console = &early_vga_console; |
242 | } else if (!strncmp(buf, "simnow", 6)) { | 237 | } else if (!strncmp(buf, "simnow", 6)) { |
243 | simnow_init(buf + 6); | 238 | simnow_init(buf + 6); |
diff --git a/arch/x86/kernel/efi_32.c b/arch/x86/kernel/efi_32.c index 2452c6fbe992..b42558c48e9d 100644 --- a/arch/x86/kernel/efi_32.c +++ b/arch/x86/kernel/efi_32.c | |||
@@ -331,11 +331,13 @@ void __init efi_init(void) | |||
331 | memset(&efi, 0, sizeof(efi) ); | 331 | memset(&efi, 0, sizeof(efi) ); |
332 | memset(&efi_phys, 0, sizeof(efi_phys)); | 332 | memset(&efi_phys, 0, sizeof(efi_phys)); |
333 | 333 | ||
334 | efi_phys.systab = EFI_SYSTAB; | 334 | efi_phys.systab = |
335 | memmap.phys_map = EFI_MEMMAP; | 335 | (efi_system_table_t *)boot_params.efi_info.efi_systab; |
336 | memmap.nr_map = EFI_MEMMAP_SIZE/EFI_MEMDESC_SIZE; | 336 | memmap.phys_map = (void *)boot_params.efi_info.efi_memmap; |
337 | memmap.desc_version = EFI_MEMDESC_VERSION; | 337 | memmap.nr_map = boot_params.efi_info.efi_memmap_size/ |
338 | memmap.desc_size = EFI_MEMDESC_SIZE; | 338 | boot_params.efi_info.efi_memdesc_size; |
339 | memmap.desc_version = boot_params.efi_info.efi_memdesc_version; | ||
340 | memmap.desc_size = boot_params.efi_info.efi_memdesc_size; | ||
339 | 341 | ||
340 | efi.systab = (efi_system_table_t *) | 342 | efi.systab = (efi_system_table_t *) |
341 | boot_ioremap((unsigned long) efi_phys.systab, | 343 | boot_ioremap((unsigned long) efi_phys.systab, |
@@ -446,7 +448,8 @@ void __init efi_init(void) | |||
446 | printk(KERN_ERR PFX "Could not map the runtime service table!\n"); | 448 | printk(KERN_ERR PFX "Could not map the runtime service table!\n"); |
447 | 449 | ||
448 | /* Map the EFI memory map for use until paging_init() */ | 450 | /* Map the EFI memory map for use until paging_init() */ |
449 | memmap.map = boot_ioremap((unsigned long) EFI_MEMMAP, EFI_MEMMAP_SIZE); | 451 | memmap.map = boot_ioremap(boot_params.efi_info.efi_memmap, |
452 | boot_params.efi_info.efi_memmap_size); | ||
450 | if (memmap.map == NULL) | 453 | if (memmap.map == NULL) |
451 | printk(KERN_ERR PFX "Could not map the EFI memory map!\n"); | 454 | printk(KERN_ERR PFX "Could not map the EFI memory map!\n"); |
452 | 455 | ||
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index 8561f626edad..a7eee0a4751d 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
15 | #include <asm/proto.h> | 15 | #include <asm/proto.h> |
16 | #include <asm/smp.h> | 16 | #include <asm/smp.h> |
17 | #include <asm/bootsetup.h> | ||
18 | #include <asm/setup.h> | 17 | #include <asm/setup.h> |
19 | #include <asm/desc.h> | 18 | #include <asm/desc.h> |
20 | #include <asm/pgtable.h> | 19 | #include <asm/pgtable.h> |
@@ -36,26 +35,15 @@ static void __init clear_bss(void) | |||
36 | (unsigned long) __bss_stop - (unsigned long) __bss_start); | 35 | (unsigned long) __bss_stop - (unsigned long) __bss_start); |
37 | } | 36 | } |
38 | 37 | ||
39 | #define NEW_CL_POINTER 0x228 /* Relative to real mode data */ | ||
40 | #define OLD_CL_MAGIC_ADDR 0x20 | ||
41 | #define OLD_CL_MAGIC 0xA33F | ||
42 | #define OLD_CL_OFFSET 0x22 | ||
43 | |||
44 | static void __init copy_bootdata(char *real_mode_data) | 38 | static void __init copy_bootdata(char *real_mode_data) |
45 | { | 39 | { |
46 | unsigned long new_data; | ||
47 | char * command_line; | 40 | char * command_line; |
48 | 41 | ||
49 | memcpy(x86_boot_params, real_mode_data, BOOT_PARAM_SIZE); | 42 | memcpy(&boot_params, real_mode_data, sizeof boot_params); |
50 | new_data = *(u32 *) (x86_boot_params + NEW_CL_POINTER); | 43 | if (boot_params.hdr.cmd_line_ptr) { |
51 | if (!new_data) { | 44 | command_line = __va(boot_params.hdr.cmd_line_ptr); |
52 | if (OLD_CL_MAGIC != *(u16 *)(real_mode_data + OLD_CL_MAGIC_ADDR)) { | 45 | memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); |
53 | return; | ||
54 | } | ||
55 | new_data = __pa(real_mode_data) + *(u16 *)(real_mode_data + OLD_CL_OFFSET); | ||
56 | } | 46 | } |
57 | command_line = __va(new_data); | ||
58 | memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); | ||
59 | } | 47 | } |
60 | 48 | ||
61 | void __init x86_64_start_kernel(char * real_mode_data) | 49 | void __init x86_64_start_kernel(char * real_mode_data) |
diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c index deda9a221cf2..8459ca64bc2f 100644 --- a/arch/x86/kernel/machine_kexec_32.c +++ b/arch/x86/kernel/machine_kexec_32.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/kexec.h> | 10 | #include <linux/kexec.h> |
11 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/numa.h> | ||
13 | #include <asm/pgtable.h> | 14 | #include <asm/pgtable.h> |
14 | #include <asm/pgalloc.h> | 15 | #include <asm/pgalloc.h> |
15 | #include <asm/tlbflush.h> | 16 | #include <asm/tlbflush.h> |
@@ -169,3 +170,15 @@ static int __init parse_crashkernel(char *arg) | |||
169 | return 0; | 170 | return 0; |
170 | } | 171 | } |
171 | early_param("crashkernel", parse_crashkernel); | 172 | early_param("crashkernel", parse_crashkernel); |
173 | |||
174 | void arch_crash_save_vmcoreinfo(void) | ||
175 | { | ||
176 | #ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE | ||
177 | VMCOREINFO_SYMBOL(node_data); | ||
178 | VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); | ||
179 | #endif | ||
180 | #ifdef CONFIG_X86_PAE | ||
181 | VMCOREINFO_CONFIG(X86_PAE); | ||
182 | #endif | ||
183 | } | ||
184 | |||
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c index cd1899a2f0c5..7450b69710b5 100644 --- a/arch/x86/kernel/machine_kexec_64.c +++ b/arch/x86/kernel/machine_kexec_64.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/kexec.h> | 10 | #include <linux/kexec.h> |
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/reboot.h> | 12 | #include <linux/reboot.h> |
13 | #include <linux/numa.h> | ||
13 | #include <asm/pgtable.h> | 14 | #include <asm/pgtable.h> |
14 | #include <asm/tlbflush.h> | 15 | #include <asm/tlbflush.h> |
15 | #include <asm/mmu_context.h> | 16 | #include <asm/mmu_context.h> |
@@ -257,3 +258,11 @@ static int __init setup_crashkernel(char *arg) | |||
257 | } | 258 | } |
258 | early_param("crashkernel", setup_crashkernel); | 259 | early_param("crashkernel", setup_crashkernel); |
259 | 260 | ||
261 | void arch_crash_save_vmcoreinfo(void) | ||
262 | { | ||
263 | #ifdef CONFIG_ARCH_DISCONTIGMEM_ENABLE | ||
264 | VMCOREINFO_SYMBOL(node_data); | ||
265 | VMCOREINFO_LENGTH(node_data, MAX_NUMNODES); | ||
266 | #endif | ||
267 | } | ||
268 | |||
diff --git a/arch/x86/kernel/mce_64.c b/arch/x86/kernel/mce_64.c index a66d607f5b92..97d2b757d6bd 100644 --- a/arch/x86/kernel/mce_64.c +++ b/arch/x86/kernel/mce_64.c | |||
@@ -76,9 +76,6 @@ void mce_log(struct mce *mce) | |||
76 | wmb(); | 76 | wmb(); |
77 | for (;;) { | 77 | for (;;) { |
78 | entry = rcu_dereference(mcelog.next); | 78 | entry = rcu_dereference(mcelog.next); |
79 | /* The rmb forces the compiler to reload next in each | ||
80 | iteration */ | ||
81 | rmb(); | ||
82 | for (;;) { | 79 | for (;;) { |
83 | /* When the buffer fills up discard new entries. Assume | 80 | /* When the buffer fills up discard new entries. Assume |
84 | that the earlier errors are the more interesting. */ | 81 | that the earlier errors are the more interesting. */ |
diff --git a/arch/x86/kernel/setup64.c b/arch/x86/kernel/setup64.c index 1200aaac403e..ba9188235057 100644 --- a/arch/x86/kernel/setup64.c +++ b/arch/x86/kernel/setup64.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/bootmem.h> | 11 | #include <linux/bootmem.h> |
12 | #include <linux/bitops.h> | 12 | #include <linux/bitops.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <asm/bootsetup.h> | ||
15 | #include <asm/pda.h> | 14 | #include <asm/pda.h> |
16 | #include <asm/pgtable.h> | 15 | #include <asm/pgtable.h> |
17 | #include <asm/processor.h> | 16 | #include <asm/processor.h> |
@@ -23,8 +22,9 @@ | |||
23 | #include <asm/percpu.h> | 22 | #include <asm/percpu.h> |
24 | #include <asm/proto.h> | 23 | #include <asm/proto.h> |
25 | #include <asm/sections.h> | 24 | #include <asm/sections.h> |
25 | #include <asm/setup.h> | ||
26 | 26 | ||
27 | char x86_boot_params[BOOT_PARAM_SIZE] __initdata; | 27 | struct boot_params __initdata boot_params; |
28 | 28 | ||
29 | cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE; | 29 | cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE; |
30 | 30 | ||
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c index c8e1bc38d421..b87a6fd5ba48 100644 --- a/arch/x86/kernel/setup_32.c +++ b/arch/x86/kernel/setup_32.c | |||
@@ -137,10 +137,11 @@ EXPORT_SYMBOL(edd); | |||
137 | */ | 137 | */ |
138 | static inline void copy_edd(void) | 138 | static inline void copy_edd(void) |
139 | { | 139 | { |
140 | memcpy(edd.mbr_signature, EDD_MBR_SIGNATURE, sizeof(edd.mbr_signature)); | 140 | memcpy(edd.mbr_signature, boot_params.edd_mbr_sig_buffer, |
141 | memcpy(edd.edd_info, EDD_BUF, sizeof(edd.edd_info)); | 141 | sizeof(edd.mbr_signature)); |
142 | edd.mbr_signature_nr = EDD_MBR_SIG_NR; | 142 | memcpy(edd.edd_info, boot_params.eddbuf, sizeof(edd.edd_info)); |
143 | edd.edd_info_nr = EDD_NR; | 143 | edd.mbr_signature_nr = boot_params.edd_mbr_sig_buf_entries; |
144 | edd.edd_info_nr = boot_params.eddbuf_entries; | ||
144 | } | 145 | } |
145 | #else | 146 | #else |
146 | static inline void copy_edd(void) | 147 | static inline void copy_edd(void) |
@@ -434,17 +435,20 @@ void __init setup_bootmem_allocator(void) | |||
434 | #endif | 435 | #endif |
435 | numa_kva_reserve(); | 436 | numa_kva_reserve(); |
436 | #ifdef CONFIG_BLK_DEV_INITRD | 437 | #ifdef CONFIG_BLK_DEV_INITRD |
437 | if (LOADER_TYPE && INITRD_START) { | 438 | if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) { |
438 | if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { | 439 | unsigned long ramdisk_image = boot_params.hdr.ramdisk_image; |
439 | reserve_bootmem(INITRD_START, INITRD_SIZE); | 440 | unsigned long ramdisk_size = boot_params.hdr.ramdisk_size; |
440 | initrd_start = INITRD_START + PAGE_OFFSET; | 441 | unsigned long ramdisk_end = ramdisk_image + ramdisk_size; |
441 | initrd_end = initrd_start+INITRD_SIZE; | 442 | unsigned long end_of_lowmem = max_low_pfn << PAGE_SHIFT; |
442 | } | 443 | |
443 | else { | 444 | if (ramdisk_end <= end_of_lowmem) { |
445 | reserve_bootmem(ramdisk_image, ramdisk_size); | ||
446 | initrd_start = ramdisk_image + PAGE_OFFSET; | ||
447 | initrd_end = initrd_start+ramdisk_size; | ||
448 | } else { | ||
444 | printk(KERN_ERR "initrd extends beyond end of memory " | 449 | printk(KERN_ERR "initrd extends beyond end of memory " |
445 | "(0x%08lx > 0x%08lx)\ndisabling initrd\n", | 450 | "(0x%08lx > 0x%08lx)\ndisabling initrd\n", |
446 | INITRD_START + INITRD_SIZE, | 451 | ramdisk_end, end_of_lowmem); |
447 | max_low_pfn << PAGE_SHIFT); | ||
448 | initrd_start = 0; | 452 | initrd_start = 0; |
449 | } | 453 | } |
450 | } | 454 | } |
@@ -512,28 +516,29 @@ void __init setup_arch(char **cmdline_p) | |||
512 | * the system table is valid. If not, then initialize normally. | 516 | * the system table is valid. If not, then initialize normally. |
513 | */ | 517 | */ |
514 | #ifdef CONFIG_EFI | 518 | #ifdef CONFIG_EFI |
515 | if ((LOADER_TYPE == 0x50) && EFI_SYSTAB) | 519 | if ((boot_params.hdr.type_of_loader == 0x50) && |
520 | boot_params.efi_info.efi_systab) | ||
516 | efi_enabled = 1; | 521 | efi_enabled = 1; |
517 | #endif | 522 | #endif |
518 | 523 | ||
519 | ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); | 524 | ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); |
520 | screen_info = SCREEN_INFO; | 525 | screen_info = boot_params.screen_info; |
521 | edid_info = EDID_INFO; | 526 | edid_info = boot_params.edid_info; |
522 | apm_info.bios = APM_BIOS_INFO; | 527 | apm_info.bios = boot_params.apm_bios_info; |
523 | ist_info = IST_INFO; | 528 | ist_info = boot_params.ist_info; |
524 | saved_videomode = VIDEO_MODE; | 529 | saved_videomode = boot_params.hdr.vid_mode; |
525 | if( SYS_DESC_TABLE.length != 0 ) { | 530 | if( boot_params.sys_desc_table.length != 0 ) { |
526 | set_mca_bus(SYS_DESC_TABLE.table[3] & 0x2); | 531 | set_mca_bus(boot_params.sys_desc_table.table[3] & 0x2); |
527 | machine_id = SYS_DESC_TABLE.table[0]; | 532 | machine_id = boot_params.sys_desc_table.table[0]; |
528 | machine_submodel_id = SYS_DESC_TABLE.table[1]; | 533 | machine_submodel_id = boot_params.sys_desc_table.table[1]; |
529 | BIOS_revision = SYS_DESC_TABLE.table[2]; | 534 | BIOS_revision = boot_params.sys_desc_table.table[2]; |
530 | } | 535 | } |
531 | bootloader_type = LOADER_TYPE; | 536 | bootloader_type = boot_params.hdr.type_of_loader; |
532 | 537 | ||
533 | #ifdef CONFIG_BLK_DEV_RAM | 538 | #ifdef CONFIG_BLK_DEV_RAM |
534 | rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK; | 539 | rd_image_start = boot_params.hdr.ram_size & RAMDISK_IMAGE_START_MASK; |
535 | rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0); | 540 | rd_prompt = ((boot_params.hdr.ram_size & RAMDISK_PROMPT_FLAG) != 0); |
536 | rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0); | 541 | rd_doload = ((boot_params.hdr.ram_size & RAMDISK_LOAD_FLAG) != 0); |
537 | #endif | 542 | #endif |
538 | ARCH_SETUP | 543 | ARCH_SETUP |
539 | if (efi_enabled) | 544 | if (efi_enabled) |
@@ -545,7 +550,7 @@ void __init setup_arch(char **cmdline_p) | |||
545 | 550 | ||
546 | copy_edd(); | 551 | copy_edd(); |
547 | 552 | ||
548 | if (!MOUNT_ROOT_RDONLY) | 553 | if (!boot_params.hdr.root_flags) |
549 | root_mountflags &= ~MS_RDONLY; | 554 | root_mountflags &= ~MS_RDONLY; |
550 | init_mm.start_code = (unsigned long) _text; | 555 | init_mm.start_code = (unsigned long) _text; |
551 | init_mm.end_code = (unsigned long) _etext; | 556 | init_mm.end_code = (unsigned long) _etext; |
diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c index 85b5b6310acc..8159bf0be17a 100644 --- a/arch/x86/kernel/setup_64.c +++ b/arch/x86/kernel/setup_64.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #include <asm/dma.h> | 52 | #include <asm/dma.h> |
53 | #include <asm/mpspec.h> | 53 | #include <asm/mpspec.h> |
54 | #include <asm/mmu_context.h> | 54 | #include <asm/mmu_context.h> |
55 | #include <asm/bootsetup.h> | ||
56 | #include <asm/proto.h> | 55 | #include <asm/proto.h> |
57 | #include <asm/setup.h> | 56 | #include <asm/setup.h> |
58 | #include <asm/mach_apic.h> | 57 | #include <asm/mach_apic.h> |
@@ -180,10 +179,11 @@ EXPORT_SYMBOL(edd); | |||
180 | */ | 179 | */ |
181 | static inline void copy_edd(void) | 180 | static inline void copy_edd(void) |
182 | { | 181 | { |
183 | memcpy(edd.mbr_signature, EDD_MBR_SIGNATURE, sizeof(edd.mbr_signature)); | 182 | memcpy(edd.mbr_signature, boot_params.edd_mbr_sig_buffer, |
184 | memcpy(edd.edd_info, EDD_BUF, sizeof(edd.edd_info)); | 183 | sizeof(edd.mbr_signature)); |
185 | edd.mbr_signature_nr = EDD_MBR_SIG_NR; | 184 | memcpy(edd.edd_info, boot_params.eddbuf, sizeof(edd.edd_info)); |
186 | edd.edd_info_nr = EDD_NR; | 185 | edd.mbr_signature_nr = boot_params.edd_mbr_sig_buf_entries; |
186 | edd.edd_info_nr = boot_params.eddbuf_entries; | ||
187 | } | 187 | } |
188 | #else | 188 | #else |
189 | static inline void copy_edd(void) | 189 | static inline void copy_edd(void) |
@@ -220,21 +220,21 @@ void __init setup_arch(char **cmdline_p) | |||
220 | { | 220 | { |
221 | printk(KERN_INFO "Command line: %s\n", boot_command_line); | 221 | printk(KERN_INFO "Command line: %s\n", boot_command_line); |
222 | 222 | ||
223 | ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); | 223 | ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); |
224 | screen_info = SCREEN_INFO; | 224 | screen_info = boot_params.screen_info; |
225 | edid_info = EDID_INFO; | 225 | edid_info = boot_params.edid_info; |
226 | saved_video_mode = SAVED_VIDEO_MODE; | 226 | saved_video_mode = boot_params.hdr.vid_mode; |
227 | bootloader_type = LOADER_TYPE; | 227 | bootloader_type = boot_params.hdr.type_of_loader; |
228 | 228 | ||
229 | #ifdef CONFIG_BLK_DEV_RAM | 229 | #ifdef CONFIG_BLK_DEV_RAM |
230 | rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK; | 230 | rd_image_start = boot_params.hdr.ram_size & RAMDISK_IMAGE_START_MASK; |
231 | rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0); | 231 | rd_prompt = ((boot_params.hdr.ram_size & RAMDISK_PROMPT_FLAG) != 0); |
232 | rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0); | 232 | rd_doload = ((boot_params.hdr.ram_size & RAMDISK_LOAD_FLAG) != 0); |
233 | #endif | 233 | #endif |
234 | setup_memory_region(); | 234 | setup_memory_region(); |
235 | copy_edd(); | 235 | copy_edd(); |
236 | 236 | ||
237 | if (!MOUNT_ROOT_RDONLY) | 237 | if (!boot_params.hdr.root_flags) |
238 | root_mountflags &= ~MS_RDONLY; | 238 | root_mountflags &= ~MS_RDONLY; |
239 | init_mm.start_code = (unsigned long) &_text; | 239 | init_mm.start_code = (unsigned long) &_text; |
240 | init_mm.end_code = (unsigned long) &_etext; | 240 | init_mm.end_code = (unsigned long) &_etext; |
@@ -339,17 +339,20 @@ void __init setup_arch(char **cmdline_p) | |||
339 | */ | 339 | */ |
340 | find_smp_config(); | 340 | find_smp_config(); |
341 | #ifdef CONFIG_BLK_DEV_INITRD | 341 | #ifdef CONFIG_BLK_DEV_INITRD |
342 | if (LOADER_TYPE && INITRD_START) { | 342 | if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) { |
343 | if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) { | 343 | unsigned long ramdisk_image = boot_params.hdr.ramdisk_image; |
344 | reserve_bootmem_generic(INITRD_START, INITRD_SIZE); | 344 | unsigned long ramdisk_size = boot_params.hdr.ramdisk_size; |
345 | initrd_start = INITRD_START + PAGE_OFFSET; | 345 | unsigned long ramdisk_end = ramdisk_image + ramdisk_size; |
346 | initrd_end = initrd_start+INITRD_SIZE; | 346 | unsigned long end_of_mem = end_pfn << PAGE_SHIFT; |
347 | } | 347 | |
348 | else { | 348 | if (ramdisk_end <= end_of_mem) { |
349 | reserve_bootmem_generic(ramdisk_image, ramdisk_size); | ||
350 | initrd_start = ramdisk_image + PAGE_OFFSET; | ||
351 | initrd_end = initrd_start+ramdisk_size; | ||
352 | } else { | ||
349 | printk(KERN_ERR "initrd extends beyond end of memory " | 353 | printk(KERN_ERR "initrd extends beyond end of memory " |
350 | "(0x%08lx > 0x%08lx)\ndisabling initrd\n", | 354 | "(0x%08lx > 0x%08lx)\ndisabling initrd\n", |
351 | (unsigned long)(INITRD_START + INITRD_SIZE), | 355 | ramdisk_end, end_of_mem); |
352 | (unsigned long)(end_pfn << PAGE_SHIFT)); | ||
353 | initrd_start = 0; | 356 | initrd_start = 0; |
354 | } | 357 | } |
355 | } | 358 | } |
diff --git a/arch/x86/kernel/sys_i386_32.c b/arch/x86/kernel/sys_i386_32.c index f8bae9ba0324..a86d26f036e1 100644 --- a/arch/x86/kernel/sys_i386_32.c +++ b/arch/x86/kernel/sys_i386_32.c | |||
@@ -17,10 +17,10 @@ | |||
17 | #include <linux/mman.h> | 17 | #include <linux/mman.h> |
18 | #include <linux/file.h> | 18 | #include <linux/file.h> |
19 | #include <linux/utsname.h> | 19 | #include <linux/utsname.h> |
20 | #include <linux/ipc.h> | ||
20 | 21 | ||
21 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
22 | #include <asm/unistd.h> | 23 | #include <asm/unistd.h> |
23 | #include <asm/ipc.h> | ||
24 | 24 | ||
25 | /* | 25 | /* |
26 | * sys_pipe() is the normal C calling standard for creating | 26 | * sys_pipe() is the normal C calling standard for creating |
diff --git a/arch/x86/mach-default/setup.c b/arch/x86/mach-default/setup.c index 7f635c7a2381..1bd82983986d 100644 --- a/arch/x86/mach-default/setup.c +++ b/arch/x86/mach-default/setup.c | |||
@@ -159,16 +159,18 @@ char * __init machine_specific_memory_setup(void) | |||
159 | * Otherwise fake a memory map; one section from 0k->640k, | 159 | * Otherwise fake a memory map; one section from 0k->640k, |
160 | * the next section from 1mb->appropriate_mem_k | 160 | * the next section from 1mb->appropriate_mem_k |
161 | */ | 161 | */ |
162 | sanitize_e820_map(E820_MAP, &E820_MAP_NR); | 162 | sanitize_e820_map(boot_params.e820_map, &boot_params.e820_entries); |
163 | if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) { | 163 | if (copy_e820_map(boot_params.e820_map, boot_params.e820_entries) |
164 | < 0) { | ||
164 | unsigned long mem_size; | 165 | unsigned long mem_size; |
165 | 166 | ||
166 | /* compare results from other methods and take the greater */ | 167 | /* compare results from other methods and take the greater */ |
167 | if (ALT_MEM_K < EXT_MEM_K) { | 168 | if (boot_params.alt_mem_k |
168 | mem_size = EXT_MEM_K; | 169 | < boot_params.screen_info.ext_mem_k) { |
170 | mem_size = boot_params.screen_info.ext_mem_k; | ||
169 | who = "BIOS-88"; | 171 | who = "BIOS-88"; |
170 | } else { | 172 | } else { |
171 | mem_size = ALT_MEM_K; | 173 | mem_size = boot_params.alt_mem_k; |
172 | who = "BIOS-e801"; | 174 | who = "BIOS-e801"; |
173 | } | 175 | } |
174 | 176 | ||
diff --git a/arch/x86/mach-visws/setup.c b/arch/x86/mach-visws/setup.c index 1f81f10e03a0..de4c9dbd086f 100644 --- a/arch/x86/mach-visws/setup.c +++ b/arch/x86/mach-visws/setup.c | |||
@@ -152,7 +152,7 @@ char * __init machine_specific_memory_setup(void) | |||
152 | { | 152 | { |
153 | long long gfx_mem_size = 8 * MB; | 153 | long long gfx_mem_size = 8 * MB; |
154 | 154 | ||
155 | mem_size = ALT_MEM_K; | 155 | mem_size = boot_params.alt_mem_k; |
156 | 156 | ||
157 | if (!mem_size) { | 157 | if (!mem_size) { |
158 | printk(KERN_WARNING "Bootloader didn't set memory size, upgrade it !\n"); | 158 | printk(KERN_WARNING "Bootloader didn't set memory size, upgrade it !\n"); |
diff --git a/arch/x86/mach-voyager/setup.c b/arch/x86/mach-voyager/setup.c index 2b55694e6400..a0ab4002abcd 100644 --- a/arch/x86/mach-voyager/setup.c +++ b/arch/x86/mach-voyager/setup.c | |||
@@ -83,7 +83,7 @@ char * __init machine_specific_memory_setup(void) | |||
83 | 83 | ||
84 | if(inb(catbase) != VOYAGER_DINO) { | 84 | if(inb(catbase) != VOYAGER_DINO) { |
85 | printk(KERN_ERR "Voyager: Failed to get DINO for L4, setting tom to EXT_MEM_K\n"); | 85 | printk(KERN_ERR "Voyager: Failed to get DINO for L4, setting tom to EXT_MEM_K\n"); |
86 | tom = (EXT_MEM_K)<<10; | 86 | tom = (boot_params.screen_info.ext_mem_k)<<10; |
87 | } | 87 | } |
88 | who = "Voyager-TOM"; | 88 | who = "Voyager-TOM"; |
89 | add_memory_region(0, 0x9f000, E820_RAM); | 89 | add_memory_region(0, 0x9f000, E820_RAM); |
@@ -104,16 +104,18 @@ char * __init machine_specific_memory_setup(void) | |||
104 | * Otherwise fake a memory map; one section from 0k->640k, | 104 | * Otherwise fake a memory map; one section from 0k->640k, |
105 | * the next section from 1mb->appropriate_mem_k | 105 | * the next section from 1mb->appropriate_mem_k |
106 | */ | 106 | */ |
107 | sanitize_e820_map(E820_MAP, &E820_MAP_NR); | 107 | sanitize_e820_map(boot_params.e820_map, &boot_params.e820_entries); |
108 | if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) { | 108 | if (copy_e820_map(boot_params.e820_map, boot_params.e820_entries) |
109 | < 0) { | ||
109 | unsigned long mem_size; | 110 | unsigned long mem_size; |
110 | 111 | ||
111 | /* compare results from other methods and take the greater */ | 112 | /* compare results from other methods and take the greater */ |
112 | if (ALT_MEM_K < EXT_MEM_K) { | 113 | if (boot_params.alt_mem_k |
113 | mem_size = EXT_MEM_K; | 114 | < boot_params.screen_info.ext_mem_k) { |
115 | mem_size = boot_params.screen_info.ext_mem_k; | ||
114 | who = "BIOS-88"; | 116 | who = "BIOS-88"; |
115 | } else { | 117 | } else { |
116 | mem_size = ALT_MEM_K; | 118 | mem_size = boot_params.alt_mem_k; |
117 | who = "BIOS-e801"; | 119 | who = "BIOS-e801"; |
118 | } | 120 | } |
119 | 121 | ||
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c index 860e912a3fbb..b1e45457d4ef 100644 --- a/arch/x86/mm/discontig_32.c +++ b/arch/x86/mm/discontig_32.c | |||
@@ -288,8 +288,9 @@ unsigned long __init setup_memory(void) | |||
288 | 288 | ||
289 | #ifdef CONFIG_BLK_DEV_INITRD | 289 | #ifdef CONFIG_BLK_DEV_INITRD |
290 | /* Numa kva area is below the initrd */ | 290 | /* Numa kva area is below the initrd */ |
291 | if (LOADER_TYPE && INITRD_START) | 291 | if (boot_params.hdr.type_of_loader && boot_params.hdr.ramdisk_image) |
292 | kva_start_pfn = PFN_DOWN(INITRD_START) - kva_pages; | 292 | kva_start_pfn = PFN_DOWN(boot_params.hdr.ramdisk_image) |
293 | - kva_pages; | ||
293 | #endif | 294 | #endif |
294 | kva_start_pfn -= kva_start_pfn & (PTRS_PER_PTE-1); | 295 | kva_start_pfn -= kva_start_pfn & (PTRS_PER_PTE-1); |
295 | 296 | ||
diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c index 01437c46baae..ef1f6cd3ea66 100644 --- a/arch/x86/mm/pgtable_32.c +++ b/arch/x86/mm/pgtable_32.c | |||
@@ -193,7 +193,7 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) | |||
193 | return pte; | 193 | return pte; |
194 | } | 194 | } |
195 | 195 | ||
196 | void pmd_ctor(void *pmd, struct kmem_cache *cache, unsigned long flags) | 196 | void pmd_ctor(struct kmem_cache *cache, void *pmd) |
197 | { | 197 | { |
198 | memset(pmd, 0, PTRS_PER_PMD*sizeof(pmd_t)); | 198 | memset(pmd, 0, PTRS_PER_PMD*sizeof(pmd_t)); |
199 | } | 199 | } |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index f01bfcd4bdee..493a083f6886 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -1137,9 +1137,10 @@ asmlinkage void __init xen_start_kernel(void) | |||
1137 | new_cpu_data.x86_capability[0] = cpuid_edx(1); | 1137 | new_cpu_data.x86_capability[0] = cpuid_edx(1); |
1138 | 1138 | ||
1139 | /* Poke various useful things into boot_params */ | 1139 | /* Poke various useful things into boot_params */ |
1140 | LOADER_TYPE = (9 << 4) | 0; | 1140 | boot_params.hdr.type_of_loader = (9 << 4) | 0; |
1141 | INITRD_START = xen_start_info->mod_start ? __pa(xen_start_info->mod_start) : 0; | 1141 | boot_params.hdr.ramdisk_image = xen_start_info->mod_start |
1142 | INITRD_SIZE = xen_start_info->mod_len; | 1142 | ? __pa(xen_start_info->mod_start) : 0; |
1143 | boot_params.hdr.ramdisk_size = xen_start_info->mod_len; | ||
1143 | 1144 | ||
1144 | /* Start the world */ | 1145 | /* Start the world */ |
1145 | start_kernel(); | 1146 | start_kernel(); |
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 8c83dbe4c4d0..d681be88ae5d 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -582,17 +582,18 @@ config CRASH_DUMP | |||
582 | bool "kernel crash dumps (EXPERIMENTAL)" | 582 | bool "kernel crash dumps (EXPERIMENTAL)" |
583 | depends on EXPERIMENTAL | 583 | depends on EXPERIMENTAL |
584 | help | 584 | help |
585 | Generate crash dump after being started by kexec. | 585 | Generate crash dump after being started by kexec. |
586 | This should be normally only set in special crash dump kernels | 586 | This should be normally only set in special crash dump kernels |
587 | which are loaded in the main kernel with kexec-tools into | 587 | which are loaded in the main kernel with kexec-tools into |
588 | a specially reserved region and then later executed after | 588 | a specially reserved region and then later executed after |
589 | a crash by kdump/kexec. The crash dump kernel must be compiled | 589 | a crash by kdump/kexec. The crash dump kernel must be compiled |
590 | to a memory address not used by the main kernel or BIOS using | 590 | to a memory address not used by the main kernel or BIOS using |
591 | PHYSICAL_START. | 591 | PHYSICAL_START, or it must be built as a relocatable image |
592 | For more details see Documentation/kdump/kdump.txt | 592 | (CONFIG_RELOCATABLE=y). |
593 | For more details see Documentation/kdump/kdump.txt | ||
593 | 594 | ||
594 | config RELOCATABLE | 595 | config RELOCATABLE |
595 | bool "Build a relocatable kernel(EXPERIMENTAL)" | 596 | bool "Build a relocatable kernel (EXPERIMENTAL)" |
596 | depends on EXPERIMENTAL | 597 | depends on EXPERIMENTAL |
597 | help | 598 | help |
598 | Builds a relocatable kernel. This enables loading and running | 599 | Builds a relocatable kernel. This enables loading and running |
@@ -603,8 +604,8 @@ config RELOCATABLE | |||
603 | must live at a different physical address than the primary | 604 | must live at a different physical address than the primary |
604 | kernel. | 605 | kernel. |
605 | 606 | ||
606 | Note: If CONFIG_RELOCATABLE=y, then kernel run from the address | 607 | Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address |
607 | it has been loaded at and compile time physical address | 608 | it has been loaded at and the compile time physical address |
608 | (CONFIG_PHYSICAL_START) is ignored. | 609 | (CONFIG_PHYSICAL_START) is ignored. |
609 | 610 | ||
610 | config PHYSICAL_START | 611 | config PHYSICAL_START |
@@ -796,7 +797,6 @@ source "drivers/firmware/Kconfig" | |||
796 | source fs/Kconfig | 797 | source fs/Kconfig |
797 | 798 | ||
798 | menu "Instrumentation Support" | 799 | menu "Instrumentation Support" |
799 | depends on EXPERIMENTAL | ||
800 | 800 | ||
801 | source "arch/x86/oprofile/Kconfig" | 801 | source "arch/x86/oprofile/Kconfig" |
802 | 802 | ||