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

Commit 6fbe85f9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge:
  powerpc: Use correct sequence for putting CPU into nap mode
  [PATCH] spufs: fix context-switch decrementer code
  [PATCH] powerpc32: Set cpu explicitly in kernel compiles
  [PATCH] powerpc/pseries: bugfix: balance calls to pci_device_put
  [PATCH] powerpc: Fix machine detection in prom_init.c
  [PATCH] ppc32: Fix string comparing in platform_notify_map
  [PATCH] powerpc: Avoid __initcall warnings
  [PATCH] powerpc: Ensure runlatch is off in the idle loop
  powerpc: Fix CHRP booting - needs a define_machine call
  powerpc: iSeries has only 256 IRQs
parents a9a5cd5d f39224a8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -366,6 +366,7 @@ config PPC_PMAC64
	select U3_DART
	select MPIC_BROKEN_U3
	select GENERIC_TBSYNC
	select PPC_970_NAP
	default y

config PPC_PREP
@@ -383,6 +384,7 @@ config PPC_MAPLE
	select MPIC_BROKEN_U3
	select GENERIC_TBSYNC
	select PPC_UDBG_16550
	select PPC_970_NAP
	default n
	help
          This option enables support for the Maple 970FX Evaluation Board.
@@ -457,6 +459,10 @@ config PPC_MPC106
	bool
	default n

config PPC_970_NAP
	bool
	default n

source "drivers/cpufreq/Kconfig"

config CPU_FREQ_PMAC
+4 −0
Original line number Diff line number Diff line
@@ -104,6 +104,10 @@ ifndef CONFIG_FSL_BOOKE
CFLAGS		+= -mstring
endif

ifeq ($(CONFIG_6xx),y)
CFLAGS		+= -mcpu=powerpc
endif

cpu-as-$(CONFIG_PPC64BRIDGE)	+= -Wa,-mppc64bridge
cpu-as-$(CONFIG_4xx)		+= -Wa,-m405
cpu-as-$(CONFIG_6xx)		+= -Wa,-maltivec
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \
				   firmware.o sysfs.o
obj-$(CONFIG_PPC64)		+= vdso64/
obj-$(CONFIG_ALTIVEC)		+= vecemu.o vector.o
obj-$(CONFIG_POWER4)		+= idle_power4.o
obj-$(CONFIG_PPC_970_NAP)	+= idle_power4.o
obj-$(CONFIG_PPC_OF)		+= of_device.o prom_parse.o
procfs-$(CONFIG_PPC64)		:= proc_ppc64.o
obj-$(CONFIG_PROC_FS)		+= $(procfs-y)
+1 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ int main(void)
#endif /* CONFIG_PPC64 */

	DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
	DEFINE(TI_LOCAL_FLAGS, offsetof(struct thread_info, local_flags));
	DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count));
	DEFINE(TI_TASK, offsetof(struct thread_info, task));
#ifdef CONFIG_PPC32
+17 −18
Original line number Diff line number Diff line
@@ -128,29 +128,26 @@ transfer_to_handler:
	stw	r12,4(r11)
#endif
	b	3f

2:	/* if from kernel, check interrupted DOZE/NAP mode and
         * check for stack overflow
         */
	lwz	r9,THREAD_INFO-THREAD(r12)
	cmplw	r1,r9			/* if r1 <= current->thread_info */
	ble-	stack_ovf		/* then the kernel stack overflowed */
5:
#ifdef CONFIG_6xx
	mfspr	r11,SPRN_HID0
	mtcr	r11
BEGIN_FTR_SECTION
	bt-	8,4f			/* Check DOZE */
END_FTR_SECTION_IFSET(CPU_FTR_CAN_DOZE)
BEGIN_FTR_SECTION
	bt-	9,4f			/* Check NAP */
END_FTR_SECTION_IFSET(CPU_FTR_CAN_NAP)
	tophys(r9,r9)			/* check local flags */
	lwz	r12,TI_LOCAL_FLAGS(r9)
	mtcrf	0x01,r12
	bt-	31-TLF_NAPPING,4f
#endif /* CONFIG_6xx */
	.globl transfer_to_handler_cont
transfer_to_handler_cont:
	lwz	r11,THREAD_INFO-THREAD(r12)
	cmplw	r1,r11			/* if r1 <= current->thread_info */
	ble-	stack_ovf		/* then the kernel stack overflowed */
3:
	mflr	r9
	lwz	r11,0(r9)		/* virtual address of handler */
	lwz	r9,4(r9)		/* where to go when done */
	FIX_SRR1(r10,r12)
	mtspr	SPRN_SRR0,r11
	mtspr	SPRN_SRR1,r10
	mtlr	r9
@@ -158,7 +155,9 @@ transfer_to_handler_cont:
	RFI				/* jump to handler, enable MMU */

#ifdef CONFIG_6xx
4:	b	power_save_6xx_restore
4:	rlwinm	r12,r12,0,~_TLF_NAPPING
	stw	r12,TI_LOCAL_FLAGS(r9)
	b	power_save_6xx_restore
#endif

/*
@@ -167,10 +166,10 @@ transfer_to_handler_cont:
 */
stack_ovf:
	/* sometimes we use a statically-allocated stack, which is OK. */
	lis	r11,_end@h
	ori	r11,r11,_end@l
	cmplw	r1,r11
	ble	3b			/* r1 <= &_end is OK */
	lis	r12,_end@h
	ori	r12,r12,_end@l
	cmplw	r1,r12
	ble	5b			/* r1 <= &_end is OK */
	SAVE_NVGPRS(r11)
	addi	r3,r1,STACK_FRAME_OVERHEAD
	lis	r1,init_thread_union@ha
Loading