Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40ef8cbc authored by Paul Mackerras's avatar Paul Mackerras
Browse files

powerpc: Get 64-bit configs to compile with ARCH=powerpc



This is a bunch of mostly small fixes that are needed to get
ARCH=powerpc to compile for 64-bit.  This adds setup_64.c from
arch/ppc64/kernel/setup.c and locks.c from arch/ppc64/lib/locks.c.

Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent bc6f8a4b
Loading
Loading
Loading
Loading
+9 −6
Original line number Original line Diff line number Diff line
@@ -10,6 +10,12 @@ CFLAGS_prom_init.o += -fPIC
CFLAGS_btext.o		+= -fPIC
CFLAGS_btext.o		+= -fPIC
endif
endif


obj-y				:= semaphore.o traps.o
obj-$(CONFIG_ALTIVEC)		+= vecemu.o vector.o
obj-$(CONFIG_POWER4)		+= idle_power4.o

ifeq ($(CONFIG_PPC_MERGE),y)

extra-$(CONFIG_PPC_STD_MMU)	:= head_32.o
extra-$(CONFIG_PPC_STD_MMU)	:= head_32.o
extra-$(CONFIG_PPC64)		:= head_64.o
extra-$(CONFIG_PPC64)		:= head_64.o
extra-$(CONFIG_40x)		:= head_4xx.o
extra-$(CONFIG_40x)		:= head_4xx.o
@@ -21,15 +27,12 @@ extra-$(CONFIG_PPC64) += entry_64.o
extra-$(CONFIG_PPC_FPU)		+= fpu.o
extra-$(CONFIG_PPC_FPU)		+= fpu.o
extra-y				+= vmlinux.lds
extra-y				+= vmlinux.lds


obj-y				+= traps.o prom.o semaphore.o
obj-y				+= process.o init_task.o \
				   prom.o systbl.o
obj-$(CONFIG_PPC32)		+= entry_32.o setup_32.o misc_32.o
obj-$(CONFIG_PPC32)		+= entry_32.o setup_32.o misc_32.o
obj-$(CONFIG_PPC64)		+= idle_power4.o
obj-$(CONFIG_PPC64)		+= setup_64.o misc_64.o
obj-$(CONFIG_PPC64)		+= misc_64.o
ifeq ($(CONFIG_PPC32),y)
obj-$(CONFIG_PPC_OF)		+= prom_init.o of_device.o
obj-$(CONFIG_PPC_OF)		+= prom_init.o of_device.o
obj-$(CONFIG_MODULES)		+= ppc_ksyms.o
obj-$(CONFIG_MODULES)		+= ppc_ksyms.o
endif
obj-$(CONFIG_ALTIVEC)		+= vecemu.o vector.o
obj-$(CONFIG_BOOTX_TEXT)	+= btext.o
obj-$(CONFIG_BOOTX_TEXT)	+= btext.o


ifeq ($(CONFIG_PPC_ISERIES),y)
ifeq ($(CONFIG_PPC_ISERIES),y)
+1 −0
Original line number Original line Diff line number Diff line
@@ -111,6 +111,7 @@ int main(void)
	DEFINE(ICACHEL1LOGLINESIZE, offsetof(struct ppc64_caches, log_iline_size));
	DEFINE(ICACHEL1LOGLINESIZE, offsetof(struct ppc64_caches, log_iline_size));
	DEFINE(ICACHEL1LINESPERPAGE, offsetof(struct ppc64_caches, ilines_per_page));
	DEFINE(ICACHEL1LINESPERPAGE, offsetof(struct ppc64_caches, ilines_per_page));
	DEFINE(PLATFORM, offsetof(struct systemcfg, platform));
	DEFINE(PLATFORM, offsetof(struct systemcfg, platform));
	DEFINE(PLATFORM_LPAR, PLATFORM_LPAR);


	/* paca */
	/* paca */
	DEFINE(PACA_SIZE, sizeof(struct paca_struct));
	DEFINE(PACA_SIZE, sizeof(struct paca_struct));
+2 −1
Original line number Original line Diff line number Diff line
@@ -50,7 +50,7 @@ static unsigned char vga_font[cmapsz];
int boot_text_mapped;
int boot_text_mapped;
int force_printk_to_btext = 0;
int force_printk_to_btext = 0;



#ifdef CONFIG_PPC32
/* Calc BAT values for mapping the display and store them
/* Calc BAT values for mapping the display and store them
 * in disp_BAT.  Those values are then used from head.S to map
 * in disp_BAT.  Those values are then used from head.S to map
 * the display during identify_machine() and MMU_Init()
 * the display during identify_machine() and MMU_Init()
@@ -93,6 +93,7 @@ btext_prepare_BAT(void)
	}
	}
	logicalDisplayBase = (void *) (vaddr + lowbits);
	logicalDisplayBase = (void *) (vaddr + lowbits);
}
}
#endif


/* This function will enable the early boot text when doing OF booting. This
/* This function will enable the early boot text when doing OF booting. This
 * way, xmon output should work too
 * way, xmon output should work too
+1 −0
Original line number Original line Diff line number Diff line
@@ -746,6 +746,7 @@ bad_stack:
 * any task or sent any task a signal, you should use
 * any task or sent any task a signal, you should use
 * ret_from_except or ret_from_except_lite instead of this.
 * ret_from_except or ret_from_except_lite instead of this.
 */
 */
	.globl	fast_exception_return
fast_exception_return:
fast_exception_return:
	ld	r12,_MSR(r1)
	ld	r12,_MSR(r1)
	ld	r11,_NIP(r1)
	ld	r11,_NIP(r1)
+40 −61
Original line number Original line Diff line number Diff line
@@ -51,6 +51,7 @@
#include <asm/commproc.h>
#include <asm/commproc.h>
#endif
#endif


#ifdef CONFIG_PPC32
extern void transfer_to_handler(void);
extern void transfer_to_handler(void);
extern void do_IRQ(struct pt_regs *regs);
extern void do_IRQ(struct pt_regs *regs);
extern void machine_check_exception(struct pt_regs *regs);
extern void machine_check_exception(struct pt_regs *regs);
@@ -61,14 +62,12 @@ extern int do_signal(sigset_t *, struct pt_regs *);
extern int pmac_newworld;
extern int pmac_newworld;
extern int sys_sigreturn(struct pt_regs *regs);
extern int sys_sigreturn(struct pt_regs *regs);


long long __ashrdi3(long long, int);
long long __ashldi3(long long, int);
long long __lshrdi3(long long, int);

extern unsigned long mm_ptov (unsigned long paddr);

EXPORT_SYMBOL(clear_pages);
EXPORT_SYMBOL(clear_pages);
EXPORT_SYMBOL(clear_user_page);
EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
EXPORT_SYMBOL(DMA_MODE_READ);
EXPORT_SYMBOL(DMA_MODE_WRITE);
EXPORT_SYMBOL(__div64_32);

EXPORT_SYMBOL(do_signal);
EXPORT_SYMBOL(do_signal);
EXPORT_SYMBOL(transfer_to_handler);
EXPORT_SYMBOL(transfer_to_handler);
EXPORT_SYMBOL(do_IRQ);
EXPORT_SYMBOL(do_IRQ);
@@ -77,12 +76,8 @@ EXPORT_SYMBOL(alignment_exception);
EXPORT_SYMBOL(program_check_exception);
EXPORT_SYMBOL(program_check_exception);
EXPORT_SYMBOL(single_step_exception);
EXPORT_SYMBOL(single_step_exception);
EXPORT_SYMBOL(sys_sigreturn);
EXPORT_SYMBOL(sys_sigreturn);
EXPORT_SYMBOL(ppc_n_lost_interrupts);
#endif
EXPORT_SYMBOL(ppc_lost_interrupts);


EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
EXPORT_SYMBOL(DMA_MODE_READ);
EXPORT_SYMBOL(DMA_MODE_WRITE);
#if defined(CONFIG_PPC_PREP)
#if defined(CONFIG_PPC_PREP)
EXPORT_SYMBOL(_prep_type);
EXPORT_SYMBOL(_prep_type);
EXPORT_SYMBOL(ucSystemType);
EXPORT_SYMBOL(ucSystemType);
@@ -110,7 +105,6 @@ EXPORT_SYMBOL(strnlen);
EXPORT_SYMBOL(strcmp);
EXPORT_SYMBOL(strcmp);
EXPORT_SYMBOL(strncmp);
EXPORT_SYMBOL(strncmp);
EXPORT_SYMBOL(strcasecmp);
EXPORT_SYMBOL(strcasecmp);
EXPORT_SYMBOL(__div64_32);


EXPORT_SYMBOL(csum_partial);
EXPORT_SYMBOL(csum_partial);
EXPORT_SYMBOL(csum_partial_copy_generic);
EXPORT_SYMBOL(csum_partial_copy_generic);
@@ -132,21 +126,21 @@ EXPORT_SYMBOL(_insw_ns);
EXPORT_SYMBOL(_outsw_ns);
EXPORT_SYMBOL(_outsw_ns);
EXPORT_SYMBOL(_insl_ns);
EXPORT_SYMBOL(_insl_ns);
EXPORT_SYMBOL(_outsl_ns);
EXPORT_SYMBOL(_outsl_ns);
EXPORT_SYMBOL(iopa);
EXPORT_SYMBOL(mm_ptov);
EXPORT_SYMBOL(ioremap);
EXPORT_SYMBOL(ioremap);
#ifdef CONFIG_44x
#ifdef CONFIG_44x
EXPORT_SYMBOL(ioremap64);
EXPORT_SYMBOL(ioremap64);
#endif
#endif
EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(iounmap);
EXPORT_SYMBOL(iounmap);
#ifdef CONFIG_PPC32
EXPORT_SYMBOL(ioremap_bot);	/* aka VMALLOC_END */
EXPORT_SYMBOL(ioremap_bot);	/* aka VMALLOC_END */
#endif


#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
#if defined(CONFIG_PPC32) && (defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE))
EXPORT_SYMBOL(ppc_ide_md);
EXPORT_SYMBOL(ppc_ide_md);
#endif
#endif


#ifdef CONFIG_PCI
#if defined(CONFIG_PCI) && defined(CONFIG_PPC32)
EXPORT_SYMBOL(isa_io_base);
EXPORT_SYMBOL(isa_io_base);
EXPORT_SYMBOL(isa_mem_base);
EXPORT_SYMBOL(isa_mem_base);
EXPORT_SYMBOL(pci_dram_offset);
EXPORT_SYMBOL(pci_dram_offset);
@@ -168,31 +162,31 @@ EXPORT_SYMBOL(flush_dcache_all);
EXPORT_SYMBOL(start_thread);
EXPORT_SYMBOL(start_thread);
EXPORT_SYMBOL(kernel_thread);
EXPORT_SYMBOL(kernel_thread);


EXPORT_SYMBOL(flush_instruction_cache);
EXPORT_SYMBOL(giveup_fpu);
EXPORT_SYMBOL(giveup_fpu);
#ifdef CONFIG_ALTIVEC
EXPORT_SYMBOL(giveup_altivec);
#endif /* CONFIG_ALTIVEC */
#ifdef CONFIG_SPE
EXPORT_SYMBOL(giveup_spe);
#endif /* CONFIG_SPE */

#ifdef CONFIG_PPC64
#ifdef CONFIG_PPC64
EXPORT_SYMBOL(__flush_icache_range);
EXPORT_SYMBOL(__flush_icache_range);
#else
#else
EXPORT_SYMBOL(flush_instruction_cache);
EXPORT_SYMBOL(flush_icache_range);
EXPORT_SYMBOL(flush_icache_range);
#endif
EXPORT_SYMBOL(flush_dcache_range);
EXPORT_SYMBOL(flush_icache_user_range);
EXPORT_SYMBOL(flush_dcache_page);
EXPORT_SYMBOL(flush_tlb_kernel_range);
EXPORT_SYMBOL(flush_tlb_kernel_range);
EXPORT_SYMBOL(flush_tlb_page);
EXPORT_SYMBOL(flush_tlb_page);
EXPORT_SYMBOL(_tlbie);
EXPORT_SYMBOL(_tlbie);
#ifdef CONFIG_ALTIVEC
#endif
EXPORT_SYMBOL(giveup_altivec);
EXPORT_SYMBOL(flush_dcache_range);
#endif /* CONFIG_ALTIVEC */

#ifdef CONFIG_SPE
EXPORT_SYMBOL(giveup_spe);
#endif /* CONFIG_SPE */
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
EXPORT_SYMBOL(smp_call_function);
EXPORT_SYMBOL(smp_call_function);
#ifdef CONFIG_PPC32
EXPORT_SYMBOL(smp_hw_index);
EXPORT_SYMBOL(smp_hw_index);
#endif
#endif

#endif
EXPORT_SYMBOL(ppc_md);


#ifdef CONFIG_ADB
#ifdef CONFIG_ADB
EXPORT_SYMBOL(adb_request);
EXPORT_SYMBOL(adb_request);
@@ -205,25 +199,27 @@ EXPORT_SYMBOL(adb_try_handler_change);
EXPORT_SYMBOL(cuda_request);
EXPORT_SYMBOL(cuda_request);
EXPORT_SYMBOL(cuda_poll);
EXPORT_SYMBOL(cuda_poll);
#endif /* CONFIG_ADB_CUDA */
#endif /* CONFIG_ADB_CUDA */
#ifdef CONFIG_PPC_MULTIPLATFORM
#if defined(CONFIG_PPC_MULTIPLATFORM) && defined(CONFIG_PPC32)
EXPORT_SYMBOL(_machine);
EXPORT_SYMBOL(_machine);
#endif
#endif
#ifdef CONFIG_PPC_PMAC
#ifdef CONFIG_PPC_PMAC
EXPORT_SYMBOL(sys_ctrler);
EXPORT_SYMBOL(sys_ctrler);
EXPORT_SYMBOL(pmac_newworld);
#endif
#endif
#ifdef CONFIG_VT
#ifdef CONFIG_VT
EXPORT_SYMBOL(kd_mksound);
EXPORT_SYMBOL(kd_mksound);
#endif
#endif
EXPORT_SYMBOL(to_tm);
EXPORT_SYMBOL(to_tm);


EXPORT_SYMBOL(pm_power_off);
#ifdef CONFIG_PPC32

long long __ashrdi3(long long, int);
long long __ashldi3(long long, int);
long long __lshrdi3(long long, int);
EXPORT_SYMBOL(__ashrdi3);
EXPORT_SYMBOL(__ashrdi3);
EXPORT_SYMBOL(__ashldi3);
EXPORT_SYMBOL(__ashldi3);
EXPORT_SYMBOL(__lshrdi3);
EXPORT_SYMBOL(__lshrdi3);
#endif

EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(memcpy);
EXPORT_SYMBOL(cacheable_memcpy);
EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(memset);
EXPORT_SYMBOL(memmove);
EXPORT_SYMBOL(memmove);
EXPORT_SYMBOL(memscan);
EXPORT_SYMBOL(memscan);
@@ -234,17 +230,14 @@ EXPORT_SYMBOL(memchr);
EXPORT_SYMBOL(screen_info);
EXPORT_SYMBOL(screen_info);
#endif
#endif


#ifdef CONFIG_PPC32
EXPORT_SYMBOL(pm_power_off);
EXPORT_SYMBOL(__delay);
EXPORT_SYMBOL(__delay);
EXPORT_SYMBOL(timer_interrupt);
EXPORT_SYMBOL(timer_interrupt);
EXPORT_SYMBOL(irq_desc);
EXPORT_SYMBOL(irq_desc);
EXPORT_SYMBOL(tb_ticks_per_jiffy);
EXPORT_SYMBOL(tb_ticks_per_jiffy);
EXPORT_SYMBOL(get_wchan);
EXPORT_SYMBOL(console_drivers);
EXPORT_SYMBOL(console_drivers);

EXPORT_SYMBOL(cacheable_memcpy);
#ifdef CONFIG_PPC_ISERIES
EXPORT_SYMBOL(local_irq_disable);
EXPORT_SYMBOL(local_irq_enable);
EXPORT_SYMBOL(local_get_flags);
#endif
#endif


#ifdef CONFIG_XMON
#ifdef CONFIG_XMON
@@ -255,22 +248,6 @@ EXPORT_SYMBOL(__up);
EXPORT_SYMBOL(__down);
EXPORT_SYMBOL(__down);
EXPORT_SYMBOL(__down_interruptible);
EXPORT_SYMBOL(__down_interruptible);


#if defined(CONFIG_KGDB) || defined(CONFIG_XMON)
extern void (*debugger)(struct pt_regs *regs);
extern int (*debugger_bpt)(struct pt_regs *regs);
extern int (*debugger_sstep)(struct pt_regs *regs);
extern int (*debugger_iabr_match)(struct pt_regs *regs);
extern int (*debugger_dabr_match)(struct pt_regs *regs);
extern void (*debugger_fault_handler)(struct pt_regs *regs);

EXPORT_SYMBOL(debugger);
EXPORT_SYMBOL(debugger_bpt);
EXPORT_SYMBOL(debugger_sstep);
EXPORT_SYMBOL(debugger_iabr_match);
EXPORT_SYMBOL(debugger_dabr_match);
EXPORT_SYMBOL(debugger_fault_handler);
#endif

#ifdef  CONFIG_8xx
#ifdef  CONFIG_8xx
EXPORT_SYMBOL(cpm_install_handler);
EXPORT_SYMBOL(cpm_install_handler);
EXPORT_SYMBOL(cpm_free_handler);
EXPORT_SYMBOL(cpm_free_handler);
@@ -280,22 +257,24 @@ EXPORT_SYMBOL(cpm_free_handler);
EXPORT_SYMBOL(__res);
EXPORT_SYMBOL(__res);
#endif
#endif


#ifdef CONFIG_PPC32
EXPORT_SYMBOL(next_mmu_context);
EXPORT_SYMBOL(next_mmu_context);
EXPORT_SYMBOL(set_context);
EXPORT_SYMBOL(set_context);
EXPORT_SYMBOL_GPL(__handle_mm_fault); /* For MOL */
EXPORT_SYMBOL(disarm_decr);
EXPORT_SYMBOL(disarm_decr);
#ifdef CONFIG_PPC_STD_MMU
#endif

#ifdef CONFIG_PPC_STD_MMU_32
extern long mol_trampoline;
extern long mol_trampoline;
EXPORT_SYMBOL(mol_trampoline); /* For MOL */
EXPORT_SYMBOL(mol_trampoline); /* For MOL */
EXPORT_SYMBOL(flush_hash_pages); /* For MOL */
EXPORT_SYMBOL(flush_hash_pages); /* For MOL */
EXPORT_SYMBOL_GPL(__handle_mm_fault); /* For MOL */
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
extern int mmu_hash_lock;
extern int mmu_hash_lock;
EXPORT_SYMBOL(mmu_hash_lock); /* For MOL */
EXPORT_SYMBOL(mmu_hash_lock); /* For MOL */
#endif /* CONFIG_SMP */
#endif /* CONFIG_SMP */
extern long *intercept_table;
extern long *intercept_table;
EXPORT_SYMBOL(intercept_table);
EXPORT_SYMBOL(intercept_table);
#endif /* CONFIG_PPC_STD_MMU */
#endif /* CONFIG_PPC_STD_MMU_32 */
EXPORT_SYMBOL(cur_cpu_spec);
#ifdef CONFIG_PPC_PMAC
#ifdef CONFIG_PPC_PMAC
extern unsigned long agp_special_page;
extern unsigned long agp_special_page;
EXPORT_SYMBOL(agp_special_page);
EXPORT_SYMBOL(agp_special_page);
Loading