rge.c (212758) | rge.c (213377) |
---|---|
1/*- 2 * Copyright (c) 2003-2009 RMI Corporation 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * RMI_BSD 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003-2009 RMI Corporation 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * RMI_BSD 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/mips/rmi/dev/xlr/rge.c 212758 2010-09-16 19:13:55Z jchandra $"); | 33__FBSDID("$FreeBSD: head/sys/mips/rmi/dev/xlr/rge.c 213377 2010-10-03 04:33:58Z jchandra $"); |
34 35#ifdef HAVE_KERNEL_OPTION_HEADERS 36#include "opt_device_polling.h" 37#endif 38 39#include <sys/types.h> 40#include <sys/endian.h> 41#include <sys/systm.h> --- 924 unchanged lines hidden (view full) --- 966 if (smp_started) 967 cpumask = xlr_hw_thread_mask; 968#endif 969 970 for (i = 0; i < MAXCPU; i++) { 971 if (cpumask & (1 << i)) { 972 cpu = i; 973 bucket = ((cpu >> 2) << 3); | 34 35#ifdef HAVE_KERNEL_OPTION_HEADERS 36#include "opt_device_polling.h" 37#endif 38 39#include <sys/types.h> 40#include <sys/endian.h> 41#include <sys/systm.h> --- 924 unchanged lines hidden (view full) --- 966 if (smp_started) 967 cpumask = xlr_hw_thread_mask; 968#endif 969 970 for (i = 0; i < MAXCPU; i++) { 971 if (cpumask & (1 << i)) { 972 cpu = i; 973 bucket = ((cpu >> 2) << 3); |
974 bucket_map |= (1ULL << bucket); | 974 bucket_map |= (3ULL << bucket); |
975 } 976 } 977 printf("rmi_xlr_config_pde: bucket_map=%jx\n", (uintmax_t)bucket_map); 978 979 /* bucket_map = 0x1; */ 980 xlr_write_reg(priv->mmio, R_PDE_CLASS_0, (bucket_map & 0xffffffff)); 981 xlr_write_reg(priv->mmio, R_PDE_CLASS_0 + 1, 982 ((bucket_map >> 32) & 0xffffffff)); --- 1551 unchanged lines hidden (view full) --- 2534 *****************************************************************/ 2535static void 2536mac_common_init(void) 2537{ 2538 init_p2d_allocation(); 2539 init_tx_ring(); 2540 2541 if (xlr_board_info.is_xls) { | 975 } 976 } 977 printf("rmi_xlr_config_pde: bucket_map=%jx\n", (uintmax_t)bucket_map); 978 979 /* bucket_map = 0x1; */ 980 xlr_write_reg(priv->mmio, R_PDE_CLASS_0, (bucket_map & 0xffffffff)); 981 xlr_write_reg(priv->mmio, R_PDE_CLASS_0 + 1, 982 ((bucket_map >> 32) & 0xffffffff)); --- 1551 unchanged lines hidden (view full) --- 2534 *****************************************************************/ 2535static void 2536mac_common_init(void) 2537{ 2538 init_p2d_allocation(); 2539 init_tx_ring(); 2540 2541 if (xlr_board_info.is_xls) { |
2542 if (register_msgring_handler(TX_STN_GMAC0, 2543 rmi_xlr_mac_msgring_handler, NULL)) { | 2542 if (register_msgring_handler(MSGRNG_STNID_GMAC, 2543 MSGRNG_STNID_GMAC + 1, rmi_xlr_mac_msgring_handler, 2544 NULL)) { |
2544 panic("Couldn't register msgring handler\n"); 2545 } | 2545 panic("Couldn't register msgring handler\n"); 2546 } |
2546 if (register_msgring_handler(TX_STN_GMAC1, 2547 rmi_xlr_mac_msgring_handler, NULL)) { | 2547 if (register_msgring_handler(MSGRNG_STNID_GMAC1, 2548 MSGRNG_STNID_GMAC1 + 1, rmi_xlr_mac_msgring_handler, 2549 NULL)) { |
2548 panic("Couldn't register msgring handler\n"); 2549 } 2550 } else { | 2550 panic("Couldn't register msgring handler\n"); 2551 } 2552 } else { |
2551 if (register_msgring_handler(TX_STN_GMAC, 2552 rmi_xlr_mac_msgring_handler, NULL)) { | 2553 if (register_msgring_handler(MSGRNG_STNID_GMAC, 2554 MSGRNG_STNID_GMAC + 1, rmi_xlr_mac_msgring_handler, 2555 NULL)) { |
2553 panic("Couldn't register msgring handler\n"); 2554 } 2555 } 2556 2557 /* 2558 * Not yet if (xlr_board_atx_ii()) { if (register_msgring_handler 2559 * (TX_STN_XGS_0, rmi_xlr_mac_msgring_handler, NULL)) { 2560 * panic("Couldn't register msgring handler for TX_STN_XGS_0\n"); } 2561 * if (register_msgring_handler (TX_STN_XGS_1, 2562 * rmi_xlr_mac_msgring_handler, NULL)) { panic("Couldn't register 2563 * msgring handler for TX_STN_XGS_1\n"); } } 2564 */ 2565} | 2556 panic("Couldn't register msgring handler\n"); 2557 } 2558 } 2559 2560 /* 2561 * Not yet if (xlr_board_atx_ii()) { if (register_msgring_handler 2562 * (TX_STN_XGS_0, rmi_xlr_mac_msgring_handler, NULL)) { 2563 * panic("Couldn't register msgring handler for TX_STN_XGS_0\n"); } 2564 * if (register_msgring_handler (TX_STN_XGS_1, 2565 * rmi_xlr_mac_msgring_handler, NULL)) { panic("Couldn't register 2566 * msgring handler for TX_STN_XGS_1\n"); } } 2567 */ 2568} |