linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Jiang Liu <jiang.liu@linux.intel.com>
Cc: tip-bot for Jiang Liu <tipbot@zytor.com>,
	linux-tip-commits@vger.kernel.org, mingo@kernel.org,
	rdunlap@infradead.org, bhelgaas@google.com, hpa@zytor.com,
	tony.luck@intel.com, rjw@rjwysocki.net, grant.likely@linaro.org,
	konrad.wilk@oracle.com, gregkh@linuxfoundation.org,
	tglx@linutronix.de, yinghai@kernel.org, joro@8bytes.org,
	linux-kernel@vger.kernel.org, benh@kernel.crashing.org,
	jroedel@suse.de
Subject: Re: [tip:x86/apic] x86, irq: Use cached IOAPIC entry instead of reading from hardware
Date: Fri, 28 Nov 2014 12:53:06 +0100	[thread overview]
Message-ID: <20141128115306.GC30997@pd.tnic> (raw)
In-Reply-To: <20141128113358.GB30997@pd.tnic>

On Fri, Nov 28, 2014 at 12:33:58PM +0100, Borislav Petkov wrote:
> On Fri, Nov 28, 2014 at 10:31:44AM +0800, Jiang Liu wrote:
> > 	Thanks for tracking down to this line of change. I have no
> > platform to reproduce this bug, so could you please help to revert this
> > commit and apply following patch to get some data about IOAPIC entry?
> 
> Yep, the cached data differs from what's in the hw reg sometimes:
> 
> dmesg | grep -i ioapic
> [    0.000000] ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
> [    0.000000] IOAPIC[0]: apic_id 2, version 33, address 0xfec00000, GSI 0-23
> [    0.429355] ioapic0 pin9, hardware reg a939, cached data 1a939
> [    0.506249] ioapic0 pin9, hardware reg 1a939, cached data 1a939
> [    0.521547] ACPI: Using IOAPIC for interrupt routing
> [    1.313959] ioapic0 pin19, hardware reg a9c1, cached data 1a9c1
> [    1.357875] ioapic0 pin12, hardware reg 93c, cached data 93c
> [    1.359204] ioapic0 pin1, hardware reg 931, cached data 931
> [    1.367423] ioapic0 pin8, hardware reg 938, cached data 938
> [    7.560846] ioapic0 pin17, hardware reg a981, cached data 1a981
> [    7.866814] ioapic0 pin18, hardware reg a9a1, cached data 1a9a1
> [   10.141662] ioapic0 pin16, hardware reg a942, cached data 1a942
> 
> This would explain the failure because the ahci ioapic pin19 has that
> discrepancy:
> 
> [    1.311476] ahci 0000:00:11.0: version 3.0
> [    1.313374] ahci 0000:00:11.0: AHCI 0001.0200 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
> [    1.313556] ahci 0000:00:11.0: flags: 64bit ncq sntf ilck pm led clo pmp pio slum part ccc 
> [    1.313959] ioapic0 pin19, hardware reg a9c1, cached data 1a9c1

Ok, so this is interesting: the cached data has bit 16 set which,
AFAICT, is in one of those io redirection table registers. That bit
masks out interrupts and if set, those get ignored. Which would explain
the timeoutting of the ATA commands because the IRQ is masked.

I don't know, though, why your cached data has bit 16 set....

This is all a big IMHO of course...

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

  reply	other threads:[~2014-11-28 11:53 UTC|newest]

Thread overview: 157+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25  7:49 [Patch Part3 v4 00/38] Enable hierarchy irqdomian on x86 platforms Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 01/38] x86, intel-mid: Delay initialization of APB timer Jiang Liu
2014-11-26 23:12   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2014-11-25  7:49 ` [Patch Part3 v4 02/38] x86, intel-mid, trivial: Refine code syntax for sfi_parse_mtmr() Jiang Liu
2014-11-26 23:13   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 03/38] x86, irq: Kill unused pre_init_apic_IRQ0() Jiang Liu
2014-11-26 23:13   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 04/38] x86, irq: Prepare IOAPIC interfaces to support hierarchy irqdomain Jiang Liu
2014-11-26 23:13   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 05/38] x86, irq: Implement callbacks to enable hierarchy irqdomain on IOAPICs Jiang Liu
2014-11-26 23:13   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 06/38] x86, irq: Refine the way to allocate irq_cfg for legacy IRQs Jiang Liu
2014-11-26 23:14   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 07/38] x86, irq: Simplify the way to print IOAPIC entry Jiang Liu
2014-11-26 23:14   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 08/38] x86, irq: Introduce helper functions to support hierarchy irqdomain for IOAPIC Jiang Liu
2014-11-26 23:14   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 09/38] x86, irq: Convert IOAPIC to use hierarchy irqdomain interfaces Jiang Liu
2014-11-26 23:14   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 10/38] x86, irq: Kill unused old IOAPIC " Jiang Liu
2014-11-26 23:15   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 11/38] x86, irq: Kill unused struct mp_pin_info Jiang Liu
2014-11-26 23:15   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 12/38] x86, irq: Kill x86_io_apic_ops.print_entries and related interfaces Jiang Liu
2014-11-26 23:15   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 13/38] x86, irq: Kill x86_io_apic_ops.setup_entry " Jiang Liu
2014-11-26 23:16   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 14/38] x86, irq: Kill x86_io_apic_ops.set_affinity " Jiang Liu
2014-11-26 23:16   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 15/38] x86, irq: Kill x86_io_apic_ops.eoi_ioapic_pin " Jiang Liu
2014-11-26 23:16   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 16/38] x86, irq: Kill GENERIC_IRQ_LEGACY_ALLOC_HWIRQ Jiang Liu
2014-11-26 23:16   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 17/38] x86: Clean up unused forward declarations in x86_init.h Jiang Liu
2014-11-26 23:17   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 18/38] x86: irq_remapping: Clean up unsued code Jiang Liu
2014-11-26 23:17   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-12-02  0:21   ` [Patch Part3 v4 18/38] " Bjorn Helgaas
2014-11-25  7:49 ` [Patch Part3 v4 19/38] iommu/vt-d: " Jiang Liu
2014-11-26 23:17   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 20/38] iommu/amd: " Jiang Liu
2014-11-26 23:17   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 21/38] x86: irq_remapping: Clean up unused interfaces Jiang Liu
2014-11-26 23:18   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 22/38] x86, irq: Kill irq_cfg.irq_remapped Jiang Liu
2014-11-26 23:18   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 23/38] iommu/vt-d: Move struct irq_2_iommu into intel_irq_remapping.c Jiang Liu
2014-11-26 23:18   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 24/38] iommu/amd: Move struct irq_2_irte into amd_iommu.c Jiang Liu
2014-11-26 23:18   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 25/38] x86, irq: Move irq_cfg.irq_2_pin into io_apic.c Jiang Liu
2014-11-26 23:19   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 26/38] x86, irq: Kill struct io_apic_irq_attr Jiang Liu
2014-11-26 23:19   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 27/38] x86, irq: Kill x86_io_apic_ops.write and x86_io_apic_ops.modify Jiang Liu
2014-11-26 23:19   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 28/38] x86, irq: Clean up io_apic.h Jiang Liu
2014-11-26 23:19   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 29/38] x86, irq: Use cached IOAPIC entry instead of reading from hardware Jiang Liu
2014-11-26 23:20   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-27 19:32     ` Borislav Petkov
2014-11-28  2:31       ` Jiang Liu
2014-11-28 11:33         ` Borislav Petkov
2014-11-28 11:53           ` Borislav Petkov [this message]
2014-11-28 15:40             ` Jiang Liu
2014-11-28 16:07               ` Jiang Liu
2014-11-28 16:46                 ` Borislav Petkov
2014-11-28 21:12               ` [tip:x86/apic] x86, ioapic: Repair io_apic_set_affinity tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 30/38] x86, irq: Kill unused alloc_irq_and_cfg_at() Jiang Liu
2014-11-26 23:20   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 31/38] x86, irq: Change functions only used in vector.c as static Jiang Liu
2014-11-26 23:20   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 32/38] x86, irq: Kill function apic_set_affinity() Jiang Liu
2014-11-26 23:21   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 33/38] x86, irq: Move check of cfg->move_in_progress into send_cleanup_vector() Jiang Liu
2014-11-26 23:21   ` [tip:x86/apic] x86, irq: Move check of cfg-> move_in_progress " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 34/38] x86, irq: Move private data in struct irq_cfg into dedicated data structure Jiang Liu
2014-11-26 23:21   ` [tip:x86/apic] " tip-bot for Jiang Liu
2015-04-24 16:02   ` [tip:x86/apic] x86/irq: " tip-bot for Jiang Liu
2014-11-25  7:49 ` [Patch Part3 v4 35/38] x86, irq: Refine the way to calculate NR_IRQS Jiang Liu
2014-11-26 23:21   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:50 ` [Patch Part3 v4 36/38] ACPI, irq, x86: Kill private function mp_register_gsi()/ mp_unregister_gsi() Jiang Liu
2014-11-26 23:22   ` [tip:x86/apic] " tip-bot for Jiang Liu
2014-11-25  7:50 ` [Patch Part3 v4 37/38] x86, irq: Introduce mechanism to support different vector allocation policies Jiang Liu
2014-11-27 10:44   ` Thomas Gleixner
2014-11-27 16:22     ` Jiang Liu
2014-11-25  7:50 ` [Patch Part3 v4 38/38] x86, irq: Add kernel parameter vector_alloc to set CPU vector allocation policy Jiang Liu
2014-12-01 18:49   ` Bjorn Helgaas
2014-12-01 19:15     ` Daniel J Blueman
2014-12-01 23:45     ` Jiang Liu
2014-12-01 23:47       ` Bjorn Helgaas
2015-04-14  2:29 [Patch Part2 v5 00/33] Clean up obsoleted x86 interrupt manangement code and interfaces Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 01/33] x86/irq: Kill unused old IOAPIC irqdomain interfaces Jiang Liu
2015-04-24 15:54   ` [tip:x86/apic] x86/irq: Remove " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 02/33] x86/irq: Kill unused struct mp_pin_info Jiang Liu
2015-04-24 15:54   ` [tip:x86/apic] x86/irq: Remove " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 03/33] x86/irq: Kill x86_io_apic_ops.print_entries and related interfaces Jiang Liu
2015-04-24 15:55   ` [tip:x86/apic] x86/irq: Remove " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 04/33] x86/irq: Kill x86_io_apic_ops.setup_entry " Jiang Liu
2015-04-24 15:55   ` [tip:x86/apic] x86/irq: Remove " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 05/33] x86/irq: Kill x86_io_apic_ops.set_affinity " Jiang Liu
2015-04-24 15:55   ` [tip:x86/apic] x86/irq: Remove " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 06/33] x86/irq: Kill x86_io_apic_ops.eoi_ioapic_pin " Jiang Liu
2015-04-24 15:56   ` [tip:x86/apic] x86/irq: Remove " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 07/33] x86/irq: Kill GENERIC_IRQ_LEGACY_ALLOC_HWIRQ Jiang Liu
2015-04-24 15:56   ` [tip:x86/apic] x86/irq: Remove GENERIC_IRQ_LEGACY_ALLOC_HWIRQ tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 08/33] x86/irq: Clean up unused forward declarations in x86_init.h Jiang Liu
2015-04-24 15:56   ` [tip:x86/apic] " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 09/33] irq_remapping: Clean up unsued code to support IOAPIC Jiang Liu
2015-04-24 15:56   ` [tip:x86/apic] " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 10/33] irq_remapping/vt-d: Clean up unsued code Jiang Liu
2015-04-24 15:57   ` [tip:x86/apic] " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 11/33] irq_remapping/amd: " Jiang Liu
2015-04-24 15:57   ` [tip:x86/apic] " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 12/33] irq_remapping: Clean up unused interfaces Jiang Liu
2015-04-24 15:57   ` [tip:x86/apic] " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 13/33] x86/irq: Kill irq_cfg.irq_remapped Jiang Liu
2015-04-24 15:58   ` [tip:x86/apic] x86/irq: Remove irq_cfg.irq_remapped tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 14/33] irq_remapping/vt-d: Move struct irq_2_iommu into intel_irq_remapping.c Jiang Liu
2015-04-24 15:58   ` [tip:x86/apic] " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 15/33] irq_remapping/amd: Move struct irq_2_irte into amd_iommu.c Jiang Liu
2015-04-24 15:58   ` [tip:x86/apic] " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 16/33] x86/irq: Move irq_cfg.irq_2_pin into io_apic.c Jiang Liu
2015-04-24 15:58   ` [tip:x86/apic] " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 17/33] x86/irq: Kill struct io_apic_irq_attr Jiang Liu
2015-04-24 15:59   ` [tip:x86/apic] x86/irq: Remove " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 18/33] x86/irq: Kill x86_io_apic_ops.write and x86_io_apic_ops.modify Jiang Liu
2015-04-24 15:59   ` [tip:x86/apic] x86/irq: Remove " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 19/33] x86/irq: Clean up io_apic.h Jiang Liu
2015-04-24 16:00   ` [tip:x86/apic] " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 20/33] x86/irq: Use cached IOAPIC entry instead of reading from hardware Jiang Liu
2015-04-24 16:00   ` [tip:x86/apic] " tip-bot for Jiang Liu
2015-04-14  2:29 ` [Patch Part2 v5 21/33] x86/irq: Remove sis apic bug workaround Jiang Liu
2015-04-24 16:00   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-04-14  2:29 ` [Patch Part2 v5 22/33] x86/irq: Kill unused alloc_irq_and_cfg_at() Jiang Liu
2015-04-24 16:00   ` [tip:x86/apic] x86/irq: Remove " tip-bot for Jiang Liu
2015-04-14  2:30 ` [Patch Part2 v5 23/33] x86/irq: Change functions only used in vector.c as static Jiang Liu
2015-04-24 16:01   ` [tip:x86/apic] x86/irq: Make functions only used in vector.c static tip-bot for Jiang Liu
2015-04-14  2:30 ` [Patch Part2 v5 24/33] x86/irq: Kill function apic_set_affinity() Jiang Liu
2015-04-24 16:01   ` [tip:x86/apic] x86/irq: Remove " tip-bot for Jiang Liu
2015-04-14  2:30 ` [Patch Part2 v5 25/33] x86/irq: Move check of cfg->move_in_progress into send_cleanup_vector() Jiang Liu
2015-04-24 16:01   ` [tip:x86/apic] x86/irq: Move check of cfg-> move_in_progress " tip-bot for Jiang Liu
2015-04-14  2:30 ` [Patch Part2 v5 26/33] x86/irq: Move private data in struct irq_cfg into dedicated data structure Jiang Liu
2015-04-14  2:30 ` [Patch Part2 v5 27/33] x86/irq: Refine the way to calculate NR_IRQS Jiang Liu
2015-04-24 16:02   ` [tip:x86/apic] " tip-bot for Jiang Liu
2015-04-14  2:30 ` [Patch Part2 v5 28/33] x86/irq, ACPI: Kill private function mp_register_gsi()/ mp_unregister_gsi() Jiang Liu
2015-04-24 16:02   ` [tip:x86/apic] x86/irq, ACPI: Remove " tip-bot for Jiang Liu
2015-04-14  2:30 ` [Patch Part2 v5 29/33] x86, ioapic: Use proper defines for the entry fields Jiang Liu
2015-04-24 16:02   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-04-14  2:30 ` [Patch Part2 v5 30/33] x86,ioapic: Cleanup irq_trigger/polarity() Jiang Liu
2015-04-24 16:03   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-04-14  2:30 ` [Patch Part2 v5 31/33] x86: Cleanup irq_domain ops Jiang Liu
2015-04-24 16:03   ` [tip:x86/apic] " tip-bot for Thomas Gleixner
2015-04-14  2:30 ` [Patch Part2 v5 32/33] x86/irq: Move irqdomain specific code into asm/irqdomain.h Jiang Liu
2015-04-24 16:03   ` [tip:x86/apic] x86/irq: Move irqdomain specific code into asm/ irqdomain.h tip-bot for Jiang Liu
2015-04-14  2:30 ` [Patch Part2 v5 33/33] x86/irq: Avoid memory allocation in __assign_irq_vector() Jiang Liu
2015-04-24 16:04   ` [tip:x86/apic] " tip-bot for Jiang Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141128115306.GC30997@pd.tnic \
    --to=bp@alien8.de \
    --cc=benh@kernel.crashing.org \
    --cc=bhelgaas@google.com \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=jiang.liu@linux.intel.com \
    --cc=joro@8bytes.org \
    --cc=jroedel@suse.de \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=tipbot@zytor.com \
    --cc=tony.luck@intel.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).