Deleted Added
full compact
acpi_hpet.c (232797) acpi_hpet.c (240286)
1/*-
2 * Copyright (c) 2005 Poul-Henning Kamp
3 * Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2005 Poul-Henning Kamp
3 * Copyright (c) 2010 Alexander Motin <mav@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_hpet.c 232797 2012-03-10 21:08:07Z mav $");
29__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_hpet.c 240286 2012-09-09 20:00:00Z mav $");
30
31#include "opt_acpi.h"
32#if defined(__amd64__) || defined(__ia64__)
33#define DEV_APIC
34#else
35#include "opt_apic.h"
36#endif
37#include <sys/param.h>

--- 14 unchanged lines hidden (view full) ---

52#include <dev/acpica/acpivar.h>
53#include <dev/acpica/acpi_hpet.h>
54
55#ifdef DEV_APIC
56#include "pcib_if.h"
57#endif
58
59#define HPET_VENDID_AMD 0x4353
30
31#include "opt_acpi.h"
32#if defined(__amd64__) || defined(__ia64__)
33#define DEV_APIC
34#else
35#include "opt_apic.h"
36#endif
37#include <sys/param.h>

--- 14 unchanged lines hidden (view full) ---

52#include <dev/acpica/acpivar.h>
53#include <dev/acpica/acpi_hpet.h>
54
55#ifdef DEV_APIC
56#include "pcib_if.h"
57#endif
58
59#define HPET_VENDID_AMD 0x4353
60#define HPET_VENDID_AMD2 0x1022
60#define HPET_VENDID_INTEL 0x8086
61#define HPET_VENDID_NVIDIA 0x10de
62#define HPET_VENDID_SW 0x1166
63
64ACPI_SERIAL_DECL(hpet, "ACPI HPET support");
65
66static devclass_t hpet_devclass;
67

--- 432 unchanged lines hidden (view full) ---

500 sc->allowed_irqs = 0xffff0000;
501 /*
502 * HPETs in AMD chipsets before SB800 have problems with IRQs >= 16
503 * Lower are also not always working for different reasons.
504 * SB800 fixed it, but seems do not implements level triggering
505 * properly, that makes it very unreliable - it freezes after any
506 * interrupt loss. Avoid legacy IRQs for AMD.
507 */
61#define HPET_VENDID_INTEL 0x8086
62#define HPET_VENDID_NVIDIA 0x10de
63#define HPET_VENDID_SW 0x1166
64
65ACPI_SERIAL_DECL(hpet, "ACPI HPET support");
66
67static devclass_t hpet_devclass;
68

--- 432 unchanged lines hidden (view full) ---

501 sc->allowed_irqs = 0xffff0000;
502 /*
503 * HPETs in AMD chipsets before SB800 have problems with IRQs >= 16
504 * Lower are also not always working for different reasons.
505 * SB800 fixed it, but seems do not implements level triggering
506 * properly, that makes it very unreliable - it freezes after any
507 * interrupt loss. Avoid legacy IRQs for AMD.
508 */
508 if (vendor == HPET_VENDID_AMD)
509 if (vendor == HPET_VENDID_AMD || vendor == HPET_VENDID_AMD2)
509 sc->allowed_irqs = 0x00000000;
510 /*
511 * NVidia MCP5x chipsets have number of unexplained interrupt
512 * problems. For some reason, using HPET interrupts breaks HDA sound.
513 */
514 if (vendor == HPET_VENDID_NVIDIA && rev <= 0x01)
515 sc->allowed_irqs = 0x00000000;
516 /*

--- 345 unchanged lines hidden ---
510 sc->allowed_irqs = 0x00000000;
511 /*
512 * NVidia MCP5x chipsets have number of unexplained interrupt
513 * problems. For some reason, using HPET interrupts breaks HDA sound.
514 */
515 if (vendor == HPET_VENDID_NVIDIA && rev <= 0x01)
516 sc->allowed_irqs = 0x00000000;
517 /*

--- 345 unchanged lines hidden ---