LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: Add configurable -Werror for arch/powerpc
From: Michael Ellerman @ 2009-04-07  2:00 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Kumar Gala

Add an option, on by default, to build all code under arch/powerpc with
-Werror, which causes gcc to treat warnings as errors.

The intention is to make it harder for people to inadvertantly introduce
errors in the arch/powerpc code. It needs to be configurable so that
if a warning is introduced, people can easily work around it while it's
being fixed.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/Kconfig.debug      |    8 ++++++++
 arch/powerpc/kernel/Makefile    |    4 ++++
 arch/powerpc/kvm/Makefile       |    4 ++++
 arch/powerpc/lib/Makefile       |    4 ++++
 arch/powerpc/mm/Makefile        |    4 ++++
 arch/powerpc/oprofile/Makefile  |    4 ++++
 arch/powerpc/platforms/Makefile |    4 ++++
 arch/powerpc/sysdev/Makefile    |    4 ++++
 arch/powerpc/xmon/Makefile      |    4 ++++
 9 files changed, 40 insertions(+), 0 deletions(-)

v2: Leave math-emu alone, it's a steaming pile of warnings.

diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index a1098e2..58d5c22 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -2,6 +2,14 @@ menu "Kernel hacking"
 
 source "lib/Kconfig.debug"
 
+config PPC_WERROR
+	bool "Build arch/powerpc code with -Werror"
+	default y
+	help
+	  This option tells the compiler to build all of the code under
+	  arch/powerpc with the -Werror flag, which means all warnings
+	  are treated as errors.
+
 config PRINT_STACK_DEPTH
 	int "Stack depth to print" if DEBUG_KERNEL
 	default 64
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 71901fb..b11ef4e 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -12,6 +12,10 @@ CFLAGS_prom_init.o      += -fPIC
 CFLAGS_btext.o		+= -fPIC
 endif
 
+ifeq ($(CONFIG_PPC_WERROR),y)
+EXTRA_CFLAGS += -Werror
+endif
+
 ifdef CONFIG_FUNCTION_TRACER
 # Do not trace early boot code
 CFLAGS_REMOVE_cputable.o = -pg -mno-sched-epilog
diff --git a/arch/powerpc/kvm/Makefile b/arch/powerpc/kvm/Makefile
index 4b2df66..51d2337 100644
--- a/arch/powerpc/kvm/Makefile
+++ b/arch/powerpc/kvm/Makefile
@@ -2,6 +2,10 @@
 # Makefile for Kernel-based Virtual Machine module
 #
 
+ifeq ($(CONFIG_PPC_WERROR),y)
+EXTRA_CFLAGS += -Werror
+endif
+
 EXTRA_CFLAGS += -Ivirt/kvm -Iarch/powerpc/kvm
 
 common-objs-y = $(addprefix ../../../virt/kvm/, kvm_main.o coalesced_mmio.o)
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 8db3527..536db60 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -2,6 +2,10 @@
 # Makefile for ppc-specific library files..
 #
 
+ifeq ($(CONFIG_PPC_WERROR),y)
+EXTRA_CFLAGS += -Werror
+endif
+
 ifeq ($(CONFIG_PPC64),y)
 EXTRA_CFLAGS		+= -mno-minimal-toc
 endif
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
index 17290bc..4880a16 100644
--- a/arch/powerpc/mm/Makefile
+++ b/arch/powerpc/mm/Makefile
@@ -2,6 +2,10 @@
 # Makefile for the linux ppc-specific parts of the memory manager.
 #
 
+ifeq ($(CONFIG_PPC_WERROR),y)
+EXTRA_CFLAGS += -Werror
+endif
+
 ifeq ($(CONFIG_PPC64),y)
 EXTRA_CFLAGS	+= -mno-minimal-toc
 endif
diff --git a/arch/powerpc/oprofile/Makefile b/arch/powerpc/oprofile/Makefile
index 2ef6b0d..e607c74 100644
--- a/arch/powerpc/oprofile/Makefile
+++ b/arch/powerpc/oprofile/Makefile
@@ -1,3 +1,7 @@
+ifeq ($(CONFIG_PPC_WERROR),y)
+EXTRA_CFLAGS += -Werror
+endif
+
 ifeq ($(CONFIG_PPC64),y)
 EXTRA_CFLAGS	+= -mno-minimal-toc
 endif
diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index f741919..b18b921 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -1,4 +1,8 @@
 
+ifeq ($(CONFIG_PPC_WERROR),y)
+EXTRA_CFLAGS += -Werror
+endif
+
 obj-$(CONFIG_FSL_ULI1575)	+= fsl_uli1575.o
 
 obj-$(CONFIG_PPC_PMAC)		+= powermac/
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index b33b28a..508c305 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -1,3 +1,7 @@
+ifeq ($(CONFIG_PPC_WERROR),y)
+EXTRA_CFLAGS += -Werror
+endif
+
 ifeq ($(CONFIG_PPC64),y)
 EXTRA_CFLAGS			+= -mno-minimal-toc
 endif
diff --git a/arch/powerpc/xmon/Makefile b/arch/powerpc/xmon/Makefile
index 9cb03b7..3348822 100644
--- a/arch/powerpc/xmon/Makefile
+++ b/arch/powerpc/xmon/Makefile
@@ -1,5 +1,9 @@
 # Makefile for xmon
 
+ifeq ($(CONFIG_PPC_WERROR),y)
+EXTRA_CFLAGS += -Werror
+endif
+
 ifdef CONFIG_PPC64
 EXTRA_CFLAGS += -mno-minimal-toc
 endif
-- 
1.6.2.1

^ permalink raw reply related

* Re: [PATCH] powerpc: Add configurable -Werror for arch/powerpc
From: Olof Johansson @ 2009-04-07  2:27 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev, Kumar Gala
In-Reply-To: <b0b55030b7ba669cbdec74a8b89875096ea07622.1239069602.git.michael@ellerman.id.au>

On Tue, Apr 07, 2009 at 12:00:41PM +1000, Michael Ellerman wrote:
> Add an option, on by default, to build all code under arch/powerpc with
> -Werror, which causes gcc to treat warnings as errors.
> 
> The intention is to make it harder for people to inadvertantly introduce
> errors in the arch/powerpc code. It needs to be configurable so that
> if a warning is introduced, people can easily work around it while it's
> being fixed.

This looks useful at least for the automated builds to catch new warnings,
but do similar options exist on other architectures, x86 in particular? I
think a Cc to LKML of this could be useful.

This is really only beneficial if various people build for powerpc often
enough. If major subsystem maintainers aren't going to hit the errors
it's more of a hinderance for PPC than a global benefit, right?


-Olof

^ permalink raw reply

* Re: [PATCH] powerpc: Add configurable -Werror for arch/powerpc
From: David Miller @ 2009-04-07  2:28 UTC (permalink / raw)
  To: olof; +Cc: linuxppc-dev, kumar.gala
In-Reply-To: <20090407022743.GA12174@lixom.net>

From: Olof Johansson <olof@lixom.net>
Date: Mon, 6 Apr 2009 21:27:43 -0500

> On Tue, Apr 07, 2009 at 12:00:41PM +1000, Michael Ellerman wrote:
>> Add an option, on by default, to build all code under arch/powerpc with
>> -Werror, which causes gcc to treat warnings as errors.
>> 
>> The intention is to make it harder for people to inadvertantly introduce
>> errors in the arch/powerpc code. It needs to be configurable so that
>> if a warning is introduced, people can easily work around it while it's
>> being fixed.
> 
> This looks useful at least for the automated builds to catch new warnings,
> but do similar options exist on other architectures, x86 in particular? I
> think a Cc to LKML of this could be useful.

On sparc64 we do this unconditionally.

^ permalink raw reply

* Re: [PATCH] powerpc: Add configurable -Werror for arch/powerpc
From: Olof Johansson @ 2009-04-07  2:37 UTC (permalink / raw)
  To: David Miller; +Cc: linuxppc-dev, kumar.gala
In-Reply-To: <20090406.192830.193803179.davem@davemloft.net>

On Mon, Apr 06, 2009 at 07:28:30PM -0700, David Miller wrote:
> From: Olof Johansson <olof@lixom.net>
> Date: Mon, 6 Apr 2009 21:27:43 -0500
> 
> > On Tue, Apr 07, 2009 at 12:00:41PM +1000, Michael Ellerman wrote:
> >> Add an option, on by default, to build all code under arch/powerpc with
> >> -Werror, which causes gcc to treat warnings as errors.
> >> 
> >> The intention is to make it harder for people to inadvertantly introduce
> >> errors in the arch/powerpc code. It needs to be configurable so that
> >> if a warning is introduced, people can easily work around it while it's
> >> being fixed.
> > 
> > This looks useful at least for the automated builds to catch new warnings,
> > but do similar options exist on other architectures, x86 in particular? I
> > think a Cc to LKML of this could be useful.
> 
> On sparc64 we do this unconditionally.

Great! I'm all for merging it in, having recently found new warnings on
RFC patches that went uncaught by the poster. :)


-Olof

^ permalink raw reply

* Re: [PATCH] powerpc: Add configurable -Werror for arch/powerpc
From: Michael Ellerman @ 2009-04-07  3:01 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, Kumar Gala
In-Reply-To: <20090407022743.GA12174@lixom.net>

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

On Mon, 2009-04-06 at 21:27 -0500, Olof Johansson wrote:
> On Tue, Apr 07, 2009 at 12:00:41PM +1000, Michael Ellerman wrote:
> > Add an option, on by default, to build all code under arch/powerpc with
> > -Werror, which causes gcc to treat warnings as errors.
> > 
> > The intention is to make it harder for people to inadvertantly introduce
> > errors in the arch/powerpc code. It needs to be configurable so that
> > if a warning is introduced, people can easily work around it while it's
> > being fixed.
> 
> This looks useful at least for the automated builds to catch new warnings,
> but do similar options exist on other architectures, x86 in particular? I
> think a Cc to LKML of this could be useful.
> 
> This is really only beneficial if various people build for powerpc often
> enough. If major subsystem maintainers aren't going to hit the errors
> it's more of a hinderance for PPC than a global benefit, right?

I don't think so. We're only enabling it for code under arch/powerpc -
and most modifications to that code should come through linuxppc.

It's still possible that random stuff will get merged, or that someone
will change code in a header that only causes warnings on powerpc, but
it's less likely.

And that's why it's an option, if someone breaks the build we can work
around it until they're appropriately LARTed.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply

* [PATCH] powerpc: wire up preadv and pwritev
From: Stephen Rothwell @ 2009-04-07  3:19 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras
  Cc: Gerd, LKML, linuxppc-dev, Hoffmann, Andrew Morton, Linus


Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/include/asm/systbl.h |    2 ++
 arch/powerpc/include/asm/unistd.h |    4 +++-
 2 files changed, 5 insertions(+), 1 deletions(-)

Tested on pseries_defconfig (verified using strace{,64} and inspecting
the files).  Test program (modified from the original because the API and
ABI changed and I added a test with larger offsets):

#if 0
set -x
gcc -Wall -O2 -m32 -o preadv $0
gcc -Wall -O2 -m32 -D_FILE_OFFSET_BITS=64 -DLARGE_TEST -o preadv32 $0
gcc -Wall -O2 -m64 -DLARGE_TEST -o preadv64 $0
./preadv
./preadv32
./preadv64
exit 0
#endif
/*
 * preadv demo / test
 *
 * (c) 2008 Gerd Hoffmann <kraxel@redhat.com>
 * Modified for new ABI and large offset test by Stephen Rothwell
 *
 * build with "sh $thisfile"
 */

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <inttypes.h>
#include <sys/uio.h>

/* ----------------------------------------------------------------- */
/* syscall windup                                                    */

#include <sys/syscall.h>
#if 1
/* WARNING: Be sure you know what you are doing if you enable this.
 * linux syscall code isn't upstream yet, syscall numbers are subject
 * to change */
# ifndef __NR_preadv
#  ifdef __i386__
#   define __NR_preadv  333
#   define __NR_pwritev 334
#  endif
#  ifdef __x86_64__
#   define __NR_preadv  295
#   define __NR_pwritev 296
#  endif
#  ifdef __powerpc__
#   define __NR_preadv	319
#   define __NR_pwritev	320
#  endif
# endif
#endif
#ifndef __NR_preadv
# error preadv/pwritev syscall numbers are unknown
#endif

#define HALF_BITS (sizeof(unsigned long)*4)

static ssize_t preadv(int fd, const struct iovec *iov, int iovcnt,
		      off_t offset)
{
	return syscall(__NR_preadv, fd, iov, iovcnt,
		       (unsigned long)offset,
		       (unsigned long)((offset >> HALF_BITS) >> HALF_BITS));
}

static ssize_t pwritev(int fd, const struct iovec *iov, int iovcnt,
		       off_t offset)
{
	return syscall(__NR_pwritev, fd, iov, iovcnt,
		       (unsigned long)offset,
		       (unsigned long)((offset >> HALF_BITS) >> HALF_BITS));
}

/* ----------------------------------------------------------------- */
/* demo/test app                                                     */

static char filename[] = "/tmp/preadv-XXXXXX";
static char outbuf[11] = "0123456789";
static char inbuf[11]  = "----------";

static struct iovec ovec[2] = {{
		.iov_base = outbuf + 5,
		.iov_len  = 5,
	},{
		.iov_base = outbuf + 0,
		.iov_len  = 5,
	}};

static struct iovec ivec[3] = {{
		.iov_base = inbuf + 6,
		.iov_len  = 2,
	},{
		.iov_base = inbuf + 4,
		.iov_len  = 2,
	},{
		.iov_base = inbuf + 2,
		.iov_len  = 2,
	}};

void cleanup(void)
{
	unlink(filename);
}

int main(int argc, char **argv)
{
	int fd, rc;

	fd = mkstemp(filename);
	if (-1 == fd) {
		perror("mkstemp");
		exit(1);
	}
	atexit(cleanup);

	/* write to file: "56789-01234" */
	rc = pwritev(fd, ovec, 2, 0);
	if (rc < 0) {
		perror("pwritev");
		exit(1);
	}

	/* read from file: "78-90-12" */
	rc = preadv(fd, ivec, 3, 2);
	if (rc < 0) {
		perror("preadv");
		exit(1);
	}

	printf("result  : %s\n", inbuf);
	printf("expected: %s\n", "--129078--");

#ifdef LARGE_TEST

	/* write to file: "56789-01234" */
	rc = pwritev(fd, ovec, 2, 0x300000000ULL);
	if (rc < 0) {
		perror("pwritev");
		exit(1);
	}

	/* read from file: "78-90-12" */
	rc = preadv(fd, ivec, 3, 0x300000000ULL + 2);
	if (rc < 0) {
		perror("preadv");
		exit(1);
	}

	printf("result  : %s\n", inbuf);
	printf("expected: %s\n", "--129078--");

#endif

	exit(0);
}


diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index fe16649..3fb6d9e 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -322,3 +322,5 @@ SYSCALL_SPU(epoll_create1)
 SYSCALL_SPU(dup3)
 SYSCALL_SPU(pipe2)
 SYSCALL(inotify_init1)
+COMPAT_SYS_SPU(preadv)
+COMPAT_SYS_SPU(pwritev)
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index e07d0c7..7e03ebe 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -341,10 +341,12 @@
 #define __NR_dup3		316
 #define __NR_pipe2		317
 #define __NR_inotify_init1	318
+#define __NR_preadv		319
+#define __NR_pwritev		320
 
 #ifdef __KERNEL__
 
-#define __NR_syscalls		319
+#define __NR_syscalls		321
 
 #define __NR__exit __NR_exit
 #define NR_syscalls	__NR_syscalls
-- 
1.6.2.1

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

^ permalink raw reply related

* [PATCH] powerpc: Fix oops when loading modules
From: Paul Mackerras @ 2009-04-07  3:21 UTC (permalink / raw)
  To: linuxppc-dev

This fixes a problem reported by Sean MacLennan where loading any
module would cause an oops.  We weren't marking the pages containing
the module text as having hardware execute permission, due to a bug
introduced in commit 8d1cf34e ("powerpc/mm: Tweak PTE bit combination
definitions"), hence trying to execute the module text caused an
exception on processors that support hardware execute permission.

This adds _PAGE_HWEXEC to the definitions of PAGE_KERNEL_X and
PAGE_KERNEL_ROX to fix this problem.

Reported-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
 arch/powerpc/include/asm/pte-common.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/pte-common.h b/arch/powerpc/include/asm/pte-common.h
index d9740e8..a7e210b 100644
--- a/arch/powerpc/include/asm/pte-common.h
+++ b/arch/powerpc/include/asm/pte-common.h
@@ -151,9 +151,11 @@ extern unsigned long bad_call_to_PMD_PAGE_SIZE(void);
 				 _PAGE_NO_CACHE)
 #define PAGE_KERNEL_NCG	__pgprot(_PAGE_BASE_NC | _PAGE_KERNEL_RW | \
 				 _PAGE_NO_CACHE | _PAGE_GUARDED)
-#define PAGE_KERNEL_X	__pgprot(_PAGE_BASE | _PAGE_KERNEL_RW | _PAGE_EXEC)
+#define PAGE_KERNEL_X	__pgprot(_PAGE_BASE | _PAGE_KERNEL_RW | _PAGE_EXEC | \
+				 _PAGE_HWEXEC)
 #define PAGE_KERNEL_RO	__pgprot(_PAGE_BASE | _PAGE_KERNEL_RO)
-#define PAGE_KERNEL_ROX	__pgprot(_PAGE_BASE | _PAGE_KERNEL_RO | _PAGE_EXEC)
+#define PAGE_KERNEL_ROX	__pgprot(_PAGE_BASE | _PAGE_KERNEL_RO | _PAGE_EXEC | \
+				 _PAGE_HWEXEC)
 
 /* Protection used for kernel text. We want the debuggers to be able to
  * set breakpoints anywhere, so don't write protect the kernel text

^ permalink raw reply related

* Re: [PATCH 3/3] powerpc: allow 256kB pages with SHMEM
From: Paul Mackerras @ 2009-04-07  3:28 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: linuxppc-dev, Andrew Morton, prodyuth, linux-kernel, yanok
In-Reply-To: <Pine.LNX.4.64.0904062156290.21044@blonde.anvils>

Hugh Dickins writes:

> Now that shmem's divisions by zero and SHMEM_MAX_BYTES are fixed,
> let powerpc 256kB pages coexist with CONFIG_SHMEM again.
> 
> Signed-off-by: Hugh Dickins <hugh@veritas.com>
> ---
> Added linuxppc-dev and some other Cc's for this 3/3: sorry
> if you didn't see 1/3 and 2/3, they were just in mm/shmem.c.

Looks OK - what path are you using to get the series upstream?
(I.e. should I be putting 3/3 in the powerpc tree or are you going to
push it along with the others?)

Paul.

^ permalink raw reply

* Re: Move dtc and libfdt sources from arch/powerpc/boot to scripts/dtc
From: Paul Mackerras @ 2009-04-07  5:17 UTC (permalink / raw)
  To: David Gibson
  Cc: Andrew Morton, monstr, linux-kernel, linuxppc-dev, Linus Torvalds,
	Michal Simek
In-Reply-To: <20090331044701.GD25418@yookeroo.seuss>

David Gibson writes:

> The vast bulk of this patch is a literal move, the rest is adjusting
> the various Makefiles to use dtc and libfdt correctly from their new
> locations.

Did you test this with a separate object directory?  I get:

$ make O=../test-64k V=1
[snip]
  gcc -Wp,-MD,scripts/dtc/.dtc-lexer.lex.o.d -Iscripts/dtc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer  -I/home/paulus/kernel/powerpc/scripts/dtc/libfdt -Iscripts/dtc/libfdt -c -o scripts/dtc/dtc-lexer.lex.o scripts/dtc/dtc-lexer.lex.c
dtc-lexer.l:37:17: error: dtc.h: No such file or directory
dtc-lexer.l:38:20: error: srcpos.h: No such file or directory
In file included from dtc-lexer.l:39:
dtc-parser.y:42: error: expected specifier-qualifier-list before 

^ permalink raw reply

* Re: [PATCH 3/3] powerpc: allow 256kB pages with SHMEM
From: Hugh Dickins @ 2009-04-07  6:10 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: yanok, linux-kernel, linuxppc-dev, Andrew Morton, prodyuth
In-Reply-To: <18906.51307.281300.189948@drongo.ozlabs.ibm.com>

On Tue, 7 Apr 2009, Paul Mackerras wrote:
> Hugh Dickins writes:
> 
> > Now that shmem's divisions by zero and SHMEM_MAX_BYTES are fixed,
> > let powerpc 256kB pages coexist with CONFIG_SHMEM again.
> > 
> > Signed-off-by: Hugh Dickins <hugh@veritas.com>
> > ---
> > Added linuxppc-dev and some other Cc's for this 3/3: sorry
> > if you didn't see 1/3 and 2/3, they were just in mm/shmem.c.
> 
> Looks OK - what path are you using to get the series upstream?
> (I.e. should I be putting 3/3 in the powerpc tree or are you going to
> push it along with the others?)

If it's OK with you (and you're saying it is), I think the best
would be for it to sit alongside 1/3 and 2/3 in Andrew's tree,
hopefully get an Ack from Yuri (I don't have any powerpc 256kB
pages myself to test it fully), and then go on into 2.6.30.

Hugh

^ permalink raw reply

* [PATCH] powerpc: Add support for early tlbilx opcode
From: Kumar Gala @ 2009-04-07  6:13 UTC (permalink / raw)
  To: linuxppc-dev

During the ISA 2.06 development the opcode for tlbilx changed and some
early implementations used to old opcode.  Add support for a MMU_FTR
fixup to deal with this.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/include/asm/mmu.h        |    6 ++++++
 arch/powerpc/include/asm/ppc-opcode.h |   11 ++++++++++-
 arch/powerpc/kernel/cputable.c        |    2 +-
 arch/powerpc/mm/tlb_nohash_low.S      |   14 +++++++++++++-
 4 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
index cbf1543..86d2366 100644
--- a/arch/powerpc/include/asm/mmu.h
+++ b/arch/powerpc/include/asm/mmu.h
@@ -52,6 +52,12 @@
  */
 #define MMU_FTR_NEED_DTLB_SW_LRU	ASM_CONST(0x00200000)
 
+/* This indicates that the processor uses the wrong opcode for tlbilx
+ * instructions.  During the ISA 2.06 development the opcode for tlbilx
+ * changed and some early implementations used to old opcode
+ */
+#define MMU_FTR_TLBILX_EARLY_OPCODE	ASM_CONST(0x00400000)
+
 #ifndef __ASSEMBLY__
 #include <asm/cputable.h>
 
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h
index 640ccbb..ef4da37 100644
--- a/arch/powerpc/include/asm/ppc-opcode.h
+++ b/arch/powerpc/include/asm/ppc-opcode.h
@@ -44,6 +44,7 @@
 #define PPC_INST_STSWI			0x7c0005aa
 #define PPC_INST_STSWX			0x7c00052a
 #define PPC_INST_TLBILX			0x7c000024
+#define PPC_INST_TLBILX_EARLY		0x7c000626
 #define PPC_INST_WAIT			0x7c00007c
 
 /* macros to insert fields into opcodes */
@@ -63,10 +64,18 @@
 #define PPC_RFDI		stringify_in_c(.long PPC_INST_RFDI)
 #define PPC_RFMCI		stringify_in_c(.long PPC_INST_RFMCI)
 #define PPC_TLBILX(t, a, b)	stringify_in_c(.long PPC_INST_TLBILX | \
-					__PPC_T_TLB(t) | __PPC_RA(a) | __PPC_RB(b))
+					__PPC_T_TLB(t) | \
+					__PPC_RA(a) | __PPC_RB(b))
 #define PPC_TLBILX_ALL(a, b)	PPC_TLBILX(0, a, b)
 #define PPC_TLBILX_PID(a, b)	PPC_TLBILX(1, a, b)
 #define PPC_TLBILX_VA(a, b)	PPC_TLBILX(3, a, b)
+
+#define PPC_TLBILX_EARLY(t, a, b) stringify_in_c(.long PPC_INST_TLBILX_EARLY | \
+						__PPC_T_TLB(t) | \
+						__PPC_RA(a) | __PPC_RB(b))
+#define PPC_TLBILX_ALL_EARLY(a, b)	PPC_TLBILX_EARLY(0, a, b)
+#define PPC_TLBILX_PID_EARLY(a, b)	PPC_TLBILX_EARLY(1, a, b)
+#define PPC_TLBILX_VA_EARLY(a, b)	PPC_TLBILX_EARLY(3, a, b)
 #define PPC_WAIT(w)		stringify_in_c(.long PPC_INST_WAIT | \
 					__PPC_WC(w))
 
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index cd1b687..57db50f 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -1766,7 +1766,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
 		.cpu_features		= CPU_FTRS_E500MC,
 		.cpu_user_features	= COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
 		.mmu_features		= MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
-			MMU_FTR_USE_TLBILX,
+			MMU_FTR_USE_TLBILX | MMU_FTR_TLBILX_EARLY_OPCODE,
 		.icache_bsize		= 64,
 		.dcache_bsize		= 64,
 		.num_pmcs		= 4,
diff --git a/arch/powerpc/mm/tlb_nohash_low.S b/arch/powerpc/mm/tlb_nohash_low.S
index 788b87c..45fed36 100644
--- a/arch/powerpc/mm/tlb_nohash_low.S
+++ b/arch/powerpc/mm/tlb_nohash_low.S
@@ -138,7 +138,11 @@ BEGIN_MMU_FTR_SECTION
 	andi.	r3,r3,MMUCSR0_TLBFI@l
 	bne	1b
 MMU_FTR_SECTION_ELSE
-	PPC_TLBILX_ALL(0,0)
+  BEGIN_MMU_FTR_SECTION_NESTED(96)
+	PPC_TLBILX_ALL(0,r3)
+  MMU_FTR_SECTION_ELSE_NESTED(96)
+	PPC_TLBILX_ALL_EARLY(0,r3)
+  ALT_MMU_FTR_SECTION_END_NESTED_IFCLR(MMU_FTR_TLBILX_EARLY_OPCODE, 96)
 ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_USE_TLBILX)
 	msync
 	isync
@@ -151,7 +155,11 @@ BEGIN_MMU_FTR_SECTION
 	wrteei	0
 	mfspr	r4,SPRN_MAS6	/* save MAS6 */
 	mtspr	SPRN_MAS6,r3
+  BEGIN_MMU_FTR_SECTION_NESTED(96)
 	PPC_TLBILX_PID(0,0)
+  MMU_FTR_SECTION_ELSE_NESTED(96)
+	PPC_TLBILX_PID_EARLY(0,0)
+  ALT_MMU_FTR_SECTION_END_NESTED_IFCLR(MMU_FTR_TLBILX_EARLY_OPCODE, 96)
 	mtspr	SPRN_MAS6,r4	/* restore MAS6 */
 	wrtee	r10
 MMU_FTR_SECTION_ELSE
@@ -185,7 +193,11 @@ BEGIN_MMU_FTR_SECTION
 	mtspr	SPRN_MAS1,r4
 	tlbwe
 MMU_FTR_SECTION_ELSE
+  BEGIN_MMU_FTR_SECTION_NESTED(96)
 	PPC_TLBILX_VA(0,r3)
+  MMU_FTR_SECTION_ELSE_NESTED(96)
+	PPC_TLBILX_VA_EARLY(0,r3)
+  ALT_MMU_FTR_SECTION_END_NESTED_IFCLR(MMU_FTR_TLBILX_EARLY_OPCODE, 96)
 ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_USE_TLBILX)
 	msync
 	isync
-- 
1.6.0.6

^ permalink raw reply related

* Re: [PATCH 1/3] PowerPC: MPC85xx: TQM85xx: correct address of LM75 I2C device nodes
From: Kumar Gala @ 2009-04-07  6:18 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: linuxppc-dev
In-Reply-To: <49BE143A.6020109@grandegger.com>


On Mar 16, 2009, at 3:56 AM, Wolfgang Grandegger wrote:

> Commit 0f73a449a649acfca91404a98a35353a618b9555 added I2C device nodes
> for the LM75 thermal sensor on the TQM85xx modules, unfortunately with
> the wrong I2C address. The LM75s are located at address 0x48.
>
> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
> ---
> arch/powerpc/boot/dts/tqm8540.dts          |    4 ++--
> arch/powerpc/boot/dts/tqm8541.dts          |    4 ++--
> arch/powerpc/boot/dts/tqm8548-bigflash.dts |    4 ++--
> arch/powerpc/boot/dts/tqm8548.dts          |    4 ++--
> arch/powerpc/boot/dts/tqm8555.dts          |    4 ++--
> arch/powerpc/boot/dts/tqm8560.dts          |    4 ++--
> 6 files changed, 12 insertions(+), 12 deletions(-)

applied

- k

^ permalink raw reply

* Re: [PATCH 2/3] PowerPC: MPC85xx: TQM8548: use proper phy-handles for enet2 and enet3
From: Kumar Gala @ 2009-04-07  6:18 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: linuxppc-dev
In-Reply-To: <49BE146D.5050604@grandegger.com>


On Mar 16, 2009, at 3:57 AM, Wolfgang Grandegger wrote:

> For enet2 and enet3 the wrong phy-handles have been used in DTS files
> of the TQM8548 modules.
>
> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
> ---
> arch/powerpc/boot/dts/tqm8548-bigflash.dts |    4 ++--
> arch/powerpc/boot/dts/tqm8548.dts          |    4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)

fixup & applied

- k

^ permalink raw reply

* Re: [PATCH 3/3] PowerPC: MPC85xx: TQM8548: update defconfig
From: Kumar Gala @ 2009-04-07  6:19 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: linuxppc-dev
In-Reply-To: <49BE1497.6070004@grandegger.com>


On Mar 16, 2009, at 3:57 AM, Wolfgang Grandegger wrote:

> Enable highmem support for the TQM8548-AG modules and NAND support for
> the TQM8548-BE modules. Furthermore disable USB, Wireless and IDE  
> support
> because it's not available on the STK85xx starter kit.
>
> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
> ---
> arch/powerpc/configs/85xx/tqm8548_defconfig |  164 +++++++ 
> +-------------------
> 1 files changed, 48 insertions(+), 116 deletions(-)


applied

- k

^ permalink raw reply

* Please pull from 'next' branch (for 2.6.30)(updated) (fwd)
From: Kumar Gala @ 2009-04-07  6:21 UTC (permalink / raw)
  To: linuxppc-dev

Forgot to CC linuxppc-dev

- k

---------- Forwarded message ----------
Date: Tue, 7 Apr 2009 01:21:21 -0500 (CDT)
From: Kumar Gala <galak@kernel.crashing.org>
To: Paul Mackerras <paulus@samba.org>,
    Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Please pull from 'next' branch (for 2.6.30)(updated)

* Added some patches for tqm85xx that I missed
* Added tlbilx opcode patches (support was added in .30 so this is fixing
issues with that code)

- k

Please pull from 'next' branch of

	master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git next

to receive the following updates:

 arch/powerpc/Kconfig                        |    1
 arch/powerpc/boot/dts/ksi8560.dts           |    4
 arch/powerpc/boot/dts/pq2fads.dts           |   20 ++-
 arch/powerpc/boot/dts/sbc8548.dts           |    4
 arch/powerpc/boot/dts/sbc8560.dts           |    4
 arch/powerpc/boot/dts/socrates.dts          |    1
 arch/powerpc/boot/dts/stx_gp3_8560.dts      |    4
 arch/powerpc/boot/dts/tqm8540.dts           |    8 -
 arch/powerpc/boot/dts/tqm8541.dts           |    8 -
 arch/powerpc/boot/dts/tqm8548-bigflash.dts  |    8 -
 arch/powerpc/boot/dts/tqm8548.dts           |    8 -
 arch/powerpc/boot/dts/tqm8555.dts           |    8 -
 arch/powerpc/boot/dts/tqm8560.dts           |    8 -
 arch/powerpc/configs/85xx/tqm8548_defconfig |  164 ++++++++--------------------
 arch/powerpc/include/asm/mmu.h              |    6 +
 arch/powerpc/include/asm/mpic.h             |   12 ++
 arch/powerpc/include/asm/ppc-opcode.h       |   13 +-
 arch/powerpc/include/asm/reg.h              |   30 +++++
 arch/powerpc/include/asm/reg_booke.h        |   30 -----
 arch/powerpc/include/asm/sfp-machine.h      |    6 -
 arch/powerpc/kernel/cputable.c              |    2
 arch/powerpc/mm/tlb_nohash_low.S            |   14 ++
 arch/powerpc/sysdev/mpic.c                  |   34 +++++
 drivers/serial/cpm_uart/cpm_uart_core.c     |   14 +-
 drivers/video/fsl-diu-fb.c                  |   34 +++--
 include/linux/fsl_devices.h                 |   22 ---
 26 files changed, 234 insertions(+), 233 deletions(-)

Anton Vorontsov (1):
      fsl-diu-fb: Pass the proper device for dma mapping routines

Grant Likely (1):
      powerpc: Remove unused symbols from fsl_devices.h

Josh Boyer (1):
      powerpc: Make LOWMEM_CAM_NUM depend on FSL_BOOKE

Kumar Gala (6):
      powerpc/85xx: Use fsl,mpc85.. as prefix for memory ctrl & l2-cache nodes
      powerpc: Move SPEFSCR defines to common header
      powerpc/math-emu: Change types to work on ppc64
      powerpc: Add support for CoreInt delivery of interrupts on MPIC
      powerpc: Fix tlbilx opcode
      powerpc: Add support for early tlbilx opcode

Scott Wood (3):
      cpm_uart: Initialize port.dev before it's used.
      cpm_uart: Disable CPM udbg when re-initing CPM uart, even if not the console.
      powerpc/pq2fads: Update device tree for use with device-tree-aware u-boot.

Wolfgang Grandegger (4):
      powerpc/85xx: Re-add the device_type soc to socrates.dts
      powerpc/85xx: TQM85xx: correct address of LM75 I2C device nodes
      powerpc/85xx: TQM8548: use proper phy-handles for enet2 and enet3
      powerpc/85xx: TQM8548: update defconfig

^ permalink raw reply

* [git pull] Please pull powerpc.git merge branch
From: Paul Mackerras @ 2009-04-07  6:26 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linuxppc-dev, akpm, linux-kernel

Linus,

Please pull from the 'merge' branch of

git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git merge

to get a powerpc update.  (I'm sending this instead of Ben
Herrenschmidt because Ben has just gone off on a month's vacation.)

Most of the commits are bug fixes and cleanups.  There is also a
commit from Stephen Rothwell to wire up preadv/pwritev and one from
Anton Blanchard that exports some statistics from the hypervisor on
pSeries machines.

Thanks,
Paul.

 arch/powerpc/Kconfig                    |    3 ++-
 arch/powerpc/boot/dts/ksi8560.dts       |    4 ++--
 arch/powerpc/boot/dts/pq2fads.dts       |   20 +++++++++++++-----
 arch/powerpc/boot/dts/sbc8548.dts       |    4 ++--
 arch/powerpc/boot/dts/sbc8560.dts       |    4 ++--
 arch/powerpc/boot/dts/socrates.dts      |    1 +
 arch/powerpc/boot/dts/stx_gp3_8560.dts  |    4 ++--
 arch/powerpc/boot/dts/tqm8540.dts       |    4 ++--
 arch/powerpc/boot/dts/tqm8541.dts       |    4 ++--
 arch/powerpc/boot/dts/tqm8555.dts       |    4 ++--
 arch/powerpc/boot/dts/tqm8560.dts       |    4 ++--
 arch/powerpc/configs/pseries_defconfig  |    2 +-
 arch/powerpc/include/asm/lppaca.h       |    2 +-
 arch/powerpc/include/asm/mpic.h         |   12 +++++++++++
 arch/powerpc/include/asm/ps3fb.h        |    1 -
 arch/powerpc/include/asm/pte-common.h   |    6 ++++-
 arch/powerpc/include/asm/reg.h          |   30 +++++++++++++++++++++++++++
 arch/powerpc/include/asm/reg_booke.h    |   30 ---------------------------
 arch/powerpc/include/asm/rtas.h         |    3 ++-
 arch/powerpc/include/asm/sfp-machine.h  |    6 +++--
 arch/powerpc/include/asm/systbl.h       |    3 +++
 arch/powerpc/include/asm/unistd.h       |    4 +++-
 arch/powerpc/kernel/fpu.S               |    5 +++++
 arch/powerpc/kernel/ftrace.c            |    4 ++--
 arch/powerpc/kernel/irq.c               |    4 +++-
 arch/powerpc/kernel/lparcfg.c           |   16 +++++++++++++++
 arch/powerpc/kernel/misc_64.S           |    8 +++++++
 arch/powerpc/kernel/prom_init.c         |   18 +++++++++-------
 arch/powerpc/kernel/ptrace32.c          |   15 ++++++++++----
 arch/powerpc/kernel/setup-common.c      |    1 -
 arch/powerpc/sysdev/mpic.c              |   34 +++++++++++++++++++++++++++++++
 drivers/serial/cpm_uart/cpm_uart_core.c |   14 ++++++-------
 drivers/serial/pmac_zilog.c             |   15 ++++++++++++++
 drivers/video/fsl-diu-fb.c              |   34 +++++++++++++++++++------------
 drivers/watchdog/wdrtas.c               |   13 ++++++++++--
 include/linux/fsl_devices.h             |   22 --------------------
 36 files changed, 235 insertions(+), 123 deletions(-)

Anton Blanchard (6):
      powerpc: Print progress of ibm,client-architecture method
      powerpc: Clean up some prom printouts
      powerpc/pseries: Add dispatch dispersion statistics
      powerpc/pseries: Scan for all events in rtasd
      powerpc/pseries: Fix ibm,client-architecture comment
      powerpc/pseries: Enable relay in pseries_defconfig

Anton Vorontsov (1):
      fsl-diu-fb: Pass the proper device for dma mapping routines

Benjamin Herrenschmidt (1):
      powerpc/pmac: Fix internal modem IRQ on Wallstreet PowerBook

Geert Uytterhoeven (1):
      powerpc: Correct dependency of KEXEC

Grant Likely (1):
      powerpc: Remove unused symbols from fsl_devices.h

Huang Weiyi (1):
      powerpc: Remove duplicated #include's

Josh Boyer (1):
      powerpc: Make LOWMEM_CAM_NUM depend on FSL_BOOKE

Kumar Gala (4):
      powerpc/85xx: Use fsl,mpc85.. as prefix for memory ctrl & l2-cache nodes
      powerpc: Move SPEFSCR defines to common header
      powerpc/math-emu: Change types to work on ppc64
      powerpc: Add support for CoreInt delivery of interrupts on MPIC

Mark Nelson (1):
      powerpc/wdrtas: Update wdrtas_get_interval to use rtas_data_buf

Michael Ellerman (3):
      powerpc: Print information about mapping hw irqs to virtual irqs
      powerpc/ftrace: Fix #if that should be #ifdef
      powerpc/ftrace: Fix printf format warning

Michael Neuling (2):
      powerpc: Disable VSX or current process in giveup_fpu/altivec
      powerpc: Fix ptrace compat wrapper for FPU register access

Paul Mackerras (1):
      powerpc: Fix oops when loading modules

Scott Wood (3):
      cpm_uart: Initialize port.dev before it's used.
      cpm_uart: Disable CPM udbg when re-initing CPM uart, even if not the console.
      powerpc/pq2fads: Update device tree for use with device-tree-aware u-boot.

Stephen Rothwell (1):
      powerpc: Wire up preadv and pwritev

Wolfgang Grandegger (1):
      powerpc/85xx: Re-add the device_type soc to socrates.dts

^ permalink raw reply

* Bug:scheduling while atomic
From: Vijay Nikam @ 2009-04-07  6:29 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Scott Wood

Hello All,

I have mpc8313erb with linux kernel 2.6.20.

When I ported the kernel with CONFIG_PREEMPT=y (Enabled) I am getting
the 'scheduling while atomic'. Please check the following call trace,
thanks.

Could anyone please let me to the way to fix it ? ? ?

Kindly please acknowledge ... thank you ...

Kind Regards,
Vijay Nikam

################################## LOG #################################
mpc8313_rdb_setup_arch()
arch: exit

[    0.000000] Using MPC8313 RDB machine description
[    0.000000] Linux version 2.6.20 (messung@localhost.localdomain)
(gcc version 4.0.2 20060628 (Wasabi)) #23 PREEMPT Tue Apr 7 10:36:18
IST 209
[    0.000000] Found MPC83xx PCI host bridge at 0x00000000e0008500.
Firmware bus number: 0->0
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA             0 ->    32768
[    0.000000]   Normal      32768 ->    32768
[    0.000000] early_node_map[1] active PFN ranges
[    0.000000]     0:        0 ->    32768
[    0.000000] Built 1 zonelists.  Total pages: 32512
[    0.000000] Kernel command line: root=/dev/mtdblock4
rootfstype=jffs2 rw console=ttyS0,115200 mtdparts=nand0:-(rootfs)
[    0.000000] IPIC (128 IRQ sources) at fdefa700
[    0.000000] PID hash table entries: 512 (order: 9, 2048 bytes)
[   10.730683] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[   10.731455] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[   10.744855] Memory: 125836k/131072k available (3296k kernel code,
5088k reserved, 472k data, 110k bss, 144k init)
[   10.766153] Mount-cache hash table entries: 512
[   10.776457] NET: Registered protocol family 16
[   10.795354] PCI: Probing PCI hardware
[   10.835814] Generic PHY: Registered new driver
[   10.845802] SCSI subsystem initialized
[   10.848001] usbcore: registered new interface driver usbfs
[   10.849225] usbcore: registered new interface driver hub
[   10.850730] usbcore: registered new device driver usb
[   10.864131] NET: Registered protocol family 2
[   10.873891] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[   10.875624] TCP established hash table entries: 4096 (order: 4, 65536 bytes)
[   10.876118] TCP bind hash table entries: 2048 (order: 3, 40960 bytes)
[   10.876483] TCP: Hash tables configured (established 4096 bind 2048)
[   10.876508] TCP reno registered
[   10.926572] Initializing RT-Tester: OK
[   10.931275] JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
[   10.932114] io scheduler noop registered
[   10.932142] io scheduler anticipatory registered (default)
[   10.932164] io scheduler deadline registered
[   10.932336] io scheduler cfq registered
[   11.669977] Generic RTC Driver v1.07
[   11.673740] WDT driver for MPC83xx initialized. mode:reset
timeout=65535 (25 seconds)
[   11.673826] Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports,
IRQ sharing disabled
[   11.680975] serial8250.0: ttyS0 at MMIO 0xe0004500 (irq = 16) is a 16550A
[   11.902695] serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 17) is a 16550A
[   11.934522] RAMDISK driver initialized: 16 RAM disks of 32768K size
1024 blocksize
[   11.953408] loop: loaded (max 8 devices)
[   11.957368] Intel(R) PRO/1000 Network Driver - version 7.3.15-k2-NAPI
[   11.963862] Copyright (c) 1999-2006 Intel Corporation.
[   11.979780] Gianfar MII Bus: probed
[   11.986456] eth0: Gianfar Ethernet Controller Version 1.4, 00:04:9f:ef:23:33
[   11.993766] eth0: MTU = 1500 (frame size=1540,truesize=2296)
[   11.999442] eth0: Running with NAPI enabled
[   12.003644] eth0: 64/64 RX/TX BD ring size
[   12.007756] eth0: Socket buffer recycling mode enabled
[   12.014840] eth1: Gianfar Ethernet Controller Version 1.4, 00:e0:0c:00:7e:21
[   12.022155] eth1: MTU = 1500 (frame size=1540,truesize=2296)
[   12.027855] eth1: Running with NAPI enabled
[   12.032060] eth1: 64/64 RX/TX BD ring size
[   12.036169] eth1: Socket buffer recycling mode enabled
[   12.041374] SKB Handler initialized(max=64)
[   12.047711] Marvell 88E1101: Registered new driver
[   12.053683] Marvell 88E1111: Registered new driver
[   12.059610] Marvell 88E1145: Registered new driver
[   12.065650] MPC8313ERDB Ethernet Switch: Registered new driver
[   12.080151] MPC8313RDB flash device: 800000 at fe000000 Partition number 4
[   12.087755] MPC8313RDB Flash Map Info: Found 1 x16 devices at 0x0
in 16-bit bank
[   12.095290]  Amd/Fujitsu Extended Query Table at 0x0040
[   12.100558] MPC8313RDB Flash Map Info: Swapping erase regions for
broken CFI table.
[   12.108294] number of CFI chips: 1
[   12.111729] cfi_cmdset_0002: Disabling erase-suspend-program due to
code brokenness.
[   12.119556] Creating 4 MTD partitions on "MPC8313RDB Flash Map Info":
[   12.126040] 0x00000000-0x00100000 : "U-Boot"
[   12.134115] 0x00100000-0x00300000 : "Kernel"
[   12.142296] 0x00300000-0x00700000 : "JFFS2"
[   12.150546] 0x00700000-0x00800000 : "dtb"
[   12.158445] MPC8313RDB flash device (MPC8313RDB Flash Map Info) initialized
[   12.165481] Freescale eLBC NAND Driver (C) 2006 Freescale
[   12.173380] NAND device: Manufacturer ID: 0xec, Chip ID: 0x75
(Samsung NAND 32MiB 3,3V 8-bit)
[   12.182145] Scanning device for bad blocks
[   12.702672] 1 cmdlinepart partitions found on MTD device nand0
[   12.708534] Creating 1 MTD partitions on "nand0":
[   12.713277] 0x00000000-0x02000000 : "rootfs"
[   12.721823] usbmon: debugfs is not available
[   12.727329] fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
[   12.735447] fsl-ehci fsl-ehci.0: new USB bus registered, assigned
bus number 1
[   12.764287] fsl-ehci fsl-ehci.0: irq 38, io base 0xe0023000
[   12.769902] fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00, driver
10 Dec 2004
[   12.780758] usb usb1: configuration #1 chosen from 1 choice
[   12.787885] hub 1-0:1.0: USB hub found
[   12.791820] hub 1-0:1.0: 1 port detected
[   12.900109] Initializing USB Mass Storage driver...
[   12.906124] usbcore: registered new interface driver usb-storage
[   12.912183] USB Mass Storage support registered.
[   12.916884] Freescale High-Speed USB SOC Device Controller driver
(Feb 5, 2007)
[   12.925310] i2c /dev entries driver
[   12.958762] TCP cubic registered
[   12.962118] NET: Registered protocol family 1
[   12.966558] NET: Registered protocol family 17
[   12.972695] BUG: scheduling while atomic: swapper/0x00000001/1
[   12.978516] Call Trace:
[   12.980956] [C07F1D50] [C0009074] show_stack+0x50/0x190 (unreliable)
[   12.987334] [C07F1D80] [C028EB94] schedule+0x4c/0x6fc
[   12.992405] [C07F1DD0] [C028F8B8] schedule_timeout+0x64/0xe0
[   12.998073] [C07F1E10] [C01FF1BC] i2c_wait+0x138/0x1ec
[   13.003221] [C07F1E50] [C01FF4D4] mpc_xfer+0x264/0x3e4
[   13.008365] [C07F1E90] [C01FC510] i2c_transfer+0x58/0x7c
[   13.013681] [C07F1EB0] [C01FF6E4] ds1337_command+0x90/0x3e8
[   13.019258] [C07F1F30] [C0017974] ds1337_get_rtc_time+0x38/0x58
[   13.025189] [C07F1F50] [C0321494] mpc8313_rtc_hookup+0x64/0xb0
[   13.031037] [C07F1F90] [C0003964] init+0x94/0x2b4
[   13.035748] [C07F1FF0] [C00112BC] kernel_thread+0x44/0x60
[   13.041475] BUG: scheduling while atomic: swapper/0x00000001/1
[   13.047342] Call Trace:
[   13.049807] [C07F1D50] [C0009074] show_stack+0x50/0x190 (unreliable)
[   13.056242] [C07F1D80] [C028EB94] schedule+0x4c/0x6fc
[   13.061358] [C07F1DD0] [C028F8B8] schedule_timeout+0x64/0xe0
[   13.067077] [C07F1E10] [C01FF1BC] i2c_wait+0x138/0x1ec
[   13.072276] [C07F1E50] [C01FF558] mpc_xfer+0x2e8/0x3e4
[   13.077467] [C07F1E90] [C01FC510] i2c_transfer+0x58/0x7c
[   13.082827] [C07F1EB0] [C01FF6E4] ds1337_command+0x90/0x3e8
[   13.088452] [C07F1F30] [C0017974] ds1337_get_rtc_time+0x38/0x58
[   13.094430] [C07F1F50] [C0321494] mpc8313_rtc_hookup+0x64/0xb0
[   13.100326] [C07F1F90] [C0003964] init+0x94/0x2b4
[   13.105081] [C07F1FF0] [C00112BC] kernel_thread+0x44/0x60
[   13.110555] BUG: scheduling while atomic: swapper/0x00000001/1
[   13.116415] Call Trace:
[   13.118877] [C07F1D50] [C0009074] show_stack+0x50/0x190 (unreliable)
[   13.125310] [C07F1D80] [C028EB94] schedule+0x4c/0x6fc
[   13.130421] [C07F1DD0] [C028F8B8] schedule_timeout+0x64/0xe0
[   13.136132] [C07F1E10] [C01FF1BC] i2c_wait+0x138/0x1ec
[   13.141329] [C07F1E50] [C01FF360] mpc_xfer+0xf0/0x3e4
[   13.146437] [C07F1E90] [C01FC510] i2c_transfer+0x58/0x7c
[   13.151798] [C07F1EB0] [C01FF6E4] ds1337_command+0x90/0x3e8
[   13.157421] [C07F1F30] [C0017974] ds1337_get_rtc_time+0x38/0x58
[   13.163397] [C07F1F50] [C0321494] mpc8313_rtc_hookup+0x64/0xb0
[   13.169293] [C07F1F90] [C0003964] init+0x94/0x2b4
[   13.174048] [C07F1FF0] [C00112BC] kernel_thread+0x44/0x60
[   13.179520] BUG: scheduling while atomic: swapper/0x00000001/1
[   13.185379] Call Trace:
[   13.187843] [C07F1D50] [C0009074] show_stack+0x50/0x190 (unreliable)
[   13.194275] [C07F1D80] [C028EB94] schedule+0x4c/0x6fc
[   13.199387] [C07F1DD0] [C028F8B8] schedule_timeout+0x64/0xe0
[   13.205097] [C07F1E10] [C01FF1BC] i2c_wait+0x138/0x1ec
[   13.210299] [C07F1E50] [C01FF400] mpc_xfer+0x190/0x3e4
[   13.215491] [C07F1E90] [C01FC510] i2c_transfer+0x58/0x7c
[   13.220853] [C07F1EB0] [C01FF6E4] ds1337_command+0x90/0x3e8
[   13.226477] [C07F1F30] [C0017974] ds1337_get_rtc_time+0x38/0x58
[   13.232455] [C07F1F50] [C0321494] mpc8313_rtc_hookup+0x64/0xb0
[   13.238348] [C07F1F90] [C0003964] init+0x94/0x2b4
[   13.243105] [C07F1FF0] [C00112BC] kernel_thread+0x44/0x60
[   13.248576] BUG: scheduling while atomic: swapper/0x00000001/1
[   13.254435] Call Trace:
[   13.256899] [C07F1D50] [C0009074] show_stack+0x50/0x190 (unreliable)
[   13.263333] [C07F1D80] [C028EB94] schedule+0x4c/0x6fc
[   13.268448] [C07F1DD0] [C028F8B8] schedule_timeout+0x64/0xe0
[   13.274158] [C07F1E10] [C01FF1BC] i2c_wait+0x138/0x1ec
[   13.279355] [C07F1E50] [C01FF400] mpc_xfer+0x190/0x3e4
[   13.284546] [C07F1E90] [C01FC510] i2c_transfer+0x58/0x7c
[   13.289904] [C07F1EB0] [C01FF6E4] ds1337_command+0x90/0x3e8
[   13.295528] [C07F1F30] [C0017974] ds1337_get_rtc_time+0x38/0x58
[   13.301505] [C07F1F50] [C0321494] mpc8313_rtc_hookup+0x64/0xb0
[   13.307394] [C07F1F90] [C0003964] init+0x94/0x2b4
[   13.312146] [C07F1FF0] [C00112BC] kernel_thread+0x44/0x60
[   13.317616] BUG: scheduling while atomic: swapper/0x00000001/1
[   13.323475] Call Trace:
[   13.325938] [C07F1D50] [C0009074] show_stack+0x50/0x190 (unreliable)
[   13.332376] [C07F1D80] [C028EB94] schedule+0x4c/0x6fc
[   13.337489] [C07F1DD0] [C028F8B8] schedule_timeout+0x64/0xe0
[   13.343209] [C07F1E10] [C01FF1BC] i2c_wait+0x138/0x1ec
[   13.348406] [C07F1E50] [C01FF400] mpc_xfer+0x190/0x3e4
[   13.353595] [C07F1E90] [C01FC510] i2c_transfer+0x58/0x7c
[   13.358955] [C07F1EB0] [C01FF6E4] ds1337_command+0x90/0x3e8
[   13.364581] [C07F1F30] [C0017974] ds1337_get_rtc_time+0x38/0x58
[   13.370558] [C07F1F50] [C0321494] mpc8313_rtc_hookup+0x64/0xb0
[   13.376449] [C07F1F90] [C0003964] init+0x94/0x2b4
[   13.381208] [C07F1FF0] [C00112BC] kernel_thread+0x44/0x60
[   13.386678] BUG: scheduling while atomic: swapper/0x00000001/1
[   13.392537] Call Trace:
[   13.395000] [C07F1D50] [C0009074] show_stack+0x50/0x190 (unreliable)
[   13.401438] [C07F1D80] [C028EB94] schedule+0x4c/0x6fc
[   13.406547] [C07F1DD0] [C028F8B8] schedule_timeout+0x64/0xe0
[   13.412267] [C07F1E10] [C01FF1BC] i2c_wait+0x138/0x1ec
[   13.417459] [C07F1E50] [C01FF400] mpc_xfer+0x190/0x3e4
[   13.422646] [C07F1E90] [C01FC510] i2c_transfer+0x58/0x7c
[   13.428006] [C07F1EB0] [C01FF6E4] ds1337_command+0x90/0x3e8
[   13.433631] [C07F1F30] [C0017974] ds1337_get_rtc_time+0x38/0x58
[   13.439608] [C07F1F50] [C0321494] mpc8313_rtc_hookup+0x64/0xb0
[   13.445497] [C07F1F90] [C0003964] init+0x94/0x2b4
[   13.450257] [C07F1FF0] [C00112BC] kernel_thread+0x44/0x60
[   13.455728] BUG: scheduling while atomic: swapper/0x00000001/1
[   13.461587] Call Trace:
[   13.464050] [C07F1D50] [C0009074] show_stack+0x50/0x190 (unreliable)
[   13.470479] [C07F1D80] [C028EB94] schedule+0x4c/0x6fc
[   13.475589] [C07F1DD0] [C028F8B8] schedule_timeout+0x64/0xe0
[   13.481308] [C07F1E10] [C01FF1BC] i2c_wait+0x138/0x1ec
[   13.486504] [C07F1E50] [C01FF400] mpc_xfer+0x190/0x3e4
[   13.491692] [C07F1E90] [C01FC510] i2c_transfer+0x58/0x7c
[   13.497052] [C07F1EB0] [C01FF6E4] ds1337_command+0x90/0x3e8
[   13.502676] [C07F1F30] [C0017974] ds1337_get_rtc_time+0x38/0x58
[   13.508654] [C07F1F50] [C0321494] mpc8313_rtc_hookup+0x64/0xb0
[   13.514547] [C07F1F90] [C0003964] init+0x94/0x2b4
[   13.519307] [C07F1FF0] [C00112BC] kernel_thread+0x44/0x60
[   13.524779] BUG: scheduling while atomic: swapper/0x00000001/1
[   13.530637] Call Trace:
[   13.533102] [C07F1D50] [C0009074] show_stack+0x50/0x190 (unreliable)
[   13.539530] [C07F1D80] [C028EB94] schedule+0x4c/0x6fc
[   13.544641] [C07F1DD0] [C028F8B8] schedule_timeout+0x64/0xe0
[   13.550358] [C07F1E10] [C01FF1BC] i2c_wait+0x138/0x1ec
[   13.555550] [C07F1E50] [C01FF400] mpc_xfer+0x190/0x3e4
[   13.560736] [C07F1E90] [C01FC510] i2c_transfer+0x58/0x7c
[   13.566096] [C07F1EB0] [C01FF6E4] ds1337_command+0x90/0x3e8
[   13.571719] [C07F1F30] [C0017974] ds1337_get_rtc_time+0x38/0x58
[   13.577696] [C07F1F50] [C0321494] mpc8313_rtc_hookup+0x64/0xb0
[   13.583587] [C07F1F90] [C0003964] init+0x94/0x2b4
[   13.588347] [C07F1FF0] [C00112BC] kernel_thread+0x44/0x60
[   13.593815] BUG: scheduling while atomic: swapper/0x00000001/1
[   13.599674] Call Trace:
[   13.602138] [C07F1D50] [C0009074] show_stack+0x50/0x190 (unreliable)
[   13.608564] [C07F1D80] [C028EB94] schedule+0x4c/0x6fc
[   13.613673] [C07F1DD0] [C028F8B8] schedule_timeout+0x64/0xe0
[   13.619386] [C07F1E10] [C01FF1BC] i2c_wait+0x138/0x1ec
[   13.624580] [C07F1E50] [C01FF400] mpc_xfer+0x190/0x3e4
[   13.629769] [C07F1E90] [C01FC510] i2c_transfer+0x58/0x7c
[   13.635129] [C07F1EB0] [C01FF6E4] ds1337_command+0x90/0x3e8
[   13.640752] [C07F1F30] [C0017974] ds1337_get_rtc_time+0x38/0x58
[   13.646729] [C07F1F50] [C0321494] mpc8313_rtc_hookup+0x64/0xb0
[   13.652630] [C07F1F90] [C0003964] init+0x94/0x2b4
[   13.657387] [C07F1FF0] [C00112BC] kernel_thread+0x44/0x60
[   14.470018] Empty flash at 0x003a4d74 ends at 0x003a4e00
[   14.716173] Empty flash at 0x00a0d15c ends at 0x00a0d200
[   14.721669] Empty flash at 0x00a0e604 ends at 0x00a0e800
[   14.831533] Empty flash at 0x00c88408 ends at 0x00c88600
[   14.836997] Empty flash at 0x00c89420 ends at 0x00c89600
[   14.842420] Empty flash at 0x00c8a420 ends at 0x00c8a600
[   14.909287] Empty flash at 0x00e24f30 ends at 0x00e25000
[   14.968135] Empty flash at 0x00f99318 ends at 0x00f99400
[   15.058060] Empty flash at 0x011806f4 ends at 0x01180800
[   15.154096] Empty flash at 0x013a11b4 ends at 0x013a1200
[   15.562613] Empty flash at 0x01850258 ends at 0x01850400
[   15.594730] Empty flash at 0x018bcd40 ends at 0x018bce00
[   15.600200] Empty flash at 0x018be8b0 ends at 0x018bea00
[   15.605597] Empty flash at 0x018bf15c ends at 0x018bf200
[   15.848968] Empty flash at 0x01c89abc ends at 0x01c89c00
[   15.887667] Empty flash at 0x01d29218 ends at 0x01d29400
[   15.893204] Empty flash at 0x01d2a060 ends at 0x01d2a200
[   16.139702] VFS: Mounted root (jffs2 filesystem).
[   16.145042] Freeing unused kernel memory: 144k init
Setting the hostname to freescale
Mounting filesystems
[   17.514073] JFFS2 notice: (717) check_node_data: wrong data CRC in
data node at 0x01c89800: read 0x2d1ba49a, calculated 0xa8ef5d7e.
Starting syslogd and klogd
Running sysctl
Setting up networking on loopback device:
Setting up networking on eth0:
udhcpc (v0.9.9-pre) started
Sending discover...
[   18.727343] BUG: spinlock recursion on CPU#0, jffs2_gcd_mtd4/736
[   18.733391]  lock: c7fbb320, .magic: dead4ead, .owner:
jffs2_gcd_mtd4/736, .owner_cpu: 0
[   18.741492] Call Trace:
[   18.743950] [C7C79C50] [C0009074] show_stack+0x50/0x190 (unreliable)
[   18.750380] [C7C79C80] [C014E7B0] spin_bug+0x94/0xb0
[   18.755393] [C7C79CA0] [C014EBCC] _raw_spin_lock+0x180/0x184
[   18.761092] [C7C79CD0] [C0290EB8] _spin_lock+0x20/0x30
[   18.766278] [C7C79CE0] [C01997EC] gfar_transmit+0x50/0x290
[   18.771807] [C7C79D10] [C0043A10] handle_IRQ_event+0x5c/0xb0
[   18.777511] [C7C79D30] [C004594C] handle_level_irq+0xb0/0x178
[   18.783301] [C7C79D50] [C000645C] do_IRQ+0xa4/0xc8
[   18.788138] [C7C79D60] [C0010B08] ret_from_except+0x0/0x14
[   18.793670] --- Exception: 501 at check_poison_obj+0x9c/0x1f0
[   18.799457]     LR = check_poison_obj+0x28/0x1f0
[   18.804084] [C7C79E20] [C0067A54] kmem_cache_free+0x84/0x108 (unreliable)
[   18.810928] [C7C79E50] [C0066918] cache_alloc_debugcheck_after+0xfc/0x1f0
[   18.817760] [C7C79E70] [C0067968] kmem_cache_zalloc+0xac/0x114
[   18.823636] [C7C79E90] [C0120690] jffs2_do_crccheck_inode+0x2c/0xb4
[   18.829957] [C7C79F00] [C01245C0] jffs2_garbage_collect_pass+0x154/0x7b4
[   18.836708] [C7C79F50] [C0125FF8] jffs2_garbage_collect_thread+0xac/0x170
[   18.843540] [C7C79FF0] [C00112BC] kernel_thread+0x44/0x60
[   23.336327] BUG: spinlock lockup on CPU#0, jffs2_gcd_mtd4/736, c7fbb320
[   23.342946] Call Trace:
[   23.345405] [C7C79C70] [C0009074] show_stack+0x50/0x190 (unreliable)
[   23.351819] [C7C79CA0] [C014EB84] _raw_spin_lock+0x138/0x184
[   23.357521] [C7C79CD0] [C0290EB8] _spin_lock+0x20/0x30
[   23.362700] [C7C79CE0] [C01997EC] gfar_transmit+0x50/0x290
[   23.368231] [C7C79D10] [C0043A10] handle_IRQ_event+0x5c/0xb0
[   23.373931] [C7C79D30] [C004594C] handle_level_irq+0xb0/0x178
[   23.379719] [C7C79D50] [C000645C] do_IRQ+0xa4/0xc8
[   23.384553] [C7C79D60] [C0010B08] ret_from_except+0x0/0x14
[   23.390084] --- Exception: 501 at check_poison_obj+0x9c/0x1f0
[   23.395868]     LR = check_poison_obj+0x28/0x1f0
[   23.400498] [C7C79E20] [C0067A54] kmem_cache_free+0x84/0x108 (unreliable)
[   23.407341] [C7C79E50] [C0066918] cache_alloc_debugcheck_after+0xfc/0x1f0
[   23.414175] [C7C79E70] [C0067968] kmem_cache_zalloc+0xac/0x114
[   23.420055] [C7C79E90] [C0120690] jffs2_do_crccheck_inode+0x2c/0xb4
[   23.426376] [C7C79F00] [C01245C0] jffs2_garbage_collect_pass+0x154/0x7b4
[   23.433129] [C7C79F50] [C0125FF8] jffs2_garbage_collect_thread+0xac/0x170
[   23.439959] [C7C79FF0] [C00112BC] kernel_thread+0x44/0x60
[   33.446870] BUG: soft lockup detected on CPU#0!
[   33.451386] Call Trace:
[   33.453826] [C7C79AE0] [C0009074] show_stack+0x50/0x190 (unreliable)
[   33.460202] [C7C79B10] [C0043904] softlockup_tick+0xb8/0xe0
[   33.465779] [C7C79B30] [C0027518] run_local_timers+0x18/0x28
[   33.471454] [C7C79B40] [C0027558] update_process_times+0x30/0x7c
[   33.477468] [C7C79B50] [C000D344] timer_interrupt+0x124/0x5c8
[   33.483218] [C7C79BE0] [C0010B08] ret_from_except+0x0/0x14
[   33.488709] --- Exception: 901 at _raw_spin_lock+0x13c/0x184
[   33.494370]     LR = _raw_spin_lock+0xf8/0x184
[   33.498800] [C7C79CA0] [C014EB84] _raw_spin_lock+0x138/0x184 (unreliable)
[   33.505598] [C7C79CD0] [C0290EB8] _spin_lock+0x20/0x30
[   33.510744] [C7C79CE0] [C01997EC] gfar_transmit+0x50/0x290
[   33.516238] [C7C79D10] [C0043A10] handle_IRQ_event+0x5c/0xb0
[   33.521905] [C7C79D30] [C004594C] handle_level_irq+0xb0/0x178
[   33.527659] [C7C79D50] [C000645C] do_IRQ+0xa4/0xc8
[   33.532461] [C7C79D60] [C0010B08] ret_from_except+0x0/0x14
[   33.537951] --- Exception: 501 at check_poison_obj+0x9c/0x1f0
[   33.543701]     LR = check_poison_obj+0x28/0x1f0
[   33.548304] [C7C79E20] [C0067A54] kmem_cache_free+0x84/0x108 (unreliable)
[   33.555103] [C7C79E50] [C0066918] cache_alloc_debugcheck_after+0xfc/0x1f0
[   33.561895] [C7C79E70] [C0067968] kmem_cache_zalloc+0xac/0x114
[   33.567733] [C7C79E90] [C0120690] jffs2_do_crccheck_inode+0x2c/0xb4
[   33.574016] [C7C79F00] [C01245C0] jffs2_garbage_collect_pass+0x154/0x7b4
[   33.580724] [C7C79F50] [C0125FF8] jffs2_garbage_collect_thread+0xac/0x170
[   33.587515] [C7C79FF0] [C00112BC] kernel_thread+0x44/0x60
 ################################# END
##########################################################

^ permalink raw reply

* Please pull from 'merge'
From: Kumar Gala @ 2009-04-07  6:42 UTC (permalink / raw)
  To: Paul Mackerras, Benjamin Herrenschmidt; +Cc: linuxppc-dev

These are all either regressions or bug fixes.

- k

Please pull from 'merge' branch of

	master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git merge

to receive the following updates:

 arch/powerpc/boot/dts/tqm8540.dts           |    4
 arch/powerpc/boot/dts/tqm8541.dts           |    4
 arch/powerpc/boot/dts/tqm8548-bigflash.dts  |    8 -
 arch/powerpc/boot/dts/tqm8548.dts           |    8 -
 arch/powerpc/boot/dts/tqm8555.dts           |    4
 arch/powerpc/boot/dts/tqm8560.dts           |    4
 arch/powerpc/configs/85xx/tqm8548_defconfig |  164 ++++++++--------------------
 arch/powerpc/include/asm/mmu.h              |    6 +
 arch/powerpc/include/asm/ppc-opcode.h       |   13 +-
 arch/powerpc/kernel/cputable.c              |    2
 arch/powerpc/mm/tlb_nohash_low.S            |   14 ++
 11 files changed, 95 insertions(+), 136 deletions(-)

Kumar Gala (2):
      powerpc: Fix tlbilx opcode
      powerpc: Add support for early tlbilx opcode

Wolfgang Grandegger (3):
      powerpc/85xx: TQM85xx: correct address of LM75 I2C device nodes
      powerpc/85xx: TQM8548: use proper phy-handles for enet2 and enet3
      powerpc/85xx: TQM8548: update defconfig

^ permalink raw reply

* Re: [PATCH] powerpc: Add support for early tlbilx opcode
From: Michael Ellerman @ 2009-04-07  6:43 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <1239084821-10121-1-git-send-email-galak@kernel.crashing.org>

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

On Tue, 2009-04-07 at 01:13 -0500, Kumar Gala wrote:
> During the ISA 2.06 development the opcode for tlbilx changed and some
> early implementations used to old opcode.  Add support for a MMU_FTR
> fixup to deal with this.
> 
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
>  arch/powerpc/include/asm/mmu.h        |    6 ++++++
>  arch/powerpc/include/asm/ppc-opcode.h |   11 ++++++++++-
>  arch/powerpc/kernel/cputable.c        |    2 +-
>  arch/powerpc/mm/tlb_nohash_low.S      |   14 +++++++++++++-
>  4 files changed, 30 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/mmu.h b/arch/powerpc/include/asm/mmu.h
> index cbf1543..86d2366 100644
> --- a/arch/powerpc/include/asm/mmu.h
> +++ b/arch/powerpc/include/asm/mmu.h
> @@ -52,6 +52,12 @@
>   */
>  #define MMU_FTR_NEED_DTLB_SW_LRU	ASM_CONST(0x00200000)
>  
> +/* This indicates that the processor uses the wrong opcode for tlbilx
> + * instructions.  During the ISA 2.06 development the opcode for tlbilx
> + * changed and some early implementations used to old opcode
> + */
> +#define MMU_FTR_TLBILX_EARLY_OPCODE	ASM_CONST(0x00400000)

You're actually going to ship those parts? :)

It seems a pity to use up a feature bit.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply

* Re: Bug:scheduling while atomic
From: Kumar Gala @ 2009-04-07  6:42 UTC (permalink / raw)
  To: Vijay Nikam; +Cc: Scott Wood, linuxppc-dev
In-Reply-To: <f234e2140904062329i48630711safdedf786ab7f0c6@mail.gmail.com>


On Apr 7, 2009, at 1:29 AM, Vijay Nikam wrote:

> Hello All,
>
> I have mpc8313erb with linux kernel 2.6.20.
>
> When I ported the kernel with CONFIG_PREEMPT=y (Enabled) I am getting
> the 'scheduling while atomic'. Please check the following call trace,
> thanks.
>
> Could anyone please let me to the way to fix it ? ? ?
>
> Kindly please acknowledge ... thank you ...
>
> Kind Regards,
> Vijay Nikam

Have you tried a newer kernel (like 2.6.29) and see if the issue still  
exists.

- k

^ permalink raw reply

* Re: [PATCH] powerpc: Add support for early tlbilx opcode
From: Kumar Gala @ 2009-04-07  7:04 UTC (permalink / raw)
  To: michael; +Cc: linuxppc-dev
In-Reply-To: <1239086621.6565.25.camel@localhost>


On Apr 7, 2009, at 1:43 AM, Michael Ellerman wrote:

>
> You're actually going to ship those parts? :)

I hope not, but until someone tells me otherwise I want the fix in  
(less headache for me).  We can easily revert this one commit if it  
becomes clear that such parts "never really existed". ;)

> It seems a pity to use up a feature bit.

MMU feature bits are new so we have a slew of them :)

- k

^ permalink raw reply

* Re: [PATCH] powerpc: wire up preadv and pwritev
From: Subrata Modak @ 2009-04-07  6:51 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: ltp-list, maknayak, linuxppc-dev, Paul Mackerras, Gerd Hoffmann
In-Reply-To: <20090407131950.9ab4430b.sfr@canb.auug.org.au>

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

Hi Stephen,

On Tue, Apr 7, 2009 at 8:49 AM, Stephen Rothwell <sfr@canb.auug.org.au>wrote:

>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  arch/powerpc/include/asm/systbl.h |    2 ++
>  arch/powerpc/include/asm/unistd.h |    4 +++-
>  2 files changed, 5 insertions(+), 1 deletions(-)
>
> Tested on pseries_defconfig (verified using strace{,64} and inspecting
> the files).  Test program (modified from the original because the API and
> ABI changed and I added a test with larger offsets):
>
> #if 0
> set -x
> gcc -Wall -O2 -m32 -o preadv $0
> gcc -Wall -O2 -m32 -D_FILE_OFFSET_BITS=64 -DLARGE_TEST -o preadv32 $0
> gcc -Wall -O2 -m64 -DLARGE_TEST -o preadv64 $0
> ./preadv
> ./preadv32
> ./preadv64
> exit 0
> #endif
> /*
>  * preadv demo / test
>  *
>  * (c) 2008 Gerd Hoffmann <kraxel@redhat.com>
>  * Modified for new ABI and large offset test by Stephen Rothwell
>  *
>  * build with "sh $thisfile"
>  */
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
> #include <errno.h>
> #include <inttypes.h>
> #include <sys/uio.h>
>
> /* ----------------------------------------------------------------- */
> /* syscall windup                                                    */
>
> #include <sys/syscall.h>
> #if 1
> /* WARNING: Be sure you know what you are doing if you enable this.
>  * linux syscall code isn't upstream yet, syscall numbers are subject
>  * to change */
> # ifndef __NR_preadv
> #  ifdef __i386__
> #   define __NR_preadv  333
> #   define __NR_pwritev 334
> #  endif
> #  ifdef __x86_64__
> #   define __NR_preadv  295
> #   define __NR_pwritev 296
> #  endif
> #  ifdef __powerpc__
> #   define __NR_preadv  319
> #   define __NR_pwritev 320
> #  endif
> # endif
> #endif
> #ifndef __NR_preadv
> # error preadv/pwritev syscall numbers are unknown
> #endif
>
> #define HALF_BITS (sizeof(unsigned long)*4)
>
> static ssize_t preadv(int fd, const struct iovec *iov, int iovcnt,
>                      off_t offset)
> {
>        return syscall(__NR_preadv, fd, iov, iovcnt,
>                       (unsigned long)offset,
>                       (unsigned long)((offset >> HALF_BITS) >> HALF_BITS));
> }
>
> static ssize_t pwritev(int fd, const struct iovec *iov, int iovcnt,
>                       off_t offset)
> {
>        return syscall(__NR_pwritev, fd, iov, iovcnt,
>                       (unsigned long)offset,
>                       (unsigned long)((offset >> HALF_BITS) >> HALF_BITS));
> }
>
> /* ----------------------------------------------------------------- */
> /* demo/test app                                                     */
>
> static char filename[] = "/tmp/preadv-XXXXXX";
> static char outbuf[11] = "0123456789";
> static char inbuf[11]  = "----------";
>
> static struct iovec ovec[2] = {{
>                .iov_base = outbuf + 5,
>                .iov_len  = 5,
>        },{
>                .iov_base = outbuf + 0,
>                .iov_len  = 5,
>        }};
>
> static struct iovec ivec[3] = {{
>                .iov_base = inbuf + 6,
>                .iov_len  = 2,
>        },{
>                .iov_base = inbuf + 4,
>                .iov_len  = 2,
>        },{
>                .iov_base = inbuf + 2,
>                .iov_len  = 2,
>        }};
>
> void cleanup(void)
> {
>        unlink(filename);
> }
>
> int main(int argc, char **argv)
> {
>        int fd, rc;
>
>        fd = mkstemp(filename);
>        if (-1 == fd) {
>                perror("mkstemp");
>                exit(1);
>        }
>        atexit(cleanup);
>
>        /* write to file: "56789-01234" */
>        rc = pwritev(fd, ovec, 2, 0);
>        if (rc < 0) {
>                perror("pwritev");
>                exit(1);
>        }
>
>        /* read from file: "78-90-12" */
>        rc = preadv(fd, ivec, 3, 2);
>        if (rc < 0) {
>                perror("preadv");
>                exit(1);
>        }
>
>        printf("result  : %s\n", inbuf);
>        printf("expected: %s\n", "--129078--");
>
> #ifdef LARGE_TEST
>
>        /* write to file: "56789-01234" */
>        rc = pwritev(fd, ovec, 2, 0x300000000ULL);
>        if (rc < 0) {
>                perror("pwritev");
>                exit(1);
>        }
>
>        /* read from file: "78-90-12" */
>        rc = preadv(fd, ivec, 3, 0x300000000ULL + 2);
>        if (rc < 0) {
>                perror("preadv");
>                exit(1);
>        }
>
>        printf("result  : %s\n", inbuf);
>        printf("expected: %s\n", "--129078--");
>
> #endif
>
>        exit(0);
> }
>

How about contributing the above test to LTP(http://ltp.sourceforge.net/)
under GPL ? If you agree, i would soon send you a Patch integrating the same
to LTP.

Regards--
Subrata


>
> diff --git a/arch/powerpc/include/asm/systbl.h
> b/arch/powerpc/include/asm/systbl.h
> index fe16649..3fb6d9e 100644
> --- a/arch/powerpc/include/asm/systbl.h
> +++ b/arch/powerpc/include/asm/systbl.h
> @@ -322,3 +322,5 @@ SYSCALL_SPU(epoll_create1)
>  SYSCALL_SPU(dup3)
>  SYSCALL_SPU(pipe2)
>  SYSCALL(inotify_init1)
> +COMPAT_SYS_SPU(preadv)
> +COMPAT_SYS_SPU(pwritev)
> diff --git a/arch/powerpc/include/asm/unistd.h
> b/arch/powerpc/include/asm/unistd.h
> index e07d0c7..7e03ebe 100644
> --- a/arch/powerpc/include/asm/unistd.h
> +++ b/arch/powerpc/include/asm/unistd.h
> @@ -341,10 +341,12 @@
>  #define __NR_dup3              316
>  #define __NR_pipe2             317
>  #define __NR_inotify_init1     318
> +#define __NR_preadv            319
> +#define __NR_pwritev           320
>
>  #ifdef __KERNEL__
>
> -#define __NR_syscalls          319
> +#define __NR_syscalls          321
>
>  #define __NR__exit __NR_exit
>  #define NR_syscalls    __NR_syscalls
> --
> 1.6.2.1
>
> --
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/ <http://www.canb.auug.org.au/%7Esfr/>
> --
> 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/
>



-- 
Regards & Thanks--
Subrata

[-- Attachment #2: Type: text/html, Size: 8487 bytes --]

^ permalink raw reply

* Re: [PATCH] powerpc: Keep track of emulated instructions
From: Geert Uytterhoeven @ 2009-04-07  7:26 UTC (permalink / raw)
  To: Michael Neuling; +Cc: Linux/PPC Development
In-Reply-To: <12794.1239057838@neuling.org>

On Tue, 7 Apr 2009, Michael Neuling wrote:
> In message <alpine.LRH.2.00.0904061430090.11076@vixen.sonytel.be> you wrote:
> > On Fri, 3 Apr 2009, Kumar Gala wrote:
> > > On Apr 3, 2009, at 7:08 AM, Geert Uytterhoeven wrote:
> > > >Finally (after ca. 1.5 years), he're an updated version of my patch to k=
> > eep
> > > >track of emulated instructions.  In the light of Kumar's `Emulate enough=
> >  of
> > > >SPE
> > > >instructions to make gcc happy' patch, he probably also wants to keep tr=
> > ack
> > > >of
> > > >the actual runtime overhead.
> > > >
> > > >Changes since last version:
> > > > - arch/powerpc/kernel/sysfs.c is now compiled on ppc32, so we can provi=
> > de
> > > >   counters in sysfs on ppc32, too,
> > > > - WARN_EMULATED() is a no-op if CONFIG_SYSCTL is disabled,
> > > > - Add warnings for altivec,
> > > > - Add warnings for recently introduced emulation of vsx and isel
> > > >   instructions.
> > > =
> > 
> > > pretty cool.  Do we think counters should be sysfs or debugfs?
> > 
> > What do you prefer?
> > 
> > On MIPS, unaligned exception handling control is in debugfs.
> 
> Would per process counters be too hard?  Stick them in the thread_struct
> and export them via /proc/<pid>/emulated. 

But they go away as soon as the process exits, right?

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

^ permalink raw reply

* Re: [PATCH] powerpc: wire up preadv and pwritev
From: Stephen Rothwell @ 2009-04-07  7:30 UTC (permalink / raw)
  To: Subrata Modak
  Cc: ltp-list, maknayak, linuxppc-dev, Paul Mackerras, Gerd Hoffmann
In-Reply-To: <bb33bcf20904062351p63645851h9b33d47f57c57e7f@mail.gmail.com>

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

Hi Subrata,

On Tue, 7 Apr 2009 12:21:18 +0530 Subrata Modak <tosubrata@gmail.com> wrote:
>
> How about contributing the above test to LTP(http://ltp.sourceforge.net/)
> under GPL ? If you agree, i would soon send you a Patch integrating the same
> to LTP.

I have no problem with that.  However, the test was originally written by
Gerd Hoffmann and is essentially unchanged (i just updated some details),
so I think that is where you should direct your request.

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

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

^ permalink raw reply

* Re: [PATCH] powerpc: Add configurable -Werror for arch/powerpc
From: Geert Uytterhoeven @ 2009-04-07  7:41 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linuxppc-dev, Kumar Gala
In-Reply-To: <20090407022743.GA12174@lixom.net>

On Mon, 6 Apr 2009, Olof Johansson wrote:
> On Tue, Apr 07, 2009 at 12:00:41PM +1000, Michael Ellerman wrote:
> > Add an option, on by default, to build all code under arch/powerpc with
> > -Werror, which causes gcc to treat warnings as errors.
> > 
> > The intention is to make it harder for people to inadvertantly introduce
> > errors in the arch/powerpc code. It needs to be configurable so that
> > if a warning is introduced, people can easily work around it while it's
> > being fixed.
> 
> This looks useful at least for the automated builds to catch new warnings,
> but do similar options exist on other architectures, x86 in particular? I
> think a Cc to LKML of this could be useful.
> 
> This is really only beneficial if various people build for powerpc often
> enough. If major subsystem maintainers aren't going to hit the errors
> it's more of a hinderance for PPC than a global benefit, right?

Will be built nightly: http://kisskb.ellerman.id.au/kisskb/matrix/

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

^ permalink raw reply


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