Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4235
b: refs/heads/master
c: fd899c0
h: refs/heads/master
i:
  4233: 4a3ca6f
  4231: 10fcd25
v: v3
  • Loading branch information
Michael Ellerman authored and Linus Torvalds committed Jul 8, 2005
1 parent c26e489 commit fb60b45
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 88de0be0c7335650326a1236bf6ca1ed265c0a1c
refs/heads/master: fd899c0cc725387992ccfc83fb6f70505c36cbeb
8 changes: 5 additions & 3 deletions trunk/arch/ppc64/kernel/idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <asm/iSeries/ItLpQueue.h>
#include <asm/plpar_wrappers.h>
#include <asm/systemcfg.h>
#include <asm/machdep.h>

extern void power4_idle(void);

Expand Down Expand Up @@ -122,7 +123,7 @@ static int iSeries_idle(void)

#else

static int default_idle(void)
int default_idle(void)
{
long oldval;
unsigned int cpu = smp_processor_id();
Expand Down Expand Up @@ -288,7 +289,7 @@ static int shared_idle(void)

#endif /* CONFIG_PPC_PSERIES */

static int native_idle(void)
int native_idle(void)
{
while(1) {
/* check CPU type here */
Expand All @@ -308,7 +309,8 @@ static int native_idle(void)

void cpu_idle(void)
{
idle_loop();
BUG_ON(NULL == ppc_md.idle_loop);
ppc_md.idle_loop();
}

int powersave_nap;
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/ppc64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ extern void udbg_init_maple_realmode(void);
extern unsigned long klimit;

extern void mm_init_ppc64(void);
extern int idle_setup(void);
extern void stab_initialize(unsigned long stab);
extern void htab_initialize(void);
extern void early_init_devtree(void *flat_dt);
Expand Down Expand Up @@ -1081,8 +1080,9 @@ void __init setup_arch(char **cmdline_p)

ppc_md.setup_arch();

/* Select the correct idle loop for the platform. */
idle_setup();
/* Use the default idle loop if the platform hasn't provided one. */
if (NULL == ppc_md.idle_loop)
ppc_md.idle_loop = default_idle;

paging_init();
ppc64_boot_msg(0x15, "Setup Done");
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/asm-ppc64/machdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,13 @@ struct machdep_calls {
unsigned long size,
pgprot_t vma_prot);

/* Idle loop for this platform, leave empty for default idle loop */
int (*idle_loop)(void);
};

extern int default_idle(void);
extern int native_idle(void);

extern struct machdep_calls ppc_md;
extern char cmd_line[COMMAND_LINE_SIZE];

Expand Down

0 comments on commit fb60b45

Please sign in to comment.