1021 DTRACE_PROBE4(p4__pcbe__sample, int, i, uint64_t, *addrs[i],
1022 uint64_t, curpic[i], uint64_t, cfgs[i]->p4_rawpic);
1023 cfgs[i]->p4_rawpic = *addrs[i] & MASK40;
1024 }
1025 }
1026
1027 static void
1028 p4_pcbe_free(void *config)
1029 {
1030 kmem_free(config, sizeof (p4_pcbe_config_t));
1031 }
1032
1033 static struct modlpcbe modlpcbe = {
1034 &mod_pcbeops,
1035 "Pentium 4 Performance Counters",
1036 &p4_pcbe_ops
1037 };
1038
1039 static struct modlinkage modl = {
1040 MODREV_1,
1041 &modlpcbe,
1042 };
1043
1044 int
1045 _init(void)
1046 {
1047 if (p4_pcbe_init() != 0)
1048 return (ENOTSUP);
1049 return (mod_install(&modl));
1050 }
1051
1052 int
1053 _fini(void)
1054 {
1055 return (mod_remove(&modl));
1056 }
1057
1058 int
1059 _info(struct modinfo *mi)
1060 {
1061 return (mod_info(&modl, mi));
|
1021 DTRACE_PROBE4(p4__pcbe__sample, int, i, uint64_t, *addrs[i],
1022 uint64_t, curpic[i], uint64_t, cfgs[i]->p4_rawpic);
1023 cfgs[i]->p4_rawpic = *addrs[i] & MASK40;
1024 }
1025 }
1026
1027 static void
1028 p4_pcbe_free(void *config)
1029 {
1030 kmem_free(config, sizeof (p4_pcbe_config_t));
1031 }
1032
1033 static struct modlpcbe modlpcbe = {
1034 &mod_pcbeops,
1035 "Pentium 4 Performance Counters",
1036 &p4_pcbe_ops
1037 };
1038
1039 static struct modlinkage modl = {
1040 MODREV_1,
1041 { &modlpcbe, NULL }
1042 };
1043
1044 int
1045 _init(void)
1046 {
1047 if (p4_pcbe_init() != 0)
1048 return (ENOTSUP);
1049 return (mod_install(&modl));
1050 }
1051
1052 int
1053 _fini(void)
1054 {
1055 return (mod_remove(&modl));
1056 }
1057
1058 int
1059 _info(struct modinfo *mi)
1060 {
1061 return (mod_info(&modl, mi));
|