Omar Ramirez Luna | 1 May 19:47 2012

[PATCH 2/2] arm/dts: OMAP2+: Add mailbox nodes

Add nodes for mailbox DT, to interface with hwmods.

Signed-off-by: Omar Ramirez Luna <omar.luna <at> linaro.org>
---
 arch/arm/boot/dts/omap2.dtsi |    5 +++++
 arch/arm/boot/dts/omap3.dtsi |    5 +++++
 arch/arm/boot/dts/omap4.dtsi |    5 +++++
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/omap2.dtsi b/arch/arm/boot/dts/omap2.dtsi
index f2ab4ea..2175cc3 100644
--- a/arch/arm/boot/dts/omap2.dtsi
+++ b/arch/arm/boot/dts/omap2.dtsi
 <at>  <at>  -46,6 +46,11  <at>  <at> 
 			#interrupt-cells = <1>;
 		};

+		mailbox: mailbox <at> 48094000 {
+			compatible = "ti,omap2-mailbox";
+			ti,hwmods = "mailbox";
+		};
+
 		uart1: serial <at> 4806a000 {
 			compatible = "ti,omap2-uart";
 			ti,hwmods = "uart1";
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index c612135..540f6d6 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
 <at>  <at>  -69,6 +69,11  <at>  <at> 
(Continue reading)

Omar Ramirez Luna | 1 May 19:47 2012

[PATCH 1/2] OMAP: mailbox: add device tree support

Adapt driver to use DT if provided.

Signed-off-by: Omar Ramirez Luna <omar.luna <at> linaro.org>
---
 .../devicetree/bindings/arm/omap/mailbox.txt       |    9 +++++++++
 arch/arm/mach-omap2/devices.c                      |    3 +++
 arch/arm/mach-omap2/mailbox.c                      |   12 ++++++++++++
 3 files changed, 24 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/omap/mailbox.txt

diff --git a/Documentation/devicetree/bindings/arm/omap/mailbox.txt b/Documentation/devicetree/bindings/arm/omap/mailbox.txt
new file mode 100644
index 0000000..c57c0d5
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/omap/mailbox.txt
 <at>  <at>  -0,0 +1,9  <at>  <at> 
+OMAP Mailbox module
+
+Required properties:
+ compatible : should be "ti,omap2-mailbox" for OMAP2 mailbox
+ compatible : should be "ti,omap3-mailbox" for OMAP3 mailbox
+ compatible : should be "ti,omap4-mailbox" for OMAP4 mailbox
+
+Optional properties:
+ None
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index e433603..7a78063 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
 <at>  <at>  -281,6 +281,9  <at>  <at>  static inline void __init omap_init_mbox(void)
(Continue reading)

Omar Ramirez Luna | 1 May 19:47 2012

[PATCH 0/2] OMAP: mailbox initial device tree support

To allow mailbox driver to function with device tree.

Tested in OMAP4 and OMAP3. OMAP2 untested.

Omar Ramirez Luna (2):
  OMAP: mailbox: add device tree support
  arm/dts: OMAP2+: Add mailbox nodes

 .../devicetree/bindings/arm/omap/mailbox.txt       |    9 +++++++++
 arch/arm/boot/dts/omap2.dtsi                       |    5 +++++
 arch/arm/boot/dts/omap3.dtsi                       |    5 +++++
 arch/arm/boot/dts/omap4.dtsi                       |    5 +++++
 arch/arm/mach-omap2/devices.c                      |    3 +++
 arch/arm/mach-omap2/mailbox.c                      |   12 ++++++++++++
 6 files changed, 39 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/omap/mailbox.txt

--

-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Raghavendra K T | 1 May 22:20 2012
Picon

Re: [PATCH RFC V6 1/5] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

On 04/30/2012 01:14 PM, Raghavendra K T wrote:

>>> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
>>> index 4044ce0..7fc9be6 100644
>>> --- a/arch/x86/kvm/x86.c
>>> +++ b/arch/x86/kvm/x86.c
>>>  <at>  <at>  -2147,6 +2147,7  <at>  <at>  int kvm_dev_ioctl_check_extension(long ext)
>>> case KVM_CAP_ASYNC_PF:
>>> case KVM_CAP_GET_TSC_KHZ:
>>> case KVM_CAP_PCI_2_3:
>>> + case KVM_CAP_PV_UNHALT:
>>> r = 1;
>>> break;
>>> case KVM_CAP_COALESCED_MMIO:
>>
>> Redundant, since we can infer this from KVM_GET_SUPPORTED_CPUID. But
>> please indicate this in the documentation.
>>
>
> Ok. will mention that in documentation added for KVM_CAP_PV_UNHALT.
>

I think it is better to remove  KVM_CAP_PV_UNHALT itself and avoid
spamming CAP.. will do that in coming version.

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Bedia, Vaibhav | 2 May 07:42 2012
Picon

RE: [PATCH 0/2] OMAP: mailbox initial device tree support

Hi Omar,

On Tue, May 01, 2012 at 23:17:38, Omar Ramirez Luna wrote:
> To allow mailbox driver to function with device tree.
> 
> Tested in OMAP4 and OMAP3. OMAP2 untested.
>

I think the mailbox code needs a cleanup similar to what you
had proposed earlier [1] before the device tree support is added.

We probably need to decide whether the number of mailbox sub-modules
should be part of hwmod attribute or come from device tree. IMO the
static allocation of the mailboxes is better suited in the device-tree
data.

Regards,
Vaibhav

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2011-June/054582.html

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Raghavendra K T | 2 May 12:06 2012
Picon

[PATCH RFC V8 1/17] x86/spinlock: Replace pv spinlocks with pv ticketlocks

From: Jeremy Fitzhardinge <jeremy.fitzhardinge <at> citrix.com>

Rather than outright replacing the entire spinlock implementation in
order to paravirtualize it, keep the ticket lock implementation but add
a couple of pvops hooks on the slow patch (long spin on lock, unlocking
a contended lock).

Ticket locks have a number of nice properties, but they also have some
surprising behaviours in virtual environments.  They enforce a strict
FIFO ordering on cpus trying to take a lock; however, if the hypervisor
scheduler does not schedule the cpus in the correct order, the system can
waste a huge amount of time spinning until the next cpu can take the lock.

(See Thomas Friebel's talk "Prevent Guests from Spinning Around"
http://www.xen.org/files/xensummitboston08/LHP.pdf for more details.)

To address this, we add two hooks:
 - __ticket_spin_lock which is called after the cpu has been
   spinning on the lock for a significant number of iterations but has
   failed to take the lock (presumably because the cpu holding the lock
   has been descheduled).  The lock_spinning pvop is expected to block
   the cpu until it has been kicked by the current lock holder.
 - __ticket_spin_unlock, which on releasing a contended lock
   (there are more cpus with tail tickets), it looks to see if the next
   cpu is blocked and wakes it if so.

When compiled with CONFIG_PARAVIRT_SPINLOCKS disabled, a set of stub
functions causes all the extra code to go away.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge <at> citrix.com>
(Continue reading)

Raghavendra K T | 2 May 12:06 2012
Picon

[PATCH RFC V8 3/17] x86/ticketlock: Collapse a layer of functions

From: Jeremy Fitzhardinge <jeremy.fitzhardinge <at> citrix.com>

Now that the paravirtualization layer doesn't exist at the spinlock
level any more, we can collapse the __ticket_ functions into the arch_
functions.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge <at> citrix.com>
Tested-by: Attilio Rao <attilio.rao <at> citrix.com> 
Signed-off-by: Raghavendra K T <raghavendra.kt <at> linux.vnet.ibm.com>
---
 arch/x86/include/asm/spinlock.h |   35 +++++------------------------------
 1 files changed, 5 insertions(+), 30 deletions(-)
diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h
index 3e47608..ee4bbd4 100644
--- a/arch/x86/include/asm/spinlock.h
+++ b/arch/x86/include/asm/spinlock.h
 <at>  <at>  -79,7 +79,7  <at>  <at>  static __always_inline void __ticket_unlock_kick(struct arch_spinlock *lock,
  * in the high part, because a wide xadd increment of the low part would carry
  * up and contaminate the high part.
  */
-static __always_inline void __ticket_spin_lock(struct arch_spinlock *lock)
+static __always_inline void arch_spin_lock(struct arch_spinlock *lock)
 {
 	register struct __raw_tickets inc = { .tail = 1 };

 <at>  <at>  -99,7 +99,7  <at>  <at>  static __always_inline void __ticket_spin_lock(struct arch_spinlock *lock)
 out:	barrier();	/* make sure nothing creeps before the lock is taken */
 }

-static __always_inline int __ticket_spin_trylock(arch_spinlock_t *lock)
(Continue reading)

Raghavendra K T | 2 May 12:06 2012
Picon

[PATCH RFC V8 2/17] x86/ticketlock: Don't inline _spin_unlock when using paravirt spinlocks

From: Raghavendra K T <raghavendra.kt <at> linux.vnet.ibm.com> 

The code size expands somewhat, and its better to just call
a function rather than inline it.

Thanks Jeremy for original version of ARCH_NOINLINE_SPIN_UNLOCK config patch, 
which is simplified.

Suggested-by: Linus Torvalds <torvalds <at> linux-foundation.org>
Signed-off-by: Raghavendra K T <raghavendra.kt <at> linux.vnet.ibm.com>
---
 arch/x86/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1d14cc6..35eb2e4 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
 <at>  <at>  -597,6 +597,7  <at>  <at>  config PARAVIRT
 config PARAVIRT_SPINLOCKS
 	bool "Paravirtualization layer for spinlocks"
 	depends on PARAVIRT && SMP && EXPERIMENTAL
+	select UNINLINE_SPIN_UNLOCK
 	---help---
 	  Paravirtualized spinlocks allow a pvops backend to replace the
 	  spinlock implementation with something virtualization-friendly

Raghavendra K T | 2 May 12:06 2012
Picon

[PATCH RFC V8 0/17] Paravirtualized ticket spinlocks


This series replaces the existing paravirtualized spinlock mechanism
with a paravirtualized ticketlock mechanism. The series provides
implementation for both Xen and KVM.(targeted for 3.5 window)

Note: This needs debugfs changes patch that should be in Xen / linux-next
   https://lkml.org/lkml/2012/3/30/687

Changes in V8:
 - Reabsed patches to 3.4-rc4
 - Combined the KVM changes with ticketlock + Xen changes (Ingo)
 - Removed CAP_PV_UNHALT since it is redundant (Avi). But note that we
    need newer qemu which uses KVM_GET_SUPPORTED_CPUID ioctl.
 - Rewrite GET_MP_STATE condition (Avi)
 - Make pv_unhalt = bool (Avi)
 - Move out reset pv_unhalt code to vcpu_run from vcpu_block (Gleb)
 - Documentation changes (Rob Landley)
 - Have a printk to recognize that paravirt spinlock is enabled (Nikunj)
 - Move out kick hypercall out of CONFIG_PARAVIRT_SPINLOCK now
   so that it can be used for other optimizations such as 
   flush_tlb_ipi_others etc. (Nikunj)

Ticket locks have an inherent problem in a virtualized case, because
the vCPUs are scheduled rather than running concurrently (ignoring
gang scheduled vCPUs).  This can result in catastrophic performance
collapses when the vCPU scheduler doesn't schedule the correct "next"
vCPU, and ends up scheduling a vCPU which burns its entire timeslice
spinning.  (Note that this is not the same problem as lock-holder
preemption, which this series also addresses; that's also a problem,
but not catastrophic).
(Continue reading)

Raghavendra K T | 2 May 12:07 2012
Picon

[PATCH RFC V8 4/17] xen: Defer spinlock setup until boot CPU setup

From: Jeremy Fitzhardinge <jeremy.fitzhardinge <at> citrix.com>

There's no need to do it at very early init, and doing it there
makes it impossible to use the jump_label machinery.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge <at> citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk <at> oracle.com>
Signed-off-by: Raghavendra K T <raghavendra.kt <at> linux.vnet.ibm.com>
---
 arch/x86/xen/smp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 0503c0c..7dc400a 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
 <at>  <at>  -222,6 +222,7  <at>  <at>  static void __init xen_smp_prepare_boot_cpu(void)

 	xen_filter_cpu_maps();
 	xen_setup_vcpu_info_placement();
+	xen_init_spinlocks();
 }

 static void __init xen_smp_prepare_cpus(unsigned int max_cpus)
 <at>  <at>  -551,7 +552,6  <at>  <at>  void __init xen_smp_init(void)
 {
 	smp_ops = xen_smp_ops;
 	xen_fill_possible_map();
-	xen_init_spinlocks();
 }

(Continue reading)


Gmane