* [RFC PATCH 0/6] KVM: PPC: Book3E: AltiVec support
From: Mihai Caraman @ 2013-06-03 20:54 UTC (permalink / raw)
To: kvm-ppc; +Cc: Mihai Caraman, linuxppc-dev, kvm
Mihai Caraman (6):
KVM: PPC: Book3E: Fix AltiVec interrupt numbers and build breakage
KVM: PPC: Book3E: Refactor SPE_FP exit handling
KVM: PPC: Book3E: Rename IRQPRIO names to accommodate ALTIVEC
KVM: PPC: Book3E: Add AltiVec support
KVM: PPC: Book3E: Add ONE_REG AltiVec support
KVM: PPC: Book3E: Enhance FPU laziness
arch/powerpc/include/asm/kvm_asm.h | 16 ++-
arch/powerpc/kvm/booke.c | 189 ++++++++++++++++++++++++++++----
arch/powerpc/kvm/booke.h | 4 +-
arch/powerpc/kvm/bookehv_interrupts.S | 8 +-
arch/powerpc/kvm/e500.c | 10 +-
arch/powerpc/kvm/e500_emulate.c | 8 +-
arch/powerpc/kvm/e500mc.c | 10 ++-
7 files changed, 199 insertions(+), 46 deletions(-)
--
1.7.4.1
^ permalink raw reply
* [RFC PATCH 6/6] KVM: PPC: Book3E: Enhance FPU laziness
From: Mihai Caraman @ 2013-06-03 20:54 UTC (permalink / raw)
To: kvm-ppc; +Cc: Mihai Caraman, linuxppc-dev, kvm
In-Reply-To: <1370292868-2697-1-git-send-email-mihai.caraman@freescale.com>
Adopt AltiVec approach to increase laziness by calling kvmppc_load_guest_fp()
just before returning to guest instaed of each sched in.
Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
---
arch/powerpc/kvm/booke.c | 1 +
arch/powerpc/kvm/e500mc.c | 2 --
2 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 019496d..5382238 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -1258,6 +1258,7 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
} else {
kvmppc_lazy_ee_enable();
kvmppc_load_guest_altivec(vcpu);
+ kvmppc_load_guest_fp(vcpu);
}
}
diff --git a/arch/powerpc/kvm/e500mc.c b/arch/powerpc/kvm/e500mc.c
index 9d7f38e..29cf97a 100644
--- a/arch/powerpc/kvm/e500mc.c
+++ b/arch/powerpc/kvm/e500mc.c
@@ -138,8 +138,6 @@ void kvmppc_core_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
if (vcpu->arch.oldpir != mfspr(SPRN_PIR))
kvmppc_e500_tlbil_all(vcpu_e500);
-
- kvmppc_load_guest_fp(vcpu);
}
void kvmppc_core_vcpu_put(struct kvm_vcpu *vcpu)
--
1.7.4.1
^ permalink raw reply related
* Re: IBM OpenPower 720 ipr driver woes
From: Robert Knight @ 2013-06-03 21:20 UTC (permalink / raw)
To: Brian King; +Cc: Wendy Xiong, linuxppc-dev
In-Reply-To: <51A644C2.5090300@linux.vnet.ibm.com>
On 5/29/2013 2:11 PM, Brian King wrote:
> On 05/29/2013 10:15 AM, Robert Knight wrote:
>> Sometime after kernel 3.3.4, Fedora 17 running on an IBM OpenPower
>> 720 stopped being able to read the SCSI disks with an error
>> concerning a return code -1. In the updates since, it has not
>> resumed working.
>>
>> Does the ipr driver no longer support this (admittedly ancient)
>> hardware?
> Do you have a boot log you can share?
>
> Thanks,
>
> Brian
>
Apologies for the slowness of my response. I had wiped the system,
Fedora 17 won't install without grub2 tweaks and I had to discover that.
I have copied and pasted the HMC console window:
> Boo
> ting `Fedora (3.8.11-100.fc17.ppc64)'
>
> Loading Fedora (3.8.11-100.fc17.ppc64)
> Loading initial ramdisk ...
> OF stdout device is: /vdevice/vty@30000000
> Preparing to boot Linux version 3.8.11-100.fc17.ppc64
> (mockbuild@ppc-builder7.qa
> .fedoraproject.org) (gcc version 4.7.2 20120921 (Red Hat 4.7.2-2)
> (GCC) ) #1 SMP
> Wed May 1 13:51:54 MST 2013
> Detected machine type: 0000000000000101
> Max number of cores passed to firmware: 512 (NR_CPUS = 1024)
> Calling ibm,client-architecture-support... not implemented
> command line: BOOT_IMAGE=/vmlinuz-3.8.11-100.fc17.ppc64
> root=/dev/mapper/vg_narv
> i-lv_root ro rd.md=0 rd.dm=0 KEYTABLE=us rd.lvm.lv=vg_narvi/lv_swap
> rd.luks=0 rd
> .lvm.lv=vg_narvi/lv_root SYSFONT=True LANG=en_US.UTF-8 rhgb quiet
> memory layout at init:
> memory_limit : 0000000000000000 (16 MB aligned)
> alloc_bottom : 0000000004800000
> alloc_top : 0000000008000000
> alloc_top_hi : 00000000ee000000
> rmo_top : 0000000008000000
> ram_top : 00000000ee000000
> instantiating rtas at 0x00000000077b0000... done
> Querying for OPAL presence... not there.
> boot cpu hw idx 0
> starting cpu hw idx 2... done
> copying OF device tree...
> Building dt strings...
> Building dt structure...
> Device tree strings 0x0000000004810000 -> 0x000000000481123d
> Device tree struct 0x0000000004820000 -> 0x0000000004840000
> Calling quiesce...
> returning from prom_init
> [ 1.376359] ehci-pci 0000:c8:01.2: can't setup
> [ 1.376749] ehci-pci 0000:c8:01.2: init 0000:c8:01.2 fail, -19
> [ 11.388273] ohci_hcd 0000:c8:01.0: USB HC takeover failed!
> (BIOS/SMM bug)
> [ 11.388287] ohci_hcd 0000:c8:01.0: can't setup
> [ 11.388686] ohci_hcd 0000:c8:01.0: init 0000:c8:01.0 fail, -16
> [ 21.408214] ohci_hcd 0000:c8:01.1: USB HC takeover failed!
> (BIOS/SMM bug)
> [ 21.408228] ohci_hcd 0000:c8:01.1: can't setup
> [ 21.408596] ohci_hcd 0000:c8:01.1: init 0000:c8:01.1 fail, -16
> Cannot open font file True
> Cannot open font file True
> [ 21.949512] ipr 0001:d0:01.0: Write of cache line size failed
> [ 22.032546] pata_pdc2027x: Invalid PLL input clock 0kHz, give up!
>
>
> dracut Warning: Unable to process initqueue
> Cannot open font file True
>
>
> dracut Warning: Unable to process initqueue
> dracut Warning: /dev/mapper/vg_narvi-lv_root does not exist
> dracut Warning: /dev/vg_narvi/lv_root does not exist
> dracut Warning: /dev/vg_narvi/lv_swap does not exist
>
> Dropping to debug shell.
>
> dracut:/#
^ permalink raw reply
* Re: IBM OpenPower 720 ipr driver woes
From: Benjamin Herrenschmidt @ 2013-06-03 21:43 UTC (permalink / raw)
To: Robert Knight; +Cc: Brian King, linuxppc-dev, Wendy Xiong
In-Reply-To: <51AD088C.8040803@princeton.edu>
On Mon, 2013-06-03 at 17:20 -0400, Robert Knight wrote:
> On 5/29/2013 2:11 PM, Brian King wrote:
> > On 05/29/2013 10:15 AM, Robert Knight wrote:
> >> Sometime after kernel 3.3.4, Fedora 17 running on an IBM OpenPower
> >> 720 stopped being able to read the SCSI disks with an error
> >> concerning a return code -1. In the updates since, it has not
> >> resumed working.
> >>
> >> Does the ipr driver no longer support this (admittedly ancient)
> >> hardware?
> > Do you have a boot log you can share?
> >
> > Thanks,
> >
> > Brian
> >
> Apologies for the slowness of my response. I had wiped the system,
> Fedora 17 won't install without grub2 tweaks and I had to discover that.
>
> I have copied and pasted the HMC console window:
Nothing about IPR here but the USB messages seem to indicate that
something's busted in general with PCI (ie, bus going EEH or something).
Not sure what's up as we don't see a complete boot log. However I don't
think fc17 got much love, have you tried 18 ? We've been running it on
a number of machines reasonably successfully.
Cheers,
Ben.
> > Boo
> > ting `Fedora (3.8.11-100.fc17.ppc64)'
> >
> > Loading Fedora (3.8.11-100.fc17.ppc64)
> > Loading initial ramdisk ...
> > OF stdout device is: /vdevice/vty@30000000
> > Preparing to boot Linux version 3.8.11-100.fc17.ppc64
> > (mockbuild@ppc-builder7.qa
> > .fedoraproject.org) (gcc version 4.7.2 20120921 (Red Hat 4.7.2-2)
> > (GCC) ) #1 SMP
> > Wed May 1 13:51:54 MST 2013
> > Detected machine type: 0000000000000101
> > Max number of cores passed to firmware: 512 (NR_CPUS = 1024)
> > Calling ibm,client-architecture-support... not implemented
> > command line: BOOT_IMAGE=/vmlinuz-3.8.11-100.fc17.ppc64
> > root=/dev/mapper/vg_narv
> > i-lv_root ro rd.md=0 rd.dm=0 KEYTABLE=us rd.lvm.lv=vg_narvi/lv_swap
> > rd.luks=0 rd
> > .lvm.lv=vg_narvi/lv_root SYSFONT=True LANG=en_US.UTF-8 rhgb quiet
> > memory layout at init:
> > memory_limit : 0000000000000000 (16 MB aligned)
> > alloc_bottom : 0000000004800000
> > alloc_top : 0000000008000000
> > alloc_top_hi : 00000000ee000000
> > rmo_top : 0000000008000000
> > ram_top : 00000000ee000000
> > instantiating rtas at 0x00000000077b0000... done
> > Querying for OPAL presence... not there.
> > boot cpu hw idx 0
> > starting cpu hw idx 2... done
> > copying OF device tree...
> > Building dt strings...
> > Building dt structure...
> > Device tree strings 0x0000000004810000 -> 0x000000000481123d
> > Device tree struct 0x0000000004820000 -> 0x0000000004840000
> > Calling quiesce...
> > returning from prom_init
> > [ 1.376359] ehci-pci 0000:c8:01.2: can't setup
> > [ 1.376749] ehci-pci 0000:c8:01.2: init 0000:c8:01.2 fail, -19
> > [ 11.388273] ohci_hcd 0000:c8:01.0: USB HC takeover failed!
> > (BIOS/SMM bug)
> > [ 11.388287] ohci_hcd 0000:c8:01.0: can't setup
> > [ 11.388686] ohci_hcd 0000:c8:01.0: init 0000:c8:01.0 fail, -16
> > [ 21.408214] ohci_hcd 0000:c8:01.1: USB HC takeover failed!
> > (BIOS/SMM bug)
> > [ 21.408228] ohci_hcd 0000:c8:01.1: can't setup
> > [ 21.408596] ohci_hcd 0000:c8:01.1: init 0000:c8:01.1 fail, -16
> > Cannot open font file True
> > Cannot open font file True
> > [ 21.949512] ipr 0001:d0:01.0: Write of cache line size failed
> > [ 22.032546] pata_pdc2027x: Invalid PLL input clock 0kHz, give up!
> >
> >
> > dracut Warning: Unable to process initqueue
> > Cannot open font file True
> >
> >
> > dracut Warning: Unable to process initqueue
> > dracut Warning: /dev/mapper/vg_narvi-lv_root does not exist
> > dracut Warning: /dev/vg_narvi/lv_root does not exist
> > dracut Warning: /dev/vg_narvi/lv_swap does not exist
> >
> > Dropping to debug shell.
> >
> > dracut:/#
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply
* Re: [PATCH v2 05/15] fsl_pmc: update device bindings
From: Scott Wood @ 2013-06-03 22:43 UTC (permalink / raw)
To: Zhao Chenhui; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <1366368468-29143-5-git-send-email-chenhui.zhao@freescale.com>
On 04/19/2013 05:47:38 AM, Zhao Chenhui wrote:
> From: Li Yang <leoli@freescale.com>
>=20
> Signed-off-by: Li Yang <leoli@freescale.com>
> Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
> ---
> .../devicetree/bindings/powerpc/fsl/pmc.txt | 59 =20
> +++++++++++--------
> 1 files changed, 34 insertions(+), 25 deletions(-)
>=20
> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/pmc.txt =20
> b/Documentation/devicetree/bindings/powerpc/fsl/pmc.txt
> index 07256b7..f1f749f 100644
> --- a/Documentation/devicetree/bindings/powerpc/fsl/pmc.txt
> +++ b/Documentation/devicetree/bindings/powerpc/fsl/pmc.txt
> @@ -9,15 +9,20 @@ Properties:
>=20
> "fsl,mpc8548-pmc" should be listed for any chip whose PMC is
> compatible. "fsl,mpc8536-pmc" should also be listed for any chip
> - whose PMC is compatible, and implies deep-sleep capability.
> + whose PMC is compatible, and implies deep-sleep capability and
> + wake on user defined packet(wakeup on ARP).
> +
> + "fsl,p1022-pmc" should be listed for any chip whose PMC is
> + compatible, and implies lossless Ethernet capability during sleep.
>=20
> "fsl,mpc8641d-pmc" should be listed for any chip whose PMC is
> compatible; all statements below that apply to "fsl,mpc8548-pmc" =20
> also
> apply to "fsl,mpc8641d-pmc".
>=20
> Compatibility does not include bit assignments in =20
> SCCR/PMCDR/DEVDISR; these
> - bit assignments are indicated via the sleep specifier in each =20
> device's
> - sleep property.
> + bit assignments are indicated via the clock nodes. Device which =20
> has a
> + controllable clock source should have a "fsl,pmc-handle" property =20
> pointing
> + to the clock node.
Please respond to the feedback given on v1:
http://patchwork.ozlabs.org/patch/147177/
Also indicate, below the ---, what has changed from previous versions.
-Scott=
^ permalink raw reply
* Re: [1/4] powerpc/85xx: Add a head file for cpu type detection
From: Scott Wood @ 2013-06-03 23:58 UTC (permalink / raw)
To: chenhui zhao; +Cc: linuxppc-dev
In-Reply-To: <1331025056-15983-1-git-send-email-chenhui.zhao@freescale.com>
On Mon, Mar 05, 2012 at 11:10:53PM -0000, chenhui zhao wrote:
> From: chenhui zhao <chenhui.zhao@freescale.com>
>
> The workarounds need to detect the cpu type. Add these macros
> and inline routines to help cpu type detection in runtime.
>
> Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
> Signed-off-by: Li Yang <leoli@freescale.com>
>
> ---
> arch/powerpc/include/asm/mpc85xx.h | 72 ++++++++++++++++++++++++++++++++++++
> 1 files changed, 72 insertions(+), 0 deletions(-)
> create mode 100644 arch/powerpc/include/asm/mpc85xx.h
>
> diff --git a/arch/powerpc/include/asm/mpc85xx.h b/arch/powerpc/include/asm/mpc85xx.h
> new file mode 100644
> index 0000000..451777c
> --- /dev/null
> +++ b/arch/powerpc/include/asm/mpc85xx.h
> @@ -0,0 +1,72 @@
> +/*
> + * MPC85xx cpu type detection
> + *
> + * Copyright 2011-2012 Freescale Semiconductor, Inc.
> + *
> + * This is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + */
> +
> +#ifndef __ASM_PPC_CPU_H
> +#define __ASM_PPC_CPU_H
s/CPU/MPC85xx/
> +#define SVR_REV(svr) ((svr) & 0xFF) /* SOC design resision */
Please update U-Boot's definition, so that shared code doesn't run into
problems.
> +#define SVR_MAJ(svr) (((svr) >> 4) & 0xF) /* Major revision field*/
> +#define SVR_MIN(svr) (((svr) >> 0) & 0xF) /* Minor revision field*/
> +
> +/* Some parts define SVR[0:23] as the SOC version */
> +#define SVR_SOC_VER(svr) (((svr) >> 8) & 0xFFFFFF) /* SOC Version fields */
> +
> +#define IS_SVR_REV(svr, maj, min) \
> + ((SVR_MAJ(svr) == (maj)) && (SVR_MIN(svr) == (min)))
> +
> +#define SVR_8533 0x803400
> +#define SVR_8533_E 0x803C00
> +#define SVR_8535 0x803701
> +#define SVR_8535_E 0x803F01
> +#define SVR_8536 0x803700
> +#define SVR_8536_E 0x803F00
> +#define SVR_8540 0x803000
> +#define SVR_8541 0x807200
> +#define SVR_8541_E 0x807A00
> +#define SVR_8543 0x803200
> +#define SVR_8543_E 0x803A00
Can we separate out E as an orthogonal bit, as we now do in U-Boot?
> +#define SVR_8544 0x803401
> +#define SVR_8544_E 0x803C01
> +#define SVR_8545 0x803102
> +#define SVR_8545_E 0x803902
> +#define SVR_8547_E 0x803901
> +#define SVR_8548 0x803100
> +#define SVR_8548_E 0x803900
> +#define SVR_8555 0x807100
> +#define SVR_8555_E 0x807900
> +#define SVR_8560 0x807000
> +#define SVR_8567 0x807501
> +#define SVR_8567_E 0x807D01
> +#define SVR_8568 0x807500
> +#define SVR_8568_E 0x807D00
> +#define SVR_8569 0x808000
> +#define SVR_8569_E 0x808800
> +#define SVR_8572 0x80E000
> +#define SVR_8572_E 0x80E800
> +
> +
> +static inline int fsl_svr_is(u32 svr)
> +{
> + u32 id = SVR_SOC_VER(mfspr(SPRN_SVR));
> +
> + return (id == svr);
> +}
fsl_svr_is() and IS_SVR_REV() are confusingly similar, and the
upper/lower difference and word-order difference is jarring. I'm not
sure why you even need fsl_svr_is. This file is obviously patterned
after U-Boot code, but U-Boot doesn't have this. Why can't the caller do
the equality check?
> +/* Return true if current SOC revision is prior to (maj, min) */
> +static inline int fsl_svr_older_than(u8 maj, u8 min)
> +{
> + u32 rev = SVR_REV(mfspr(SPRN_SVR));
> + u32 cmp = (maj << 4) | min;
> +
> + return (rev < cmp);
> +}
Is this that much easier than the caller doing:
if (SVR_REV(svr) < 0x20)
?
-Scott
^ permalink raw reply
* Re: IBM OpenPower 720 ipr driver woes
From: Tony Breeds @ 2013-06-04 0:01 UTC (permalink / raw)
To: Robert Knight; +Cc: Brian King, linuxppc-dev, Wendy Xiong
In-Reply-To: <51AD088C.8040803@princeton.edu>
[-- Attachment #1: Type: text/plain, Size: 422 bytes --]
On Mon, Jun 03, 2013 at 05:20:12PM -0400, Robert Knight wrote:
> >Device tree struct 0x0000000004820000 -> 0x0000000004840000
> >Calling quiesce...
> >returning from prom_init
> >[ 1.376359] ehci-pci 0000:c8:01.2: can't setup
Can you try adding "debug" to the kernel commandline. We're missing a
great chunk of detail. If you're starting from scratch either try F18 or
the F19 Beta (if you're brave :))
Yours Tony
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: IBM OpenPower 720 ipr driver woes
From: Robert Knight @ 2013-06-04 1:40 UTC (permalink / raw)
To: Brian King, Wendy Xiong, linuxppc-dev
In-Reply-To: <20130604000130.GA25055@thor.bakeyournoodle.com>
[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]
On 6/3/2013 8:01 PM, Tony Breeds wrote:
> On Mon, Jun 03, 2013 at 05:20:12PM -0400, Robert Knight wrote:
>
>>> Device tree struct 0x0000000004820000 -> 0x0000000004840000
>>> Calling quiesce...
>>> returning from prom_init
>>> [ 1.376359] ehci-pci 0000:c8:01.2: can't setup
> Can you try adding "debug" to the kernel commandline. We're missing a
> great chunk of detail. If you're starting from scratch either try F18 or
> the F19 Beta (if you're brave :))
>
> Yours Tony
So, two points. Since I have no live disks, I can't copy the dmesg
output in dracut onto a disk and just sent it to you -- the only way
that I know to get it is cut and paste from a HMC console window into a
vi buffer.
I removed rhgb and quiet in addition to adding debug to the kernel
command line in the hope of providing you with information.
My second point is that this failure to connect to the disks happens in
F18 in pretty much the same way -- it always ends with "pata_pdc2027x
... give up!".
Here we go again.
Thank you for being willing to try to help remotely.
[-- Attachment #2: boot.log2 --]
[-- Type: text/plain, Size: 14232 bytes --]
[ 0.000000] Allocated 917504 bytes for 1024 pacas at c0000000076d0000
[ 0.000000] Using pSeries machine description
[ 0.000000] Page orders: linear mapping = 24, virtual = 12, io = 12, vmemmap
= 24
[ 0.000000] Found initrd at 0xc000000003800000:0xc0000000047f9800
[ 0.000000] bootconsole [udbg0] enabled
[ 0.000000] Partition configured for 4 cpus.
[ 0.000000] CPU maps initialized for 2 threads per core
[ 0.000000] (thread shift is 1)
[ 0.000000] Freed 851968 bytes for unused pacas
[ 0.000000] Starting Linux PPC64 #1 SMP Wed May 1 13:51:54 MST 2013
[ 0.000000] -----------------------------------------------------
[ 0.000000] ppc64_pft_size = 0x1a
[ 0.000000] physicalMemorySize = 0xee000000
[ 0.000000] htab_hash_mask = 0x7ffff
[ 0.000000] -----------------------------------------------------
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.8.11-100.fc17.ppc64 (mockbuild@ppc-builder7.qa.fe
doraproject.org) (gcc version 4.7.2 20120921 (Red Hat 4.7.2-2) (GCC) ) #1 SMP We
d May 1 13:51:54 MST 2013
[ 0.000000] [boot]0012 Setup Arch
[ 0.000000] Node 0 Memory: 0x0-0xee000000
[ 0.000000] PCI host bridge /pci@800000020000002 ranges:
[ 0.000000] IO 0x000003fe00200000..0x000003fe002fffff -> 0x0000000000000000
[ 0.000000] MEM 0x0000040080000000..0x00000400bfffffff -> 0x00000000c0000000
[ 0.000000] PCI host bridge /pci@800000020000003 ranges:
[ 0.000000] IO 0x000003fe00700000..0x000003fe007fffff -> 0x0000000000000000
[ 0.000000] MEM 0x00000401c0000000..0x00000401ffffffff -> 0x00000000c0000000
[ 0.000000] PPC64 nvram contains 7168 bytes
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x00000000-0xedffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00000000-0xedffffff]
[ 0.000000] On node 0 totalpages: 60928
[ 0.000000] DMA zone: 53 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 60875 pages, LIFO batch:1
[ 0.000000] [boot]0015 Setup Done
[ 0.000000] PERCPU: Embedded 2 pages/cpu @c000000001800000 s87168 r0 d43904 u
262144
[ 0.000000] pcpu-alloc: s87168 r0 d43904 u262144 alloc=1*1048576 [ 0.000000] pcpu-alloc: [0] 0 1 2 3
[ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pag
es: 60875
[ 0.000000] Policy zone: DMA
[ 0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-3.8.11-100.fc17.ppc64 ro
ot=/dev/mapper/vg_narvi-lv_root ro rd.md=0 rd.dm=0 KEYTABLE=us rd.lvm.lv=vg_narv
i/lv_swap rd.luks=0 rd.lvm.lv=vg_narvi/lv_root SYSFONT=True LANG=en_US.UTF-8 deb
ug
[ 0.000000] PID hash table entries: 4096 (order: -1, 32768 bytes)
[ 0.000000] freeing bootmem node 0
[ 0.000000] Memory: 3766784k/3899392k available (18560k kernel code, 132608k
reserved, 1984k data, 2785k bss, 6912k init)
[ 0.000000] SLUB: Genslabs=19, HWalign=128, Order=0-3, MinObjects=0, CPUs=4,
Nodes=256
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU restricting CPUs from NR_CPUS=1024 to nr_cpu_ids=4.
[ 0.000000] NR_IRQS:512 nr_irqs:512 16
[ 0.000000] pic: no ISA interrupt controller
[ 0.000000] time_init: decrementer frequency = 188.043000 MHz
[ 0.000000] time_init: processor frequency = 1504.344000 MHz
[ 0.000000] clocksource: timebase mult[5516408] shift[24] registered
[ 0.000000] clockevent: decrementer mult[30239607] shift[32] cpu[0]
[ 0.000000] Console: colour dummy device 80x25
[ 0.000000] console [hvc0] enabled, bootconsole disabled
[ 0.000000] allocated 974848 bytes of page_cgroup
[ 0.000000] please try 'cgroup_disable=memory' option if you don't want memor
y cgroups
[ 0.010396] pid_max: default: 32768 minimum: 301
[ 0.010532] Security Framework initialized
[ 0.010555] SELinux: Initializing.
[ 0.010575] SELinux: Starting in permissive mode
[ 0.011123] Dentry cache hash table entries: 524288 (order: 6, 4194304 bytes)
[ 0.014271] Inode-cache hash table entries: 262144 (order: 5, 2097152 bytes)
[ 0.015829] Mount-cache hash table entries: 4096
[ 0.025291] Initializing cgroup subsys cpuacct
[ 0.025301] Initializing cgroup subsys memory
[ 0.025488] Initializing cgroup subsys devices
[ 0.025496] Initializing cgroup subsys freezer
[ 0.025504] Initializing cgroup subsys net_cls
[ 0.025513] Initializing cgroup subsys blkio
[ 0.025520] Initializing cgroup subsys perf_event
[ 0.025561] ftrace: allocating 22464 entries in 9 pages
[ 0.042773] EEH: pSeries platform initialized
[ 0.042787] POWER5 performance monitor hardware support registered
[ 0.046436] Brought up 4 CPUs
[ 0.046450] Node 0 CPUs: 0-3 [ 0.048151] devtmpfs: initialized
[ 0.084223] EEH: devices created
[ 0.086942] atomic64 test passed
[ 0.087097] NET: Registered protocol family 16
[ 0.087144] pseries_eeh_init: RTAS service <ibm,get-config-addr-info2> and <i
bm,get-config-addr-info> invalid
[ 0.087155] eeh_init: Failed to call platform init function (-22)
[ 0.087364] IBM eBus Device Driver
[ 0.091962] PCI: Probing PCI hardware
[ 0.092055] PCI host bridge to bus 0000:00
[ 0.092068] pci_bus 0000:00: root bus resource [io 0x10000-0x10ffff] (bus ad
dress [0x0000-0xfffff])
[ 0.092083] pci_bus 0000:00: root bus resource [mem 0x40080000000-0x400bfffff
ff] (bus address [0xc0000000-0xffffffff])
[ 0.092097] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.101004] IOMMU table initialized, virtual merging enabled
[ 0.105916] pci 0000:c8:01.0: supports D1 D2
[ 0.105929] pci 0000:c8:01.0: PME# supported from D0 D1 D2 D3hot
[ 0.108376] pci 0000:c8:01.1: supports D1 D2
[ 0.108386] pci 0000:c8:01.1: PME# supported from D0 D1 D2 D3hot
[ 0.110812] pci 0000:c8:01.2: supports D1 D2
[ 0.110822] pci 0000:c8:01.2: PME# supported from D0 D1 D2 D3hot
[ 0.114267] pci 0000:cc:01.0: supports D1 [ 0.118840] pci 0000:c0:01.0: PME# supported from D0 D3hot D3cold
[ 0.123005] pci 0000:c0:01.1: PME# supported from D0 D3hot D3cold
[ 0.128128] pci 0000:d0:01.0: PME# supported from D0 D3hot D3cold
[ 0.132394] pci 0000:d0:01.1: PME# supported from D0 D3hot D3cold
[ 0.135218] PCI host bridge to bus 0001:00
[ 0.135230] pci_bus 0001:00: root bus resource [io 0x120000-0x21ffff] (bus a
ddress [0x0000-0xfffff])
[ 0.135245] pci_bus 0001:00: root bus resource [mem 0x401c0000000-0x401ffffff
ff] (bus address [0xc0000000-0xffffffff])
[ 0.135259] pci_bus 0001:00: root bus resource [bus 00-ff]
[ 0.149012] pci 0001:c8:01.0: PME# supported from D0 D3hot D3cold
[ 0.153406] pci 0001:c8:01.1: PME# supported from D0 D3hot D3cold
[ 0.165162] PCI: Probing PCI hardware done
[ 0.165193] opal: Node not found
[ 0.167689] bio: create slab <bio-0> at 0
[ 0.167992] vgaarb: loaded
[ 0.168146] SCSI subsystem initialized
[ 0.168224] libata version 3.00 loaded.
[ 0.168317] usbcore: registered new interface driver usbfs
[ 0.168345] usbcore: registered new interface driver hub
[ 0.168407] usbcore: registered new device driver usb
[ 0.168766] NetLabel: Initializing
[ 0.168774] NetLabel: domain hash size = 128 [ 0.168780] NetLabel: protocols = UNLABELED CIPSOv4
[ 0.168811] NetLabel: unlabeled traffic allowed by default
[ 0.169041] Switching to clocksource timebase
[ 0.192701] NET: Registered protocol family 2
[ 0.193026] TCP established hash table entries: 32768 (order: 3, 524288 bytes
)
[ 0.193445] TCP bind hash table entries: 32768 (order: 3, 524288 bytes)
[ 0.193804] TCP: Hash tables configured (established 32768 bind 32768)
[ 0.193846] TCP: reno registered
[ 0.193859] UDP hash table entries: 2048 (order: 0, 65536 bytes)
[ 0.193923] UDP-Lite hash table entries: 2048 (order: 0, 65536 bytes)
[ 0.194112] NET: Registered protocol family 1
[ 0.309531] pci 0000:c8:01.2: enabling device (0140 -> 0142)
[ 0.310778] PCI: CLS 128 bytes, default 128
[ 0.310876] Unpacking initramfs...
[ 1.101738] Freeing initrd memory: 16384k freed
[ 1.102578] RTAS daemon started
[ 1.103547] RTAS: event: 14, Type: Platform Error, Severity: 2
[ 1.103949] pseries_idle_driver registered
[ 1.104295] audit: initializing netlink socket (disabled)
[ 1.104326] type=2000 audit(1370322269.090:1): initialized
[ 1.364540] HugeTLB registered 16 MB page size, pre-allocated 0 pages
[ 1.368592] VFS: Disk quotas dquot_6.5.2
[ 1.368747] Dquot-cache hash table entries: 8192 (order 0, 65536 bytes)
[ 1.369961] msgmni has been set to 7516
[ 1.370178] SELinux: Registering netfilter hooks
[ 1.371311] alg: No test for stdrng (krng)
[ 1.371335] NET: Registered protocol family 38
[ 1.371440] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 2
52)
[ 1.371502] io scheduler noop registered
[ 1.371510] io scheduler deadline registered
[ 1.371536] io scheduler cfq registered (default)
[ 1.371729] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ 1.372753] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 1.373487] Linux agpgart interface v0.103
[ 1.375442] loop: module loaded
[ 1.375525] Uniform Multi-Platform E-IDE driver
[ 1.375593] ide-gd driver 1.18
[ 1.375904] libphy: Fixed MDIO Bus: probed
[ 1.376023] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.376046] ehci-pci: EHCI PCI platform driver
[ 1.376238] ehci-pci 0000:c8:01.2: enabling device (0140 -> 0142)
[ 1.376650] ehci-pci 0000:c8:01.2: EHCI Host Controller
[ 1.376755] ehci-pci 0000:c8:01.2: new USB bus registered, assigned bus numbe
r 1 [ 1.377184] ehci-pci 0000:c8:01.2: can't setup
[ 1.377197] ehci-pci 0000:c8:01.2: USB bus 1 deregistered
[ 1.377567] ehci-pci 0000:c8:01.2: init 0000:c8:01.2 fail, -19
[ 1.377598] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.389160] ohci_hcd 0000:c8:01.0: Refused to change power state, currently i
n D3
[ 1.389322] ohci_hcd 0000:c8:01.0: OHCI Host Controller
[ 1.389429] ohci_hcd 0000:c8:01.0: new USB bus registered, assigned bus numbe
r 1
[ 11.389147] ohci_hcd 0000:c8:01.0: USB HC takeover failed! (BIOS/SMM bug)
[ 11.389161] ohci_hcd 0000:c8:01.0: can't setup
[ 11.389172] ohci_hcd 0000:c8:01.0: USB bus 1 deregistered
[ 11.389572] ohci_hcd 0000:c8:01.0: init 0000:c8:01.0 fail, -16
[ 11.389586] ohci_hcd: probe of 0000:c8:01.0 failed with error -16
[ 11.409162] ohci_hcd 0000:c8:01.1: Refused to change power state, currently i
n D3
[ 11.409334] ohci_hcd 0000:c8:01.1: OHCI Host Controller
[ 11.409562] ohci_hcd 0000:c8:01.1: new USB bus registered, assigned bus numbe
r 1
[ 21.409088] ohci_hcd 0000:c8:01.1: USB HC takeover failed! (BIOS/SMM bug)
[ 21.409102] ohci_hcd 0000:c8:01.1: can't setup
[ 21.409113] ohci_hcd 0000:c8:01.1: USB bus 1 deregistered
[ 21.409495] ohci_hcd 0000:c8:01.1: init 0000:c8:01.1 fail, -16 [ 21.409508] ohci_hcd: probe of 0000:c8:01.1 failed with error -16
[ 21.409604] uhci_hcd: USB Universal Host Controller Interface driver
[ 21.410032] usbcore: registered new interface driver usbserial
[ 21.410069] usbcore: registered new interface driver usbserial_generic
[ 21.410091] usbserial: USB Serial support registered for generic
[ 21.410402] mousedev: PS/2 mouse device common for all mice
[ 21.410711] rtc-generic rtc-generic: rtc core: registered rtc-generic as rtc0
[ 21.410969] device-mapper: uevent: version 1.0.3
[ 21.411142] device-mapper: ioctl: 4.23.1-ioctl (2012-12-18) initialised: dm-d
evel@redhat.com
[ 21.411279] cpuidle: using governor ladder
[ 21.411423] cpuidle: using governor menu
[ 21.411733] usbcore: registered new interface driver usbhid
[ 21.411741] usbhid: USB HID core driver
[ 21.411820] drop_monitor: Initializing network drop monitor service
[ 21.411990] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 21.412026] TCP: cubic registered
[ 21.412034] Initializing XFRM netlink socket
[ 21.412297] NET: Registered protocol family 10
[ 21.412687] mip6: Mobile IPv6
[ 21.412697] NET: Registered protocol family 17
[ 21.412859] Running MSI bitmap self-tests ...
[ 21.416401] PM: Hibernation image not present or could not be loaded. [ 21.416428] registered taskstats version 1
[ 21.424596] rtc-generic rtc-generic: setting system clock to 2013-06-04 05:04
:50 UTC (1370322290)
[ 21.428021] Freeing unused kernel memory: 6912k freed
[ 21.567622] dracut: dracut-018-105.git20120927.fc17
[ 21.680580] udevd[112]: starting version 182
[ 21.791462] dracut: Starting plymouth daemon
[ 21.926482] pata_pdc2027x 0000:cc:01.0: version 1.0
[ 21.926719] pata_pdc2027x 0000:cc:01.0: enabling device (0000 -> 0003)
[ 21.938847] ipr: IBM Power RAID SCSI Device Driver version: 2.5.4 (July 11, 2
012)
[ 21.939061] ipr 0001:d0:01.0: Found IOA with IRQ: 151
[ 21.942276] ipr 0001:d0:01.0: Write of cache line size failed
[ 21.942584] ipr: probe of 0001:d0:01.0 failed with error -5
[ 22.027478] pata_pdc2027x 0000:cc:01.0: PLL input clock 0 kHz
[ 22.027493] pata_pdc2027x: Invalid PLL input clock 0kHz, give up!
[ 22.029939] scsi1 : pata_pdc2027x
[ 22.030669] scsi2 : pata_pdc2027x
[ 22.030809] ata1: PATA max UDMA/133 mmio m16384@0x400b0000000 cmd 0x400b00017
c0 irq 118
[ 22.030824] ata2: PATA max UDMA/133 mmio m16384@0x400b0000000 cmd 0x400b00015
c0 irq 118
[ 22.189135] pata_pdc2027x: 40-conductor cable detected on port 0 [ 22.349130] pata_pdc2027x: 40-conductor cable detected on port 1
[ 43.699176] dracut Warning: Unable to process initqueue
[ 43.704038] dracut Warning: /dev/mapper/vg_narvi-lv_root does not exist
[ 43.704543] dracut Warning: /dev/vg_narvi/lv_root does not exist
[ 43.705036] dracut Warning: /dev/vg_narvi/lv_swap does not exist
^ permalink raw reply
* Re: [PATCH] powerpc/hw_breakpoints: Add DABRX cpu feature
From: Michael Neuling @ 2013-06-04 1:59 UTC (permalink / raw)
To: benh, Linux PPC dev; +Cc: Gorelik, Jacob (335F)
In-Reply-To: <9649.1368772051@ale.ozlabs.ibm.com>
Benh,
Can you take this for 3.10 also?
Mikey
Michael Neuling <mikey@neuling.org> wrote:
> Some CPUs have a DABR but not DABRX. Configuration are:
> - No 32bit CPUs have DABRX but some have DABR.
> - POWER4+ and below have the DABR but no DABRX.
> - 970 and POWER5 and above have DABR and DABRX.
> - POWER8 has DAWR, hence no DABRX.
>
> This introduces CPU_FTR_DABRX and sets it on appropriate CPUs. We use
> the top 64 bits for CPU FTR bits since only 64 bit CPUs have this.
>
> Processors that don't have the DABRX will still work as they will fall
> back to software filtering these breakpoints via perf_exclude_event().
>
> Signed-off-by: Michael Neuling <mikey@neuling.org>
> Reported-by: "Gorelik, Jacob (335F)" <jacob.gorelik@jpl.nasa.gov>
> cc: stable@vger.kernel.org (v3.9 only)
>
> diff --git a/arch/powerpc/include/asm/cputable.h b/arch/powerpc/include/asm/cputable.h
> index 26807e5..6f3887d 100644
> --- a/arch/powerpc/include/asm/cputable.h
> +++ b/arch/powerpc/include/asm/cputable.h
> @@ -176,6 +176,7 @@ extern const char *powerpc_base_platform;
> #define CPU_FTR_CFAR LONG_ASM_CONST(0x0100000000000000)
> #define CPU_FTR_HAS_PPR LONG_ASM_CONST(0x0200000000000000)
> #define CPU_FTR_DAWR LONG_ASM_CONST(0x0400000000000000)
> +#define CPU_FTR_DABRX LONG_ASM_CONST(0x0800000000000000)
>
> #ifndef __ASSEMBLY__
>
> @@ -394,19 +395,20 @@ extern const char *powerpc_base_platform;
> CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | CPU_FTR_ARCH_201 | \
> CPU_FTR_ALTIVEC_COMP | CPU_FTR_CAN_NAP | CPU_FTR_MMCRA | \
> CPU_FTR_CP_USE_DCBTZ | CPU_FTR_STCX_CHECKS_ADDRESS | \
> - CPU_FTR_HVMODE)
> + CPU_FTR_HVMODE | CPU_FTR_DABRX)
> #define CPU_FTRS_POWER5 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
> CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
> CPU_FTR_MMCRA | CPU_FTR_SMT | \
> CPU_FTR_COHERENT_ICACHE | CPU_FTR_PURR | \
> - CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB)
> + CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_DABRX)
> #define CPU_FTRS_POWER6 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
> CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
> CPU_FTR_MMCRA | CPU_FTR_SMT | \
> CPU_FTR_COHERENT_ICACHE | \
> CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \
> CPU_FTR_DSCR | CPU_FTR_UNALIGNED_LD_STD | \
> - CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_CFAR)
> + CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_CFAR | \
> + CPU_FTR_DABRX)
> #define CPU_FTRS_POWER7 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
> CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | CPU_FTR_ARCH_206 |\
> CPU_FTR_MMCRA | CPU_FTR_SMT | \
> @@ -415,7 +417,7 @@ extern const char *powerpc_base_platform;
> CPU_FTR_DSCR | CPU_FTR_SAO | CPU_FTR_ASYM_SMT | \
> CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_POPCNTD | \
> CPU_FTR_ICSWX | CPU_FTR_CFAR | CPU_FTR_HVMODE | \
> - CPU_FTR_VMX_COPY | CPU_FTR_HAS_PPR)
> + CPU_FTR_VMX_COPY | CPU_FTR_HAS_PPR | CPU_FTR_DABRX)
> #define CPU_FTRS_POWER8 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
> CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | CPU_FTR_ARCH_206 |\
> CPU_FTR_MMCRA | CPU_FTR_SMT | \
> @@ -430,14 +432,15 @@ extern const char *powerpc_base_platform;
> CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
> CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \
> CPU_FTR_PAUSE_ZERO | CPU_FTR_CELL_TB_BUG | CPU_FTR_CP_USE_DCBTZ | \
> - CPU_FTR_UNALIGNED_LD_STD)
> + CPU_FTR_UNALIGNED_LD_STD | CPU_FTR_DABRX)
> #define CPU_FTRS_PA6T (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
> CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP | \
> - CPU_FTR_PURR | CPU_FTR_REAL_LE)
> + CPU_FTR_PURR | CPU_FTR_REAL_LE | CPU_FTR_DABRX)
> #define CPU_FTRS_COMPATIBLE (CPU_FTR_USE_TB | CPU_FTR_PPCAS_ARCH_V2)
>
> #define CPU_FTRS_A2 (CPU_FTR_USE_TB | CPU_FTR_SMT | CPU_FTR_DBELL | \
> - CPU_FTR_NOEXECUTE | CPU_FTR_NODSISRALIGN | CPU_FTR_ICSWX)
> + CPU_FTR_NOEXECUTE | CPU_FTR_NODSISRALIGN | \
> + CPU_FTR_ICSWX | CPU_FTR_DABRX )
>
> #ifdef __powerpc64__
> #ifdef CONFIG_PPC_BOOK3E
> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> index a902723..b0f3e3f 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -399,7 +399,8 @@ static inline int __set_dabr(unsigned long dabr, unsigned long dabrx)
> static inline int __set_dabr(unsigned long dabr, unsigned long dabrx)
> {
> mtspr(SPRN_DABR, dabr);
> - mtspr(SPRN_DABRX, dabrx);
> + if (cpu_has_feature(CPU_FTR_DABRX))
> + mtspr(SPRN_DABRX, dabrx);
> return 0;
> }
> #else
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
^ permalink raw reply
* Re: IBM OpenPower 720 ipr driver woes
From: Tony Breeds @ 2013-06-04 3:16 UTC (permalink / raw)
To: Robert Knight; +Cc: Brian King, linuxppc-dev, Wendy Xiong, Gavin Shan
In-Reply-To: <51AD45A4.9080702@princeton.edu>
[-- Attachment #1: Type: text/plain, Size: 1419 bytes --]
On Mon, Jun 03, 2013 at 09:40:52PM -0400, Robert Knight wrote:
> On 6/3/2013 8:01 PM, Tony Breeds wrote:
> >On Mon, Jun 03, 2013 at 05:20:12PM -0400, Robert Knight wrote:
> >
> >>>Device tree struct 0x0000000004820000 -> 0x0000000004840000
> >>>Calling quiesce...
> >>>returning from prom_init
> >>>[ 1.376359] ehci-pci 0000:c8:01.2: can't setup
> >Can you try adding "debug" to the kernel commandline. We're missing a
> >great chunk of detail. If you're starting from scratch either try F18 or
> >the F19 Beta (if you're brave :))
> >
> >Yours Tony
> So, two points. Since I have no live disks, I can't copy the dmesg
> output in dracut onto a disk and just sent it to you -- the only way
> that I know to get it is cut and paste from a HMC console window
> into a vi buffer.
Okay, when I've been in that situation, I run "script" locally and then
conenct to the HMC console.
When you're done you can exit script adn then a file called typescript
will exist in the directory you ran script in.
It's a less overhead way of doign what you're already doing.
[ 0.087097] NET: Registered protocol family 16
> [ 0.087144] pseries_eeh_init: RTAS service <ibm,get-config-addr-info2> and <i
> bm,get-config-addr-info> invalid
> [ 0.087155] eeh_init: Failed to call platform init function (-22)
Hmm this seems pretty strange to me. Gavin are these RTAS tokens
supported on older power5 boxes?
Yours Tony
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: IBM OpenPower 720 ipr driver woes
From: Gavin Shan @ 2013-06-04 3:52 UTC (permalink / raw)
To: Robert Knight, Brian King, Wendy Xiong, linuxppc-dev, Gavin Shan
In-Reply-To: <20130604031651.GA3373@thor.bakeyournoodle.com>
[-- Attachment #1: Type: text/plain, Size: 1738 bytes --]
On Tue, Jun 04, 2013 at 01:16:52PM +1000, Tony Breeds wrote:
>On Mon, Jun 03, 2013 at 09:40:52PM -0400, Robert Knight wrote:
>> On 6/3/2013 8:01 PM, Tony Breeds wrote:
>> >On Mon, Jun 03, 2013 at 05:20:12PM -0400, Robert Knight wrote:
>> >
>> >>>Device tree struct 0x0000000004820000 -> 0x0000000004840000
>> >>>Calling quiesce...
>> >>>returning from prom_init
>> >>>[ 1.376359] ehci-pci 0000:c8:01.2: can't setup
>> >Can you try adding "debug" to the kernel commandline. We're missing a
>> >great chunk of detail. If you're starting from scratch either try F18 or
>> >the F19 Beta (if you're brave :))
>> >
>> >Yours Tony
>> So, two points. Since I have no live disks, I can't copy the dmesg
>> output in dracut onto a disk and just sent it to you -- the only way
>> that I know to get it is cut and paste from a HMC console window
>> into a vi buffer.
>
>Okay, when I've been in that situation, I run "script" locally and then
>conenct to the HMC console.
>
>When you're done you can exit script adn then a file called typescript
>will exist in the directory you ran script in.
>
>It's a less overhead way of doign what you're already doing.
> [ 0.087097] NET: Registered protocol family 16
>
>> [ 0.087144] pseries_eeh_init: RTAS service <ibm,get-config-addr-info2> and <i
>> bm,get-config-addr-info> invalid
>> [ 0.087155] eeh_init: Failed to call platform init function (-22)
>
>Hmm this seems pretty strange to me. Gavin are these RTAS tokens
>supported on older power5 boxes?
>
Yes, Tony. "ibm,get-config-addr-info" should be supported on Power5 box.
Newer PowerBox (e.g. P7) should support "ibm,get-config-addr-info2"
Please have a try on the attached patch, which is based on mainline (3.10).
Thanks,
Gavin
[-- Attachment #2: 0001-powerpc-eeh-Don-t-check-RTAS-token-to-get-PE-addr.patch --]
[-- Type: text/x-diff, Size: 2348 bytes --]
>From 04771628d53e1e6883063ed21bd6825ee9680366 Mon Sep 17 00:00:00 2001
From: Gavin Shan <shangw@linux.vnet.ibm.com>
Date: Tue, 4 Jun 2013 11:47:59 +0800
Subject: [PATCH] powerpc/eeh: Don't check RTAS token to get PE addr
RTAS token "ibm,get-config-addr-info" or ibm,get-config-addr-info2"
are used to retrieve the PE address according to PCI address, which
made up of domain/bus/slot/function. If we don't have those 2 tokens,
the domain/bus/slot/function would be used as the address for EEH
RTAS operations. Some older f/w might not have those 2 tokens and
that blocks the EEH functionality to be initialized.
The patch skips the check on those 2 tokens so we can bring up EEH
functionality successfully. And domain/bus/slot/function will be
used as address for EEH RTAS operations.
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
---
arch/powerpc/platforms/pseries/eeh_pseries.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c
index 19506f9..b456b15 100644
--- a/arch/powerpc/platforms/pseries/eeh_pseries.c
+++ b/arch/powerpc/platforms/pseries/eeh_pseries.c
@@ -83,7 +83,11 @@ static int pseries_eeh_init(void)
ibm_configure_pe = rtas_token("ibm,configure-pe");
ibm_configure_bridge = rtas_token("ibm,configure-bridge");
- /* necessary sanity check */
+ /*
+ * Necessary sanity check. We needn't check "get-config-addr-info"
+ * and its variant since the old firmware probably support address
+ * of domain/bus/slot/function for EEH RTAS operations.
+ */
if (ibm_set_eeh_option == RTAS_UNKNOWN_SERVICE) {
pr_warning("%s: RTAS service <ibm,set-eeh-option> invalid\n",
__func__);
@@ -102,12 +106,6 @@ static int pseries_eeh_init(void)
pr_warning("%s: RTAS service <ibm,slot-error-detail> invalid\n",
__func__);
return -EINVAL;
- } else if (ibm_get_config_addr_info2 == RTAS_UNKNOWN_SERVICE &&
- ibm_get_config_addr_info == RTAS_UNKNOWN_SERVICE) {
- pr_warning("%s: RTAS service <ibm,get-config-addr-info2> and "
- "<ibm,get-config-addr-info> invalid\n",
- __func__);
- return -EINVAL;
} else if (ibm_configure_pe == RTAS_UNKNOWN_SERVICE &&
ibm_configure_bridge == RTAS_UNKNOWN_SERVICE) {
pr_warning("%s: RTAS service <ibm,configure-pe> and "
--
1.7.5.4
^ permalink raw reply related
* [PATCH] powerpc/perf: Fix deadlock caused by calling printk() in PMU exception
From: Michael Ellerman @ 2013-06-04 4:20 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Michael Neuling, sukadev, Paul Mackerras, Anton Blanchard
In commit bc09c21 "Fix finding overflowed PMC in interrupt" we added
a printk() to the PMU exception handler. Unfortunately that is not safe.
The problem is that the PMU exception runs even when interrupts are soft
disabled. We do this so that we can profile parts of the kernel that
have interrupts soft-disabled.
But by calling printk() from the exception handler, we can potentially
deadlock in the printk code on logbuf_lock, eg:
[c00000038ba575c0] c000000000081928 .vprintk_emit+0xa8/0x540
[c00000038ba576a0] c0000000007bcde8 .printk+0x48/0x58
[c00000038ba57710] c000000000076504 .perf_event_interrupt+0x2d4/0x490
[c00000038ba57810] c00000000001f6f8 .performance_monitor_exception+0x48/0x60
[c00000038ba57880] c0000000000032cc performance_monitor_common+0x14c/0x180
--- Exception: f01 (Performance Monitor) at c0000000007b25d4 ._raw_spin_lock_irq
+0x64/0xc0
[c00000038ba57bf0] c00000000007ed90 .devkmsg_read+0xd0/0x5a0
[c00000038ba57d00] c0000000001c2934 .vfs_read+0xc4/0x1e0
[c00000038ba57d90] c0000000001c2cd8 .SyS_read+0x58/0xd0
[c00000038ba57e30] c000000000009d54 syscall_exit+0x0/0x98
--- Exception: c01 (System Call) at 00001fffffbf6f7c
SP (3ffff6d4de10) is in userspace
The fix is to not call printk() from the PMU exception handler. Instead
add a counter to track spurious PMU interrupts and display them in
/proc/interrupts.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Cc: <stable@vger.kernel.org> # 3.9
---
arch/powerpc/include/asm/hardirq.h | 1 +
arch/powerpc/kernel/irq.c | 5 +++++
arch/powerpc/perf/core-book3s.c | 5 +++--
3 files changed, 9 insertions(+), 2 deletions(-)
tag: for-3.10
diff --git a/arch/powerpc/include/asm/hardirq.h b/arch/powerpc/include/asm/hardirq.h
index 3bdcfce..23b5c45 100644
--- a/arch/powerpc/include/asm/hardirq.h
+++ b/arch/powerpc/include/asm/hardirq.h
@@ -8,6 +8,7 @@ typedef struct {
unsigned int __softirq_pending;
unsigned int timer_irqs;
unsigned int pmu_irqs;
+ unsigned int pmu_spurious_irqs;
unsigned int mce_exceptions;
unsigned int spurious_irqs;
#ifdef CONFIG_PPC_DOORBELL
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 5cbcf4d..91f5d03 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -369,6 +369,11 @@ int arch_show_interrupts(struct seq_file *p, int prec)
seq_printf(p, "%10u ", per_cpu(irq_stat, j).pmu_irqs);
seq_printf(p, " Performance monitoring interrupts\n");
+ seq_printf(p, "%*s: ", prec, "PMS");
+ for_each_online_cpu(j)
+ seq_printf(p, "%10u ", per_cpu(irq_stat, j).pmu_irqs);
+ seq_printf(p, " Performance monitoring interrupts (spurious)\n");
+
seq_printf(p, "%*s: ", prec, "MCE");
for_each_online_cpu(j)
seq_printf(p, "%10u ", per_cpu(irq_stat, j).mce_exceptions);
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index 845c867..3a71069 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -1758,8 +1758,9 @@ static void perf_event_interrupt(struct pt_regs *regs)
}
}
}
- if ((!found) && printk_ratelimit())
- printk(KERN_WARNING "Can't find PMC that caused IRQ\n");
+
+ if (!found)
+ __get_cpu_var(irq_stat).pmu_spurious_irqs++;
/*
* Reset MMCR0 to its normal value. This will set PMXE and
--
1.7.10.4
^ permalink raw reply related
* [PATCH] powerpc: Rename PMU interrupts from CNT to PMI
From: Michael Ellerman @ 2013-06-04 4:21 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Anton Blanchard
Back in commit 89713ed "Add timer, performance monitor and machine check
counts to /proc/interrupts" we added a count of PMU interrupts to the
output of /proc/interrupts.
At the time we named them "CNT" to match x86.
However in commit 89ccf46 "Rename 'performance counter interrupt'", the
x86 guys renamed theirs from "CNT" to "PMI".
Arguably changing the name could break someone's script, but I think the
chance of that is minimal, and it's preferable to have a name that 1) is
somewhat meaningful, and 2) matches x86.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/kernel/irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 91f5d03..f3da6215 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -364,7 +364,7 @@ int arch_show_interrupts(struct seq_file *p, int prec)
seq_printf(p, "%10u ", per_cpu(irq_stat, j).spurious_irqs);
seq_printf(p, " Spurious interrupts\n");
- seq_printf(p, "%*s: ", prec, "CNT");
+ seq_printf(p, "%*s: ", prec, "PMI");
for_each_online_cpu(j)
seq_printf(p, "%10u ", per_cpu(irq_stat, j).pmu_irqs);
seq_printf(p, " Performance monitoring interrupts\n");
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH v3 8/8] powerpc/pseries: Read common partition via pstore
From: Aruna Balakrishnaiah @ 2013-06-04 9:02 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: jkenisto, tony.luck, mahesh, cbouatmailru, linux-kernel,
linuxppc-dev, paulus, anton, ccross, keescook
In-Reply-To: <1370062367.3766.30.camel@pasglop>
On Saturday 01 June 2013 10:22 AM, Benjamin Herrenschmidt wrote:
> On Thu, 2013-04-25 at 15:49 +0530, Aruna Balakrishnaiah wrote:
>
>> diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
>> index 8d4fb65..88cc050 100644
>> --- a/fs/pstore/inode.c
>> +++ b/fs/pstore/inode.c
>> @@ -330,6 +330,9 @@ int pstore_mkfile(enum pstore_type_id type, char *psname, u64 id, int count,
>> case PSTORE_TYPE_PPC_OF:
>> sprintf(name, "of-%s-%lld", psname, id);
>> break;
> Call this powerpc-ofw-... Does it even contain something we use in Linux
> at all ? Last I looked we only used the common one right ? Also it's
> format afaik is defined in the CHRP bindings so it's not generic OFW
> stuff, hence the powerpc prefix.
>
>> + case PSTORE_TYPE_PPC_COMMON:
>> + sprintf(name, "common-%s-%lld", psname, id);
>> + break;
> Same deal, call that powerpc-common
Sure. Will change it to powerpc prefix.
>> case PSTORE_TYPE_UNKNOWN:
>> sprintf(name, "unknown-%s-%lld", psname, id);
>> break;
>> diff --git a/include/linux/pstore.h b/include/linux/pstore.h
>> index 615dc18..656699f 100644
>> --- a/include/linux/pstore.h
>> +++ b/include/linux/pstore.h
>> @@ -38,6 +38,7 @@ enum pstore_type_id {
>> /* PPC64 partition types */
>> PSTORE_TYPE_PPC_RTAS = 4,
>> PSTORE_TYPE_PPC_OF = 5,
>> + PSTORE_TYPE_PPC_COMMON = 6,
>> PSTORE_TYPE_UNKNOWN = 255
>> };
> Do we expose anything else or keep it hidden ?
We are exposing oops, rtas, of-config and common partition of nvram.
> Cheers,
> Ben.
>
>
^ permalink raw reply
* Re: [PATCH] powerpc/perf: Fix deadlock caused by calling printk() in PMU exception
From: Anshuman Khandual @ 2013-06-04 9:05 UTC (permalink / raw)
To: Michael Ellerman
Cc: linuxppc-dev, Michael Neuling, sukadev, Paul Mackerras,
Anton Blanchard
In-Reply-To: <1370319657-26753-1-git-send-email-michael@ellerman.id.au>
> + seq_printf(p, "%*s: ", prec, "PMS");
Lets make this PMIS or PMI_S instead of PMS.
> + for_each_online_cpu(j)
> + seq_printf(p, "%10u ", per_cpu(irq_stat, j).pmu_irqs);
This would be pmu_spurious_irqs instead of pmu_irqs.
^ permalink raw reply
* Re: [PATCH 3/3] powerpc/pseries: Support compression of oops text via pstore
From: Aruna Balakrishnaiah @ 2013-06-04 9:07 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: jkenisto, tony.luck, keescook, mahesh, ccross, linux-kernel,
linuxppc-dev, paulus, anton, cbouatmailru
In-Reply-To: <1370062455.3766.31.camel@pasglop>
Hi Ben,
On Saturday 01 June 2013 10:24 AM, Benjamin Herrenschmidt wrote:
> On Fri, 2013-04-26 at 15:26 +0530, Aruna Balakrishnaiah wrote:
>> The patch set supports compression of oops messages while writing to NVRAM,
>> this helps in capturing more of oops data to lnx,oops-log. The pstore file
>> for oops messages will be in decompressed format making it readable.
>>
>> In case compression fails, the patch takes care of copying the header added
>> by pstore and last oops_data_sz bytes of big_oops_buf to NVRAM so that we
>> have recent oops messages in lnx,oops-log.
>>
>> In case decompression fails, it will result in absence of oops file but still
>> have files (in /dev/pstore) for other partitions.
> Any reason that isn't handled by pstore itself rather than here ? Ie
> make a flag indicating that the partition supports compression and have
> pstore do it (so we don't compress everything such as ofw common etc...)
>
> Cheers,
> Ben.
>
Since pstore does not have the compression support, I planned to reuse the
existing compression code in nvram but later we can add compression support
to pstore so that other platforms can make use of it.
Regards,
Aruna
>> Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
>> ---
>> arch/powerpc/platforms/pseries/nvram.c | 132 +++++++++++++++++++++++++++++---
>> 1 file changed, 118 insertions(+), 14 deletions(-)
>>
>> diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c
>> index 0159d74..b5ba5e2 100644
>> --- a/arch/powerpc/platforms/pseries/nvram.c
>> +++ b/arch/powerpc/platforms/pseries/nvram.c
>> @@ -539,6 +539,65 @@ static int zip_oops(size_t text_len)
>> }
>>
>> #ifdef CONFIG_PSTORE
>> +/* Derived from logfs_uncompress */
>> +int nvram_decompress(void *in, void *out, size_t inlen, size_t outlen)
>> +{
>> + int err, ret;
>> +
>> + ret = -EIO;
>> + err = zlib_inflateInit(&stream);
>> + if (err != Z_OK)
>> + goto error;
>> +
>> + stream.next_in = in;
>> + stream.avail_in = inlen;
>> + stream.total_in = 0;
>> + stream.next_out = out;
>> + stream.avail_out = outlen;
>> + stream.total_out = 0;
>> +
>> + err = zlib_inflate(&stream, Z_FINISH);
>> + if (err != Z_STREAM_END)
>> + goto error;
>> +
>> + err = zlib_inflateEnd(&stream);
>> + if (err != Z_OK)
>> + goto error;
>> +
>> + ret = stream.total_out;
>> +error:
>> + return ret;
>> +}
>> +
>> +static int unzip_oops(char *oops_buf, char *big_buf)
>> +{
>> + struct oops_log_info *oops_hdr = (struct oops_log_info *)oops_buf;
>> + u64 timestamp = oops_hdr->timestamp;
>> + char *big_oops_data = NULL;
>> + char *oops_data_buf = NULL;
>> + size_t big_oops_data_sz;
>> + int unzipped_len;
>> +
>> + big_oops_data = big_buf + sizeof(struct oops_log_info);
>> + big_oops_data_sz = big_oops_buf_sz - sizeof(struct oops_log_info);
>> + oops_data_buf = oops_buf + sizeof(struct oops_log_info);
>> +
>> + unzipped_len = nvram_decompress(oops_data_buf, big_oops_data,
>> + oops_hdr->report_length,
>> + big_oops_data_sz);
>> +
>> + if (unzipped_len < 0) {
>> + pr_err("nvram: decompression failed; returned %d\n",
>> + unzipped_len);
>> + return -1;
>> + }
>> + oops_hdr = (struct oops_log_info *)big_buf;
>> + oops_hdr->version = OOPS_HDR_VERSION;
>> + oops_hdr->report_length = (u16) unzipped_len;
>> + oops_hdr->timestamp = timestamp;
>> + return 0;
>> +}
>> +
>> static int nvram_pstore_open(struct pstore_info *psi)
>> {
>> /* Reset the iterator to start reading partitions again */
>> @@ -567,6 +626,7 @@ static int nvram_pstore_write(enum pstore_type_id type,
>> size_t size, struct pstore_info *psi)
>> {
>> int rc;
>> + unsigned int err_type = ERR_TYPE_KERNEL_PANIC;
>> struct oops_log_info *oops_hdr = (struct oops_log_info *) oops_buf;
>>
>> /* part 1 has the recent messages from printk buffer */
>> @@ -577,8 +637,31 @@ static int nvram_pstore_write(enum pstore_type_id type,
>> oops_hdr->version = OOPS_HDR_VERSION;
>> oops_hdr->report_length = (u16) size;
>> oops_hdr->timestamp = get_seconds();
>> +
>> + if (big_oops_buf) {
>> + rc = zip_oops(size);
>> + /*
>> + * If compression fails copy recent log messages from
>> + * big_oops_buf to oops_data.
>> + */
>> + if (rc != 0) {
>> + int hsize = pstore_get_header_size();
>> + size_t diff = size - oops_data_sz + hsize;
>> +
>> + if (size > oops_data_sz) {
>> + memcpy(oops_data, big_oops_buf, hsize);
>> + memcpy(oops_data + hsize, big_oops_buf + diff,
>> + oops_data_sz - hsize);
>> +
>> + oops_hdr->report_length = (u16) oops_data_sz;
>> + } else
>> + memcpy(oops_data, big_oops_buf, size);
>> + } else
>> + err_type = ERR_TYPE_KERNEL_PANIC_GZ;
>> + }
>> +
>> rc = nvram_write_os_partition(&oops_log_partition, oops_buf,
>> - (int) (sizeof(*oops_hdr) + size), ERR_TYPE_KERNEL_PANIC,
>> + (int) (sizeof(*oops_hdr) + oops_hdr->report_length), err_type,
>> count);
>>
>> if (rc != 0)
>> @@ -600,10 +683,11 @@ static ssize_t nvram_pstore_read(u64 *id, enum pstore_type_id *type,
>> struct oops_log_info *oops_hdr;
>> unsigned int err_type, id_no, size = 0;
>> struct nvram_os_partition *part = NULL;
>> - char *buff = NULL;
>> - int sig = 0;
>> + char *buff = NULL, *big_buff = NULL;
>> + int rc, sig = 0;
>> loff_t p;
>>
>> +read_partition:
>> read_type++;
>>
>> switch (nvram_type_ids[read_type]) {
>> @@ -666,6 +750,25 @@ static ssize_t nvram_pstore_read(u64 *id, enum pstore_type_id *type,
>> if (nvram_type_ids[read_type] == PSTORE_TYPE_DMESG) {
>> oops_hdr = (struct oops_log_info *)buff;
>> *buf = buff + sizeof(*oops_hdr);
>> +
>> + if (err_type == ERR_TYPE_KERNEL_PANIC_GZ) {
>> + big_buff = kmalloc(big_oops_buf_sz, GFP_KERNEL);
>> + if (!big_buff)
>> + return -ENOMEM;
>> +
>> + rc = unzip_oops(buff, big_buff);
>> +
>> + if (rc != 0) {
>> + kfree(buff);
>> + kfree(big_buff);
>> + goto read_partition;
>> + }
>> +
>> + oops_hdr = (struct oops_log_info *)big_buff;
>> + *buf = big_buff + sizeof(*oops_hdr);
>> + kfree(buff);
>> + }
>> +
>> time->tv_sec = oops_hdr->timestamp;
>> time->tv_nsec = 0;
>> return oops_hdr->report_length;
>> @@ -687,17 +790,18 @@ static int nvram_pstore_init(void)
>> {
>> int rc = 0;
>>
>> - nvram_pstore_info.buf = oops_data;
>> - nvram_pstore_info.bufsize = oops_data_sz;
>> + if (big_oops_buf) {
>> + nvram_pstore_info.buf = big_oops_buf;
>> + nvram_pstore_info.bufsize = big_oops_buf_sz;
>> + } else {
>> + nvram_pstore_info.buf = oops_data;
>> + nvram_pstore_info.bufsize = oops_data_sz;
>> + }
>>
>> rc = pstore_register(&nvram_pstore_info);
>> if (rc != 0)
>> pr_err("nvram: pstore_register() failed, defaults to "
>> "kmsg_dump; returned %d\n", rc);
>> - else
>> - /*TODO: Support compression when pstore is configured */
>> - pr_info("nvram: Compression of oops text supported only when "
>> - "pstore is not configured");
>>
>> return rc;
>> }
>> @@ -731,11 +835,6 @@ static void __init nvram_init_oops_partition(int rtas_partition_exists)
>> oops_data = oops_buf + sizeof(struct oops_log_info);
>> oops_data_sz = oops_log_partition.size - sizeof(struct oops_log_info);
>>
>> - rc = nvram_pstore_init();
>> -
>> - if (!rc)
>> - return;
>> -
>> /*
>> * Figure compression (preceded by elimination of each line's <n>
>> * severity prefix) will reduce the oops/panic report to at most
>> @@ -759,6 +858,11 @@ static void __init nvram_init_oops_partition(int rtas_partition_exists)
>> stream.workspace = NULL;
>> }
>>
>> + rc = nvram_pstore_init();
>> +
>> + if (!rc)
>> + return;
>> +
>> rc = kmsg_dump_register(&nvram_kmsg_dumper);
>> if (rc != 0) {
>> pr_err("nvram: kmsg_dump_register() failed; returned %d\n", rc);
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
^ permalink raw reply
* Re: [PATCH] powerpc/perf: Fix deadlock caused by calling printk() in PMU exception
From: Michael Ellerman @ 2013-06-04 9:50 UTC (permalink / raw)
To: Anshuman Khandual
Cc: linuxppc-dev, Michael Neuling, sukadev, Paul Mackerras,
Anton Blanchard
In-Reply-To: <51ADADEB.1040109@linux.vnet.ibm.com>
On Tue, 2013-06-04 at 14:35 +0530, Anshuman Khandual wrote:
> > + seq_printf(p, "%*s: ", prec, "PMS");
>
> Lets make this PMIS or PMI_S instead of PMS.
Everything else is aligned using a three character prefix, so that would
stuff the alignment up.
>
> > + for_each_online_cpu(j)
> > + seq_printf(p, "%10u ", per_cpu(irq_stat, j).pmu_irqs);
>
> This would be pmu_spurious_irqs instead of pmu_irqs.
Yep, thanks for reviewing.
I'm actually thinking I'll drop the counter, at least until we can be
sure it's not us causing the spurious interrupts.
cheers
^ permalink raw reply
* Re: [PATCH 2/3] powerpc/perf: add 2 additional performance monitor counters for e6500 core
From: Scott Wood @ 2013-06-04 18:10 UTC (permalink / raw)
To: Lijun Pan; +Cc: linuxppc-dev, Lijun.Pan
In-Reply-To: <1369865562-29525-2-git-send-email-Lijun.Pan@freescale.com>
On 05/29/2013 05:12:41 PM, Lijun Pan wrote:
> diff --git a/arch/powerpc/kernel/cputable.c =20
> b/arch/powerpc/kernel/cputable.c
> index cc39139..2d4eee2 100644
> --- a/arch/powerpc/kernel/cputable.c
> +++ b/arch/powerpc/kernel/cputable.c
> @@ -2073,7 +2073,7 @@ static struct cpu_spec __initdata cpu_specs[] =3D =20
> {
> MMU_FTR_USE_TLBILX,
> .icache_bsize =3D 64,
> .dcache_bsize =3D 64,
> - .num_pmcs =3D 4,
> + .num_pmcs =3D 6,
> .oprofile_cpu_type =3D "ppc/e6500",
> .oprofile_type =3D PPC_OPROFILE_FSL_EMB,
> .cpu_setup =3D __setup_cpu_e6500,
This will overflow MAX_HWEVENTS. Please include "powerpc perf: =20
increase the perf HW events to 6" from our SDK tree before this patch =20
(be sure to change "powerpc perf" to "powerpc/perf" and remove the =20
gerrit tags when you do so).
-Scott=
^ permalink raw reply
* Re: [RFC PATCH 0/6] KVM: PPC: Book3E: AltiVec support
From: Scott Wood @ 2013-06-04 21:39 UTC (permalink / raw)
To: Mihai Caraman; +Cc: linuxppc-dev, kvm, kvm-ppc, Alexander Graf
In-Reply-To: <1370292868-2697-1-git-send-email-mihai.caraman@freescale.com>
On 06/03/2013 03:54:22 PM, Mihai Caraman wrote:
> Mihai Caraman (6):
> KVM: PPC: Book3E: Fix AltiVec interrupt numbers and build breakage
> KVM: PPC: Book3E: Refactor SPE_FP exit handling
> KVM: PPC: Book3E: Rename IRQPRIO names to accommodate ALTIVEC
> KVM: PPC: Book3E: Add AltiVec support
> KVM: PPC: Book3E: Add ONE_REG AltiVec support
> KVM: PPC: Book3E: Enhance FPU laziness
>=20
> arch/powerpc/include/asm/kvm_asm.h | 16 ++-
> arch/powerpc/kvm/booke.c | 189 =20
> ++++++++++++++++++++++++++++----
> arch/powerpc/kvm/booke.h | 4 +-
> arch/powerpc/kvm/bookehv_interrupts.S | 8 +-
> arch/powerpc/kvm/e500.c | 10 +-
> arch/powerpc/kvm/e500_emulate.c | 8 +-
> arch/powerpc/kvm/e500mc.c | 10 ++-
> 7 files changed, 199 insertions(+), 46 deletions(-)
This looks like a bit much for 3.10 (certainly, subject lines like =20
"refactor" and "enhance" and "add support" aren't going to make Linus =20
happy given that we're past rc4) so I think we should apply =20
http://patchwork.ozlabs.org/patch/242896/ for 3.10. Then for 3.11, =20
revert it after applying this patchset.
-Scott=
^ permalink raw reply
* Re: Handling of IRQ in MPC8xx GPIO
From: Scott Wood @ 2013-06-04 21:59 UTC (permalink / raw)
To: LEROY Christophe
Cc: Marcelo Tosatti, linux-kernel, Paul Mackerras, Thomas Gleixner,
linuxppc-dev
In-Reply-To: <201302211632.r1LGWaRr025445@localhost.localdomain>
On Thu, Feb 21, 2013 at 06:32:36AM -0000, LEROY Christophe wrote:
> This patch allows the use IRQ to notify the change of GPIO status on the MPC8xx
> CPM IO ports. This then allows to associate IRQs to GPIOs in the Device Tree. Ex:
> CPM1_PIO_C: gpio-controller@960 {
> #gpio-cells = <2>;
> compatible = "fsl,cpm1-pario-bank-c";
> reg = <0x960 0x10>;
> interrupts = <255 255 255 255 1 2 6 9 10 11 14 15 23 24 26 31>;
> interrupt-parent = <&CPM_PIC>;
> gpio-controller;
> };
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
[snip]
> @@ -581,6 +588,30 @@
> spin_unlock_irqrestore(&cpm1_gc->lock, flags);
> }
>
> +static int __cpm1_gpio16_to_irq(struct of_mm_gpio_chip *mm_gc,
> + unsigned int gpio)
> +{
> + struct cpm1_gpio16_chip *cpm1_gc = to_cpm1_gpio16_chip(mm_gc);
> +
> + return cpm1_gc->irq[gpio] ? cpm1_gc->irq[gpio] : -ENXIO;
> +}
If it's an internal function, why not just pass in cpm1_gc?
Or just open-code it, as it's a one-liner and you don't use it anywhere
else.
Or fix the gpio layer to use 0 to mean "no irq" rather than -ENXIO... :-)
> diff -ur linux-3.7.9/kernel/irq/irqdomain.c linux/kernel/irq/irqdomain.c
> --- linux-3.7.9/kernel/irq/irqdomain.c 2013-02-17 19:53:32.000000000 +0100
> +++ linux/kernel/irq/irqdomain.c 2012-12-13 19:52:38.000000000 +0100
> @@ -763,7 +763,8 @@
> BUG_ON(domain->revmap_type != IRQ_DOMAIN_MAP_LINEAR);
>
> /* Check revmap bounds; complain if exceeded */
> - if (WARN_ON(hwirq >= domain->revmap_data.linear.size))
> + /* 255 is a trick to allow UNDEF value in DTS */
> + if (hwirq == 255 || WARN_ON(hwirq >= domain->revmap_data.linear.size))
> return 0;
NACK. Besides the hackishness of it, 255 is valid for some interrupt
controllers.
If you need for a way to leave holes in an "interrupts" property, propose
something non-hacky on devicetree-discuss@lists.ozlabs.org.
Or, do what some other devices do, and have a different property that
indicates which pins are connected, and only include those in the
"interrupts" property. See
Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt and
mpic-msgr-receive-mask as an example.
-Scott
^ permalink raw reply
* Re: [RFC PATCH 2/6] KVM: PPC: Book3E: Refactor SPE_FP exit handling
From: Scott Wood @ 2013-06-04 22:14 UTC (permalink / raw)
To: Mihai Caraman; +Cc: Mihai Caraman, linuxppc-dev, kvm, kvm-ppc
In-Reply-To: <1370292868-2697-3-git-send-email-mihai.caraman@freescale.com>
On 06/03/2013 03:54:24 PM, Mihai Caraman wrote:
> SPE_FP interrupts are shared with ALTIVEC. Refactor SPE_FP exit =20
> handling
> to detect KVM support for the featured unit at run-time, in order to
> accommodate ALTIVEC later.
>=20
> Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
> ---
> arch/powerpc/kvm/booke.c | 80 =20
> ++++++++++++++++++++++++++++++++++------------
> 1 files changed, 59 insertions(+), 21 deletions(-)
>=20
> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> index 1020119..d082bbc 100644
> --- a/arch/powerpc/kvm/booke.c
> +++ b/arch/powerpc/kvm/booke.c
> @@ -822,6 +822,15 @@ static void kvmppc_restart_interrupt(struct =20
> kvm_vcpu *vcpu,
> }
> }
>=20
> +static inline bool kvmppc_supports_spe(void)
> +{
> +#ifdef CONFIG_SPE
> + if (cpu_has_feature(CPU_FTR_SPE))
> + return true;
> +#endif
> + return false;
> +}
Whitespace
> /**
> * kvmppc_handle_exit
> *
> @@ -931,42 +940,71 @@ int kvmppc_handle_exit(struct kvm_run *run, =20
> struct kvm_vcpu *vcpu,
> r =3D RESUME_GUEST;
> break;
>=20
> -#ifdef CONFIG_SPE
> case BOOKE_INTERRUPT_SPE_UNAVAIL: {
> - if (vcpu->arch.shared->msr & MSR_SPE)
> - kvmppc_vcpu_enable_spe(vcpu);
> - else
> - kvmppc_booke_queue_irqprio(vcpu,
> - =20
> BOOKE_IRQPRIO_SPE_UNAVAIL);
> + /*
> + * The interrupt is shared, KVM support for the =20
> featured unit
> + * is detected at run-time.
> + */
This is a decent comment for the changelog, but for the code itself it =20
seems fairly obvious if you look at the definition of =20
kvmppc_supports_spe().
> + bool handled =3D false;
> +
> + if (kvmppc_supports_spe()) {
> +#ifdef CONFIG_SPE
> + if (cpu_has_feature(CPU_FTR_SPE))
Didn't you already check this using kvmppc_supports_spe()?
> case BOOKE_INTERRUPT_SPE_FP_ROUND:
> +#ifdef CONFIG_SPE
> kvmppc_booke_queue_irqprio(vcpu, =20
> BOOKE_IRQPRIO_SPE_FP_ROUND);
> r =3D RESUME_GUEST;
> break;
Why not use kvmppc_supports_spe() here, for consistency?
-Scott=
^ permalink raw reply
* Re: IBM OpenPower 720 ipr driver woes
From: Brian King @ 2013-06-04 22:16 UTC (permalink / raw)
To: Robert Knight; +Cc: linuxppc-dev, Wendy Xiong
In-Reply-To: <51AD45A4.9080702@princeton.edu>
On 06/03/2013 08:40 PM, Robert Knight wrote:
> [ 21.938847] ipr: IBM Power RAID SCSI Device Driver version: 2.5.4 (July 11, 2
> 012)
> [ 21.939061] ipr 0001:d0:01.0: Found IOA with IRQ: 151
> [ 21.942276] ipr 0001:d0:01.0: Write of cache line size failed
> [ 21.942584] ipr: probe of 0001:d0:01.0 failed with error -5
This looks to be the reason the ipr driver is failing to load. Not sure why this
is failing, I don't think this code has changed for a very long time. Arguably,
this shouldn't be a fatal error for the driver. Wendy - do you have access to
one of these systems so we could take a look at this?
-Brian
--
Brian King
Power Linux I/O
IBM Linux Technology Center
^ permalink raw reply
* Re: [RFC PATCH 3/6] KVM: PPC: Book3E: Rename IRQPRIO names to accommodate ALTIVEC
From: Scott Wood @ 2013-06-04 22:28 UTC (permalink / raw)
To: Mihai Caraman; +Cc: Mihai Caraman, linuxppc-dev, kvm, kvm-ppc
In-Reply-To: <1370292868-2697-4-git-send-email-mihai.caraman@freescale.com>
On 06/03/2013 03:54:25 PM, Mihai Caraman wrote:
> Rename BOOKE_IRQPRIO_SPE_UNAVAIL and BOOKE_IRQPRIO_SPE_FP_DATA names
> to accommodate ALTIVEC. Replace BOOKE_INTERRUPT_SPE_UNAVAIL and
> BOOKE_INTERRUPT_SPE_FP_DATA with the common version.
>=20
> Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
> ---
> arch/powerpc/kvm/booke.c | 12 ++++++------
> arch/powerpc/kvm/booke.h | 4 ++--
> arch/powerpc/kvm/bookehv_interrupts.S | 8 ++++----
> arch/powerpc/kvm/e500.c | 10 ++++++----
> arch/powerpc/kvm/e500_emulate.c | 8 ++++----
> 5 files changed, 22 insertions(+), 20 deletions(-)
Can you remove the TODO separate definitions from 1/6 now? And/or =20
combine 1/6 with this patch?
-Scott=
^ permalink raw reply
* Re: [RFC PATCH 4/6] KVM: PPC: Book3E: Add AltiVec support
From: Scott Wood @ 2013-06-04 22:36 UTC (permalink / raw)
To: Mihai Caraman; +Cc: Mihai Caraman, linuxppc-dev, kvm, kvm-ppc
In-Reply-To: <1370292868-2697-5-git-send-email-mihai.caraman@freescale.com>
On 06/03/2013 03:54:26 PM, Mihai Caraman wrote:
> KVM Book3E FPU support gracefully reuse host infrastructure so we do =20
> the
> same for AltiVec. To keep AltiVec lazy call =20
> kvmppc_load_guest_altivec()
> just when returning to guest instead of each sched in.
>=20
> Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
> ---
> arch/powerpc/kvm/booke.c | 74 =20
> +++++++++++++++++++++++++++++++++++++++++++-
> arch/powerpc/kvm/e500mc.c | 8 +++++
> 2 files changed, 80 insertions(+), 2 deletions(-)
>=20
> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> index c08b04b..01eb635 100644
> --- a/arch/powerpc/kvm/booke.c
> +++ b/arch/powerpc/kvm/booke.c
> @@ -134,6 +134,23 @@ static void kvmppc_vcpu_sync_fpu(struct kvm_vcpu =20
> *vcpu)
> }
>=20
> /*
> + * Simulate AltiVec unavailable fault to load guest state
> + * from thread to AltiVec unit.
> + * It requires to be called with preemption disabled.
> + */
> +static inline void kvmppc_load_guest_altivec(struct kvm_vcpu *vcpu)
> +{
> +#ifdef CONFIG_ALTIVEC
> + if (cpu_has_feature(CPU_FTR_ALTIVEC)) {
> + if (!(current->thread.regs->msr & MSR_VEC)) {
> + load_up_altivec(NULL);
> + current->thread.regs->msr |=3D MSR_VEC;
> + }
> + }
> +#endif
Why not use kvmppc_supports_altivec()? In fact, there's nothing =20
KVM-specific about these functions...
> +/*
> + * Always returns true is AltiVec unit is present, see
> + * kvmppc_core_check_processor_compat().
> + */
> +static inline bool kvmppc_supports_altivec(void)
> +{
> +#ifdef CONFIG_ALTIVEC
> + if (cpu_has_feature(CPU_FTR_ALTIVEC))
> + return true;
> +#endif
> + return false;
> +}
Whitespace
> static inline bool kvmppc_supports_spe(void)
> {
> #ifdef CONFIG_SPE
> @@ -947,7 +1016,7 @@ int kvmppc_handle_exit(struct kvm_run *run, =20
> struct kvm_vcpu *vcpu,
> */
> bool handled =3D false;
>=20
> - if (kvmppc_supports_spe()) {
> + if (kvmppc_supports_altivec() || kvmppc_supports_spe()) =20
> {
> #ifdef CONFIG_SPE
> if (cpu_has_feature(CPU_FTR_SPE))
> if (vcpu->arch.shared->msr & MSR_SPE) {
> @@ -976,7 +1045,7 @@ int kvmppc_handle_exit(struct kvm_run *run, =20
> struct kvm_vcpu *vcpu,
> * The interrupt is shared, KVM support for the =20
> featured unit
> * is detected at run-time.
> */
> - if (kvmppc_supports_spe()) {
> + if (kvmppc_supports_altivec() || kvmppc_supports_spe()) =20
> {
> kvmppc_booke_queue_irqprio(vcpu,
> =20
> BOOKE_IRQPRIO_SPE_FP_DATA_ALTIVEC_ASSIST);
> r =3D RESUME_GUEST;
The distinction between how you're handling SPE and Altivec here =20
doesn't really have anything to do with SPE versus Altivec -- it's =20
PR-mode versus HV-mode.
> @@ -1188,6 +1257,7 @@ int kvmppc_handle_exit(struct kvm_run *run, =20
> struct kvm_vcpu *vcpu,
> r =3D (s << 2) | RESUME_HOST | (r & =20
> RESUME_FLAG_NV);
> } else {
> kvmppc_lazy_ee_enable();
> + kvmppc_load_guest_altivec(vcpu);
> }
> }
>=20
Why do you need to call an Altivec function here if we don't need to =20
call an ordinary FPU function here?
-Scott=
^ permalink raw reply
* Re: [RFC PATCH 5/6] KVM: PPC: Book3E: Add ONE_REG AltiVec support
From: Scott Wood @ 2013-06-04 22:40 UTC (permalink / raw)
To: Mihai Caraman; +Cc: Mihai Caraman, linuxppc-dev, kvm, kvm-ppc
In-Reply-To: <1370292868-2697-6-git-send-email-mihai.caraman@freescale.com>
On 06/03/2013 03:54:27 PM, Mihai Caraman wrote:
> Add ONE_REG support for AltiVec on Book3E.
>=20
> Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
> ---
> arch/powerpc/kvm/booke.c | 32 ++++++++++++++++++++++++++++++++
> 1 files changed, 32 insertions(+), 0 deletions(-)
>=20
> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> index 01eb635..019496d 100644
> --- a/arch/powerpc/kvm/booke.c
> +++ b/arch/powerpc/kvm/booke.c
> @@ -1570,6 +1570,22 @@ int kvm_vcpu_ioctl_get_one_reg(struct kvm_vcpu =20
> *vcpu, struct kvm_one_reg *reg)
> case KVM_REG_PPC_DEBUG_INST:
> val =3D get_reg_val(reg->id, KVMPPC_INST_EHPRIV);
> break;
> +#ifdef CONFIG_ALTIVEC
> + case KVM_REG_PPC_VR0 ... KVM_REG_PPC_VR31:
> + if (!cpu_has_feature(CPU_FTR_ALTIVEC)) {
> + r =3D -ENXIO;
> + break;
> + }
> + val.vval =3D vcpu->arch.vr[reg->id - KVM_REG_PPC_VR0];
> + break;
> + case KVM_REG_PPC_VSCR:
> + if (!cpu_has_feature(CPU_FTR_ALTIVEC)) {
> + r =3D -ENXIO;
> + break;
> + }
> + val =3D get_reg_val(reg->id, vcpu->arch.vscr.u[3]);
> + break;
Why u[3]?
-Scott=
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox