From 7dcf7dcbd857a230d329e49dc7e64d6f471ffe44 Mon Sep 17 00:00:00 2001 From: visa Date: Sun, 30 Apr 2017 04:32:58 +0000 Subject: [PATCH] Remove unused POW status functions. Makes clang happier. --- sys/arch/octeon/dev/cn30xxpow.c | 90 +--------------------------- sys/arch/octeon/dev/cn30xxpowvar.h | 96 +----------------------------- 2 files changed, 2 insertions(+), 184 deletions(-) diff --git a/sys/arch/octeon/dev/cn30xxpow.c b/sys/arch/octeon/dev/cn30xxpow.c index 6f5fd3e1959..11fd9c3c17b 100644 --- a/sys/arch/octeon/dev/cn30xxpow.c +++ b/sys/arch/octeon/dev/cn30xxpow.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cn30xxpow.c,v 1.8 2016/07/10 10:18:58 visa Exp $ */ +/* $OpenBSD: cn30xxpow.c,v 1.9 2017/04/30 04:32:58 visa Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -144,94 +144,6 @@ cn30xxpow_work_response_async(uint64_t scraddr) result & POW_IOBDMA_GET_WORK_RESULT_ADDR, CCA_CACHED); } -/* ---- status by coreid */ - -static inline uint64_t -cn30xxpow_status_by_coreid_pend_tag(int coreid) -{ - return cn30xxpow_ops_pow_status(coreid, 0, 0, 0); -} - -static inline uint64_t -cn30xxpow_status_by_coreid_pend_wqp(int coreid) -{ - return cn30xxpow_ops_pow_status(coreid, 0, 0, 1); -} - -static inline uint64_t -cn30xxpow_status_by_coreid_cur_tag_next(int coreid) -{ - return cn30xxpow_ops_pow_status(coreid, 0, 1, 0); -} - -static inline uint64_t -cn30xxpow_status_by_coreid_cur_tag_prev(int coreid) -{ - return cn30xxpow_ops_pow_status(coreid, 1, 1, 0); -} - -static inline uint64_t -cn30xxpow_status_by_coreid_cur_wqp_next(int coreid) -{ - return cn30xxpow_ops_pow_status(coreid, 0, 1, 1); -} - -static inline uint64_t -cn30xxpow_status_by_coreid_cur_wqp_prev(int coreid) -{ - return cn30xxpow_ops_pow_status(coreid, 1, 1, 1); -} - -/* ---- status by index */ - -static inline uint64_t -cn30xxpow_status_by_index_tag(int index) -{ - return cn30xxpow_ops_pow_memory(index, 0, 0); -} - -static inline uint64_t -cn30xxpow_status_by_index_wqp(int index) -{ - return cn30xxpow_ops_pow_memory(index, 0, 1); -} - -static inline uint64_t -cn30xxpow_status_by_index_desched(int index) -{ - return cn30xxpow_ops_pow_memory(index, 1, 0); -} - -/* ---- status by qos level */ - -static inline uint64_t -cn30xxpow_status_by_qos_free_loc(int qos) -{ - return cn30xxpow_ops_pow_idxptr(qos, 0, 0); -} - -/* ---- status by desched group */ - -static inline uint64_t -cn30xxpow_status_by_grp_nosched_des(int grp) -{ - return cn30xxpow_ops_pow_idxptr(grp, 0, 1); -} - -/* ---- status by memory input queue */ - -static inline uint64_t -cn30xxpow_status_by_queue_remote_head(int queue) -{ - return cn30xxpow_ops_pow_idxptr(queue, 1, 0); -} - -static inline uint64_t -cn30xxpow_status_by_queue_remote_tail(int queue) -{ - return cn30xxpow_ops_pow_idxptr(queue, 1, 0); -} - /* ---- tag switch */ /* diff --git a/sys/arch/octeon/dev/cn30xxpowvar.h b/sys/arch/octeon/dev/cn30xxpowvar.h index 416b343ad05..bf30f4b05d4 100644 --- a/sys/arch/octeon/dev/cn30xxpowvar.h +++ b/sys/arch/octeon/dev/cn30xxpowvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cn30xxpowvar.h,v 1.2 2014/08/11 18:29:56 miod Exp $ */ +/* $OpenBSD: cn30xxpowvar.h,v 1.3 2017/04/30 04:32:58 visa Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -105,100 +105,6 @@ cn30xxpow_ops_get_work_load( return octeon_xkphys_read_8(ptr); } -/* POW Status Loads */ - -/* - * a) get_cur == 0, get_wqp == 0 (pend_tag) - * b) get_cur == 0, get_wqp == 1 (pend_wqp) - * c) get_cur == 1, get_wqp == 0, get_rev == 0 (cur_tag_next) - * d) get_cur == 1, get_wqp == 0, get_rev == 1 (cur_tag_prev) - * e) get_cur == 1, get_wqp == 1, get_rev == 0 (cur_wqp_next) - * f) get_cur == 1, get_wqp == 1, get_rev == 1 (cur_wqp_prev) - */ - -static inline uint64_t -cn30xxpow_ops_pow_status( - int coreid, /* 0-15 */ - int get_rev, /* 0-1 */ - int get_cur, /* 0-1 */ - int get_wqp) /* 0-1 */ -{ - uint64_t ptr = - POW_OPERATION_BASE_IO_BIT | - __BITS64_SET(POW_OPERATION_BASE_MAJOR_DID, 0x0c) | - __BITS64_SET(POW_OPERATION_BASE_SUB_DID, 0x01) | - __BITS64_SET(POW_STATUS_LOAD_COREID, coreid) | - __BITS64_SET(POW_STATUS_LOAD_GET_REV, get_rev) | - __BITS64_SET(POW_STATUS_LOAD_GET_CUR, get_cur) | - __BITS64_SET(POW_STATUS_LOAD_GET_WQP, get_wqp); - - return octeon_xkphys_read_8(ptr); -} - -/* POW Memory Loads */ - -/* - * a) get_des == 0, get_wqp == 0 (tag) - * b) get_des == 0, get_wqp == 1 (wqe) - * c) get_des == 1 (desched) - */ - -static inline uint64_t -cn30xxpow_ops_pow_memory( - int index, /* 0-2047 */ - int get_des, /* 0-1 */ - int get_wqp) /* 0-1 */ -{ - uint64_t ptr = - POW_OPERATION_BASE_IO_BIT | - __BITS64_SET(POW_OPERATION_BASE_MAJOR_DID, 0x0c) | - __BITS64_SET(POW_OPERATION_BASE_SUB_DID, 0x02) | - __BITS64_SET(POW_MEMORY_LOAD_INDEX, index) | - __BITS64_SET(POW_MEMORY_LOAD_GET_DES, get_des) | - __BITS64_SET(POW_MEMORY_LOAD_GET_WQP, get_wqp); - - return octeon_xkphys_read_8(ptr); -} - -/* POW Index/Pointer Loads */ - -/* - * a) get_rmt == 0, get_des_get_tail == 0 - * b) get_rmt == 0, get_des_get_tail == 1 - * c) get_rmt == 1, get_des_get_tail == 0 - * d) get_rmt == 1, get_des_get_tail == 1 - */ - -static inline uint64_t -cn30xxpow_ops_pow_idxptr( - int qosgrp, /* 0-7 */ - int get_des_get_tail, /* 0-1 */ - int get_rmt) /* 0-1 */ -{ - uint64_t ptr = - POW_OPERATION_BASE_IO_BIT | - __BITS64_SET(POW_OPERATION_BASE_MAJOR_DID, 0x0c) | - __BITS64_SET(POW_OPERATION_BASE_SUB_DID, 0x03) | - __BITS64_SET(POW_IDXPTR_LOAD_QOSGRP, qosgrp) | - __BITS64_SET(POW_IDXPTR_LOAD_GET_DES_GET_TAIL, get_des_get_tail) | - __BITS64_SET(POW_IDXPTR_LOAD_GET_RMT, get_rmt); - - return octeon_xkphys_read_8(ptr); -} - -/* NULL_RD Loads */ - -static inline uint64_t -cn30xxpow_ops_null_rd_load(void) -{ - uint64_t ptr = - POW_OPERATION_BASE_IO_BIT | - __BITS64_SET(POW_OPERATION_BASE_MAJOR_DID, 0x0c) | - __BITS64_SET(POW_OPERATION_BASE_SUB_DID, 0x04); - - return octeon_xkphys_read_8(ptr); -} - /* 5.11.2 IOBDMA Operations */ /* -- 2.20.1