Commit ddb38ae6 authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman

staging: unisys: get rid of UltraLogEvent macro

Remove the UltraLogEvent macro from channel.h, and fix all references so
they call pr_info directly. CamelCase names used by functions that
called UltraLogEvent will be fixed in later patches.
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e2706697
...@@ -50,10 +50,6 @@ ...@@ -50,10 +50,6 @@
#define ULTRA_CHANNEL_PROTOCOL_SIGNATURE SIGNATURE_32('E', 'C', 'N', 'L') #define ULTRA_CHANNEL_PROTOCOL_SIGNATURE SIGNATURE_32('E', 'C', 'N', 'L')
#define UltraLogEvent(logCtx, EventId, Severity, SubsystemMask, pFunctionName, \
LineNumber, Str, args...) \
pr_info(Str, ## args)
typedef enum { typedef enum {
CHANNELSRV_UNINITIALIZED = 0, /* channel is in an undefined state */ CHANNELSRV_UNINITIALIZED = 0, /* channel is in an undefined state */
CHANNELSRV_READY = 1 /* channel has been initialized by server */ CHANNELSRV_READY = 1 /* channel has been initialized by server */
...@@ -122,19 +118,14 @@ ULTRA_CHANNELCLI_STRING(u32 v) ...@@ -122,19 +118,14 @@ ULTRA_CHANNELCLI_STRING(u32 v)
file, line) \ file, line) \
do { \ do { \
if (!ULTRA_VALID_CHANNELCLI_TRANSITION(old, new)) \ if (!ULTRA_VALID_CHANNELCLI_TRANSITION(old, new)) \
UltraLogEvent(logCtx, \ pr_info("%s Channel StateTransition INVALID! (%s) %s(%d)-->%s(%d) @%s:%d\n", \
CHANNELSTATE_DIAG_EVENTID_TRANSITERR, \ chanId, "CliState<x>", \
CHANNELSTATE_DIAG_SEVERITY, \ ULTRA_CHANNELCLI_STRING(old), \
CHANNELSTATE_DIAG_SUBSYS, \ old, \
__func__, __LINE__, \ ULTRA_CHANNELCLI_STRING(new), \
"%s Channel StateTransition INVALID! (%s) %s(%d)-->%s(%d) @%s:%d\n", \ new, \
chanId, "CliState<x>", \ PathName_Last_N_Nodes((u8 *)file, 4), \
ULTRA_CHANNELCLI_STRING(old), \ line); \
old, \
ULTRA_CHANNELCLI_STRING(new), \
new, \
PathName_Last_N_Nodes((u8 *)file, 4), \
line); \
} while (0) } while (0)
#define ULTRA_CHANNEL_CLIENT_TRANSITION(pChan, chanId, \ #define ULTRA_CHANNEL_CLIENT_TRANSITION(pChan, chanId, \
...@@ -145,20 +136,16 @@ ULTRA_CHANNELCLI_STRING(u32 v) ...@@ -145,20 +136,16 @@ ULTRA_CHANNELCLI_STRING(u32 v)
(pChan))->CliStateOS)), \ (pChan))->CliStateOS)), \
newstate, \ newstate, \
chanId, logCtx, __FILE__, __LINE__); \ chanId, logCtx, __FILE__, __LINE__); \
UltraLogEvent(logCtx, CHANNELSTATE_DIAG_EVENTID_TRANSITOK, \ pr_info("%s Channel StateTransition (%s) %s(%d)-->%s(%d) @%s:%d\n", \
CHANNELSTATE_DIAG_SEVERITY, \ chanId, "CliStateOS", \
CHANNELSTATE_DIAG_SUBSYS, \ ULTRA_CHANNELCLI_STRING( \
__func__, __LINE__, \
"%s Channel StateTransition (%s) %s(%d)-->%s(%d) @%s:%d\n", \
chanId, "CliStateOS", \
ULTRA_CHANNELCLI_STRING( \
readl(&((CHANNEL_HEADER __iomem *) \ readl(&((CHANNEL_HEADER __iomem *) \
(pChan))->CliStateOS)), \ (pChan))->CliStateOS)), \
readl(&((CHANNEL_HEADER __iomem *) \ readl(&((CHANNEL_HEADER __iomem *) \
(pChan))->CliStateOS), \ (pChan))->CliStateOS), \
ULTRA_CHANNELCLI_STRING(newstate), \ ULTRA_CHANNELCLI_STRING(newstate), \
newstate, \ newstate, \
PathName_Last_N_Nodes(__FILE__, 4), __LINE__); \ PathName_Last_N_Nodes(__FILE__, 4), __LINE__); \
writel(newstate, &((CHANNEL_HEADER __iomem *) \ writel(newstate, &((CHANNEL_HEADER __iomem *) \
(pChan))->CliStateOS); \ (pChan))->CliStateOS); \
mb(); /* required for channel synch */ \ mb(); /* required for channel synch */ \
...@@ -439,30 +426,22 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId, ...@@ -439,30 +426,22 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId,
&pChan->CliErrorOS); &pChan->CliErrorOS);
/* throttle until acquire successful */ /* throttle until acquire successful */
UltraLogEvent(logCtx, pr_info("%s Channel StateTransition INVALID! - acquire failed because OS client DISABLED @%s:%d\n",
CHANNELSTATE_DIAG_EVENTID_TRANSITERR, chanId, PathName_Last_N_Nodes((u8 *) file, 4),
CHANNELSTATE_DIAG_SEVERITY, line);
CHANNELSTATE_DIAG_SUBSYS, func, line,
"%s Channel StateTransition INVALID! - acquire failed because OS client DISABLED @%s:%d\n",
chanId, PathName_Last_N_Nodes(
(u8 *) file, 4), line);
} }
return 0; return 0;
} }
if ((readl(&pChan->CliStateOS) != CHANNELCLI_OWNED) if ((readl(&pChan->CliStateOS) != CHANNELCLI_OWNED)
&& (readl(&pChan->CliStateBoot) == CHANNELCLI_DISABLED)) { && (readl(&pChan->CliStateBoot) == CHANNELCLI_DISABLED)) {
/* Our competitor is DISABLED, so we can transition to OWNED */ /* Our competitor is DISABLED, so we can transition to OWNED */
UltraLogEvent(logCtx, CHANNELSTATE_DIAG_EVENTID_TRANSITOK, pr_info("%s Channel StateTransition (%s) %s(%d)-->%s(%d) @%s:%d\n",
CHANNELSTATE_DIAG_SEVERITY, chanId, "CliStateOS",
CHANNELSTATE_DIAG_SUBSYS, func, line, ULTRA_CHANNELCLI_STRING(readl(&pChan->CliStateOS)),
"%s Channel StateTransition (%s) %s(%d)-->%s(%d) @%s:%d\n", readl(&pChan->CliStateOS),
chanId, "CliStateOS", ULTRA_CHANNELCLI_STRING(CHANNELCLI_OWNED),
ULTRA_CHANNELCLI_STRING( CHANNELCLI_OWNED,
readl(&pChan->CliStateOS)), PathName_Last_N_Nodes((u8 *) file, 4), line);
readl(&pChan->CliStateOS),
ULTRA_CHANNELCLI_STRING(CHANNELCLI_OWNED),
CHANNELCLI_OWNED,
PathName_Last_N_Nodes((u8 *) file, 4), line);
writel(CHANNELCLI_OWNED, &pChan->CliStateOS); writel(CHANNELCLI_OWNED, &pChan->CliStateOS);
mb(); /* required for channel synch */ mb(); /* required for channel synch */
} }
...@@ -470,13 +449,9 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId, ...@@ -470,13 +449,9 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId,
if (readb(&pChan->CliErrorOS) != 0) { if (readb(&pChan->CliErrorOS) != 0) {
/* we are in an error msg throttling state; /* we are in an error msg throttling state;
* come out of it */ * come out of it */
UltraLogEvent(logCtx, pr_info("%s Channel OS client acquire now successful @%s:%d\n",
CHANNELSTATE_DIAG_EVENTID_TRANSITOK, chanId, PathName_Last_N_Nodes((u8 *) file, 4),
CHANNELSTATE_DIAG_SEVERITY, line);
CHANNELSTATE_DIAG_SUBSYS, func, line,
"%s Channel OS client acquire now successful @%s:%d\n",
chanId, PathName_Last_N_Nodes((u8 *) file,
4), line);
writeb(0, &pChan->CliErrorOS); writeb(0, &pChan->CliErrorOS);
} }
return 1; return 1;
...@@ -493,17 +468,12 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId, ...@@ -493,17 +468,12 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId,
ULTRA_CLIERROROS_THROTTLEMSG_NOTATTACHED, ULTRA_CLIERROROS_THROTTLEMSG_NOTATTACHED,
&pChan->CliErrorOS); &pChan->CliErrorOS);
/* throttle until acquire successful */ /* throttle until acquire successful */
UltraLogEvent(logCtx, pr_info("%s Channel StateTransition INVALID! - acquire failed because OS client NOT ATTACHED (state=%s(%d)) @%s:%d\n",
CHANNELSTATE_DIAG_EVENTID_TRANSITERR, chanId, ULTRA_CHANNELCLI_STRING(
CHANNELSTATE_DIAG_SEVERITY, readl(&pChan->CliStateOS)),
CHANNELSTATE_DIAG_SUBSYS, func, line, readl(&pChan->CliStateOS),
"%s Channel StateTransition INVALID! - acquire failed because OS client NOT ATTACHED (state=%s(%d)) @%s:%d\n", PathName_Last_N_Nodes((u8 *) file, 4),
chanId, line);
ULTRA_CHANNELCLI_STRING(
readl(&pChan->CliStateOS)),
readl(&pChan->CliStateOS),
PathName_Last_N_Nodes((u8 *) file, 4),
line);
} }
return 0; return 0;
} }
...@@ -517,13 +487,9 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId, ...@@ -517,13 +487,9 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId,
ULTRA_CLIERROROS_THROTTLEMSG_BUSY, ULTRA_CLIERROROS_THROTTLEMSG_BUSY,
&pChan->CliErrorOS); &pChan->CliErrorOS);
/* throttle until acquire successful */ /* throttle until acquire successful */
UltraLogEvent(logCtx, pr_info("%s Channel StateTransition failed - host OS acquire failed because boot BUSY @%s:%d\n",
CHANNELSTATE_DIAG_EVENTID_TRANSITBUSY, chanId, PathName_Last_N_Nodes((u8 *) file, 4),
CHANNELSTATE_DIAG_SEVERITY, line);
CHANNELSTATE_DIAG_SUBSYS, func, line,
"%s Channel StateTransition failed - host OS acquire failed because boot BUSY @%s:%d\n",
chanId, PathName_Last_N_Nodes((u8 *) file,
4), line);
} }
/* reset busy */ /* reset busy */
writel(CHANNELCLI_ATTACHED, &pChan->CliStateOS); writel(CHANNELCLI_ATTACHED, &pChan->CliStateOS);
...@@ -532,12 +498,9 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId, ...@@ -532,12 +498,9 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId,
} }
if (readb(&pChan->CliErrorOS) != 0) { if (readb(&pChan->CliErrorOS) != 0) {
/* we are in an error msg throttling state; come out of it */ /* we are in an error msg throttling state; come out of it */
UltraLogEvent(logCtx, CHANNELSTATE_DIAG_EVENTID_TRANSITOK, pr_info("%s Channel OS client acquire now successful @%s:%d\n",
CHANNELSTATE_DIAG_SEVERITY, chanId, PathName_Last_N_Nodes((u8 *) file, 4),
CHANNELSTATE_DIAG_SUBSYS, func, line, line);
"%s Channel OS client acquire now successful @%s:%d\n",
chanId, PathName_Last_N_Nodes((u8 *) file, 4),
line);
writeb(0, &pChan->CliErrorOS); writeb(0, &pChan->CliErrorOS);
} }
return 1; return 1;
...@@ -551,26 +514,19 @@ ULTRA_channel_client_release_os(void __iomem *pChannel, u8 *chanId, ...@@ -551,26 +514,19 @@ ULTRA_channel_client_release_os(void __iomem *pChannel, u8 *chanId,
if (readb(&pChan->CliErrorOS) != 0) { if (readb(&pChan->CliErrorOS) != 0) {
/* we are in an error msg throttling state; come out of it */ /* we are in an error msg throttling state; come out of it */
UltraLogEvent(logCtx, CHANNELSTATE_DIAG_EVENTID_TRANSITOK, pr_info("%s Channel OS client error state cleared @%s:%d\n",
CHANNELSTATE_DIAG_SEVERITY, chanId, PathName_Last_N_Nodes((u8 *) file, 4),
CHANNELSTATE_DIAG_SUBSYS, func, line, line);
"%s Channel OS client error state cleared @%s:%d\n",
chanId, PathName_Last_N_Nodes((u8 *) file, 4),
line);
writeb(0, &pChan->CliErrorOS); writeb(0, &pChan->CliErrorOS);
} }
if (readl(&pChan->CliStateOS) == CHANNELCLI_OWNED) if (readl(&pChan->CliStateOS) == CHANNELCLI_OWNED)
return; return;
if (readl(&pChan->CliStateOS) != CHANNELCLI_BUSY) { if (readl(&pChan->CliStateOS) != CHANNELCLI_BUSY) {
UltraLogEvent(logCtx, CHANNELSTATE_DIAG_EVENTID_TRANSITERR, pr_info("%s Channel StateTransition INVALID! - release failed because OS client NOT BUSY (state=%s(%d)) @%s:%d\n",
CHANNELSTATE_DIAG_SEVERITY, chanId, ULTRA_CHANNELCLI_STRING(
CHANNELSTATE_DIAG_SUBSYS, func, line, readl(&pChan->CliStateOS)),
"%s Channel StateTransition INVALID! - release failed because OS client NOT BUSY (state=%s(%d)) @%s:%d\n", readl(&pChan->CliStateOS),
chanId, PathName_Last_N_Nodes((u8 *) file, 4), line);
ULTRA_CHANNELCLI_STRING(
readl(&pChan->CliStateOS)),
readl(&pChan->CliStateOS),
PathName_Last_N_Nodes((u8 *) file, 4), line);
/* return; */ /* return; */
} }
writel(CHANNELCLI_ATTACHED, &pChan->CliStateOS); /* release busy */ writel(CHANNELCLI_ATTACHED, &pChan->CliStateOS); /* release busy */
......
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