[PATCH v2 0/3] pm: Intel powerclamp driver

2012-11-26 Thread Jacob Pan
proof of concept. Jacob Pan (3): tick: export nohz tick idle symbols for module use x86/nmi: export local_touch_nmi() symbol for modules PM: Introduce Intel PowerClamp Driver Documentation/thermal/intel_powerclamp.txt | 307 +++ arch/x86/kernel/nmi.c |1

[PATCH v2 3/3] PM: Introduce Intel PowerClamp Driver

2012-11-26 Thread Jacob Pan
efficient in terms of performance per watt. Please refer to Documentation/thermal/intel_powerclamp.txt for more details. Signed-off-by: Arjan van de Ven Signed-off-by: Jacob Pan --- Documentation/thermal/intel_powerclamp.txt | 307 +++ drivers/thermal/Kconfig| 10

[PATCH v2 2/3] x86/nmi: export local_touch_nmi() symbol for modules

2012-11-26 Thread Jacob Pan
Signed-off-by: Jacob Pan --- arch/x86/kernel/nmi.c |1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index f84f5c5..6030805 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c @@ -509,3 +509,4 @@ void local_touch_nmi(void

[PATCH v2 1/3] tick: export nohz tick idle symbols for module use

2012-11-26 Thread Jacob Pan
Allow drivers such as intel_powerclamp to use these apis for turning on/off ticks during idle. Signed-off-by: Jacob Pan --- kernel/time/tick-sched.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index a402608..7c38f08 100644 --- a

[PATCH v3 0/3]

2012-11-26 Thread Jacob Pan
idea and driver, I have been refining driver in hope that they can be to be useful beyond a proof of concept. Jacob Pan (3): tick: export nohz tick idle symbols for module use x86/nmi: export local_touch_nmi() symbol for modules PM: Introduce Intel PowerClamp Driver Documentation/thermal

[PATCH v3 2/3] x86/nmi: export local_touch_nmi() symbol for modules

2012-11-26 Thread Jacob Pan
Signed-off-by: Jacob Pan --- arch/x86/kernel/nmi.c |1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index f84f5c5..6030805 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c @@ -509,3 +509,4 @@ void local_touch_nmi(void

[PATCH v3 1/3] tick: export nohz tick idle symbols for module use

2012-11-26 Thread Jacob Pan
Allow drivers such as intel_powerclamp to use these apis for turning on/off ticks during idle. Signed-off-by: Jacob Pan --- kernel/time/tick-sched.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index a402608..7c38f08 100644 --- a

[PATCH v3 3/3] PM: Introduce Intel PowerClamp Driver

2012-11-26 Thread Jacob Pan
efficient in terms of performance per watt. Please refer to Documentation/thermal/intel_powerclamp.txt for more details. Signed-off-by: Arjan van de Ven Signed-off-by: Jacob Pan --- Documentation/thermal/intel_powerclamp.txt | 307 +++ drivers/thermal/Kconfig| 10

Re: [PATCH v2 3/3] PM: Introduce Intel PowerClamp Driver

2012-11-27 Thread Jacob Pan
On Mon, 26 Nov 2012 15:27:25 -0800 Joe Perches wrote: > On Mon, 2012-11-26 at 06:37 -0800, Jacob Pan wrote: > > Intel PowerClamp driver performs synchronized idle injection across > > all online CPUs. The goal is to maintain a given package level > > C-state rati

[PATCH 0/1] RAPL (Running Average Power Limit) driver

2013-04-02 Thread Jacob Pan
RAPL power limit could result in silent failure. I don't have a good solution for that. 4. Data polling starts only when the following items are set - power limit - events Jacob Pan (1): Introduce Intel RAPL cooling device driver drivers/platform/x86/Kconfig |8 +

[PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Jacob Pan
org/lkml/2011/5/26/93 Unlike the patch above, which is mainly for monitoring, this driver focus on the control and usability by user applications. Signed-off-by: Jacob Pan --- drivers/platform/x86/Kconfig |8 + drivers/platform/x86/Makefile |1 + drivers/platform/x86/inte

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Jacob Pan
On Tue, 2 Apr 2013 16:00:42 -0700 Greg KH wrote: > > +#include "intel_rapl.h" > > +#include "../../../fs/sysfs/sysfs.h" > > WTF? > > Oh, that's a sure sign you are not doing something properly, if you > think it's ok to muck around with the internals of sysfs. > > There's a reason that file

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Jacob Pan
On Tue, 2 Apr 2013 16:00:42 -0700 Greg KH wrote: > And, one final complaint, never use "raw" kobjects, for loads of good > reasons, not the least being you just prevented userspace from seeing > what is happening with your devices. Use the driver model, that's > what it is there for, if you need

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Jacob Pan
On Tue, 2 Apr 2013 16:48:05 -0700 Greg KH wrote: > On Tue, Apr 02, 2013 at 04:33:57PM -0700, Jacob Pan wrote: > > On Tue, 2 Apr 2013 16:00:42 -0700 > > Greg KH wrote: > > > > > > +#include "intel_rapl.h" > > > > +#include "../../../f

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-02 Thread Jacob Pan
On Tue, 2 Apr 2013 17:13:00 -0700 Greg KH wrote: > On Tue, Apr 02, 2013 at 04:53:40PM -0700, Jacob Pan wrote: > > On Tue, 2 Apr 2013 16:00:42 -0700 > > Greg KH wrote: > > > > > And, one final complaint, never use "raw" kobjects, for loads of > >

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-03 Thread Jacob Pan
On Wed, 3 Apr 2013 09:35:09 -0700 Greg KH wrote: > On Tue, Apr 02, 2013 at 09:48:18PM -0700, Jacob Pan wrote: > > > Let's step back and start over, what exactly are you trying to > > > tell userspace? What data do you have that you need to express > > > to it

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-03 Thread Jacob Pan
On Wed, 3 Apr 2013 09:30:52 -0700 Greg KH wrote: > On Tue, Apr 02, 2013 at 05:17:14PM -0700, Jacob Pan wrote: > > On Tue, 2 Apr 2013 16:48:05 -0700 > > Greg KH wrote: > > > > > On Tue, Apr 02, 2013 at 04:33:57PM -0700, Jacob Pan wrote: > > > > On Tue,

[PATCH v2] RAPL (Running Average Power Limit) driver

2013-04-05 Thread Jacob Pan
since it is not as simple as deleting the advanced interfaces, I would have to do some setup based on best guesses. Jacob Pan (1): Introduce Intel RAPL cooling device driver Documentation/ABI/testing/sysfs-class-intel-rapl | 121 ++ drivers/platform/x86/Kconfig |9 + d

[PATCH v2] Introduce Intel RAPL cooling device driver

2013-04-05 Thread Jacob Pan
l.org/lkml/2011/5/26/93 Unlike the patch above, which is mainly for monitoring, this driver focus on the control and usability by user applications. Signed-off-by: Jacob Pan --- Documentation/ABI/testing/sysfs-class-intel-rapl | 121 ++ drivers/platform/x86/Kconfig |

Re: [PATCH 1/1] Introduce Intel RAPL cooling device driver

2013-04-05 Thread Jacob Pan
On Fri, 5 Apr 2013 13:23:09 -0700 Greg KH wrote: > On Wed, Apr 03, 2013 at 10:35:51AM -0700, Jacob Pan wrote: > > On Wed, 3 Apr 2013 09:35:09 -0700 > > Greg KH wrote: > > > > > On Tue, Apr 02, 2013 at 09:48:18PM -0700, Jacob Pan wrote: > > > > > Let

Re: [PATCH v2] Introduce Intel RAPL cooling device driver

2013-04-05 Thread Jacob Pan
On Fri, 05 Apr 2013 14:26:35 -0700 Joe Perches wrote: > > +/* in the order of enum rapl_primitives */ > > +static struct rapl_primitive_info rpi[] = { > > const? I do need to override one entry for a special case. The hardware uses a different bit location for the same lock functionality. The

Re: [PATCH 2/2][RFC] time : set broadcast irq affinity

2013-02-25 Thread Jacob Pan
On Mon, 25 Feb 2013 23:50:23 +0100 Daniel Lezcano wrote: > Do you mean a cpumask static variable ? and something like: > > if (!cpumask_test_cpu(cpu, &affinitymask)) { > cpumask_set_cpu(cpu, &affinitymask); > irq_set_affinity(bc->irq, &affinitymask) > } yeah. but i think you can use

Re: [PATCH 2/2][RFC] time : set broadcast irq affinity

2013-02-22 Thread Jacob Pan
On Thu, 21 Feb 2013 23:01:23 +0100 Daniel Lezcano wrote: > +/* > + * Set broadcast interrupt affinity > + */ > +static void tick_broadcast_set_affinity(struct clock_event_device > *bc, int cpu) +{ > + struct cpumask cpumask; > + > + if (!(bc->features & CLOCK_EVT_FEAT_DYNIRQ)) > +

Re: [PATCH v2 6/6] Introduce Intel RAPL power capping driver

2013-10-04 Thread Jacob Pan
On Fri, 04 Oct 2013 11:07:45 -0700 Joe Perches wrote: > On Fri, 2013-10-04 at 09:36 -0700, Srinivas Pandruvada wrote: > > The Intel Running Average Power Limit(RAPL) technology provides > > platform software with the ability to monitor, control, and get > > notifications on power usage. > [] > >

Re: [PATCH v2 6/6] Introduce Intel RAPL power capping driver

2013-10-04 Thread Jacob Pan
On Fri, 04 Oct 2013 15:14:22 -0700 Joe Perches wrote: > Isn't LIMIT1/WINDOW1 used as ull anyway? > It doesn't hurt to show that the value is also ull. sure, I will make that change in the next set. thanks, Jacob -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the b

[PATCH] thermal/intel_powerclamp: Add newer CPU models

2013-09-26 Thread Jacob Pan
This will enable intel_powerclamp driver on newer Intel CPUs including some Ivy Bridge and Haswell processors. Signed-off-by: Jacob Pan --- drivers/thermal/intel_powerclamp.c |5 + 1 file changed, 5 insertions(+) diff --git a/drivers/thermal/intel_powerclamp.c b/drivers/thermal

[PATCH 1/3] tick: export nohz tick idle symbols for module use

2012-11-12 Thread Jacob Pan
Allow drivers such as intel_powerclamp to use these apis for turning on/off ticks during idle. Signed-off-by: Jacob Pan --- kernel/time/tick-sched.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index a402608..7c38f08 100644 --- a

[PATCH 3/3] PM: Introduce Intel PowerClamp Driver

2012-11-12 Thread Jacob Pan
efficient in terms of performance per watt. Please refer to Documentation/thermal/intel_powerclamp.txt for more details. Signed-off-by: Arjan van de Ven Signed-off-by: Jacob Pan --- Documentation/thermal/intel_powerclamp.txt | 307 +++ drivers/thermal/Kconfig| 10

[PATCH 0/3] pm: Intel powerclamp driver

2012-11-12 Thread Jacob Pan
, calibration, scalability, and user interface. Please refer to the following file for more details. Documentation/thermal/intel_powerclamp.txt Arjan van de Ven created the original idea and driver, I have been refining driver in hope that they can be to be useful beyond a proof of concept. Jacob

[PATCH 2/3] x86/nmi: export local_touch_nmi() symbol for modules

2012-11-12 Thread Jacob Pan
Signed-off-by: Jacob Pan --- arch/x86/kernel/nmi.c |1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index f84f5c5..6030805 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c @@ -509,3 +509,4 @@ void local_touch_nmi(void

Re: [PATCH 3/3] PM: Introduce Intel PowerClamp Driver

2012-11-12 Thread Jacob Pan
On Mon, 12 Nov 2012 22:33:36 -0800 Joe Perches wrote: > > Intel PowerClamp driver performs synchronized idle injection across > > all online CPUs. The goal is to maintain a given package level > > C-state ratio. > > style trivia: they are all good catches. will fix in the next version. -- Th

Re: [PATCH 3/3] PM: Introduce Intel PowerClamp Driver

2012-11-13 Thread Jacob Pan
confused? > could you explain the part that is partially powerclamped? > Thanx, Paul [Jacob Pan] -- Thanks, Jacob -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.

Re: [PATCH 3/3] PM: Introduce Intel PowerClamp Driver

2012-11-13 Thread Jacob Pan
On Tue, 13 Nov 2012 16:08:54 -0800 Arjan van de Ven wrote: > > I think I know, but I feel the need to ask anyway. Why not tell > > RCU about the clamping? > > I don't mind telling RCU, but what cannot happen is a bunch of CPU > time suddenly getting used (since that is the opposite of what is

Re: [PATCH 3/3] PM: Introduce Intel PowerClamp Driver

2012-11-13 Thread Jacob Pan
On Tue, 13 Nov 2012 16:03:00 -0800 "Paul E. McKenney" wrote: > Just to make sure I am really understanding what is happening, let's > suppose we have a HZ=1000 system that has a few tasks that > occasionally run at prio 99. These tasks would run during the clamp > interval, but would (for exampl

[PATCH v4 0/3] PM: Intel PowerClamp driver

2013-01-03 Thread Jacob Pan
refining driver in hope that they can be to be useful beyond a proof of concept. Jacob Pan (3): tick: export nohz tick idle symbols for module use x86/nmi: export local_touch_nmi() symbol for modules PM: Introduce Intel PowerClamp Driver Documentation/thermal/intel_powerclamp.txt | 307

[PATCH v4 2/3] x86/nmi: export local_touch_nmi() symbol for modules

2013-01-03 Thread Jacob Pan
Signed-off-by: Jacob Pan --- arch/x86/kernel/nmi.c |1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index f84f5c5..6030805 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c @@ -509,3 +509,4 @@ void local_touch_nmi(void

[PATCH v4 3/3] PM: Introduce Intel PowerClamp Driver

2013-01-03 Thread Jacob Pan
efficient in terms of performance per watt. Please refer to Documentation/thermal/intel_powerclamp.txt for more details. Signed-off-by: Arjan van de Ven Signed-off-by: Jacob Pan --- Documentation/thermal/intel_powerclamp.txt | 307 +++ drivers/thermal/Kconfig| 10

[PATCH v4 1/3] tick: export nohz tick idle symbols for module use

2013-01-03 Thread Jacob Pan
Allow drivers such as intel_powerclamp to use these apis for turning on/off ticks during idle. Signed-off-by: Jacob Pan --- kernel/time/tick-sched.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index d58e552..a767757 100644 --- a

Re: [PATCH v4 3/3] PM: Introduce Intel PowerClamp Driver

2013-01-03 Thread Jacob Pan
On Thu, 03 Jan 2013 11:34:14 -0800 Joe Perches wrote: > On Thu, 2013-01-03 at 03:01 -0800, Jacob Pan wrote: > > Intel PowerClamp driver performs synchronized idle injection across > > all online CPUs. The goal is to maintain a given package level > > C-state ratio. > &g

[PATCH v5 1/3] tick: export nohz tick idle symbols for module use

2013-01-03 Thread Jacob Pan
Allow drivers such as intel_powerclamp to use these apis for turning on/off ticks during idle. Signed-off-by: Jacob Pan --- kernel/time/tick-sched.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index d58e552..a767757 100644 --- a

[PATCH v5 2/3] x86/nmi: export local_touch_nmi() symbol for modules

2013-01-03 Thread Jacob Pan
Signed-off-by: Jacob Pan --- arch/x86/kernel/nmi.c |1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index f84f5c5..6030805 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c @@ -509,3 +509,4 @@ void local_touch_nmi(void

[PATCH v5 0/3] PM: Intel PowerClamp driver

2013-01-03 Thread Jacob Pan
/intel_powerclamp.txt Arjan van de Ven created the original idea and driver, I have been refining driver in hope that they can be to be useful beyond a proof of concept. Jacob Pan (3): tick: export nohz tick idle symbols for module use x86/nmi: export local_touch_nmi() symbol for modules PM: Introduce

[PATCH v5 3/3] PM: Introduce Intel PowerClamp Driver

2013-01-03 Thread Jacob Pan
efficient in terms of performance per watt. Please refer to Documentation/thermal/intel_powerclamp.txt for more details. Signed-off-by: Arjan van de Ven Signed-off-by: Jacob Pan --- Documentation/thermal/intel_powerclamp.txt | 307 +++ drivers/thermal/Kconfig| 10

Re: [PATCH v5 3/3] PM: Introduce Intel PowerClamp Driver

2013-01-04 Thread jacob pan
On Thu, 03 Jan 2013 19:51:04 -0800 Joe Perches wrote: > On Thu, 2013-01-03 at 07:10 -0800, Jacob Pan wrote: > > Intel PowerClamp driver performs synchronized idle injection across > > all online CPUs. The goal is to maintain a given package level > > C-state ratio. >

[PATCH v6 2/3] x86/nmi: export local_touch_nmi() symbol for modules

2013-01-04 Thread Jacob Pan
Signed-off-by: Jacob Pan --- arch/x86/kernel/nmi.c |1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index f84f5c5..6030805 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c @@ -509,3 +509,4 @@ void local_touch_nmi(void

[PATCH v6 1/3] tick: export nohz tick idle symbols for module use

2013-01-04 Thread Jacob Pan
Allow drivers such as intel_powerclamp to use these apis for turning on/off ticks during idle. Signed-off-by: Jacob Pan --- kernel/time/tick-sched.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index d58e552..a767757 100644 --- a

[PATCH v6 0/3] PM: Intel PowerClamp driver

2013-01-04 Thread Jacob Pan
original idea and driver, I have been refining driver in hope that they can be to be useful beyond a proof of concept. Jacob Pan (3): tick: export nohz tick idle symbols for module use x86/nmi: export local_touch_nmi() symbol for modules PM: Introduce Intel PowerClamp Driver Documentation

[PATCH v6 3/3] PM: Introduce Intel PowerClamp Driver

2013-01-04 Thread Jacob Pan
efficient in terms of performance per watt. Please refer to Documentation/thermal/intel_powerclamp.txt for more details. Signed-off-by: Arjan van de Ven Signed-off-by: Jacob Pan --- Documentation/thermal/intel_powerclamp.txt | 307 +++ drivers/thermal/Kconfig| 10

[PATCH] x86/msr: add 64bit _on_cpu access functions

2013-08-01 Thread Jacob Pan
Having 64-bit MSR access methods on given CPU can avoid shifting and simplify MSR content manipulation. We already have other combinations of rdmsrl_xxx and wrmsrl_xxx but missing the _on_cpu version. Signed-off-by: Jacob Pan --- arch/x86/include/asm/msr.h | 22 arch/x86/lib

Re: [PATCH] x86/msr: add 64bit _on_cpu access functions

2013-08-01 Thread Jacob Pan
On Thu, 01 Aug 2013 12:31:07 -0700 "H. Peter Anvin" wrote: > The patch is fine but please use it asa preface to a patch series > that actually used these interfaces. will do. It will be used for upcoming Intel RAPL driver. I was hoping to avoid time consuming rebuild of the entire kernel when the

[PATCH v3 0/1] RAPL (Running Average Power Limit) driver

2013-04-09 Thread Jacob Pan
ndencies on X86 - misc cleanups Jacob Pan (1): Introduce Intel RAPL cooling device driver drivers/platform/x86/Kconfig |9 + drivers/platform/x86/Makefile |1 + drivers/platform/x86/intel_rapl.c | 764 + drivers/platform/x86/inte

[PATCH v3 1/1] Introduce Intel RAPL cooling device driver

2013-04-09 Thread Jacob Pan
ch is mainly for monitoring, this driver focus on the control and usability by user applications. Signed-off-by: Jacob Pan --- drivers/platform/x86/Kconfig |9 + drivers/platform/x86/Makefile |1 + drivers/platform/x86/intel_rapl.c | 764 + dr

Re: [PATCH v3 1/1] Introduce Intel RAPL cooling device driver

2013-04-09 Thread Jacob Pan
ve lots of repeated text. > greg k-h > -- > To unsubscribe from this list: send the line "unsubscribe > platform-driver-x86" in the body of a message to > majord...@vger.kernel.org More majordomo info at > http://vger.kernel.org/majordomo-info.html [Jacob Pan] -- Than

Re: [PATCH v3 1/1] Introduce Intel RAPL cooling device driver

2013-04-09 Thread Jacob Pan
On Tue, 09 Apr 2013 09:26:55 -0700 Joe Perches wrote: > On Tue, 2013-04-09 at 09:15 -0700, Jacob Pan wrote: > > On Tue, 9 Apr 2013 08:26:38 -0700 > > Greg Kroah-Hartman wrote: > > > > + if (NULL == rp->name || rp->flag & > > > > RAPL_PRIMI

Re: [PATCH v3 1/1] Introduce Intel RAPL cooling device driver

2013-04-09 Thread Jacob Pan
On Tue, 09 Apr 2013 09:00:37 -0700 Joe Perches wrote: > > +static int start_periodic_polling(void) > > +{ > > + if (polling_started) > > + goto out; > > + schedule_delayed_work(&rapl_polling_work, 0); > > + polling_started = true; > > Should polling_started be device specific (

[PATCH v4 0/1] RAPL (Running Average Power Limit) driver

2013-04-09 Thread Jacob Pan
- drop dependencies on X86 - misc cleanups Jacob Pan (1): Introduce Intel RAPL cooling device driver drivers/platform/x86/Kconfig |9 + drivers/platform/x86/Makefile |1 + drivers/platform/x86/intel_rapl.c | 889 ++

[PATCH v4 1/1] Introduce Intel RAPL cooling device driver

2013-04-09 Thread Jacob Pan
ch is mainly for monitoring, this driver focus on the control and usability by user applications. Signed-off-by: Jacob Pan --- drivers/platform/x86/Kconfig |9 + drivers/platform/x86/Makefile |1 + drivers/platform/x86/intel_rapl.c | 889 + 3

Re: [PATCH v2] Introduce Intel RAPL cooling device driver

2013-04-12 Thread Jacob Pan
On Fri, 5 Apr 2013 14:35:18 -0700 Greg Kroah-Hartman wrote: > On Fri, Apr 05, 2013 at 02:26:35PM -0700, Joe Perches wrote: > > On Fri, 2013-04-05 at 14:02 -0700, Jacob Pan wrote: > > > +static ssize_t store_event_control(struct device *dev, > > > +

Re: [PATCH 1/2] PCI: leave MEM and IO decoding disabled during 64-bit BAR sizing, too

2012-07-09 Thread Jacob Pan
On Mon, 09 Jul 2012 12:20:18 -0600 Bjorn Helgaas wrote: > After 253d2e5498, we disable MEM and IO decoding for most devices > while we size 32-bit BARs. However, we restore the original COMMAND > register before we size the upper 32 bits of 64-bit BARs, so we can > still cause a conflict. > > T

Re: [PATCH v6 3/3] PM: Introduce Intel PowerClamp Driver

2013-01-16 Thread jacob pan
On Wed, 16 Jan 2013 20:18:49 +0800 Zhang Rui wrote: > > +#include > > + > drivers/thermal/intel_powerclamp.c: In function ‘clamp_thread’: > drivers/thermal/intel_powerclamp.c:435:4: error: implicit declaration > of function ‘local_touch_nmi’ [-Werror=implicit-function-declaration] > > changin

[Update] [PATCH v6 3/3] PM: Introduce Intel PowerClamp Driver

2013-01-16 Thread Jacob Pan
Signed-off-by: Jacob Pan --- Need to include the proper nmi.h file such that local_touch_nmi is always declared. drivers/thermal/intel_powerclamp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/intel_powerclamp.c b/drivers/thermal/intel_powerclamp.c

[PATCH v7 3/3] PM: Introduce Intel PowerClamp Driver

2013-01-16 Thread Jacob Pan
efficient in terms of performance per watt. Please refer to Documentation/thermal/intel_powerclamp.txt for more details. Signed-off-by: Arjan van de Ven Signed-off-by: Jacob Pan --- Documentation/thermal/intel_powerclamp.txt | 307 +++ drivers/thermal/Kconfig| 10

Re: [PATCH] thermal/powerclamp: Prevent division by zero when counting interval

2016-08-04 Thread Jacob Pan
compensation = get_compensation(target_ratio); > - interval = > duration_jiffies*100/(target_ratio+compensation); > + compensated_ratio = target_ratio + > + get_compensation(target_ratio); > + if (compensated_ratio <= 0) > + compensated_ratio = 1; > + interval = duration_jiffies * 100 / > compensated_ratio; > /* align idle time */ > target_jiffies = roundup(jiffies, interval); [Jacob Pan]

Re: [PATCH v2] thermal/powerclamp: Prevent division by zero when counting interval

2016-08-05 Thread Jacob Pan
tio = 0; > end_power_clamp(); > > But I think that the zero division might happen also when target_ratio > is non-zero because the compensation might be negative. Therefore > we also check the sum of target_ratio and compensation explicitly. > > Also the compensated_rati

Re: [RFC 0/9] IOMMU driver support for shared virtual memory virtualization

2017-08-16 Thread Jacob Pan
On Wed, 16 Aug 2017 11:44:30 +0200 Joerg Roedel wrote: > On Tue, Jun 27, 2017 at 12:47:54PM -0700, Jacob Pan wrote: > > At the top level, three new IOMMU interfaces are introduced: > > - bind PASID table > > - passdown invalidation > > - per device IOMMU fault notif

Re: [v2,04/16] iommu/vt-d: support flushing more TLB types

2017-10-31 Thread Jacob Pan
On Thu, 26 Oct 2017 14:02:13 +0100 "Lukoshkov, Maksim" wrote: > On 10/6/2017 00:03, Jacob Pan wrote: > > Signed-off-by: Jacob Pan > > --- > > drivers/iommu/dmar.c| 53 > > ++--- > > drivers/iommu/intel-i

Re: [PATCH v2 08/16] iommu: introduce device fault data

2017-11-13 Thread Jacob Pan
On Mon, 13 Nov 2017 13:19:50 + Jean-Philippe Brucker wrote: > On 11/11/17 00:00, Jacob Pan wrote: > > On Fri, 10 Nov 2017 13:54:59 + > > Jean-Philippe Brucker wrote: > > > >> /* > >> * Note: I tried to synthesize what I believe would be us

Re: [PATCH v2 08/16] iommu: introduce device fault data

2017-11-13 Thread Jacob Pan
On Mon, 13 Nov 2017 13:06:24 + Jean-Philippe Brucker wrote: > On 10/11/17 22:18, Jacob Pan wrote: > > On Fri, 10 Nov 2017 13:54:59 + > > Jean-Philippe Brucker wrote: > > > >> On 09/11/17 19:36, Jacob Pan wrote: > >>> On Tue, 7 Nov 2017

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-11-06 Thread Jacob Pan
Joerg > > _______ > iommu mailing list > io...@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/iommu [Jacob Pan]

Re: [PATCH] tools/thermal: tmon: use pkg-config also for CFLAGS

2015-10-03 Thread Jacob Pan
On Fri, 2 Oct 2015 09:50:45 + Olaf Hering wrote: > The header might be in /usr/include/ncursesw, which is not > part of the standard include path. This fixes compile on openSUSE. > Acked:by: Jacob Pan thanks > Signed-off-by: Olaf Hering > --- > tools/thermal

Re: [PATCH v2 1/2] iommu/vt-d: add definitions for PFSID

2018-06-20 Thread Jacob Pan
Hi Joerg/David, Any comments on this? I will rebase to 18-rc1. Thanks, Jacob On Thu, 7 Jun 2018 09:56:59 -0700 Jacob Pan wrote: > When SRIOV VF device IOTLB is invalidated, we need to provide > the PF source ID such that IOMMU hardware can gauge the depth > of invalidation queue

Re: [PATCH v3 10/16] iommu: introduce device fault report API

2018-01-23 Thread Jacob Pan
On Thu, 18 Jan 2018 19:24:52 + Jean-Philippe Brucker wrote: > Hi Jacob, > > I've got minor comments after working with this patch, sorry for the > multiple replies > > On 17/11/17 18:55, Jacob Pan wrote: > [...] > > diff --git a/drivers/iommu/iommu.c b

Re: [PATCH v3 08/16] iommu: introduce device fault data

2018-01-11 Thread Jacob Pan
On Wed, 10 Jan 2018 11:41:58 + Jean-Philippe Brucker wrote: > Hi Jacob, > > On 17/11/17 18:55, Jacob Pan wrote: > [...] > > +/** > > + * struct iommu_fault_event - Generic per device fault data > > + * > > + * - PCI and non-PCI devices > > +

[PATCH v4 22/22] iommu: use sva invalidate and device fault trace event

2018-03-22 Thread Jacob Pan
For performance and debugging purposes, these trace events help analyzing device faults and passdown invalidations that interact with IOMMU subsystem. E.g. IOMMU::00:0a.0 type=2 reason=0 addr=0x007ff000 pasid=1 group=1 last=0 prot=1 Signed-off-by: Jacob Pan --- drivers/iommu/iommu.c

[PATCH v4 15/22] iommu/config: add build dependency for dmar

2018-03-22 Thread Jacob Pan
-off-by: Jacob Pan --- drivers/iommu/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index f3a2134..45db4cc 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@ -138,6 +138,7 @@ config AMD_IOMMU_V2 # Intel IOMMU support config

[PATCH v4 21/22] trace/iommu: add sva trace events

2018-03-22 Thread Jacob Pan
Signed-off-by: Jacob Pan --- include/trace/events/iommu.h | 112 +++ 1 file changed, 112 insertions(+) diff --git a/include/trace/events/iommu.h b/include/trace/events/iommu.h index 72b4582..e64eb29 100644 --- a/include/trace/events/iommu.h +++ b/include

[PATCH v4 10/22] iommu: introduce device fault data

2018-03-22 Thread Jacob Pan
ntrol. Therefore, the fault reasons can be reported are grouped and generalized based common specifications such as PCI ATS. Signed-off-by: Jacob Pan Signed-off-by: Jean-Philippe Brucker Signed-off-by: Liu, Yi L Signed-off-by: Ashok Raj --- include/linux/iommu.h

[PATCH v4 19/22] iommu/intel-svm: do not flush iotlb for viommu

2018-03-22 Thread Jacob Pan
vIOMMU passdown invalidation will be inclusive, PASID cache invalidation includes TLBs. See Intel VT-d Specification Ch 6.5.2.2 for details. Signed-off-by: Jacob Pan --- drivers/iommu/intel-svm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel-svm.c b

[PATCH v4 18/22] iommu/intel-svm: replace dev ops with fault report API

2018-03-22 Thread Jacob Pan
With the introduction of generic IOMMU device fault reporting API, we can replace the private fault callback functions with standard function and event data. Signed-off-by: Jacob Pan --- drivers/iommu/intel-svm.c | 7 +-- include/linux/intel-svm.h | 20 +++- 2 files changed

[PATCH v4 20/22] iommu/vt-d: add intel iommu page response function

2018-03-22 Thread Jacob Pan
This patch adds page response support for Intel VT-d. Generic response data is taken from the IOMMU API then parsed into VT-d specific response descriptor format. Signed-off-by: Jacob Pan --- drivers/iommu/intel-iommu.c | 47 + include/linux/intel

[PATCH v4 05/22] iommu: introduce iommu invalidate API function

2018-03-22 Thread Jacob Pan
itten into physical IOMMU, we must allow security check at various layers. Therefore, generic invalidation data format are proposed here, model specific IOMMU drivers need to convert them into their own format. Signed-off-by: Liu, Yi L Signed-off-by: Jean-Philippe Brucker Signed-off-by: Jacob Pan Sig

[PATCH v4 17/22] iommu/intel-svm: report device page request

2018-03-22 Thread Jacob Pan
: Jacob Pan Signed-off-by: Ashok Raj --- drivers/iommu/intel-svm.c | 71 --- include/linux/iommu.h | 1 + 2 files changed, 62 insertions(+), 10 deletions(-) diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel-svm.c index 99bc9bd..bdc702c

[PATCH v4 16/22] iommu/vt-d: report non-recoverable faults to device

2018-03-22 Thread Jacob Pan
interrupt remapping which has to be set up early before threaded IRQ is available. This patch adds an option and a workqueue such that when faults are requested, DMAR fault IRQ handler can use the IOMMU fault reporting API to report. Signed-off-by: Jacob Pan Signed-off-by: Liu, Yi L Signed-off-by

[PATCH v4 14/22] iommu: handle page response timeout

2018-03-22 Thread Jacob Pan
timer expires but not included in this patch. We need to consider the life cycle of page groupd ID to prevent confusion with reused group ID by a device. For now, a warning message provides clue of such failure. Signed-off-by: Jacob Pan Signed-off-by: Ashok Raj --- drivers/iommu/iommu.c | 60

[PATCH v4 06/22] iommu/vt-d: add definitions for PFSID

2018-03-22 Thread Jacob Pan
and tracking PFSID. Signed-off-by: Jacob Pan --- include/linux/intel-iommu.h | 4 1 file changed, 4 insertions(+) diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index e4a16dc..0e3b618 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h

[PATCH v4 11/22] driver core: add per device iommu param

2018-03-22 Thread Jacob Pan
here by Greg KH and Joerg. The name iommu_param is chosen here since iommu_data has been used. Suggested-by: Greg Kroah-Hartman Signed-off-by: Jacob Pan Signed-off-by: Jean-Philippe Brucker Link: https://lkml.org/lkml/2017/10/6/81 --- include/linux/device.h | 3 +++ 1 file changed, 3

[PATCH v4 13/22] iommu: introduce page response function

2018-03-22 Thread Jacob Pan
. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Jacob Pan Link: https://lkml.org/lkml/2017/12/7/1725 --- drivers/iommu/iommu.c | 45 include/linux/iommu.h | 52 +++ 2 files changed, 97 insertions

[PATCH v4 01/22] iommu: introduce bind_pasid_table API function

2018-03-22 Thread Jacob Pan
ble of assigned devices. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Liu, Yi L Signed-off-by: Ashok Raj Signed-off-by: Jacob Pan --- drivers/iommu/iommu.c | 19 +++ include/linux/iommu.h | 24 include/uapi/linux/iommu.

[PATCH v4 08/22] iommu/vt-d: support flushing more translation cache types

2018-03-22 Thread Jacob Pan
When Shared Virtual Memory is exposed to a guest via vIOMMU, extended IOTLB invalidation may be passed down from outside IOMMU subsystems. This patch adds invalidation functions that can be used for additional translation cache types. Signed-off-by: Jacob Pan --- drivers/iommu/dmar.c

[PATCH v4 12/22] iommu: introduce device fault report API

2018-03-22 Thread Jacob Pan
ernel users - DMA & IRQ remapping (TBD) The original idea was brought up by David Woodhouse and discussions summarized at https://lwn.net/Articles/608914/. Signed-off-by: Jacob Pan Signed-off-by: Ashok Raj Signed-off-by: Jean-Philippe Brucker --- drivers/iommu/iomm

[PATCH v4 07/22] iommu/vt-d: fix dev iotlb pfsid use

2018-03-22 Thread Jacob Pan
PFSID should be used in the invalidation descriptor for flushing device IOTLBs on SRIOV VFs. Signed-off-by: Jacob Pan --- drivers/iommu/dmar.c| 6 +++--- drivers/iommu/intel-iommu.c | 16 +++- include/linux/intel-iommu.h | 5 ++--- 3 files changed, 20 insertions(+), 7

[PATCH v4 09/22] iommu/vt-d: add svm/sva invalidate function

2018-03-22 Thread Jacob Pan
device handle, host IOMMU driver can replace certain fields before submit to the invalidation queue. Signed-off-by: Liu, Yi L Signed-off-by: Ashok Raj Signed-off-by: Jacob Pan --- drivers/iommu/intel-iommu.c | 170 1 file changed, 170 insertions

[PATCH v4 03/22] iommu/vt-d: add a flag for pasid table bound status

2018-03-22 Thread Jacob Pan
Adding a flag in device domain into to track whether a guest or user PASID table is bound to a device. Signed-off-by: Jacob Pan --- include/linux/intel-iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index 13b44bb..e4a16dc

[PATCH v4 04/22] iommu/vt-d: add bind_pasid_table function

2018-03-22 Thread Jacob Pan
table pointer (GPA) and size. Device context table entry is modified by Intel IOMMU specific bind_pasid_table function. This will turn on nesting mode and matching translation type. The unbind operation restores default context mapping. Signed-off-by: Jacob Pan Signed-off-by: Liu, Yi L Signed-off

[PATCH v4 00/22] IOMMU and VT-d driver support for Shared Virtual Address (SVA)

2018-03-22 Thread Jacob Pan
t/response communications between host IOMMU and guest or other in-kernel users. - Added unrecoverable fault reporting to DMAR - Use threaded IRQ function for DMAR fault interrupt and fault reporting Jacob Pan (21): iommu: introduce bind_pasid_table API function iommu/

[PATCH v4 02/22] iommu/vt-d: move device_domain_info to header

2018-03-22 Thread Jacob Pan
Allow both intel-iommu.c and dmar.c to access device_domain_info. Prepare for additional per device arch data used in TLB flush function Signed-off-by: Jacob Pan --- drivers/iommu/intel-iommu.c | 18 -- include/linux/intel-iommu.h | 19 +++ 2 files changed, 19

[PATCH v5 07/23] iommu/vt-d: fix dev iotlb pfsid use

2018-05-11 Thread Jacob Pan
PFSID should be used in the invalidation descriptor for flushing device IOTLBs on SRIOV VFs. Signed-off-by: Jacob Pan --- drivers/iommu/dmar.c| 6 +++--- drivers/iommu/intel-iommu.c | 16 +++- include/linux/intel-iommu.h | 5 ++--- 3 files changed, 20 insertions(+), 7

[PATCH v5 05/23] iommu: introduce iommu invalidate API function

2018-05-11 Thread Jacob Pan
itten into physical IOMMU, we must allow security check at various layers. Therefore, generic invalidation data format are proposed here, model specific IOMMU drivers need to convert them into their own format. Signed-off-by: Liu, Yi L Signed-off-by: Jean-Philippe Brucker Signed-off-by: Jacob Pan Sig

[PATCH v5 20/23] iommu/intel-svm: do not flush iotlb for viommu

2018-05-11 Thread Jacob Pan
vIOMMU passdown invalidation will be inclusive, PASID cache invalidation includes TLBs. See Intel VT-d Specification Ch 6.5.2.2 for details. Signed-off-by: Jacob Pan --- drivers/iommu/intel-svm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel-svm.c b

[PATCH v5 23/23] iommu: use sva invalidate and device fault trace event

2018-05-11 Thread Jacob Pan
For performance and debugging purposes, these trace events help analyzing device faults and passdown invalidations that interact with IOMMU subsystem. E.g. IOMMU::00:0a.0 type=2 reason=0 addr=0x007ff000 pasid=1 group=1 last=0 prot=1 Signed-off-by: Jacob Pan --- drivers/iommu/iommu.c

  1   2   3   4   5   6   7   8   9   10   >