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,12 +118,7 @@ ULTRA_CHANNELCLI_STRING(u32 v) ...@@ -122,12 +118,7 @@ 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, \
CHANNELSTATE_DIAG_SEVERITY, \
CHANNELSTATE_DIAG_SUBSYS, \
__func__, __LINE__, \
"%s Channel StateTransition INVALID! (%s) %s(%d)-->%s(%d) @%s:%d\n", \
chanId, "CliState<x>", \ chanId, "CliState<x>", \
ULTRA_CHANNELCLI_STRING(old), \ ULTRA_CHANNELCLI_STRING(old), \
old, \ old, \
...@@ -145,11 +136,7 @@ ULTRA_CHANNELCLI_STRING(u32 v) ...@@ -145,11 +136,7 @@ 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, \
CHANNELSTATE_DIAG_SUBSYS, \
__func__, __LINE__, \
"%s Channel StateTransition (%s) %s(%d)-->%s(%d) @%s:%d\n", \
chanId, "CliStateOS", \ chanId, "CliStateOS", \
ULTRA_CHANNELCLI_STRING( \ ULTRA_CHANNELCLI_STRING( \
readl(&((CHANNEL_HEADER __iomem *) \ readl(&((CHANNEL_HEADER __iomem *) \
...@@ -439,26 +426,18 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId, ...@@ -439,26 +426,18 @@ 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,
CHANNELSTATE_DIAG_SUBSYS, func, line,
"%s Channel StateTransition (%s) %s(%d)-->%s(%d) @%s:%d\n",
chanId, "CliStateOS", chanId, "CliStateOS",
ULTRA_CHANNELCLI_STRING( ULTRA_CHANNELCLI_STRING(readl(&pChan->CliStateOS)),
readl(&pChan->CliStateOS)),
readl(&pChan->CliStateOS), readl(&pChan->CliStateOS),
ULTRA_CHANNELCLI_STRING(CHANNELCLI_OWNED), ULTRA_CHANNELCLI_STRING(CHANNELCLI_OWNED),
CHANNELCLI_OWNED, CHANNELCLI_OWNED,
...@@ -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,13 +468,8 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId, ...@@ -493,13 +468,8 @@ 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,
CHANNELSTATE_DIAG_SUBSYS, func, line,
"%s Channel StateTransition INVALID! - acquire failed because OS client NOT ATTACHED (state=%s(%d)) @%s:%d\n",
chanId,
ULTRA_CHANNELCLI_STRING(
readl(&pChan->CliStateOS)), readl(&pChan->CliStateOS)),
readl(&pChan->CliStateOS), readl(&pChan->CliStateOS),
PathName_Last_N_Nodes((u8 *) file, 4), PathName_Last_N_Nodes((u8 *) file, 4),
...@@ -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,10 +498,7 @@ ULTRA_channel_client_acquire_os(void __iomem *pChannel, u8 *chanId, ...@@ -532,10 +498,7 @@ 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,
CHANNELSTATE_DIAG_SUBSYS, func, line,
"%s Channel OS client acquire now successful @%s:%d\n",
chanId, PathName_Last_N_Nodes((u8 *) file, 4), chanId, PathName_Last_N_Nodes((u8 *) file, 4),
line); line);
writeb(0, &pChan->CliErrorOS); writeb(0, &pChan->CliErrorOS);
...@@ -551,10 +514,7 @@ ULTRA_channel_client_release_os(void __iomem *pChannel, u8 *chanId, ...@@ -551,10 +514,7 @@ 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,
CHANNELSTATE_DIAG_SUBSYS, func, line,
"%s Channel OS client error state cleared @%s:%d\n",
chanId, PathName_Last_N_Nodes((u8 *) file, 4), chanId, PathName_Last_N_Nodes((u8 *) file, 4),
line); line);
writeb(0, &pChan->CliErrorOS); writeb(0, &pChan->CliErrorOS);
...@@ -562,12 +522,8 @@ ULTRA_channel_client_release_os(void __iomem *pChannel, u8 *chanId, ...@@ -562,12 +522,8 @@ ULTRA_channel_client_release_os(void __iomem *pChannel, u8 *chanId,
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,
"%s Channel StateTransition INVALID! - release failed because OS client NOT BUSY (state=%s(%d)) @%s:%d\n",
chanId,
ULTRA_CHANNELCLI_STRING(
readl(&pChan->CliStateOS)), readl(&pChan->CliStateOS)),
readl(&pChan->CliStateOS), readl(&pChan->CliStateOS),
PathName_Last_N_Nodes((u8 *) file, 4), line); PathName_Last_N_Nodes((u8 *) file, 4), line);
......
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