NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/43765: acpicpu causes ichlpcib0: can't map power management i/o space



The following reply was made to PR kern/43765; it has been noted by GNATS.

From: Jukka Ruohonen <jruohonen%iki.fi@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/43765: acpicpu causes ichlpcib0: can't map power management 
i/o space
Date: Sun, 15 Aug 2010 21:11:54 +0300

 > Enabling 'acpicpu' on my server causes the ichlpcib0 to not be configured
 > properly (specifically, the Watchdog support is not present...I didn't
 > check hpet and other items).
 
 This is a known issue; ichlpcib(4) wrongly maps space that belongs to ACPI
 CPU (or vice versa). This will be dealt with before 6.0. In the meanwhile,
 you can use the following patch.
 
 Index: acpi_cpu.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/acpi/acpi_cpu.c,v
 retrieving revision 1.16
 diff -u -p -r1.16 acpi_cpu.c
 --- acpi_cpu.c 14 Aug 2010 11:16:14 -0000      1.16
 +++ acpi_cpu.c 15 Aug 2010 18:06:50 -0000
 @@ -116,7 +116,6 @@ acpicpu_attach(device_t parent, device_t
  
        sc->sc_dev = self;
        sc->sc_cold = false;
 -      sc->sc_mapped = false;
        sc->sc_iot = aa->aa_iot;
        sc->sc_node = aa->aa_node;
        sc->sc_cpuid = acpicpu_id(sc->sc_object.ao_procid);
 @@ -141,20 +140,6 @@ acpicpu_attach(device_t parent, device_t
        aprint_naive("\n");
        aprint_normal(": ACPI CPU\n");
  
 -      /*
 -       * We should claim the bus space. However, we do this only
 -       * to announce that the space is in use. As is noted in
 -       * ichlpcib(4), we can continue our I/O without bus_space(9).
 -       */
 -      if (sc->sc_object.ao_pblklen == 6 && sc->sc_object.ao_pblkaddr != 0) {
 -
 -              rv = bus_space_map(sc->sc_iot, sc->sc_object.ao_pblkaddr,
 -                  sc->sc_object.ao_pblklen, 0, &sc->sc_ioh);
 -
 -              if (rv == 0)
 -                      sc->sc_mapped = true;
 -      }
 -
        acpicpu_cstate_attach(self);
        acpicpu_pstate_attach(self);
        acpicpu_tstate_attach(self);
 @@ -174,7 +159,6 @@ static int
  acpicpu_detach(device_t self, int flags)
  {
        struct acpicpu_softc *sc = device_private(self);
 -      const bus_addr_t addr = sc->sc_object.ao_pblkaddr;
        static ONCE_DECL(once_detach);
        int rv = 0;
  
 @@ -204,9 +188,6 @@ acpicpu_detach(device_t self, int flags)
        if (rv != 0)
                return rv;
  
 -      if (sc->sc_mapped != false)
 -              bus_space_unmap(sc->sc_iot, sc->sc_ioh, addr);
 -
        mutex_destroy(&sc->sc_mtx);
  
        return 0;
 Index: acpi_cpu.h
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/acpi/acpi_cpu.h,v
 retrieving revision 1.15
 diff -u -p -r1.15 acpi_cpu.h
 --- acpi_cpu.h 14 Aug 2010 05:13:21 -0000      1.15
 +++ acpi_cpu.h 15 Aug 2010 18:06:50 -0000
 @@ -189,7 +189,6 @@ struct acpicpu_softc {
        uint32_t                 sc_flags;
        cpuid_t                  sc_cpuid;
        bool                     sc_cold;
 -      bool                     sc_mapped;
  };
  
  void          acpicpu_cstate_attach(device_t);
 


Home | Main Index | Thread Index | Old Index