All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: HPET force enable for Soekris net6501
@ 2014-02-14 10:23 Conrad Kostecki
  2014-02-14 17:46 ` H. Peter Anvin
  0 siblings, 1 reply; 64+ messages in thread
From: Conrad Kostecki @ 2014-02-14 10:23 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org, x86@kernel.org
  Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com

Hello,
as the Soekris net6501 does not have any ACPI implementation, HPET won't get enabled.
This patch enables HPET on such platforms.

[    0.430149] pci 0000:00:01.0: Force enabled HPET at 0xfed00000
[    0.644838] HPET: 3 timers in total, 0 timers will be used for per-cpu timer

Original patch by Peter Neubauer, slightly modified by me.
-> http://www.mail-archive.com/soekris-tech@lists.soekris.com/msg06462.html

Cheers
Conrad

Signed-off-by: Peter Neubauer <pneubauer@bluerwhite.org>
Signed-off-by: Conrad Kostecki <ck@conrad-kostecki.de>

--- a/arch/x86/kernel/quirks.c	2014-02-14 11:13:27.703432732 +0100
+++ b/arch/x86/kernel/quirks.c	2014-02-14 11:14:32.327496474 +0100
@@ -498,6 +498,25 @@ void force_hpet_resume(void)
 }
 
 /*
+ * Soekris net6501, based on Atom E6xx series, does not have ACPI.
+ * HPET should be force enabled on such platforms.
+ */
+static void e6xx_force_enable_hpet(struct pci_dev *dev)
+{
+	if (hpet_address || force_hpet_address)
+		return;
+
+	force_hpet_address = 0xFED00000;
+	force_hpet_resume_type = NONE_FORCE_HPET_RESUME;
+	dev_printk(KERN_DEBUG, &dev->dev, "Force enabled HPET at "
+		"0x%lx\n", force_hpet_address);
+	return;
+}
+
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E6XX_CU,
+			 e6xx_force_enable_hpet);
+
+/*
  * HPET MSI on some boards (ATI SB700/SB800) has side effect on
  * floppy DMA. Disable HPET MSI on such platforms.
  * See erratum #27 (Misinterpreted MSI Requests May Result in
--- a/include/linux/pci_ids.h	2014-02-14 11:13:00.575408953 +0100
+++ b/include/linux/pci_ids.h	2014-02-14 11:13:37.819442066 +0100
@@ -2854,6 +2854,7 @@
 #define PCI_DEVICE_ID_INTEL_82372FB_1	0x7601
 #define PCI_DEVICE_ID_INTEL_SCH_LPC	0x8119
 #define PCI_DEVICE_ID_INTEL_SCH_IDE	0x811a
+#define PCI_DEVICE_ID_INTEL_E6XX_CU	0x8183
 #define PCI_DEVICE_ID_INTEL_ITC_LPC	0x8186
 #define PCI_DEVICE_ID_INTEL_82454GX	0x84c4
 #define PCI_DEVICE_ID_INTEL_82450GX	0x84c5


^ permalink raw reply	[flat|nested] 64+ messages in thread
* Re: [Devel] ACPI: Also allow ACPI table adding via initrd not only overriding
  2014-02-18 18:22                                           ` Thomas Renninger
@ 2014-02-18 18:38 ` Moore, Robert
  -1 siblings, 0 replies; 64+ messages in thread
From: Moore, Robert @ 2014-02-18 18:38 UTC (permalink / raw)
  To: devel

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

acpi_load_table won't work?



> -----Original Message-----
> From: Devel [mailto:devel-bounces(a)acpica.org] On Behalf Of Thomas
> Renninger
> Sent: Tuesday, February 18, 2014 10:23 AM
> Cc: x86(a)kernel.org; ck(a)conrad-kostecki.de; linux-kernel(a)vger.kernel.org;
> mingo(a)redhat.com; hpa(a)zytor.com; tglx(a)linutronix.de; devel(a)acpica.org
> Subject: [Devel] ACPI: Also allow ACPI table adding via initrd not only
> overriding
> 
> The ACPICA patches have to go into separate acpica repository first.
> It should also be checked in acpica whether the table signature the OS
> likes to add already exists (from BIOS). In this case the table must not
> be added.
> 
> Worked here by trying to override a DSDT and addind a BGRT table.
> 
>      Thomas
> 
> _______________________________________________
> Devel mailing list
> Devel(a)acpica.org
> https://lists.acpica.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 64+ messages in thread
* Re: [Devel] [PATCH 1/4] ACPI: Provide support for ACPI table adding via OS
  2014-02-18 20:51                                                 ` H. Peter Anvin
@ 2014-02-19 11:22 ` Thomas Renninger
  -1 siblings, 0 replies; 64+ messages in thread
From: Thomas Renninger @ 2014-02-19 11:22 UTC (permalink / raw)
  To: devel

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

On Tuesday, February 18, 2014 12:51:07 PM H. Peter Anvin wrote:
> On 02/18/2014 10:44 AM, Thomas Renninger wrote:
> > On Tuesday, February 18, 2014 10:27:23 AM H. Peter Anvin wrote:
> >> Why can't you add SSDTs? It would be particularly useful.
> > 
> > There are 2 ways how ACPI tables get added:
> >    - Via pointer from a root table (XSDT or RSDT iirc)
> >    - Via load statement inside of ACPI context when ACPI BIOS
> >    
> >      code gets executed (iirc the physical address is passed).
> > 
> > The latter is only for SSDTs.
> > The problem is that you if you add an SSDT early, it might
> > have been intended for overriding when an SSDT gets dynamically
> > loaded later when the system is up which is particular useful as
> > well if you want to debug this specific BIOS table.
> > 
> > This could be workarounded via a boot param:
> > acpi=allow_ssdt_adding
> > But this is not nice. Maybe someone has a more elegant idea.
> > Something could still be added if someone is really needing this.
> 
> Since adding SSDTs is one of the things I really can imagine one would
> do, I think we need to figure out how to do that.  I would think that
> overriding would be the exception case.

You can always paste new code into the DSDT. It is effectively the same
than adding a new SSDT table.
The other way around, modifying or deleting broken code in a BIOS
provided SSDT needs overriding.

So in fact adding SSDTs is not necessary at all.
It would be a nice add-on, but it's not even worth introducing
an extra boot param or whatever confusion.
A hint in Documentation that adding additional ASL (ACPI Source Language)
code to the DSDT would be the same than creating and adding a new
SSDT table which is not possible should be enough.

The whole thing will always taint the kernel and is meant for
debugging only anyway.

   Thomas

^ permalink raw reply	[flat|nested] 64+ messages in thread
* Re: [Devel] [PATCH 1/4] ACPI: Provide support for ACPI table adding via OS
  2014-02-19 11:22 ` Thomas Renninger
@ 2014-02-21  7:24 ` Zheng, Lv
  -1 siblings, 0 replies; 64+ messages in thread
From: Zheng, Lv @ 2014-02-21  7:24 UTC (permalink / raw)
  To: devel

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

Hi, Thomas

> From: Devel [mailto:devel-bounces(a)acpica.org] On Behalf Of Thomas Renninger
> Sent: Wednesday, February 19, 2014 7:23 PM
> 
> On Tuesday, February 18, 2014 12:51:07 PM H. Peter Anvin wrote:
> > On 02/18/2014 10:44 AM, Thomas Renninger wrote:
> > > On Tuesday, February 18, 2014 10:27:23 AM H. Peter Anvin wrote:
> > >> Why can't you add SSDTs? It would be particularly useful.
> > >
> > > There are 2 ways how ACPI tables get added:
> > >    - Via pointer from a root table (XSDT or RSDT iirc)
> > >    - Via load statement inside of ACPI context when ACPI BIOS
> > >
> > >      code gets executed (iirc the physical address is passed).
> > >
> > > The latter is only for SSDTs.
> > > The problem is that you if you add an SSDT early, it might
> > > have been intended for overriding when an SSDT gets dynamically
> > > loaded later when the system is up which is particular useful as
> > > well if you want to debug this specific BIOS table.
> > >
> > > This could be workarounded via a boot param:
> > > acpi=allow_ssdt_adding
> > > But this is not nice. Maybe someone has a more elegant idea.
> > > Something could still be added if someone is really needing this.
> >
> > Since adding SSDTs is one of the things I really can imagine one would
> > do, I think we need to figure out how to do that.  I would think that
> > overriding would be the exception case.
> 
> You can always paste new code into the DSDT. It is effectively the same
> than adding a new SSDT table.
> The other way around, modifying or deleting broken code in a BIOS
> provided SSDT needs overriding.
> 
> So in fact adding SSDTs is not necessary at all.
> It would be a nice add-on, but it's not even worth introducing
> an extra boot param or whatever confusion.
> A hint in Documentation that adding additional ASL (ACPI Source Language)
> code to the DSDT would be the same than creating and adding a new
> SSDT table which is not possible should be enough.

IMO, we need to load tables from RSDT/XSDT, they look like "static tables".
Given that we can live in the environment where table reloading is properly implemented by ACPICA, we won't face issues.
And the reloading feature is also required by ACPI specification.
If a table contains same "signature, oem_id, oem_table_id", it could be able to replace the old loaded one if the revision field is greater than the old one.

Actually I'm currently working on the parallel reloading support and all functionalities have been done.
This report is a bit hurry than I expected.
I'll try to prepare fixes (which seems to be dozens of patches) for the testers to validate.

Fortunately, specific to this bug, I don't think the reload requirement must be implemented as the new one doesn't contain a greater revision number.
So there might just be dead lock issues for this bug.

Thanks and best regards
-Lv

> 
> The whole thing will always taint the kernel and is meant for
> debugging only anyway.
> 
>    Thomas
> _______________________________________________
> Devel mailing list
> Devel(a)acpica.org
> https://lists.acpica.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 64+ messages in thread
* Re: [Devel] [PATCH 1/4] ACPI: Provide support for ACPI table adding via OS
  2014-02-18 18:44                                                 ` Thomas Renninger
@ 2014-02-21  7:28 ` Zheng, Lv
  -1 siblings, 0 replies; 64+ messages in thread
From: Zheng, Lv @ 2014-02-21  7:28 UTC (permalink / raw)
  To: devel

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

Hi, Thomas

> From: Devel [mailto:devel-bounces(a)acpica.org] On Behalf Of Thomas Renninger
> Sent: Wednesday, February 19, 2014 2:44 AM
> 
> On Tuesday, February 18, 2014 10:27:23 AM H. Peter Anvin wrote:
> > Why can't you add SSDTs? It would be particularly useful.
> 
> There are 2 ways how ACPI tables get added:
>    - Via pointer from a root table (XSDT or RSDT iirc)
>    - Via load statement inside of ACPI context when ACPI BIOS
>      code gets executed (iirc the physical address is passed).
> 
> The latter is only for SSDTs.
> The problem is that you if you add an SSDT early, it might
> have been intended for overriding when an SSDT gets dynamically
> loaded later when the system is up which is particular useful as
> well if you want to debug this specific BIOS table.
> 
> This could be workarounded via a boot param:
> acpi=allow_ssdt_adding
> But this is not nice. Maybe someone has a more elegant idea.
> Something could still be added if someone is really needing this.

I'm not sure if you are talking about the issue that:
If a system booted using customized DSDT embedded with SSDT, it also requires dynamic SSDT loading be prevented in ACPICA.

Thanks and best regards
-Lv


> 
>      Thomas
> _______________________________________________
> Devel mailing list
> Devel(a)acpica.org
> https://lists.acpica.org/mailman/listinfo/devel

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

end of thread, other threads:[~2014-09-16  0:58 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-14 10:23 [PATCH] x86: HPET force enable for Soekris net6501 Conrad Kostecki
2014-02-14 17:46 ` H. Peter Anvin
2014-02-14 18:06   ` AW: " Conrad Kostecki
2014-02-14 18:08     ` H. Peter Anvin
2014-02-14 18:13       ` AW: " Conrad Kostecki
2014-02-14 18:16         ` H. Peter Anvin
2014-02-14 18:21           ` Thomas Gleixner
2014-02-14 18:22             ` H. Peter Anvin
2014-02-14 18:38               ` Thomas Gleixner
2014-02-14 18:39                 ` H. Peter Anvin
2014-02-14 19:15                   ` Thomas Gleixner
2014-02-14 19:26                     ` H. Peter Anvin
2014-02-14 19:59                       ` Thomas Gleixner
2014-02-14 20:06                         ` H. Peter Anvin
2014-02-14 21:16                           ` Thomas Gleixner
2014-02-14 21:18                             ` H. Peter Anvin
2014-02-14 21:47                               ` Thomas Gleixner
2014-02-14 21:48                                 ` H. Peter Anvin
2014-02-17 16:28                             ` Thomas Renninger
2014-02-17 17:19                               ` H. Peter Anvin
2014-02-17 18:23                                 ` [Devel] " Thomas Renninger
2014-02-17 18:23                                   ` AW: AW: " Thomas Renninger
2014-02-17 18:47                                   ` H. Peter Anvin
2014-02-17 19:25                                     ` [Devel] " Thomas Renninger
2014-02-17 19:25                                       ` AW: AW: " Thomas Renninger
2014-02-17 19:40                                       ` H. Peter Anvin
2014-02-18 18:22                                         ` [Devel] ACPI: Also allow ACPI table adding via initrd not only overriding Thomas Renninger
2014-02-18 18:22                                           ` Thomas Renninger
2014-02-18 18:22                                           ` [PATCH 1/4] ACPI: Provide support for ACPI table adding via OS Thomas Renninger
2014-02-18 18:22                                             ` [Devel] " Thomas Renninger
2014-02-18 18:27                                             ` H. Peter Anvin
2014-02-18 18:44                                               ` [Devel] " Thomas Renninger
2014-02-18 18:44                                                 ` Thomas Renninger
2014-02-18 20:51                                                 ` H. Peter Anvin
2014-02-18 18:22                                           ` [PATCH 2/4] ACPICA: Introduce new acpi_os_physical_table_add OS callback Thomas Renninger
2014-02-18 18:22                                             ` [Devel] " Thomas Renninger
2014-02-18 18:22                                           ` [PATCH 3/4] ACPICA: Add BGRT signature to known signatures Thomas Renninger
2014-02-18 18:22                                             ` [Devel] " Thomas Renninger
2014-02-18 18:22                                           ` [PATCH 4/4] ACPI: Add new table signatures that can be overridden/added Thomas Renninger
2014-02-18 18:22                                             ` [Devel] " Thomas Renninger
2014-02-18 18:52                                         ` [Devel] ACPI: Also allow ACPI table adding via initrd not only overriding Thomas Renninger
2014-02-18 18:52                                           ` Thomas Renninger
2014-02-18 19:59                                           ` Moore, Robert
2014-02-18 19:59                                             ` Moore, Robert
2014-02-19 11:14                                             ` Thomas Renninger
2014-02-19 11:14                                               ` Thomas Renninger
2014-02-19 13:03                                               ` Thomas Gleixner
2014-02-14 18:28           ` AW: AW: AW: [PATCH] x86: HPET force enable for Soekris net6501 Conrad Kostecki
2014-09-09 13:56             ` Eric Sesterhenn
2014-09-09 14:54               ` Thomas Gleixner
2014-09-09 15:26                 ` H. Peter Anvin
2014-09-09 15:41                   ` Thomas Gleixner
2014-09-12  9:41                   ` Eric Sesterhenn
2014-09-12 10:37                     ` Thomas Gleixner
2014-09-12 11:06                       ` [PATCH] x86: HPET force enable for e6xx based systems Eric Sesterhenn
2014-09-16  0:58                         ` [tip:x86/platform] " tip-bot for Peter Neubauer
  -- strict thread matches above, loose matches on Subject: below --
2014-02-18 18:38 [Devel] ACPI: Also allow ACPI table adding via initrd not only overriding Moore, Robert
2014-02-18 18:38 ` Moore, Robert
2014-02-19 11:22 [Devel] [PATCH 1/4] ACPI: Provide support for ACPI table adding via OS Thomas Renninger
2014-02-19 11:22 ` Thomas Renninger
2014-02-21  7:24 [Devel] " Zheng, Lv
2014-02-21  7:24 ` Zheng, Lv
2014-02-21  7:28 Zheng, Lv
2014-02-21  7:28 ` Zheng, Lv

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.