Commit df15a53b authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds

[PATCH] ppc64: iSeries remove some Studly Caps

This patch changes the externally referenced names in mf.c to not use Study
Caps and removes a couple of no longer used functions.
Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b2ee5283
...@@ -309,7 +309,7 @@ void __init iSeries_pci_final_fixup(void) ...@@ -309,7 +309,7 @@ void __init iSeries_pci_final_fixup(void)
PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup Entry.\n"); PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup Entry.\n");
/* Fix up at the device node and pci_dev relationship */ /* Fix up at the device node and pci_dev relationship */
mf_displaySrc(0xC9000100); mf_display_src(0xC9000100);
printk("pcibios_final_fixup\n"); printk("pcibios_final_fixup\n");
for_each_pci_dev(pdev) { for_each_pci_dev(pdev) {
...@@ -335,7 +335,7 @@ void __init iSeries_pci_final_fixup(void) ...@@ -335,7 +335,7 @@ void __init iSeries_pci_final_fixup(void)
pdev->irq = node->Irq; pdev->irq = node->Irq;
} }
iSeries_activate_IRQs(); iSeries_activate_IRQs();
mf_displaySrc(0xC9000200); mf_display_src(0xC9000200);
} }
void pcibios_fixup_bus(struct pci_bus *PciBus) void pcibios_fixup_bus(struct pci_bus *PciBus)
...@@ -677,7 +677,7 @@ static int CheckReturnCode(char *TextHdr, struct iSeries_Device_Node *DevNode, ...@@ -677,7 +677,7 @@ static int CheckReturnCode(char *TextHdr, struct iSeries_Device_Node *DevNode,
*/ */
if ((DevNode->IoRetry > Pci_Retry_Max) && if ((DevNode->IoRetry > Pci_Retry_Max) &&
(Pci_Error_Flag > 0)) { (Pci_Error_Flag > 0)) {
mf_displaySrc(0xB6000103); mf_display_src(0xB6000103);
panic_timeout = 0; panic_timeout = 0;
panic("PCI: Hardware I/O Error, SRC B6000103, " panic("PCI: Hardware I/O Error, SRC B6000103, "
"Automatic Reboot Disabled.\n"); "Automatic Reboot Disabled.\n");
......
...@@ -732,7 +732,7 @@ void iSeries_restart(char *cmd) ...@@ -732,7 +732,7 @@ void iSeries_restart(char *cmd)
*/ */
void iSeries_power_off(void) void iSeries_power_off(void)
{ {
mf_powerOff(); mf_power_off();
} }
/* /*
...@@ -740,7 +740,7 @@ void iSeries_power_off(void) ...@@ -740,7 +740,7 @@ void iSeries_power_off(void)
*/ */
void iSeries_halt(void) void iSeries_halt(void)
{ {
mf_powerOff(); mf_power_off();
} }
/* JDH Hack */ /* JDH Hack */
...@@ -796,9 +796,9 @@ void __init iSeries_progress(char * st, unsigned short code) ...@@ -796,9 +796,9 @@ void __init iSeries_progress(char * st, unsigned short code)
printk("Progress: [%04x] - %s\n", (unsigned)code, st); printk("Progress: [%04x] - %s\n", (unsigned)code, st);
if (!piranha_simulator && mf_initialized) { if (!piranha_simulator && mf_initialized) {
if (code != 0xffff) if (code != 0xffff)
mf_displayProgress(code); mf_display_progress(code);
else else
mf_clearSrc(); mf_clear_src();
} }
} }
......
...@@ -357,7 +357,7 @@ static int shutdown(void) ...@@ -357,7 +357,7 @@ static int shutdown(void)
if (rc) { if (rc) {
printk(KERN_ALERT "mf.c: SIGINT to init failed (%d), " printk(KERN_ALERT "mf.c: SIGINT to init failed (%d), "
"hard shutdown commencing\n", rc); "hard shutdown commencing\n", rc);
mf_powerOff(); mf_power_off();
} else } else
printk(KERN_INFO "mf.c: init has been successfully notified " printk(KERN_INFO "mf.c: init has been successfully notified "
"to proceed with shutdown\n"); "to proceed with shutdown\n");
...@@ -533,7 +533,7 @@ static void hvHandler(struct HvLpEvent *event, struct pt_regs *regs) ...@@ -533,7 +533,7 @@ static void hvHandler(struct HvLpEvent *event, struct pt_regs *regs)
* Global kernel interface to allocate and seed events into the * Global kernel interface to allocate and seed events into the
* Hypervisor. * Hypervisor.
*/ */
void mf_allocateLpEvents(HvLpIndex targetLp, HvLpEvent_Type type, void mf_allocate_lp_events(HvLpIndex targetLp, HvLpEvent_Type type,
unsigned size, unsigned count, MFCompleteHandler hdlr, unsigned size, unsigned count, MFCompleteHandler hdlr,
void *userToken) void *userToken)
{ {
...@@ -560,13 +560,13 @@ void mf_allocateLpEvents(HvLpIndex targetLp, HvLpEvent_Type type, ...@@ -560,13 +560,13 @@ void mf_allocateLpEvents(HvLpIndex targetLp, HvLpEvent_Type type,
if ((rc != 0) && (hdlr != NULL)) if ((rc != 0) && (hdlr != NULL))
(*hdlr)(userToken, rc); (*hdlr)(userToken, rc);
} }
EXPORT_SYMBOL(mf_allocateLpEvents); EXPORT_SYMBOL(mf_allocate_lp_events);
/* /*
* Global kernel interface to unseed and deallocate events already in * Global kernel interface to unseed and deallocate events already in
* Hypervisor. * Hypervisor.
*/ */
void mf_deallocateLpEvents(HvLpIndex targetLp, HvLpEvent_Type type, void mf_deallocate_lp_events(HvLpIndex targetLp, HvLpEvent_Type type,
unsigned count, MFCompleteHandler hdlr, void *userToken) unsigned count, MFCompleteHandler hdlr, void *userToken)
{ {
struct pending_event *ev = new_pending_event(); struct pending_event *ev = new_pending_event();
...@@ -591,13 +591,13 @@ void mf_deallocateLpEvents(HvLpIndex targetLp, HvLpEvent_Type type, ...@@ -591,13 +591,13 @@ void mf_deallocateLpEvents(HvLpIndex targetLp, HvLpEvent_Type type,
if ((rc != 0) && (hdlr != NULL)) if ((rc != 0) && (hdlr != NULL))
(*hdlr)(userToken, rc); (*hdlr)(userToken, rc);
} }
EXPORT_SYMBOL(mf_deallocateLpEvents); EXPORT_SYMBOL(mf_deallocate_lp_events);
/* /*
* Global kernel interface to tell the VSP object in the primary * Global kernel interface to tell the VSP object in the primary
* partition to power this partition off. * partition to power this partition off.
*/ */
void mf_powerOff(void) void mf_power_off(void)
{ {
printk(KERN_INFO "mf.c: Down it goes...\n"); printk(KERN_INFO "mf.c: Down it goes...\n");
signal_ce_msg("\x00\x00\x00\x4D\x00\x00\x00\x00\x00\x00\x00\x00", NULL); signal_ce_msg("\x00\x00\x00\x4D\x00\x00\x00\x00\x00\x00\x00\x00", NULL);
...@@ -618,7 +618,7 @@ void mf_reboot(void) ...@@ -618,7 +618,7 @@ void mf_reboot(void)
/* /*
* Display a single word SRC onto the VSP control panel. * Display a single word SRC onto the VSP control panel.
*/ */
void mf_displaySrc(u32 word) void mf_display_src(u32 word)
{ {
u8 ce[12]; u8 ce[12];
...@@ -633,7 +633,7 @@ void mf_displaySrc(u32 word) ...@@ -633,7 +633,7 @@ void mf_displaySrc(u32 word)
/* /*
* Display a single word SRC of the form "PROGXXXX" on the VSP control panel. * Display a single word SRC of the form "PROGXXXX" on the VSP control panel.
*/ */
void mf_displayProgress(u16 value) void mf_display_progress(u16 value)
{ {
u8 ce[12]; u8 ce[12];
u8 src[72]; u8 src[72];
...@@ -657,7 +657,7 @@ void mf_displayProgress(u16 value) ...@@ -657,7 +657,7 @@ void mf_displayProgress(u16 value)
* Clear the VSP control panel. Used to "erase" an SRC that was * Clear the VSP control panel. Used to "erase" an SRC that was
* previously displayed. * previously displayed.
*/ */
void mf_clearSrc(void) void mf_clear_src(void)
{ {
signal_ce_msg("\x00\x00\x00\x4B\x00\x00\x00\x00\x00\x00\x00\x00", NULL); signal_ce_msg("\x00\x00\x00\x4B\x00\x00\x00\x00\x00\x00\x00\x00", NULL);
} }
...@@ -909,15 +909,6 @@ int mf_getVmlinuxChunk(char *buffer, int *size, int offset, u64 side) ...@@ -909,15 +909,6 @@ int mf_getVmlinuxChunk(char *buffer, int *size, int offset, u64 side)
return rc; return rc;
} }
int mf_setRtcTime(unsigned long time)
{
struct rtc_time tm;
to_tm(time, &tm);
return mf_setRtc(&tm);
}
struct RtcTimeData { struct RtcTimeData {
struct completion com; struct completion com;
struct CeMsgData xCeMsg; struct CeMsgData xCeMsg;
...@@ -933,47 +924,7 @@ void getRtcTimeComplete(void * token, struct CeMsgData *ceMsg) ...@@ -933,47 +924,7 @@ void getRtcTimeComplete(void * token, struct CeMsgData *ceMsg)
complete(&rtc->com); complete(&rtc->com);
} }
static unsigned long lastsec = 1; int mf_get_rtc(struct rtc_time *tm)
int mf_getRtcTime(unsigned long *time)
{
u32 dataWord1 = *((u32 *)(&xSpCommArea.xBcdTimeAtIplStart));
u32 dataWord2 = *(((u32 *)&(xSpCommArea.xBcdTimeAtIplStart)) + 1);
int year = 1970;
int year1 = (dataWord1 >> 24) & 0x000000FF;
int year2 = (dataWord1 >> 16) & 0x000000FF;
int sec = (dataWord1 >> 8) & 0x000000FF;
int min = dataWord1 & 0x000000FF;
int hour = (dataWord2 >> 24) & 0x000000FF;
int day = (dataWord2 >> 8) & 0x000000FF;
int mon = dataWord2 & 0x000000FF;
BCD_TO_BIN(sec);
BCD_TO_BIN(min);
BCD_TO_BIN(hour);
BCD_TO_BIN(day);
BCD_TO_BIN(mon);
BCD_TO_BIN(year1);
BCD_TO_BIN(year2);
year = year1 * 100 + year2;
*time = mktime(year, mon, day, hour, min, sec);
*time += (jiffies / HZ);
/*
* Now THIS is a nasty hack!
* It ensures that the first two calls to mf_getRtcTime get different
* answers. That way the loop in init_time (time.c) will not think
* the clock is stuck.
*/
if (lastsec) {
*time -= lastsec;
--lastsec;
}
return 0;
}
int mf_getRtc(struct rtc_time *tm)
{ {
struct CeMsgCompleteData ceComplete; struct CeMsgCompleteData ceComplete;
struct RtcTimeData rtcData; struct RtcTimeData rtcData;
...@@ -999,7 +950,7 @@ int mf_getRtc(struct rtc_time *tm) ...@@ -999,7 +950,7 @@ int mf_getRtc(struct rtc_time *tm)
tm->tm_mday = 10; tm->tm_mday = 10;
tm->tm_mon = 8; tm->tm_mon = 8;
tm->tm_year = 71; tm->tm_year = 71;
mf_setRtc(tm); mf_set_rtc(tm);
} }
{ {
u32 dataWord1 = *((u32 *)(rtcData.xCeMsg.ce_msg+4)); u32 dataWord1 = *((u32 *)(rtcData.xCeMsg.ce_msg+4));
...@@ -1046,7 +997,7 @@ int mf_getRtc(struct rtc_time *tm) ...@@ -1046,7 +997,7 @@ int mf_getRtc(struct rtc_time *tm)
return rc; return rc;
} }
int mf_setRtc(struct rtc_time * tm) int mf_set_rtc(struct rtc_time * tm)
{ {
char ceTime[12] = "\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00"; char ceTime[12] = "\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00";
u8 day, mon, hour, min, sec, y1, y2; u8 day, mon, hour, min, sec, y1, y2;
...@@ -1210,9 +1161,9 @@ static int proc_mf_change_src(struct file *file, const char __user *buffer, ...@@ -1210,9 +1161,9 @@ static int proc_mf_change_src(struct file *file, const char __user *buffer,
return -EFAULT; return -EFAULT;
if ((count == 1) && (*stkbuf == '\0')) if ((count == 1) && (*stkbuf == '\0'))
mf_clearSrc(); mf_clear_src();
else else
mf_displaySrc(*(u32 *)stkbuf); mf_display_src(*(u32 *)stkbuf);
return count; return count;
} }
......
...@@ -275,7 +275,7 @@ void iSeries_get_rtc_time(struct rtc_time *rtc_tm) ...@@ -275,7 +275,7 @@ void iSeries_get_rtc_time(struct rtc_time *rtc_tm)
if (piranha_simulator) if (piranha_simulator)
return; return;
mf_getRtc(rtc_tm); mf_get_rtc(rtc_tm);
rtc_tm->tm_mon--; rtc_tm->tm_mon--;
} }
...@@ -285,7 +285,7 @@ void iSeries_get_rtc_time(struct rtc_time *rtc_tm) ...@@ -285,7 +285,7 @@ void iSeries_get_rtc_time(struct rtc_time *rtc_tm)
*/ */
int iSeries_set_rtc_time(struct rtc_time *tm) int iSeries_set_rtc_time(struct rtc_time *tm)
{ {
mf_setRtc(tm); mf_set_rtc(tm);
return 0; return 0;
} }
......
...@@ -473,7 +473,7 @@ static int allocateEvents(HvLpIndex remoteLp, int numEvents) ...@@ -473,7 +473,7 @@ static int allocateEvents(HvLpIndex remoteLp, int numEvents)
parms.used_wait_atomic = 0; parms.used_wait_atomic = 0;
parms.sem = &Semaphore; parms.sem = &Semaphore;
} }
mf_allocateLpEvents(remoteLp, HvLpEvent_Type_VirtualIo, 250, /* It would be nice to put a real number here! */ mf_allocate_lp_events(remoteLp, HvLpEvent_Type_VirtualIo, 250, /* It would be nice to put a real number here! */
numEvents, &viopath_donealloc, &parms); numEvents, &viopath_donealloc, &parms);
if (in_atomic()) { if (in_atomic()) {
while (atomic_read(&wait_atomic)) while (atomic_read(&wait_atomic))
...@@ -582,7 +582,7 @@ int viopath_close(HvLpIndex remoteLp, int subtype, int numReq) ...@@ -582,7 +582,7 @@ int viopath_close(HvLpIndex remoteLp, int subtype, int numReq)
doneAllocParms.used_wait_atomic = 0; doneAllocParms.used_wait_atomic = 0;
doneAllocParms.sem = &Semaphore; doneAllocParms.sem = &Semaphore;
mf_deallocateLpEvents(remoteLp, HvLpEvent_Type_VirtualIo, mf_deallocate_lp_events(remoteLp, HvLpEvent_Type_VirtualIo,
numReq, &viopath_donealloc, &doneAllocParms); numReq, &viopath_donealloc, &doneAllocParms);
down(&Semaphore); down(&Semaphore);
......
...@@ -248,7 +248,7 @@ static int veth_allocate_events(HvLpIndex rlp, int number) ...@@ -248,7 +248,7 @@ static int veth_allocate_events(HvLpIndex rlp, int number)
{ {
struct veth_allocation vc = { COMPLETION_INITIALIZER(vc.c), 0 }; struct veth_allocation vc = { COMPLETION_INITIALIZER(vc.c), 0 };
mf_allocateLpEvents(rlp, HvLpEvent_Type_VirtualLan, mf_allocate_lp_events(rlp, HvLpEvent_Type_VirtualLan,
sizeof(struct VethLpEvent), number, sizeof(struct VethLpEvent), number,
&veth_complete_allocation, &vc); &veth_complete_allocation, &vc);
wait_for_completion(&vc.c); wait_for_completion(&vc.c);
...@@ -662,12 +662,12 @@ static void veth_destroy_connection(u8 rlp) ...@@ -662,12 +662,12 @@ static void veth_destroy_connection(u8 rlp)
del_timer_sync(&cnx->ack_timer); del_timer_sync(&cnx->ack_timer);
if (cnx->num_events > 0) if (cnx->num_events > 0)
mf_deallocateLpEvents(cnx->remote_lp, mf_deallocate_lp_events(cnx->remote_lp,
HvLpEvent_Type_VirtualLan, HvLpEvent_Type_VirtualLan,
cnx->num_events, cnx->num_events,
NULL, NULL); NULL, NULL);
if (cnx->num_ack_events > 0) if (cnx->num_ack_events > 0)
mf_deallocateLpEvents(cnx->remote_lp, mf_deallocate_lp_events(cnx->remote_lp,
HvLpEvent_Type_VirtualLan, HvLpEvent_Type_VirtualLan,
cnx->num_ack_events, cnx->num_ack_events,
NULL, NULL); NULL, NULL);
......
/* /*
* mf.h * mf.h
* Copyright (C) 2001 Troy D. Armstrong IBM Corporation * Copyright (C) 2001 Troy D. Armstrong IBM Corporation
* Copyright (C) 2004 Stephen Rothwell IBM Corporation
* *
* This modules exists as an interface between a Linux secondary partition * This modules exists as an interface between a Linux secondary partition
* running on an iSeries and the primary partition's Virtual Service * running on an iSeries and the primary partition's Virtual Service
...@@ -35,18 +36,18 @@ struct rtc_time; ...@@ -35,18 +36,18 @@ struct rtc_time;
typedef void (*MFCompleteHandler)(void *clientToken, int returnCode); typedef void (*MFCompleteHandler)(void *clientToken, int returnCode);
extern void mf_allocateLpEvents(HvLpIndex targetLp, HvLpEvent_Type type, extern void mf_allocate_lp_events(HvLpIndex targetLp, HvLpEvent_Type type,
unsigned size, unsigned amount, MFCompleteHandler hdlr, unsigned size, unsigned amount, MFCompleteHandler hdlr,
void *userToken); void *userToken);
extern void mf_deallocateLpEvents(HvLpIndex targetLp, HvLpEvent_Type type, extern void mf_deallocate_lp_events(HvLpIndex targetLp, HvLpEvent_Type type,
unsigned count, MFCompleteHandler hdlr, void *userToken); unsigned count, MFCompleteHandler hdlr, void *userToken);
extern void mf_powerOff(void); extern void mf_power_off(void);
extern void mf_reboot(void); extern void mf_reboot(void);
extern void mf_displaySrc(u32 word); extern void mf_display_src(u32 word);
extern void mf_displayProgress(u16 value); extern void mf_display_progress(u16 value);
extern void mf_clearSrc(void); extern void mf_clear_src(void);
extern void mf_init(void); extern void mf_init(void);
...@@ -62,9 +63,7 @@ extern int mf_setVmlinuxChunk(const char *buffer, int size, int offset, ...@@ -62,9 +63,7 @@ extern int mf_setVmlinuxChunk(const char *buffer, int size, int offset,
u64 side); u64 side);
extern int mf_getVmlinuxChunk(char *buffer, int *size, int offset, u64 side); extern int mf_getVmlinuxChunk(char *buffer, int *size, int offset, u64 side);
extern int mf_setRtcTime(unsigned long time); extern int mf_get_rtc(struct rtc_time *tm);
extern int mf_getRtcTime(unsigned long *time); extern int mf_set_rtc(struct rtc_time *tm);
extern int mf_getRtc( struct rtc_time * tm );
extern int mf_setRtc( struct rtc_time * tm );
#endif /* MF_H_INCLUDED */ #endif /* MF_H_INCLUDED */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment