Print this page
acpica-unix2-20130823
PANKOVs restructure

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/io/psm/psm_common.c
          +++ new/usr/src/uts/i86pc/io/psm/psm_common.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
       23 + * Copyright 2013 PALO, Richard. All rights reserved.
  23   24   */
  24   25  
  25   26  #include <sys/types.h>
  26   27  #include <sys/param.h>
  27   28  #include <sys/cmn_err.h>
  28   29  #include <sys/promif.h>
  29      -#include <sys/acpi/acpi.h>
       30 +#include <acpica/include/acpi.h>
  30   31  #include <sys/acpica.h>
  31   32  #include <sys/sunddi.h>
  32   33  #include <sys/ddi.h>
  33   34  #include <sys/ddi_impldefs.h>
  34   35  #include <sys/pci.h>
  35   36  #include <sys/debug.h>
  36   37  #include <sys/psm_common.h>
  37   38  #include <sys/sunndi.h>
  38   39  #include <sys/ksynch.h>
  39   40  
↓ open down ↓ 441 lines elided ↑ open up ↑
 481  482          srsp = NULL;
 482  483          for (resp = rsb.Pointer; resp->Type != ACPI_RESOURCE_TYPE_END_TAG;
 483  484              resp = ACPI_NEXT_RESOURCE(resp)) {
 484  485                  if ((resp->Type == ACPI_RESOURCE_TYPE_IRQ) ||
 485  486                      (resp->Type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ)) {
 486  487                          ACPI_RESOURCE *endtag;
 487  488                          /*
 488  489                           * Allocate enough room for this resource entry
 489  490                           * and one end tag following it
 490  491                           */
 491      -                        srs_len = resp->Length + sizeof (*endtag);
      492 +                        srs_len = resp->Length + ACPI_RS_SIZE_NO_DATA;
 492  493                          srsp = kmem_zalloc(srs_len, KM_SLEEP);
 493  494                          bcopy(resp, srsp, resp->Length);
 494  495                          endtag = ACPI_NEXT_RESOURCE(srsp);
 495  496                          endtag->Type = ACPI_RESOURCE_TYPE_END_TAG;
 496      -                        endtag->Length = 0;
      497 +                        endtag->Length = ACPI_RS_SIZE_NO_DATA;
 497  498                          break;  /* drop out of the loop */
 498  499                  }
 499  500          }
 500  501  
 501  502          /*
 502  503           * We're done with the PRS values, toss 'em lest we forget
 503  504           */
 504  505          AcpiOsFree(rsb.Pointer);
 505  506  
 506  507          if (srsp == NULL)
↓ open down ↓ 518 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX