Skip to content
Snippets Groups Projects
  1. Mar 25, 2019
  2. Feb 24, 2019
  3. Feb 18, 2019
  4. Feb 07, 2019
    • James Morse's avatar
      ACPI / APEI: Don't update struct ghes' flags in read/clear estatus · 5cc6c682
      James Morse authored
      
      ghes_read_estatus() sets a flag in struct ghes if the buffer of
      CPER records needs to be cleared once the records have been
      processed. This flag value is a problem if a struct ghes can be
      processed concurrently, as happens at probe time if an NMI arrives
      for the same error source. The NMI clears the flag, meaning the
      interrupted handler may never do the ghes_estatus_clear() work.
      
      The GHES_TO_CLEAR flags is only set at the same time as
      buffer_paddr, which is now owned by the caller and passed to
      ghes_clear_estatus(). Use this value as the flag.
      
      A non-zero buf_paddr returned by ghes_read_estatus() means
      ghes_clear_estatus() should clear this address. ghes_read_estatus()
      already checks for a read of error_status_address being zero,
      so CPER records cannot be written here.
      
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5cc6c682
    • James Morse's avatar
      ACPI / APEI: Don't store CPER records physical address in struct ghes · eeb25557
      James Morse authored
      
      When CPER records are found the address of the records is stashed
      in the struct ghes. Once the records have been processed, this
      address is overwritten with zero so that it won't be processed
      again without being re-populated by firmware.
      
      This goes wrong if a struct ghes can be processed concurrently,
      as can happen at probe time when an NMI occurs. If the NMI arrives
      on another CPU, the probing CPU may call ghes_clear_estatus() on the
      records before the handler had finished with them.
      Even on the same CPU, once the interrupted handler is resumed, it
      will call ghes_clear_estatus() on the NMIs records, this memory may
      have already been re-used by firmware.
      
      Avoid this stashing by letting the caller hold the address. A
      later patch will do away with the use of ghes->flags in the
      read/clear code too.
      
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      eeb25557
    • James Morse's avatar
      ACPI / APEI: Make estatus pool allocation a static size · fb7be08f
      James Morse authored
      
      Adding new NMI-like notifications duplicates the calls that grow
      and shrink the estatus pool. This is all pretty pointless, as the
      size is capped to 64K. Allocate this for each ghes and drop
      the code that grows and shrinks the pool.
      
      Suggested-by: default avatarBorislav Petkov <bp@suse.de>
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      fb7be08f
    • James Morse's avatar
      ACPI / APEI: Make hest.c manage the estatus memory pool · e147133a
      James Morse authored
      
      ghes.c has a memory pool it uses for the estatus cache and the estatus
      queue. The cache is initialised when registering the platform driver.
      For the queue, an NMI-like notification has to grow/shrink the pool
      as it is registered and unregistered.
      
      This is all pretty noisy when adding new NMI-like notifications, it
      would be better to replace this with a static pool size based on the
      number of users.
      
      As a precursor, move the call that creates the pool from ghes_init(),
      into hest.c. Later this will take the number of ghes entries and
      consolidate the queue allocations.
      Remove ghes_estatus_pool_exit() as hest.c doesn't have anywhere to put
      this.
      
      The pool is now initialised as part of ACPI's subsys_initcall():
      (acpi_init(), acpi_scan_init(), acpi_pci_root_init(), acpi_hest_init())
      Before this patch it happened later as a GHES specific device_initcall().
      
      Signed-off-by: default avatarJames Morse <james.morse@arm.com>
      Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e147133a
    • Christoph Hellwig's avatar
      ACPICA: Get rid of acpi_sleep_dispatch() · f2fee24c
      Christoph Hellwig authored
      
      No need for the array of structs of function pointers when we can just
      call the handfull of functions directly.
      
      This could be further cleaned up if acpi_gbl_reduced_hardware was defined
      true in the ACPI_REDUCED_HARDWARE case, but that's material for the next
      round.
      
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      f2fee24c
  5. Jan 15, 2019
  6. Dec 20, 2018
  7. Dec 13, 2018
  8. Dec 08, 2018
    • Borislav Petkov's avatar
      x86/kernel: Fix more -Wmissing-prototypes warnings · ad3bc25a
      Borislav Petkov authored
      
      ... with the goal of eventually enabling -Wmissing-prototypes by
      default. At least on x86.
      
      Make functions static where possible, otherwise add prototypes or make
      them visible through includes.
      
      asm/trace/ changes courtesy of Steven Rostedt <rostedt@goodmis.org>.
      
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Reviewed-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Reviewed-by: default avatarIngo Molnar <mingo@kernel.org>
      Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> # ACPI + cpufreq bits
      Cc: Andrew Banman <andrew.banman@hpe.com>
      Cc: Dimitri Sivanich <dimitri.sivanich@hpe.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Mike Travis <mike.travis@hpe.com>
      Cc: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Yi Wang <wang.yi59@zte.com.cn>
      Cc: linux-acpi@vger.kernel.org
      ad3bc25a
  9. Nov 08, 2018
  10. Oct 18, 2018
    • Erik Kaneda's avatar
      ACPICA: Remove acpi_gbl_group_module_level_code and only use... · 08930d56
      Erik Kaneda authored
      ACPICA: Remove acpi_gbl_group_module_level_code and only use acpi_gbl_execute_tables_as_methods instead
      
      acpi_gbl_group_module_level_code and acpi_gbl_execute_tables_as_methods were
      used to enable different table load behavior. The different table
      load behaviors are as follows:
      
      A.) acpi_gbl_group_module_level_code enabled the legacy approach where
          ASL if statements are executed after the namespace object has
          been loaded.
      B.) acpi_gbl_execute_tables_as_methods is currently used to enable the
          table load to be a method invocation. This meaning that ASL If
          statements are executed in-line rather than deferred until after
          the ACPI namespace has been populated. This is the correct
          behavior and option A will be removed in the future.
      
      We do not support a table load behavior where these variables are
      assigned the same value. In otherwords, we only support option A or B
      and do not need acpi_gbl_group_module_level_code to enable A. From now on,
      acpi_gbl_execute_tables_as_methods == 0 enables option A and
      acpi_gbl_execute_tables_as_methods == 1 enables option B.
      
      Note: option A is expected to be removed in the future and option B
      will become the only supported table load behavior.
      
      Signed-off-by: default avatarErik Schmauss <erik.schmauss@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      08930d56
  11. Oct 16, 2018
  12. Oct 04, 2018
  13. Oct 02, 2018
  14. Sep 08, 2018
  15. Aug 14, 2018
Loading