* [POWERPC 1/9] spufs: return an error in spu_create is isolated create isnt supported
2006-11-27 18:18 [POWERPC 0/9] cell bug fixes for 2.6.20 Arnd Bergmann
@ 2006-11-27 18:18 ` Arnd Bergmann
2006-11-27 18:18 ` [POWERPC 2/9] spufs: always send sigtrap on breakpoint Arnd Bergmann
` (7 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2006-11-27 18:18 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Arnd Bergmann, linuxppc-dev, cbe-oss-dev
From: Jeremy Kerr <jk@ozlabs.org>
This changes the spu_create system call to return an error (-ENODEV) if
and isolated spu context is requested on hardware that doesn't support
isolated mode.
Tested on systemsim with and without isolation support
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Index: linux-2.6/arch/powerpc/platforms/cell/spufs/inode.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/spufs/inode.c
+++ linux-2.6/arch/powerpc/platforms/cell/spufs/inode.c
@@ -323,6 +323,10 @@ static int spufs_create_context(struct i
== SPU_CREATE_ISOLATE)
goto out_unlock;
+ ret = -ENODEV;
+ if ((flags & SPU_CREATE_ISOLATE) && !isolated_loader)
+ goto out_unlock;
+
ret = spufs_mkdir(inode, dentry, flags, mode & S_IRWXUGO);
if (ret)
goto out_unlock;
--
^ permalink raw reply [flat|nested] 15+ messages in thread
* [POWERPC 2/9] spufs: always send sigtrap on breakpoint
2006-11-27 18:18 [POWERPC 0/9] cell bug fixes for 2.6.20 Arnd Bergmann
2006-11-27 18:18 ` [POWERPC 1/9] spufs: return an error in spu_create is isolated create isnt supported Arnd Bergmann
@ 2006-11-27 18:18 ` Arnd Bergmann
2006-11-28 0:12 ` Luke Browning
2006-11-27 18:18 ` [POWERPC 3/9] spufs: we should only execute init_spu_base on cell Arnd Bergmann
` (6 subsequent siblings)
8 siblings, 1 reply; 15+ messages in thread
From: Arnd Bergmann @ 2006-11-27 18:18 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Arnd Bergmann, linuxppc-dev, cbe-oss-dev, Ulrich Weigand
Currently, we only send a sigtrap if the current task is being ptraced.
This is somewhat inconsistant, and it breaks utrace support in fedora.
Removing the check should do the right thing in all cases.
Cc: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
index 1be4e33..1acc2ff 100644
--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -350,12 +350,10 @@ out2:
(status >> SPU_STOP_STATUS_SHIFT != 0x2104)))))
ret = status;
- if (unlikely(current->ptrace & PT_PTRACED)) {
- if ((status & SPU_STATUS_STOPPED_BY_STOP)
- && (status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) {
- force_sig(SIGTRAP, current);
- ret = -ERESTARTSYS;
- }
+ if ((status & SPU_STATUS_STOPPED_BY_STOP)
+ && (status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) {
+ force_sig(SIGTRAP, current);
+ ret = -ERESTARTSYS;
}
out:
--
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [POWERPC 2/9] spufs: always send sigtrap on breakpoint
2006-11-27 18:18 ` [POWERPC 2/9] spufs: always send sigtrap on breakpoint Arnd Bergmann
@ 2006-11-28 0:12 ` Luke Browning
2006-11-28 0:29 ` Arnd Bergmann
0 siblings, 1 reply; 15+ messages in thread
From: Luke Browning @ 2006-11-28 0:12 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev, Ulrich Weigand, Arnd Bergmann, cbe-oss-dev
On Mon, 2006-11-27 at 19:18 +0100, Arnd Bergmann wrote:
> plain text document attachment
> (spufs-always-sigtrap-on-breakpoint.diff)
> Currently, we only send a sigtrap if the current task is being ptraced.
> This is somewhat inconsistant, and it breaks utrace support in fedora.
> Removing the check should do the right thing in all cases.
>
> Cc: Ulrich Weigand <ulrich.weigand@de.ibm.com>
> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
>
> diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c
> index 1be4e33..1acc2ff 100644
> --- a/arch/powerpc/platforms/cell/spufs/run.c
> +++ b/arch/powerpc/platforms/cell/spufs/run.c
> @@ -350,12 +350,10 @@ out2:
> (status >> SPU_STOP_STATUS_SHIFT != 0x2104)))))
> ret = status;
>
> - if (unlikely(current->ptrace & PT_PTRACED)) {
> - if ((status & SPU_STATUS_STOPPED_BY_STOP)
> - && (status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) {
> - force_sig(SIGTRAP, current);
> - ret = -ERESTARTSYS;
> - }
> + if ((status & SPU_STATUS_STOPPED_BY_STOP)
> + && (status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) {
> + force_sig(SIGTRAP, current);
> + ret = -ERESTARTSYS;
> }
>
> out:
>
Arnd, could you explain this change a little bit more. Don't you have
to consider whether the program is setup to receive SIGTRAP. We know it
is code to handle SIGTRAP if it is ptraced. Or, are you asserting that
at this point the spu has hit a trap instruction? What does 0x3fff
mean?
Luke
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [POWERPC 2/9] spufs: always send sigtrap on breakpoint
2006-11-28 0:12 ` Luke Browning
@ 2006-11-28 0:29 ` Arnd Bergmann
0 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2006-11-28 0:29 UTC (permalink / raw)
To: Luke Browning; +Cc: linuxppc-dev, cbe-oss-dev, Ulrich Weigand
On Tuesday 28 November 2006 01:12, Luke Browning wrote:
>=20
> Arnd, could you explain this change a little bit more. =A0Don't you have
> to consider whether the program is setup to receive SIGTRAP. =A0We know it
> is code to handle SIGTRAP if it is ptraced. =A0Or, are you asserting that
> at this point the spu has hit a trap instruction? =A0What does 0x3fff
> mean?
0x3fff is indeed the code returned from the breakpoint instruction,
as specified in the JSRE list of stop-and-signal codes. The behaviour
is consistant with that of a Linux process entering a breakpoint.
This usually only happens while ptracing a task, but there is no
reason to treat a task differently when it's not being traced.
It could even be used as well-defined way for an application to
create a core dump, similar to abort() in posix.
Arnd <><
^ permalink raw reply [flat|nested] 15+ messages in thread
* [POWERPC 3/9] spufs: we should only execute init_spu_base on cell
2006-11-27 18:18 [POWERPC 0/9] cell bug fixes for 2.6.20 Arnd Bergmann
2006-11-27 18:18 ` [POWERPC 1/9] spufs: return an error in spu_create is isolated create isnt supported Arnd Bergmann
2006-11-27 18:18 ` [POWERPC 2/9] spufs: always send sigtrap on breakpoint Arnd Bergmann
@ 2006-11-27 18:18 ` Arnd Bergmann
2006-11-27 18:18 ` [POWERPC 4/9] cell: fix building without spufs Arnd Bergmann
` (5 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2006-11-27 18:18 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Arnd Bergmann, linuxppc-dev, cbe-oss-dev, Stephen Rothwell
From: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index 841ed35..bd7bffc 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -663,6 +663,9 @@ static int __init init_spu_base(void)
{
int i, ret;
+ if (!spu_management_ops)
+ return 0;
+
/* create sysdev class for spus */
ret = sysdev_class_register(&spu_sysdev_class);
if (ret)
--
1.4.4
--
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [POWERPC 4/9] cell: fix building without spufs
2006-11-27 18:18 [POWERPC 0/9] cell bug fixes for 2.6.20 Arnd Bergmann
` (2 preceding siblings ...)
2006-11-27 18:18 ` [POWERPC 3/9] spufs: we should only execute init_spu_base on cell Arnd Bergmann
@ 2006-11-27 18:18 ` Arnd Bergmann
2006-11-27 18:18 ` [POWERPC 5/9] ps3: Missed renames of CONFIG_PS3 to CONFIG_PPC_PS3 Arnd Bergmann
` (4 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2006-11-27 18:18 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, cbe-oss-dev, Arnd Bergmann
It may be desireable to build a kernel for cell without
spufs, e.g. as the initial kboot kernel. This requires
that the SPU specific parts of the core dump and the xmon
code depend on CONFIG_SPU_BASE instead of CONFIG_PPC_CELL.
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Index: linux-2.6/arch/powerpc/xmon/Makefile
===================================================================
--- linux-2.6.orig/arch/powerpc/xmon/Makefile
+++ linux-2.6/arch/powerpc/xmon/Makefile
@@ -8,5 +8,5 @@ obj-y += xmon.o setjmp.o start.o nonst
ifdef CONFIG_XMON_DISASSEMBLY
obj-y += ppc-dis.o ppc-opc.o
-obj-$(CONFIG_PPC_CELL) += spu-dis.o spu-opc.o
+obj-$(CONFIG_SPU_BASE) += spu-dis.o spu-opc.o
endif
Index: linux-2.6/arch/powerpc/xmon/xmon.c
===================================================================
--- linux-2.6.orig/arch/powerpc/xmon/xmon.c
+++ linux-2.6/arch/powerpc/xmon/xmon.c
@@ -213,7 +213,7 @@ Commands:\n\
p call a procedure\n\
r print registers\n\
s single step\n"
-#ifdef CONFIG_PPC_CELL
+#ifdef CONFIG_SPU_BASE
" ss stop execution on all spus\n\
sr restore execution on stopped spus\n\
sf # dump spu fields for spu # (in hex)\n\
@@ -2654,7 +2654,7 @@ void __init xmon_setup(void)
debugger(NULL);
}
-#ifdef CONFIG_PPC_CELL
+#ifdef CONFIG_SPU_BASE
struct spu_info {
struct spu *spu;
@@ -2907,7 +2907,7 @@ static int do_spu_cmd(void)
return 0;
}
-#else /* ! CONFIG_PPC_CELL */
+#else /* ! CONFIG_SPU_BASE */
static int do_spu_cmd(void)
{
return -1;
Index: linux-2.6/include/asm-powerpc/elf.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/elf.h
+++ linux-2.6/include/asm-powerpc/elf.h
@@ -411,7 +411,7 @@ do { \
/* Keep this the last entry. */
#define R_PPC64_NUM 107
-#ifdef CONFIG_PPC_CELL
+#ifdef CONFIG_SPU_BASE
/* Notes used in ET_CORE. Note name is "SPU/<fd>/<filename>". */
#define NT_SPU 1
--
^ permalink raw reply [flat|nested] 15+ messages in thread
* [POWERPC 5/9] ps3: Missed renames of CONFIG_PS3 to CONFIG_PPC_PS3
2006-11-27 18:18 [POWERPC 0/9] cell bug fixes for 2.6.20 Arnd Bergmann
` (3 preceding siblings ...)
2006-11-27 18:18 ` [POWERPC 4/9] cell: fix building without spufs Arnd Bergmann
@ 2006-11-27 18:18 ` Arnd Bergmann
2006-11-28 0:40 ` Geoff Levand
2006-11-27 18:18 ` [POWERPC 6/9] ps3: multiplatform build fixes Arnd Bergmann
` (3 subsequent siblings)
8 siblings, 1 reply; 15+ messages in thread
From: Arnd Bergmann @ 2006-11-27 18:18 UTC (permalink / raw)
To: Paul Mackerras
Cc: Geert Uytterhoeven, linuxppc-dev, cbe-oss-dev, Arnd Bergmann
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
When renaming CONFIG_PS3 to CONFIG_PPC_PS3, a few occurrences have been
missed.
I also fixed up the alignment in arch/powerpc/platforms/Makefile.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Index: ps3-linux-src/arch/powerpc/platforms/Makefile
===================================================================
--- ps3-linux-src.orig/arch/powerpc/platforms/Makefile 2006-11-23 13:42:46.000000000 +0100
+++ ps3-linux-src/arch/powerpc/platforms/Makefile 2006-11-23 13:42:49.000000000 +0100
@@ -5,7 +5,7 @@
obj-$(CONFIG_PPC_PMAC) += powermac/
endif
endif
-obj-$(CONFIG_PPC_EFIKA) += efika/
+obj-$(CONFIG_PPC_EFIKA) += efika/
obj-$(CONFIG_PPC_CHRP) += chrp/
obj-$(CONFIG_4xx) += 4xx/
obj-$(CONFIG_PPC_83xx) += 83xx/
@@ -14,7 +14,7 @@
obj-$(CONFIG_PPC_PSERIES) += pseries/
obj-$(CONFIG_PPC_ISERIES) += iseries/
obj-$(CONFIG_PPC_MAPLE) += maple/
-obj-$(CONFIG_PPC_PASEMI) += pasemi/
+obj-$(CONFIG_PPC_PASEMI) += pasemi/
obj-$(CONFIG_PPC_CELL) += cell/
-obj-$(CONFIG_PS3) += ps3/
+obj-$(CONFIG_PPC_PS3) += ps3/
obj-$(CONFIG_EMBEDDED6xx) += embedded6xx/
Index: ps3-linux-src/drivers/Makefile
===================================================================
--- ps3-linux-src.orig/drivers/Makefile 2006-11-23 13:42:46.000000000 +0100
+++ ps3-linux-src/drivers/Makefile 2006-11-23 13:42:49.000000000 +0100
@@ -77,4 +77,4 @@
obj-$(CONFIG_SUPERH) += sh/
obj-$(CONFIG_GENERIC_TIME) += clocksource/
obj-$(CONFIG_DMA_ENGINE) += dma/
-obj-$(CONFIG_PS3) += ps3/
+obj-$(CONFIG_PPC_PS3) += ps3/
Index: ps3-linux-src/include/asm-powerpc/firmware.h
===================================================================
--- ps3-linux-src.orig/include/asm-powerpc/firmware.h 2006-11-23 10:57:53.000000000 +0100
+++ ps3-linux-src/include/asm-powerpc/firmware.h 2006-11-23 15:12:45.000000000 +0100
@@ -67,7 +67,7 @@
#ifdef CONFIG_PPC_ISERIES
FW_FEATURE_ISERIES_POSSIBLE |
#endif
-#ifdef CONFIG_PS3
+#ifdef CONFIG_PPC_PS3
FW_FEATURE_PS3_POSSIBLE |
#endif
0,
@@ -78,7 +78,7 @@
#ifdef CONFIG_PPC_ISERIES
FW_FEATURE_ISERIES_ALWAYS &
#endif
-#ifdef CONFIG_PS3
+#ifdef CONFIG_PPC_PS3
FW_FEATURE_PS3_ALWAYS &
#endif
FW_FEATURE_POSSIBLE,
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
--
^ permalink raw reply [flat|nested] 15+ messages in thread
* [POWERPC 6/9] ps3: multiplatform build fixes
2006-11-27 18:18 [POWERPC 0/9] cell bug fixes for 2.6.20 Arnd Bergmann
` (4 preceding siblings ...)
2006-11-27 18:18 ` [POWERPC 5/9] ps3: Missed renames of CONFIG_PS3 to CONFIG_PPC_PS3 Arnd Bergmann
@ 2006-11-27 18:18 ` Arnd Bergmann
2006-11-28 21:05 ` [Cbe-oss-dev] " Geoff Levand
2006-11-27 18:18 ` [POWERPC 7/9] ps3: add a default zImage target Arnd Bergmann
` (2 subsequent siblings)
8 siblings, 1 reply; 15+ messages in thread
From: Arnd Bergmann @ 2006-11-27 18:18 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, cbe-oss-dev, Arnd Bergmann
A few code paths need to check whether or not they are running
on the PS3's LV1 hypervisor before making hcalls. This introduces
a new firmware feature bit for this, FW_FEATURE_PS3_LV1.
Now when both PS3 and IBM_CELL_BLADE are enabled, but not PSERIES,
FW_FEATURE_PS3_LV1 and FW_FEATURE_LPAR get enabled at compile time,
which is a bug. The same problem can also happen for (PPC_ISERIES &&
!PPC_PSERIES && PPC_SOMETHING_ELSE). In order to solve this, I
introduce a new CONFIG_PPC_NATIVE option that is set when at least
one platform is selected that can run without a hypervisor and then
turns the firmware feature check into a run-time option.
The new cell oprofile support that was recently merged does not
work on hypervisor based platforms like the PS3, therefore make
it depend on PPC_CELL_NATIVE instead of PPC_CELL. This may change
if we get oprofile support for PS3.
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Index: linux-2.6/include/asm-powerpc/firmware.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/firmware.h
+++ linux-2.6/include/asm-powerpc/firmware.h
@@ -42,6 +42,7 @@
#define FW_FEATURE_SPLPAR ASM_CONST(0x0000000000100000)
#define FW_FEATURE_ISERIES ASM_CONST(0x0000000000200000)
#define FW_FEATURE_LPAR ASM_CONST(0x0000000000400000)
+#define FW_FEATURE_PS3_LV1 ASM_CONST(0x0000000000800000)
#ifndef __ASSEMBLY__
@@ -58,8 +59,10 @@ enum {
FW_FEATURE_PSERIES_ALWAYS = 0,
FW_FEATURE_ISERIES_POSSIBLE = FW_FEATURE_ISERIES | FW_FEATURE_LPAR,
FW_FEATURE_ISERIES_ALWAYS = FW_FEATURE_ISERIES | FW_FEATURE_LPAR,
- FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR,
- FW_FEATURE_PS3_ALWAYS = FW_FEATURE_LPAR,
+ FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
+ FW_FEATURE_PS3_ALWAYS = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1,
+ FW_FEATURE_NATIVE_POSSIBLE = 0,
+ FW_FEATURE_NATIVE_ALWAYS = 0,
FW_FEATURE_POSSIBLE =
#ifdef CONFIG_PPC_PSERIES
FW_FEATURE_PSERIES_POSSIBLE |
@@ -70,6 +73,9 @@ enum {
#ifdef CONFIG_PPC_PS3
FW_FEATURE_PS3_POSSIBLE |
#endif
+#ifdef CONFIG_PPC_NATIVE
+ FW_FEATURE_NATIVE_ALWAYS |
+#endif
0,
FW_FEATURE_ALWAYS =
#ifdef CONFIG_PPC_PSERIES
@@ -81,6 +87,9 @@ enum {
#ifdef CONFIG_PPC_PS3
FW_FEATURE_PS3_ALWAYS &
#endif
+#ifdef CONFIG_PPC_NATIVE
+ FW_FEATURE_NATIVE_ALWAYS &
+#endif
FW_FEATURE_POSSIBLE,
#else /* CONFIG_PPC64 */
Index: linux-2.6/arch/powerpc/Kconfig
===================================================================
--- linux-2.6.orig/arch/powerpc/Kconfig
+++ linux-2.6/arch/powerpc/Kconfig
@@ -390,6 +390,7 @@ config PPC_PSERIES
select PPC_RTAS
select RTAS_ERROR_LOGGING
select PPC_UDBG_16550
+ select PPC_NATIVE
default y
config PPC_ISERIES
@@ -406,6 +407,7 @@ config PPC_CHRP
select PPC_RTAS
select PPC_MPC106
select PPC_UDBG_16550
+ select PPC_NATIVE
default y
config PPC_EFIKA
@@ -414,6 +416,7 @@ config PPC_EFIKA
select PPC_RTAS
select RTAS_PROC
select PPC_MPC52xx
+ select PPC_NATIVE
default y
config PPC_PMAC
@@ -422,6 +425,7 @@ config PPC_PMAC
select MPIC
select PPC_INDIRECT_PCI if PPC32
select PPC_MPC106 if PPC32
+ select PPC_NATIVE
default y
config PPC_PMAC64
@@ -441,6 +445,7 @@ config PPC_PREP
select PPC_I8259
select PPC_INDIRECT_PCI
select PPC_UDBG_16550
+ select PPC_NATIVE
default y
config PPC_MAPLE
@@ -452,6 +457,7 @@ config PPC_MAPLE
select GENERIC_TBSYNC
select PPC_UDBG_16550
select PPC_970_NAP
+ select PPC_NATIVE
default n
help
This option enables support for the Maple 970FX Evaluation Board.
@@ -464,6 +470,7 @@ config PPC_PASEMI
select MPIC
select PPC_UDBG_16550
select GENERIC_TBSYNC
+ select PPC_NATIVE
help
This option enables support for PA Semi's PWRficient line
of SoC processors, including PA6T-1682M
@@ -478,6 +485,7 @@ config PPC_CELL_NATIVE
select PPC_DCR_MMIO
select PPC_OF_PLATFORM_PCI
select PPC_INDIRECT_IO
+ select PPC_NATIVE
select MPIC
default n
@@ -490,11 +498,6 @@ config PPC_IBM_CELL_BLADE
select PPC_UDBG_16550
select UDBG_RTAS_CONSOLE
-config UDBG_RTAS_CONSOLE
- bool "RTAS based debug console"
- depends on PPC_RTAS
- default n
-
config PPC_PS3
bool "Sony PS3"
depends on PPC_MULTIPLATFORM && PPC64
@@ -503,6 +506,19 @@ config PPC_PS3
This option enables support for the Sony PS3 game console
and other platforms using the PS3 hypervisor.
+config PPC_NATIVE
+ bool
+ depends on PPC_MULTIPLATFORM
+ help
+ Support for running natively on the hardware, i.e. without
+ a hypervisor. This option is not user-selectable but should
+ be selected by all platforms that need it.
+
+config UDBG_RTAS_CONSOLE
+ bool "RTAS based debug console"
+ depends on PPC_RTAS
+ default n
+
config XICS
depends on PPC_PSERIES
bool
Index: linux-2.6/arch/powerpc/platforms/ps3/mm.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/ps3/mm.c
+++ linux-2.6/arch/powerpc/platforms/ps3/mm.c
@@ -22,6 +22,7 @@
#include <linux/module.h>
#include <linux/memory_hotplug.h>
+#include <asm/firmware.h>
#include <asm/lmb.h>
#include <asm/udbg.h>
#include <asm/ps3.h>
@@ -293,6 +294,9 @@ static int __init ps3_mm_add_memory(void
unsigned long start_pfn;
unsigned long nr_pages;
+ if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
+ return 0;
+
BUG_ON(!mem_init_done);
start_addr = USE_LPAR_ADDR ? map.r1.base : map.rm.size;
Index: linux-2.6/arch/powerpc/platforms/ps3/setup.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/ps3/setup.c
+++ linux-2.6/arch/powerpc/platforms/ps3/setup.c
@@ -108,7 +108,7 @@ static int __init ps3_probe(void)
if (!of_flat_dt_is_compatible(dt_root, "PS3"))
return 0;
- powerpc_firmware_features |= FW_FEATURE_LPAR;
+ powerpc_firmware_features |= FW_FEATURE_PS3_POSSIBLE;
ps3_os_area_init();
ps3_mm_init();
Index: linux-2.6/drivers/ps3/system-bus.c
===================================================================
--- linux-2.6.orig/drivers/ps3/system-bus.c
+++ linux-2.6/drivers/ps3/system-bus.c
@@ -27,6 +27,7 @@
#include <asm/udbg.h>
#include <asm/ps3.h>
#include <asm/lv1call.h>
+#include <asm/firmware.h>
#define dump_mmio_region(_a) _dump_mmio_region(_a, __func__, __LINE__)
static void _dump_mmio_region(const struct ps3_mmio_region* r,
@@ -167,6 +168,9 @@ int __init ps3_system_bus_init(void)
{
int result;
+ if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
+ return 0;
+
result = bus_register(&ps3_system_bus_type);
BUG_ON(result);
return result;
Index: linux-2.6/arch/powerpc/oprofile/Makefile
===================================================================
--- linux-2.6.orig/arch/powerpc/oprofile/Makefile
+++ linux-2.6/arch/powerpc/oprofile/Makefile
@@ -11,7 +11,7 @@ DRIVER_OBJS := $(addprefix ../../../driv
timer_int.o )
oprofile-y := $(DRIVER_OBJS) common.o backtrace.o
-oprofile-$(CONFIG_PPC_CELL) += op_model_cell.o
+oprofile-$(CONFIG_PPC_CELL_NATIVE) += op_model_cell.o
oprofile-$(CONFIG_PPC64) += op_model_rs64.o op_model_power4.o
oprofile-$(CONFIG_FSL_BOOKE) += op_model_fsl_booke.o
oprofile-$(CONFIG_6xx) += op_model_7450.o
Index: linux-2.6/arch/powerpc/oprofile/common.c
===================================================================
--- linux-2.6.orig/arch/powerpc/oprofile/common.c
+++ linux-2.6/arch/powerpc/oprofile/common.c
@@ -147,7 +147,7 @@ int __init oprofile_arch_init(struct opr
switch (cur_cpu_spec->oprofile_type) {
#ifdef CONFIG_PPC64
-#ifdef CONFIG_PPC_CELL
+#ifdef CONFIG_PPC_CELL_NATIVE
case PPC_OPROFILE_CELL:
model = &op_model_cell;
break;
Index: linux-2.6/arch/powerpc/mm/Makefile
===================================================================
--- linux-2.6.orig/arch/powerpc/mm/Makefile
+++ linux-2.6/arch/powerpc/mm/Makefile
@@ -8,7 +8,7 @@ endif
obj-y := fault.o mem.o lmb.o
obj-$(CONFIG_PPC32) += init_32.o pgtable_32.o mmu_context_32.o
-hash-$(CONFIG_PPC_MULTIPLATFORM) := hash_native_64.o
+hash-$(CONFIG_PPC_NATIVE) := hash_native_64.o
obj-$(CONFIG_PPC64) += init_64.o pgtable_64.o mmu_context_64.o \
hash_utils_64.o hash_low_64.o tlb_64.o \
slb_low.o slb.o stab.o mmap.o imalloc.o \
--
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Cbe-oss-dev] [POWERPC 6/9] ps3: multiplatform build fixes
2006-11-27 18:18 ` [POWERPC 6/9] ps3: multiplatform build fixes Arnd Bergmann
@ 2006-11-28 21:05 ` Geoff Levand
0 siblings, 0 replies; 15+ messages in thread
From: Geoff Levand @ 2006-11-28 21:05 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev, cbe-oss-dev, Arnd Bergmann
Arnd Bergmann wrote:
> A few code paths need to check whether or not they are running
> on the PS3's LV1 hypervisor before making hcalls. This introduces
> a new firmware feature bit for this, FW_FEATURE_PS3_LV1.
>
> Now when both PS3 and IBM_CELL_BLADE are enabled, but not PSERIES,
> FW_FEATURE_PS3_LV1 and FW_FEATURE_LPAR get enabled at compile time,
> which is a bug. The same problem can also happen for (PPC_ISERIES &&
> !PPC_PSERIES && PPC_SOMETHING_ELSE). In order to solve this, I
> introduce a new CONFIG_PPC_NATIVE option that is set when at least
> one platform is selected that can run without a hypervisor and then
> turns the firmware feature check into a run-time option.
>
> The new cell oprofile support that was recently merged does not
> work on hypervisor based platforms like the PS3, therefore make
> it depend on PPC_CELL_NATIVE instead of PPC_CELL. This may change
> if we get oprofile support for PS3.
>
> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [POWERPC 7/9] ps3: add a default zImage target
2006-11-27 18:18 [POWERPC 0/9] cell bug fixes for 2.6.20 Arnd Bergmann
` (5 preceding siblings ...)
2006-11-27 18:18 ` [POWERPC 6/9] ps3: multiplatform build fixes Arnd Bergmann
@ 2006-11-27 18:18 ` Arnd Bergmann
2006-11-28 0:59 ` Geoff Levand
2006-11-27 18:18 ` [POWERPC 8/9] fix missing #include in sys_ppc32.c Arnd Bergmann
2006-11-27 18:19 ` [POWERPC 9/9] fix building without PCI Arnd Bergmann
8 siblings, 1 reply; 15+ messages in thread
From: Arnd Bergmann @ 2006-11-27 18:18 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, cbe-oss-dev, Arnd Bergmann
It's currently not possible to build the default zImage
target if PS3 is the only selected platform. This is
a hack to fall back to building the pseries style
zImage, so the build is successful. This will probably
change in the future, if someone writes a PS3 specific
boot wrapper.
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Index: linux-2.6/arch/powerpc/boot/Makefile
===================================================================
--- linux-2.6.orig/arch/powerpc/boot/Makefile
+++ linux-2.6/arch/powerpc/boot/Makefile
@@ -155,6 +155,7 @@ $(obj)/uImage: vmlinux $(wrapperbits)
image-$(CONFIG_PPC_PSERIES) += zImage.pseries
image-$(CONFIG_PPC_MAPLE) += zImage.pseries
image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries
+image-$(CONFIG_PPC_PS3) += zImage.pseries
image-$(CONFIG_PPC_CHRP) += zImage.chrp
image-$(CONFIG_PPC_PMAC) += zImage.pmac
image-$(CONFIG_DEFAULT_UIMAGE) += uImage
--
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [POWERPC 7/9] ps3: add a default zImage target
2006-11-27 18:18 ` [POWERPC 7/9] ps3: add a default zImage target Arnd Bergmann
@ 2006-11-28 0:59 ` Geoff Levand
0 siblings, 0 replies; 15+ messages in thread
From: Geoff Levand @ 2006-11-28 0:59 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev, cbe-oss-dev, Arnd Bergmann
Arnd Bergmann wrote:
> It's currently not possible to build the default zImage
> target if PS3 is the only selected platform. This is
> a hack to fall back to building the pseries style
> zImage, so the build is successful. This will probably
> change in the future, if someone writes a PS3 specific
> boot wrapper.
>
> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
> Index: linux-2.6/arch/powerpc/boot/Makefile
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/boot/Makefile
> +++ linux-2.6/arch/powerpc/boot/Makefile
> @@ -155,6 +155,7 @@ $(obj)/uImage: vmlinux $(wrapperbits)
> image-$(CONFIG_PPC_PSERIES) += zImage.pseries
> image-$(CONFIG_PPC_MAPLE) += zImage.pseries
> image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries
> +image-$(CONFIG_PPC_PS3) += zImage.pseries
> image-$(CONFIG_PPC_CHRP) += zImage.chrp
> image-$(CONFIG_PPC_PMAC) += zImage.pmac
> image-$(CONFIG_DEFAULT_UIMAGE) += uImage
A better solution here is to make image-$(CONFIG_PPC_PS3) a stripped
vmlinux, which the current PS3 bootloader (2.6.16 kboot) will be able
to load.
I'll set that up and send out a new patch.
I started work on that zImage bootwrapper, but I have other items I'm
tring to finish up.
-Geoff
^ permalink raw reply [flat|nested] 15+ messages in thread
* [POWERPC 8/9] fix missing #include in sys_ppc32.c
2006-11-27 18:18 [POWERPC 0/9] cell bug fixes for 2.6.20 Arnd Bergmann
` (6 preceding siblings ...)
2006-11-27 18:18 ` [POWERPC 7/9] ps3: add a default zImage target Arnd Bergmann
@ 2006-11-27 18:18 ` Arnd Bergmann
2006-11-27 18:19 ` [POWERPC 9/9] fix building without PCI Arnd Bergmann
8 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2006-11-27 18:18 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, cbe-oss-dev, Arnd Bergmann
sys_mmap is declared in asm/syscalls.h
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Index: linux-2.6/arch/powerpc/kernel/sys_ppc32.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/sys_ppc32.c
+++ linux-2.6/arch/powerpc/kernel/sys_ppc32.c
@@ -51,6 +51,7 @@
#include <asm/time.h>
#include <asm/mmu_context.h>
#include <asm/ppc-pci.h>
+#include <asm/syscalls.h>
/* readdir & getdents */
#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
--
^ permalink raw reply [flat|nested] 15+ messages in thread
* [POWERPC 9/9] fix building without PCI
2006-11-27 18:18 [POWERPC 0/9] cell bug fixes for 2.6.20 Arnd Bergmann
` (7 preceding siblings ...)
2006-11-27 18:18 ` [POWERPC 8/9] fix missing #include in sys_ppc32.c Arnd Bergmann
@ 2006-11-27 18:19 ` Arnd Bergmann
8 siblings, 0 replies; 15+ messages in thread
From: Arnd Bergmann @ 2006-11-27 18:19 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, cbe-oss-dev, Arnd Bergmann
At least the ide driver calls pcibus_to_node, which is not
defined when CONFIG_PCI is disabled. This adds a nop function
for the !PCI case.
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h
index 9fe7894..50c0140 100644
--- a/include/asm-powerpc/topology.h
+++ b/include/asm-powerpc/topology.h
@@ -32,7 +32,14 @@ static inline int node_to_first_cpu(int
int of_node_to_nid(struct device_node *device);
struct pci_bus;
+#ifdef CONFIG_PCI
extern int pcibus_to_node(struct pci_bus *bus);
+#else
+static inline int pcibus_to_node(struct pci_bus *bus)
+{
+ return -1;
+}
+#endif
#define pcibus_to_cpumask(bus) (pcibus_to_node(bus) == -1 ? \
CPU_MASK_ALL : \
--
^ permalink raw reply related [flat|nested] 15+ messages in thread