1. 21 12月, 2016 4 次提交
    • L
      ACPI / osl: Remove deprecated acpi_get_table_with_size()/early_acpi_os_unmap_memory() · 8d3523fb
      Lv Zheng 提交于
      Since all users are cleaned up, remove the 2 deprecated APIs due to no
      users.
      As a Linux variable rather than an ACPICA variable, acpi_gbl_permanent_mmap
      is renamed to acpi_permanent_mmap to have a consistent coding style across
      entire Linux ACPI subsystem.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8d3523fb
    • L
      ACPI / osl: Remove acpi_get_table_with_size()/early_acpi_os_unmap_memory() users · 6b11d1d6
      Lv Zheng 提交于
      This patch removes the users of the deprectated APIs:
       acpi_get_table_with_size()
       early_acpi_os_unmap_memory()
      The following APIs should be used instead of:
       acpi_get_table()
       acpi_put_table()
      
      The deprecated APIs are invented to be a replacement of acpi_get_table()
      during the early stage so that the early mapped pointer will not be stored
      in ACPICA core and thus the late stage acpi_get_table() won't return a
      wrong pointer. The mapping size is returned just because it is required by
      early_acpi_os_unmap_memory() to unmap the pointer during early stage.
      
      But as the mapping size equals to the acpi_table_header.length
      (see acpi_tb_init_table_descriptor() and acpi_tb_validate_table()), when
      such a convenient result is returned, driver code will start to use it
      instead of accessing acpi_table_header to obtain the length.
      
      Thus this patch cleans up the drivers by replacing returned table size with
      acpi_table_header.length, and should be a no-op.
      Reported-by: NDan Williams <dan.j.williams@intel.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      6b11d1d6
    • L
      ACPICA: Tables: Allow FADT to be customized with virtual address · 66360faa
      Lv Zheng 提交于
      ACPICA commit d98de9ca14891130efc5dcdc871b97eb27b4b0f5
      
      FADT parsing code requires FADT to be installed as
      ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, using new
      acpi_tb_get_table()/acpi_tb_put_table(), other address types can also be allowed,
      thus facilitates FADT customization with virtual address. Lv Zheng.
      
      Link: https://github.com/acpica/acpica/commit/d98de9caSigned-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      66360faa
    • L
      ACPICA: Tables: Back port acpi_get_table_with_size() and... · 174cc718
      Lv Zheng 提交于
      ACPICA: Tables: Back port acpi_get_table_with_size() and early_acpi_os_unmap_memory() from Linux kernel
      
      ACPICA commit cac6790954d4d752a083e6122220b8a22febcd07
      
      This patch back ports Linux acpi_get_table_with_size() and
      early_acpi_os_unmap_memory() into ACPICA upstream to reduce divergences.
      
      The 2 APIs are used by Linux as table management APIs for long time, it
      contains a hidden logic that during the early stage, the mapped tables
      should be unmapped before the early stage ends.
      
      During the early stage, tables are handled by the following sequence:
       acpi_get_table_with_size();
       parse the table
       early_acpi_os_unmap_memory();
      During the late stage, tables are handled by the following sequence:
       acpi_get_table();
       parse the table
      Linux uses acpi_gbl_permanent_mmap to distinguish the early stage and the
      late stage.
      
      The reasoning of introducing acpi_get_table_with_size() is: ACPICA will
      remember the early mapped pointer in acpi_get_table() and Linux isn't able to
      prevent ACPICA from using the wrong early mapped pointer during the late
      stage as there is no API provided from ACPICA to be an inverse of
      acpi_get_table() to forget the early mapped pointer.
      
      But how ACPICA can work with the early/late stage requirement? Inside of
      ACPICA, tables are ensured to be remained in "INSTALLED" state during the
      early stage, and they are carefully not transitioned to "VALIDATED" state
      until the late stage. So the same logic is in fact implemented inside of
      ACPICA in a different way. The gap is only that the feature is not provided
      to the OSPMs in an accessible external API style.
      
      It then is possible to fix the gap by providing an inverse of
      acpi_get_table() from ACPICA, so that the two Linux sequences can be
      combined:
       acpi_get_table();
       parse the table
       acpi_put_table();
      In order to work easier with the current Linux code, acpi_get_table() and
      acpi_put_table() is implemented in a usage counting based style:
       1. When the usage count of the table is increased from 0 to 1, table is
          mapped and .Pointer is set with the mapping address (VALIDATED);
       2. When the usage count of the table is decreased from 1 to 0, .Pointer
          is unset and the mapping address is unmapped (INVALIDATED).
      So that we can deploy the new APIs to Linux with minimal effort by just
      invoking acpi_get_table() in acpi_get_table_with_size() and invoking
      acpi_put_table() in early_acpi_os_unmap_memory(). Lv Zheng.
      
      Link: https://github.com/acpica/acpica/commit/cac67909Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      174cc718
  2. 14 12月, 2016 6 次提交
  3. 13 12月, 2016 26 次提交
  4. 12 12月, 2016 4 次提交
    • U
      mmc: block: Move files to core · f397c8d8
      Ulf Hansson 提交于
      Once upon a time it made sense to keep the mmc block device driver and its
      related code, in its own directory called card. Over time, more an more
      functions/structures have become shared through generic mmc header files,
      between the core and the card directory. In other words, the relationship
      between them has become closer.
      
      By sharing functions/structures via generic header files, it becomes easy
      for outside users to abuse them. In a way to avoid that from happen, let's
      move the files from card directory into the core directory, as it enables
      us to move definitions of functions/structures into mmc core specific
      header files.
      
      Note, this is only the first step in providing a cleaner mmc interface for
      outside users. Following changes will do the actual cleanup, as that is not
      part of this change.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
      f397c8d8
    • R
      xen/balloon: Only mark a page as managed when it is released · 709613ad
      Ross Lagerwall 提交于
      Only mark a page as managed when it is released back to the allocator.
      This ensures that the managed page count does not get falsely increased
      when a VM is running. Correspondingly change it so that pages are
      marked as unmanaged after getting them from the allocator.
      Signed-off-by: NRoss Lagerwall <ross.lagerwall@citrix.com>
      Reviewed-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      709613ad
    • D
      xenbus: fix deadlock on writes to /proc/xen/xenbus · 581d21a2
      David Vrabel 提交于
      /proc/xen/xenbus does not work correctly.  A read blocked waiting for
      a xenstore message holds the mutex needed for atomic file position
      updates.  This blocks any writes on the same file handle, which can
      deadlock if the write is needed to unblock the read.
      
      Clear FMODE_ATOMIC_POS when opening this device to always get
      character device like sematics.
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Reviewed-by: NJuergen Gross <jgross@suse.com>
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      581d21a2
    • R
      openrisc: prevent VGA console, fix builds · 7c7808ce
      Randy Dunlap 提交于
      OpenRISC does not support VGA console, so prevent that kconfig symbol
      from being enabled for OpenRISC, thus fixing these build errors:
      
         drivers/built-in.o: In function `vgacon_save_screen':
         vgacon.c:(.text+0x20e0): undefined reference to `screen_info'
         vgacon.c:(.text+0x20e8): undefined reference to `screen_info'
         drivers/built-in.o: In function `vgacon_init':
         vgacon.c:(.text+0x284c): undefined reference to `screen_info'
         vgacon.c:(.text+0x2850): undefined reference to `screen_info'
         drivers/built-in.o: In function `vgacon_startup':
         vgacon.c:(.text+0x28d8): undefined reference to `screen_info'
         drivers/built-in.o:vgacon.c:(.text+0x28f0): more undefined references to `screen_info' follow
      Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Cc: Chen Gang <gang.chen@asianux.com>
      Cc: Jonas Bonn <jonas@southpole.se>
      Signed-off-by: NStafford Horne <shorne@gmail.com>
      7c7808ce