Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22959
b: refs/heads/master
c: 260de22
h: refs/heads/master
i:
  22957: 8104a8d
  22955: 82d91e9
  22951: 7abf3bb
  22943: b99c480
v: v3
  • Loading branch information
Michael Ellerman authored and Paul Mackerras committed Mar 22, 2006
1 parent 8c98957 commit 4699f99
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 21 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: 57cfb814f698d30894bc28e22125550193ebe549
refs/heads/master: 260de22faac4d336ca122ebd0f1e59279d0b1dfd
32 changes: 23 additions & 9 deletions trunk/arch/powerpc/platforms/iseries/mf.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include "setup.h"

extern int piranha_simulator;
static int mf_initialized;

/*
* This is the structure layout for the Machine Facilites LPAR event
Expand Down Expand Up @@ -143,7 +144,8 @@ static spinlock_t pending_event_spinlock;
static struct pending_event *pending_event_head;
static struct pending_event *pending_event_tail;
static struct pending_event *pending_event_avail;
static struct pending_event pending_event_prealloc[16];
#define PENDING_EVENT_PREALLOC_LEN 16
static struct pending_event pending_event_prealloc[PENDING_EVENT_PREALLOC_LEN];

/*
* Put a pending event onto the available queue, so it can get reused.
Expand Down Expand Up @@ -625,7 +627,7 @@ void mf_display_src(u32 word)
/*
* Display a single word SRC of the form "PROGXXXX" on the VSP control panel.
*/
void mf_display_progress(u16 value)
static __init void mf_display_progress_src(u16 value)
{
u8 ce[12];
u8 src[72];
Expand All @@ -649,30 +651,42 @@ void mf_display_progress(u16 value)
* Clear the VSP control panel. Used to "erase" an SRC that was
* previously displayed.
*/
void mf_clear_src(void)
static void mf_clear_src(void)
{
signal_ce_msg_simple(0x4b, NULL);
}

void __init mf_display_progress(u16 value)
{
if (piranha_simulator || !mf_initialized)
return;

if (0xFFFF == value)
mf_clear_src();
else
mf_display_progress_src(value);
}

/*
* Initialization code here.
*/
void mf_init(void)
void __init mf_init(void)
{
int i;

/* initialize */
spin_lock_init(&pending_event_spinlock);
for (i = 0;
i < sizeof(pending_event_prealloc) / sizeof(*pending_event_prealloc);
++i)

for (i = 0; i < PENDING_EVENT_PREALLOC_LEN; i++)
free_pending_event(&pending_event_prealloc[i]);

HvLpEvent_registerHandler(HvLpEvent_Type_MachineFac, &hv_handler);

/* virtual continue ack */
signal_ce_msg_simple(0x57, NULL);

/* initialization complete */
mf_initialized = 1;
mb();

printk(KERN_NOTICE "mf.c: iSeries Linux LPAR Machine Facilities "
"initialized\n");
}
Expand Down
11 changes: 1 addition & 10 deletions trunk/arch/powerpc/platforms/iseries/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ extern unsigned long embedded_sysmap_end;
extern unsigned long iSeries_recal_tb;
extern unsigned long iSeries_recal_titan;

static int mf_initialized;

static unsigned long cmd_mem_limit;

struct MemoryBlock {
Expand Down Expand Up @@ -347,8 +345,6 @@ static void __init iSeries_init_early(void)
HvCallEvent_setLpEventQueueInterruptProc(0, 0);

mf_init();
mf_initialized = 1;
mb();

/* If we were passed an initrd, set the ROOT_DEV properly if the values
* look sensible. If not, clear initrd reference.
Expand Down Expand Up @@ -585,12 +581,7 @@ static void iSeries_halt(void)
static void __init iSeries_progress(char * st, unsigned short code)
{
printk("Progress: [%04x] - %s\n", (unsigned)code, st);
if (!piranha_simulator && mf_initialized) {
if (code != 0xffff)
mf_display_progress(code);
else
mf_clear_src();
}
mf_display_progress(code);
}

static void __init iSeries_fixup_klimit(void)
Expand Down
1 change: 0 additions & 1 deletion trunk/include/asm-powerpc/iseries/mf.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ extern void mf_reboot(void);

extern void mf_display_src(u32 word);
extern void mf_display_progress(u16 value);
extern void mf_clear_src(void);

extern void mf_init(void);

Expand Down

0 comments on commit 4699f99

Please sign in to comment.