Date: Sat, 2 Nov 2013 00:35:36 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r257536 - projects/altix2/sys/ia64/sgisn Message-ID: <201311020035.rA20ZacT027156@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Sat Nov 2 00:35:36 2013 New Revision: 257536 URL: http://svnweb.freebsd.org/changeset/base/257536 Log: Only create a timecounter for the first SHub. Modified: projects/altix2/sys/ia64/sgisn/sgisn_shub.c Modified: projects/altix2/sys/ia64/sgisn/sgisn_shub.c ============================================================================== --- projects/altix2/sys/ia64/sgisn/sgisn_shub.c Sat Nov 2 00:11:38 2013 (r257535) +++ projects/altix2/sys/ia64/sgisn/sgisn_shub.c Sat Nov 2 00:35:36 2013 (r257536) @@ -454,16 +454,18 @@ sgisn_shub_attach(device_t dev) device_set_ivars(child, (void *)(uintptr_t)~0UL); } - /* Use the SHub's RTC as a time counter. */ - r = ia64_sal_entry(SAL_FREQ_BASE, 2, 0, 0, 0, 0, 0, 0); - if (r.sal_status == 0) { - sc->sc_rtc.tc_get_timecount = sgisn_shub_get_rtc; - sc->sc_rtc.tc_counter_mask = ~0U; - sc->sc_rtc.tc_frequency = r.sal_result[0]; - sc->sc_rtc.tc_name = "SHub RTC"; - sc->sc_rtc.tc_quality = (r.sal_result[0]) ? 1200 : 950; - sc->sc_rtc.tc_priv = sc; - tc_init(&sc->sc_rtc); + if (sc->sc_nasid == 0) { + /* Use the SHub's RTC as a time counter. */ + r = ia64_sal_entry(SAL_FREQ_BASE, 2, 0, 0, 0, 0, 0, 0); + if (r.sal_status == 0) { + sc->sc_rtc.tc_get_timecount = sgisn_shub_get_rtc; + sc->sc_rtc.tc_counter_mask = ~0U; + sc->sc_rtc.tc_frequency = r.sal_result[0]; + sc->sc_rtc.tc_name = "SHub RTC"; + sc->sc_rtc.tc_quality = (r.sal_result[0]) ? 1200 : 950; + sc->sc_rtc.tc_priv = sc; + tc_init(&sc->sc_rtc); + } } for (seg = 0; seg <= sc->sc_fwhub->hub_pci_maxseg; seg++) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311020035.rA20ZacT027156>