* Re: [PATCH v5 00/27] irq_domain generalization and rework
From: Russell King - ARM Linux @ 2012-02-17 17:55 UTC (permalink / raw)
To: Cousson, Benoit
Cc: devicetree-discuss, linux-kernel, Milton Miller, Rob Herring,
Andrew Morton, linuxppc-dev, Thomas Gleixner, linux-arm-kernel
In-Reply-To: <4F3E9187.9080308@ti.com>
On Fri, Feb 17, 2012 at 06:42:31PM +0100, Cousson, Benoit wrote:
> Hi Grant,
>
> On 2/16/2012 11:52 PM, Andrew Morton wrote:
> > On Thu, 16 Feb 2012 02:09:01 -0700
> > Grant Likely<grant.likely@secretlab.ca> wrote:
> >
> >>
> >> This series generalizes the "irq_host" infrastructure from powerpc
> >> so that it can be used by all architectures and renames it to "irq_domain".
> >
> > drivers/mfd/twl-core.c is fairly horked on i386 allmodconfig:
> >
> > drivers/mfd/twl-core.c: In function 'twl_probe':
> > drivers/mfd/twl-core.c:1218: error: implicit declaration of function 'irq_alloc_descs'
> > drivers/mfd/twl-core.c:1226: error: implicit declaration of function 'irq_domain_add_legacy'
> > drivers/mfd/twl-core.c:1227: error: 'irq_domain_simple_ops' undeclared (first use in this function)
> > drivers/mfd/twl-core.c:1227: error: (Each undeclared identifier is reported only once
> > drivers/mfd/twl-core.c:1227: error: for each function it appears in.)
> >
> >
> > This is today's linux-next so it has rmk's "ARM: omap: fix broken
> > twl-core dependencies and ifdefs" in there, which looks like it
> > attempts to repair this stuff.
>
> If we cannot assume this driver will be used only on architecture that does support IRQ_DOMAIN, we have to keep the #ifdef and then add the missing linux/irq.h.
>
> Since this driver is using IRQ_DOMAIN only for Device Tree support, we can still avoid using irq_domain_add_legacy for the legacy non-DT case.
> That's too bad because I was expecting to use irq_domain to clean the cascading IRQ scheme used in that driver, but that can wait.
>
> The fix is trivial, but here it is just in case.
...
> @@ -1237,8 +1238,10 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id)
>
> pdata->irq_base = status;
> pdata->irq_end = pdata->irq_base + nr_irqs;
> +#ifdef IRQ_DOMAIN
> irq_domain_add_legacy(node, nr_irqs, pdata->irq_base, 0,
> &irq_domain_simple_ops, NULL);
> +#endif
Do you really need this? If you've tested this, then apparantly the answer
is no, because it won't ever be built like that. (You're missing a
CONFIG_ prefix.)
Maybe the only solution to the x86 problem is to ensure that the driver
includes linux/irq.h ?
^ permalink raw reply
* Re: [PATCH v5 00/27] irq_domain generalization and rework
From: Sam Ravnborg @ 2012-02-17 18:05 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: devicetree-discuss, linux-kernel, Milton Miller, Rob Herring,
Andrew Morton, linuxppc-dev, Thomas Gleixner, linux-arm-kernel
In-Reply-To: <20120216232648.GM27825@n2100.arm.linux.org.uk>
> >
> > /*
> > * Please do not include this file in generic code. There is currently
> > * no requirement for any architecture to implement anything held
> > * within this file.
> > *
> > * Thanks. --rmk
> > */
> >
> > A quick grep indicates that we've lost this battle ;) Is the comments
> > still true? Should we stop discouraging inclusion of linux/irq.h?
> > Does anyone even know that it's discouraged ;)
>
> It's still true for any platform which hasn't been converted to genirq,
> as such a platform would not have asm/hw_irq.h.
In-tree only s390 is not using genirq.
All the rest are converted and provide hw_irq.h -
most of the new archs provide hw_irq via asm-generic so it does
not show up unless you look in the Kbuild file,.
Sam
^ permalink raw reply
* Re: [PATCH 2/2 v5] powerpc/85xx: Abstract common define of signal multiplex control for qe
From: Tabi Timur-B04825 @ 2012-02-17 18:21 UTC (permalink / raw)
To: Fan Zhicheng-B32736; +Cc: linuxppc-dev@lists.ozlabs.org
In-Reply-To: <1329289091-26231-2-git-send-email-B32736@freescale.com>
On Wed, Feb 15, 2012 at 12:58 AM, Zhicheng Fan <B32736@freescale.com> wrote=
:
> @@ -114,6 +114,24 @@ struct ccsr_guts_86xx {
> =A0 =A0 =A0 =A0__be32 =A0srds2cr1; =A0 =A0 =A0 /* 0x.0f44 - SerDes2 Contr=
ol Register 0 */
> =A0} __attribute__ ((packed));
>
> +#ifdef CONFIG_PPC_85xx
> +
Remove this #ifdef. It doesn't really help, and it makes things more
complicated.
> +/* Alternate function signal multiplex control */
> +#define MPC85xx_PMUXCR_QE0 =A0 =A0 =A0 =A0 =A0 =A0 =A00x00008000
> +#define MPC85xx_PMUXCR_QE2 =A0 =A0 =A0 =A0 =A0 =A0 =A00x00002000
> +#define MPC85xx_PMUXCR_QE3 =A0 =A0 =A0 =A0 =A0 =A0 =A00x00001000
> +#define MPC85xx_PMUXCR_QE4 =A0 =A0 =A0 =A0 =A0 =A0 =A00x00000800
> +#define MPC85xx_PMUXCR_QE5 =A0 =A0 =A0 =A0 =A0 =A0 =A00x00000400
> +#define MPC85xx_PMUXCR_QE6 =A0 =A0 =A0 =A0 =A0 =A0 =A00x00000200
> +#define MPC85xx_PMUXCR_QE7 =A0 =A0 =A0 =A0 =A0 =A0 =A00x00000100
> +#define MPC85xx_PMUXCR_QE8 =A0 =A0 =A0 =A0 =A0 =A0 =A00x00000080
> +#define MPC85xx_PMUXCR_QE9 =A0 =A0 =A0 =A0 =A0 =A0 =A00x00000040
> +#define MPC85xx_PMUXCR_QE10 =A0 =A0 =A0 =A0 =A0 =A0 0x00000020
> +#define MPC85xx_PMUXCR_QE11 =A0 =A0 =A0 =A0 =A0 =A0 0x00000010
> +#define MPC85xx_PMUXCR_QE12 =A0 =A0 =A0 =A0 =A0 =A0 0x00000008
#define MPC85xx_PMUXCR_QE(x) (0x8000 >> (x))
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pr_err("mpc=
85xx-rdb: could not map global utilties register!\n");
No exclamation marks (!) in kernel messages.
You misspelled "utilities".
--=20
Timur Tabi
Linux kernel developer at Freescale=
^ permalink raw reply
* Re: [PATCH v4 1/3] KVM: PPC: epapr: Factor out the epapr init
From: Scott Wood @ 2012-02-17 18:58 UTC (permalink / raw)
To: Liu Yu-B13201
Cc: linuxppc-dev@ozlabs.org, Wood Scott-B07421, agraf@suse.de,
kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
In-Reply-To: <4CA99838F21AB847ACC344051E2317090571F056@039-SN2MPN1-022.039d.mgd.msft.net>
On 02/17/2012 04:03 AM, Liu Yu-B13201 wrote:
>
>
>> -----Original Message-----
>> From: Wood Scott-B07421
>> Sent: Friday, February 17, 2012 1:13 AM
>> To: Liu Yu-B13201
>> Cc: agraf@suse.de; kvm-ppc@vger.kernel.org; kvm@vger.kernel.org;
>> linuxppc-dev@ozlabs.org; Wood Scott-B07421
>> Subject: Re: [PATCH v4 1/3] KVM: PPC: epapr: Factor out the epapr init
>>
>> On 02/16/2012 03:26 AM, Liu Yu wrote:
>>> from the kvm guest paravirt init code.
>>>
>>> Signed-off-by: Liu Yu <yu.liu@freescale.com>
>>> ---
>>> v4:
>>> 1. code cleanup
>>> 2. move kvm_hypercall_start() to epapr_hypercall_start()
>>>
>>> arch/powerpc/Kconfig | 4 ++
>>> arch/powerpc/include/asm/epapr_hcalls.h | 2 +
>>> arch/powerpc/kernel/Makefile | 1 +
>>> arch/powerpc/kernel/epapr.S | 25 ++++++++++++++++
>>> arch/powerpc/kernel/epapr_para.c | 49
>> +++++++++++++++++++++++++++++++
>>> arch/powerpc/kernel/kvm.c | 28 ++----------------
>>> arch/powerpc/kernel/kvm_emul.S | 10 ------
>>> arch/powerpc/kvm/Kconfig | 1 +
>>> 8 files changed, 85 insertions(+), 35 deletions(-) create mode
>>> 100644 arch/powerpc/kernel/epapr.S create mode 100644
>>> arch/powerpc/kernel/epapr_para.c
>>
>> The comment about spelling out "paravirt" wasnn't meant to be restricted
>> to the kconfig symbol. There are lots of words that begin with "para",
>> and ePAPR isn't just about virtualization.
>
> What do you mean? Do you suggest that we should name it epapr_paravirt.c?
Yes, and likewise with variables and functions and such (at least
anything that is exposed outside a single file).
-Scott
^ permalink raw reply
* Re: [PATCH] powerpc/85xx:Add PSC9131 RDB Support
From: Tabi Timur-B04825 @ 2012-02-17 19:20 UTC (permalink / raw)
To: Kushwaha Prabhakar-B32579
Cc: Goyal Akhil-B35197, Aggrwal Poonam-B10812,
Srivastava Rajan-B34330, Mehresh Ramneek-B31383,
devicetree-discuss@lists.ozlabs.org,
linuxppc-dev@lists.ozlabs.org, Jain Priyanka-B32167
In-Reply-To: <1329208640-32209-1-git-send-email-prabhakar@freescale.com>
On Tue, Feb 14, 2012 at 2:37 AM, Prabhakar Kushwaha
<prabhakar@freescale.com> wrote:
>
> =A0Applied on git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc=
.git branch next
This is actually a false statement. "Applied" is past tense, so you
are saying that this patch has *already* been applied to Kumar's
powerpc.git repository. But this is not true -- Kumar's repository
has not been updated in the last three weeks, and this patch is
nowhere to be found.
--=20
Timur Tabi
Linux kernel developer at Freescale=
^ permalink raw reply
* Re: [PATCH 1/2] powerpc/85xx: fix problem that prevents PHYS_64BIT from configurable
From: Benjamin Herrenschmidt @ 2012-02-17 21:10 UTC (permalink / raw)
To: Tabi Timur-B04825; +Cc: linuxppc-dev@ozlabs.org, Li Yang-R58472
In-Reply-To: <CAOZdJXWQzxWXhU_4WmeKXx1mfTxGQx=-JZx0AkZcF7CmRrp1gQ@mail.gmail.com>
On Fri, 2012-02-17 at 16:22 +0000, Tabi Timur-B04825 wrote:
> Was this a Freescale internal decision, or is this a generic 85xx
> decision?
>
> For the record, I'm in favor in leaving out support for 32-bit address
> map in the upstream kernel, and having it be an option on the SDK
> only. However, in order to do that, we cannot have "select
> PHYS_64BIT" in the Kconfigs. It needs to be in the defconfigs
> instead. Putting it in the defconfig will eliminate the need to have
> it in every Kconfig block, so I think that's an improvement.
>
> Then the SDK can include a defconfig that does not have PHYS_64BIT
> defined. And the SDK can include 32-bit U-Boots and 32-bit device
> trees for any board where Freescale determines there is a need.
>
> I think Leo's patch simplifies things for everyone.
Sorry, I fail to see how... it basically makes all those boards
non-functional even when enabled...
What's wrong with the current scheme ?
Ben.
^ permalink raw reply
* Re: [PATCH 13/30] KVM: PPC: booke: category E.HV (GS-mode) support
From: Scott Wood @ 2012-02-17 21:12 UTC (permalink / raw)
To: Alexander Graf; +Cc: linuxppc-dev, kvm, kvm-ppc
In-Reply-To: <1329498837-11717-14-git-send-email-agraf@suse.de>
On 02/17/2012 11:13 AM, Alexander Graf wrote:
> From: Scott Wood <scottwood@freescale.com>
>
> Chips such as e500mc that implement category E.HV in Power ISA 2.06
> provide hardware virtualization features, including a new MSR mode for
> guest state. The guest OS can perform many operations without trapping
> into the hypervisor, including transitions to and from guest userspace.
>
> Since we can use SRR1[GS] to reliably tell whether an exception came from
> guest state, instead of messing around with IVPR, we use DO_KVM similarly
> to book3s.
>
> Current issues include:
> - Machine checks from guest state are not routed to the host handler.
> - The guest can cause a host oops by executing an emulated instruction
> in a page that lacks read permission. Existing e500/4xx support has
> the same problem.
>
> Includes work by Ashish Kalra <Ashish.Kalra@freescale.com>,
> Varun Sethi <Varun.Sethi@freescale.com>, and
> Liu Yu <yu.liu@freescale.com>.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> [agraf: remove pt_regs usage]
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
Thanks for picking this up!
> +static unsigned long get_guest_esr(struct kvm_vcpu *vcpu)
> +{
> +#ifdef CONFIG_KVM_BOOKE_HV
> + return mfspr(SPRN_ESR);
> +#else
> + return vcpu->arch.shared->esr;
> +#endif
> +}
s/SPRN_ESR/SPRN_GESR/
> int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
> unsigned int exit_nr)
> {
> - enum emulation_result er;
> int r = RESUME_HOST;
>
> /* update before a new last_exit_type is rewritten */
> kvmppc_update_timing_stats(vcpu);
>
> + switch (exit_nr) {
> + case BOOKE_INTERRUPT_EXTERNAL:
> + do_IRQ(current->thread.regs);
> + break;
What will current->thread.regs point to here? Something on the stack
from the last normal host exception entry?
We probably want to create a pt_regs on the stack and at least provide
PC, LR, and r1 for perfmon interrupts and such.
> @@ -384,30 +558,56 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
>
> switch (exit_nr) {
> case BOOKE_INTERRUPT_MACHINE_CHECK:
> - printk("MACHINE CHECK: %lx\n", mfspr(SPRN_MCSR));
> - kvmppc_dump_vcpu(vcpu);
> - r = RESUME_HOST;
> + kvm_resched(vcpu);
> + r = RESUME_GUEST;
> break;
Leave this bit out (proper machine check handling will come later).
> case BOOKE_INTERRUPT_PROGRAM:
> - if (vcpu->arch.shared->msr & MSR_PR) {
> + if (vcpu->arch.shared->msr & (MSR_PR | MSR_GS)) {
> /* Program traps generated by user-level software must be handled
> * by the guest kernel. */
> kvmppc_core_queue_program(vcpu, vcpu->arch.fault_esr);
Should update the comment for why we're checking GS (i.e. we get a
different trap for emulation with GS-mode).
> +#define SET_VCPU(vcpu) \
> + PPC_STL vcpu, (THREAD + THREAD_KVM_VCPU)(r2)
Change spaces to tab before PPC_STL
> +#define LONGBYTES (BITS_PER_LONG / 8)
> +
> +#define VCPU_GPR(n) (VCPU_GPRS + (n * LONGBYTES))
> +#define VCPU_GUEST_SPRG(n) (VCPU_GUEST_SPRGS + (n * LONGBYTES))
> +
> +/* The host stack layout: */
> +#define HOST_R1 (0 * LONGBYTES) /* Implied by stwu. */
> +#define HOST_CALLEE_LR (1 * LONGBYTES)
> +#define HOST_RUN (2 * LONGBYTES) /* struct kvm_run */
> +/*
> + * r2 is special: it holds 'current', and it made nonvolatile in the
> + * kernel with the -ffixed-r2 gcc option.
> + */
> +#define HOST_R2 (3 * LONGBYTES)
> +#define HOST_NV_GPRS (4 * LONGBYTES)
> +#define HOST_NV_GPR(n) (HOST_NV_GPRS + ((n - 14) * LONGBYTES))
> +#define HOST_MIN_STACK_SIZE (HOST_NV_GPR(31) + LONGBYTES)
> +#define HOST_STACK_SIZE ((HOST_MIN_STACK_SIZE + 15) & ~15) /* Align. */
> +#define HOST_STACK_LR (HOST_STACK_SIZE + LONGBYTES) /* In caller stack frame. */
> +
> +#define NEED_EMU 0x00000001 /* emulation -- save nv regs */
> +#define NEED_DEAR 0x00000002 /* save faulting DEAR */
> +#define NEED_ESR 0x00000004 /* save faulting ESR */
> +
> +/*
> + * On entry:
> + * r4 = vcpu, r5 = srr0, r6 = srr1
> + * saved in vcpu: cr, ctr, r3-r13
> + */
> +.macro kvm_handler_common intno, srr0, flags
> + mfspr r10, SPRN_PID
> + lwz r8, VCPU_HOST_PID(r4)
> + PPC_LL r11, VCPU_SHARED(r4)
> + PPC_STL r14, VCPU_GPR(r14)(r4) /* We need a non-volatile GPR. */
> + li r14, \intno
> +
> + stw r10, VCPU_GUEST_PID(r4)
> + mtspr SPRN_PID, r8
> +
> + .if \flags & NEED_EMU
> + lwz r9, VCPU_KVM(r4)
> + .endif
> +
> +#ifdef CONFIG_KVM_EXIT_TIMING
> + /* save exit time */
> +1: mfspr r7, SPRN_TBRU
> + mfspr r8, SPRN_TBRL
> + mfspr r9, SPRN_TBRU
> + cmpw r9, r7
> + PPC_STL r8, VCPU_TIMING_EXIT_TBL(r4)
> + bne- 1b
> + PPC_STL r9, VCPU_TIMING_EXIT_TBU(r4)
> +#endif
As you pointed out to me last time, r9 is clobbered if exit timing is
enabled (but see below, the load of VCPU_KVM can be removed along with
the subsequent load of LVM_LPID(r9)).
> + oris r8, r6, MSR_CE@h
> +#ifndef CONFIG_64BIT
> + stw r6, (VCPU_SHARED_MSR + 4)(r11)
> +#else
> + std r6, (VCPU_SHARED_MSR)(r11)
> +#endif
> + ori r8, r8, MSR_ME | MSR_RI
> + PPC_STL r5, VCPU_PC(r4)
> +
> + /*
> + * Make sure CE/ME/RI are set (if appropriate for exception type)
> + * whether or not the guest had it set. Since mfmsr/mtmsr are
> + * somewhat expensive, skip in the common case where the guest
> + * had all these bits set (and thus they're still set if
> + * appropriate for the exception type).
> + */
> + cmpw r6, r8
> + .if \flags & NEED_EMU
> + lwz r9, KVM_LPID(r9)
> + .endif
Where do we use r9? This is probably left over from something old.
-Scott
^ permalink raw reply
* Re: [PATCH 1/2] powerpc/85xx: fix problem that prevents PHYS_64BIT from configurable
From: Timur Tabi @ 2012-02-17 21:17 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev@ozlabs.org, Li Yang-R58472
In-Reply-To: <1329513033.3980.1.camel@pasglop>
Benjamin Herrenschmidt wrote:
> Sorry, I fail to see how... it basically makes all those boards
> non-functional even when enabled...
So you're saying that if we allow 32-bit address spacing for a particular
board, then we must provide a 32-bit DTS to go with it?
I was hoping to use the defconfig to force 36-bit, so that we can have a
32-bit option if we want. Just because we don't put a 32-bit DTS in the
upstream kernel, that doesn't mean that no one is allowed to have a 32-bit
kernel.
> What's wrong with the current scheme ?
It prevents the possibility of creating an "optimized" 32-bit address
environment, for people who have <= 2GB of DDR on the board. If we want
to ship a 32-bit DTS and 32-bit U-Boot on our BSP, then we'll need to
patch the Kconfig to remove the "select" line.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* Re: [PATCH 16/30] KVM: PPC: e500mc: Add doorbell emulation support
From: Scott Wood @ 2012-02-17 21:55 UTC (permalink / raw)
To: Alexander Graf; +Cc: linuxppc-dev, kvm, kvm-ppc
In-Reply-To: <1329498837-11717-17-git-send-email-agraf@suse.de>
On 02/17/2012 11:13 AM, Alexander Graf wrote:
> When one vcpu wants to kick another, it can issue a special IPI instruction
> called msgsnd. This patch emulates this instruction, its clearing counterpart
> and the infrastructure required to actually trigger that interrupt inside
> a guest vcpu.
>
> With this patch, SMP guests on e500mc work.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
> arch/powerpc/kvm/booke.c | 6 +++
> arch/powerpc/kvm/e500_emulate.c | 68 +++++++++++++++++++++++++++++++++++++++
> 2 files changed, 74 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> index 3dd200d..ce1599d 100644
> --- a/arch/powerpc/kvm/booke.c
> +++ b/arch/powerpc/kvm/booke.c
> @@ -326,6 +326,9 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
> int_class = INT_CLASS_NONCRIT;
> break;
> case BOOKE_IRQPRIO_CRITICAL:
> +#ifdef CONFIG_KVM_E500MC
> + case BOOKE_IRQPRIO_DBELL_CRIT:
> +#endif
> allowed = vcpu->arch.shared->msr & MSR_CE;
> allowed = allowed && !crit;
> msr_mask = MSR_GS | MSR_ME;
> @@ -342,6 +345,9 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
> keep_irq = true;
> /* fall through */
> case BOOKE_IRQPRIO_EXTERNAL:
> +#ifdef CONFIG_KVM_E500MC
> + case BOOKE_IRQPRIO_DBELL:
> +#endif
This isn't e500mc specific -- it's in the ISA as "Embedded.Processor
Control".
Any harm in just removing the ifdef (similar to tlbilx)?
> allowed = vcpu->arch.shared->msr & MSR_EE;
> allowed = allowed && !crit;
> msr_mask = MSR_GS | MSR_CE | MSR_ME | MSR_DE;
> diff --git a/arch/powerpc/kvm/e500_emulate.c b/arch/powerpc/kvm/e500_emulate.c
> index 98b6c1c..29d5604 100644
> --- a/arch/powerpc/kvm/e500_emulate.c
> +++ b/arch/powerpc/kvm/e500_emulate.c
> @@ -14,16 +14,74 @@
>
> #include <asm/kvm_ppc.h>
> #include <asm/disassemble.h>
> +#include <asm/dbell.h>
>
> #include "booke.h"
> #include "e500.h"
>
> +#define XOP_MSGSND 206
> +#define XOP_MSGCLR 238
> #define XOP_TLBIVAX 786
> #define XOP_TLBSX 914
> #define XOP_TLBRE 946
> #define XOP_TLBWE 978
> #define XOP_TLBILX 18
>
> +#ifdef CONFIG_KVM_E500MC
> +static int dbell2prio(ulong param)
> +{
> + int msg = param & PPC_DBELL_TYPE(-1);
Maybe introduce PPC_DBELL_TYPE_MASK or GET_PPC_DBELL_TYPE?
> + int prio = -1;
> +
> + switch (msg) {
> + case PPC_DBELL_TYPE(PPC_DBELL):
> + prio = BOOKE_IRQPRIO_DBELL;
> + break;
> + case PPC_DBELL_TYPE(PPC_DBELL_CRIT):
> + prio = BOOKE_IRQPRIO_DBELL_CRIT;
> + break;
> + default:
> + break;
> + }
> +
> + return prio;
> +}
> +
> +static int kvmppc_e500_emul_msgclr(struct kvm_vcpu *vcpu, int rb)
> +{
> + ulong param = vcpu->arch.gpr[rb];
> + int prio = dbell2prio(param);
> +
> + if (prio < 0)
> + return EMULATE_FAIL;
> +
> + clear_bit(prio, &vcpu->arch.pending_exceptions);
> + return EMULATE_DONE;
> +}
> +
> +static int kvmppc_e500_emul_msgsnd(struct kvm_vcpu *vcpu, int rb)
> +{
> + ulong param = vcpu->arch.gpr[rb];
> + int prio = dbell2prio(rb);
> + int pir = param & 0x3fff;
Introduce PPC_DBELL_PIR_MASK or GET_PPC_DBELL_PIR?
> + int i;
> + struct kvm_vcpu *cvcpu;
> +
> + if (prio < 0)
> + return EMULATE_FAIL;
> +
> + kvm_for_each_vcpu(i, cvcpu, vcpu->kvm) {
> + int cpir = cvcpu->arch.shared->pir;
> + if ((param & PPC_DBELL_MSG_BRDCAST) || (cpir == pir)) {
> + set_bit(prio, &cvcpu->arch.pending_exceptions);
> + kvm_vcpu_kick(cvcpu);
> + }
> + }
Should this be a kvm_make_request instead (with a separate
pending_doorbell bool in vcpu that msgclr can act on), considering
earlier discussion of phasing out atomics on pending_exceptions, in
favor of requests?
-Scott
^ permalink raw reply
* Re: [PATCH 16/30] KVM: PPC: e500mc: Add doorbell emulation support
From: Scott Wood @ 2012-02-17 21:57 UTC (permalink / raw)
To: Alexander Graf; +Cc: linuxppc-dev, kvm, kvm-ppc
In-Reply-To: <4F3ECCE6.2010503@freescale.com>
On 02/17/2012 03:55 PM, Scott Wood wrote:
> Should this be a kvm_make_request instead (with a separate
> pending_doorbell bool in vcpu that msgclr can act on), considering
> earlier discussion of phasing out atomics on pending_exceptions, in
> favor of requests?
Ignore the bit about msgclr -- it acts on the local vcpu, so no need for
pending_doorbell. It can just be a plain request.
-Scott
^ permalink raw reply
* Re: [PATCH 21/30] KVM: PPC: make e500v2 and e500mc mutually exclusive
From: Scott Wood @ 2012-02-17 22:13 UTC (permalink / raw)
To: Alexander Graf; +Cc: linuxppc-dev, kvm, kvm-ppc
In-Reply-To: <1329498837-11717-22-git-send-email-agraf@suse.de>
On 02/17/2012 11:13 AM, Alexander Graf wrote:
> We can't build e500v2 and e500mc (kvm) support inside the same kernel.
> So indicate that by making the 2 options mutually exclusive in kconfig.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
> arch/powerpc/kvm/Kconfig | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
> index 44a998d..25ffc1e 100644
> --- a/arch/powerpc/kvm/Kconfig
> +++ b/arch/powerpc/kvm/Kconfig
> @@ -134,7 +134,7 @@ config KVM_E500V2
>
> config KVM_E500MC
> bool "KVM support for PowerPC E500MC/E5500 processors"
> - depends on EXPERIMENTAL && PPC_E500MC
> + depends on EXPERIMENTAL && PPC_E500MC && !KVM_E500V2
> select KVM
> select KVM_MMIO
> select KVM_BOOKE_HV
Instead should make KVM_E500V2 not selectable if PPC_E500MC is present
-- it won't work due to the absence of PID1 on e500mc.
-Scott
^ permalink raw reply
* Re: [PATCH 21/30] KVM: PPC: make e500v2 and e500mc mutually exclusive
From: Tabi Timur-B04825 @ 2012-02-17 22:32 UTC (permalink / raw)
To: Alexander Graf
Cc: Wood Scott-B07421, linuxppc-dev, list,
<kvm-ppc@vger.kernel.org>
In-Reply-To: <1329497818-9729-22-git-send-email-agraf@suse.de>
On Fri, Feb 17, 2012 at 10:56 AM, Alexander Graf <agraf@suse.de> wrote:
> =A0config KVM_E500MC
> =A0 =A0 =A0 =A0bool "KVM support for PowerPC E500MC/E5500 processors"
> - =A0 =A0 =A0 depends on EXPERIMENTAL && PPC_E500MC
> + =A0 =A0 =A0 depends on EXPERIMENTAL && PPC_E500MC && !KVM_E500V2
There was a patch floating around that made a similar change to the
platform support, so that you could either build an e500v2 kernel and
enable support only for e500v2 board, or you could build an e500mc
kernel and enable support only for e500mc boards. Last I heard, the
patch wasn't quite working, but that was a while ago.
Is there a connection between this patch and that one?
--=20
Timur Tabi
Linux kernel developer at Freescale=
^ permalink raw reply
* [git pull] Please pull powerpc.git merge branch
From: Benjamin Herrenschmidt @ 2012-02-17 22:36 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linuxppc-dev list, Andrew Morton, Linux Kernel list
Hi Linus !
Here are a few more fixes for powerpc. Some are regressions, the rest is
simple/obvious/nasty enough that I deemed it good to go now.
Here's also step one of deprecating legacy iSeries support: we are
removing it from the main defconfig.
Nobody seems to be using it anymore and the code is nasty to maintain,
(involves horrible hacks in various low level areas of the kernel) so we
plan to actually rip it out at some point. For now let's just avoid
building it by default. Stephen will proceed to do the actual removal
later (probably 3.4 or 3.5).
Cheers,
Ben.
The following changes since commit 778a785f02ad846446e91dab49331bd7d853c514:
powerpc/pseries/eeh: Fix crash when error happens during device probe (2012-02-14 15:01:39 +1100)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git merge
for you to fetch changes up to 9a45a9407c69d068500923480884661e2b9cc421:
powerpc/perf: power_pmu_start restores incorrect values, breaking frequency events (2012-02-16 16:24:35 +1100)
----------------------------------------------------------------
Anton Blanchard (1):
powerpc/perf: power_pmu_start restores incorrect values, breaking frequency events
Benjamin Herrenschmidt (2):
powerpc/fsl/pci: Fix PCIe fixup regression
powerpc: Disable interrupts early in Program Check
Ira Snyder (1):
powerpc: Fix kernel log of oops/panic instruction dump
Stephen Rothwell (1):
powerpc: Remove legacy iSeries from ppc64_defconfig
majianpeng (1):
powerpc/adb: Use set_current_state()
arch/powerpc/configs/ppc64_defconfig | 5 ---
arch/powerpc/kernel/exceptions-64s.S | 2 +-
arch/powerpc/kernel/perf_event.c | 8 +++++-
arch/powerpc/kernel/process.c | 6 ++--
arch/powerpc/sysdev/fsl_pci.c | 48 ++++++++++++++++++++-------------
drivers/macintosh/adb.c | 4 +-
6 files changed, 42 insertions(+), 31 deletions(-)
^ permalink raw reply
* Re: [PATCH 24/30] KVM: PPC: booke: call resched after every exit
From: Scott Wood @ 2012-02-17 23:00 UTC (permalink / raw)
To: Alexander Graf; +Cc: linuxppc-dev, kvm, kvm-ppc
In-Reply-To: <1329498837-11717-25-git-send-email-agraf@suse.de>
On 02/17/2012 11:13 AM, Alexander Graf wrote:
> Instead of checking whether we should reschedule only when we exited
> due to an interrupt, let's always check before entering the guest back
> again. This gets the target more in line with the other archs.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
> arch/powerpc/kvm/booke.c | 15 ++++++++++-----
> 1 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> index bfb2092..de30b6d 100644
> --- a/arch/powerpc/kvm/booke.c
> +++ b/arch/powerpc/kvm/booke.c
> @@ -572,6 +572,7 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
> unsigned int exit_nr)
> {
> int r = RESUME_HOST;
> + int resched_needed = 1;
>
> /* update before a new last_exit_type is rewritten */
> kvmppc_update_timing_stats(vcpu);
> @@ -602,25 +603,21 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
>
> switch (exit_nr) {
> case BOOKE_INTERRUPT_MACHINE_CHECK:
> - kvm_resched(vcpu);
> r = RESUME_GUEST;
> break;
>
> case BOOKE_INTERRUPT_EXTERNAL:
> kvmppc_account_exit(vcpu, EXT_INTR_EXITS);
> - kvm_resched(vcpu);
> r = RESUME_GUEST;
> break;
>
> case BOOKE_INTERRUPT_DECREMENTER:
> kvmppc_account_exit(vcpu, DEC_EXITS);
> - kvm_resched(vcpu);
> r = RESUME_GUEST;
> break;
>
> case BOOKE_INTERRUPT_DOORBELL:
> kvmppc_account_exit(vcpu, DBELL_EXITS);
> - kvm_resched(vcpu);
> r = RESUME_GUEST;
> break;
>
> @@ -869,8 +866,16 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
> BUG();
> }
>
> - local_irq_disable();
> + /* make sure we reschedule if we need to */
> + while (resched_needed) {
> + local_irq_disable();
>
> + resched_needed = need_resched();
> + if (resched_needed) {
> + local_irq_enable();
> + cond_resched();
> + }
> + }
> kvmppc_core_prepare_to_enter(vcpu);
>
> if (!(r & RESUME_HOST)) {
kvmppc_core_prepare_to_enter can enable interrupts (and block) if guest
MSR_WE is set. We may take an interrupt that wants a resched after
waking but before interrupts are disabled again.
We also want to check for a resched in kvmppc_vcpu_run. So, the resched
check belongs in kvmppc_core_prepare_to_enter, something like:
/* Check pending exceptions and deliver one, if possible. */
void kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu)
{
WARN_ON_ONCE(!irqs_disabled());
while (true) {
if (signal_pending(current))
break;
if (need_resched()) {
local_irq_enable();
cond_resched();
local_irq_disable();
continue;
}
kvmppc_core_check_exceptions(vcpu);
if (vcpu->arch.shared->msr & MSR_WE) {
local_irq_enable();
kvm_vcpu_block(vcpu);
local_irq_disable();
kvmppc_set_exit_type(vcpu,
EMULATED_MTMSRWE_EXITS);
continue;
}
break;
}
}
It would be simpler (both here and in the idle hcall) if we could just
drop support for CONFIG_PREEMPT=n. :-P
-Scott
^ permalink raw reply
* Re: [PATCH 1/2] powerpc/85xx: fix problem that prevents PHYS_64BIT from configurable
From: Timur Tabi @ 2012-02-17 23:01 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev@ozlabs.org, Li Yang-R58472
In-Reply-To: <1329513033.3980.1.camel@pasglop>
So I noticed something else. PHYS_64BIT is not defined in
mpc85xx_smp_defconfig. This means that if we want to build a 36-bit
kernel, we need to have "select PHYS_64BIT" in the Kconfig for that board.
This is what we have today for the P1022DS.
However, that select statement also means that we can't build a 32-bit
kernel. This is a problem for mpc85xx_defconfig, because that defconfig
includes support for the MPC8540ADS. The 8540 has an e500v1 core which
doesn't support MAS7 (i.e. no 36-bit physical addresses).
So any patch that removes "select PHYS_64BIT" from an mpc85xx_defconfig
board must also turn on that option in the defconfig. The patches from me
and Leo don't do that.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* Re: [PATCH 19/30] KVM: PPC: e500mc: add load inst fixup
From: Scott Wood @ 2012-02-17 23:17 UTC (permalink / raw)
To: Alexander Graf; +Cc: linuxppc-dev, kvm, kvm-ppc
In-Reply-To: <1329498837-11717-20-git-send-email-agraf@suse.de>
On 02/17/2012 11:13 AM, Alexander Graf wrote:
> There's always a chance we're unable to read a guest instruction. The guest
> could have its TLB mapped execute-, but not readable, something odd happens
> and our TLB gets flushed. So it's a good idea to be prepared for that case
> and have a fallback that allows us to fix things up in that case.
>
> Add fixup code that keeps guest code from potentially crashing our host kernel.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
> arch/powerpc/kvm/bookehv_interrupts.S | 30 +++++++++++++++++++++++++++++-
> 1 files changed, 29 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S
> index 63023ae..e0f484c 100644
> --- a/arch/powerpc/kvm/bookehv_interrupts.S
> +++ b/arch/powerpc/kvm/bookehv_interrupts.S
> @@ -28,6 +28,7 @@
> #include <asm/asm-compat.h>
> #include <asm/asm-offsets.h>
> #include <asm/bitsperlong.h>
> +#include <asm/thread_info.h>
>
> #include "../kernel/head_booke.h" /* for THREAD_NORMSAVE() */
>
> @@ -171,9 +172,36 @@
> PPC_STL r30, VCPU_GPR(r30)(r4)
> PPC_STL r31, VCPU_GPR(r31)(r4)
> mtspr SPRN_EPLC, r8
> +
> + /* disable preemption, so we are sure we hit the fixup handler */
> +#ifdef CONFIG_PPC64
> + clrrdi r8,r1,THREAD_SHIFT
> +#else
> + rlwinm r8,r1,0,0,31-THREAD_SHIFT /* current thread_info */
> +#endif
> + lwz r6,TI_PREEMPT(r8)
> + addi r7,r6,1
> + stw r7,TI_PREEMPT(r8)
Whitespace
The preempt count had better already be zero here, so we can just store
1 now, and 0 later, and avoid the stall on load results.
> +
> isync
> - lwepx r9, 0, r5
> +
> + /*
> + * In case the read goes wrong, we catch it and write an invalid value
> + * in LAST_INST instead.
> + */
> +1: lwepx r9, 0, r5
> +2:
> +.section .fixup, "ax"
> +3: li r9, KVM_INST_FETCH_FAILED
> + b 2b
Please tab after the opcode
> +.previous
> +.section __ex_table,"a"
> + PPC_LONG_ALIGN
> + PPC_LONG 1b,3b
> +.previous
> +
> mtspr SPRN_EPLC, r3
> + stw r6,TI_PREEMPT(r8)
> stw r9, VCPU_LAST_INST(r4)
Whitespace
-Scott
^ permalink raw reply
* Re: [PATCH] powerpc/85xx:Add PSC9131 RDB Support
From: Andy Fleming @ 2012-02-17 23:26 UTC (permalink / raw)
To: Tabi Timur-B04825
Cc: Aggrwal Poonam-B10812, Srivastava Rajan-B34330,
Mehresh Ramneek-B31383, Goyal Akhil-B35197,
Kushwaha Prabhakar-B32579, linuxppc-dev@lists.ozlabs.org,
devicetree-discuss@lists.ozlabs.org, Jain Priyanka-B32167
In-Reply-To: <CAOZdJXVvL98vNG5UvT2t1dgJw1D204-5BCgDsxqD04szhHueBQ@mail.gmail.com>
On Fri, Feb 17, 2012 at 1:20 PM, Tabi Timur-B04825 <B04825@freescale.com> w=
rote:
> On Tue, Feb 14, 2012 at 2:37 AM, Prabhakar Kushwaha
> <prabhakar@freescale.com> wrote:
>>
>> =A0Applied on git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerp=
c.git branch next
>
> This is actually a false statement. =A0"Applied" is past tense, so you
> are saying that this patch has *already* been applied to Kumar's
> powerpc.git repository. =A0But this is not true -- Kumar's repository
> has not been updated in the last three weeks, and this patch is
> nowhere to be found.
I'm pretty sure the sentence should read:
Based on git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git
branch next
Good idea to correct that for future submissions, as it is otherwise
confusing. Could also say "Developed against" instead of "Based on".
Andy
^ permalink raw reply
* Re: [PATCH 21/30] KVM: PPC: make e500v2 and e500mc mutually exclusive
From: Alexander Graf @ 2012-02-17 23:27 UTC (permalink / raw)
To: Tabi Timur-B04825
Cc: Wood Scott-B07421, linuxppc-dev, list,
<kvm-ppc@vger.kernel.org>
In-Reply-To: <CAOZdJXXxC5vdWrpz-sU0O+5oXS211DLYywqkQLwq0JOtRZyBHQ@mail.gmail.com>
On 17.02.2012, at 23:32, Tabi Timur-B04825 wrote:
> On Fri, Feb 17, 2012 at 10:56 AM, Alexander Graf <agraf@suse.de> =
wrote:
>=20
>> config KVM_E500MC
>> bool "KVM support for PowerPC E500MC/E5500 processors"
>> - depends on EXPERIMENTAL && PPC_E500MC
>> + depends on EXPERIMENTAL && PPC_E500MC && !KVM_E500V2
>=20
> There was a patch floating around that made a similar change to the
> platform support, so that you could either build an e500v2 kernel and
> enable support only for e500v2 board, or you could build an e500mc
> kernel and enable support only for e500mc boards. Last I heard, the
> patch wasn't quite working, but that was a while ago.
>=20
> Is there a connection between this patch and that one?
No, and the code paths are quite orthogonal. While today it's impossible =
to build a kernel that can drive e500v2 and e500mc systems, it might be =
possible one day. That still doesn't buy us KVM compatibility between =
the two though. And vice versa. We could improve the KVM code to =
actually be versatile between the two platforms, but then you still =
couldn't run the same kernel on both ;).
Alex
^ permalink raw reply
* Re: [linuxppc-release] [PATCH 1/2] powerpc: document the FSL MPIC message register binding
From: Scott Wood @ 2012-02-18 0:47 UTC (permalink / raw)
To: Yoder Stuart-B08248
Cc: meador_inge@mentor.com, linuxppc-dev@lists.ozlabs.org,
Li Yang-R58472, Jia Hongtao-B38951
In-Reply-To: <9F6FE96B71CF29479FF1CDC8046E15032F516B@039-SN1MPN1-002.039d.mgd.msft.net>
On 02/17/2012 09:50 AM, Yoder Stuart-B08248 wrote:
>
>
>> -----Original Message-----
>> From: linuxppc-release-bounces@linux.freescale.net [mailto:linuxppc-release-
>> bounces@linux.freescale.net] On Behalf Of Jia Hongtao-B38951
>> Sent: Thursday, February 16, 2012 8:49 PM
>> To: linuxppc-dev@lists.ozlabs.org
>> Cc: meador_inge@mentor.com; Li Yang-R58472; Jia Hongtao-B38951
>> Subject: [linuxppc-release] [PATCH 1/2] powerpc: document the FSL MPIC message register
>> binding
>>
>> This binding documents how the message register blocks found in some FSL MPIC implementations
>> shall be represented in a device tree.
>>
>> Signed-off-by: Meador Inge <meador_inge@mentor.com>
>> Signed-off-by: Jia Hongtao <B38951@freescale.com>
>> Signed-off-by: Li Yang <leoli@freescale.com>
>> ---
>> .../devicetree/bindings/powerpc/fsl/mpic-msgr.txt | 62 ++++++++++++++++++++
>> 1 files changed, 62 insertions(+), 0 deletions(-) create mode 100644
>> Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt
>>
>> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt
>> b/Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt
>> new file mode 100644
>> index 0000000..b4ae70e
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/powerpc/fsl/mpic-msgr.txt
>> @@ -0,0 +1,62 @@
>> +* FSL MPIC Message Registers
>> +
>> +This binding specifies what properties must be available in the device
>> +tree representation of the message register blocks found in some FSL
>> +MPIC implementations.
>> +
>> +Required properties:
>> +
>> + - compatible: Specifies the compatibility list for the message register
>> + block. The type shall be <string> and the value shall be of the form
>> + "fsl,mpic-v<version>-msgr", where <version> is the version number of
>> + the MPIC containing the message registers.
>
> The type for compatibles is a <string-list>.
>
>> + - reg: Specifies the base physical address(s) and size(s) of the
>> + message register block's addressable register space. The type shall be
>> + <prop-encoded-array>.
>> +
>> + - interrupts: Specifies a list of interrupt source and level-sense pairs.
>> + The type shall be <prop-encoded-array>. The length shall be equal to
>> + the number of registers that are available for receiving interrupts.
>
> How many interrupts are there? If more than 1, this is where
> you need to specify what each interrupt is for.
They aren't "for" anything in particular -- each interrupt is associated
with a message register. The binding does say that the number of
interrupts corresponds to the bits set in the receive mask.
>> +Optional properties:
>> +
>> + - mpic-msgr-receive-mask: Specifies what registers in the containing block
>> + are allowed to receive interrupts. The value is a bit mask where a set
>> + bit at bit 'n' indicates that message register 'n' can receive interrupts.
>> + The type shall be <prop-encoded-array>. If not present, then all of
>> + the message registers in the block are available.
>
> Your example implies that this is 1 32-bit cell. If that is the case then
> this really should be of type '<u32>'.
And should clarify that "bit 'n'" means numbered from LSB, given how PPC
hardware docs tend to use the opposite convention.
-Scott
^ permalink raw reply
* Re: [PATCH 1/2] powerpc/85xx: fix problem that prevents PHYS_64BIT from configurable
From: Scott Wood @ 2012-02-18 0:56 UTC (permalink / raw)
To: Timur Tabi; +Cc: Li Yang-R58472, linuxppc-dev@ozlabs.org
In-Reply-To: <4F3EDC35.5070904@freescale.com>
On 02/17/2012 05:01 PM, Timur Tabi wrote:
> So I noticed something else. PHYS_64BIT is not defined in
> mpc85xx_smp_defconfig.
It couldn't have been, since it was selected by another kconfig option.
defconfigs only hold non-default options.
> However, that select statement also means that we can't build a 32-bit
> kernel. This is a problem for mpc85xx_defconfig, because that defconfig
> includes support for the MPC8540ADS. The 8540 has an e500v1 core which
> doesn't support MAS7 (i.e. no 36-bit physical addresses).
It's not a problem for 8540, just lost optimization potential.
> So any patch that removes "select PHYS_64BIT" from an mpc85xx_defconfig
> board must also turn on that option in the defconfig. The patches from me
> and Leo don't do that.
Yes, or maybe make it "default y", and/or require an "I know what I'm
doing" option to be set for it to be unset if a board otherwise wants it.
The ability to turn it off is potentially useful for any board, since
the address map is determined by boot software which can be changed, but
we shouldn't make it too easy to fail to select it for boards that
normally require it.
-Scott
^ permalink raw reply
* Re: [PATCH 1/2] powerpc/85xx: fix problem that prevents PHYS_64BIT from configurable
From: Benjamin Herrenschmidt @ 2012-02-18 2:19 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev@ozlabs.org, Timur Tabi, Li Yang-R58472
In-Reply-To: <4F3EF72C.2090305@freescale.com>
On Fri, 2012-02-17 at 18:56 -0600, Scott Wood wrote:
> Yes, or maybe make it "default y", and/or require an "I know what I'm
> doing" option to be set for it to be unset if a board otherwise wants it.
>
> The ability to turn it off is potentially useful for any board, since
> the address map is determined by boot software which can be changed, but
> we shouldn't make it too easy to fail to select it for boards that
> normally require it.
Don't we have CONFIG_EMBEDDED to make that sort of option visible ?
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCH] usb: Fix build error due to dma_mask is not at pdev_archdata at ARM
From: Peter Chen @ 2012-02-18 10:22 UTC (permalink / raw)
To: Peter Chen, Li Yang-R58472
Cc: fabio.estevam, linux-usb, stern, ramneek.mehresh, agust,
linuxppc-dev, stable
In-Reply-To: <1329356512-31527-1-git-send-email-peter.chen@freescale.com>
On Thu, Feb 16, 2012 at 9:41 AM, Peter Chen <peter.chen@freescale.com> wrot=
e:
> When build i.mx platform with imx_v6_v7_defconfig, and after adding
> USB Gadget support, it has below build error:
>
> CC =A0 =A0 =A0drivers/usb/host/fsl-mph-dr-of.o
> drivers/usb/host/fsl-mph-dr-of.c: In function 'fsl_usb2_device_register':
> drivers/usb/host/fsl-mph-dr-of.c:97: error: 'struct pdev_archdata'
> has no member named 'dma_mask'
>
> It has discussed at: http://www.spinics.net/lists/linux-usb/msg57302.html
>
> For PowerPC, there is dma_mask at struct pdev_archdata, but there is
> no dma_mask at struct pdev_archdata for ARM. The pdev_archdata is
> related to specific platform, it should NOT be accessed by
> cross platform drivers, like USB.
>
> The code for pdev_archdata should be useless, as for PowerPC,
> it has already gotten the value for pdev->dev.dma_mask at function
> arch_setup_pdev_archdata of arch/powerpc/kernel/setup-common.c.
>
> Tested-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
> Signed-off-by: Peter Chen <peter.chen@freescale.com>
> ---
> =A0drivers/usb/host/fsl-mph-dr-of.c | =A0 =A01 -
> =A01 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-=
dr-of.c
> index 7916e56..ab333ac 100644
> --- a/drivers/usb/host/fsl-mph-dr-of.c
> +++ b/drivers/usb/host/fsl-mph-dr-of.c
> @@ -94,7 +94,6 @@ struct platform_device * __devinit fsl_usb2_device_regi=
ster(
> =A0 =A0 =A0 =A0pdev->dev.parent =3D &ofdev->dev;
>
> =A0 =A0 =A0 =A0pdev->dev.coherent_dma_mask =3D ofdev->dev.coherent_dma_ma=
sk;
> - =A0 =A0 =A0 pdev->dev.dma_mask =3D &pdev->archdata.dma_mask;
> =A0 =A0 =A0 =A0*pdev->dev.dma_mask =3D *ofdev->dev.dma_mask;
>
> =A0 =A0 =A0 =A0retval =3D platform_device_add_data(pdev, pdata, sizeof(*p=
data));
Hi Leo, can your guys give me an ACK for it? Then, Alan can apply it.
Ramneek has already tested it, and confirmed it did not break host
function at his platform.
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
--=20
BR,
Peter Chen
^ permalink raw reply
* Re: [PATCH] powerpc/usb: fix bug of kernel hang when initializing usb
From: Sergei Shtylyov @ 2012-02-18 15:39 UTC (permalink / raw)
To: Shengzhou Liu; +Cc: linux-usb, linuxppc-dev
In-Reply-To: <1329386540-12341-1-git-send-email-Shengzhou.Liu@freescale.com>
Hello.
On 16-02-2012 14:02, Shengzhou Liu wrote:
> If USB UTMI PHY is not enable, writing to portsc register will lead to
> kernel hang during boot up.
> Signed-off-by: Shengzhou Liu<Shengzhou.Liu@freescale.com>
[...]
> diff --git a/drivers/usb/host/ehci-fsl.h b/drivers/usb/host/ehci-fsl.h
> index bdf43e2..0e400c2 100644
> --- a/drivers/usb/host/ehci-fsl.h
> +++ b/drivers/usb/host/ehci-fsl.h
> @@ -45,6 +45,7 @@
> #define FSL_SOC_USB_PRICTRL 0x40c /* NOTE: big-endian */
> #define FSL_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */
> #define FSL_SOC_USB_CTRL 0x500 /* NOTE: big-endian */
> +#define CTRL_UTMI_PHY_EN (1<<9)
Please put spaces around << like below.
> #define CTRL_PHY_CLK_VALID (1<< 17)
> #define SNOOP_SIZE_2GB 0x1e
> #endif /* _EHCI_FSL_H */
WBR, Sergei
^ permalink raw reply
* RE: [PATCH] powerpc/85xx:Add PSC9131 RDB Support
From: Kushwaha Prabhakar-B32579 @ 2012-02-18 16:45 UTC (permalink / raw)
To: Andy Fleming, Tabi Timur-B04825
Cc: Aggrwal Poonam-B10812, Srivastava Rajan-B34330,
Mehresh Ramneek-B31383, Goyal Akhil-B35197,
linuxppc-dev@lists.ozlabs.org,
devicetree-discuss@lists.ozlabs.org, Jain Priyanka-B32167
In-Reply-To: <CAKWjMd70yAkbY4fbMaumih86YEujjDti4YRrnH4Yycj7-NEBPw@mail.gmail.com>
Thanks Andy and Timur for correcting the statement.
I will make sure of this in future patches.
--Prabhakar
> -----Original Message-----
> From: Andy Fleming [mailto:afleming@gmail.com]
> Sent: Saturday, February 18, 2012 4:56 AM
> To: Tabi Timur-B04825
> Cc: Kushwaha Prabhakar-B32579; Goyal Akhil-B35197; Aggrwal Poonam-B10812;
> Srivastava Rajan-B34330; Mehresh Ramneek-B31383; devicetree-
> discuss@lists.ozlabs.org; linuxppc-dev@lists.ozlabs.org; Jain Priyanka-
> B32167
> Subject: Re: [PATCH] powerpc/85xx:Add PSC9131 RDB Support
>=20
> On Fri, Feb 17, 2012 at 1:20 PM, Tabi Timur-B04825 <B04825@freescale.com>
> wrote:
> > On Tue, Feb 14, 2012 at 2:37 AM, Prabhakar Kushwaha
> > <prabhakar@freescale.com> wrote:
> >>
> >> =A0Applied on
> >> git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git
> >> branch next
> >
> > This is actually a false statement. =A0"Applied" is past tense, so you
> > are saying that this patch has *already* been applied to Kumar's
> > powerpc.git repository. =A0But this is not true -- Kumar's repository
> > has not been updated in the last three weeks, and this patch is
> > nowhere to be found.
>=20
> I'm pretty sure the sentence should read:
>=20
> Based on git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git
> branch next
>=20
> Good idea to correct that for future submissions, as it is otherwise
> confusing. Could also say "Developed against" instead of "Based on".
>=20
> Andy
^ permalink raw reply
* Re: [PATCH] powerpc: perf: power_pmu_start restores incorrect values, breaking frequency events
From: Stephane Eranian @ 2012-02-19 11:13 UTC (permalink / raw)
To: Paul Mackerras
Cc: gleb, peterz, vince, linux-kernel, andi, Anton Blanchard, imunsie,
mingo, sukadev, linuxppc-dev, wcohen, asharma, emunson
In-Reply-To: <20120216045749.GA25364@bloggs.ozlabs.ibm.com>
Glad to see you fixed the PPC problem.
On Thu, Feb 16, 2012 at 5:57 AM, Paul Mackerras <paulus@samba.org> wrote:
> On Thu, Feb 16, 2012 at 03:48:22PM +1100, Anton Blanchard wrote:
>>
>> perf on POWER stopped working after commit e050e3f0a71b (perf: Fix
>> broken interrupt rate throttling). That patch exposed a bug in
>> the POWER perf_events code.
>>
>> Since the PMCs count upwards and take an exception when the top bit
>> is set, we want to write 0x80000000 - left in power_pmu_start. We were
>> instead programming in left which effectively disables the counter
>> until we eventually hit 0x80000000. This could take seconds or longer.
>>
>> With the patch applied I get the expected number of samples:
>>
>> # taskset -c 0 yes > /dev/null &
>> # perf record -C 0 -a sleep 10
>> # perf report -D | grep SAMPLE | tail -1
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 SAMPLE events: =C2=A0 =C2=A0 =C2=A0 9=
948
>>
>> Signed-off-by: Anton Blanchard <anton@samba.org>
>
> Acked-by: Paul Mackerras <paulus@samba.org>
^ 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