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

Commit 8700c95a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull SMP/hotplug changes from Ingo Molnar:
 "This is a pretty large, multi-arch series unifying and generalizing
  the various disjunct pieces of idle routines that architectures have
  historically copied from each other and have grown in random, wildly
  inconsistent and sometimes buggy directions:

   101 files changed, 455 insertions(+), 1328 deletions(-)

  this went through a number of review and test iterations before it was
  committed, it was tested on various architectures, was exposed to
  linux-next for quite some time - nevertheless it might cause problems
  on architectures that don't read the mailing lists and don't regularly
  test linux-next.

  This cat herding excercise was motivated by the -rt kernel, and was
  brought to you by Thomas "the Whip" Gleixner."

* 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (40 commits)
  idle: Remove GENERIC_IDLE_LOOP config switch
  um: Use generic idle loop
  ia64: Make sure interrupts enabled when we "safe_halt()"
  sparc: Use generic idle loop
  idle: Remove unused ARCH_HAS_DEFAULT_IDLE
  bfin: Fix typo in arch_cpu_idle()
  xtensa: Use generic idle loop
  x86: Use generic idle loop
  unicore: Use generic idle loop
  tile: Use generic idle loop
  tile: Enter idle with preemption disabled
  sh: Use generic idle loop
  score: Use generic idle loop
  s390: Use generic idle loop
  powerpc: Use generic idle loop
  parisc: Use generic idle loop
  openrisc: Use generic idle loop
  mn10300: Use generic idle loop
  mips: Use generic idle loop
  microblaze: Use generic idle loop
  ...
parents 16fa94b5 d190e819
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -95,8 +95,6 @@ register struct thread_info *__current_thread_info __asm__("$8");
#define TS_POLLING		0x0010	/* idle task polling need_resched,
					   skip sending interrupt */

#define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)

#ifndef __ASSEMBLY__
#define HAVE_SET_RESTORE_SIGMASK	1
static inline void set_restore_sigmask(void)
+0 −19
Original line number Diff line number Diff line
@@ -46,25 +46,6 @@
void (*pm_power_off)(void) = machine_power_off;
EXPORT_SYMBOL(pm_power_off);

void
cpu_idle(void)
{
	current_thread_info()->status |= TS_POLLING;

	while (1) {
		/* FIXME -- EV6 and LCA45 know how to power down
		   the CPU.  */

		rcu_idle_enter();
		while (!need_resched())
			cpu_relax();

		rcu_idle_exit();
		schedule_preempt_disabled();
	}
}


struct halt_info {
	int mode;
	char *restart_cmd;
+1 −2
Original line number Diff line number Diff line
@@ -167,8 +167,7 @@ smp_callin(void)
	      cpuid, current, current->active_mm));

	preempt_disable();
	/* Do nothing.  */
	cpu_idle();
	cpu_startup_entry(CPUHP_ONLINE);
}

/* Wait until hwrpb->txrdy is clear for cpu.  Return -1 on timeout.  */
+1 −26
Original line number Diff line number Diff line
@@ -41,37 +41,12 @@ SYSCALL_DEFINE0(arc_gettls)
	return task_thread_info(current)->thr_ptr;
}

static inline void arch_idle(void)
void arch_cpu_idle(void)
{
	/* sleep, but enable all interrupts before committing */
	__asm__("sleep 0x3");
}

void cpu_idle(void)
{
	/* Since we SLEEP in idle loop, TIF_POLLING_NRFLAG can't be set */

	/* endless idle loop with no priority at all */
	while (1) {
		tick_nohz_idle_enter();
		rcu_idle_enter();

doze:
		local_irq_disable();
		if (!need_resched()) {
			arch_idle();
			goto doze;
		} else {
			local_irq_enable();
		}

		rcu_idle_exit();
		tick_nohz_idle_exit();

		schedule_preempt_disabled();
	}
}

asmlinkage void ret_from_fork(void);

/* Layout of Child kernel mode stack as setup at the end of this function is
+1 −1
Original line number Diff line number Diff line
@@ -141,7 +141,7 @@ void __cpuinit start_kernel_secondary(void)

	local_irq_enable();
	preempt_disable();
	cpu_idle();
	cpu_startup_entry(CPUHP_ONLINE);
}

/*
Loading