|
@@ -258,6 +258,16 @@
|
|
|
#define VAS_NX_UTIL_ADDER_OFFSET 0x180
|
|
|
#define VAS_NX_UTIL_ADDER PPC_BITMASK(32, 63)
|
|
|
|
|
|
+/*
|
|
|
+ * VREG(x):
|
|
|
+ * Expand a register's short name (eg: LPID) into two parameters:
|
|
|
+ * - the register's short name in string form ("LPID"), and
|
|
|
+ * - the name of the macro (eg: VAS_LPID_OFFSET), defining the
|
|
|
+ * register's offset in the window context
|
|
|
+ */
|
|
|
+#define VREG_SFX(n, s) __stringify(n), VAS_##n##s
|
|
|
+#define VREG(r) VREG_SFX(r, _OFFSET)
|
|
|
+
|
|
|
/*
|
|
|
* Local Notify Scope Control Register. (Receive windows only).
|
|
|
*/
|
|
@@ -385,43 +395,15 @@ struct vas_winctx {
|
|
|
|
|
|
extern struct vas_instance *find_vas_instance(int vasid);
|
|
|
|
|
|
-/*
|
|
|
- * VREG(x):
|
|
|
- * Expand a register's short name (eg: LPID) into two parameters:
|
|
|
- * - the register's short name in string form ("LPID"), and
|
|
|
- * - the name of the macro (eg: VAS_LPID_OFFSET), defining the
|
|
|
- * register's offset in the window context
|
|
|
- */
|
|
|
-#define VREG_SFX(n, s) __stringify(n), VAS_##n##s
|
|
|
-#define VREG(r) VREG_SFX(r, _OFFSET)
|
|
|
-
|
|
|
-#ifdef vas_debug
|
|
|
-static inline void dump_rx_win_attr(struct vas_rx_win_attr *attr)
|
|
|
-{
|
|
|
- pr_err("fault %d, notify %d, intr %d early %d\n",
|
|
|
- attr->fault_win, attr->notify_disable,
|
|
|
- attr->intr_disable, attr->notify_early);
|
|
|
-
|
|
|
- pr_err("rx_fifo_size %d, max value %d\n",
|
|
|
- attr->rx_fifo_size, VAS_RX_FIFO_SIZE_MAX);
|
|
|
-}
|
|
|
-
|
|
|
static inline void vas_log_write(struct vas_window *win, char *name,
|
|
|
void *regptr, u64 val)
|
|
|
{
|
|
|
if (val)
|
|
|
- pr_err("%swin #%d: %s reg %p, val 0x%016llx\n",
|
|
|
+ pr_debug("%swin #%d: %s reg %p, val 0x%016llx\n",
|
|
|
win->tx_win ? "Tx" : "Rx", win->winid, name,
|
|
|
regptr, val);
|
|
|
}
|
|
|
|
|
|
-#else /* vas_debug */
|
|
|
-
|
|
|
-#define vas_log_write(win, name, reg, val)
|
|
|
-#define dump_rx_win_attr(attr)
|
|
|
-
|
|
|
-#endif /* vas_debug */
|
|
|
-
|
|
|
static inline void write_uwc_reg(struct vas_window *win, char *name,
|
|
|
s32 reg, u64 val)
|
|
|
{
|
|
@@ -450,18 +432,4 @@ static inline u64 read_hvwc_reg(struct vas_window *win,
|
|
|
return in_be64(win->hvwc_map+reg);
|
|
|
}
|
|
|
|
|
|
-#ifdef vas_debug
|
|
|
-
|
|
|
-static void print_fifo_msg_count(struct vas_window *txwin)
|
|
|
-{
|
|
|
- uint64_t read_hvwc_reg(struct vas_window *w, char *n, uint64_t o);
|
|
|
- pr_devel("Winid %d, Msg count %llu\n", txwin->winid,
|
|
|
- (uint64_t)read_hvwc_reg(txwin, VREG(LRFIFO_PUSH)));
|
|
|
-}
|
|
|
-#else /* vas_debug */
|
|
|
-
|
|
|
-#define print_fifo_msg_count(window)
|
|
|
-
|
|
|
-#endif /* vas_debug */
|
|
|
-
|
|
|
#endif /* _VAS_H */
|