* [patch 10/18] iommu/vt-d: Adjust system_state checks
[not found] <20170514182716.347236777@linutronix.de>
@ 2017-05-14 18:27 ` Thomas Gleixner
2017-05-15 14:42 ` Joerg Roedel
2017-05-14 18:27 ` [patch 11/18] iommu/of: Adjust system_state check Thomas Gleixner
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2017-05-14 18:27 UTC (permalink / raw)
To: LKML
Cc: Mark Rutland, Peter Zijlstra, Steven Rostedt,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
David Woodhouse, Ingo Molnar
[-- Attachment #1: iommu-vt-d--Adjust-system_state-check.patch --]
[-- Type: text/plain, Size: 1369 bytes --]
To enable smp_processor_id() and might_sleep() debug checks earlier, it's
required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING.
Adjust the system_state checks in dmar_parse_one_atsr() and
dmar_iommu_notify_scope_dev() to handle the extra states.
Signed-off-by: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
---
drivers/iommu/intel-iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -4312,7 +4312,7 @@ int dmar_parse_one_atsr(struct acpi_dmar
struct acpi_dmar_atsr *atsr;
struct dmar_atsr_unit *atsru;
- if (system_state != SYSTEM_BOOTING && !intel_iommu_enabled)
+ if (system_state >= SYSTEM_RUNNING && !intel_iommu_enabled)
return 0;
atsr = container_of(hdr, struct acpi_dmar_atsr, header);
@@ -4562,7 +4562,7 @@ int dmar_iommu_notify_scope_dev(struct d
struct acpi_dmar_atsr *atsr;
struct acpi_dmar_reserved_memory *rmrr;
- if (!intel_iommu_enabled && system_state != SYSTEM_BOOTING)
+ if (!intel_iommu_enabled && system_state >= SYSTEM_RUNNING)
return 0;
list_for_each_entry(rmrru, &dmar_rmrr_units, list) {
^ permalink raw reply [flat|nested] 5+ messages in thread
* [patch 11/18] iommu/of: Adjust system_state check
[not found] <20170514182716.347236777@linutronix.de>
2017-05-14 18:27 ` [patch 10/18] iommu/vt-d: Adjust system_state checks Thomas Gleixner
@ 2017-05-14 18:27 ` Thomas Gleixner
[not found] ` <20170514183613.331455858-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2017-05-14 18:27 UTC (permalink / raw)
To: LKML
Cc: Mark Rutland, Peter Zijlstra, Steven Rostedt,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Ingo Molnar
[-- Attachment #1: iommu-of--Adjust-system_state-check.patch --]
[-- Type: text/plain, Size: 939 bytes --]
To enable smp_processor_id() and might_sleep() debug checks earlier, it's
required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING.
Adjust the system_state check in of_iommu_driver_present() to handle the
extra states.
Signed-off-by: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Cc: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
---
drivers/iommu/of_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/iommu/of_iommu.c
+++ b/drivers/iommu/of_iommu.c
@@ -103,7 +103,7 @@ static bool of_iommu_driver_present(stru
* it never will be. We don't want to defer indefinitely, nor attempt
* to dereference __iommu_of_table after it's been freed.
*/
- if (system_state > SYSTEM_BOOTING)
+ if (system_state >= SYSTEM_RUNNING)
return false;
return of_match_node(&__iommu_of_table, np);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 11/18] iommu/of: Adjust system_state check
[not found] ` <20170514183613.331455858-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
@ 2017-05-15 10:45 ` Robin Murphy
2017-05-15 14:42 ` Joerg Roedel
1 sibling, 0 replies; 5+ messages in thread
From: Robin Murphy @ 2017-05-15 10:45 UTC (permalink / raw)
To: Thomas Gleixner, LKML
Cc: Mark Rutland, Peter Zijlstra,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Ingo Molnar,
Steven Rostedt
On 14/05/17 19:27, Thomas Gleixner wrote:
> To enable smp_processor_id() and might_sleep() debug checks earlier, it's
> required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING.
>
> Adjust the system_state check in of_iommu_driver_present() to handle the
> extra states.
FWIW,
Acked-by: Robin Murphy <robin.murphy-5wv7dgnIgG8@public.gmane.org>
> Signed-off-by: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
> Cc: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
> Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> ---
> drivers/iommu/of_iommu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/drivers/iommu/of_iommu.c
> +++ b/drivers/iommu/of_iommu.c
> @@ -103,7 +103,7 @@ static bool of_iommu_driver_present(stru
> * it never will be. We don't want to defer indefinitely, nor attempt
> * to dereference __iommu_of_table after it's been freed.
> */
> - if (system_state > SYSTEM_BOOTING)
> + if (system_state >= SYSTEM_RUNNING)
> return false;
>
> return of_match_node(&__iommu_of_table, np);
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 10/18] iommu/vt-d: Adjust system_state checks
2017-05-14 18:27 ` [patch 10/18] iommu/vt-d: Adjust system_state checks Thomas Gleixner
@ 2017-05-15 14:42 ` Joerg Roedel
0 siblings, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2017-05-15 14:42 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, Peter Zijlstra, Ingo Molnar, Steven Rostedt, Mark Rutland,
David Woodhouse, iommu
On Sun, May 14, 2017 at 08:27:26PM +0200, Thomas Gleixner wrote:
> To enable smp_processor_id() and might_sleep() debug checks earlier, it's
> required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING.
>
> Adjust the system_state checks in dmar_parse_one_atsr() and
> dmar_iommu_notify_scope_dev() to handle the extra states.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: David Woodhouse <dwmw2@infradead.org>
> Cc: Joerg Roedel <joro@8bytes.org>
> Cc: iommu@lists.linux-foundation.org
> ---
> drivers/iommu/intel-iommu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Acked-by: Joerg Roedel <jroedel@suse.de>
>
> --- a/drivers/iommu/intel-iommu.c
> +++ b/drivers/iommu/intel-iommu.c
> @@ -4312,7 +4312,7 @@ int dmar_parse_one_atsr(struct acpi_dmar
> struct acpi_dmar_atsr *atsr;
> struct dmar_atsr_unit *atsru;
>
> - if (system_state != SYSTEM_BOOTING && !intel_iommu_enabled)
> + if (system_state >= SYSTEM_RUNNING && !intel_iommu_enabled)
> return 0;
>
> atsr = container_of(hdr, struct acpi_dmar_atsr, header);
> @@ -4562,7 +4562,7 @@ int dmar_iommu_notify_scope_dev(struct d
> struct acpi_dmar_atsr *atsr;
> struct acpi_dmar_reserved_memory *rmrr;
>
> - if (!intel_iommu_enabled && system_state != SYSTEM_BOOTING)
> + if (!intel_iommu_enabled && system_state >= SYSTEM_RUNNING)
> return 0;
>
> list_for_each_entry(rmrru, &dmar_rmrr_units, list) {
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch 11/18] iommu/of: Adjust system_state check
[not found] ` <20170514183613.331455858-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2017-05-15 10:45 ` Robin Murphy
@ 2017-05-15 14:42 ` Joerg Roedel
1 sibling, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2017-05-15 14:42 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Mark Rutland, Peter Zijlstra, LKML, Steven Rostedt,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Ingo Molnar
On Sun, May 14, 2017 at 08:27:27PM +0200, Thomas Gleixner wrote:
> To enable smp_processor_id() and might_sleep() debug checks earlier, it's
> required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING.
>
> Adjust the system_state check in of_iommu_driver_present() to handle the
> extra states.
>
> Signed-off-by: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
> Cc: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
> Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Acked-by: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-05-15 14:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170514182716.347236777@linutronix.de>
2017-05-14 18:27 ` [patch 10/18] iommu/vt-d: Adjust system_state checks Thomas Gleixner
2017-05-15 14:42 ` Joerg Roedel
2017-05-14 18:27 ` [patch 11/18] iommu/of: Adjust system_state check Thomas Gleixner
[not found] ` <20170514183613.331455858-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2017-05-15 10:45 ` Robin Murphy
2017-05-15 14:42 ` Joerg Roedel
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).