Lines Matching refs:temp
588 int32_t auxtemp[2], temp; in amdtemp_sysctl() local
595 temp = imax(auxtemp[0], auxtemp[1]); in amdtemp_sysctl()
600 temp = imax(auxtemp[0], auxtemp[1]); in amdtemp_sysctl()
603 temp = sc->sc_gettemp(dev, sensor); in amdtemp_sysctl()
606 error = sysctl_handle_int(oidp, &temp, 0, req); in amdtemp_sysctl()
617 uint32_t mask, offset, temp; in amdtemp_gettemp0f() local
620 temp = pci_read_config(dev, AMDTEMP_THERMTP_STAT, 1); in amdtemp_gettemp0f()
621 temp &= ~(AMDTEMP_TTSR_SELCORE | AMDTEMP_TTSR_SELSENSOR); in amdtemp_gettemp0f()
624 temp |= AMDTEMP_TTSR_SELSENSOR; in amdtemp_gettemp0f()
629 temp |= AMDTEMP_TTSR_SELCORE; in amdtemp_gettemp0f()
632 temp |= AMDTEMP_TTSR_SELSENSOR; in amdtemp_gettemp0f()
637 temp |= AMDTEMP_TTSR_SELCORE; in amdtemp_gettemp0f()
640 pci_write_config(dev, AMDTEMP_THERMTP_STAT, temp, 1); in amdtemp_gettemp0f()
644 temp = pci_read_config(dev, AMDTEMP_THERMTP_STAT, 4); in amdtemp_gettemp0f()
645 temp = ((temp >> 14) & mask) * 5 / 2; in amdtemp_gettemp0f()
646 temp += AMDTEMP_ZERO_C_TO_K + (sc->sc_offset - offset) * 10; in amdtemp_gettemp0f()
648 return (temp); in amdtemp_gettemp0f()
654 uint32_t temp; in amdtemp_decode_fam10h_to_16h() local
657 temp = ((val >> AMDTEMP_REPTMP10H_CURTMP_SHIFT) & in amdtemp_decode_fam10h_to_16h()
668 temp -= AMDTEMP_CURTMP_RANGE_ADJUST; in amdtemp_decode_fam10h_to_16h()
670 temp += AMDTEMP_ZERO_C_TO_K + sc_offset * 10; in amdtemp_decode_fam10h_to_16h()
671 return (temp); in amdtemp_decode_fam10h_to_16h()
678 uint32_t temp; in amdtemp_gettemp() local
680 temp = pci_read_config(dev, AMDTEMP_REPTMP_CTRL, 4); in amdtemp_gettemp()
681 return (amdtemp_decode_fam10h_to_16h(sc->sc_offset, temp)); in amdtemp_gettemp()
700 uint32_t temp, val; in amdtemp_gettemp17h() local
706 temp = ((val >> 21) & 0x7ff) * 5 / 4; in amdtemp_gettemp17h()
708 temp -= AMDTEMP_CURTMP_RANGE_ADJUST; in amdtemp_gettemp17h()
709 temp += AMDTEMP_ZERO_C_TO_K + sc->sc_offset * 10; in amdtemp_gettemp17h()
711 return (temp); in amdtemp_gettemp17h()