LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: Build regressions/improvements in v3.7-rc5
From: Scott Wood @ 2012-11-12 21:51 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <CAMuHMdXE0yJNivpirGgx08zqLH2086ydeOU6zswXj-+zn8OsWQ@mail.gmail.com>

On 11/12/2012 03:02:46 PM, Geert Uytterhoeven wrote:
> On Mon, Nov 12, 2012 at 9:58 PM, Geert Uytterhoeven
> <geert@linux-m68k.org> wrote:
> > JFYI, when comparing v3.7-rc5 to v3.7-rc4[3], the summaries are:
> >   - build errors: +14/-4
>=20
> 14 regressions:
>   + drivers/virt/fsl_hypervisor.c: error: 'MSR_GS' undeclared (first
> use in this function):  =3D> 799:93

These reports would be more useful if the actual .config were provided, =20
rather than just saying "powerpc randconfig".

I doubt this particular one is a regression; it looks like the =20
dependencies have always been too weak (patch sent) and you're just =20
comparing different randomly-generated configs.

> powerpc-randconfig
>=20
>   + error: relocation truncated to fit: R_PPC64_REL24 against symbol
> `._mcount' defined in .text section in arch/powerpc/kernel/entry_64.o:
> (.text+0x1ff9eb8) =3D> (.text+0x1ffa274), (.text+0x1ff7840)
>=20
> powerpc-allyesconfig

It's been over 3 years since powerpc-allyesconfig built (it's just too =20
big for the relocation model the kernel uses) -- how is this a =20
regression?

-Scott=

^ permalink raw reply

* [PATCH] drivers/virt: fix dependency on FSL booke hv management driver
From: Scott Wood @ 2012-11-12 21:50 UTC (permalink / raw)
  To: Kumar Gala; +Cc: Scott Wood, Geert Uytterhoeven, linuxppc-dev, Timur Tabi

If built on non-booke, the build will fail looking for MSR_GS as reported here:
https://lists.ozlabs.org/pipermail/linuxppc-dev/2012-November/101944.html

Signed-off-by: Scott Wood <scottwood@freescale.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Timur Tabi <timur@freescale.com>
---
Timur, I thought we were going to get rid of that MSR_GS check...

 drivers/virt/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/virt/Kconfig b/drivers/virt/Kconfig
index 2dcdbc9..db5b9e6 100644
--- a/drivers/virt/Kconfig
+++ b/drivers/virt/Kconfig
@@ -14,7 +14,7 @@ if VIRT_DRIVERS
 
 config FSL_HV_MANAGER
 	tristate "Freescale hypervisor management driver"
-	depends on FSL_SOC
+	depends on FSL_SOC_BOOKE
 	help
           The Freescale hypervisor management driver provides several services
 	  to drivers and applications related to the Freescale hypervisor:
-- 
1.7.9.5

^ permalink raw reply related

* Re: [PATCH] Centralise CONFIG_ARCH_NO_VIRT_TO_BUS
From: David Miller @ 2012-11-12 21:27 UTC (permalink / raw)
  To: sfr
  Cc: linux-arch, linux-sh, linux-kernel, sparclinux, lethal, paulus,
	bhelgaas, akpm, linuxppc-dev, hartleys
In-Reply-To: <20121113082615.2f482eb8835daf46e1f27947@canb.auug.org.au>

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 13 Nov 2012 08:26:15 +1100

> Make if easier for more architectures to select it and thus disable
> drivers that use virt_to_bus().
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* hoo boy, interrupt Handling on BGQ
From: Jimi Xenidis @ 2012-11-12 21:33 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Kumar Gala, linuxppc-dev

So interrupts need to go to FW before Linux, please let not talk about =
how silly that is.
Lets talk about something far more silly...
In order to get to the Linux exception handlers, we have to tell FW =
where the interrupt page is, and then it _copies_ it.

IFAICT, this means that each vectors on the "copied" page must:
1) construct an 64-bit absolute address to a per vector stub
2) leap at the (with bctr or blr)
3) restore CTR or LR and anything else that (1) messed up
4) normal branch to the actual vector

This is what I'll be working on, but I'd love to hear any other ideas.
-jx

^ permalink raw reply

* [PATCH] Centralise CONFIG_ARCH_NO_VIRT_TO_BUS
From: Stephen Rothwell @ 2012-11-12 21:26 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-arch, linux-sh, linux-kernel, sparclinux, Paul Mundt,
	Paul Mackerras, Bjorn Helgaas, H Hartley Sweeten, linuxppc-dev,
	David S. Miller
In-Reply-To: <CAErSpo6WG2R_8sa=rOmAOci-3iFpDs2NFzNkZYxDnD2oTiMQJg@mail.gmail.com>

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

Make if easier for more architectures to select it and thus disable
drivers that use virt_to_bus().

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/Kconfig         |    7 +++++++
 arch/powerpc/Kconfig |    4 +---
 arch/sh/Kconfig      |    4 +---
 arch/sparc/Kconfig   |    4 +---
 4 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 366ec06..9bc00e7 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -271,6 +271,13 @@ config ARCH_WANT_OLD_COMPAT_IPC
 	select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
 	bool
 
+config ARCH_NO_VIRT_TO_BUS
+	bool
+	help
+	  An architecture should select this if it cannot (or will not)
+	  implement virt_to_bus().  All new architectures should probably
+	  select this.
+
 config GENERIC_KERNEL_THREAD
 	bool
 
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a902a5c..8c8fcba 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -87,9 +87,6 @@ config GENERIC_GPIO
 	help
 	  Generic GPIO API support
 
-config ARCH_NO_VIRT_TO_BUS
-	def_bool PPC64
-
 config PPC
 	bool
 	default y
@@ -101,6 +98,7 @@ config PPC
 	select HAVE_FUNCTION_GRAPH_TRACER
 	select SYSCTL_EXCEPTION_TRACE
 	select ARCH_WANT_OPTIONAL_GPIOLIB
+	select ARCH_NO_VIRT_TO_BUS if PPC64
 	select HAVE_IDE
 	select HAVE_IOREMAP_PROT
 	select HAVE_EFFICIENT_UNALIGNED_ACCESS
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index babc2b8..9b28793 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -16,6 +16,7 @@ config SUPERH
 	select HAVE_DEBUG_BUGVERBOSE
 	select ARCH_HAVE_CUSTOM_GPIO_H
 	select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A)
+	select ARCH_NO_VIRT_TO_BUS
 	select PERF_USE_VMALLOC
 	select HAVE_DEBUG_KMEMLEAK
 	select HAVE_KERNEL_GZIP
@@ -150,9 +151,6 @@ config ARCH_HAS_ILOG2_U32
 config ARCH_HAS_ILOG2_U64
 	def_bool n
 
-config ARCH_NO_VIRT_TO_BUS
-	def_bool y
-
 config ARCH_HAS_DEFAULT_IDLE
 	def_bool y
 
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 9f2edb5..594d9bc 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -21,6 +21,7 @@ config SPARC
 	select SYSCTL_EXCEPTION_TRACE
 	select ARCH_WANT_OPTIONAL_GPIOLIB
 	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
+	select ARCH_NO_VIRT_TO_BUS
 	select RTC_CLASS
 	select RTC_DRV_M48T59
 	select HAVE_IRQ_WORK
@@ -143,9 +144,6 @@ config GENERIC_GPIO
 	help
 	  Generic GPIO API support
 
-config ARCH_NO_VIRT_TO_BUS
-	def_bool y
-
 config ARCH_SUPPORTS_DEBUG_PAGEALLOC
 	def_bool y if SPARC64
 
-- 
1.7.10.280.gaa39

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

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

^ permalink raw reply related

* Re: Build regressions/improvements in v3.7-rc5
From: Geert Uytterhoeven @ 2012-11-12 21:02 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, ceph-devel, linuxppc-dev
In-Reply-To: <1352753886-3402-1-git-send-email-geert@linux-m68k.org>

On Mon, Nov 12, 2012 at 9:58 PM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> JFYI, when comparing v3.7-rc5 to v3.7-rc4[3], the summaries are:
>   - build errors: +14/-4

14 regressions:
  + drivers/virt/fsl_hypervisor.c: error: 'MSR_GS' undeclared (first
use in this function):  => 799:93
  + error: No rule to make target drivers/scsi/aic7xxx/aicasm/*.[chyl]:  => N/A
  + net/ceph/ceph_common.c: error: dereferencing pointer to incomplete
type:  => 272:13
  + net/ceph/ceph_common.c: error: implicit declaration of function
'request_key' [-Werror=implicit-function-declaration]:  => 249:2
  + net/ceph/crypto.c: error: dereferencing pointer to incomplete
type:  => 463:19, 434:46, 452:5, 448:52, 429:23, 467:36, 447:18
  + net/ceph/crypto.c: error: implicit declaration of function
'key_payload_reserve' [-Werror=implicit-function-declaration]:  =>
437:2
  + net/ceph/crypto.c: error: implicit declaration of function
'register_key_type' [-Werror=implicit-function-declaration]:  => 481:2
  + net/ceph/crypto.c: error: implicit declaration of function
'unregister_key_type' [-Werror=implicit-function-declaration]:  =>
485:2
  + net/ceph/crypto.c: error: unknown field 'destroy' specified in
initializer:  => 477:2
  + net/ceph/crypto.c: error: unknown field 'instantiate' specified in
initializer:  => 475:2
  + net/ceph/crypto.c: error: unknown field 'match' specified in
initializer:  => 476:2
  + net/ceph/crypto.c: error: unknown field 'name' specified in
initializer:  => 474:2
  + net/ceph/crypto.c: error: variable 'key_type_ceph' has initializer
but incomplete type:  => 473:8

powerpc-randconfig

  + error: relocation truncated to fit: R_PPC64_REL24 against symbol
`._mcount' defined in .text section in arch/powerpc/kernel/entry_64.o:
(.text+0x1ff9eb8) => (.text+0x1ffa274), (.text+0x1ff7840)

powerpc-allyesconfig

> [1] http://kisskb.ellerman.id.au/kisskb/head/5614/ (all 117 configs)
> [3] http://kisskb.ellerman.id.au/kisskb/head/5600/ (all 117 configs)

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply

* [PATCH] powerpc: change free_bootmem() to kfree()
From: Joonsoo Kim @ 2012-11-12 16:40 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, linux-kernel, Joonsoo Kim

commit ea96025a('Don't use alloc_bootmem() in init_IRQ() path')
changed alloc_bootmem() to kzalloc(),
but missed to change free_bootmem() to kfree().
So correct it.

Signed-off-by: Joonsoo Kim <js1304@gmail.com>

diff --git a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
index 328d221..74861a7 100644
--- a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
+++ b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
@@ -16,7 +16,6 @@
 #include <linux/spinlock.h>
 #include <linux/irq.h>
 #include <linux/types.h>
-#include <linux/bootmem.h>
 #include <linux/slab.h>
 
 #include <asm/io.h>
@@ -149,7 +148,7 @@ int __init pq2ads_pci_init_irq(void)
 	priv->regs = of_iomap(np, 0);
 	if (!priv->regs) {
 		printk(KERN_ERR "Cannot map PCI PIC registers.\n");
-		goto out_free_bootmem;
+		goto out_free_kmalloc;
 	}
 
 	/* mask all PCI interrupts */
@@ -171,9 +170,8 @@ int __init pq2ads_pci_init_irq(void)
 
 out_unmap_regs:
 	iounmap(priv->regs);
-out_free_bootmem:
-	free_bootmem((unsigned long)priv,
-	             sizeof(struct pq2ads_pci_pic));
+out_free_kmalloc:
+	kfree(priv);
 	of_node_put(np);
 out_unmap_irq:
 	irq_dispose_mapping(irq);
-- 
1.7.9.5

^ permalink raw reply related

* [PATCH] powerpc: Fix CONFIG_RELOCATABLE=y CONFIG_CRASH_DUMP=n build
From: Anton Blanchard @ 2012-11-12  5:01 UTC (permalink / raw)
  To: benh, paulus; +Cc: linuxppc-dev


If we build a kernel with CONFIG_RELOCATABLE=y CONFIG_CRASH_DUMP=n,
the kernel fails when we run at a non zero offset. It turns out
we were incorrectly wrapping some of the relocatable kernel code
with CONFIG_CRASH_DUMP.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org>
---

Index: b/arch/powerpc/kernel/head_64.S
===================================================================
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -422,7 +422,7 @@ _STATIC(__after_prom_start)
 	tovirt(r6,r6)			/* on booke, we already run at PAGE_OFFSET */
 #endif
 
-#ifdef CONFIG_CRASH_DUMP
+#ifdef CONFIG_RELOCATABLE
 /*
  * Check if the kernel has to be running as relocatable kernel based on the
  * variable __run_at_load, if it is set the kernel is treated as relocatable

^ permalink raw reply

* Re: [PATCH 09/14] powerpc: Setup relocation on exceptions for bare metal systems
From: Michael Neuling @ 2012-11-12  2:08 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: linuxppc-dev, Ian Munsie, Matt Evans
In-Reply-To: <B2250515-36A9-4826-B50B-49298A28FB39@kernel.crashing.org>

Segher Boessenkool <segher@kernel.crashing.org> wrote:

> > --- a/arch/powerpc/include/asm/reg.h
> > +++ b/arch/powerpc/include/asm/reg.h
> > @@ -249,6 +249,8 @@
> >  #define   LPCR_RMLS    0x1C000000      /* impl dependent rmo limit sel */
> >  #define	  LPCR_RMLS_SH	(63-37)
> >  #define   LPCR_ILE     0x02000000      /* !HV irqs set MSR:LE */
> > +#define   LPCR_AIL_0	0x00000000	/* MMU off IRQ location 0x0 */
> > +#define   LPCR_AIL_3	0x01800000	/* MMU on IRQ location 0xc00...4xxx */
> 
> s/IRQ location/exception offset/ ?

Sure, updated.

> 
> > --- a/arch/powerpc/kernel/cpu_setup_power.S
> > +++ b/arch/powerpc/kernel/cpu_setup_power.S
> > @@ -54,6 +54,7 @@ _GLOBAL(__setup_cpu_power8)
> >  	li	r0,0
> >  	mtspr	SPRN_LPID,r0
> >  	mfspr	r3,SPRN_LPCR
> > +	oris	r3, r3, LPCR_AIL_3@h
> 
> Is the AIL field only two bits?  If not, you probably want to clear
> the other bits.

Yes it only 2 bits.

> This series looks really nice btw :-)

Cheers,
Mikey

^ permalink raw reply

* Re: [PATCH 09/14] powerpc: Setup relocation on exceptions for bare metal systems
From: Segher Boessenkool @ 2012-11-12  1:32 UTC (permalink / raw)
  To: Michael Neuling; +Cc: linuxppc-dev, Ian Munsie, Matt Evans
In-Reply-To: <1352441953-29096-10-git-send-email-mikey@neuling.org>

> --- a/arch/powerpc/include/asm/reg.h
> +++ b/arch/powerpc/include/asm/reg.h
> @@ -249,6 +249,8 @@
>  #define   LPCR_RMLS    0x1C000000      /* impl dependent rmo limit  
> sel */
>  #define	  LPCR_RMLS_SH	(63-37)
>  #define   LPCR_ILE     0x02000000      /* !HV irqs set MSR:LE */
> +#define   LPCR_AIL_0	0x00000000	/* MMU off IRQ location 0x0 */
> +#define   LPCR_AIL_3	0x01800000	/* MMU on IRQ location  
> 0xc00...4xxx */

s/IRQ location/exception offset/ ?

> --- a/arch/powerpc/kernel/cpu_setup_power.S
> +++ b/arch/powerpc/kernel/cpu_setup_power.S
> @@ -54,6 +54,7 @@ _GLOBAL(__setup_cpu_power8)
>  	li	r0,0
>  	mtspr	SPRN_LPID,r0
>  	mfspr	r3,SPRN_LPCR
> +	oris	r3, r3, LPCR_AIL_3@h

Is the AIL field only two bits?  If not, you probably want to clear
the other bits.

This series looks really nice btw :-)


Segher

^ permalink raw reply

* Re: Build regressions/improvements in v3.7-rc4
From: Geert Uytterhoeven @ 2012-11-11 10:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: sparclinux, the arch/x86 maintainers, linuxppc-dev
In-Reply-To: <1352627709-12732-1-git-send-email-geert@linux-m68k.org>

On Sun, Nov 11, 2012 at 10:55 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> JFYI, when comparing v3.7-rc4 to v3.7-rc3[3], the summaries are:
>   - build errors: +4/-235

  + error: No rule to make target include/config/auto.conf:  => N/A

x86_64-randconfig

  + error: phy_n.c: relocation truncated to fit: R_PPC64_REL24 against
symbol `._mcount' defined in .text section in
arch/powerpc/kernel/entry_64.o: (.text+0x1ff96e8) =>
(.text+0x1ff8348), (.text+0x1ff7c54), (.text+0x1ff96fc),
(.text+0x1ff8048), (.text+0x1ff90b4)
  + error: phy_n.c: relocation truncated to fit: R_PPC64_REL24 against
symbol `_restgpr0_21' defined in .text.save.restore section in
arch/powerpc/lib/built-in.o:  => (.text+0x1ff9e80)
  + error: relocation truncated to fit: R_PPC64_REL24 against symbol
`.memset' defined in .text section in arch/powerpc/lib/built-in.o:  =>
(.text+0x1ffa004)

powerpc-allyesconfig

>   - build warnings: +2027/-170

Scary, but the majority (+1987) turn out to be those pesky sparc-allmodconfig
"__mcount_loc already exists" warnings. Can they please be fixed?

> As I haven't mastered kup yet, there's no verbose summary at
> http://www.kernel.org/pub/linux/kernel/people/geert/linux-log/v3.7-rc4.summary.gz
>
> Happy fixing! ;-)
>
> Thanks to the linux-next team for providing the build service.
>
> [1] http://kisskb.ellerman.id.au/kisskb/head/5600/ (all 117 configs)
> [3] http://kisskb.ellerman.id.au/kisskb/head/5580/ (all 117 configs)

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply

* Re: [PATCH] of/fdt: Don't copy garbage after "/" in root node path
From: Rob Herring @ 2012-11-11  3:54 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: devicetree-discuss, linuxppc-dev
In-Reply-To: <1350865950.2476.145.camel@pasglop>

On 10/21/2012 07:32 PM, Benjamin Herrenschmidt wrote:
> The root node path must be internally converted to "/", or various
> pieces of code looking for it that way will fail. The code to do
> that however had a bug where we might incorrectly append pieces
> of the original path from the fdt to the "/".
> 
> We should probably add a proper dedicated accessor for the root node
> but in the meantime this patch should fix it.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Applied. Thanks.

Rob

> ---
>  drivers/of/fdt.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 91a375f..c2b08dc 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -186,6 +186,7 @@ static unsigned long unflatten_dt_node(struct boot_param_header *blob,
>  			 */
>  			fpsize = 1;
>  			allocl = 2;
> +			l = 0;
>  		} else {
>  			/* account for '/' and path size minus terminal 0
>  			 * already in 'l'
> 
> 
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
> 

^ permalink raw reply

* [PATCH] wanrouter: Remove it and the drivers that depend on it
From: Joe Perches @ 2012-11-10 14:20 UTC (permalink / raw)
  To: Rob Landley, Harry Wei, Jeff Dike, Richard Weinberger,
	David S. Miller
  Cc: Chris Zankel, Karsten Keil, Russell King, user-mode-linux-user,
	user-mode-linux-devel, linux-doc, linux-xtensa, linux-mips,
	linux-kernel, Ralf Baechle, Max Filippov, Paul Mackerras,
	linux-kernel, netdev, xiyoulinuxkernelgroup, linuxppc-dev,
	linux-arm-kernel

Remove wanrouter as it's obsolete and has not been updated
by sangoma since 2.4.3 or so and it's not used anymore.

Remove obsolete cyclomx drivers.
Update defconfig files that enable wanrouter.
Update files that include now deleted wanrouter bits.

Signed-off-by: Joe Perches <joe@perches.com>
---
 Documentation/ioctl/ioctl-number.txt           |    1 -
 Documentation/magic-number.txt                 |    1 -
 Documentation/zh_CN/magic-number.txt           |    1 -
 arch/arm/configs/ixp4xx_defconfig              |    2 -
 arch/mips/configs/gpr_defconfig                |    3 -
 arch/mips/configs/mtx1_defconfig               |    3 -
 arch/mips/configs/nlm_xlp_defconfig            |    1 -
 arch/mips/configs/nlm_xlr_defconfig            |    1 -
 arch/powerpc/configs/86xx/gef_sbc610_defconfig |    1 -
 arch/powerpc/configs/86xx/sbc8641d_defconfig   |    1 -
 arch/powerpc/configs/ppc6xx_defconfig          |    1 -
 arch/um/defconfig                              |    1 -
 arch/xtensa/configs/common_defconfig           |    1 -
 arch/xtensa/configs/iss_defconfig              |    1 -
 arch/xtensa/configs/s6105_defconfig            |    1 -
 drivers/isdn/i4l/isdn_x25iface.c               |    1 -
 drivers/isdn/i4l/isdn_x25iface.h               |    1 -
 drivers/net/wan/Kconfig                        |   54 -
 drivers/net/wan/Makefile                       |    5 -
 drivers/net/wan/cycx_drv.c                     |  569 ---------
 drivers/net/wan/cycx_main.c                    |  346 -----
 drivers/net/wan/cycx_x25.c                     | 1602 ------------------------
 include/linux/cyclomx.h                        |   77 --
 include/linux/cycx_drv.h                       |   64 -
 include/linux/wanrouter.h                      |  129 --
 include/uapi/linux/Kbuild                      |    1 -
 include/uapi/linux/wanrouter.h                 |  452 -------
 net/Kconfig                                    |    1 -
 net/Makefile                                   |    1 -
 net/socket.c                                   |    1 -
 net/wanrouter/Kconfig                          |   27 -
 net/wanrouter/Makefile                         |    7 -
 net/wanrouter/patchlevel                       |    1 -
 net/wanrouter/wanmain.c                        |  782 ------------
 net/wanrouter/wanproc.c                        |  380 ------
 35 files changed, 0 insertions(+), 4521 deletions(-)
 delete mode 100644 drivers/net/wan/cycx_drv.c
 delete mode 100644 drivers/net/wan/cycx_main.c
 delete mode 100644 drivers/net/wan/cycx_x25.c
 delete mode 100644 include/linux/cyclomx.h
 delete mode 100644 include/linux/cycx_drv.h
 delete mode 100644 include/linux/wanrouter.h
 delete mode 100644 include/uapi/linux/wanrouter.h
 delete mode 100644 net/wanrouter/Kconfig
 delete mode 100644 net/wanrouter/Makefile
 delete mode 100644 net/wanrouter/patchlevel
 delete mode 100644 net/wanrouter/wanmain.c
 delete mode 100644 net/wanrouter/wanproc.c

diff --git a/Documentation/ioctl/ioctl-number.txt b/Documentation/ioctl/ioctl-number.txt
index 2152b0e..028a034 100644
--- a/Documentation/ioctl/ioctl-number.txt
+++ b/Documentation/ioctl/ioctl-number.txt
@@ -179,7 +179,6 @@ Code  Seq#(hex)	Include File		Comments
 'V'	C0	media/davinci/vpfe_capture.h	conflict!
 'V'	C0	media/si4713.h		conflict!
 'W'	00-1F	linux/watchdog.h	conflict!
-'W'	00-1F	linux/wanrouter.h	conflict!
 'W'	00-3F	sound/asound.h		conflict!
 'X'	all	fs/xfs/xfs_fs.h		conflict!
 		and fs/xfs/linux-2.6/xfs_ioctl32.h
diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt
index 82761a3..0c39e72 100644
--- a/Documentation/magic-number.txt
+++ b/Documentation/magic-number.txt
@@ -122,7 +122,6 @@ SLAB_C_MAGIC          0x4f17a36d  kmem_cache        mm/slab.c
 COW_MAGIC             0x4f4f4f4d  cow_header_v1     arch/um/drivers/ubd_user.c
 I810_CARD_MAGIC       0x5072696E  i810_card         sound/oss/i810_audio.c
 TRIDENT_CARD_MAGIC    0x5072696E  trident_card      sound/oss/trident.c
-ROUTER_MAGIC          0x524d4157  wan_device        include/linux/wanrouter.h
 SCC_MAGIC             0x52696368  gs_port           drivers/char/scc.h
 SAVEKMSG_MAGIC1       0x53415645  savekmsg          arch/*/amiga/config.c
 GDA_MAGIC             0x58464552  gda               arch/mips/include/asm/sn/gda.h
diff --git a/Documentation/zh_CN/magic-number.txt b/Documentation/zh_CN/magic-number.txt
index 4263022..51b7e15 100644
--- a/Documentation/zh_CN/magic-number.txt
+++ b/Documentation/zh_CN/magic-number.txt
@@ -122,7 +122,6 @@ SLAB_C_MAGIC          0x4f17a36d  kmem_cache        mm/slab.c
 COW_MAGIC             0x4f4f4f4d  cow_header_v1     arch/um/drivers/ubd_user.c
 I810_CARD_MAGIC       0x5072696E  i810_card         sound/oss/i810_audio.c
 TRIDENT_CARD_MAGIC    0x5072696E  trident_card      sound/oss/trident.c
-ROUTER_MAGIC          0x524d4157  wan_device        include/linux/wanrouter.h
 SCC_MAGIC             0x52696368  gs_port           drivers/char/scc.h
 SAVEKMSG_MAGIC1       0x53415645  savekmsg          arch/*/amiga/config.c
 GDA_MAGIC             0x58464552  gda               arch/mips/include/asm/sn/gda.h
diff --git a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig
index 063e2ab..572f712 100644
--- a/arch/arm/configs/ixp4xx_defconfig
+++ b/arch/arm/configs/ixp4xx_defconfig
@@ -91,7 +91,6 @@ CONFIG_LAPB=m
 CONFIG_ECONET=m
 CONFIG_ECONET_AUNUDP=y
 CONFIG_ECONET_NATIVE=y
-CONFIG_WAN_ROUTER=m
 CONFIG_NET_SCHED=y
 CONFIG_NET_SCH_CBQ=m
 CONFIG_NET_SCH_HTB=m
@@ -152,7 +151,6 @@ CONFIG_HDLC_FR=m
 CONFIG_HDLC_PPP=m
 CONFIG_HDLC_X25=m
 CONFIG_DLCI=m
-CONFIG_WAN_ROUTER_DRIVERS=m
 CONFIG_ATM_TCP=m
 # CONFIG_INPUT_KEYBOARD is not set
 # CONFIG_INPUT_MOUSE is not set
diff --git a/arch/mips/configs/gpr_defconfig b/arch/mips/configs/gpr_defconfig
index 48a40ae..0e7ccf2 100644
--- a/arch/mips/configs/gpr_defconfig
+++ b/arch/mips/configs/gpr_defconfig
@@ -119,7 +119,6 @@ CONFIG_LAPB=m
 CONFIG_ECONET=m
 CONFIG_ECONET_AUNUDP=y
 CONFIG_ECONET_NATIVE=y
-CONFIG_WAN_ROUTER=m
 CONFIG_NET_SCHED=y
 CONFIG_NET_SCH_CBQ=m
 CONFIG_NET_SCH_HTB=m
@@ -222,8 +221,6 @@ CONFIG_DSCC4=m
 CONFIG_DSCC4_PCISYNC=y
 CONFIG_DSCC4_PCI_RST=y
 CONFIG_DLCI=m
-CONFIG_WAN_ROUTER_DRIVERS=m
-CONFIG_CYCLADES_SYNC=m
 CONFIG_CYCLOMX_X25=y
 CONFIG_LAPBETHER=m
 CONFIG_X25_ASY=m
diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defconfig
index 46c61edc..d0b1195 100644
--- a/arch/mips/configs/mtx1_defconfig
+++ b/arch/mips/configs/mtx1_defconfig
@@ -157,7 +157,6 @@ CONFIG_LAPB=m
 CONFIG_ECONET=m
 CONFIG_ECONET_AUNUDP=y
 CONFIG_ECONET_NATIVE=y
-CONFIG_WAN_ROUTER=m
 CONFIG_NET_SCHED=y
 CONFIG_NET_SCH_CBQ=m
 CONFIG_NET_SCH_HTB=m
@@ -389,8 +388,6 @@ CONFIG_DSCC4=m
 CONFIG_DSCC4_PCISYNC=y
 CONFIG_DSCC4_PCI_RST=y
 CONFIG_DLCI=m
-CONFIG_WAN_ROUTER_DRIVERS=m
-CONFIG_CYCLADES_SYNC=m
 CONFIG_CYCLOMX_X25=y
 CONFIG_LAPBETHER=m
 CONFIG_X25_ASY=m
diff --git a/arch/mips/configs/nlm_xlp_defconfig b/arch/mips/configs/nlm_xlp_defconfig
index 5468b1c..9c458e1 100644
--- a/arch/mips/configs/nlm_xlp_defconfig
+++ b/arch/mips/configs/nlm_xlp_defconfig
@@ -265,7 +265,6 @@ CONFIG_IPDDP_ENCAP=y
 CONFIG_IPDDP_DECAP=y
 CONFIG_X25=m
 CONFIG_LAPB=m
-CONFIG_WAN_ROUTER=m
 CONFIG_PHONET=m
 CONFIG_IEEE802154=m
 CONFIG_NET_SCHED=y
diff --git a/arch/mips/configs/nlm_xlr_defconfig b/arch/mips/configs/nlm_xlr_defconfig
index 44b4734..abf006e 100644
--- a/arch/mips/configs/nlm_xlr_defconfig
+++ b/arch/mips/configs/nlm_xlr_defconfig
@@ -251,7 +251,6 @@ CONFIG_LAPB=m
 CONFIG_ECONET=m
 CONFIG_ECONET_AUNUDP=y
 CONFIG_ECONET_NATIVE=y
-CONFIG_WAN_ROUTER=m
 CONFIG_PHONET=m
 CONFIG_IEEE802154=m
 CONFIG_NET_SCHED=y
diff --git a/arch/powerpc/configs/86xx/gef_sbc610_defconfig b/arch/powerpc/configs/86xx/gef_sbc610_defconfig
index af2e8e1..6c21c8c 100644
--- a/arch/powerpc/configs/86xx/gef_sbc610_defconfig
+++ b/arch/powerpc/configs/86xx/gef_sbc610_defconfig
@@ -99,7 +99,6 @@ CONFIG_ATM_MPOA=m
 CONFIG_ATM_BR2684=m
 CONFIG_BRIDGE=m
 CONFIG_VLAN_8021Q=m
-CONFIG_WAN_ROUTER=m
 CONFIG_NET_SCHED=y
 CONFIG_NET_SCH_CBQ=m
 CONFIG_NET_SCH_HTB=m
diff --git a/arch/powerpc/configs/86xx/sbc8641d_defconfig b/arch/powerpc/configs/86xx/sbc8641d_defconfig
index 0a92ca0..d1082fb 100644
--- a/arch/powerpc/configs/86xx/sbc8641d_defconfig
+++ b/arch/powerpc/configs/86xx/sbc8641d_defconfig
@@ -96,7 +96,6 @@ CONFIG_ATM_MPOA=m
 CONFIG_ATM_BR2684=m
 CONFIG_BRIDGE=m
 CONFIG_VLAN_8021Q=m
-CONFIG_WAN_ROUTER=m
 CONFIG_NET_SCHED=y
 CONFIG_NET_SCH_CBQ=m
 CONFIG_NET_SCH_HTB=m
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig
index be1cb6e..dc27658 100644
--- a/arch/powerpc/configs/ppc6xx_defconfig
+++ b/arch/powerpc/configs/ppc6xx_defconfig
@@ -285,7 +285,6 @@ CONFIG_DEV_APPLETALK=m
 CONFIG_IPDDP=m
 CONFIG_IPDDP_ENCAP=y
 CONFIG_IPDDP_DECAP=y
-CONFIG_WAN_ROUTER=m
 CONFIG_NET_SCHED=y
 CONFIG_NET_SCH_CBQ=m
 CONFIG_NET_SCH_HTB=m
diff --git a/arch/um/defconfig b/arch/um/defconfig
index 08107a7..cd7aacd 100644
--- a/arch/um/defconfig
+++ b/arch/um/defconfig
@@ -526,7 +526,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
 # CONFIG_PHONET is not set
 # CONFIG_IEEE802154 is not set
 # CONFIG_NET_SCHED is not set
diff --git a/arch/xtensa/configs/common_defconfig b/arch/xtensa/configs/common_defconfig
index a182a4e..47c6df7 100644
--- a/arch/xtensa/configs/common_defconfig
+++ b/arch/xtensa/configs/common_defconfig
@@ -240,7 +240,6 @@ CONFIG_IP_PNP_RARP=y
 # CONFIG_LAPB is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
 
 #
 # QoS and/or fair queueing
diff --git a/arch/xtensa/configs/iss_defconfig b/arch/xtensa/configs/iss_defconfig
index ddab37b..89003ab 100644
--- a/arch/xtensa/configs/iss_defconfig
+++ b/arch/xtensa/configs/iss_defconfig
@@ -249,7 +249,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
 # CONFIG_PHONET is not set
 # CONFIG_IEEE802154 is not set
 # CONFIG_NET_SCHED is not set
diff --git a/arch/xtensa/configs/s6105_defconfig b/arch/xtensa/configs/s6105_defconfig
index eaf1b8f..456254b 100644
--- a/arch/xtensa/configs/s6105_defconfig
+++ b/arch/xtensa/configs/s6105_defconfig
@@ -203,7 +203,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
 # CONFIG_NET_SCHED is not set
 # CONFIG_DCB is not set
 
diff --git a/drivers/isdn/i4l/isdn_x25iface.c b/drivers/isdn/i4l/isdn_x25iface.c
index e2d4e58..d00c86d 100644
--- a/drivers/isdn/i4l/isdn_x25iface.c
+++ b/drivers/isdn/i4l/isdn_x25iface.c
@@ -21,7 +21,6 @@
 #include <linux/netdevice.h>
 #include <linux/concap.h>
 #include <linux/slab.h>
-#include <linux/wanrouter.h>
 #include <net/x25device.h>
 #include "isdn_x25iface.h"
 
diff --git a/drivers/isdn/i4l/isdn_x25iface.h b/drivers/isdn/i4l/isdn_x25iface.h
index 0b26e3b..ca08e08 100644
--- a/drivers/isdn/i4l/isdn_x25iface.h
+++ b/drivers/isdn/i4l/isdn_x25iface.h
@@ -19,7 +19,6 @@
 #endif
 
 #include <linux/skbuff.h>
-#include <linux/wanrouter.h>
 #include <linux/isdn.h>
 #include <linux/concap.h>
 
diff --git a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig
index d58431e..0c077b0 100644
--- a/drivers/net/wan/Kconfig
+++ b/drivers/net/wan/Kconfig
@@ -356,60 +356,6 @@ config SDLA
 	  To compile this driver as a module, choose M here: the
 	  module will be called sdla.
 
-# Wan router core.
-config WAN_ROUTER_DRIVERS
-	tristate "WAN router drivers"
-	depends on WAN_ROUTER
-	---help---
-	  Connect LAN to WAN via Linux box.
-
-	  Select driver your card and remember to say Y to "Wan Router."
-	  You will need the wan-tools package which is available from
-	  <ftp://ftp.sangoma.com/>.
-
-	  Note that the answer to this question won't directly affect the
-	  kernel except for how subordinate drivers may be built:
-	  saying N will just cause the configurator to skip all
-	  the questions about WAN router drivers.
-
-	  If unsure, say N.
-
-config CYCLADES_SYNC
-	tristate "Cyclom 2X(tm) cards (EXPERIMENTAL)"
-	depends on WAN_ROUTER_DRIVERS && (PCI || ISA)
-	---help---
-	  Cyclom 2X from Cyclades Corporation <http://www.avocent.com/> is an
-	  intelligent multiprotocol WAN adapter with data transfer rates up to
-	  512 Kbps. These cards support the X.25 and SNA related protocols.
-
-	  While no documentation is available at this time please grab the
-	  wanconfig tarball in
-	  <http://www.conectiva.com.br/~acme/cycsyn-devel/> (with minor changes
-	  to make it compile with the current wanrouter include files; efforts
-	  are being made to use the original package available at
-	  <ftp://ftp.sangoma.com/>).
-
-	  Feel free to contact me or the cycsyn-devel mailing list at
-	  <acme@conectiva.com.br> and <cycsyn-devel@bazar.conectiva.com.br> for
-	  additional details, I hope to have documentation available as soon as
-	  possible. (Cyclades Brazil is writing the Documentation).
-
-	  The next questions will ask you about the protocols you want the
-	  driver to support (for now only X.25 is supported).
-
-	  If you have one or more of these cards, say Y to this option.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called cyclomx.
-
-config CYCLOMX_X25
-	bool "Cyclom 2X X.25 support (EXPERIMENTAL)"
-	depends on CYCLADES_SYNC
-	help
-	  Connect a Cyclom 2X card to an X.25 network.
-
-	  Enabling X.25 support will enlarge your kernel by about 11 kB.
-
 # X.25 network drivers
 config LAPBETHER
 	tristate "LAPB over Ethernet driver (EXPERIMENTAL)"
diff --git a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile
index eac709b..9055dd9 100644
--- a/drivers/net/wan/Makefile
+++ b/drivers/net/wan/Makefile
@@ -5,10 +5,6 @@
 # Rewritten to use lists instead of if-statements.
 #
 
-cyclomx-y                       := cycx_main.o
-cyclomx-$(CONFIG_CYCLOMX_X25)	+= cycx_x25.o
-cyclomx-objs			:= $(cyclomx-y)  
-
 obj-$(CONFIG_HDLC)		+= hdlc.o
 obj-$(CONFIG_HDLC_RAW)		+= hdlc_raw.o
 obj-$(CONFIG_HDLC_RAW_ETH)	+= hdlc_raw_eth.o
@@ -28,7 +24,6 @@ obj-$(CONFIG_LANMEDIA)		+= lmc/
 
 obj-$(CONFIG_DLCI)		+= dlci.o 
 obj-$(CONFIG_SDLA)		+= sdla.o
-obj-$(CONFIG_CYCLADES_SYNC)	+= cycx_drv.o cyclomx.o
 obj-$(CONFIG_LAPBETHER)		+= lapbether.o
 obj-$(CONFIG_SBNI)		+= sbni.o
 obj-$(CONFIG_N2)		+= n2.o
diff --git a/drivers/net/wan/cycx_drv.c b/drivers/net/wan/cycx_drv.c
deleted file mode 100644
index 2a3ecae..0000000
diff --git a/drivers/net/wan/cycx_main.c b/drivers/net/wan/cycx_main.c
deleted file mode 100644
index 81fbbad..0000000
diff --git a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c
deleted file mode 100644
index 06f3f63..0000000
diff --git a/include/linux/cyclomx.h b/include/linux/cyclomx.h
deleted file mode 100644
index b88f7f4..0000000
diff --git a/include/linux/cycx_drv.h b/include/linux/cycx_drv.h
deleted file mode 100644
index 12fe6b0..0000000
diff --git a/include/linux/wanrouter.h b/include/linux/wanrouter.h
deleted file mode 100644
index cec4b41..0000000
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index e194387..c54b7e7 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -408,7 +408,6 @@ header-y += virtio_ring.h
 header-y += virtio_rng.h
 header-y += vt.h
 header-y += wait.h
-header-y += wanrouter.h
 header-y += watchdog.h
 header-y += wimax.h
 header-y += wireless.h
diff --git a/include/uapi/linux/wanrouter.h b/include/uapi/linux/wanrouter.h
deleted file mode 100644
index 7617df2..0000000
diff --git a/net/Kconfig b/net/Kconfig
index 30b48f5..4cf4bb5 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -209,7 +209,6 @@ source "net/ipx/Kconfig"
 source "drivers/net/appletalk/Kconfig"
 source "net/x25/Kconfig"
 source "net/lapb/Kconfig"
-source "net/wanrouter/Kconfig"
 source "net/phonet/Kconfig"
 source "net/ieee802154/Kconfig"
 source "net/mac802154/Kconfig"
diff --git a/net/Makefile b/net/Makefile
index 4f4ee08..c5aa8b3 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -26,7 +26,6 @@ obj-$(CONFIG_BRIDGE)		+= bridge/
 obj-$(CONFIG_NET_DSA)		+= dsa/
 obj-$(CONFIG_IPX)		+= ipx/
 obj-$(CONFIG_ATALK)		+= appletalk/
-obj-$(CONFIG_WAN_ROUTER)	+= wanrouter/
 obj-$(CONFIG_X25)		+= x25/
 obj-$(CONFIG_LAPB)		+= lapb/
 obj-$(CONFIG_NETROM)		+= netrom/
diff --git a/net/socket.c b/net/socket.c
index 2ca51c7..5c4d82c 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -69,7 +69,6 @@
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/mutex.h>
-#include <linux/wanrouter.h>
 #include <linux/if_bridge.h>
 #include <linux/if_frad.h>
 #include <linux/if_vlan.h>
diff --git a/net/wanrouter/Kconfig b/net/wanrouter/Kconfig
deleted file mode 100644
index a157a2e..0000000
diff --git a/net/wanrouter/Makefile b/net/wanrouter/Makefile
deleted file mode 100644
index 4da14bc..0000000
diff --git a/net/wanrouter/patchlevel b/net/wanrouter/patchlevel
deleted file mode 100644
index c043eea..0000000
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c
deleted file mode 100644
index 2ab7850..0000000
diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c
deleted file mode 100644
index c43612e..0000000
-- 
1.7.8.112.g3fd21

^ permalink raw reply related

* Re: Hijacking CPU_FTR_VSX for BGQ QPX
From: Michael Neuling @ 2012-11-10  4:33 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1352491029.23412.3.camel@pasglop>

Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:

> On Fri, 2012-11-09 at 11:43 -0600, Jimi Xenidis wrote:
> > The CPU_FTR_* values are pretty tight (a few bits left) yes I need to save and restore the QPX registers.
> > There are 32 QPX registers, each 32 bytes in size, it is otherwise managed by the FPSCR and MSR[FP]
> > 
> > I was thinking that I could hijack the VSX, since there is no plan to add it to embedded yet.
> > I could be explicit or create an alieas fo the same bit, but the basic effect (after increasing the save area size) would be something like the diff below.
> > Thoughts?
> 
> Don't. Use a different bit, we can always split the mask again if
> needed, move more bits to mmu_features etc...
> 
> > -#ifdef CONFIG_VSX
> > +#if defined (CONFIG_VSX) && defined(CONFIG_BGQ)
> > +# error "This code depends on CONFIG_VSX and CONFIG_BGQ being exclusive
> > +#elif defined (CONFIG_VSX)
> > +# define _REST_32VSRS(n,c,base) REST_32VSRS(n,c,base)
> > +# define _SAVE_32VSRS(n,c,base) SAVE_32VSRS(n,c,base)
> > +#elif defined(CONFIG_BGQ)
> 
> Make a CONFIG_PPC_QPX or something like that specifically for the QPX
> stuff that you can then "select" from CONFIG_PPC_BGQ (don't do just
> CONFIG_BGQ).
> 
> And don't just "hijack" stuff like that, it should be a runtime option,
> so add a new set etc... it should be possible to build a kernel that
> boots on a BGQ or a hypothetical BookE chip with VSX.

Yeah both bluegene and VSX are designed for HPC, so it's not completely
crazy that someone would put them together.

Also, we need to fix the CPU FTR issue.  With PPR (Haren's stuff) and
POWER8 we are going to blow CPU FTRs pretty soon anyway.  This just adds
to that.

Mikey

> 
> > +# define _REST_32VSRS(n,c,base) REST_32QRS(n,c,base)
> > +# define _SAVE_32VSRS(n,c,base) SAVE_32QRS(n,c,base)
> > +#endif
> > +
> > +#if defined (CONFIG_VSX) || defined(CONFIG_BGQ)
> >  #define REST_32FPVSRS(n,c,base)						\
> >  BEGIN_FTR_SECTION							\
> >  	b	2f;							\
> >  END_FTR_SECTION_IFSET(CPU_FTR_VSX);					\
> >  	REST_32FPRS(n,base);						\
> >  	b	3f;							\
> > -2:	REST_32VSRS(n,c,base);						\
> > +2:	_REST_32VSRS(n,c,base);						\
> >  3:
> >  
> >  #define SAVE_32FPVSRS(n,c,base)						\
> > @@ -41,7 +51,7 @@ BEGIN_FTR_SECTION							\
> >  END_FTR_SECTION_IFSET(CPU_FTR_VSX);					\
> >  	SAVE_32FPRS(n,base);						\
> >  	b	3f;							\
> > -2:	SAVE_32VSRS(n,c,base);						\
> > +2:	_SAVE_32VSRS(n,c,base);						\
> >  3:
> >  #else
> >  #define REST_32FPVSRS(n,b,base)	REST_32FPRS(n, base)
> 
> Cheers,
> Ben.
> 
> 

^ permalink raw reply

* Re: Hijacking CPU_FTR_VSX for BGQ QPX
From: Benjamin Herrenschmidt @ 2012-11-09 19:57 UTC (permalink / raw)
  To: Jimi Xenidis; +Cc: Michael Neuling, linuxppc-dev
In-Reply-To: <29970ED2-02E3-45F5-96FD-B4270385E3ED@pobox.com>

On Fri, 2012-11-09 at 11:43 -0600, Jimi Xenidis wrote:
> The CPU_FTR_* values are pretty tight (a few bits left) yes I need to save and restore the QPX registers.
> There are 32 QPX registers, each 32 bytes in size, it is otherwise managed by the FPSCR and MSR[FP]
> 
> I was thinking that I could hijack the VSX, since there is no plan to add it to embedded yet.
> I could be explicit or create an alieas fo the same bit, but the basic effect (after increasing the save area size) would be something like the diff below.
> Thoughts?

Don't. Use a different bit, we can always split the mask again if
needed, move more bits to mmu_features etc...

> -#ifdef CONFIG_VSX
> +#if defined (CONFIG_VSX) && defined(CONFIG_BGQ)
> +# error "This code depends on CONFIG_VSX and CONFIG_BGQ being exclusive
> +#elif defined (CONFIG_VSX)
> +# define _REST_32VSRS(n,c,base) REST_32VSRS(n,c,base)
> +# define _SAVE_32VSRS(n,c,base) SAVE_32VSRS(n,c,base)
> +#elif defined(CONFIG_BGQ)

Make a CONFIG_PPC_QPX or something like that specifically for the QPX
stuff that you can then "select" from CONFIG_PPC_BGQ (don't do just
CONFIG_BGQ).

And don't just "hijack" stuff like that, it should be a runtime option,
so add a new set etc... it should be possible to build a kernel that
boots on a BGQ or a hypothetical BookE chip with VSX.

> +# define _REST_32VSRS(n,c,base) REST_32QRS(n,c,base)
> +# define _SAVE_32VSRS(n,c,base) SAVE_32QRS(n,c,base)
> +#endif
> +
> +#if defined (CONFIG_VSX) || defined(CONFIG_BGQ)
>  #define REST_32FPVSRS(n,c,base)						\
>  BEGIN_FTR_SECTION							\
>  	b	2f;							\
>  END_FTR_SECTION_IFSET(CPU_FTR_VSX);					\
>  	REST_32FPRS(n,base);						\
>  	b	3f;							\
> -2:	REST_32VSRS(n,c,base);						\
> +2:	_REST_32VSRS(n,c,base);						\
>  3:
>  
>  #define SAVE_32FPVSRS(n,c,base)						\
> @@ -41,7 +51,7 @@ BEGIN_FTR_SECTION							\
>  END_FTR_SECTION_IFSET(CPU_FTR_VSX);					\
>  	SAVE_32FPRS(n,base);						\
>  	b	3f;							\
> -2:	SAVE_32VSRS(n,c,base);						\
> +2:	_SAVE_32VSRS(n,c,base);						\
>  3:
>  #else
>  #define REST_32FPVSRS(n,b,base)	REST_32FPRS(n, base)

Cheers,
Ben.

^ permalink raw reply

* Hijacking CPU_FTR_VSX for BGQ QPX
From: Jimi Xenidis @ 2012-11-09 17:43 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Michael Neuling; +Cc: linuxppc-dev

The CPU_FTR_* values are pretty tight (a few bits left) yes I need to =
save and restore the QPX registers.
There are 32 QPX registers, each 32 bytes in size, it is otherwise =
managed by the FPSCR and MSR[FP]

I was thinking that I could hijack the VSX, since there is no plan to =
add it to embedded yet.
I could be explicit or create an alieas fo the same bit, but the basic =
effect (after increasing the save area size) would be something like the =
diff below.
Thoughts?
-jx


diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S
index de36955..adb08af 100644
--- a/arch/powerpc/kernel/fpu.S
+++ b/arch/powerpc/kernel/fpu.S
@@ -25,14 +25,24 @@
 #include <asm/asm-offsets.h>
 #include <asm/ptrace.h>
=20
-#ifdef CONFIG_VSX
+#if defined (CONFIG_VSX) && defined(CONFIG_BGQ)
+# error "This code depends on CONFIG_VSX and CONFIG_BGQ being exclusive
+#elif defined (CONFIG_VSX)
+# define _REST_32VSRS(n,c,base) REST_32VSRS(n,c,base)
+# define _SAVE_32VSRS(n,c,base) SAVE_32VSRS(n,c,base)
+#elif defined(CONFIG_BGQ)
+# define _REST_32VSRS(n,c,base) REST_32QRS(n,c,base)
+# define _SAVE_32VSRS(n,c,base) SAVE_32QRS(n,c,base)
+#endif
+
+#if defined (CONFIG_VSX) || defined(CONFIG_BGQ)
 #define REST_32FPVSRS(n,c,base)						=
\
 BEGIN_FTR_SECTION							=
\
 	b	2f;							=
\
 END_FTR_SECTION_IFSET(CPU_FTR_VSX);					=
\
 	REST_32FPRS(n,base);						=
\
 	b	3f;							=
\
-2:	REST_32VSRS(n,c,base);						=
\
+2:	_REST_32VSRS(n,c,base);						=
\
 3:
=20
 #define SAVE_32FPVSRS(n,c,base)						=
\
@@ -41,7 +51,7 @@ BEGIN_FTR_SECTION						=
	\
 END_FTR_SECTION_IFSET(CPU_FTR_VSX);					=
\
 	SAVE_32FPRS(n,base);						=
\
 	b	3f;							=
\
-2:	SAVE_32VSRS(n,c,base);						=
\
+2:	_SAVE_32VSRS(n,c,base);						=
\
 3:
 #else
 #define REST_32FPVSRS(n,b,base)	REST_32FPRS(n, base)

^ permalink raw reply related

* Re: perf: POWER-event translation questions
From: Stephane Eranian @ 2012-11-09 10:26 UTC (permalink / raw)
  To: Sukadev Bhattiprolu
  Cc: Peter Zijlstra, Robert Richter, Anton Blanchard, LKML,
	linuxppc-dev, Ingo Molnar, Paul Mackerras,
	Arnaldo Carvalho de Melo
In-Reply-To: <20121108011035.GA20670@us.ibm.com>

On Thu, Nov 8, 2012 at 2:10 AM, Sukadev Bhattiprolu
<sukadev@linux.vnet.ibm.com> wrote:
>
>
> Looking for feedback on this prototype for making POWER-specific event
> translations available in sysfs. It is based on the patchset:
>
>         https://lkml.org/lkml/2012/11/7/402
>
> which makes the translations for _generic_ events in POWER available in sysfs:
>
> Since this is in POWER7 specific code I am assigning the names given in the
> POWER7 CPU spec for now.
>
> I had earlier tried mapping these events to generic names outside sysfs:
>
>         Power7 name             Generic name
>
>         cmpl-stall-fxu          stalled-cycles-fixed-point
>         cmpl-stall-lsu          stalled-cycles-load-store
>         cmpl-stall-ifu          stalled-cycles-instruction-fetch
>         cmpl-stall-bru          stalled-cycles-branch-unit
>
> But like Stephane Eranian pointed out mapping such events across architectures
> can be confusing.
>
> Another challenge I suspect we will have is the extremely long generic names
> we could end up with as the events get more specific.
>
> 1. Can we have more than one name for an event ? i.e two sysfs entries,
>    eg: 'cmpl-stall-fxu' and 'stalled-cycles-fixed-point' for an event ?
>
Yes, you can. What is really used is the content of the file and two files
can have the same content.

> 2. Can we allow hyphens in the {name} token  (please see my change to
>    util/parse-events.l below). With this change, I can run:
>
The current code does not support this but Andi fixed that in his HSW patch
and I use it for the PEBS-LL patch series as well.

>           perf stat -e cpu/cmplu-stall-bru /tmp/nop
>
>    without any changes to the user level tool (parse-events.l) I have
>    tested some common cases, not sure if it will break something :-)
>
>    If we are going to create generic or arch specific sysfs entries in
>    /sys/bus/event_source/devices/cpu/events, do we need to add corresponding
>    entry in tools/perf/util/parse-events.l ?
>
Shouldn't be necessary. perf should grab those events automatically from sysfs.
As per Jiri, the hardcoded tables are only used to support backward
compatibility
for kernels without sysfs event entries.

> Sukadev
>
> ---
>  arch/powerpc/perf/power7-pmu.c |   13 +++++++++++++
>  tools/perf/util/parse-events.l |    2 +-
>  2 files changed, 14 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/perf/power7-pmu.c b/arch/powerpc/perf/power7-pmu.c
> index aa9f588..9f46abc 100644
> --- a/arch/powerpc/perf/power7-pmu.c
> +++ b/arch/powerpc/perf/power7-pmu.c
> @@ -303,6 +303,10 @@ static void power7_disable_pmc(unsigned int pmc, unsigned long mmcr[])
>  #define        PM_LD_MISS_L1                   0x400f0
>  #define        PM_BRU_FIN                      0x10068
>  #define        PM_BRU_MPRED                    0x400f6
> +#define        PM_CMPLU_STALL_FXU              0x20014
> +#define        PM_CMPLU_STALL_LSU              0x20012
> +#define        PM_CMPLU_STALL_IFU              0x4004c
> +#define        PM_CMPLU_STALL_BRU              0x4004e
>
>  static int power7_generic_events[] = {
>         [PERF_COUNT_HW_CPU_CYCLES] =                    PM_CYC,
> @@ -369,6 +373,11 @@ EVENT_ATTR(cache-misses,               LD_MISS_L1);
>  EVENT_ATTR(branch-instructions,        BRU_FIN);
>  EVENT_ATTR(branch-misses,              BRU_MPRED);
>
> +EVENT_ATTR(cmplu-stall-fxu,            CMPLU_STALL_FXU);
> +EVENT_ATTR(cmplu-stall-lsu,            CMPLU_STALL_LSU);
> +EVENT_ATTR(cmplu-stall-ifu,            CMPLU_STALL_IFU);
> +EVENT_ATTR(cmplu-stall-bru,            CMPLU_STALL_BRU);
> +
>  static struct attribute *power7_events_attr[] = {
>         EVENT_PTR(CYC),
>         EVENT_PTR(GCT_NOSLOT_CYC),
> @@ -378,6 +387,10 @@ static struct attribute *power7_events_attr[] = {
>         EVENT_PTR(LD_MISS_L1),
>         EVENT_PTR(BRU_FIN),
>         EVENT_PTR(BRU_MPRED),
> +       EVENT_PTR(CMPLU_STALL_FXU),
> +       EVENT_PTR(CMPLU_STALL_LSU),
> +       EVENT_PTR(CMPLU_STALL_IFU),
> +       EVENT_PTR(CMPLU_STALL_BRU),
>         NULL,
>  };
>
> diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
> index c87efc1..1967bb2 100644
> --- a/tools/perf/util/parse-events.l
> +++ b/tools/perf/util/parse-events.l
> @@ -80,7 +80,7 @@ event         [^,{}/]+
>  num_dec                [0-9]+
>  num_hex                0x[a-fA-F0-9]+
>  num_raw_hex    [a-fA-F0-9]+
> -name           [a-zA-Z_*?][a-zA-Z0-9_*?]*
> +name           [-a-zA-Z_*?][-a-zA-Z0-9_*?]*
>  modifier_event [ukhpGH]{1,8}
>  modifier_bp    [rwx]{1,3}
>
> --
> 1.7.1
>

^ permalink raw reply

* Re: [PATCH] powerpc: Add POWER8 architected mode to cputable
From: Michael Neuling @ 2012-11-09  9:56 UTC (permalink / raw)
  To: Gabriel Paubert; +Cc: linuxppc-dev
In-Reply-To: <20121109084708.GA13221@visitor2.iram.es>

> On Fri, Nov 09, 2012 at 05:26:42PM +1100, Michael Neuling wrote:
> > A PVR of 0x0F000004 means we are arch v2.07 complicate ie, POWER8.
> 
> Huh? 
> 
> s/complicate/compliant/ ?

Yes, compliant.  Thanks

> Also ie has to be written with dots (i.e.).

Thanks.

Mikey

^ permalink raw reply

* Re: [PATCH 00/14] powerpc: Add support for POWER8 relocation on exceptions
From: Michael Neuling @ 2012-11-09  9:51 UTC (permalink / raw)
  To: Gabriel Paubert; +Cc: linuxppc-dev, Ian Munsie, Matt Evans
In-Reply-To: <20121109085815.GB13221@visitor2.iram.es>

> > This set of patches adds support for taking exceptions with the MMU on which is
> > supported by POWER8.
> > 
> > A new set of exception vectors is added at 0xc000_0000_0000_4xxx.  When the HW
> > takes us here, MSR IR/DR will be set already and we no longer need a costly
> > RFID to turn the MMU back on again.
> > 
> > The original 0x0 based exception vectors remain for when the HW can't leave the
> > MMU on.  Examples of this are when we can't trust the current the MMU mappings,
>                                                                 ^^^
> Extra "the" (here and in a couple of patches). 

Thanks, I'll fix.

> Can't do much more since I don't have any hardware past G5, but the
> series looks nice and avoiding transient excursions to real mode is a
> good thing.

Thanks.

Mikey

^ permalink raw reply

* Re: [PATCH 12/14] powerpc: Move get_longbusy_msecs into hvcall.h and remove duplicate function
From: Michael Neuling @ 2012-11-09  9:49 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linuxppc-dev, Ian Munsie, Matt Evans
In-Reply-To: <20121109202655.3a2b2876b97b39c581a36637@canb.auug.org.au>

Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Mikey,
> 
> On Fri,  9 Nov 2012 17:19:11 +1100 Michael Neuling <mikey@neuling.org> wrote:
> >
> > From: Ian Munsie <imunsie@au1.ibm.com>
> > 
> > I am going to use this in the next patch, better to have this code in
> > one place rather than three.
> > 
> > Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
> > Signed-off-by: Michael Neuling <mikey@neuling.org>
> > ---
> >  arch/powerpc/include/asm/hvcall.h         |   20 ++++++++++++++++++++
> >  drivers/infiniband/hw/ehca/hcp_if.c       |   20 --------------------
> >  drivers/net/ethernet/ibm/ehea/ehea_phyp.h |   20 --------------------
> >  3 files changed, 20 insertions(+), 40 deletions(-)
> 
> This is identical to patch 10/14 ...

Actually, it's the same as 10/12.  Looks like i didn't clear out my send
directory correctly.

10/14 is correct.

Thanks,
Mikey

^ permalink raw reply

* Re: [PATCH 12/14] powerpc: Move get_longbusy_msecs into hvcall.h and remove duplicate function
From: Stephen Rothwell @ 2012-11-09  9:26 UTC (permalink / raw)
  To: Michael Neuling; +Cc: linuxppc-dev, Ian Munsie, Matt Evans
In-Reply-To: <1352441953-29096-14-git-send-email-mikey@neuling.org>

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

Hi Mikey,

On Fri,  9 Nov 2012 17:19:11 +1100 Michael Neuling <mikey@neuling.org> wrote:
>
> From: Ian Munsie <imunsie@au1.ibm.com>
> 
> I am going to use this in the next patch, better to have this code in
> one place rather than three.
> 
> Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
> Signed-off-by: Michael Neuling <mikey@neuling.org>
> ---
>  arch/powerpc/include/asm/hvcall.h         |   20 ++++++++++++++++++++
>  drivers/infiniband/hw/ehca/hcp_if.c       |   20 --------------------
>  drivers/net/ethernet/ibm/ehea/ehea_phyp.h |   20 --------------------
>  3 files changed, 20 insertions(+), 40 deletions(-)

This is identical to patch 10/14 ...

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

^ permalink raw reply

* Re: [PATCH] powerpc: Add POWER8 architected mode to cputable
From: Gabriel Paubert @ 2012-11-09  8:47 UTC (permalink / raw)
  To: Michael Neuling; +Cc: linuxppc-dev
In-Reply-To: <30282.1352442402@neuling.org>

On Fri, Nov 09, 2012 at 05:26:42PM +1100, Michael Neuling wrote:
> A PVR of 0x0F000004 means we are arch v2.07 complicate ie, POWER8.

Huh? 

s/complicate/compliant/ ?

Also ie has to be written with dots (i.e.).

	Gabriel

>     
> Signed-off-by: Michael Neuling <mikey@neuling.org>
> 
> diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
> index 216ff84..75a3d71 100644
> --- a/arch/powerpc/kernel/cputable.c
> +++ b/arch/powerpc/kernel/cputable.c
> @@ -435,6 +435,21 @@ static struct cpu_spec __initdata cpu_specs[] = {
>  		.cpu_restore		= __restore_cpu_power7,
>  		.platform		= "power7",
>  	},
> +	{	/* 2.07-compliant processor, i.e. Power8 "architected" mode */
> +		.pvr_mask		= 0xffffffff,
> +		.pvr_value		= 0x0f000004,
> +		.cpu_name		= "POWER8 (architected)",
> +		.cpu_features		= CPU_FTRS_POWER8,
> +		.cpu_user_features	= COMMON_USER_POWER8,
> +		.mmu_features		= MMU_FTRS_POWER8,
> +		.icache_bsize		= 128,
> +		.dcache_bsize		= 128,
> +		.oprofile_type		= PPC_OPROFILE_POWER4,
> +		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
> +		.cpu_setup		= __setup_cpu_power8,
> +		.cpu_restore		= __restore_cpu_power8,
> +		.platform		= "power8",
> +	},
>  	{	/* Power7 */
>  		.pvr_mask		= 0xffff0000,
>  		.pvr_value		= 0x003f0000,
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply

* Re: [PATCH 00/14] powerpc: Add support for POWER8 relocation on exceptions
From: Gabriel Paubert @ 2012-11-09  8:58 UTC (permalink / raw)
  To: Michael Neuling; +Cc: linuxppc-dev, Ian Munsie, Matt Evans
In-Reply-To: <1352441953-29096-1-git-send-email-mikey@neuling.org>

On Fri, Nov 09, 2012 at 05:18:58PM +1100, Michael Neuling wrote:
> This set of patches adds support for taking exceptions with the MMU on which is
> supported by POWER8.
> 
> A new set of exception vectors is added at 0xc000_0000_0000_4xxx.  When the HW
> takes us here, MSR IR/DR will be set already and we no longer need a costly
> RFID to turn the MMU back on again.
> 
> The original 0x0 based exception vectors remain for when the HW can't leave the
> MMU on.  Examples of this are when we can't trust the current the MMU mappings,
                                                                ^^^
Extra "the" (here and in a couple of patches). 

Can't do much more since I don't have any hardware past G5, but the series
looks nice and avoiding transient excursions to real mode is a good thing.

	Gabriel


> like when we are changing from guest to hypervisor (HV 0 -> 1) or when the MMU
> was off already.  In these cases the HW will take us to the original 0x0 based
> exception vectors with the MMU off as before.
> 
> The core of these patches were originally written by Matt Evans.  
> 
> Ian Munsie (5):
>   powerpc: Add set_mode hcall
>   powerpc: Add wrappers to enable/disable relocation on exceptions
>   powerpc: Move get_longbusy_msecs into hvcall.h and remove duplicate
>     function
>   powerpc: Enable relocation on during exceptions at boot
>   powerpc: Disable relocation on exceptions when kexecing
> 
> Michael Neuling (9):
>   powerpc: Add POWER8 architected mode to cputable
>   powerpc: Whitespace changes in exception64s.S
>   powerpc: Remove unessessary 0x3000 location enforcement
>   powerpc: Make load_hander handle upto 64k offset
>   powerpc: Turn syscall handler into macros
>   powerpc: Add new macros needed for relocation on exceptions
>   powerpc: Add relocation on exception vector handlers
>   powerpc: Move initial mfspr LPCR out of __init_LPCR
>   powerpc: Setup relocation on exceptions for bare metal systems
> 
>  arch/powerpc/include/asm/exception-64s.h        |   97 ++++++-
>  arch/powerpc/include/asm/firmware.h             |    4 +-
>  arch/powerpc/include/asm/hvcall.h               |   23 +-
>  arch/powerpc/include/asm/reg.h                  |    2 +
>  arch/powerpc/kernel/cpu_setup_power.S           |    8 +-
>  arch/powerpc/kernel/cputable.c                  |   15 ++
>  arch/powerpc/kernel/exceptions-64s.S            |  306 +++++++++++++++++++----
>  arch/powerpc/kernel/head_64.S                   |    3 +-
>  arch/powerpc/kernel/setup_64.c                  |    5 +
>  arch/powerpc/platforms/pseries/firmware.c       |    1 +
>  arch/powerpc/platforms/pseries/plpar_wrappers.h |   36 +++
>  arch/powerpc/platforms/pseries/setup.c          |   71 ++++++
>  drivers/infiniband/hw/ehca/hcp_if.c             |   20 --
>  drivers/net/ethernet/ibm/ehea/ehea_phyp.h       |   20 --
>  14 files changed, 516 insertions(+), 95 deletions(-)
> 
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

^ permalink raw reply

* [PATCH] powerpc: Add POWER8 architected mode to cputable
From: Michael Neuling @ 2012-11-09  6:26 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1351661656-6986-4-git-send-email-mikey@neuling.org>

A PVR of 0x0F000004 means we are arch v2.07 complicate ie, POWER8.
    
Signed-off-by: Michael Neuling <mikey@neuling.org>

diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 216ff84..75a3d71 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -435,6 +435,21 @@ static struct cpu_spec __initdata cpu_specs[] = {
 		.cpu_restore		= __restore_cpu_power7,
 		.platform		= "power7",
 	},
+	{	/* 2.07-compliant processor, i.e. Power8 "architected" mode */
+		.pvr_mask		= 0xffffffff,
+		.pvr_value		= 0x0f000004,
+		.cpu_name		= "POWER8 (architected)",
+		.cpu_features		= CPU_FTRS_POWER8,
+		.cpu_user_features	= COMMON_USER_POWER8,
+		.mmu_features		= MMU_FTRS_POWER8,
+		.icache_bsize		= 128,
+		.dcache_bsize		= 128,
+		.oprofile_type		= PPC_OPROFILE_POWER4,
+		.oprofile_cpu_type	= "ppc64/ibm-compat-v1",
+		.cpu_setup		= __setup_cpu_power8,
+		.cpu_restore		= __restore_cpu_power8,
+		.platform		= "power8",
+	},
 	{	/* Power7 */
 		.pvr_mask		= 0xffff0000,
 		.pvr_value		= 0x003f0000,

^ permalink raw reply related

* [PATCH] powerpc/pseries: Update ibm, architecture.vec for PAPR 2.7/POWER8
From: Michael Neuling @ 2012-11-09  6:23 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, linuxppc-dev
In-Reply-To: <1351661656-6986-4-git-send-email-mikey@neuling.org>

Update ibm,architecture.vec for POWER8 and allows us to support more
than one parition per core.

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
v2: Missed some bits in the original post..

 arch/powerpc/kernel/prom_init.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index cb6c123..9ffb542 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -671,6 +671,7 @@ static void __init early_cmdline_parse(void)
 #define OV1_PPC_2_04		0x08	/* set if we support PowerPC 2.04 */
 #define OV1_PPC_2_05		0x04	/* set if we support PowerPC 2.05 */
 #define OV1_PPC_2_06		0x02	/* set if we support PowerPC 2.06 */
+#define OV1_PPC_2_07		0x01	/* set if we support PowerPC 2.07 */
 
 /* Option vector 2: Open Firmware options supported */
 #define OV2_REAL_MODE		0x20	/* set if we want OF in real mode */
@@ -707,6 +708,7 @@ static void __init early_cmdline_parse(void)
 #define OV5_PFO_HW_RNG		0x80	/* PFO Random Number Generator */
 #define OV5_PFO_HW_842		0x40	/* PFO Compression Accelerator */
 #define OV5_PFO_HW_ENCR		0x20	/* PFO Encryption Accelerator */
+#define OV5_SUB_PROCESSORS	0x01    /* 1,2,or 4 Sub-Processors supported */
 
 /* Option Vector 6: IBM PAPR hints */
 #define OV6_LINUX		0x02	/* Linux is our OS */
@@ -719,6 +721,8 @@ static unsigned char ibm_architecture_vec[] = {
 	W(0xfffe0000), W(0x003a0000),	/* POWER5/POWER5+ */
 	W(0xffff0000), W(0x003e0000),	/* POWER6 */
 	W(0xffff0000), W(0x003f0000),	/* POWER7 */
+	W(0xffff0000), W(0x004b0000),	/* POWER8 */
+	W(0xffffffff), W(0x0f000004),	/* all 2.07-compliant */
 	W(0xffffffff), W(0x0f000003),	/* all 2.06-compliant */
 	W(0xffffffff), W(0x0f000002),	/* all 2.05-compliant */
 	W(0xfffffffe), W(0x0f000001),	/* all 2.04-compliant and earlier */
@@ -728,7 +732,7 @@ static unsigned char ibm_architecture_vec[] = {
 	3 - 2,				/* length */
 	0,				/* don't ignore, don't halt */
 	OV1_PPC_2_00 | OV1_PPC_2_01 | OV1_PPC_2_02 | OV1_PPC_2_03 |
-	OV1_PPC_2_04 | OV1_PPC_2_05 | OV1_PPC_2_06,
+	OV1_PPC_2_04 | OV1_PPC_2_05 | OV1_PPC_2_06 | OV1_PPC_2_07,
 
 	/* option vector 2: Open Firmware options supported */
 	34 - 2,				/* length */
@@ -755,7 +759,7 @@ static unsigned char ibm_architecture_vec[] = {
 	OV4_MIN_ENT_CAP,		/* minimum VP entitled capacity */
 
 	/* option vector 5: PAPR/OF options */
-	18 - 2,				/* length */
+	19 - 2,				/* length */
 	0,				/* don't ignore, don't halt */
 	OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES | OV5_DRCONF_MEMORY |
 	OV5_DONATE_DEDICATE_CPU | OV5_MSI,
@@ -776,6 +780,7 @@ static unsigned char ibm_architecture_vec[] = {
 	0,
 	0,
 	OV5_PFO_HW_RNG | OV5_PFO_HW_ENCR | OV5_PFO_HW_842,
+	OV5_SUB_PROCESSORS,
 	/* option vector 6: IBM PAPR hints */
 	4 - 2,				/* length */
 	0,
-- 
1.7.9.5

^ permalink raw reply related


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