linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] More ACPI updates for v4.10-rc1
@ 2016-12-22 14:18 Rafael J. Wysocki
  2017-01-04 17:46 ` Linus Torvalds
  0 siblings, 1 reply; 8+ messages in thread
From: Rafael J. Wysocki @ 2016-12-22 14:18 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List, ACPI Devel Maling List

Hi Linus,

Please pull from the tag

 git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
 acpi-extra-4.10-rc1

with top-most commit c8e008e2a6f9ec007a0e22e18eeb5bace5bf16c8

 Merge branches 'acpica' and 'acpi-scan'

on top of commit 7ae123edd37a47e178eb9a6631fe4a7108262c10

 Merge tag 'acpi-urgent-4.10-rc1' of
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

to receive additional ACPI updates for v4.10-rc1.

They are new versions of two ACPICA changes that were deferred previously
due to a problem they had introduced, two cleanups on top of them and
the removal of a useless warning message from the ACPI core.

Specifics:

 - Move some Linux-specific functionality to upstream ACPICA and
   update the in-kernel users of it accordingly (Lv Zheng).

 - Drop a useless warning (triggered by the lack of an optional
   object) from the ACPI namespace scanning code (Zhang Rui).

Thanks!

---------------

Lv Zheng (4):
      ACPICA: Tables: Back port acpi_get_table_with_size() and
early_acpi_os_unmap_memory() from Linux kernel
      ACPICA: Tables: Allow FADT to be customized with virtual address
      ACPI / osl: Remove
acpi_get_table_with_size()/early_acpi_os_unmap_memory() users
      ACPI / osl: Remove deprecated
acpi_get_table_with_size()/early_acpi_os_unmap_memory()

Zhang Rui (1):
      ACPI: do not warn if _BQC does not exist

---------------

 arch/arm64/include/asm/acpi.h            |   2 +-
 arch/arm64/kernel/acpi.c                 |   7 +-
 drivers/acpi/acpica/actables.h           |   6 ++
 drivers/acpi/acpica/tbfadt.c             |  14 ++--
 drivers/acpi/acpica/tbutils.c            |  85 ++++++++++++++++++++
 drivers/acpi/acpica/tbxface.c            | 130 +++++++++++++++++++------------
 drivers/acpi/bus.c                       |   2 +-
 drivers/acpi/nfit/core.c                 |   3 +-
 drivers/acpi/osl.c                       |  15 ++--
 drivers/acpi/processor_core.c            |   8 +-
 drivers/acpi/scan.c                      |   3 -
 drivers/acpi/spcr.c                      |   8 +-
 drivers/acpi/tables.c                    |  17 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c |   3 +-
 drivers/gpu/drm/radeon/radeon_bios.c     |   3 +-
 drivers/iommu/amd_iommu_init.c           |  10 +--
 drivers/iommu/dmar.c                     |   7 +-
 drivers/mailbox/pcc.c                    |   5 +-
 include/acpi/acpi_io.h                   |   2 +
 include/acpi/acpixf.h                    |  17 ++--
 include/acpi/actbl.h                     |   1 +
 include/acpi/platform/aclinuxex.h        |   1 -
 22 files changed, 224 insertions(+), 125 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] More ACPI updates for v4.10-rc1
  2016-12-22 14:18 [GIT PULL] More ACPI updates for v4.10-rc1 Rafael J. Wysocki
@ 2017-01-04 17:46 ` Linus Torvalds
  2017-01-04 23:15   ` Rafael J. Wysocki
  2017-01-05  3:57   ` Zhang Rui
  0 siblings, 2 replies; 8+ messages in thread
From: Linus Torvalds @ 2017-01-04 17:46 UTC (permalink / raw)
  To: Rafael J. Wysocki, Lv Zheng, Bob Moore
  Cc: Linux Kernel Mailing List, ACPI Devel Maling List

On Thu, Dec 22, 2016 at 6:18 AM, Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> Please pull from the tag
>
>  git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>  acpi-extra-4.10-rc1

I only just noticed that this apparently introduces a new warning:

  ACPI Warning: Table ffffffff9fe6c0a0, Validation count is zero
before decrement

the bug may be old, it looks like just the check is new to commit 174cc7187e6f.

But it does seem like something is putting a table that wasn't properly gotten.

Hmm?

                  Linus

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] More ACPI updates for v4.10-rc1
  2017-01-04 17:46 ` Linus Torvalds
@ 2017-01-04 23:15   ` Rafael J. Wysocki
  2017-01-04 23:19     ` Linus Torvalds
  2017-01-05  3:57   ` Zhang Rui
  1 sibling, 1 reply; 8+ messages in thread
From: Rafael J. Wysocki @ 2017-01-04 23:15 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Rafael J. Wysocki, Lv Zheng, Bob Moore,
	Linux Kernel Mailing List, ACPI Devel Maling List

On Wed, Jan 4, 2017 at 6:46 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Thu, Dec 22, 2016 at 6:18 AM, Rafael J. Wysocki <rafael@kernel.org> wrote:
>>
>> Please pull from the tag
>>
>>  git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \
>>  acpi-extra-4.10-rc1
>
> I only just noticed that this apparently introduces a new warning:
>
>   ACPI Warning: Table ffffffff9fe6c0a0, Validation count is zero
> before decrement
>
> the bug may be old, it looks like just the check is new to commit 174cc7187e6f.
>
> But it does seem like something is putting a table that wasn't properly gotten.
>
> Hmm?

It certainly seems so, but acpi_tb_put_table() and acpi_put_table()
are only used in a few places and all of them look correct by
inspection.  Nothing obvious at least.

Is this on HW or emulation?

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] More ACPI updates for v4.10-rc1
  2017-01-04 23:15   ` Rafael J. Wysocki
@ 2017-01-04 23:19     ` Linus Torvalds
  2017-01-04 23:46       ` Linus Torvalds
  0 siblings, 1 reply; 8+ messages in thread
From: Linus Torvalds @ 2017-01-04 23:19 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Lv Zheng, Bob Moore, Linux Kernel Mailing List, ACPI Devel Maling List

On Wed, Jan 4, 2017 at 3:15 PM, Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> Is this on HW or emulation?

This is my normal desktop, so pretty plain HW.

It doesn't happen on my laptop, so it's obviously hw-related or
possibly config-related.

I'll send my acpidump output in a separate off-list email in case that
might help make sense of what triggers it.

                Linus

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] More ACPI updates for v4.10-rc1
  2017-01-04 23:19     ` Linus Torvalds
@ 2017-01-04 23:46       ` Linus Torvalds
  2017-01-05  0:07         ` Rafael J. Wysocki
  0 siblings, 1 reply; 8+ messages in thread
From: Linus Torvalds @ 2017-01-04 23:46 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Lv Zheng, Bob Moore, Linux Kernel Mailing List, ACPI Devel Maling List

On Wed, Jan 4, 2017 at 3:19 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> This is my normal desktop, so pretty plain HW.
>
> It doesn't happen on my laptop, so it's obviously hw-related or
> possibly config-related.

.. and here's the stack trace.

Side note: should the '\n' be deleted? ACPI_ERROR() seems to add that
silly "where it happened" at the end, but due to the '\n' we end up
with two lines...

                  Linus

---

  ACPI Warning: Table ffffffffb0e6c0a0, Validation count is zero
before decrement
   (20160930/tbutils-456)
  ------------[ cut here ]------------
  WARNING: CPU: 0 PID: 0 at drivers/acpi/acpica/tbutils.c:457
acpi_tb_put_table+0x4e/0x62
  Modules linked in:
  CPU: 0 PID: 0 Comm: swapper Not tainted
4.10.0-rc2-00103-g4cf184638bcf-dirty #1
  Hardware name: System manufacturer System Product Name/Z170-K, BIOS
1803 05/06/2016
  Call Trace:
     acpi_tb_put_table+0x4e/0x62
     acpi_put_table+0x40/0x4d
     detect_intel_iommu+0x9d/0xed
     pci_iommu_alloc+0x50/0x6c
     mem_init+0xf/0x8a
     start_kernel+0x21e/0x454
     x86_64_start_reservations+0x24/0x26
     x86_64_start_kernel+0x182/0x193
     start_cpu+0x14/0x14
    ---[ end trace 5e897a808e950ddc ]---

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] More ACPI updates for v4.10-rc1
  2017-01-04 23:46       ` Linus Torvalds
@ 2017-01-05  0:07         ` Rafael J. Wysocki
  0 siblings, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2017-01-05  0:07 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Rafael J. Wysocki, Lv Zheng, Bob Moore,
	Linux Kernel Mailing List, ACPI Devel Maling List

[-- Attachment #1: Type: text/plain, Size: 1558 bytes --]

On Thu, Jan 5, 2017 at 12:46 AM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> On Wed, Jan 4, 2017 at 3:19 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
>>
>> This is my normal desktop, so pretty plain HW.
>>
>> It doesn't happen on my laptop, so it's obviously hw-related or
>> possibly config-related.
>
> .. and here's the stack trace.

Thanks!

I reproduced it too in the meantime (but on an older system I rarely use).

> Side note: should the '\n' be deleted? ACPI_ERROR() seems to add that
> silly "where it happened" at the end, but due to the '\n' we end up
> with two lines...
>
>                   Linus
>
> ---
>
>   ACPI Warning: Table ffffffffb0e6c0a0, Validation count is zero
> before decrement
>    (20160930/tbutils-456)
>   ------------[ cut here ]------------
>   WARNING: CPU: 0 PID: 0 at drivers/acpi/acpica/tbutils.c:457
> acpi_tb_put_table+0x4e/0x62
>   Modules linked in:
>   CPU: 0 PID: 0 Comm: swapper Not tainted
> 4.10.0-rc2-00103-g4cf184638bcf-dirty #1
>   Hardware name: System manufacturer System Product Name/Z170-K, BIOS
> 1803 05/06/2016
>   Call Trace:
>      acpi_tb_put_table+0x4e/0x62
>      acpi_put_table+0x40/0x4d
>      detect_intel_iommu+0x9d/0xed
>      pci_iommu_alloc+0x50/0x6c
>      mem_init+0xf/0x8a
>      start_kernel+0x21e/0x454
>      x86_64_start_reservations+0x24/0x26
>      x86_64_start_kernel+0x182/0x193
>      start_cpu+0x14/0x14
>     ---[ end trace 5e897a808e950ddc ]---

And the attached thing makes it go away for me.

I'll post a proper patch shorlty.

Cheers,
Rafael

[-- Attachment #2: acpi-table-put-debug.patch --]
[-- Type: text/x-patch, Size: 563 bytes --]

---
 drivers/iommu/dmar.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: linux-pm/drivers/iommu/dmar.c
===================================================================
--- linux-pm.orig/drivers/iommu/dmar.c
+++ linux-pm/drivers/iommu/dmar.c
@@ -903,8 +903,10 @@ int __init detect_intel_iommu(void)
 		x86_init.iommu.iommu_init = intel_iommu_init;
 #endif
 
-	acpi_put_table(dmar_tbl);
-	dmar_tbl = NULL;
+	if (dmar_tbl) {
+		acpi_put_table(dmar_tbl);
+		dmar_tbl = NULL;
+	}
 	up_write(&dmar_global_lock);
 
 	return ret ? 1 : -ENODEV;

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] More ACPI updates for v4.10-rc1
  2017-01-04 17:46 ` Linus Torvalds
  2017-01-04 23:15   ` Rafael J. Wysocki
@ 2017-01-05  3:57   ` Zhang Rui
  2017-01-05  5:11     ` Zheng, Lv
  1 sibling, 1 reply; 8+ messages in thread
From: Zhang Rui @ 2017-01-05  3:57 UTC (permalink / raw)
  To: Linus Torvalds, Rafael J. Wysocki, Lv Zheng, Bob Moore
  Cc: Linux Kernel Mailing List, ACPI Devel Maling List

On Wed, 2017-01-04 at 09:46 -0800, Linus Torvalds wrote:
> On Thu, Dec 22, 2016 at 6:18 AM, Rafael J. Wysocki <rafael@kernel.org
> > wrote:
> > 
> > 
> > Please pull from the tag
> > 
> >  git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
> > \
> >  acpi-extra-4.10-rc1
> I only just noticed that this apparently introduces a new warning:
> 
>   ACPI Warning: Table ffffffff9fe6c0a0, Validation count is zero
> before decrement
> 
> the bug may be old, it looks like just the check is new to commit
> 174cc7187e6f.
> 
> But it does seem like something is putting a table that wasn't
> properly gotten.
> 
this looks like the same issue reported here
https://bugzilla.kernel.org/show_bug.cgi?id=191221

Lv, do you think the patch in comment #4 can fix the problem?

thanks,
rui

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [GIT PULL] More ACPI updates for v4.10-rc1
  2017-01-05  3:57   ` Zhang Rui
@ 2017-01-05  5:11     ` Zheng, Lv
  0 siblings, 0 replies; 8+ messages in thread
From: Zheng, Lv @ 2017-01-05  5:11 UTC (permalink / raw)
  To: Zhang, Rui, Linus Torvalds, Rafael J. Wysocki, Moore, Robert
  Cc: Linux Kernel Mailing List, ACPI Devel Maling List

Hi,

> From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-owner@vger.kernel.org] On Behalf Of Zhang
> Rui
> Subject: Re: [GIT PULL] More ACPI updates for v4.10-rc1
> 
> On Wed, 2017-01-04 at 09:46 -0800, Linus Torvalds wrote:
> > On Thu, Dec 22, 2016 at 6:18 AM, Rafael J. Wysocki <rafael@kernel.org
> > > wrote:
> > >
> > >
> > > Please pull from the tag
> > >
> > >  git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
> > > \
> > >  acpi-extra-4.10-rc1
> > I only just noticed that this apparently introduces a new warning:
> >
> >   ACPI Warning: Table ffffffff9fe6c0a0, Validation count is zero
> > before decrement
> >
> > the bug may be old, it looks like just the check is new to commit
> > 174cc7187e6f.
> >
> > But it does seem like something is putting a table that wasn't
> > properly gotten.
> >
> this looks like the same issue reported here
> https://bugzilla.kernel.org/show_bug.cgi?id=191221
> 
> Lv, do you think the patch in comment #4 can fix the problem?

Yes, I think so.
If it cannot, we need to further get the stack of the warning and review the caller side code.

Thanks
Lv

> 
> thanks,
> rui
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-01-05  5:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-22 14:18 [GIT PULL] More ACPI updates for v4.10-rc1 Rafael J. Wysocki
2017-01-04 17:46 ` Linus Torvalds
2017-01-04 23:15   ` Rafael J. Wysocki
2017-01-04 23:19     ` Linus Torvalds
2017-01-04 23:46       ` Linus Torvalds
2017-01-05  0:07         ` Rafael J. Wysocki
2017-01-05  3:57   ` Zhang Rui
2017-01-05  5:11     ` Zheng, Lv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).