Commit f2783c15 authored by Paul Mackerras's avatar Paul Mackerras
Browse files

powerpc: Merge time.c and asm/time.h.



We now use the merged time.c for both 32-bit and 64-bit compilation
with ARCH=powerpc, and for ARCH=ppc64, but not for ARCH=ppc32.
This removes setup_default_decr (folds its function into time_init)
and moves wakeup_decrementer into time.c.  This also makes an
asm-powerpc/rtc.h.

Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 03f88e9f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ extra-$(CONFIG_PPC64) += entry_64.o
extra-$(CONFIG_PPC_FPU)		+= fpu.o
extra-y				+= vmlinux.lds

obj-y				+= process.o init_task.o \
obj-y				+= process.o init_task.o time.o \
				   prom.o systbl.o traps.o
obj-$(CONFIG_PPC32)		+= entry_32.o idle_6xx.o setup_32.o misc_32.o
obj-$(CONFIG_PPC64)		+= setup_64.o misc_64.o
@@ -44,7 +44,7 @@ endif

else
# stuff used from here for ARCH=ppc or ARCH=ppc64
obj-$(CONFIG_PPC64)		+= traps.o process.o init_task.o
obj-$(CONFIG_PPC64)		+= traps.o process.o init_task.o time.o

fpux-$(CONFIG_PPC32)		+= fpu.o
extra-$(CONFIG_PPC_FPU)		+= $(fpux-y)
+27 −0
Original line number Diff line number Diff line
@@ -35,6 +35,33 @@ _GLOBAL(__delay)
1:	bdnz	1b
	blr

/*
 * This returns the high 64 bits of the product of two 64-bit numbers.
 */
_GLOBAL(mulhdu)
	cmpwi	r6,0
	cmpwi	cr1,r3,0
	mr	r10,r4
	mulhwu	r4,r4,r5
	beq	1f
	mulhwu	r0,r10,r6
	mullw	r7,r10,r5
	addc	r7,r0,r7
	addze	r4,r4
1:	beqlr	cr1		/* all done if high part of A is 0 */
	mr	r10,r3
	mullw	r9,r3,r5
	mulhwu	r3,r3,r5
	beq	2f
	mullw	r0,r10,r6
	mulhwu	r8,r10,r6
	addc	r7,r0,r7
	adde	r4,r4,r8
	addze	r3,r3
2:	addc	r4,r4,r9
	addze	r3,r3
	blr

/*
 * Returns (address we're running at) - (address we were linked at)
 * for use before the text and data are mapped to KERNELBASE.
+0 −1
Original line number Diff line number Diff line
@@ -260,7 +260,6 @@ EXPORT_SYMBOL(__res);
#ifdef CONFIG_PPC32
EXPORT_SYMBOL(next_mmu_context);
EXPORT_SYMBOL(set_context);
EXPORT_SYMBOL(disarm_decr);
#endif

#ifdef CONFIG_PPC_STD_MMU_32
+0 −9
Original line number Diff line number Diff line
@@ -1083,15 +1083,6 @@ void ppc64_terminate_msg(unsigned int src, const char *msg)
	printk("[terminate]%04x %s\n", src, msg);
}

/* This should only be called on processor 0 during calibrate decr */
void __init setup_default_decr(void)
{
	struct paca_struct *lpaca = get_paca();

	lpaca->default_decr = tb_ticks_per_jiffy;
	lpaca->next_jiffy_update_tb = get_tb() + tb_ticks_per_jiffy;
}

#ifndef CONFIG_PPC_ISERIES
/*
 * This function can be used by platforms to "find" legacy serial ports.
+298 −199

File changed and moved.

Preview size limit exceeded, changes collapsed.

Loading