LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] powerpc: move the cpu_has_feature to a separate file
From: Kevin Hao @ 2013-09-02  5:45 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc
In-Reply-To: <1378100726-32545-1-git-send-email-haokexin@gmail.com>

We plan to use jump label for cpu_has_feature. In order to implement
this we need to include the linux/jump_label.h in asm/cputable.h.
But it seems that asm/cputable.h is so basic header file for ppc that
it is almost included by all the other header files. The including of
the linux/jump_label.h will introduces various recursive inclusion.
And it is very hard to fix that. So we choose to move the function
cpu_has_feature to a separate header file before using the jump label
for it. No functional change.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
v2: Update the commit log to replace the jump_label_base.h with jump_label.h.

 arch/powerpc/include/asm/cacheflush.h   |  1 +
 arch/powerpc/include/asm/cpufeatures.h  | 14 ++++++++++++++
 arch/powerpc/include/asm/cputable.h     |  8 --------
 arch/powerpc/include/asm/cputime.h      |  1 +
 arch/powerpc/include/asm/dbell.h        |  1 +
 arch/powerpc/include/asm/dcr-native.h   |  1 +
 arch/powerpc/include/asm/mman.h         |  1 +
 arch/powerpc/include/asm/time.h         |  1 +
 arch/powerpc/kernel/align.c             |  1 +
 arch/powerpc/kernel/irq.c               |  1 +
 arch/powerpc/kernel/process.c           |  1 +
 arch/powerpc/kernel/setup-common.c      |  1 +
 arch/powerpc/kernel/setup_32.c          |  1 +
 arch/powerpc/kernel/smp.c               |  1 +
 arch/powerpc/oprofile/op_model_rs64.c   |  1 +
 arch/powerpc/platforms/cell/pervasive.c |  1 +
 arch/powerpc/xmon/ppc-dis.c             |  1 +
 17 files changed, 29 insertions(+), 8 deletions(-)
 create mode 100644 arch/powerpc/include/asm/cpufeatures.h

diff --git a/arch/powerpc/include/asm/cacheflush.h b/arch/powerpc/include/asm/cacheflush.h
index 5b93122..8d2d4c3 100644
--- a/arch/powerpc/include/asm/cacheflush.h
+++ b/arch/powerpc/include/asm/cacheflush.h
@@ -11,6 +11,7 @@
 
 #include <linux/mm.h>
 #include <asm/cputable.h>
+#include <asm/cpufeatures.h>
 
 /*
  * No cache flushing is required when address mappings are changed,
diff --git a/arch/powerpc/include/asm/cpufeatures.h b/arch/powerpc/include/asm/cpufeatures.h
new file mode 100644
index 0000000..37650db
--- /dev/null
+++ b/arch/powerpc/include/asm/cpufeatures.h
@@ -0,0 +1,14 @@
+#ifndef __ASM_POWERPC_CPUFEATURES_H
+#define __ASM_POWERPC_CPUFEATURES_H
+
+#include <asm/cputable.h>
+
+static inline int cpu_has_feature(unsigned long feature)
+{
+	return (CPU_FTRS_ALWAYS & feature) ||
+	       (CPU_FTRS_POSSIBLE
+		& cur_cpu_spec->cpu_features
+		& feature);
+}
+
+#endif /* __ASM_POWERPC_CPUFEATURE_H */
diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h
index 0d4939b..ca177b2 100644
--- a/arch/powerpc/include/asm/cputable.h
+++ b/arch/powerpc/include/asm/cputable.h
@@ -546,14 +546,6 @@ enum {
 };
 #endif /* __powerpc64__ */
 
-static inline int cpu_has_feature(unsigned long feature)
-{
-	return (CPU_FTRS_ALWAYS & feature) ||
-	       (CPU_FTRS_POSSIBLE
-		& cur_cpu_spec->cpu_features
-		& feature);
-}
-
 #define HBP_NUM 1
 
 #endif /* !__ASSEMBLY__ */
diff --git a/arch/powerpc/include/asm/cputime.h b/arch/powerpc/include/asm/cputime.h
index 607559a..15481e2 100644
--- a/arch/powerpc/include/asm/cputime.h
+++ b/arch/powerpc/include/asm/cputime.h
@@ -28,6 +28,7 @@ static inline void setup_cputime_one_jiffy(void) { }
 #include <asm/div64.h>
 #include <asm/time.h>
 #include <asm/param.h>
+#include <asm/cpufeatures.h>
 
 typedef u64 __nocast cputime_t;
 typedef u64 __nocast cputime64_t;
diff --git a/arch/powerpc/include/asm/dbell.h b/arch/powerpc/include/asm/dbell.h
index 5fa6b20..2d9eae3 100644
--- a/arch/powerpc/include/asm/dbell.h
+++ b/arch/powerpc/include/asm/dbell.h
@@ -16,6 +16,7 @@
 #include <linux/threads.h>
 
 #include <asm/ppc-opcode.h>
+#include <asm/cpufeatures.h>
 
 #define PPC_DBELL_MSG_BRDCAST	(0x04000000)
 #define PPC_DBELL_TYPE(x)	(((x) & 0xf) << (63-36))
diff --git a/arch/powerpc/include/asm/dcr-native.h b/arch/powerpc/include/asm/dcr-native.h
index 7d2e623..3372650 100644
--- a/arch/powerpc/include/asm/dcr-native.h
+++ b/arch/powerpc/include/asm/dcr-native.h
@@ -24,6 +24,7 @@
 
 #include <linux/spinlock.h>
 #include <asm/cputable.h>
+#include <asm/cpufeatures.h>
 
 typedef struct {
 	unsigned int base;
diff --git a/arch/powerpc/include/asm/mman.h b/arch/powerpc/include/asm/mman.h
index 8565c25..74922ad 100644
--- a/arch/powerpc/include/asm/mman.h
+++ b/arch/powerpc/include/asm/mman.h
@@ -13,6 +13,7 @@
 
 #include <asm/cputable.h>
 #include <linux/mm.h>
+#include <asm/cpufeatures.h>
 
 /*
  * This file is included by linux/mman.h, so we can't use cacl_vm_prot_bits()
diff --git a/arch/powerpc/include/asm/time.h b/arch/powerpc/include/asm/time.h
index c1f2676..20e6ee9 100644
--- a/arch/powerpc/include/asm/time.h
+++ b/arch/powerpc/include/asm/time.h
@@ -18,6 +18,7 @@
 #include <linux/percpu.h>
 
 #include <asm/processor.h>
+#include <asm/cpufeatures.h>
 
 /* time.c */
 extern unsigned long tb_ticks_per_jiffy;
diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c
index a27ccd5..4f49cb1 100644
--- a/arch/powerpc/kernel/align.c
+++ b/arch/powerpc/kernel/align.c
@@ -25,6 +25,7 @@
 #include <asm/cputable.h>
 #include <asm/emulated_ops.h>
 #include <asm/switch_to.h>
+#include <asm/cpufeatures.h>
 
 struct aligninfo {
 	unsigned char len;
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index c69440c..164a9ad 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -75,6 +75,7 @@
 #endif
 #define CREATE_TRACE_POINTS
 #include <asm/trace.h>
+#include <asm/cpufeatures.h>
 
 DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
 EXPORT_PER_CPU_SYMBOL(irq_stat);
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 6f428da..cc65650 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -57,6 +57,7 @@
 #endif
 #include <linux/kprobes.h>
 #include <linux/kdebug.h>
+#include <asm/cpufeatures.h>
 
 /* Transactional Memory debug */
 #ifdef TM_DEBUG_SW
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 3d261c0..6e3e595 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -61,6 +61,7 @@
 #include <asm/cputhreads.h>
 #include <mm/mmu_decl.h>
 #include <asm/fadump.h>
+#include <asm/cpufeatures.h>
 
 #include "setup.h"
 
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index a4bbcae..304a85b 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -39,6 +39,7 @@
 #include <asm/udbg.h>
 #include <asm/mmu_context.h>
 #include <asm/epapr_hcalls.h>
+#include <asm/cpufeatures.h>
 
 #include "setup.h"
 
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 442d8e2..e793c0d 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -50,6 +50,7 @@
 #endif
 #include <asm/vdso.h>
 #include <asm/debug.h>
+#include <asm/cpufeatures.h>
 
 #ifdef DEBUG
 #include <asm/udbg.h>
diff --git a/arch/powerpc/oprofile/op_model_rs64.c b/arch/powerpc/oprofile/op_model_rs64.c
index 9b801b8..924b66c8 100644
--- a/arch/powerpc/oprofile/op_model_rs64.c
+++ b/arch/powerpc/oprofile/op_model_rs64.c
@@ -14,6 +14,7 @@
 #include <asm/processor.h>
 #include <asm/cputable.h>
 #include <asm/oprofile_impl.h>
+#include <asm/cpufeatures.h>
 
 #define dbg(args...)
 
diff --git a/arch/powerpc/platforms/cell/pervasive.c b/arch/powerpc/platforms/cell/pervasive.c
index d17e98b..036215b 100644
--- a/arch/powerpc/platforms/cell/pervasive.c
+++ b/arch/powerpc/platforms/cell/pervasive.c
@@ -35,6 +35,7 @@
 #include <asm/pgtable.h>
 #include <asm/reg.h>
 #include <asm/cell-regs.h>
+#include <asm/cpufeatures.h>
 
 #include "pervasive.h"
 
diff --git a/arch/powerpc/xmon/ppc-dis.c b/arch/powerpc/xmon/ppc-dis.c
index 89098f32..a642155 100644
--- a/arch/powerpc/xmon/ppc-dis.c
+++ b/arch/powerpc/xmon/ppc-dis.c
@@ -24,6 +24,7 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, US
 #include "ansidecl.h"
 #include "ppc.h"
 #include "dis-asm.h"
+#include <asm/cpufeatures.h>
 
 /* Print a PowerPC or POWER instruction.  */
 
-- 
1.8.3.1

^ permalink raw reply related

* [PATCH v2 0/3] powerpc: use jump label for cpu/mmu_has_feature
From: Kevin Hao @ 2013-09-02  5:45 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc

v2:
  - Rebase on git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
    since these patches have a dependence on patch 851cf6e7 (jump_label:
    Split jumplabel ratelimit)

  - Drop the first two patches in v1 since they are not needed due to
    the patch 851cf6e7.

v1:
Inspired by Benjamin Herrenschmidt, this patch series try to reduce the
cpu/mmu feature checking overhead by using jump label. The following is
the difference of the run path of cpu_has_feature between before and after
applying these patches:

   before                             after
  addis   r10,r2,1                   b xxx
  addi    r9,r10,-2280               b xxx (This will also be omitted if the
  ld	  r9,0(r9)                          feature is not set)
  ld	  r9,16(r9)
  rldicl. r8,r9,55,63
  beq     c000000000037c94

This patch series passed the build test for almost all the defconfig of ppc.
There does have some broken for some configs. But they are not related to this
change. This also passed allyesconfig for x86. Boot test on p2020rdb and
p5020ds boards.

Kevin Hao (3):
  powerpc: move the cpu_has_feature to a separate file
  powerpc: use the jump label for cpu_has_feature
  powerpc: use jump label for mmu_has_feature

 arch/powerpc/include/asm/cacheflush.h   |  1 +
 arch/powerpc/include/asm/cpufeatures.h  | 41 +++++++++++++++++++++++++++++++
 arch/powerpc/include/asm/cputable.h     |  8 ------
 arch/powerpc/include/asm/cputime.h      |  1 +
 arch/powerpc/include/asm/dbell.h        |  1 +
 arch/powerpc/include/asm/dcr-native.h   |  1 +
 arch/powerpc/include/asm/mman.h         |  1 +
 arch/powerpc/include/asm/mmu.h          | 19 +++++++++++++++
 arch/powerpc/include/asm/time.h         |  1 +
 arch/powerpc/kernel/align.c             |  1 +
 arch/powerpc/kernel/cputable.c          | 43 +++++++++++++++++++++++++++++++++
 arch/powerpc/kernel/irq.c               |  1 +
 arch/powerpc/kernel/process.c           |  1 +
 arch/powerpc/kernel/setup-common.c      |  1 +
 arch/powerpc/kernel/setup_32.c          |  1 +
 arch/powerpc/kernel/smp.c               |  1 +
 arch/powerpc/oprofile/op_model_rs64.c   |  1 +
 arch/powerpc/platforms/cell/pervasive.c |  1 +
 arch/powerpc/xmon/ppc-dis.c             |  1 +
 19 files changed, 118 insertions(+), 8 deletions(-)
 create mode 100644 arch/powerpc/include/asm/cpufeatures.h

-- 
1.8.3.1

^ permalink raw reply

* Re: [PATCH] powerpc: Work around gcc miscompilation of __pa() on 64-bit
From: Benjamin Herrenschmidt @ 2013-09-02  5:06 UTC (permalink / raw)
  To: Alan Modra; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20130902023110.GV3430@bubble.grove.modra.org>

On Mon, 2013-09-02 at 12:01 +0930, Alan Modra wrote:
> > No, if you don't have a reloc that can represent this, then the proper
> > fix is to use the existing relocs to load the original symbol address
> > into a register, then *generate* the appropriate 64-bit addition on top
> > of it.
> 
> I already have a gcc fix to do exactly that.  My "proper fix" comment
> was more to do with the general case.  For example, when linking a
> huge object that overflows _HA relocs right now we silently generate
> bad code.

Ah that is nice indeed :-) In that case I assume we can't have the offset
itself be part of the TOC :-) Chicken or egg ?

Not sure what's the right fix here is, we don't want to always reserve
enough instructions "space" to do a full 64-bit offset load...

Ben.

^ permalink raw reply

* Re: [PATCH V2 0/6] perf: New conditional branch filter
From: Anshuman Khandual @ 2013-09-02  3:37 UTC (permalink / raw)
  To: Stephane Eranian
  Cc: Sukadev Bhattiprolu, LKML, Arnaldo Carvalho de Melo,
	Linux PPC dev, ellerman, michael.neuling
In-Reply-To: <CABPqkBS2AD873tHnyCHeC7uwsJdP1V6=8WGUTHG+R0z2pphHjQ@mail.gmail.com>

On 08/30/2013 05:18 PM, Stephane Eranian wrote:
> 2013/8/30 Anshuman Khandual <khandual@linux.vnet.ibm.com>
>> >
>> >         This patchset is the re-spin of the original branch stack sampling
>> > patchset which introduced new PERF_SAMPLE_BRANCH_COND filter. This patchset
>> > also enables SW based branch filtering support for PPC64 platforms which have
>> > branch stack sampling support. With this new enablement, the branch filter support
>> > for PPC64 platforms have been extended to include all these combinations discussed
>> > below with a sample test application program.
>> >
>> >
> I am trying to understand which HW has support for capturing the
> branches: PPC7 or PPC8.
> Then it seems you're saying that only PPC8 has the filtering support.
> On PPC7 you use the
> SW filter. Did I get this right?
> 
> I will look at the patch set.
> 

Hey Stephane,

POWER7 does not have BHRB support required to capture the branches. Right
now its only POWER8 (which has BHRB) can capture branches in HW. It has some
PMU level branch filters and rest we have implemented in SW. But these SW
filters cannot be applied in POWER7 as it does not support branch stack 
sampling because of lack of BHRB. I have mentioned PPC64 support in the
sense that this SW filtering code could be used in existing or future generation
powerpc processors which would have PMU support for branch stack sampling. My
apologies if the description for the patchset was ambiguous.

Regards
Anshuman

^ permalink raw reply

* Re: [PATCH v9 12/13] KVM: PPC: Add support for IOMMU in-kernel handling
From: Alexey Kardashevskiy @ 2013-09-02  3:14 UTC (permalink / raw)
  To: Gleb Natapov
  Cc: kvm, Alexander Graf, kvm-ppc, linux-kernel, linux-mm,
	Paul Mackerras, Paolo Bonzini, linuxppc-dev, David Gibson
In-Reply-To: <20130901120609.GJ22899@redhat.com>

On 09/01/2013 10:06 PM, Gleb Natapov wrote:
> On Wed, Aug 28, 2013 at 06:50:41PM +1000, Alexey Kardashevskiy wrote:
>> This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT
>> and H_STUFF_TCE requests targeted an IOMMU TCE table without passing
>> them to user space which saves time on switching to user space and back.
>>
>> Both real and virtual modes are supported. The kernel tries to
>> handle a TCE request in the real mode, if fails it passes the request
>> to the virtual mode to complete the operation. If it a virtual mode
>> handler fails, the request is passed to user space.
>>
>> The first user of this is VFIO on POWER. Trampolines to the VFIO external
>> user API functions are required for this patch.
>>
>> This adds a "SPAPR TCE IOMMU" KVM device to associate a logical bus
>> number (LIOBN) with an VFIO IOMMU group fd and enable in-kernel handling
>> of map/unmap requests. The device supports a single attribute which is
>> a struct with LIOBN and IOMMU fd. When the attribute is set, the device
>> establishes the connection between KVM and VFIO.
>>
>> Tests show that this patch increases transmission speed from 220MB/s
>> to 750..1020MB/s on 10Gb network (Chelsea CXGB3 10Gb ethernet card).
>>
>> Signed-off-by: Paul Mackerras <paulus@samba.org>
>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>
>> ---
>>
>> Changes:
>> v9:
>> * KVM_CAP_SPAPR_TCE_IOMMU ioctl to KVM replaced with "SPAPR TCE IOMMU"
>> KVM device
>> * release_spapr_tce_table() is not shared between different TCE types
>> * reduced the patch size by moving VFIO external API
>> trampolines to separate patche
>> * moved documentation from Documentation/virtual/kvm/api.txt to
>> Documentation/virtual/kvm/devices/spapr_tce_iommu.txt
>>
>> v8:
>> * fixed warnings from check_patch.pl
>>
>> 2013/07/11:
>> * removed multiple #ifdef IOMMU_API as IOMMU_API is always enabled
>> for KVM_BOOK3S_64
>> * kvmppc_gpa_to_hva_and_get also returns host phys address. Not much sense
>> for this here but the next patch for hugepages support will use it more.
>>
>> 2013/07/06:
>> * added realmode arch_spin_lock to protect TCE table from races
>> in real and virtual modes
>> * POWERPC IOMMU API is changed to support real mode
>> * iommu_take_ownership and iommu_release_ownership are protected by
>> iommu_table's locks
>> * VFIO external user API use rewritten
>> * multiple small fixes
>>
>> 2013/06/27:
>> * tce_list page is referenced now in order to protect it from accident
>> invalidation during H_PUT_TCE_INDIRECT execution
>> * added use of the external user VFIO API
>>
>> 2013/06/05:
>> * changed capability number
>> * changed ioctl number
>> * update the doc article number
>>
>> 2013/05/20:
>> * removed get_user() from real mode handlers
>> * kvm_vcpu_arch::tce_tmp usage extended. Now real mode handler puts there
>> translated TCEs, tries realmode_get_page() on those and if it fails, it
>> passes control over the virtual mode handler which tries to finish
>> the request handling
>> * kvmppc_lookup_pte() now does realmode_get_page() protected by BUSY bit
>> on a page
>> * The only reason to pass the request to user mode now is when the user mode
>> did not register TCE table in the kernel, in all other cases the virtual mode
>> handler is expected to do the job
>> ---
>>  .../virtual/kvm/devices/spapr_tce_iommu.txt        |  37 +++
>>  arch/powerpc/include/asm/kvm_host.h                |   4 +
>>  arch/powerpc/kvm/book3s_64_vio.c                   | 310 ++++++++++++++++++++-
>>  arch/powerpc/kvm/book3s_64_vio_hv.c                | 122 ++++++++
>>  arch/powerpc/kvm/powerpc.c                         |   1 +
>>  include/linux/kvm_host.h                           |   1 +
>>  virt/kvm/kvm_main.c                                |   5 +
>>  7 files changed, 477 insertions(+), 3 deletions(-)
>>  create mode 100644 Documentation/virtual/kvm/devices/spapr_tce_iommu.txt
>>
>> diff --git a/Documentation/virtual/kvm/devices/spapr_tce_iommu.txt b/Documentation/virtual/kvm/devices/spapr_tce_iommu.txt
>> new file mode 100644
>> index 0000000..4bc8fc3
>> --- /dev/null
>> +++ b/Documentation/virtual/kvm/devices/spapr_tce_iommu.txt
>> @@ -0,0 +1,37 @@
>> +SPAPR TCE IOMMU device
>> +
>> +Capability: KVM_CAP_SPAPR_TCE_IOMMU
>> +Architectures: powerpc
>> +
>> +Device type supported: KVM_DEV_TYPE_SPAPR_TCE_IOMMU
>> +
>> +Groups:
>> +  KVM_DEV_SPAPR_TCE_IOMMU_ATTR_LINKAGE
>> +  Attributes: single attribute with pair { LIOBN, IOMMU fd}
>> +
>> +This is completely made up device which provides API to link
>> +logical bus number (LIOBN) and IOMMU group. The user space has
>> +to create a new SPAPR TCE IOMMU device per a logical bus.
>> +
> Why not have one device that can handle multimple links?


I can do that. If I make it so, it won't even look as a device at all, just
some weird interface to KVM but ok. What bothers me is it is just a
question what I will have to do next. Because I can easily predict a
suggestion to move kvmppc_spapr_tce_table's (a links list) from
kvm->arch.spapr_tce_tables to that device but I cannot do that for obvious
compatibility reasons caused by the fact that the list is already used for
emulated devices (for the starter - they need mmap()).

Or supporting all IOMMU links (and leaving emulated stuff as is) in on
"device" is the last thing I have to do and then you'll ack the patch?



>> +LIOBN is a PCI bus identifier from PPC64-server (sPAPR) DMA hypercalls
>> +(H_PUT_TCE, H_PUT_TCE_INDIRECT, H_STUFF_TCE).
>> +IOMMU group is a minimal isolated device set which can be passed to
>> +the user space via VFIO.
>> +
>> +Right after creation the device is in uninitlized state and requires
>> +a KVM_DEV_SPAPR_TCE_IOMMU_ATTR_LINKAGE attribute to be set.
>> +The attribute contains liobn, IOMMU fd and flags:
>> +
>> +struct kvm_create_spapr_tce_iommu_linkage {
>> +	__u64 liobn;
>> +	__u32 fd;
>> +	__u32 flags;
>> +};
>> +
>> +The user space creates the SPAPR TCE IOMMU device, obtains
>> +an IOMMU fd via VFIO ABI and sets the attribute to the SPAPR TCE IOMMU
>> +device. At the moment of setting the attribute, the SPAPR TCE IOMMU
>> +device links LIOBN to IOMMU group and makes necessary steps
>> +to make sure that VFIO group will not disappear before KVM destroys.
>> +
>> +The kernel advertises this feature via KVM_CAP_SPAPR_TCE_IOMMU capability.
> [skip]

Yes, I read the other comment. So roughly speaking I'll replace the
KVM_CAP_SPAPR_TCE_IOMMU check with the KVM_CAP_DEVICE_CTRL capability check
+ try to KVM_CREATE_DEVICE with the KVM_CREATE_DEVICE_TEST flag set, and we
are fine.


>> +
>> +static int kvmppc_spapr_tce_iommu_get_attr(struct kvm_device *dev,
>> +		struct kvm_device_attr *attr)
>> +{
>> +	struct kvmppc_spapr_tce_table *tt = dev->private;
>> +	void __user *argp = (void __user *) attr->addr;
>> +
>> +	switch (attr->group) {
>> +	case KVM_DEV_SPAPR_TCE_IOMMU_ATTR_LINKAGE:
>> +		if (!tt)
>> +			return -EFAULT;
> Does not look like correct error code to return here. EINVAL may be?

Yep, I'll fix this. Thanks.


>> +		if (copy_to_user(&tt->link, argp, sizeof(tt->link)))
>> +			return -EFAULT;
>> +		return 0;
>> +	}
>> +	return -ENXIO;
>> +}
>> +


-- 
Alexey

^ permalink raw reply

* Re: [PATCH] powerpc: Work around gcc miscompilation of __pa() on 64-bit
From: Alan Modra @ 2013-09-02  2:31 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <1378079952.3978.15.camel@pasglop>

On Mon, Sep 02, 2013 at 09:59:12AM +1000, Benjamin Herrenschmidt wrote:
> On Tue, 2013-08-27 at 16:42 +0930, Alan Modra wrote:
> > The proper fix is to define a whole slew of new relocations and reloc
> > specifiers, and modify everything to use them, but that seems like too
> > much bother.  I had ideas once upon a time to implement gas and ld
> > options that makes @ha and _HA report overflows, but haven't found one
> > of those round tuits.
> 
> No, if you don't have a reloc that can represent this, then the proper
> fix is to use the existing relocs to load the original symbol address
> into a register, then *generate* the appropriate 64-bit addition on top
> of it.

I already have a gcc fix to do exactly that.  My "proper fix" comment
was more to do with the general case.  For example, when linking a
huge object that overflows _HA relocs right now we silently generate
bad code.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply

* Re: [PATCH 1/5] jump_label: factor out the base part of jump_label.h to a separate file
From: Kevin Hao @ 2013-09-02  2:23 UTC (permalink / raw)
  To: Radim Krčmář; +Cc: linuxppc, linux-kernel
In-Reply-To: <20130830163732.GA2353@hpx.cz>

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

On Fri, Aug 30, 2013 at 06:37:33PM +0200, Radim Krčmář wrote:
> 2013-08-25 15:15+0800, Kevin Hao:
> > We plan to use the jump label in the cpu/mmu feature check on ppc.
> > This will need to include the jump_label.h in several very basic header
> > files of ppc which seems to be included by most of the other head
> > files implicitly or explicitly. But in the current jump_label.h,
> > it also include the "linux/workqueue.h" and this will cause recursive
> > inclusion. In order to fix this, we choose to factor out the base
> > part of jump_label.h to a separate header file and we can include
> > that file instead of jump_label.h to avoid the recursive inclusion.
> > No functional change.
> 
> "linux/workqueue.h" was included because of deferred keys and they are
> split into "linux/jump_label_ratelimit.h" to solve the same problem in
> paravirt ticket spinlock series.
> (still in -next: 851cf6e7 jump_label: Split jumplabel ratelimit)

OK. I will respin a new version based on this patch. Thanks for the
information Radim.

Thanks,
Kevin

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply

* Re: [PATCH] powerpc: Work around gcc miscompilation of __pa() on 64-bit
From: Benjamin Herrenschmidt @ 2013-09-01 23:59 UTC (permalink / raw)
  To: Alan Modra; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20130827071235.GQ3430@bubble.grove.modra.org>

On Tue, 2013-08-27 at 16:42 +0930, Alan Modra wrote:
> The proper fix is to define a whole slew of new relocations and reloc
> specifiers, and modify everything to use them, but that seems like too
> much bother.  I had ideas once upon a time to implement gas and ld
> options that makes @ha and _HA report overflows, but haven't found one
> of those round tuits.

No, if you don't have a reloc that can represent this, then the proper
fix is to use the existing relocs to load the original symbol address
into a register, then *generate* the appropriate 64-bit addition on top
of it.

The pointer has been cast to an integer before the addition, it's no
longer an object pointer and gcc shouldn't treat it as such, at which
point we are in the domain of normal integer arithmetics.

Cheers,
Ben.

^ permalink raw reply

* Re: [PATCH] hvc_vio: Do not override preferred console set by kernel parameter
From: Benjamin Herrenschmidt @ 2013-09-01 23:55 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: Bastian Blank, Greg Kroah-Hartman, Jiri Slaby, linuxppc-dev,
	Debian kernel maintainers
In-Reply-To: <1378052656.25743.33.camel@deadeye.wl.decadent.org.uk>

On Sun, 2013-09-01 at 17:24 +0100, Ben Hutchings wrote:
> The original version of this was done by Bastian Blank, who wrote:
> 
> > The problem is the following:
> > - Architecture specific code sets preferred console to something bogus.
> > - Command line handling tries to set preferred console but is overruled
> >   by the old setting.
> > 
> > The udbg0 console is a boot console and independant.
> 
> References: http://bugs.debian.org/492703
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> We've been carrying this in Debian for 5 years now, so it's about time
> it got reviewed.
> 
> I'm not convinced strstr() is the right way to check the command line
> (what if there's also a 'netconsole='?).

Also I think the problem should be solved elsewhere :-)

In the end, what that code is trying to do (as are all the other similar
instances) is to set "this is a good default in case nothing is
specified *or* what is specified doesn't actually exist".

Of course "doesn't exist" is tricky since the console could be provided
by a module loaded god knows when ... but in that case, maybe it does
make sense to stick to one of the known good defaults. After all, init
will fail without a tty ...

So I'm thinking we should in kernel/printk.c keep track of all those
"arch defaults" when console= is specified as "latent" consoles, and
right before starting init, if the specified one didn't work out (we
have no console with an associated tty), then go through those latent
ones and pick one that works.

Cheers,
Ben.

^ permalink raw reply

* [PATCH] hvc_vio: Do not override preferred console set by kernel parameter
From: Ben Hutchings @ 2013-09-01 16:24 UTC (permalink / raw)
  To: Jiri Slaby, Greg Kroah-Hartman
  Cc: Bastian Blank, linuxppc-dev, Debian kernel maintainers

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

The original version of this was done by Bastian Blank, who wrote:

> The problem is the following:
> - Architecture specific code sets preferred console to something bogus.
> - Command line handling tries to set preferred console but is overruled
>   by the old setting.
> 
> The udbg0 console is a boot console and independant.

References: http://bugs.debian.org/492703
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
We've been carrying this in Debian for 5 years now, so it's about time
it got reviewed.

I'm not convinced strstr() is the right way to check the command line
(what if there's also a 'netconsole='?).

Ben.

--- a/drivers/tty/hvc/hvc_vio.c
+++ b/drivers/tty/hvc/hvc_vio.c
@@ -48,6 +48,7 @@
 #include <asm/prom.h>
 #include <asm/hvsi.h>
 #include <asm/udbg.h>
+#include <asm/machdep.h>
 
 #include "hvc_console.h"
 
@@ -440,7 +441,9 @@
 	if (hvterm_priv0.proto == HV_PROTOCOL_HVSI)
 		goto out;
 #endif
-	add_preferred_console("hvc", 0, NULL);
+	/* Check whether the user has requested a different console. */
+	if (!strstr(cmd_line, "console="))
+		add_preferred_console("hvc", 0, NULL);
 	hvc_instantiate(0, 0, ops);
 out:
 	of_node_put(stdout_node);

-- 
Ben Hutchings
The most exhausting thing in life is being insincere. - Anne Morrow Lindberg

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply

* Re: [RFC, v1, 1/1] powerpc/85xx: Wakeup kexec smp slave cpus in second kernel
From: Yu Chen @ 2013-09-01 13:21 UTC (permalink / raw)
  To: Wang Shilong; +Cc: msm, linuxppc-dev
In-Reply-To: <5222fab5.YEgPB+c3ScR2enom%wangshilong1991@gmail.com>

thx, I think I've sent this patch using gmail web gui and got some
format problems, I'll try resend this patch tomorrow

2013/9/1 Wang Shilong <wangshilong1991@gmail.com>:
> Hello, Using checkpatch.pl, i get the following warnings(errors):
> ERROR: patch seems to be corrupt (line wrapped?)
> #108: FILE: :418:
> mpc85xx_smp_flush_dcache_kexec(struct kimage *image)
>
> ERROR: do not set execute permissions for source files
> #197: FILE: arch/powerpc/kernel/head_fsl_booke.S
>
> ERROR: do not set execute permissions for source files
> #217: FILE: arch/powerpc/kernel/misc_32.S
>
> ERROR: do not set execute permissions for source files
> #316: FILE: arch/powerpc/platforms/85xx/smp.c
>
> WARNING: externs should be avoided in .c files
> #329: FILE: arch/powerpc/platforms/85xx/smp.c:148:
> +extern void reserve_kexec_bootmem(unsigned long poll_phy, int size);
>
> WARNING: please, no spaces at the start of a line
> #336: FILE: arch/powerpc/platforms/85xx/smp.c:155:
> +    unsigned long kexec_poll_virt;$
>
> WARNING: please, no spaces at the start of a line
> #337: FILE: arch/powerpc/platforms/85xx/smp.c:156:
> +    unsigned long *kexec_magic_virt;$
>
> WARNING: please, no spaces at the start of a line
> #339: FILE: arch/powerpc/platforms/85xx/smp.c:158:
> +    if (!kexec_poll_phy ||$
>
> ERROR: code indent should use tabs where possible
> #340: FILE: arch/powerpc/platforms/85xx/smp.c:159:
> +            kexec_poll_phy >= __max_low_memory)$
>
> WARNING: please, no spaces at the start of a line
> #340: FILE: arch/powerpc/platforms/85xx/smp.c:159:
> +            kexec_poll_phy >= __max_low_memory)$
>
> ERROR: code indent should use tabs where possible
> #341: FILE: arch/powerpc/platforms/85xx/smp.c:160:
> +        return;$
>
> WARNING: please, no spaces at the start of a line
> #341: FILE: arch/powerpc/platforms/85xx/smp.c:160:
> +        return;$
>
> WARNING: please, no spaces at the start of a line
> #343: FILE: arch/powerpc/platforms/85xx/smp.c:162:
> +    kexec_poll_virt = (unsigned long)phys_to_virt(kexec_poll_phy);$
>
> WARNING: please, no spaces at the start of a line
> #344: FILE: arch/powerpc/platforms/85xx/smp.c:163:
> +    kexec_magic_virt = (unsigned long *)kexec_poll_virt;$
>
> WARNING: please, no spaces at the start of a line
> #346: FILE: arch/powerpc/platforms/85xx/smp.c:165:
> +    if (*kexec_magic_virt == KEXEC_MAGIC)$
>
> ERROR: code indent should use tabs where possible
> #347: FILE: arch/powerpc/platforms/85xx/smp.c:166:
> +        reserve_kexec_bootmem(kexec_poll_phy, KEXEC_RESERVE_LIMIT);$
>
> WARNING: please, no spaces at the start of a line
> #347: FILE: arch/powerpc/platforms/85xx/smp.c:166:
> +        reserve_kexec_bootmem(kexec_poll_phy, KEXEC_RESERVE_LIMIT);$
>
> WARNING: please, no spaces at the start of a line
> #355: FILE: arch/powerpc/platforms/85xx/smp.c:174:
> +    unsigned long  kexec_poll_virt;$
>
> WARNING: please, no spaces at the start of a line
> #356: FILE: arch/powerpc/platforms/85xx/smp.c:175:
> +    unsigned long *kexec_flag_virt;$
>
> WARNING: please, no spaces at the start of a line
> #357: FILE: arch/powerpc/platforms/85xx/smp.c:176:
> +    unsigned long *kexec_magic_virt;$
>
> WARNING: please, no spaces at the start of a line
> #358: FILE: arch/powerpc/platforms/85xx/smp.c:177:
> +    unsigned long *kexec_jump_virt;$
>
> WARNING: please, no spaces at the start of a line
> #361: FILE: arch/powerpc/platforms/85xx/smp.c:180:
> +    if (!kexec_poll_phy ||$
>
> ERROR: code indent should use tabs where possible
> #362: FILE: arch/powerpc/platforms/85xx/smp.c:181:
> +            kexec_poll_phy >= __max_low_memory)$
>
> WARNING: please, no spaces at the start of a line
> #362: FILE: arch/powerpc/platforms/85xx/smp.c:181:
> +            kexec_poll_phy >= __max_low_memory)$
>
> ERROR: code indent should use tabs where possible
> #363: FILE: arch/powerpc/platforms/85xx/smp.c:182:
> +        return -EBUSY;$
>
> WARNING: please, no spaces at the start of a line
> #363: FILE: arch/powerpc/platforms/85xx/smp.c:182:
> +        return -EBUSY;$
>
> WARNING: please, no spaces at the start of a line
> #365: FILE: arch/powerpc/platforms/85xx/smp.c:184:
> +    kexec_poll_virt = (unsigned long)phys_to_virt(kexec_poll_phy);$
>
> WARNING: please, no spaces at the start of a line
> #367: FILE: arch/powerpc/platforms/85xx/smp.c:186:
> +    kexec_magic_virt = (unsigned long *)kexec_poll_virt;$
>
> WARNING: please, no spaces at the start of a line
> #368: FILE: arch/powerpc/platforms/85xx/smp.c:187:
> +    kexec_flag_virt = (unsigned long *)kexec_poll_virt + 1;$
>
> WARNING: please, no spaces at the start of a line
> #369: FILE: arch/powerpc/platforms/85xx/smp.c:188:
> +    kexec_jump_virt = (unsigned long *)kexec_poll_virt + 2;$
>
> WARNING: please, no spaces at the start of a line
> #372: FILE: arch/powerpc/platforms/85xx/smp.c:191:
> +    if (*kexec_magic_virt == KEXEC_MAGIC) {$
>
> ERROR: code indent should use tabs where possible
> #373: FILE: arch/powerpc/platforms/85xx/smp.c:192:
> +        flush_dcache_range((ulong)kexec_poll_virt,$
>
> WARNING: please, no spaces at the start of a line
> #373: FILE: arch/powerpc/platforms/85xx/smp.c:192:
> +        flush_dcache_range((ulong)kexec_poll_virt,$
>
> ERROR: code indent should use tabs where possible
> #374: FILE: arch/powerpc/platforms/85xx/smp.c:193:
> +        (ulong)kexec_poll_virt + L1_CACHE_BYTES-1);$
>
> WARNING: please, no spaces at the start of a line
> #374: FILE: arch/powerpc/platforms/85xx/smp.c:193:
> +        (ulong)kexec_poll_virt + L1_CACHE_BYTES-1);$
>
> ERROR: code indent should use tabs where possible
> #375: FILE: arch/powerpc/platforms/85xx/smp.c:194:
> +        *kexec_jump_virt = (unsigned long)__early_start;$
>
> WARNING: please, no spaces at the start of a line
> #375: FILE: arch/powerpc/platforms/85xx/smp.c:194:
> +        *kexec_jump_virt = (unsigned long)__early_start;$
>
> ERROR: code indent should use tabs where possible
> #376: FILE: arch/powerpc/platforms/85xx/smp.c:195:
> +        mb();$
>
> WARNING: please, no spaces at the start of a line
> #376: FILE: arch/powerpc/platforms/85xx/smp.c:195:
> +        mb();$
>
> ERROR: code indent should use tabs where possible
> #377: FILE: arch/powerpc/platforms/85xx/smp.c:196:
> +        /*kick cpu[nr] up*/$
>
> ERROR: code indent should use tabs where possible
> #378: FILE: arch/powerpc/platforms/85xx/smp.c:197:
> +        *kexec_flag_virt = nr;$
>
> WARNING: please, no spaces at the start of a line
> #378: FILE: arch/powerpc/platforms/85xx/smp.c:197:
> +        *kexec_flag_virt = nr;$
>
> ERROR: code indent should use tabs where possible
> #379: FILE: arch/powerpc/platforms/85xx/smp.c:198:
> +        mb();$
>
> WARNING: please, no spaces at the start of a line
> #379: FILE: arch/powerpc/platforms/85xx/smp.c:198:
> +        mb();$
>
> ERROR: code indent should use tabs where possible
> #380: FILE: arch/powerpc/platforms/85xx/smp.c:199:
> +        flush_dcache_range((ulong)kexec_poll_virt,$
>
> WARNING: please, no spaces at the start of a line
> #380: FILE: arch/powerpc/platforms/85xx/smp.c:199:
> +        flush_dcache_range((ulong)kexec_poll_virt,$
>
> ERROR: code indent should use tabs where possible
> #381: FILE: arch/powerpc/platforms/85xx/smp.c:200:
> +        (ulong)kexec_poll_virt + L1_CACHE_BYTES-1);$
>
> WARNING: please, no spaces at the start of a line
> #381: FILE: arch/powerpc/platforms/85xx/smp.c:200:
> +        (ulong)kexec_poll_virt + L1_CACHE_BYTES-1);$
>
> ERROR: code indent should use tabs where possible
> #383: FILE: arch/powerpc/platforms/85xx/smp.c:202:
> +        return 0;$
>
> WARNING: please, no spaces at the start of a line
> #383: FILE: arch/powerpc/platforms/85xx/smp.c:202:
> +        return 0;$
>
> WARNING: please, no spaces at the start of a line
> #384: FILE: arch/powerpc/platforms/85xx/smp.c:203:
> +    }$
>
> WARNING: please, no spaces at the start of a line
> #385: FILE: arch/powerpc/platforms/85xx/smp.c:204:
> +    return -EBUSY;$
>
> WARNING: please, no spaces at the start of a line
> #396: FILE: arch/powerpc/platforms/85xx/smp.c:249:
> +    if (!mpc85xx_smp_kick_kexec_cpus(nr))$
>
> ERROR: code indent should use tabs where possible
> #397: FILE: arch/powerpc/platforms/85xx/smp.c:250:
> +        goto kexec_kick_done;$
>
> WARNING: please, no spaces at the start of a line
> #397: FILE: arch/powerpc/platforms/85xx/smp.c:250:
> +        goto kexec_kick_done;$
>
> WARNING: externs should be avoided in .c files
> #423: FILE: arch/powerpc/platforms/85xx/smp.c:345:
> +extern const unsigned int relocate_smp_cpu_size;
>
> ERROR: code indent should use tabs where possible
> #434: FILE: arch/powerpc/platforms/85xx/smp.c:353:
> +        mb();$
>
> WARNING: please, no spaces at the start of a line
> #434: FILE: arch/powerpc/platforms/85xx/smp.c:353:
> +        mb();$
>
> ERROR: code indent should use tabs where possible
> #436: FILE: arch/powerpc/platforms/85xx/smp.c:355:
> +        if (crash_shutdown) {$
>
> WARNING: please, no spaces at the start of a line
> #436: FILE: arch/powerpc/platforms/85xx/smp.c:355:
> +        if (crash_shutdown) {$
>
> WARNING: suspect code indent for conditional statements (8, 12)
> #436: FILE: arch/powerpc/platforms/85xx/smp.c:355:
> +        if (crash_shutdown) {
> +            /* loop forever */
>
> ERROR: code indent should use tabs where possible
> #437: FILE: arch/powerpc/platforms/85xx/smp.c:356:
> +            /* loop forever */$
>
> ERROR: code indent should use tabs where possible
> #438: FILE: arch/powerpc/platforms/85xx/smp.c:357:
> +            while (1)$
>
> WARNING: please, no spaces at the start of a line
> #438: FILE: arch/powerpc/platforms/85xx/smp.c:357:
> +            while (1)$
>
> ERROR: code indent should use tabs where possible
> #439: FILE: arch/powerpc/platforms/85xx/smp.c:358:
> +                ;$
>
> WARNING: please, no spaces at the start of a line
> #439: FILE: arch/powerpc/platforms/85xx/smp.c:358:
> +                ;$
>
> ERROR: code indent should use tabs where possible
> #440: FILE: arch/powerpc/platforms/85xx/smp.c:359:
> +        } else {$
>
> WARNING: please, no spaces at the start of a line
> #440: FILE: arch/powerpc/platforms/85xx/smp.c:359:
> +        } else {$
>
> ERROR: code indent should use tabs where possible
> #441: FILE: arch/powerpc/platforms/85xx/smp.c:360:
> +            while (!atomic_read(&kexec_ready_to_reboot))$
>
> WARNING: please, no spaces at the start of a line
> #441: FILE: arch/powerpc/platforms/85xx/smp.c:360:
> +            while (!atomic_read(&kexec_ready_to_reboot))$
>
> ERROR: code indent should use tabs where possible
> #442: FILE: arch/powerpc/platforms/85xx/smp.c:361:
> +                cpu_relax();$
>
> WARNING: please, no spaces at the start of a line
> #442: FILE: arch/powerpc/platforms/85xx/smp.c:361:
> +                cpu_relax();$
>
> ERROR: code indent should use tabs where possible
> #443: FILE: arch/powerpc/platforms/85xx/smp.c:362:
> +            /*flush destination*/$
>
> ERROR: code indent should use tabs where possible
> #444: FILE: arch/powerpc/platforms/85xx/smp.c:363:
> +            if (save_image)$
>
> WARNING: please, no spaces at the start of a line
> #444: FILE: arch/powerpc/platforms/85xx/smp.c:363:
> +            if (save_image)$
>
> ERROR: code indent should use tabs where possible
> #445: FILE: arch/powerpc/platforms/85xx/smp.c:364:
> +                mpc85xx_smp_flush_dcache_kexec(save_image, 1);$
>
> WARNING: please, no spaces at the start of a line
> #445: FILE: arch/powerpc/platforms/85xx/smp.c:364:
> +                mpc85xx_smp_flush_dcache_kexec(save_image, 1);$
>
> ERROR: code indent should use tabs where possible
> #447: FILE: arch/powerpc/platforms/85xx/smp.c:366:
> +            flush_icache_range(wait_code_buffer,$
>
> WARNING: please, no spaces at the start of a line
> #447: FILE: arch/powerpc/platforms/85xx/smp.c:366:
> +            flush_icache_range(wait_code_buffer,$
>
> ERROR: code indent should use tabs where possible
> #448: FILE: arch/powerpc/platforms/85xx/smp.c:367:
> +                wait_code_buffer + relocate_smp_cpu_size);$
>
> WARNING: please, no spaces at the start of a line
> #448: FILE: arch/powerpc/platforms/85xx/smp.c:367:
> +                wait_code_buffer + relocate_smp_cpu_size);$
>
> ERROR: code indent should use tabs where possible
> #449: FILE: arch/powerpc/platforms/85xx/smp.c:368:
> +            flush_dcache_range(wait_code_buffer,$
>
> WARNING: please, no spaces at the start of a line
> #449: FILE: arch/powerpc/platforms/85xx/smp.c:368:
> +            flush_dcache_range(wait_code_buffer,$
>
> ERROR: code indent should use tabs where possible
> #450: FILE: arch/powerpc/platforms/85xx/smp.c:369:
> +                wait_code_buffer + relocate_smp_cpu_size);$
>
> WARNING: please, no spaces at the start of a line
> #450: FILE: arch/powerpc/platforms/85xx/smp.c:369:
> +                wait_code_buffer + relocate_smp_cpu_size);$
>
> ERROR: code indent should use tabs where possible
> #452: FILE: arch/powerpc/platforms/85xx/smp.c:371:
> +            atomic_inc(&kexec_slave_finish);$
>
> WARNING: please, no spaces at the start of a line
> #452: FILE: arch/powerpc/platforms/85xx/smp.c:371:
> +            atomic_inc(&kexec_slave_finish);$
>
> ERROR: code indent should use tabs where possible
> #454: FILE: arch/powerpc/platforms/85xx/smp.c:373:
> +            ((void (*)(void)) wait_code_buffer)();$
>
> WARNING: please, no spaces at the start of a line
> #454: FILE: arch/powerpc/platforms/85xx/smp.c:373:
> +            ((void (*)(void)) wait_code_buffer)();$
>
> ERROR: code indent should use tabs where possible
> #455: FILE: arch/powerpc/platforms/85xx/smp.c:374:
> +            /* NOTREACHED */$
>
> ERROR: code indent should use tabs where possible
> #456: FILE: arch/powerpc/platforms/85xx/smp.c:375:
> +        }$
>
> WARNING: please, no spaces at the start of a line
> #456: FILE: arch/powerpc/platforms/85xx/smp.c:375:
> +        }$
>
> total: 39 errors, 53 warnings, 352 lines checked
>
> NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
>       scripts/cleanfile
>
> patch has style problems, please review.  If any of these errors
> are false positives report them to the maintainer, see
> CHECKPATCH in MAINTAINERS.
>
> Thanks, Wang
>
> Notic: this is an automated generated by shell script
> Any problems please contact: wangshilong1991@gmail.com



-- 
Yu Chen

^ permalink raw reply

* Re: [PATCH v9 12/13] KVM: PPC: Add support for IOMMU in-kernel handling
From: Gleb Natapov @ 2013-09-01 12:06 UTC (permalink / raw)
  To: Alexey Kardashevskiy
  Cc: kvm, Alexander Graf, kvm-ppc, linux-kernel, linux-mm,
	Paul Mackerras, Paolo Bonzini, linuxppc-dev, David Gibson
In-Reply-To: <1377679841-3822-1-git-send-email-aik@ozlabs.ru>

On Wed, Aug 28, 2013 at 06:50:41PM +1000, Alexey Kardashevskiy wrote:
> This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT
> and H_STUFF_TCE requests targeted an IOMMU TCE table without passing
> them to user space which saves time on switching to user space and back.
> 
> Both real and virtual modes are supported. The kernel tries to
> handle a TCE request in the real mode, if fails it passes the request
> to the virtual mode to complete the operation. If it a virtual mode
> handler fails, the request is passed to user space.
> 
> The first user of this is VFIO on POWER. Trampolines to the VFIO external
> user API functions are required for this patch.
> 
> This adds a "SPAPR TCE IOMMU" KVM device to associate a logical bus
> number (LIOBN) with an VFIO IOMMU group fd and enable in-kernel handling
> of map/unmap requests. The device supports a single attribute which is
> a struct with LIOBN and IOMMU fd. When the attribute is set, the device
> establishes the connection between KVM and VFIO.
> 
> Tests show that this patch increases transmission speed from 220MB/s
> to 750..1020MB/s on 10Gb network (Chelsea CXGB3 10Gb ethernet card).
> 
> Signed-off-by: Paul Mackerras <paulus@samba.org>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> 
> ---
> 
> Changes:
> v9:
> * KVM_CAP_SPAPR_TCE_IOMMU ioctl to KVM replaced with "SPAPR TCE IOMMU"
> KVM device
> * release_spapr_tce_table() is not shared between different TCE types
> * reduced the patch size by moving VFIO external API
> trampolines to separate patche
> * moved documentation from Documentation/virtual/kvm/api.txt to
> Documentation/virtual/kvm/devices/spapr_tce_iommu.txt
> 
> v8:
> * fixed warnings from check_patch.pl
> 
> 2013/07/11:
> * removed multiple #ifdef IOMMU_API as IOMMU_API is always enabled
> for KVM_BOOK3S_64
> * kvmppc_gpa_to_hva_and_get also returns host phys address. Not much sense
> for this here but the next patch for hugepages support will use it more.
> 
> 2013/07/06:
> * added realmode arch_spin_lock to protect TCE table from races
> in real and virtual modes
> * POWERPC IOMMU API is changed to support real mode
> * iommu_take_ownership and iommu_release_ownership are protected by
> iommu_table's locks
> * VFIO external user API use rewritten
> * multiple small fixes
> 
> 2013/06/27:
> * tce_list page is referenced now in order to protect it from accident
> invalidation during H_PUT_TCE_INDIRECT execution
> * added use of the external user VFIO API
> 
> 2013/06/05:
> * changed capability number
> * changed ioctl number
> * update the doc article number
> 
> 2013/05/20:
> * removed get_user() from real mode handlers
> * kvm_vcpu_arch::tce_tmp usage extended. Now real mode handler puts there
> translated TCEs, tries realmode_get_page() on those and if it fails, it
> passes control over the virtual mode handler which tries to finish
> the request handling
> * kvmppc_lookup_pte() now does realmode_get_page() protected by BUSY bit
> on a page
> * The only reason to pass the request to user mode now is when the user mode
> did not register TCE table in the kernel, in all other cases the virtual mode
> handler is expected to do the job
> ---
>  .../virtual/kvm/devices/spapr_tce_iommu.txt        |  37 +++
>  arch/powerpc/include/asm/kvm_host.h                |   4 +
>  arch/powerpc/kvm/book3s_64_vio.c                   | 310 ++++++++++++++++++++-
>  arch/powerpc/kvm/book3s_64_vio_hv.c                | 122 ++++++++
>  arch/powerpc/kvm/powerpc.c                         |   1 +
>  include/linux/kvm_host.h                           |   1 +
>  virt/kvm/kvm_main.c                                |   5 +
>  7 files changed, 477 insertions(+), 3 deletions(-)
>  create mode 100644 Documentation/virtual/kvm/devices/spapr_tce_iommu.txt
> 
> diff --git a/Documentation/virtual/kvm/devices/spapr_tce_iommu.txt b/Documentation/virtual/kvm/devices/spapr_tce_iommu.txt
> new file mode 100644
> index 0000000..4bc8fc3
> --- /dev/null
> +++ b/Documentation/virtual/kvm/devices/spapr_tce_iommu.txt
> @@ -0,0 +1,37 @@
> +SPAPR TCE IOMMU device
> +
> +Capability: KVM_CAP_SPAPR_TCE_IOMMU
> +Architectures: powerpc
> +
> +Device type supported: KVM_DEV_TYPE_SPAPR_TCE_IOMMU
> +
> +Groups:
> +  KVM_DEV_SPAPR_TCE_IOMMU_ATTR_LINKAGE
> +  Attributes: single attribute with pair { LIOBN, IOMMU fd}
> +
> +This is completely made up device which provides API to link
> +logical bus number (LIOBN) and IOMMU group. The user space has
> +to create a new SPAPR TCE IOMMU device per a logical bus.
> +
Why not have one device that can handle multimple links?

> +LIOBN is a PCI bus identifier from PPC64-server (sPAPR) DMA hypercalls
> +(H_PUT_TCE, H_PUT_TCE_INDIRECT, H_STUFF_TCE).
> +IOMMU group is a minimal isolated device set which can be passed to
> +the user space via VFIO.
> +
> +Right after creation the device is in uninitlized state and requires
> +a KVM_DEV_SPAPR_TCE_IOMMU_ATTR_LINKAGE attribute to be set.
> +The attribute contains liobn, IOMMU fd and flags:
> +
> +struct kvm_create_spapr_tce_iommu_linkage {
> +	__u64 liobn;
> +	__u32 fd;
> +	__u32 flags;
> +};
> +
> +The user space creates the SPAPR TCE IOMMU device, obtains
> +an IOMMU fd via VFIO ABI and sets the attribute to the SPAPR TCE IOMMU
> +device. At the moment of setting the attribute, the SPAPR TCE IOMMU
> +device links LIOBN to IOMMU group and makes necessary steps
> +to make sure that VFIO group will not disappear before KVM destroys.
> +
> +The kernel advertises this feature via KVM_CAP_SPAPR_TCE_IOMMU capability.
[skip]

> +
> +static int kvmppc_spapr_tce_iommu_get_attr(struct kvm_device *dev,
> +		struct kvm_device_attr *attr)
> +{
> +	struct kvmppc_spapr_tce_table *tt = dev->private;
> +	void __user *argp = (void __user *) attr->addr;
> +
> +	switch (attr->group) {
> +	case KVM_DEV_SPAPR_TCE_IOMMU_ATTR_LINKAGE:
> +		if (!tt)
> +			return -EFAULT;
Does not look like correct error code to return here. EINVAL may be?

> +		if (copy_to_user(&tt->link, argp, sizeof(tt->link)))
> +			return -EFAULT;
> +		return 0;
> +	}
> +	return -ENXIO;
> +}
> +

--
			Gleb.

^ permalink raw reply

* Re: [PATCH v9 04/13] KVM: PPC: reserve a capability and KVM device type for realmode VFIO
From: Gleb Natapov @ 2013-09-01 12:04 UTC (permalink / raw)
  To: Alexey Kardashevskiy
  Cc: kvm, Alexander Graf, kvm-ppc, linux-kernel, linux-mm,
	Paul Mackerras, Paolo Bonzini, linuxppc-dev, David Gibson
In-Reply-To: <5223276B.601@ozlabs.ru>

On Sun, Sep 01, 2013 at 09:39:23PM +1000, Alexey Kardashevskiy wrote:
> On 09/01/2013 09:27 PM, Gleb Natapov wrote:
> > On Wed, Aug 28, 2013 at 06:37:41PM +1000, Alexey Kardashevskiy wrote:
> >> This reserves a capability number for upcoming support
> >> of VFIO-IOMMU DMA operations in real mode.
> >>
> >> This reserves a number for a new "SPAPR TCE IOMMU" KVM device
> >> which is going to manage lifetime of SPAPR TCE IOMMU object.
> >>
> >> This defines an attribute of the "SPAPR TCE IOMMU" KVM device
> >> which is going to be used for initialization.
> >>
> >> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> >>
> >> ---
> >> Changes:
> >> v9:
> >> * KVM ioctl is replaced with "SPAPR TCE IOMMU" KVM device type with
> >> KVM_DEV_SPAPR_TCE_IOMMU_ATTR_LINKAGE attribute
> >>
> >> 2013/08/15:
> >> * fixed mistype in comments
> >> * fixed commit message which says what uses ioctls 0xad and 0xae
> >>
> >> 2013/07/16:
> >> * changed the number
> >>
> >> 2013/07/11:
> >> * changed order in a file, added comment about a gap in ioctl number
> >> ---
> >>  arch/powerpc/include/uapi/asm/kvm.h | 8 ++++++++
> >>  include/uapi/linux/kvm.h            | 2 ++
> >>  2 files changed, 10 insertions(+)
> >>
> >> diff --git a/arch/powerpc/include/uapi/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h
> >> index 0fb1a6e..c1ae1e5 100644
> >> --- a/arch/powerpc/include/uapi/asm/kvm.h
> >> +++ b/arch/powerpc/include/uapi/asm/kvm.h
> >> @@ -511,4 +511,12 @@ struct kvm_get_htab_header {
> >>  #define  KVM_XICS_MASKED		(1ULL << 41)
> >>  #define  KVM_XICS_PENDING		(1ULL << 42)
> >>  
> >> +/* SPAPR TCE IOMMU device specification */
> >> +struct kvm_create_spapr_tce_iommu_linkage {
> >> +	__u64 liobn;
> >> +	__u32 fd;
> >> +	__u32 flags;
> >> +};
> >> +#define KVM_DEV_SPAPR_TCE_IOMMU_ATTR_LINKAGE	0
> >> +
> >>  #endif /* __LINUX_KVM_POWERPC_H */
> >> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> >> index 99c2533..9d20630 100644
> >> --- a/include/uapi/linux/kvm.h
> >> +++ b/include/uapi/linux/kvm.h
> >> @@ -668,6 +668,7 @@ struct kvm_ppc_smmu_info {
> >>  #define KVM_CAP_IRQ_XICS 92
> >>  #define KVM_CAP_ARM_EL1_32BIT 93
> >>  #define KVM_CAP_SPAPR_MULTITCE 94
> >> +#define KVM_CAP_SPAPR_TCE_IOMMU 95
> >>  
> > You do not need capability to check for a device support. Device API
> > supports checking for that with KVM_CREATE_DEVICE_TEST flag to
> > KVM_CREATE_DEVICE ioctl.
> 
> Hm. I copied my device from KVM_DEV_TYPE_XICS and there is a capability for
> it - KVM_CAP_IRQ_XICS. Do We not need both capabilities? Or XICS is special
> in some way but SPAPR TCE IOMMU is not? I am confused, sorry.
> 
> 
Looking at it KVM_CAP_IRQ_XICS/KVM_CAP_IRQ_MPIC are not used to detect
device existence, but to link a device to vcpu. KVM_CAP_IRQ_MPIC was
introduced separately from MPIC device code.

--
			Gleb.

^ permalink raw reply

* Re: [PATCH v9 04/13] KVM: PPC: reserve a capability and KVM device type for realmode VFIO
From: Alexey Kardashevskiy @ 2013-09-01 11:39 UTC (permalink / raw)
  To: Gleb Natapov
  Cc: kvm, Alexander Graf, kvm-ppc, linux-kernel, linux-mm,
	Paul Mackerras, Paolo Bonzini, linuxppc-dev, David Gibson
In-Reply-To: <20130901112729.GI22899@redhat.com>

On 09/01/2013 09:27 PM, Gleb Natapov wrote:
> On Wed, Aug 28, 2013 at 06:37:41PM +1000, Alexey Kardashevskiy wrote:
>> This reserves a capability number for upcoming support
>> of VFIO-IOMMU DMA operations in real mode.
>>
>> This reserves a number for a new "SPAPR TCE IOMMU" KVM device
>> which is going to manage lifetime of SPAPR TCE IOMMU object.
>>
>> This defines an attribute of the "SPAPR TCE IOMMU" KVM device
>> which is going to be used for initialization.
>>
>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>
>> ---
>> Changes:
>> v9:
>> * KVM ioctl is replaced with "SPAPR TCE IOMMU" KVM device type with
>> KVM_DEV_SPAPR_TCE_IOMMU_ATTR_LINKAGE attribute
>>
>> 2013/08/15:
>> * fixed mistype in comments
>> * fixed commit message which says what uses ioctls 0xad and 0xae
>>
>> 2013/07/16:
>> * changed the number
>>
>> 2013/07/11:
>> * changed order in a file, added comment about a gap in ioctl number
>> ---
>>  arch/powerpc/include/uapi/asm/kvm.h | 8 ++++++++
>>  include/uapi/linux/kvm.h            | 2 ++
>>  2 files changed, 10 insertions(+)
>>
>> diff --git a/arch/powerpc/include/uapi/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h
>> index 0fb1a6e..c1ae1e5 100644
>> --- a/arch/powerpc/include/uapi/asm/kvm.h
>> +++ b/arch/powerpc/include/uapi/asm/kvm.h
>> @@ -511,4 +511,12 @@ struct kvm_get_htab_header {
>>  #define  KVM_XICS_MASKED		(1ULL << 41)
>>  #define  KVM_XICS_PENDING		(1ULL << 42)
>>  
>> +/* SPAPR TCE IOMMU device specification */
>> +struct kvm_create_spapr_tce_iommu_linkage {
>> +	__u64 liobn;
>> +	__u32 fd;
>> +	__u32 flags;
>> +};
>> +#define KVM_DEV_SPAPR_TCE_IOMMU_ATTR_LINKAGE	0
>> +
>>  #endif /* __LINUX_KVM_POWERPC_H */
>> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
>> index 99c2533..9d20630 100644
>> --- a/include/uapi/linux/kvm.h
>> +++ b/include/uapi/linux/kvm.h
>> @@ -668,6 +668,7 @@ struct kvm_ppc_smmu_info {
>>  #define KVM_CAP_IRQ_XICS 92
>>  #define KVM_CAP_ARM_EL1_32BIT 93
>>  #define KVM_CAP_SPAPR_MULTITCE 94
>> +#define KVM_CAP_SPAPR_TCE_IOMMU 95
>>  
> You do not need capability to check for a device support. Device API
> supports checking for that with KVM_CREATE_DEVICE_TEST flag to
> KVM_CREATE_DEVICE ioctl.

Hm. I copied my device from KVM_DEV_TYPE_XICS and there is a capability for
it - KVM_CAP_IRQ_XICS. Do We not need both capabilities? Or XICS is special
in some way but SPAPR TCE IOMMU is not? I am confused, sorry.


> 
>>  #ifdef KVM_CAP_IRQ_ROUTING
>>  
>> @@ -843,6 +844,7 @@ struct kvm_device_attr {
>>  #define KVM_DEV_TYPE_FSL_MPIC_20	1
>>  #define KVM_DEV_TYPE_FSL_MPIC_42	2
>>  #define KVM_DEV_TYPE_XICS		3
>> +#define KVM_DEV_TYPE_SPAPR_TCE_IOMMU	4
>>  
>>  /*
>>   * ioctls for VM fds
>> -- 
>> 1.8.4.rc4
> 
> --
> 			Gleb.
> 


-- 
Alexey

^ permalink raw reply

* Re: [PATCH v9 04/13] KVM: PPC: reserve a capability and KVM device type for realmode VFIO
From: Gleb Natapov @ 2013-09-01 11:27 UTC (permalink / raw)
  To: Alexey Kardashevskiy
  Cc: kvm, Alexander Graf, kvm-ppc, linux-kernel, linux-mm,
	Paul Mackerras, Paolo Bonzini, linuxppc-dev, David Gibson
In-Reply-To: <1377679070-3515-5-git-send-email-aik@ozlabs.ru>

On Wed, Aug 28, 2013 at 06:37:41PM +1000, Alexey Kardashevskiy wrote:
> This reserves a capability number for upcoming support
> of VFIO-IOMMU DMA operations in real mode.
> 
> This reserves a number for a new "SPAPR TCE IOMMU" KVM device
> which is going to manage lifetime of SPAPR TCE IOMMU object.
> 
> This defines an attribute of the "SPAPR TCE IOMMU" KVM device
> which is going to be used for initialization.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> 
> ---
> Changes:
> v9:
> * KVM ioctl is replaced with "SPAPR TCE IOMMU" KVM device type with
> KVM_DEV_SPAPR_TCE_IOMMU_ATTR_LINKAGE attribute
> 
> 2013/08/15:
> * fixed mistype in comments
> * fixed commit message which says what uses ioctls 0xad and 0xae
> 
> 2013/07/16:
> * changed the number
> 
> 2013/07/11:
> * changed order in a file, added comment about a gap in ioctl number
> ---
>  arch/powerpc/include/uapi/asm/kvm.h | 8 ++++++++
>  include/uapi/linux/kvm.h            | 2 ++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/arch/powerpc/include/uapi/asm/kvm.h b/arch/powerpc/include/uapi/asm/kvm.h
> index 0fb1a6e..c1ae1e5 100644
> --- a/arch/powerpc/include/uapi/asm/kvm.h
> +++ b/arch/powerpc/include/uapi/asm/kvm.h
> @@ -511,4 +511,12 @@ struct kvm_get_htab_header {
>  #define  KVM_XICS_MASKED		(1ULL << 41)
>  #define  KVM_XICS_PENDING		(1ULL << 42)
>  
> +/* SPAPR TCE IOMMU device specification */
> +struct kvm_create_spapr_tce_iommu_linkage {
> +	__u64 liobn;
> +	__u32 fd;
> +	__u32 flags;
> +};
> +#define KVM_DEV_SPAPR_TCE_IOMMU_ATTR_LINKAGE	0
> +
>  #endif /* __LINUX_KVM_POWERPC_H */
> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> index 99c2533..9d20630 100644
> --- a/include/uapi/linux/kvm.h
> +++ b/include/uapi/linux/kvm.h
> @@ -668,6 +668,7 @@ struct kvm_ppc_smmu_info {
>  #define KVM_CAP_IRQ_XICS 92
>  #define KVM_CAP_ARM_EL1_32BIT 93
>  #define KVM_CAP_SPAPR_MULTITCE 94
> +#define KVM_CAP_SPAPR_TCE_IOMMU 95
>  
You do not need capability to check for a device support. Device API
supports checking for that with KVM_CREATE_DEVICE_TEST flag to
KVM_CREATE_DEVICE ioctl.

>  #ifdef KVM_CAP_IRQ_ROUTING
>  
> @@ -843,6 +844,7 @@ struct kvm_device_attr {
>  #define KVM_DEV_TYPE_FSL_MPIC_20	1
>  #define KVM_DEV_TYPE_FSL_MPIC_42	2
>  #define KVM_DEV_TYPE_XICS		3
> +#define KVM_DEV_TYPE_SPAPR_TCE_IOMMU	4
>  
>  /*
>   * ioctls for VM fds
> -- 
> 1.8.4.rc4

--
			Gleb.

^ permalink raw reply

* Re:  [RFC, v1, 1/1] powerpc/85xx: Wakeup kexec smp slave cpus in second kernel
From: Wang Shilong @ 2013-09-01  8:28 UTC (permalink / raw)
  To: Yu Chen; +Cc: msm, linuxppc-dev, Wang Shilong

Hello, Using checkpatch.pl, i get the following warnings(errors):
ERROR: patch seems to be corrupt (line wrapped?)
#108: FILE: :418:
mpc85xx_smp_flush_dcache_kexec(struct kimage *image)

ERROR: do not set execute permissions for source files
#197: FILE: arch/powerpc/kernel/head_fsl_booke.S

ERROR: do not set execute permissions for source files
#217: FILE: arch/powerpc/kernel/misc_32.S

ERROR: do not set execute permissions for source files
#316: FILE: arch/powerpc/platforms/85xx/smp.c

WARNING: externs should be avoided in .c files
#329: FILE: arch/powerpc/platforms/85xx/smp.c:148:
+extern void reserve_kexec_bootmem(unsigned long poll_phy, int size);

WARNING: please, no spaces at the start of a line
#336: FILE: arch/powerpc/platforms/85xx/smp.c:155:
+    unsigned long kexec_poll_virt;$

WARNING: please, no spaces at the start of a line
#337: FILE: arch/powerpc/platforms/85xx/smp.c:156:
+    unsigned long *kexec_magic_virt;$

WARNING: please, no spaces at the start of a line
#339: FILE: arch/powerpc/platforms/85xx/smp.c:158:
+    if (!kexec_poll_phy ||$

ERROR: code indent should use tabs where possible
#340: FILE: arch/powerpc/platforms/85xx/smp.c:159:
+            kexec_poll_phy >= __max_low_memory)$

WARNING: please, no spaces at the start of a line
#340: FILE: arch/powerpc/platforms/85xx/smp.c:159:
+            kexec_poll_phy >= __max_low_memory)$

ERROR: code indent should use tabs where possible
#341: FILE: arch/powerpc/platforms/85xx/smp.c:160:
+        return;$

WARNING: please, no spaces at the start of a line
#341: FILE: arch/powerpc/platforms/85xx/smp.c:160:
+        return;$

WARNING: please, no spaces at the start of a line
#343: FILE: arch/powerpc/platforms/85xx/smp.c:162:
+    kexec_poll_virt = (unsigned long)phys_to_virt(kexec_poll_phy);$

WARNING: please, no spaces at the start of a line
#344: FILE: arch/powerpc/platforms/85xx/smp.c:163:
+    kexec_magic_virt = (unsigned long *)kexec_poll_virt;$

WARNING: please, no spaces at the start of a line
#346: FILE: arch/powerpc/platforms/85xx/smp.c:165:
+    if (*kexec_magic_virt == KEXEC_MAGIC)$

ERROR: code indent should use tabs where possible
#347: FILE: arch/powerpc/platforms/85xx/smp.c:166:
+        reserve_kexec_bootmem(kexec_poll_phy, KEXEC_RESERVE_LIMIT);$

WARNING: please, no spaces at the start of a line
#347: FILE: arch/powerpc/platforms/85xx/smp.c:166:
+        reserve_kexec_bootmem(kexec_poll_phy, KEXEC_RESERVE_LIMIT);$

WARNING: please, no spaces at the start of a line
#355: FILE: arch/powerpc/platforms/85xx/smp.c:174:
+    unsigned long  kexec_poll_virt;$

WARNING: please, no spaces at the start of a line
#356: FILE: arch/powerpc/platforms/85xx/smp.c:175:
+    unsigned long *kexec_flag_virt;$

WARNING: please, no spaces at the start of a line
#357: FILE: arch/powerpc/platforms/85xx/smp.c:176:
+    unsigned long *kexec_magic_virt;$

WARNING: please, no spaces at the start of a line
#358: FILE: arch/powerpc/platforms/85xx/smp.c:177:
+    unsigned long *kexec_jump_virt;$

WARNING: please, no spaces at the start of a line
#361: FILE: arch/powerpc/platforms/85xx/smp.c:180:
+    if (!kexec_poll_phy ||$

ERROR: code indent should use tabs where possible
#362: FILE: arch/powerpc/platforms/85xx/smp.c:181:
+            kexec_poll_phy >= __max_low_memory)$

WARNING: please, no spaces at the start of a line
#362: FILE: arch/powerpc/platforms/85xx/smp.c:181:
+            kexec_poll_phy >= __max_low_memory)$

ERROR: code indent should use tabs where possible
#363: FILE: arch/powerpc/platforms/85xx/smp.c:182:
+        return -EBUSY;$

WARNING: please, no spaces at the start of a line
#363: FILE: arch/powerpc/platforms/85xx/smp.c:182:
+        return -EBUSY;$

WARNING: please, no spaces at the start of a line
#365: FILE: arch/powerpc/platforms/85xx/smp.c:184:
+    kexec_poll_virt = (unsigned long)phys_to_virt(kexec_poll_phy);$

WARNING: please, no spaces at the start of a line
#367: FILE: arch/powerpc/platforms/85xx/smp.c:186:
+    kexec_magic_virt = (unsigned long *)kexec_poll_virt;$

WARNING: please, no spaces at the start of a line
#368: FILE: arch/powerpc/platforms/85xx/smp.c:187:
+    kexec_flag_virt = (unsigned long *)kexec_poll_virt + 1;$

WARNING: please, no spaces at the start of a line
#369: FILE: arch/powerpc/platforms/85xx/smp.c:188:
+    kexec_jump_virt = (unsigned long *)kexec_poll_virt + 2;$

WARNING: please, no spaces at the start of a line
#372: FILE: arch/powerpc/platforms/85xx/smp.c:191:
+    if (*kexec_magic_virt == KEXEC_MAGIC) {$

ERROR: code indent should use tabs where possible
#373: FILE: arch/powerpc/platforms/85xx/smp.c:192:
+        flush_dcache_range((ulong)kexec_poll_virt,$

WARNING: please, no spaces at the start of a line
#373: FILE: arch/powerpc/platforms/85xx/smp.c:192:
+        flush_dcache_range((ulong)kexec_poll_virt,$

ERROR: code indent should use tabs where possible
#374: FILE: arch/powerpc/platforms/85xx/smp.c:193:
+        (ulong)kexec_poll_virt + L1_CACHE_BYTES-1);$

WARNING: please, no spaces at the start of a line
#374: FILE: arch/powerpc/platforms/85xx/smp.c:193:
+        (ulong)kexec_poll_virt + L1_CACHE_BYTES-1);$

ERROR: code indent should use tabs where possible
#375: FILE: arch/powerpc/platforms/85xx/smp.c:194:
+        *kexec_jump_virt = (unsigned long)__early_start;$

WARNING: please, no spaces at the start of a line
#375: FILE: arch/powerpc/platforms/85xx/smp.c:194:
+        *kexec_jump_virt = (unsigned long)__early_start;$

ERROR: code indent should use tabs where possible
#376: FILE: arch/powerpc/platforms/85xx/smp.c:195:
+        mb();$

WARNING: please, no spaces at the start of a line
#376: FILE: arch/powerpc/platforms/85xx/smp.c:195:
+        mb();$

ERROR: code indent should use tabs where possible
#377: FILE: arch/powerpc/platforms/85xx/smp.c:196:
+        /*kick cpu[nr] up*/$

ERROR: code indent should use tabs where possible
#378: FILE: arch/powerpc/platforms/85xx/smp.c:197:
+        *kexec_flag_virt = nr;$

WARNING: please, no spaces at the start of a line
#378: FILE: arch/powerpc/platforms/85xx/smp.c:197:
+        *kexec_flag_virt = nr;$

ERROR: code indent should use tabs where possible
#379: FILE: arch/powerpc/platforms/85xx/smp.c:198:
+        mb();$

WARNING: please, no spaces at the start of a line
#379: FILE: arch/powerpc/platforms/85xx/smp.c:198:
+        mb();$

ERROR: code indent should use tabs where possible
#380: FILE: arch/powerpc/platforms/85xx/smp.c:199:
+        flush_dcache_range((ulong)kexec_poll_virt,$

WARNING: please, no spaces at the start of a line
#380: FILE: arch/powerpc/platforms/85xx/smp.c:199:
+        flush_dcache_range((ulong)kexec_poll_virt,$

ERROR: code indent should use tabs where possible
#381: FILE: arch/powerpc/platforms/85xx/smp.c:200:
+        (ulong)kexec_poll_virt + L1_CACHE_BYTES-1);$

WARNING: please, no spaces at the start of a line
#381: FILE: arch/powerpc/platforms/85xx/smp.c:200:
+        (ulong)kexec_poll_virt + L1_CACHE_BYTES-1);$

ERROR: code indent should use tabs where possible
#383: FILE: arch/powerpc/platforms/85xx/smp.c:202:
+        return 0;$

WARNING: please, no spaces at the start of a line
#383: FILE: arch/powerpc/platforms/85xx/smp.c:202:
+        return 0;$

WARNING: please, no spaces at the start of a line
#384: FILE: arch/powerpc/platforms/85xx/smp.c:203:
+    }$

WARNING: please, no spaces at the start of a line
#385: FILE: arch/powerpc/platforms/85xx/smp.c:204:
+    return -EBUSY;$

WARNING: please, no spaces at the start of a line
#396: FILE: arch/powerpc/platforms/85xx/smp.c:249:
+    if (!mpc85xx_smp_kick_kexec_cpus(nr))$

ERROR: code indent should use tabs where possible
#397: FILE: arch/powerpc/platforms/85xx/smp.c:250:
+        goto kexec_kick_done;$

WARNING: please, no spaces at the start of a line
#397: FILE: arch/powerpc/platforms/85xx/smp.c:250:
+        goto kexec_kick_done;$

WARNING: externs should be avoided in .c files
#423: FILE: arch/powerpc/platforms/85xx/smp.c:345:
+extern const unsigned int relocate_smp_cpu_size;

ERROR: code indent should use tabs where possible
#434: FILE: arch/powerpc/platforms/85xx/smp.c:353:
+        mb();$

WARNING: please, no spaces at the start of a line
#434: FILE: arch/powerpc/platforms/85xx/smp.c:353:
+        mb();$

ERROR: code indent should use tabs where possible
#436: FILE: arch/powerpc/platforms/85xx/smp.c:355:
+        if (crash_shutdown) {$

WARNING: please, no spaces at the start of a line
#436: FILE: arch/powerpc/platforms/85xx/smp.c:355:
+        if (crash_shutdown) {$

WARNING: suspect code indent for conditional statements (8, 12)
#436: FILE: arch/powerpc/platforms/85xx/smp.c:355:
+        if (crash_shutdown) {
+            /* loop forever */

ERROR: code indent should use tabs where possible
#437: FILE: arch/powerpc/platforms/85xx/smp.c:356:
+            /* loop forever */$

ERROR: code indent should use tabs where possible
#438: FILE: arch/powerpc/platforms/85xx/smp.c:357:
+            while (1)$

WARNING: please, no spaces at the start of a line
#438: FILE: arch/powerpc/platforms/85xx/smp.c:357:
+            while (1)$

ERROR: code indent should use tabs where possible
#439: FILE: arch/powerpc/platforms/85xx/smp.c:358:
+                ;$

WARNING: please, no spaces at the start of a line
#439: FILE: arch/powerpc/platforms/85xx/smp.c:358:
+                ;$

ERROR: code indent should use tabs where possible
#440: FILE: arch/powerpc/platforms/85xx/smp.c:359:
+        } else {$

WARNING: please, no spaces at the start of a line
#440: FILE: arch/powerpc/platforms/85xx/smp.c:359:
+        } else {$

ERROR: code indent should use tabs where possible
#441: FILE: arch/powerpc/platforms/85xx/smp.c:360:
+            while (!atomic_read(&kexec_ready_to_reboot))$

WARNING: please, no spaces at the start of a line
#441: FILE: arch/powerpc/platforms/85xx/smp.c:360:
+            while (!atomic_read(&kexec_ready_to_reboot))$

ERROR: code indent should use tabs where possible
#442: FILE: arch/powerpc/platforms/85xx/smp.c:361:
+                cpu_relax();$

WARNING: please, no spaces at the start of a line
#442: FILE: arch/powerpc/platforms/85xx/smp.c:361:
+                cpu_relax();$

ERROR: code indent should use tabs where possible
#443: FILE: arch/powerpc/platforms/85xx/smp.c:362:
+            /*flush destination*/$

ERROR: code indent should use tabs where possible
#444: FILE: arch/powerpc/platforms/85xx/smp.c:363:
+            if (save_image)$

WARNING: please, no spaces at the start of a line
#444: FILE: arch/powerpc/platforms/85xx/smp.c:363:
+            if (save_image)$

ERROR: code indent should use tabs where possible
#445: FILE: arch/powerpc/platforms/85xx/smp.c:364:
+                mpc85xx_smp_flush_dcache_kexec(save_image, 1);$

WARNING: please, no spaces at the start of a line
#445: FILE: arch/powerpc/platforms/85xx/smp.c:364:
+                mpc85xx_smp_flush_dcache_kexec(save_image, 1);$

ERROR: code indent should use tabs where possible
#447: FILE: arch/powerpc/platforms/85xx/smp.c:366:
+            flush_icache_range(wait_code_buffer,$

WARNING: please, no spaces at the start of a line
#447: FILE: arch/powerpc/platforms/85xx/smp.c:366:
+            flush_icache_range(wait_code_buffer,$

ERROR: code indent should use tabs where possible
#448: FILE: arch/powerpc/platforms/85xx/smp.c:367:
+                wait_code_buffer + relocate_smp_cpu_size);$

WARNING: please, no spaces at the start of a line
#448: FILE: arch/powerpc/platforms/85xx/smp.c:367:
+                wait_code_buffer + relocate_smp_cpu_size);$

ERROR: code indent should use tabs where possible
#449: FILE: arch/powerpc/platforms/85xx/smp.c:368:
+            flush_dcache_range(wait_code_buffer,$

WARNING: please, no spaces at the start of a line
#449: FILE: arch/powerpc/platforms/85xx/smp.c:368:
+            flush_dcache_range(wait_code_buffer,$

ERROR: code indent should use tabs where possible
#450: FILE: arch/powerpc/platforms/85xx/smp.c:369:
+                wait_code_buffer + relocate_smp_cpu_size);$

WARNING: please, no spaces at the start of a line
#450: FILE: arch/powerpc/platforms/85xx/smp.c:369:
+                wait_code_buffer + relocate_smp_cpu_size);$

ERROR: code indent should use tabs where possible
#452: FILE: arch/powerpc/platforms/85xx/smp.c:371:
+            atomic_inc(&kexec_slave_finish);$

WARNING: please, no spaces at the start of a line
#452: FILE: arch/powerpc/platforms/85xx/smp.c:371:
+            atomic_inc(&kexec_slave_finish);$

ERROR: code indent should use tabs where possible
#454: FILE: arch/powerpc/platforms/85xx/smp.c:373:
+            ((void (*)(void)) wait_code_buffer)();$

WARNING: please, no spaces at the start of a line
#454: FILE: arch/powerpc/platforms/85xx/smp.c:373:
+            ((void (*)(void)) wait_code_buffer)();$

ERROR: code indent should use tabs where possible
#455: FILE: arch/powerpc/platforms/85xx/smp.c:374:
+            /* NOTREACHED */$

ERROR: code indent should use tabs where possible
#456: FILE: arch/powerpc/platforms/85xx/smp.c:375:
+        }$

WARNING: please, no spaces at the start of a line
#456: FILE: arch/powerpc/platforms/85xx/smp.c:375:
+        }$

total: 39 errors, 53 warnings, 352 lines checked

NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
      scripts/cleanfile

patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Thanks, Wang

Notic: this is an automated generated by shell script
Any problems please contact: wangshilong1991@gmail.com

^ permalink raw reply

* [PATCH v2 2/3] cpufreq: pmac64: provide cpufreq transition latency for older G5 models
From: Aaro Koskinen @ 2013-08-31 17:23 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Benjamin Herrenschmidt, linux-pm,
	linuxppc-dev
  Cc: Aaro Koskinen
In-Reply-To: <1377969832-27699-1-git-send-email-aaro.koskinen@iki.fi>

Currently cpufreq ondemand governor cannot used on older G5 models,
because the transition latency is set to CPUFREQ_ETERNAL. Provide a
value based on a measurement on Xserve G5, which happens to be also the
highest allowed latency.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
 drivers/cpufreq/pmac64-cpufreq.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
index 674807d..d3d1995 100644
--- a/drivers/cpufreq/pmac64-cpufreq.c
+++ b/drivers/cpufreq/pmac64-cpufreq.c
@@ -674,8 +674,10 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpus)
 	g5_cpu_freqs[0].frequency = max_freq;
 	g5_cpu_freqs[1].frequency = min_freq;
 
+	/* Based on a measurement on Xserve G5, rounded up. */
+	transition_latency = 10 * NSEC_PER_MSEC;
+
 	/* Set callbacks */
-	transition_latency = CPUFREQ_ETERNAL;
 	g5_switch_volt = g5_pfunc_switch_volt;
 	g5_switch_freq = g5_pfunc_switch_freq;
 	g5_query_freq = g5_pfunc_query_freq;
-- 
1.8.3.2

^ permalink raw reply related

* [PATCH v2 0/3] cpufreq/ondemand support for Xserve G5 & iMac G5 iSight
From: Aaro Koskinen @ 2013-08-31 17:23 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Benjamin Herrenschmidt, linux-pm,
	linuxppc-dev
  Cc: Aaro Koskinen

Hi,

This is a second version of the patch set sent earlier
(http://marc.info/?t=137461124900005&r=1&w=2) to enable ondemand on
Xserve G5, and also to enable cpufreq on the final iMac G5 (iSight) model.

I changed the second patch to so that it only adds the new latency value
for PowerMac7,2/PowerMac7,3/RackMac3,1.

The only other changes are ACKs from Viresh Kumar to patches 1 & 3.

A.

Aaro Koskinen (3):
  cpufreq: pmac64: speed up frequency switch
  cpufreq: pmac64: provide cpufreq transition latency for older G5
    models
  cpufreq: pmac64: enable cpufreq on iMac G5 (iSight) model

 drivers/cpufreq/pmac64-cpufreq.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

-- 
1.8.3.2

^ permalink raw reply

* [PATCH v2 1/3] cpufreq: pmac64: speed up frequency switch
From: Aaro Koskinen @ 2013-08-31 17:23 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Benjamin Herrenschmidt, linux-pm,
	linuxppc-dev
  Cc: Aaro Koskinen
In-Reply-To: <1377969832-27699-1-git-send-email-aaro.koskinen@iki.fi>

Some functions on switch path use msleep() which is inaccurate, and
depends on HZ. With HZ=100 msleep(1) takes actually over ten times longer.
Using usleep_range() we get more accurate sleeps.

I measured the "pfunc_slewing_done" polling to take 300us at max (on
2.3GHz dual-processor Xserve G5), so using 500us sleep there should
be fine.

With the patch, g5_switch_freq() duration drops from ~50ms to ~10ms on
Xserve with HZ=100.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/pmac64-cpufreq.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
index 7ba4234..674807d 100644
--- a/drivers/cpufreq/pmac64-cpufreq.c
+++ b/drivers/cpufreq/pmac64-cpufreq.c
@@ -141,7 +141,7 @@ static void g5_vdnap_switch_volt(int speed_mode)
 		pmf_call_one(pfunc_vdnap0_complete, &args);
 		if (done)
 			break;
-		msleep(1);
+		usleep_range(1000, 1000);
 	}
 	if (done == 0)
 		printk(KERN_WARNING "cpufreq: Timeout in clock slewing !\n");
@@ -240,7 +240,7 @@ static void g5_pfunc_switch_volt(int speed_mode)
 		if (pfunc_cpu1_volt_low)
 			pmf_call_one(pfunc_cpu1_volt_low, NULL);
 	}
-	msleep(10); /* should be faster , to fix */
+	usleep_range(10000, 10000); /* should be faster , to fix */
 }
 
 /*
@@ -285,7 +285,7 @@ static int g5_pfunc_switch_freq(int speed_mode)
 		pmf_call_one(pfunc_slewing_done, &args);
 		if (done)
 			break;
-		msleep(1);
+		usleep_range(500, 500);
 	}
 	if (done == 0)
 		printk(KERN_WARNING "cpufreq: Timeout in clock slewing !\n");
-- 
1.8.3.2

^ permalink raw reply related

* [PATCH v2 3/3] cpufreq: pmac64: enable cpufreq on iMac G5 (iSight) model
From: Aaro Koskinen @ 2013-08-31 17:23 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Benjamin Herrenschmidt, linux-pm,
	linuxppc-dev
  Cc: Aaro Koskinen
In-Reply-To: <1377969832-27699-1-git-send-email-aaro.koskinen@iki.fi>

Enable cpufreq on iMac G5 (iSight) model. Tested with the 2.1 GHz version.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/pmac64-cpufreq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c
index d3d1995..699e0a5 100644
--- a/drivers/cpufreq/pmac64-cpufreq.c
+++ b/drivers/cpufreq/pmac64-cpufreq.c
@@ -398,7 +398,8 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
 	/* Check supported platforms */
 	if (of_machine_is_compatible("PowerMac8,1") ||
 	    of_machine_is_compatible("PowerMac8,2") ||
-	    of_machine_is_compatible("PowerMac9,1"))
+	    of_machine_is_compatible("PowerMac9,1") ||
+	    of_machine_is_compatible("PowerMac12,1"))
 		use_volts_smu = 1;
 	else if (of_machine_is_compatible("PowerMac11,2"))
 		use_volts_vdnap = 1;
-- 
1.8.3.2

^ permalink raw reply related

* [RFC PATCH v1 1/1] powerpc/85xx: Wakeup kexec smp slave cpus in second kernel
From: Yu Chen @ 2013-08-31  9:12 UTC (permalink / raw)
  To: galak, msm, chenhui.zhao, leoli, b24347, benh, paulus
  Cc: Ryan Chan, linuxppc-dev, linux-kernel

>From 1ccf579b871dfd5938ce958f729361a203485c74 Mon Sep 17 00:00:00 2001
From: Yu Chen <chenyu105@gmail.com>
Date: Sat, 31 Aug 2013 23:52:31 +0800
Subject: [PATCH]  powerpc/85xx: Wakeup kexec smp slave cpus in second kernel

In current 85xx smp kexec implementation,master cpu reset slave cpus
by mpic_reset_core,
before jump to second kernel.In order to wake slave cpus up in second
kernel,we debug
this patch on p2041rdb.

The main principle of this patch,is to get slave cpus polling for flag
to change,
thus waiting for master cpu to set it with non-zero cpu number(see misc_32.S).
This flag is placed in kexec control page,so it would not be
overlapped when copying kimage.
The master cpu put flag's physical address in r28 as a parameter
passed to second kernel,
so the latter knows how to wake slave cpus up in smp_85xx_kick_cpu.
The pseudo-code may be like:
void slave_cpu_spin(void)
{
        int cpu = smp_processor_id();
        while (*kexec_poll != cpu)
                ;
        /*slave wakeup and jump*/
        jump(*(kexec_poll+1));
}

void master_cpu_wakeup(unsigned long *kexec_poll, int cpu)
{
        *(kexec_poll+1) = __early_start;
        mb();
        *kexec_poll = cpu;
}

However,after applied this patch,we got some kernel exception during
booting second kernel,
I'm not sure if it's caused by improper treament of cache,or tlb,or
other.So I put this
patch here hoping someone can check and review it.

Signed-off-by: Yu Chen <chenyu105@gmail.com>
---
 arch/powerpc/kernel/head_fsl_booke.S |    7 ++
 arch/powerpc/kernel/misc_32.S        |   66 +++++++++++++-
 arch/powerpc/platforms/85xx/smp.c    |  166 ++++++++++++++++++++++++++++++----
 3 files changed, 222 insertions(+), 17 deletions(-)
 mode change 100644 => 100755 arch/powerpc/kernel/head_fsl_booke.S
 mode change 100644 => 100755 arch/powerpc/kernel/misc_32.S
 mode change 100644 => 100755 arch/powerpc/platforms/85xx/smp.c

diff --git a/arch/powerpc/kernel/head_fsl_booke.S
b/arch/powerpc/kernel/head_fsl_booke.S
old mode 100644
new mode 100755
index d10a7ca..63c8392
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -178,6 +178,13 @@ _ENTRY(__early_start)
      * This is where the main kernel code starts.
      */

+#if defined(CONFIG_KEXEC) && defined(CONFIG_SMP)
+    /* r28 contain position where slave cpus spin*/
+    lis    r1,kexec_poll_phy@h
+    ori    r1,r1,kexec_poll_phy@l
+    stw    r28,0(r1)
+#endif
+
     /* ptr to current */
     lis    r2,init_task@h
     ori    r2,r2,init_task@l
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
old mode 100644
new mode 100755
index e469f30..d9eefc2
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -120,7 +120,7 @@ _GLOBAL(reloc_got2)
     addi    r4,r4,1b@l
     subf    r0,r4,r0
     add    r7,r0,r7
-2:    lwz    r0,0(r7)
+    2:    lwz    r0,0(r7)
     add    r0,r0,r3
     stw    r0,0(r7)
     addi    r7,r7,4
@@ -692,6 +692,7 @@ _GLOBAL(__main)
     blr

 #ifdef CONFIG_KEXEC
+#define KEXEC_MAGIC 0xdeadbeef
     /*
      * Must be relocatable PIC code callable as a C function.
      */
@@ -707,6 +708,16 @@ relocate_new_kernel:
     mr    r30, r4
     mr    r31, r5

+#ifdef CONFIG_SMP
+    bl    1f
+1:    mflr    r8
+    addi    r8,r8,kexec_flag-1b
+    lis     r7,PAGE_OFFSET@h
+    ori     r7,r7,PAGE_OFFSET@l
+    /*r28 contain slave cpu spin physical address */
+    subf    r28, r7, r8
+#endif
+
 #define ENTRY_MAPPING_KEXEC_SETUP
 #include "fsl_booke_entry_mapping.S"
 #undef ENTRY_MAPPING_KEXEC_SETUP
@@ -1172,4 +1183,57 @@ relocate_new_kernel_end:
     .globl relocate_new_kernel_size
 relocate_new_kernel_size:
     .long relocate_new_kernel_end - relocate_new_kernel
+#ifdef CONFIG_FSL_BOOKE
+    /**
+    * Slave cpus wait for kexec_flag to change
+    */
+    .globl relocate_smp_cpu_offset
+relocate_smp_cpu_offset:
+    .long relocate_smp_cpu_wait-relocate_new_kernel
+
+    .globl relocate_smp_cpu_wait
+relocate_smp_cpu_wait:
+
+    bl    1f
+1:    mflr    r5
+    addi    r5,r5,kexec_flag-1b
+    /*see if anyone calls me?*/
+    mfspr   r24,SPRN_PIR
+99:    lwz    r4,4(r5)
+    cmpw    r4,r24
+    msync
+    bne        99b
+
+    msync
+    /*r4 contains jump address*/
+    lwz    r4,8(r5)
+    msync
+    lis    r5,MSR_KERNEL@h
+    ori    r5,r5,MSR_KERNEL@l
+    msync
+    isync
+    mtspr    SPRN_SRR1, r5
+    mtspr    SPRN_SRR0, r4
+    msync
+    isync
+    rfi
+    isync
+1:    b    1b
+
+    /**
+    * kexec_flag indicates a kexec magic
+    * kexec_flag+4 bytes supposed to be set with cpu number
+    * kexec_flag+8 countain addr for slave cpu to jump into
+    */
+    .globl kexec_flag
+kexec_flag:
+    .long   KEXEC_MAGIC
+    .long    0
+    .long    0
+relocate_smp_cpu_wait_end:
+    .globl relocate_smp_cpu_size
+relocate_smp_cpu_size:
+    .long relocate_smp_cpu_wait_end-relocate_smp_cpu_wait
+#endif
+
 #endif
diff --git a/arch/powerpc/platforms/85xx/smp.c
b/arch/powerpc/platforms/85xx/smp.c
old mode 100644
new mode 100755
index 5ced4f5..c4f5c4c
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -140,6 +140,70 @@ static inline u32 read_spin_table_addr_l(void *spin_table)
         (ulong)spin_table + sizeof(struct epapr_spin_table));
     return in_be32(&((struct epapr_spin_table *)spin_table)->addr_l);
 }
+#ifdef CONFIG_KEXEC
+
+#define KEXEC_MAGIC 0xdeadbeef
+#define KEXEC_RESERVE_LIMIT 0x10
+unsigned long kexec_poll_phy;
+extern void reserve_kexec_bootmem(unsigned long poll_phy, int size);
+
+/*
+ * Reserved bootmem for slave cpus kexec spin area.
+ */
+void mpc85xx_smp_reserve_kexec(void)
+{
+    unsigned long kexec_poll_virt;
+    unsigned long *kexec_magic_virt;
+
+    if (!kexec_poll_phy ||
+            kexec_poll_phy >= __max_low_memory)
+        return;
+
+    kexec_poll_virt = (unsigned long)phys_to_virt(kexec_poll_phy);
+    kexec_magic_virt = (unsigned long *)kexec_poll_virt;
+
+    if (*kexec_magic_virt == KEXEC_MAGIC)
+        reserve_kexec_bootmem(kexec_poll_phy, KEXEC_RESERVE_LIMIT);
+}
+
+/*
+ * Kick slave cpus from kexec spin area.
+ */
+int mpc85xx_smp_kick_kexec_cpus(int nr)
+{
+    unsigned long  kexec_poll_virt;
+    unsigned long *kexec_flag_virt;
+    unsigned long *kexec_magic_virt;
+    unsigned long *kexec_jump_virt;
+
+    /*verify accessible*/
+    if (!kexec_poll_phy ||
+            kexec_poll_phy >= __max_low_memory)
+        return -EBUSY;
+
+    kexec_poll_virt = (unsigned long)phys_to_virt(kexec_poll_phy);
+
+    kexec_magic_virt = (unsigned long *)kexec_poll_virt;
+    kexec_flag_virt = (unsigned long *)kexec_poll_virt + 1;
+    kexec_jump_virt = (unsigned long *)kexec_poll_virt + 2;
+
+    /*verify a valid kexec kick*/
+    if (*kexec_magic_virt == KEXEC_MAGIC) {
+        flush_dcache_range((ulong)kexec_poll_virt,
+        (ulong)kexec_poll_virt + L1_CACHE_BYTES-1);
+        *kexec_jump_virt = (unsigned long)__early_start;
+        mb();
+        /*kick cpu[nr] up*/
+        *kexec_flag_virt = nr;
+        mb();
+        flush_dcache_range((ulong)kexec_poll_virt,
+        (ulong)kexec_poll_virt + L1_CACHE_BYTES-1);
+
+        return 0;
+    }
+    return -EBUSY;
+}
+#endif

 static int smp_85xx_kick_cpu(int nr)
 {
@@ -181,6 +245,10 @@ static int smp_85xx_kick_cpu(int nr)

     local_irq_save(flags);
 #ifdef CONFIG_PPC32
+#ifdef CONFIG_KEXEC
+    if (!mpc85xx_smp_kick_kexec_cpus(nr))
+        goto kexec_kick_done;
+#endif
 #ifdef CONFIG_HOTPLUG_CPU
     /* Corresponding to generic_set_cpu_dead() */
     generic_set_cpu_up(nr);
@@ -225,7 +293,9 @@ static int smp_85xx_kick_cpu(int nr)
     out_be32(&spin_table->pir, hw_cpu);
     out_be32(&spin_table->addr_l, __pa(__early_start));
     flush_spin_table(spin_table);
-
+#ifdef CONFIG_KEXEC
+kexec_kick_done:
+#endif
     /* Wait a bit for the CPU to ack. */
     if (!spin_event_timeout(__secondary_hold_acknowledge == hw_cpu,
                     10000, 100)) {
@@ -266,7 +336,13 @@ struct smp_ops_t smp_85xx_ops = {
 };

 #ifdef CONFIG_KEXEC
+
 atomic_t kexec_down_cpus = ATOMIC_INIT(0);
+atomic_t kexec_ready_to_reboot = ATOMIC_INIT(0);
+atomic_t kexec_slave_finish = ATOMIC_INIT(0);
+unsigned long wait_code_buffer;
+static struct kimage *save_image;
+extern const unsigned int relocate_smp_cpu_size;

 void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary)
 {
@@ -274,8 +350,29 @@ void mpc85xx_smp_kexec_cpu_down(int
crash_shutdown, int secondary)

     if (secondary) {
         atomic_inc(&kexec_down_cpus);
-        /* loop forever */
-        while (1);
+        mb();
+
+        if (crash_shutdown) {
+            /* loop forever */
+            while (1)
+                ;
+        } else {
+            while (!atomic_read(&kexec_ready_to_reboot))
+                cpu_relax();
+            /*flush destination*/
+            if (save_image)
+                mpc85xx_smp_flush_dcache_kexec(save_image, 1);
+
+            flush_icache_range(wait_code_buffer,
+                wait_code_buffer + relocate_smp_cpu_size);
+            flush_dcache_range(wait_code_buffer,
+                wait_code_buffer + relocate_smp_cpu_size);
+
+            atomic_inc(&kexec_slave_finish);
+
+            ((void (*)(void)) wait_code_buffer)();
+            /* NOTREACHED */
+        }
     }
 }

@@ -285,13 +382,23 @@ static void mpc85xx_smp_kexec_down(void *arg)
         ppc_md.kexec_cpu_down(0,1);
 }

-static void map_and_flush(unsigned long paddr)
+static void map_and_flush(unsigned long paddr, int atomic)
 {
     struct page *page = pfn_to_page(paddr >> PAGE_SHIFT);
-    unsigned long kaddr  = (unsigned long)kmap(page);
+    unsigned long kaddr;
+
+    if (atomic)
+        kaddr  = (unsigned long)kmap_atomic(page);
+    else
+        kaddr  = (unsigned long)kmap(page);

     flush_dcache_range(kaddr, kaddr + PAGE_SIZE);
-    kunmap(page);
+    flush_icache_range(kaddr, kaddr + PAGE_SIZE);
+
+    if (atomic)
+        kunmap_atomic((void *)kaddr);
+    else
+        kunmap(page);
 }

 /**
@@ -300,7 +407,7 @@ static void map_and_flush(unsigned long paddr)
  * are performed out of an overabundance of caution as interrupts are not
  * disabled yet and we can switch cores
  */
-static void mpc85xx_smp_flush_dcache_kexec(struct kimage *image)
+static void mpc85xx_smp_flush_dcache_kexec(struct kimage *image, int atomic)
 {
     kimage_entry_t *ptr, entry;
     unsigned long paddr;
@@ -312,18 +419,18 @@ static void
mpc85xx_smp_flush_dcache_kexec(struct kimage *image)
              ptr = (entry & IND_INDIRECTION) ?
                 phys_to_virt(entry & PAGE_MASK) : ptr + 1) {
             if (!(entry & IND_DESTINATION)) {
-                map_and_flush(entry);
+                map_and_flush(entry, atomic);
             }
         }
         /* flush out last IND_DONE page */
-        map_and_flush(entry);
+        map_and_flush(entry, atomic);
     } else {
         /* crash type kexec images are copied to the crash region */
         for (i = 0; i < image->nr_segments; i++) {
             struct kexec_segment *seg = &image->segment[i];
             for (paddr = seg->mem; paddr < seg->mem + seg->memsz;
                  paddr += PAGE_SIZE) {
-                map_and_flush(paddr);
+                map_and_flush(paddr, atomic);
             }
         }
     }
@@ -335,13 +442,18 @@ static void
mpc85xx_smp_flush_dcache_kexec(struct kimage *image)

 static void mpc85xx_smp_machine_kexec(struct kimage *image)
 {
+    extern const unsigned char  relocate_smp_cpu_wait[];
+    extern const unsigned int relocate_smp_cpu_offset;
     int timeout = INT_MAX;
     int i, num_cpus = num_present_cpus();

     mpc85xx_smp_flush_dcache_kexec(image);

-    if (image->type == KEXEC_TYPE_DEFAULT)
+    if (image->type == KEXEC_TYPE_DEFAULT) {
+        save_image = image;
+        mb();
         smp_call_function(mpc85xx_smp_kexec_down, NULL, 0);
+    }

     while ( (atomic_read(&kexec_down_cpus) != (num_cpus - 1)) &&
         ( timeout > 0 ) )
@@ -352,12 +464,34 @@ static void mpc85xx_smp_machine_kexec(struct
kimage *image)
     if ( !timeout )
         printk(KERN_ERR "Unable to bring down secondary cpu(s)");

-    for_each_online_cpu(i)
-    {
-        if ( i == smp_processor_id() ) continue;
-        mpic_reset_core(i);
-    }
+    if (image->type == KEXEC_TYPE_DEFAULT) {

+        wait_code_buffer =
+        (unsigned long)page_address(image->control_code_page)+
+                relocate_smp_cpu_offset;
+
+        /* copy slave cpu spin code to the control code page */
+        memcpy((void *)wait_code_buffer, relocate_smp_cpu_wait,
+                        relocate_smp_cpu_size);
+        atomic_set(&kexec_ready_to_reboot, 1);
+        mb();
+        timeout = INT_MAX;
+
+        while ((atomic_read(&kexec_slave_finish) != (num_cpus-1)) &&
+            (timeout > 0))
+            timeout--;
+
+        if (!timeout)
+            printk(KERN_ERR "Unable to wait for secondary cpu(s) to
flush caches\n");
+
+        } else {
+        for_each_online_cpu(i)
+        {
+            if (i == smp_processor_id())
+                continue;
+            mpic_reset_core(i);
+        }
+    }
     default_machine_kexec(image);
 }
 #endif /* CONFIG_KEXEC */
-- 
1.7.1

^ permalink raw reply related

* Re: [PATCH v2 1/4] hotplug, x86: Fix online state in cpu0 debug interface
From: Rafael J. Wysocki @ 2013-08-31  0:24 UTC (permalink / raw)
  To: Toshi Kani, hpa
  Cc: fenghua.yu, gregkh, x86, linux-kernel, linux-acpi,
	isimatu.yasuaki, mingo, srivatsa.bhat, nfont, tglx, bp,
	linuxppc-dev
In-Reply-To: <1377822129-4143-2-git-send-email-toshi.kani@hp.com>

Hi Peter,

Any objections here?

On Thursday, August 29, 2013 06:22:06 PM Toshi Kani wrote:
> _debug_hotplug_cpu() is a debug interface that puts cpu0 offline during
> boot-up when CONFIG_DEBUG_HOTPLUG_CPU0 is set.  After cpu0 is put offline
> in this interface, however, /sys/devices/system/cpu/cpu0/online still
> shows 1 (online).
> 
> This patch fixes _debug_hotplug_cpu() to update dev->offline when CPU
> online/offline operation succeeded.
> 
> Signed-off-by: Toshi Kani <toshi.kani@hp.com>
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  arch/x86/kernel/topology.c |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/topology.c b/arch/x86/kernel/topology.c
> index 6e60b5f..5823bbd 100644
> --- a/arch/x86/kernel/topology.c
> +++ b/arch/x86/kernel/topology.c
> @@ -72,16 +72,19 @@ int __ref _debug_hotplug_cpu(int cpu, int action)
>  		ret = cpu_down(cpu);
>  		if (!ret) {
>  			pr_info("CPU %u is now offline\n", cpu);
> +			dev->offline = true;
>  			kobject_uevent(&dev->kobj, KOBJ_OFFLINE);
>  		} else
>  			pr_debug("Can't offline CPU%d.\n", cpu);
>  		break;
>  	case 1:
>  		ret = cpu_up(cpu);
> -		if (!ret)
> +		if (!ret) {
> +			dev->offline = false;
>  			kobject_uevent(&dev->kobj, KOBJ_ONLINE);
> -		else
> +		} else {
>  			pr_debug("Can't online CPU%d.\n", cpu);
> +		}
>  		break;
>  	default:
>  		ret = -EINVAL;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply

* Re: [PATCH 1/2] ASoC: fsl: Add wrapping for dev_dbg() in fsl_spdif.c
From: Mark Brown @ 2013-08-30 22:01 UTC (permalink / raw)
  To: Nicolin Chen; +Cc: alsa-devel, linuxppc-dev, timur
In-Reply-To: <7c26687b556e1b4fc33ea5771de7b64e45a02d38.1377855239.git.b42378@freescale.com>

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

On Fri, Aug 30, 2013 at 05:38:08PM +0800, Nicolin Chen wrote:
> Add wrapping '\n' for dev_dbg() in fsl_spdif.c

Applied both, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: Ethernet over PCIe driver for Inter-Processor Communication
From: David Hawkins @ 2013-08-30 18:06 UTC (permalink / raw)
  To: Saravanan S
  Cc: naishab, linuxppc-dev@lists.ozlabs.org, Michael George,
	Ira W. Snyder
In-Reply-To: <CAEqOc-T5-PuVnDi-MdzGekbLHWR4wfnCb3etfRbu4DAmNGuzVg@mail.gmail.com>

Hi S.Saravanan,
>
> I successfully  mapped the Programmable Interrupt Controller registers
> in the EP to the PCI space. Thus now I can write the shared message
> interrupt registers in the EP from the RC over PCI.

Excellent.

> But I am facing the following problems now.
>
> 1) In my driver at EP, to register for this interrupt I need to know the
> hardware irq number but I can't find any interrupt number assigned  by
> the PIC for the messages interrupt sources(Page 451 , MPC8641DRM manual).
> 2) Otherwise i need to get the virtual irq number assigned by kernel
> corresponding to the message interrupt . I am unable to find a method to
> get this also.

I recall having to ask a similar question when trying to map a
GPIO interrupt into a Linux interrupt number. I forget the
convention (I'm "the hardware guy"). It may be a device tree
thing, or an offset, I'll let someone more knowledgeable comment.

> In the RC side driver i get the virtual irq number after calling
> pci_enable_msi() which is straightforward.
> I studied the RC code which sets up shared message interrupts (Page 481,
> MPC manual)  for PCI MSI interrupts . When  msi is enabled the
> "arch_setup_msi_irqs()" is called leading to the fsl_setup_msi_irqs()
> (http://lxr.free-electrons.com/source/arch/powerpc/sysdev/fsl_msi.c?v=3.7#L151)
> . In this function the virtual irq no is obtained as below:
>
> /virq = irq_create_mapping(msi_data->irqhost, hwirq);/
>
> In the above function the hardware irq number is same as the value
> written into the  Shared Message Signaled Interrupt Index Register (Page
> 482) which is strange. Further these functions are called in the RC
> during pci_probe at boot time or when pci_enable_msi() is called . Thus
> there is a always a PCI slave device context to it. However I  require
> to do it in the EP which has no pci probing nor any  pci device
> reference whatsoever as it a slave. Is this approach right  ?

I'm not sure.

You'll have two drivers;
  * The root-complex.
    This is a standard PCIe driver, so you'll just follow convention
    there
  * The end-point driver.
    This driver needs to use the PCIe bus, but its not responsible
    for the PCIe bus in the way a root-complex is. The driver needs
    to know what the root-complex is interrupting it for, eg.,
    "transmitter empty" (I've read your last message) or "receiver
    ready" (there is a message from me, waiting for you).
    So you need at least two unique interrupts or messages from the
    root-complex to the end-point.

>> Its always a good idea to discuss different options, and to stub out
>> drivers or create minimal (but functional) drivers. That way you'll
>> be able to see how similar your new driver is to other drivers, and
>> you'll quickly discover if there is a hardware feature in the
>> existing driver that you cannot emulate (eg., some SRIO feature
>> used by the rionet driver).
>
> Right now I am trying a very primitive driver just to check the
> feasibility of bi-directional communication between the RC and the EP.
> Once this is established  I will be in a better position to get inputs
> on making it a more effective one.

You're on the right track. When I looked at using the messaging
registers on the PLX PCI device, I started by simply creating
what was effectively a serial port (one char at a time).
Section 4 explains the interlocking required between two processors

http://www.ovro.caltech.edu/~dwh/correlator/pdf/cobra_driver.pdf

The mailbox/interrupt registers are effectively being used to
implement a mutex between the two processors.

I think at one point Ira took similar code to this and hooked
it into the actual serial layer, so that you had a tty over
PCI. You could always start with a simplification like that too.

Cheers,
Dave

^ permalink raw reply

* Re: [PATCH v9 00/13] KVM: PPC: IOMMU in-kernel handling of VFIO
From: Gleb Natapov @ 2013-08-30 17:58 UTC (permalink / raw)
  To: Alexey Kardashevskiy
  Cc: kvm, Alexander Graf, kvm-ppc, linux-kernel, linux-mm,
	Alex Williamson, Paul Mackerras, Paolo Bonzini, linuxppc-dev,
	David Gibson
In-Reply-To: <5220736E.5050503@ozlabs.ru>

On Fri, Aug 30, 2013 at 08:26:54PM +1000, Alexey Kardashevskiy wrote:
> On 08/28/2013 06:37 PM, Alexey Kardashevskiy wrote:
> > This accelerates VFIO DMA operations on POWER by moving them
> > into kernel.
> > 
> > This depends on VFIO external API patch which is on its way to upstream.
> > 
> > Changes:
> > v9:
> > * replaced the "link logical bus number to IOMMU group" ioctl to KVM
> > with a KVM device doing the same thing, i.e. the actual changes are in
> > these 3 patches:
> >   KVM: PPC: reserve a capability and KVM device type for realmode VFIO
> >   KVM: PPC: remove warning from kvmppc_core_destroy_vm
> >   KVM: PPC: Add support for IOMMU in-kernel handling
> > 
> > * moved some VFIO external API bits to a separate patch to reduce the size
> > of the "KVM: PPC: Add support for IOMMU in-kernel handling" patch
> > 
> > * fixed code style problems reported by checkpatch.pl.
> > 
> > v8:
> > * fixed comments about capabilities numbers
> > 
> > v7:
> > * rebased on v3.11-rc3.
> > * VFIO external user API will go through VFIO tree so it is
> > excluded from this series.
> > * As nobody ever reacted on "hashtable: add hash_for_each_possible_rcu_notrace()",
> > Ben suggested to push it via his tree so I included it to the series.
> > * realmode_(get|put)_page is reworked.
> > 
> > More details in the individual patch comments.
> > 
> > Alexey Kardashevskiy (13):
> >   KVM: PPC: POWERNV: move iommu_add_device earlier
> >   hashtable: add hash_for_each_possible_rcu_notrace()
> >   KVM: PPC: reserve a capability number for multitce support
> >   KVM: PPC: reserve a capability and KVM device type for realmode VFIO
> 
> 
> Hi Gleb!
> 
> Could you please review and pick (if they are ok) the two "capability"
> patches from above?
> 
> It would be cool if you also looked at "KVM: PPC: Add support for IOMMU
> in-kernel handling", the part about KVM device for SPAPR TCE IOMMU table.
> 
> Thanks!
Will do it next week.

> 
> 
> 
> >   powerpc: Prepare to support kernel handling of IOMMU map/unmap
> >   powerpc: add real mode support for dma operations on powernv
> >   KVM: PPC: enable IOMMU_API for KVM_BOOK3S_64 permanently
> >   KVM: PPC: Add support for multiple-TCE hcalls
> >   powerpc/iommu: rework to support realmode
> >   KVM: PPC: remove warning from kvmppc_core_destroy_vm
> >   KVM: PPC: add trampolines for VFIO external API
> >   KVM: PPC: Add support for IOMMU in-kernel handling
> >   KVM: PPC: Add hugepage support for IOMMU in-kernel handling
> > 
> >  Documentation/virtual/kvm/api.txt                  |  26 +
> >  .../virtual/kvm/devices/spapr_tce_iommu.txt        |  37 ++
> >  arch/powerpc/include/asm/iommu.h                   |  18 +-
> >  arch/powerpc/include/asm/kvm_host.h                |  38 ++
> >  arch/powerpc/include/asm/kvm_ppc.h                 |  16 +-
> >  arch/powerpc/include/asm/machdep.h                 |  12 +
> >  arch/powerpc/include/asm/pgtable-ppc64.h           |   2 +
> >  arch/powerpc/include/uapi/asm/kvm.h                |   8 +
> >  arch/powerpc/kernel/iommu.c                        | 243 +++++----
> >  arch/powerpc/kvm/Kconfig                           |   1 +
> >  arch/powerpc/kvm/book3s_64_vio.c                   | 597 ++++++++++++++++++++-
> >  arch/powerpc/kvm/book3s_64_vio_hv.c                | 408 +++++++++++++-
> >  arch/powerpc/kvm/book3s_hv.c                       |  42 +-
> >  arch/powerpc/kvm/book3s_hv_rmhandlers.S            |   8 +-
> >  arch/powerpc/kvm/book3s_pr_papr.c                  |  35 ++
> >  arch/powerpc/kvm/powerpc.c                         |   4 +
> >  arch/powerpc/mm/init_64.c                          |  50 +-
> >  arch/powerpc/platforms/powernv/pci-ioda.c          |  57 +-
> >  arch/powerpc/platforms/powernv/pci-p5ioc2.c        |   2 +-
> >  arch/powerpc/platforms/powernv/pci.c               |  75 ++-
> >  arch/powerpc/platforms/powernv/pci.h               |   3 +-
> >  arch/powerpc/platforms/pseries/iommu.c             |   8 +-
> >  include/linux/hashtable.h                          |  15 +
> >  include/linux/kvm_host.h                           |   1 +
> >  include/linux/mm.h                                 |  14 +
> >  include/linux/page-flags.h                         |   4 +-
> >  include/uapi/linux/kvm.h                           |   3 +
> >  virt/kvm/kvm_main.c                                |   5 +
> >  28 files changed, 1564 insertions(+), 168 deletions(-)
> >  create mode 100644 Documentation/virtual/kvm/devices/spapr_tce_iommu.txt
> > 
> 
> 
> -- 
> Alexey

--
			Gleb.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox