<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/hpet.c, branch linux-5.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-10-28T19:26:28Z</updated>
<entry>
<title>x86/hpet: Use irq_find_matching_fwspec() to find remapping irqdomain</title>
<updated>2020-10-28T19:26:28Z</updated>
<author>
<name>David Woodhouse</name>
</author>
<published>2020-10-24T21:35:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c2a5881c28e5bb4cb901029423a1c7068c0afa2d'/>
<id>urn:sha1:c2a5881c28e5bb4cb901029423a1c7068c0afa2d</id>
<content type='text'>
All possible parent domains have a select method now. Make use of it.

Signed-off-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lore.kernel.org/r/20201024213535.443185-28-dwmw2@infradead.org

</content>
</entry>
<entry>
<title>x86/hpet: Move MSI support into hpet.c</title>
<updated>2020-10-28T19:26:25Z</updated>
<author>
<name>David Woodhouse</name>
</author>
<published>2020-10-24T21:35:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d7295eb3003aea9f89de35304b3a88ae4d5036b'/>
<id>urn:sha1:3d7295eb3003aea9f89de35304b3a88ae4d5036b</id>
<content type='text'>
This isn't really dependent on PCI MSI; it's just generic MSI which is now
supported by the generic x86_vector_domain. Move the HPET MSI support back
into hpet.c with the rest of the HPET support.

Signed-off-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: https://lore.kernel.org/r/20201024213535.443185-11-dwmw2@infradead.org

</content>
</entry>
<entry>
<title>remove ioremap_nocache and devm_ioremap_nocache</title>
<updated>2020-01-06T08:45:59Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2020-01-06T08:43:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4bdc0d676a643140bdf17dbf7eafedee3d496a3c'/>
<id>urn:sha1:4bdc0d676a643140bdf17dbf7eafedee3d496a3c</id>
<content type='text'>
ioremap has provided non-cached semantics by default since the Linux 2.6
days, so remove the additional ioremap_nocache interface.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
<entry>
<title>x86/hpet: Undo the early counter is counting check</title>
<updated>2019-07-25T10:21:32Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-07-25T06:28:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=643d83f0a3518d6fbcf88f970de0340a5aa6b5a2'/>
<id>urn:sha1:643d83f0a3518d6fbcf88f970de0340a5aa6b5a2</id>
<content type='text'>
Rui reported that on a Pentium D machine which has HPET forced enabled
because it is not advertised by ACPI, the early counter is counting check
leads to a silent boot hang.

The reason is that the ordering of checking the counter first and then
reconfiguring the HPET fails to work on that machine. As the HPET is not
advertised and presumably not initialized by the BIOS the early enable and
the following reconfiguration seems to bring it into a broken state. Adding
clocksource=jiffies to the command line results in the following
clocksource watchdog warning:

  clocksource: timekeeping watchdog on CPU1:
  Marking clocksource 'tsc-early' as unstable because the skew is too large:
  clocksource:  'hpet' wd_now: 33 wd_last: 33 mask: ffffffff

That clearly shows that the HPET is not counting after it got reconfigured
and reenabled. If the counter is not working then the HPET timer is not
expiring either, which explains the boot hang.

Move the counter is counting check after the full configuration again to
unbreak these systems.

Reported-by: Rui Salvaterra &lt;rsalvaterra@gmail.com&gt;
Fixes: 3222daf970f3 ("x86/hpet: Separate counter check out of clocksource register code")
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Rui Salvaterra &lt;rsalvaterra@gmail.com&gt;
Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1907250810530.1791@nanos.tec.linutronix.de

</content>
</entry>
<entry>
<title>x86/hpet: Use channel for legacy clockevent storage</title>
<updated>2019-06-27T22:57:27Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-06-23T13:24:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e44252f4fe79dd9ca93bcf4e8f74389a5b8452f5'/>
<id>urn:sha1:e44252f4fe79dd9ca93bcf4e8f74389a5b8452f5</id>
<content type='text'>
All preparations are done. Use the channel storage for the legacy
clockevent and remove the static variable.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Ricardo Neri &lt;ricardo.neri-calderon@linux.intel.com&gt;
Cc: Ashok Raj &lt;ashok.raj@intel.com&gt;
Cc: Andi Kleen &lt;andi.kleen@intel.com&gt;
Cc: Suravee Suthikulpanit &lt;Suravee.Suthikulpanit@amd.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Ravi Shankar &lt;ravi.v.shankar@intel.com&gt;
Link: https://lkml.kernel.org/r/20190623132436.737689919@linutronix.de

</content>
</entry>
<entry>
<title>x86/hpet: Use common init for legacy clockevent</title>
<updated>2019-06-27T22:57:27Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-06-23T13:24:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=49adaa60fa75a04457d30f38321378cdc3547212'/>
<id>urn:sha1:49adaa60fa75a04457d30f38321378cdc3547212</id>
<content type='text'>
Replace the static initialization of the legacy clockevent with runtime
initialization utilizing the common init function as the last preparatory
step to switch the legacy clockevent over to the channel 0 storage in
hpet_base.

This comes with a twist. The static clockevent initializer has selected
support for periodic and oneshot mode unconditionally whether the HPET
config advertised periodic mode or not. Even the pre clockevents code did
this. But....

Using the conditional in hpet_init_clockevent() makes at least Qemu and one
hardware machine fail to boot.  There are two issues which cause the boot
failure:

 #1 After the timer delivery test in IOAPIC and the IOAPIC setup the next
    interrupt is not delivered despite the HPET channel being programmed
    correctly. Reprogramming the HPET after switching to IOAPIC makes it
    work again. After fixing this, the next issue surfaces:

 #2 Due to the unconditional periodic mode 'availability' the Local APIC
    timer calibration can hijack the global clockevents event handler
    without causing damage. Using oneshot at this stage makes if hang
    because the HPET does not get reprogrammed due to the handler
    hijacking. Duh, stupid me!

Both issues require major surgery and especially the kick HPET again after
enabling IOAPIC results in really nasty hackery.  This 'assume periodic
works' magic has survived since HPET support got added, so it's
questionable whether this should be fixed. Both Qemu and the failing
hardware machine support periodic mode despite the fact that both don't
advertise it in the configuration register and both need that extra kick
after switching to IOAPIC. Seems to be a feature...

Keep the 'assume periodic works' magic around and add a big fat comment.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Ricardo Neri &lt;ricardo.neri-calderon@linux.intel.com&gt;
Cc: Ashok Raj &lt;ashok.raj@intel.com&gt;
Cc: Andi Kleen &lt;andi.kleen@intel.com&gt;
Cc: Suravee Suthikulpanit &lt;Suravee.Suthikulpanit@amd.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Ravi Shankar &lt;ravi.v.shankar@intel.com&gt;
Link: https://lkml.kernel.org/r/20190623132436.646565913@linutronix.de

</content>
</entry>
<entry>
<title>x86/hpet: Carve out shareable parts of init_one_hpet_msi_clockevent()</title>
<updated>2019-06-27T22:57:26Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-06-23T13:24:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ea99110dd024d2f31bde19dda049f3fbf3816a70'/>
<id>urn:sha1:ea99110dd024d2f31bde19dda049f3fbf3816a70</id>
<content type='text'>
To finally remove the static channel0/clockevent storage and to utilize the
channel 0 storage in hpet_base, it's required to run time initialize the
clockevent. The MSI clockevents already have a run time init function.

Carve out the parts which can be shared between the legacy and the MSI
implementation.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Ricardo Neri &lt;ricardo.neri-calderon@linux.intel.com&gt;
Cc: Ashok Raj &lt;ashok.raj@intel.com&gt;
Cc: Andi Kleen &lt;andi.kleen@intel.com&gt;
Cc: Suravee Suthikulpanit &lt;Suravee.Suthikulpanit@amd.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Ravi Shankar &lt;ravi.v.shankar@intel.com&gt;
Link: https://lkml.kernel.org/r/20190623132436.552451082@linutronix.de

</content>
</entry>
<entry>
<title>x86/hpet: Consolidate clockevent functions</title>
<updated>2019-06-27T22:57:26Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-06-23T13:24:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=310b5b3eb6ba5d3a92d783b9fa1c5a3ffb5932e9'/>
<id>urn:sha1:310b5b3eb6ba5d3a92d783b9fa1c5a3ffb5932e9</id>
<content type='text'>
Now that the legacy clockevent is wrapped in a hpet_channel struct most
clockevent functions can be shared between the legacy and the MSI based
clockevents.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Ricardo Neri &lt;ricardo.neri-calderon@linux.intel.com&gt;
Cc: Ashok Raj &lt;ashok.raj@intel.com&gt;
Cc: Andi Kleen &lt;andi.kleen@intel.com&gt;
Cc: Suravee Suthikulpanit &lt;Suravee.Suthikulpanit@amd.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Ravi Shankar &lt;ravi.v.shankar@intel.com&gt;
Link: https://lkml.kernel.org/r/20190623132436.461437795@linutronix.de

</content>
</entry>
<entry>
<title>x86/hpet: Wrap legacy clockevent in hpet_channel</title>
<updated>2019-06-27T22:57:25Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-06-23T13:24:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18e84a2dff00c3c817161a105332cd3fc7592648'/>
<id>urn:sha1:18e84a2dff00c3c817161a105332cd3fc7592648</id>
<content type='text'>
For HPET channel 0 there exist two clockevent structures right now:
  - the static hpet_clockevent
  - the clockevent in channel 0 storage

The goal is to use the clockevent in the channel storage, remove the static
variable and share code with the MSI implementation.

As a first step wrap the legacy clockevent into a hpet_channel struct and
convert the users.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Ricardo Neri &lt;ricardo.neri-calderon@linux.intel.com&gt;
Cc: Ashok Raj &lt;ashok.raj@intel.com&gt;
Cc: Andi Kleen &lt;andi.kleen@intel.com&gt;
Cc: Suravee Suthikulpanit &lt;Suravee.Suthikulpanit@amd.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Ravi Shankar &lt;ravi.v.shankar@intel.com&gt;
Link: https://lkml.kernel.org/r/20190623132436.368141247@linutronix.de

</content>
</entry>
<entry>
<title>x86/hpet: Use cached info instead of extra flags</title>
<updated>2019-06-27T22:57:25Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-06-23T13:24:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=45e0a415634600e608188480bc355b20344f9e3f'/>
<id>urn:sha1:45e0a415634600e608188480bc355b20344f9e3f</id>
<content type='text'>
Now that HPET clockevent support is integrated into the channel data, reuse
the cached boot configuration instead of copying the same information into
a flags field.

This also allows to consolidate the reservation code into one place, which
can now solely depend on the mode information.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Ricardo Neri &lt;ricardo.neri-calderon@linux.intel.com&gt;
Cc: Ashok Raj &lt;ashok.raj@intel.com&gt;
Cc: Andi Kleen &lt;andi.kleen@intel.com&gt;
Cc: Suravee Suthikulpanit &lt;Suravee.Suthikulpanit@amd.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Ravi Shankar &lt;ravi.v.shankar@intel.com&gt;
Link: https://lkml.kernel.org/r/20190623132436.277510163@linutronix.de

</content>
</entry>
</feed>
