* Re: [stable] [PATCH] powerpc: Fix 32-bit SMP build
From: Josh Boyer @ 2011-05-21 0:38 UTC (permalink / raw)
To: Greg KH; +Cc: linuxppc-dev, stable
In-Reply-To: <20110520215835.GA14918@kroah.com>
On Fri, May 20, 2011 at 5:58 PM, Greg KH <greg@kroah.com> wrote:
> On Fri, May 20, 2011 at 04:22:25PM -0400, Josh Boyer wrote:
>> Commit 69e3cea8d5fd526 introduced start_secondary_resume to misc_32.S,
>> however it uses a 64-bit instruction which is not valid on 32-bit
>> platforms. =A0Use 'stw' instead.
>>
>> Reported-by: Richard Cochran <richardcochran@gmail.com>
>> Tested-by: Richard Cochran <richardcochran@gmail.com>
>> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
>>
>> ---
>
> <formletter>
>
> This is not the correct way to submit patches for inclusion in the
> stable kernel tree. =A0Please read Documentation/stable_kernel_rules.txt
> for how to do this properly.
>
> </formletter>
Sigh. I know that. My fault for rushing it and not thinking.
josh
^ permalink raw reply
* RE: [PATCH v2]powerpc: Force page alignment for initrd
From: Dave Carroll @ 2011-05-20 23:23 UTC (permalink / raw)
To: 'Benjamin Herrenschmidt'
Cc: Paul Mackerras (E-mail), LPPC (E-mail), LKML (E-mail)
In-Reply-To: <1305930459.7481.194.camel@pasglop>
When using 64K pages with a separate cpio rootfs, U-Boot will align the roo=
tfs
on a 4K page boundary. When the memory is reserved, and subsequent early
memblock_alloc is called, it will allocate memory between the 64K page alig=
nment
and reserved memory. When the reserved memory is subsequently freed, it is =
done
so by pages, causing the early memblock_alloc requests to be re-used, which=
in
my case, caused the device-tree to be clobbered.
This patch forces initrd to be kernel page aligned, to match the mechanism =
used
to free reserved memory.
Signed-off-by: Dave Carroll <dcarroll@astekcorp.com>
---
arch/powerpc/kernel/prom.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 48aeb55..7e58f6b 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -555,7 +555,8 @@ static void __init early_reserve_mem(void)
#ifdef CONFIG_BLK_DEV_INITRD
/* then reserve the initrd, if any */
if (initrd_start && (initrd_end > initrd_start))
- memblock_reserve(__pa(initrd_start), initrd_end - initrd_st=
art);
+ memblock_reserve(_ALIGN_DOWN(__pa(initrd_start), PAGE_SIZE)=
,
+ PAGE_ALIGN(initrd_end) - _ALIGN_DOWN(initrd_start, =
PAGE_SIZE));
#endif /* CONFIG_BLK_DEV_INITRD */
#ifdef CONFIG_PPC32
--
1.7.4
^ permalink raw reply related
* Re: [git pull] Please pull powerpc.git merge branch
From: Benjamin Herrenschmidt @ 2011-05-20 22:21 UTC (permalink / raw)
To: Richard Cochran
Cc: linuxppc-dev list, Andrew Morton, Linus Torvalds,
Linux Kernel list
In-Reply-To: <20110520132328.GA5785@riccoc20.at.omicron.at>
On Fri, 2011-05-20 at 15:23 +0200, Richard Cochran wrote:
> On Thu, May 19, 2011 at 02:06:18PM +1000, Benjamin Herrenschmidt wrote:
> > are available in the git repository at:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git merge
>
> When I try to build 'next' (now at 208b3a4c), it does not compile due
> to a change from the following commit.
>
> > Benjamin Herrenschmidt (1):
> > powerpc/smp: Make start_secondary_resume available to all CPU variants
>
> I would appreciate your help in getting this fixed...
It's me being a moron. I'll send a fix to Linus.
Cheers,
Ben.
> Thanks,
> Richard
>
> PS the error looks like this:
>
> AS arch/powerpc/kernel/misc_32.o
> arch/powerpc/kernel/misc_32.S: Assembler messages:
> arch/powerpc/kernel/misc_32.S:703: Error: Unrecognized opcode: `std'
> make[2]: *** [arch/powerpc/kernel/misc_32.o] Error 1
> make[1]: *** [arch/powerpc/kernel] Error 2
>
> > ${CROSS_COMPILE}gcc -v
> Using built-in specs.
> Target: powerpc-none-linux-gnuspe
> Configured with: ../gcc-4.3.2/configure --target=powerpc-none-linux-gnuspe --host=i686-pc-linux-gnu --prefix=/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe --with-sysroot=/opt/freescale/usr/local/gcc-4.3.74-eglibc-2.8.74-dp-2/powerpc-none-linux-gnuspe/powerpc-none-linux-gnuspe/libc --disable-libssp --disable-libmudflap --disable-libstdcxx-pch --enable-libgomp --enable-shared --enable-threads --enable-languages=c,c++ --with-gmp=/usr/src/redhat/BUILD/csl-tc-4.3.74/host-libs/usr --with-mpfr=/usr/src/redhat/BUILD/csl-tc-4.3.74/host-libs/usr --with-cpu=8548 --with-gnu-as --with-gnu-ld --enable-symvers=gnu --enable-__cxa_atexit --enable-cxx-flags=-mcpu=8548 --disable-multilib --with-long-double-128 --disable-nls --enable-e500_double
> Thread model: posix
> gcc version 4.3.2 (GCC)
^ permalink raw reply
* Re: [PATCH 2/2] powerpc/book3e-64: reraise doorbell when masked by soft-irq-disable
From: Benjamin Herrenschmidt @ 2011-05-20 22:32 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20110520190047.GB7058@schlenkerla.am.freescale.net>
On Fri, 2011-05-20 at 14:00 -0500, Scott Wood wrote:
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> arch/powerpc/kernel/exceptions-64e.S | 22 +++++++++++++++++++++-
> 1 files changed, 21 insertions(+), 1 deletions(-)
You can probably remove the doorbell re-check when enabling interrupts
now, can't you ?
Cheers,
Ben.
> diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
> index b60f49e..87ca569 100644
> --- a/arch/powerpc/kernel/exceptions-64e.S
> +++ b/arch/powerpc/kernel/exceptions-64e.S
> @@ -123,6 +123,12 @@
> std r14,PACA_EXMC+EX_R14(r13); \
> std r15,PACA_EXMC+EX_R15(r13)
>
> +#define PROLOG_ADDITION_DOORBELL_GEN \
> + lbz r11,PACASOFTIRQEN(r13); /* are irqs soft-disabled ? */ \
> + cmpwi cr0,r11,0; /* yes -> go out of line */ \
> + beq masked_doorbell_book3e;
> +
> +
> /* Core exception code for all exceptions except TLB misses.
> * XXX: Needs to make SPRN_SPRG_GEN depend on exception type
> */
> @@ -466,7 +472,13 @@ kernel_dbg_exc:
> MASKABLE_EXCEPTION(0x260, perfmon, .performance_monitor_exception, ACK_NONE)
>
> /* Doorbell interrupt */
> - MASKABLE_EXCEPTION(0x2070, doorbell, .doorbell_exception, ACK_NONE)
> + START_EXCEPTION(doorbell)
> + NORMAL_EXCEPTION_PROLOG(0x2070, PROLOG_ADDITION_DOORBELL)
> + EXCEPTION_COMMON(0x2070, PACA_EXGEN, INTS_DISABLE_ALL)
> + CHECK_NAPPING()
> + addi r3,r1,STACK_FRAME_OVERHEAD
> + bl .doorbell_exception
> + b .ret_from_except_lite;
>
> /* Doorbell critical Interrupt */
> START_EXCEPTION(doorbell_crit);
> @@ -521,8 +533,16 @@ kernel_dbg_exc:
> * An interrupt came in while soft-disabled; clear EE in SRR1,
> * clear paca->hard_enabled and return.
> */
> +masked_doorbell_book3e:
> + mtcr r10
> + /* Resend the doorbell to fire again when ints enabled */
> + mfspr r10,SPRN_PIR
> + PPC_MSGSND(r10)
> + b masked_interrupt_book3e_common
> +
> masked_interrupt_book3e:
> mtcr r10
> +masked_interrupt_book3e_common:
> stb r11,PACAHARDIRQEN(r13)
> mfspr r10,SPRN_SRR1
> rldicl r11,r10,48,1 /* clear MSR_EE */
^ permalink raw reply
* Re: [PATCH 1/2] powerpc/book3e-64: hv exceptions aren't MASKABLE
From: Benjamin Herrenschmidt @ 2011-05-20 22:30 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20110520190030.GA7058@schlenkerla.am.freescale.net>
On Fri, 2011-05-20 at 14:00 -0500, Scott Wood wrote:
> In general we will not have EE soft-disabled or be napping when
> these exceptions happen, but still it is not correct.
>
> The guest doorbell exceptions can only be triggered with MSR[GS]=1,
> and thus for host kernel nesting purposes are base-level exceptions.
>
> Note that ehpriv and hypercall are triggerable from normal userspace.
> I tested that the process gets properly signalled in this case.
Please split the renaming of type->level from the actual functional
patch.
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCH]powerpc: Force page alignment for early reserved memory
From: Benjamin Herrenschmidt @ 2011-05-20 22:27 UTC (permalink / raw)
To: Dave Carroll; +Cc: LPPC (E-mail), Paul Mackerras (E-mail), LKML (E-mail)
In-Reply-To: <522F24EF533FC546962ECFA2054FF777373072AB71@MAILSERVER2.cos.astekcorp.com>
On Fri, 2011-05-20 at 15:26 -0600, Dave Carroll wrote:
> When using 64K pages with a separate cpio rootfs, U-Boot will align the rootfs on a 4K
> page boundary. When the memory is reserved, and subsequent early memblock_alloc
> is called, it will allocate memory between the 64K page alignment and reserved
> memory. When the reserved memory is subsequently freed, it is done so by pages,
> causing the early memblock_alloc requests to be re-used, which in my case, caused
> the device-tree to be clobbered.
>
> This patch forces all early reserved memory to be kernel page aligned, to match
> the mechanism used to free reserved memory.
Hrm...
Reserved memory isn't normally freed. The rootfs is a special case here,
shouldn't we special case it and thus align that specific reserve at the
call site ?
Not a huge deal either way now that I fixed memblock_reserve() to cope
with overlaps but could be a problem if we want to backport your patch.
Cheers,
Ben.
> Signed-off-by: Dave Carroll <dcarroll@astekcorp.com>
> ---
> arch/powerpc/kernel/prom.c | 21 +++++++++++++++++----
> 1 files changed, 17 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
> index e74fa12..2744792 100644
> --- a/arch/powerpc/kernel/prom.c
> +++ b/arch/powerpc/kernel/prom.c
> @@ -534,6 +534,19 @@ void __init early_init_dt_setup_initrd_arch(unsigned long start,
> }
> #endif
>
> +static void __init reserve_mem(u64 base, u64 size)
> +{
> + u64 top = base + size;
> + if (size == 0)
> + return;
> +
> + base = _ALIGN_DOWN(base, PAGE_SIZE);
> + top = _ALIGN_UP(top, PAGE_SIZE);
> + size = top - base;
> + memblock_reserve(base, size);
> +
> +}
> +
> static void __init early_reserve_mem(void)
> {
> u64 base, size;
> @@ -547,12 +560,12 @@ static void __init early_reserve_mem(void)
> /* before we do anything, lets reserve the dt blob */
> self_base = __pa((unsigned long)initial_boot_params);
> self_size = initial_boot_params->totalsize;
> - memblock_reserve(self_base, self_size);
> + reserve_mem(self_base, self_size);
>
> #ifdef CONFIG_BLK_DEV_INITRD
> /* then reserve the initrd, if any */
> if (initrd_start && (initrd_end > initrd_start))
> - memblock_reserve(__pa(initrd_start), initrd_end - initrd_start);
> + reserve_mem(__pa(initrd_start), initrd_end - initrd_start);
> #endif /* CONFIG_BLK_DEV_INITRD */
>
> #ifdef CONFIG_PPC32
> @@ -573,7 +586,7 @@ static void __init early_reserve_mem(void)
> if (base_32 == self_base && size_32 == self_size)
> continue;
> DBG("reserving: %x -> %x\n", base_32, size_32);
> - memblock_reserve(base_32, size_32);
> + reserve_mem(base_32, size_32);
> }
> return;
> }
> @@ -584,7 +597,7 @@ static void __init early_reserve_mem(void)
> if (size == 0)
> break;
> DBG("reserving: %llx -> %llx\n", base, size);
> - memblock_reserve(base, size);
> + reserve_mem(base, size);
> }
> }
>
> --
> 1.7.4
> --
> 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/
^ permalink raw reply
* Re: [stable] [PATCH] powerpc: Fix 32-bit SMP build
From: Benjamin Herrenschmidt @ 2011-05-20 22:24 UTC (permalink / raw)
To: Greg KH; +Cc: linuxppc-dev, stable
In-Reply-To: <20110520215835.GA14918@kroah.com>
On Fri, 2011-05-20 at 14:58 -0700, Greg KH wrote:
> On Fri, May 20, 2011 at 04:22:25PM -0400, Josh Boyer wrote:
> > Commit 69e3cea8d5fd526 introduced start_secondary_resume to misc_32.S,
> > however it uses a 64-bit instruction which is not valid on 32-bit
> > platforms. Use 'stw' instead.
> >
> > Reported-by: Richard Cochran <richardcochran@gmail.com>
> > Tested-by: Richard Cochran <richardcochran@gmail.com>
> > Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> >
> > ---
>
> <formletter>
>
> This is not the correct way to submit patches for inclusion in the
> stable kernel tree. Please read Documentation/stable_kernel_rules.txt
> for how to do this properly.
>
> </formletter>
The function is in a different place in 2.6.39 anyways. I'll do a proper
backport when Linus merges this one.
Cheers,
Ben.
^ permalink raw reply
* Re: [bg-linux] [PATCH 6/7] [RFC] enable early TLBs for BG/P
From: Benjamin Herrenschmidt @ 2011-05-20 22:20 UTC (permalink / raw)
To: Eric Van Hensbergen; +Cc: Kazutomo Yoshii, linuxppc-dev, linux-kernel, bg-linux
In-Reply-To: <BANLkTikG9mfzXM0WmWxPLhjGD-M6AVznkw@mail.gmail.com>
On Fri, 2011-05-20 at 08:01 -0500, Eric Van Hensbergen wrote:
> On Thu, May 19, 2011 at 10:52 PM, Benjamin Herrenschmidt
> <benh@kernel.crashing.org> wrote:
> >> Unfortunately, the firmware is also required:
> >> - to configure Blue Gene Interrupt Controller(BIC)
> >> - to configure Torus DMA unit. e.g. fifo
> >> - to configure global interrupt (even we don't use, we need to disable
> >> some channel correctly)
> >
> > Can't we just write bare metal code for that ?
> >
>
> The kittyhawk code has the bare-metal equivalents for all of these.
> When I get to the drivers, I'll favor the kittyhawk versions for
> submission and then we'll see if it would be possible to adapt the HPC
> extensions to use the bare-metal versions of the drivers versus the
> firmware interface.
Ok. We can also start with using the FW and then migrate to bare metal.
> >> - to access node personality information (node id, DDR size, HZ, etc) or
> >> maybe we can directly access SRAM?
> >
> > That should be turned into device-tree at boot, possibly from a
> > bootloader or from the zImage wrapper.
> >
>
> This is the approach is used by the kittyhawk u-boot approach.
> However, it would also be just as easy to construct an in-memory
> device-tree within Linux by mapping the personality page and copying
> the relevant bits out. This has the advantage of being able to boot
> Linux directly on the nodes without an intermediary boot loader (which
> kittyhawk uses just to allow us customize which kernel boots on a
> node-to-node basis whereas the stock system boots the same kernel on
> all the nodes within a partition allocation (64-40,000 nodes)).
We can do that from the zImage wrapper... that would be nicer than doing
it from the kernel itself unless there's good reasons to do so like
iSeries.
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCH 2/7] powerpc/mm: 64-bit 4k: use a PMD-based virtual page table
From: Benjamin Herrenschmidt @ 2011-05-20 22:15 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20110520155719.32e51635@schlenkerla.am.freescale.net>
On Fri, 2011-05-20 at 15:57 -0500, Scott Wood wrote:
> I see a 2% cost going from virtual pmd to full 4-level walk in the
> benchmark mentioned above (some type of sort), and just under 3% in
> page-stride lat_mem_rd from lmbench.
>
> OTOH, the virtual pmd approach still leaves the possibility of taking a
> bunch of virtual page table misses if non-localized accesses happen over a
> very large chunk of address space (tens of GiB), and we'd have one fewer
> type of TLB miss to worry about complexity-wise with a straight table walk.
>
> Let me know what you'd prefer.
I'm tempted to kill the virtual linear feature alltogether.. it didn't
buy us that much. Have you looked if you can snatch back some of those
cycles with hand tuning of the level walker ?
Would it work/help to have a simple cache of the last pmd & address and
compare just that ? Maybe in a SPRG or a known cache hot location like
the PACA in a line that we already load anyways ?
Cheers,
Ben.
^ permalink raw reply
* Re: [stable] [PATCH] powerpc: Fix 32-bit SMP build
From: Greg KH @ 2011-05-20 21:58 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev, stable
In-Reply-To: <20110520202225.GI25179@zod.rchland.ibm.com>
On Fri, May 20, 2011 at 04:22:25PM -0400, Josh Boyer wrote:
> Commit 69e3cea8d5fd526 introduced start_secondary_resume to misc_32.S,
> however it uses a 64-bit instruction which is not valid on 32-bit
> platforms. Use 'stw' instead.
>
> Reported-by: Richard Cochran <richardcochran@gmail.com>
> Tested-by: Richard Cochran <richardcochran@gmail.com>
> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
>
> ---
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read Documentation/stable_kernel_rules.txt
for how to do this properly.
</formletter>
^ permalink raw reply
* [PATCH]powerpc: Force page alignment for early reserved memory
From: Dave Carroll @ 2011-05-20 21:26 UTC (permalink / raw)
To: Benjamin Herrenschmidt (E-mail), Paul Mackerras (E-mail),
Grant Likely (E-mail)
Cc: LPPC (E-mail), LKML (E-mail)
When using 64K pages with a separate cpio rootfs, U-Boot will align the roo=
tfs on a 4K
page boundary. When the memory is reserved, and subsequent early memblock_a=
lloc
is called, it will allocate memory between the 64K page alignment and reser=
ved
memory. When the reserved memory is subsequently freed, it is done so by pa=
ges,
causing the early memblock_alloc requests to be re-used, which in my case, =
caused
the device-tree to be clobbered.
This patch forces all early reserved memory to be kernel page aligned, to m=
atch
the mechanism used to free reserved memory.
Signed-off-by: Dave Carroll <dcarroll@astekcorp.com>
---
arch/powerpc/kernel/prom.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index e74fa12..2744792 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -534,6 +534,19 @@ void __init early_init_dt_setup_initrd_arch(unsigned l=
ong start,
}
#endif
+static void __init reserve_mem(u64 base, u64 size)
+{
+ u64 top =3D base + size;
+ if (size =3D=3D 0)
+ return;
+
+ base =3D _ALIGN_DOWN(base, PAGE_SIZE);
+ top =3D _ALIGN_UP(top, PAGE_SIZE);
+ size =3D top - base;
+ memblock_reserve(base, size);
+
+}
+
static void __init early_reserve_mem(void)
{
u64 base, size;
@@ -547,12 +560,12 @@ static void __init early_reserve_mem(void)
/* before we do anything, lets reserve the dt blob */
self_base =3D __pa((unsigned long)initial_boot_params);
self_size =3D initial_boot_params->totalsize;
- memblock_reserve(self_base, self_size);
+ reserve_mem(self_base, self_size);
#ifdef CONFIG_BLK_DEV_INITRD
/* then reserve the initrd, if any */
if (initrd_start && (initrd_end > initrd_start))
- memblock_reserve(__pa(initrd_start), initrd_end - initrd_st=
art);
+ reserve_mem(__pa(initrd_start), initrd_end - initrd_start);
#endif /* CONFIG_BLK_DEV_INITRD */
#ifdef CONFIG_PPC32
@@ -573,7 +586,7 @@ static void __init early_reserve_mem(void)
if (base_32 =3D=3D self_base && size_32 =3D=3D self=
_size)
continue;
DBG("reserving: %x -> %x\n", base_32, size_32);
- memblock_reserve(base_32, size_32);
+ reserve_mem(base_32, size_32);
}
return;
}
@@ -584,7 +597,7 @@ static void __init early_reserve_mem(void)
if (size =3D=3D 0)
break;
DBG("reserving: %llx -> %llx\n", base, size);
- memblock_reserve(base, size);
+ reserve_mem(base, size);
}
}
--
1.7.4
^ permalink raw reply related
* Re: [PATCH 2/7] powerpc/mm: 64-bit 4k: use a PMD-based virtual page table
From: Scott Wood @ 2011-05-20 20:57 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1305754435.7481.3.camel@pasglop>
On Thu, 19 May 2011 07:33:55 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Wed, 2011-05-18 at 16:05 -0500, Scott Wood wrote:
> > Loads with non-linear access patterns were producing a very high
> > ratio of recursive pt faults to regular tlb misses. Rather than
> > choose between a 4-level table walk or a 1-level virtual page table
> > lookup, use a hybrid scheme with a virtual linear pmd, followed by a
> > 2-level lookup in the normal handler.
> >
> > This adds about 5 cycles (assuming no cache misses, and e5500 timing)
> > to a normal TLB miss, but greatly reduces the recursive fault rate
> > for loads which don't have locality within 2 MiB regions but do have
> > significant locality within 1 GiB regions. Improvements of close to 50%
> > were seen on such benchmarks.
>
> Can you publish benchmarks that compare these two with no virtual at all
> (4 full loads) ?
I see a 2% cost going from virtual pmd to full 4-level walk in the
benchmark mentioned above (some type of sort), and just under 3% in
page-stride lat_mem_rd from lmbench.
OTOH, the virtual pmd approach still leaves the possibility of taking a
bunch of virtual page table misses if non-localized accesses happen over a
very large chunk of address space (tens of GiB), and we'd have one fewer
type of TLB miss to worry about complexity-wise with a straight table walk.
Let me know what you'd prefer.
-Scott
^ permalink raw reply
* Re: [PATCH 0/7] This patchset adds support for running Linux under the Freescale hypervisor,
From: Kumar Gala @ 2011-05-20 20:29 UTC (permalink / raw)
To: Timur Tabi; +Cc: linux-kernel, akpm, linux-console, greg, linuxppc-dev
In-Reply-To: <1305813272-31826-1-git-send-email-timur@freescale.com>
On May 19, 2011, at 8:54 AM, Timur Tabi wrote:
> have hypervisor extensions (e.g. the P4080 which has an e500mc core).
>=20
> I think it makes sense for this patchset to go through Kumar Gala's =
-next=20
> branch, but I still need ACKs from various people on the parts that =
are
> not e500-specific.
>=20
> 1. powerpc: make irq_choose_cpu() available to all PIC drivers
> 2. powerpc: introduce ePAPR embedded hypervisor hcall interface
> 3. powerpc: introduce the ePAPR embedded hypervisor vmpic driver
> 4. powerpc: add Freescale hypervisor partition control functions
> 5. powerpc/85xx: add board support for the Freescale hypervisor
> 6. tty/powerpc: introduce the ePAPR embedded hypervisor byte channel =
driver
> 7. drivers/misc: introduce Freescale hypervisor management driver
>=20
> Ben Herrenschmidt, please review/ack parts 1-3.
>=20
> Greg Kroah-Hartman, please review/ack part 6.
>=20
> Andrew Morton, please review/ack part 7.
>=20
> Thank you very much for looking at this patchset. I hope to have it =
included=20
> in 2.6.40.
Applied to 'test' branch. (grabbed 'v2' of tty patch). Fixed merged =
conflicts.
- k=
^ permalink raw reply
* Re: PATCH: powerpc: remove unused variable assignment
From: Stratos Psomadakis @ 2011-05-20 20:31 UTC (permalink / raw)
To: Marcus Meissner; +Cc: akpm, paulus, linuxppc-dev, linux-kernel
In-Reply-To: <20110520091346.GC29499@suse.de>
On 05/20/2011 12:13 PM, Marcus Meissner wrote:
> Hi,
>
> gcc 4.6 with -Werror does not like setting but not using variables
> anymore.
>
> So remove it, it does not seem necessary.
>
> Signed-off-by: Marcus Meissner <meissner@suse.de>
>
> Ciao, Marcus
> ---
> arch/powerpc/include/asm/pgtable-ppc64.h | 8 ++------
> 1 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
> index 2b09cd5..c3d39de 100644
> --- a/arch/powerpc/include/asm/pgtable-ppc64.h
> +++ b/arch/powerpc/include/asm/pgtable-ppc64.h
> @@ -257,21 +257,17 @@ static inline int __ptep_test_and_clear_young(struct mm_struct *mm,
> static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr,
> pte_t *ptep)
> {
> - unsigned long old;
> -
> if ((pte_val(*ptep) & _PAGE_RW) == 0)
> return;
> - old = pte_update(mm, addr, ptep, _PAGE_RW, 0);
> + pte_update(mm, addr, ptep, _PAGE_RW, 0);
> }
>
> static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
> unsigned long addr, pte_t *ptep)
> {
> - unsigned long old;
> -
> if ((pte_val(*ptep) & _PAGE_RW) == 0)
> return;
> - old = pte_update(mm, addr, ptep, _PAGE_RW, 1);
> + pte_update(mm, addr, ptep, _PAGE_RW, 1);
> }
>
> /*
It's already in the ppc repo [1]. And going to be merged in 2.6.40 I
think. :)
[1]
http://git.kernel.org/?p=linux/kernel/git/benh/powerpc.git;a=commit;h=2a2c29c1a581319f4485af55e8d628d89e8f2583
--
Stratos Psomadakis
<psomas@ece.ntua.gr>
^ permalink raw reply
* [PATCH] powerpc: Fix 32-bit SMP build
From: Josh Boyer @ 2011-05-20 20:22 UTC (permalink / raw)
To: benh, linuxppc-dev; +Cc: stable
Commit 69e3cea8d5fd526 introduced start_secondary_resume to misc_32.S,
however it uses a 64-bit instruction which is not valid on 32-bit
platforms. Use 'stw' instead.
Reported-by: Richard Cochran <richardcochran@gmail.com>
Tested-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
---
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index 402560e..998a100 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -700,7 +700,7 @@ _GLOBAL(start_secondary_resume)
rlwinm r1,r1,0,0,(31-THREAD_SHIFT) /* current_thread_info() */
addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD
li r3,0
- std r3,0(r1) /* Zero the stack frame pointer */
+ stw r3,0(r1) /* Zero the stack frame pointer */
bl start_secondary
b .
#endif /* CONFIG_SMP */
^ permalink raw reply related
* Re: [git pull] Please pull powerpc.git merge branch
From: Kumar Gala @ 2011-05-20 20:13 UTC (permalink / raw)
To: Josh Boyer
Cc: Richard Cochran, Linux Kernel list, linuxppc-dev list,
Andrew Morton, Linus Torvalds
In-Reply-To: <20110520144653.GH25179@zod.rchland.ibm.com>
On May 20, 2011, at 9:46 AM, Josh Boyer wrote:
> On Fri, May 20, 2011 at 04:32:59PM +0200, Richard Cochran wrote:
>> On Fri, May 20, 2011 at 09:58:45AM -0400, Josh Boyer wrote:
>>> On Fri, May 20, 2011 at 03:23:29PM +0200, Richard Cochran wrote:
>>>> When I try to build 'next' (now at 208b3a4c), it does not compile =
due
>>>> to a change from the following commit.
>>>>=20
>>>>> Benjamin Herrenschmidt (1):
>>>>> powerpc/smp: Make start_secondary_resume available to all CPU =
variants
>>>>=20
>>>> I would appreciate your help in getting this fixed...
>>>=20
>>> Could you try the patch below?
>>=20
>> Yes, and it both compiles and boots.
>=20
> Thanks for testing!
>=20
> Ben, can you pull this patch in as-is (fixing up the Subject), or do =
you
> need me to resubmit it?
Yeah, we need this all so we can send it to stable for 2.6.39.1
- k=
^ permalink raw reply
* [PATCH v2] powerpc: Add a defconfig for 'corenet' 32-bit platforms
From: Kumar Gala @ 2011-05-20 20:02 UTC (permalink / raw)
To: linuxppc-dev
The e500mc and e5500 based cores are only available on corenet based
SoCs. We use this name for the P204x, P3040, P4040, P4080, P50x0 SoCs
and any future processors in these families.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
* Removed MATH_EMU
* Added KEXEC
arch/powerpc/configs/corenet32_smp_defconfig | 183 ++++++++++++++++++++++++++
1 files changed, 183 insertions(+), 0 deletions(-)
create mode 100644 arch/powerpc/configs/corenet32_smp_defconfig
diff --git a/arch/powerpc/configs/corenet32_smp_defconfig b/arch/powerpc/configs/corenet32_smp_defconfig
new file mode 100644
index 0000000..53f3949
--- /dev/null
+++ b/arch/powerpc/configs/corenet32_smp_defconfig
@@ -0,0 +1,183 @@
+CONFIG_PPC_85xx=y
+CONFIG_SMP=y
+CONFIG_NR_CPUS=8
+CONFIG_EXPERIMENTAL=y
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_AUDIT=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_RCU_TRACE=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_KALLSYMS_ALL=y
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_EMBEDDED=y
+CONFIG_PERF_EVENTS=y
+CONFIG_SLAB=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+# CONFIG_BLK_DEV_BSG is not set
+CONFIG_P3041_DS=y
+CONFIG_P4080_DS=y
+CONFIG_P5020_DS=y
+CONFIG_HIGHMEM=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_BINFMT_MISC=m
+CONFIG_KEXEC=y
+CONFIG_FORCE_MAX_ZONEORDER=13
+CONFIG_FSL_LBC=y
+CONFIG_PCI=y
+CONFIG_PCIEPORTBUS=y
+# CONFIG_PCIEASPM is not set
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_XFRM_USER=y
+CONFIG_XFRM_SUB_POLICY=y
+CONFIG_XFRM_STATISTICS=y
+CONFIG_NET_KEY=y
+CONFIG_NET_KEY_MIGRATE=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_VERBOSE=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_NET_IPIP=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+CONFIG_ARPD=y
+CONFIG_INET_AH=y
+CONFIG_INET_ESP=y
+CONFIG_INET_IPCOMP=y
+# CONFIG_INET_LRO is not set
+CONFIG_IPV6=y
+CONFIG_IP_SCTP=m
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_MTD=y
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_CFI=y
+CONFIG_MTD_CFI_AMDSTD=y
+CONFIG_MTD_PHYSMAP_OF=y
+CONFIG_MTD_M25P80=y
+CONFIG_PROC_DEVICETREE=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=131072
+CONFIG_MISC_DEVICES=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_ST=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_LOGGING=y
+CONFIG_SCSI_SYM53C8XX_2=y
+CONFIG_ATA=y
+CONFIG_SATA_AHCI=y
+CONFIG_SATA_FSL=y
+CONFIG_SATA_SIL24=y
+CONFIG_SATA_SIL=y
+CONFIG_PATA_SIL680=y
+CONFIG_NETDEVICES=y
+CONFIG_VITESSE_PHY=y
+CONFIG_FIXED_PHY=y
+CONFIG_NET_ETHERNET=y
+CONFIG_E1000=y
+CONFIG_E1000E=y
+CONFIG_FSL_PQ_MDIO=y
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_LEGACY_PTYS is not set
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_RSA=y
+CONFIG_HW_RANDOM=y
+CONFIG_NVRAM=y
+CONFIG_I2C=y
+CONFIG_I2C_MPC=y
+CONFIG_SPI=y
+CONFIG_SPI_GPIO=y
+CONFIG_SPI_FSL_SPI=y
+CONFIG_SPI_FSL_ESPI=y
+# CONFIG_HWMON is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=y
+CONFIG_USB_HID=m
+CONFIG_USB=y
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_MON=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_FSL=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
+CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
+CONFIG_USB_STORAGE=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_OF=y
+CONFIG_MMC_SDHCI_OF_ESDHC=y
+CONFIG_EDAC=y
+CONFIG_EDAC_MM_EDAC=y
+CONFIG_EDAC_MPC85XX=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_DS3232=y
+CONFIG_RTC_DRV_CMOS=y
+CONFIG_UIO=y
+CONFIG_STAGING=y
+# CONFIG_STAGING_EXCLUDE_BUILD is not set
+CONFIG_EXT2_FS=y
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=y
+CONFIG_NTFS_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_TMPFS=y
+CONFIG_JFFS2_FS=y
+CONFIG_CRAMFS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+CONFIG_ROOT_NFS=y
+CONFIG_NFSD=m
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_MAC_PARTITION=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_UTF8=m
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_DEBUG_SHIRQ=y
+CONFIG_DETECT_HUNG_TASK=y
+CONFIG_DEBUG_INFO=y
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_CRYPTO_NULL=y
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_MD4=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=y
+CONFIG_CRYPTO_AES=y
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
--
1.7.3.4
^ permalink raw reply related
* Re: [PATCH 1/2] powerpc/book3e-64: hv exceptions aren't MASKABLE
From: Scott Wood @ 2011-05-20 19:39 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <029E9D3E-D310-4DB6-9D0C-5E59705B2676@kernel.crashing.org>
On Fri, 20 May 2011 14:36:09 -0500
Kumar Gala <galak@kernel.crashing.org> wrote:
>
> On May 20, 2011, at 2:00 PM, Scott Wood wrote:
>
> > In general we will not have EE soft-disabled or be napping when
> > these exceptions happen, but still it is not correct.
> >
> > The guest doorbell exceptions can only be triggered with MSR[GS]=1,
> > and thus for host kernel nesting purposes are base-level exceptions.
> >
> > Note that ehpriv and hypercall are triggerable from normal userspace.
> > I tested that the process gets properly signalled in this case.
> >
> > Signed-off-by: Scott Wood <scottwood@freescale.com>
> > ---
> > arch/powerpc/include/asm/reg_booke.h | 2 +
> > arch/powerpc/kernel/exceptions-64e.S | 67 ++++++++++++++++++++++++++--------
> > 2 files changed, 53 insertions(+), 16 deletions(-)
>
> Can you look at a similar patch for 32-bit fsl-booke so we handle HV exceptions if they happen to get generated, maybe something already exists for KVM.
Yes.
-Scott
^ permalink raw reply
* Re: [PATCH 1/2] powerpc/book3e-64: hv exceptions aren't MASKABLE
From: Kumar Gala @ 2011-05-20 19:36 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20110520190030.GA7058@schlenkerla.am.freescale.net>
On May 20, 2011, at 2:00 PM, Scott Wood wrote:
> In general we will not have EE soft-disabled or be napping when
> these exceptions happen, but still it is not correct.
>=20
> The guest doorbell exceptions can only be triggered with MSR[GS]=3D1,
> and thus for host kernel nesting purposes are base-level exceptions.
>=20
> Note that ehpriv and hypercall are triggerable from normal userspace.
> I tested that the process gets properly signalled in this case.
>=20
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> arch/powerpc/include/asm/reg_booke.h | 2 +
> arch/powerpc/kernel/exceptions-64e.S | 67 =
++++++++++++++++++++++++++--------
> 2 files changed, 53 insertions(+), 16 deletions(-)
Can you look at a similar patch for 32-bit fsl-booke so we handle HV =
exceptions if they happen to get generated, maybe something already =
exists for KVM.
- k=
^ permalink raw reply
* Re: [PATCH 02/14] powerpc: Add a defconfig for 'corenet' 32-bit platforms
From: Scott Wood @ 2011-05-20 19:30 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <4DD6C023.2080601@freescale.com>
On Fri, 20 May 2011 14:25:23 -0500
Timur Tabi <timur@freescale.com> wrote:
> Kumar Gala wrote:
> >> > This may be unnecessary. I originally set CONFIG_FORCE_MAX_ZONEORDER
> >> > to 12 because the DIU driver needs to be able to allocate a contiguous
> >> > 5MB memory block. Setting it to 13 means a max of 16MB. Is there a
> >> > reason the default isn't good enough?
>
> > Is there some concern here? CONFIG_FORCE_MAX_ZONE_ORDER was set to 13 because of hugetlbfs
>
> No, I just wanted to make sure it wasn't something that you just set for no
> particular reason.
>
> Hmm... is 16MB big enough for hugetlbfs? I presume PAGE_SIZE is still 4KB, so a
> value of 13 is just 16MB.
I think there's a separate mechanism for reserving hugetlbfs space at boot
time. 16 MiB should be enough for fully dynamic allocations, and if you
push it too high fragmentation will likely be too much of a problem.
-Scott
^ permalink raw reply
* Re: [PATCH 02/14] powerpc: Add a defconfig for 'corenet' 32-bit platforms
From: Timur Tabi @ 2011-05-20 19:25 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <64A1571F-0AF7-4717-8D6F-4A980E09DFE0@kernel.crashing.org>
Kumar Gala wrote:
>> > This may be unnecessary. I originally set CONFIG_FORCE_MAX_ZONEORDER
>> > to 12 because the DIU driver needs to be able to allocate a contiguous
>> > 5MB memory block. Setting it to 13 means a max of 16MB. Is there a
>> > reason the default isn't good enough?
> Is there some concern here? CONFIG_FORCE_MAX_ZONE_ORDER was set to 13 because of hugetlbfs
No, I just wanted to make sure it wasn't something that you just set for no
particular reason.
Hmm... is 16MB big enough for hugetlbfs? I presume PAGE_SIZE is still 4KB, so a
value of 13 is just 16MB.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply
* Re: [PATCH 02/14] powerpc: Add a defconfig for 'corenet' 32-bit platforms
From: Kumar Gala @ 2011-05-20 19:20 UTC (permalink / raw)
To: Tabi Timur-B04825; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <BANLkTimzQ3PUpJQB_sF+PM9DAL+kAYgDYw@mail.gmail.com>
On May 20, 2011, at 9:45 AM, Tabi Timur-B04825 wrote:
> On Fri, May 20, 2011 at 1:09 AM, Kumar Gala =
<galak@kernel.crashing.org> wrote:
>=20
>> +CONFIG_MATH_EMULATION=3Dy
>=20
> Don't these chips have hardware floating point?
Darn, I thought I looked at that. Will fix.
>> +CONFIG_FORCE_MAX_ZONEORDER=3D13
>=20
> This may be unnecessary. I originally set CONFIG_FORCE_MAX_ZONEORDER
> to 12 because the DIU driver needs to be able to allocate a contiguous
> 5MB memory block. Setting it to 13 means a max of 16MB. Is there a
> reason the default isn't good enough?
Is there some concern here? CONFIG_FORCE_MAX_ZONE_ORDER was set to 13 =
because of hugetlbfs=
^ permalink raw reply
* Re: [PATCH 05/14] powerpc/85xx: Updates to P4080DS device tree
From: Kumar Gala @ 2011-05-20 19:09 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20110520140411.75bdea77@schlenkerla.am.freescale.net>
On May 20, 2011, at 2:04 PM, Scott Wood wrote:
> On Fri, 20 May 2011 01:09:22 -0500
> Kumar Gala <galak@kernel.crashing.org> wrote:
>
>> * Added BSD dual-license
>> * Moved mpic-parent to root so we dont need to duplicate everywhere
>> * Added next level cache from L2 to CPC
>> * Moved to 4-cell MPIC interrupt properties
>> * Added 3 MSI banks
>> * Added numerous missing nodes: soc-sram-error, guts, pins, clockgen,
>> rcpm, sfp, serdes, etc.
>> * Reworked PCIe interrupts to be at virtual bridge level
>
> Have all the new device tree bits (e.g. guts) had bindings posted upstream
> yet?
probably not :(
Will look at our bindings dir and see which ones need upstream pushing.
- k
^ permalink raw reply
* Re: [PATCH 05/14] powerpc/85xx: Updates to P4080DS device tree
From: Scott Wood @ 2011-05-20 19:04 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <1305871771-16334-5-git-send-email-galak@kernel.crashing.org>
On Fri, 20 May 2011 01:09:22 -0500
Kumar Gala <galak@kernel.crashing.org> wrote:
> * Added BSD dual-license
> * Moved mpic-parent to root so we dont need to duplicate everywhere
> * Added next level cache from L2 to CPC
> * Moved to 4-cell MPIC interrupt properties
> * Added 3 MSI banks
> * Added numerous missing nodes: soc-sram-error, guts, pins, clockgen,
> rcpm, sfp, serdes, etc.
> * Reworked PCIe interrupts to be at virtual bridge level
Have all the new device tree bits (e.g. guts) had bindings posted upstream
yet?
-Scott
^ permalink raw reply
* [PATCH 2/2] powerpc/book3e-64: reraise doorbell when masked by soft-irq-disable
From: Scott Wood @ 2011-05-20 19:00 UTC (permalink / raw)
To: galak; +Cc: linuxppc-dev
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
arch/powerpc/kernel/exceptions-64e.S | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index b60f49e..87ca569 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -123,6 +123,12 @@
std r14,PACA_EXMC+EX_R14(r13); \
std r15,PACA_EXMC+EX_R15(r13)
+#define PROLOG_ADDITION_DOORBELL_GEN \
+ lbz r11,PACASOFTIRQEN(r13); /* are irqs soft-disabled ? */ \
+ cmpwi cr0,r11,0; /* yes -> go out of line */ \
+ beq masked_doorbell_book3e;
+
+
/* Core exception code for all exceptions except TLB misses.
* XXX: Needs to make SPRN_SPRG_GEN depend on exception type
*/
@@ -466,7 +472,13 @@ kernel_dbg_exc:
MASKABLE_EXCEPTION(0x260, perfmon, .performance_monitor_exception, ACK_NONE)
/* Doorbell interrupt */
- MASKABLE_EXCEPTION(0x2070, doorbell, .doorbell_exception, ACK_NONE)
+ START_EXCEPTION(doorbell)
+ NORMAL_EXCEPTION_PROLOG(0x2070, PROLOG_ADDITION_DOORBELL)
+ EXCEPTION_COMMON(0x2070, PACA_EXGEN, INTS_DISABLE_ALL)
+ CHECK_NAPPING()
+ addi r3,r1,STACK_FRAME_OVERHEAD
+ bl .doorbell_exception
+ b .ret_from_except_lite;
/* Doorbell critical Interrupt */
START_EXCEPTION(doorbell_crit);
@@ -521,8 +533,16 @@ kernel_dbg_exc:
* An interrupt came in while soft-disabled; clear EE in SRR1,
* clear paca->hard_enabled and return.
*/
+masked_doorbell_book3e:
+ mtcr r10
+ /* Resend the doorbell to fire again when ints enabled */
+ mfspr r10,SPRN_PIR
+ PPC_MSGSND(r10)
+ b masked_interrupt_book3e_common
+
masked_interrupt_book3e:
mtcr r10
+masked_interrupt_book3e_common:
stb r11,PACAHARDIRQEN(r13)
mfspr r10,SPRN_SRR1
rldicl r11,r10,48,1 /* clear MSR_EE */
--
1.7.4.1
^ permalink raw reply related
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