LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 0/4] De-couple sysfs memory directories from memory sections
From: Dave Hansen @ 2011-01-20 17:09 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, linux-mm, Robin Holt, linuxppc-dev,
	KAMEZAWA Hiroyuki
In-Reply-To: <20110120164555.GA30922@kroah.com>

On Thu, 2011-01-20 at 08:45 -0800, Greg KH wrote:
> On Thu, Jan 20, 2011 at 10:36:40AM -0600, Nathan Fontenot wrote:
> > The root of this issue is in sysfs directory creation. Every time
> > a directory is created a string compare is done against sibling
> > directories ( see sysfs_find_dirent() ) to ensure we do not create 
> > duplicates.  The list of directory nodes in sysfs is kept as an
> > unsorted list which results in this being an exponentially longer
> > operation as the number of directories are created.
> 
> Again, are you sure about this?  I thought we resolved this issue in the
> past, but you were going to check it.  Did you?

Just to be clear, simply reducing the number of kobjects can make these
patches worthwhile on their own.  I originally figured that the
SECTION_SIZE would go up over time as systems got larger, and _that_
would keep the number of sections and number of sysfs objects down.
Well, that turned out to be wrong, and we're eating up a ton of memory
now.  We can't fix the SECTION_SIZE easily, but we can reduce the number
of kobjects that we need to track the sections.  *That* is the main
benefit I see from these patches.

I think there's a problem worth fixing, even ignoring the directory
creation issue (if it still exists).

-- Dave

^ permalink raw reply

* Re: [PATCH 0/4] De-couple sysfs memory directories from memory sections
From: Greg KH @ 2011-01-20 17:25 UTC (permalink / raw)
  To: Nathan Fontenot
  Cc: linux-mm, linuxppc-dev, linux-kernel, KAMEZAWA Hiroyuki,
	Robin Holt
In-Reply-To: <4D386820.5080902@austin.ibm.com>

On Thu, Jan 20, 2011 at 10:51:44AM -0600, Nathan Fontenot wrote:
> On 01/20/2011 10:45 AM, Greg KH wrote:
> > On Thu, Jan 20, 2011 at 10:36:40AM -0600, Nathan Fontenot wrote:
> >> The root of this issue is in sysfs directory creation. Every time
> >> a directory is created a string compare is done against sibling
> >> directories ( see sysfs_find_dirent() ) to ensure we do not create 
> >> duplicates.  The list of directory nodes in sysfs is kept as an
> >> unsorted list which results in this being an exponentially longer
> >> operation as the number of directories are created.
> > 
> > Again, are you sure about this?  I thought we resolved this issue in the
> > past, but you were going to check it.  Did you?
> > 
> 
> Yes, the string compare is still present in the sysfs code.  There was
> discussion around this sometime last year when I sent a patch out that
> stored the directory entries in something other than a linked list.
> That patch was rejected but it was agreed that something should be done.

Ah, ok, thanks for verifying.

greg k-h

^ permalink raw reply

* Re: [PATCH] change acquire/release_console_sem() to console_lock/unlock()
From: Andrew Morton @ 2011-01-20 20:35 UTC (permalink / raw)
  To: torbenh
  Cc: xen-devel, Kees Cook, linux-fbdev, Mark Brown, James Hogan,
	David Airlie, Jesse Barnes, James Morris, Paul Mackerras,
	linux-parisc, Magnus Damm, Jiri Slaby, Dan Williams, devel,
	Guy Martin, Kuninori Morimoto, Jeremy Fitzhardinge, Russell King,
	Thomas Gleixner, Wu Zhangjin, Florian Tobias Schandinat,
	Lionel Debroux, Helge Deller, Kay Sievers, James E.J. Bottomley,
	Kevin Hilman, Tony Lindgren, cbe-oss-dev, Ben Skeggs, Ingo Molnar,
	Daniel Vetter, Dave Airlie, David Brown, Francisco Jerez,
	virtualization, Namhyung Kim, Marcin Slusarz, Alberto Panizzo,
	Rusty Russell, Ondrej Zary, Denys Vlasenko, Antonino Daplas,
	Konrad Rzeszutek Wilk, Abhijeet Dharmapurikar, Andres Salomon,
	Werner Fink, Phil Edworthy, linux-geode, Alex Deucher,
	Jerome Glisse, Lars-Peter Clausen, Alexey Dobriyan, Daniel Mack,
	Nicolas Pitre, Thomas Gleixner, linux-omap, Ondrej Zajicek,
	linux-arm-kernel, Liam Girdwood, Daniel Walker, Linus Walleij,
	Caglar Akyuz, Geoff Levand, Jiri Kosina, dri-devel, Greg KH,
	linux-kernel, Ralf Baechle, Guennadi Liakhovetski, Kyle McMartin,
	Jean Delvare, Paul Mundt, Arnd Bergmann, Takashi Iwai,
	Jason Wessel, Tejun Heo, Julia Lawall, linuxppc-dev,
	David S. Miller, Marcin Kościelnicki
In-Reply-To: <20110120165502.GA10832@siel.b>

On Thu, 20 Jan 2011 17:55:02 +0100
torbenh <torbenh@gmx.de> wrote:

> On Thu, Jan 20, 2011 at 08:34:48AM -0800, Greg KH wrote:
> > On Thu, Jan 20, 2011 at 04:58:13PM +0100, Torben Hohn wrote:
> > > the -rt patches change the console_semaphore to console_mutex.
> > > so a quite large chunk of the patches changes all
> > > acquire/release_console_sem() to acquire/release_console_mutex()
> > 
> > Why not just change the functionality of the existing function to be a
> > mutex in the rt patches, instead of having to rename it everywhere?
> 
> i hope that Thomas already did this in his upcoming -rt series.
> 
> > 
> > > this commit makes things use more neutral function names
> > > which dont make implications about the underlying lock.
> > > 
> > > the only real change is the return value of console_trylock
> > > which is inverted from try_acquire_console_sem()
> > > 
> > > Signed-off-by: Torben Hohn <torbenh@gmx.de>
> > > CC: Thomas Gleixner <tglx@tglx.de>
> > 
> > I don't mind this rename, but is it really going to help anything out?
> > What's the odds of the -rt portion of this patch ever making it to
> > mainline?
> 
> the -rt portion only changes the semaphore to a mutex.
> since the console_sem is used with mutex semantics, i dont see any
> reason, not to merge that portion too. 
> 
> i am just trying to shrink the -rt patch to make it more maintanable :)
> 

Yeah, I think it's a better name and if we can indeed switch that
semaphore to a mutex then that's a good thing to do.

^ permalink raw reply

* Re: Oops in trace_hardirqs_on (powerpc)
From: Steven Rostedt @ 2011-01-21  0:46 UTC (permalink / raw)
  To: Jörg Sommer
  Cc: Frederic Weisbecker, Ingo Molnar, linux-kernel, linuxppc-dev
In-Reply-To: <1293072176.22802.6.camel@gandalf.stny.rr.com>

On Wed, 2010-12-22 at 21:42 -0500, Steven Rostedt wrote:
> On Sun, 2010-12-19 at 14:27 +0100, Jörg Sommer wrote:
> > Hi Steven,
> > 
> 
> > Did you've fixed this problem? The bug report is still marked as open.
> > https://bugzilla.kernel.org/show_bug.cgi?id=16573
> > 
> 
> I just posted a patch to that BZ. I have it here below too. Could you
> see if it fixes you problem. I only fixed the one place that you
> reported, it may need more fixes (and in that case a macro to do the
> work).
> 
> I hit the same bug on my ppc64 box, and have a fix for that, that I'll
> post to LKML tomorrow.


Here's my official:

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

-- Steve

> -- Steve
> 
> diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
> index ed4aeb9..915cc03 100644
> --- a/arch/powerpc/kernel/entry_32.S
> +++ b/arch/powerpc/kernel/entry_32.S
> @@ -879,7 +879,18 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_47x)
>  	 */
>  	andi.	r10,r9,MSR_EE
>  	beq	1f
> +	/*
> +	 * Since the ftrace irqsoff latency trace checks CALLER_ADDR1,
> +	 * which is the stack frame here, we need to force a stack frame
> +	 * in case we came from user space.
> +	 */
> +	stwu	r1,-32(r1)
> +	mflr	r0
> +	stw	r0,4(r1)
> +	stwu	r1,-32(r1)
>  	bl	trace_hardirqs_on
> +	lwz	r1,0(r1)
> +	lwz	r1,0(r1)
>  	lwz	r9,_MSR(r1)
>  1:
>  #endif /* CONFIG_TRACE_IRQFLAGS */
> 

^ permalink raw reply

* of_flat_dt_match() helper build FAIL
From: Benjamin Herrenschmidt @ 2011-01-21  2:15 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev

a4f740cf33f7f6c164bbde3c0cdbcc77b0c4997c introduces:

/arch/powerpc/platforms/83xx/mpc831x_rdb.c:63: error: expected '{'
before 'const'

 and more...

This hunk is obviously bogus:

+struct const char *board[] __initdata = {
+	"MPC8313ERDB",
+	"fsl,mpc8315erdb",
+	NULL
+}
+

You should at least compile test your changes :-(

Please send Linus a fix.

Cheers,
Ben.

^ permalink raw reply

* Re: of_flat_dt_match() helper build FAIL
From: Stephen Rothwell @ 2011-01-21  2:30 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1295576122.2148.271.camel@pasglop>

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

Hi Ben,

On Fri, 21 Jan 2011 13:15:22 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> a4f740cf33f7f6c164bbde3c0cdbcc77b0c4997c introduces:
> 
> /arch/powerpc/platforms/83xx/mpc831x_rdb.c:63: error: expected '{'
> before 'const'
> 
>  and more...
> 
> This hunk is obviously bogus:
> 
> +struct const char *board[] __initdata = {
> +	"MPC8313ERDB",
> +	"fsl,mpc8315erdb",
> +	NULL
> +}
> +
> 
> You should at least compile test your changes :-(
> 
> Please send Linus a fix.

Its already in Grant's devicetree/merge branch (which I assume he will
ask you to pull soon) and has been in linux-next for the past 2 days.

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

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

^ permalink raw reply

* [PATCH 7/8] powerpc/kdump: Move crash_kexec_stop_spus to kdump crash handler
From: Anton Blanchard @ 2011-01-21  2:43 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev
In-Reply-To: <20110107145954.4f421183@kryten>


And here's a version that actually compiles. Sorry Ben :)

Anton
--

Use the crash handler hooks to run the SPU stop code, just like we do for
ehea and cell RAS code.

While I'm here I noticed "CPUSs reliabally"

so fix the spelling MISTAKESs reliabally.

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

Index: powerpc.git/arch/powerpc/kernel/crash.c
===================================================================
--- powerpc.git.orig/arch/powerpc/kernel/crash.c	2011-01-21 13:41:01.192747292 +1100
+++ powerpc.git/arch/powerpc/kernel/crash.c	2011-01-21 13:41:07.272364454 +1100
@@ -48,7 +48,7 @@ int crashing_cpu = -1;
 static cpumask_t cpus_in_crash = CPU_MASK_NONE;
 cpumask_t cpus_in_sr = CPU_MASK_NONE;
 
-#define CRASH_HANDLER_MAX 2
+#define CRASH_HANDLER_MAX 3
 /* NULL terminated list of shutdown handles */
 static crash_shutdown_t crash_shutdown_handles[CRASH_HANDLER_MAX+1];
 static DEFINE_SPINLOCK(crash_handlers_lock);
@@ -125,7 +125,7 @@ static void crash_kexec_prepare_cpus(int
 	smp_wmb();
 
 	/*
-	 * FIXME: Until we will have the way to stop other CPUSs reliabally,
+	 * FIXME: Until we will have the way to stop other CPUs reliably,
 	 * the crash CPU will send an IPI and wait for other CPUs to
 	 * respond.
 	 * Delay of at least 10 seconds.
@@ -254,72 +254,6 @@ void crash_kexec_secondary(struct pt_reg
 	cpus_in_sr = CPU_MASK_NONE;
 }
 #endif
-#ifdef CONFIG_SPU_BASE
-
-#include <asm/spu.h>
-#include <asm/spu_priv1.h>
-
-struct crash_spu_info {
-	struct spu *spu;
-	u32 saved_spu_runcntl_RW;
-	u32 saved_spu_status_R;
-	u32 saved_spu_npc_RW;
-	u64 saved_mfc_sr1_RW;
-	u64 saved_mfc_dar;
-	u64 saved_mfc_dsisr;
-};
-
-#define CRASH_NUM_SPUS	16	/* Enough for current hardware */
-static struct crash_spu_info crash_spu_info[CRASH_NUM_SPUS];
-
-static void crash_kexec_stop_spus(void)
-{
-	struct spu *spu;
-	int i;
-	u64 tmp;
-
-	for (i = 0; i < CRASH_NUM_SPUS; i++) {
-		if (!crash_spu_info[i].spu)
-			continue;
-
-		spu = crash_spu_info[i].spu;
-
-		crash_spu_info[i].saved_spu_runcntl_RW =
-			in_be32(&spu->problem->spu_runcntl_RW);
-		crash_spu_info[i].saved_spu_status_R =
-			in_be32(&spu->problem->spu_status_R);
-		crash_spu_info[i].saved_spu_npc_RW =
-			in_be32(&spu->problem->spu_npc_RW);
-
-		crash_spu_info[i].saved_mfc_dar    = spu_mfc_dar_get(spu);
-		crash_spu_info[i].saved_mfc_dsisr  = spu_mfc_dsisr_get(spu);
-		tmp = spu_mfc_sr1_get(spu);
-		crash_spu_info[i].saved_mfc_sr1_RW = tmp;
-
-		tmp &= ~MFC_STATE1_MASTER_RUN_CONTROL_MASK;
-		spu_mfc_sr1_set(spu, tmp);
-
-		__delay(200);
-	}
-}
-
-void crash_register_spus(struct list_head *list)
-{
-	struct spu *spu;
-
-	list_for_each_entry(spu, list, full_list) {
-		if (WARN_ON(spu->number >= CRASH_NUM_SPUS))
-			continue;
-
-		crash_spu_info[spu->number].spu = spu;
-	}
-}
-
-#else
-static inline void crash_kexec_stop_spus(void)
-{
-}
-#endif /* CONFIG_SPU_BASE */
 
 /*
  * Register a function to be called on shutdown.  Only use this if you
@@ -439,8 +373,6 @@ void default_machine_crash_shutdown(stru
 	crash_shutdown_cpu = -1;
 	__debugger_fault_handler = old_handler;
 
-	crash_kexec_stop_spus();
-
 	if (ppc_md.kexec_cpu_down)
 		ppc_md.kexec_cpu_down(1, 0);
 }
Index: powerpc.git/arch/powerpc/platforms/cell/spu_base.c
===================================================================
--- powerpc.git.orig/arch/powerpc/platforms/cell/spu_base.c	2011-01-21 13:41:01.192747292 +1100
+++ powerpc.git/arch/powerpc/platforms/cell/spu_base.c	2011-01-21 13:42:12.358265951 +1100
@@ -37,6 +37,7 @@
 #include <asm/spu_csa.h>
 #include <asm/xmon.h>
 #include <asm/prom.h>
+#include <asm/kexec.h>
 
 const struct spu_management_ops *spu_management_ops;
 EXPORT_SYMBOL_GPL(spu_management_ops);
@@ -727,6 +728,75 @@ static ssize_t spu_stat_show(struct sys_
 
 static SYSDEV_ATTR(stat, 0644, spu_stat_show, NULL);
 
+#ifdef CONFIG_KEXEC
+
+struct crash_spu_info {
+	struct spu *spu;
+	u32 saved_spu_runcntl_RW;
+	u32 saved_spu_status_R;
+	u32 saved_spu_npc_RW;
+	u64 saved_mfc_sr1_RW;
+	u64 saved_mfc_dar;
+	u64 saved_mfc_dsisr;
+};
+
+#define CRASH_NUM_SPUS	16	/* Enough for current hardware */
+static struct crash_spu_info crash_spu_info[CRASH_NUM_SPUS];
+
+static void crash_kexec_stop_spus(void)
+{
+	struct spu *spu;
+	int i;
+	u64 tmp;
+
+	for (i = 0; i < CRASH_NUM_SPUS; i++) {
+		if (!crash_spu_info[i].spu)
+			continue;
+
+		spu = crash_spu_info[i].spu;
+
+		crash_spu_info[i].saved_spu_runcntl_RW =
+			in_be32(&spu->problem->spu_runcntl_RW);
+		crash_spu_info[i].saved_spu_status_R =
+			in_be32(&spu->problem->spu_status_R);
+		crash_spu_info[i].saved_spu_npc_RW =
+			in_be32(&spu->problem->spu_npc_RW);
+
+		crash_spu_info[i].saved_mfc_dar    = spu_mfc_dar_get(spu);
+		crash_spu_info[i].saved_mfc_dsisr  = spu_mfc_dsisr_get(spu);
+		tmp = spu_mfc_sr1_get(spu);
+		crash_spu_info[i].saved_mfc_sr1_RW = tmp;
+
+		tmp &= ~MFC_STATE1_MASTER_RUN_CONTROL_MASK;
+		spu_mfc_sr1_set(spu, tmp);
+
+		__delay(200);
+	}
+}
+
+static void crash_register_spus(struct list_head *list)
+{
+	struct spu *spu;
+	int ret;
+
+	list_for_each_entry(spu, list, full_list) {
+		if (WARN_ON(spu->number >= CRASH_NUM_SPUS))
+			continue;
+
+		crash_spu_info[spu->number].spu = spu;
+	}
+
+	ret = crash_shutdown_register(&crash_kexec_stop_spus);
+	if (ret)
+		printk(KERN_ERR "Could not register SPU crash handler");
+}
+
+#else
+static inline void crash_register_spus(struct list_head *list)
+{
+}
+#endif
+
 static int __init init_spu_base(void)
 {
 	int i, ret = 0;
Index: powerpc.git/arch/powerpc/include/asm/spu.h
===================================================================
--- powerpc.git.orig/arch/powerpc/include/asm/spu.h	2011-01-21 13:41:00.592785080 +1100
+++ powerpc.git/arch/powerpc/include/asm/spu.h	2011-01-21 13:42:12.358265951 +1100
@@ -203,14 +203,6 @@ void spu_irq_setaffinity(struct spu *spu
 void spu_setup_kernel_slbs(struct spu *spu, struct spu_lscsa *lscsa,
 		void *code, int code_size);
 
-#ifdef CONFIG_KEXEC
-void crash_register_spus(struct list_head *list);
-#else
-static inline void crash_register_spus(struct list_head *list)
-{
-}
-#endif
-
 extern void spu_invalidate_slbs(struct spu *spu);
 extern void spu_associate_mm(struct spu *spu, struct mm_struct *mm);
 int spu_64k_pages_available(void);

^ permalink raw reply

* [git pull] Please pull powerpc.git merge branch
From: Benjamin Herrenschmidt @ 2011-01-21  4:50 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linuxppc-dev list, Andrew Morton, Linux Kernel list

Hi Linus !

Here's a bunch of powerpc stuff for you to pull. There's a whole series from
Anton which is in large part trivial cleanups, but it's all obvious enough
stuff or worthy enough fixes that I decided to not wait until the next merge
window (besides it's from Anton :-)

The rest is generally minor fixes. The two simple_write_to_buffer changes
from Akinobu were around for a while (and Andrew had picked them up already),
I just happen to have "missed" them in my collection for the previous batch.

Cheers,
Ben.

The following changes since commit 12fcdba1b7ae8b25696433f420b775aeb556d89b:

  Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip (2011-01-19 20:27:25 -0800)

are available in the git repository at:

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

Akinobu Mita (2):
      powerpc/spufs: Use simple_write_to_buffer
      powerpc/rtas_flash: Use simple_read_from_buffer

Anton Blanchard (19):
      powerpc/kexec: Move all ppc_md kexec function pointers together
      powerpc/kexec: Remove ppc_md.machine_kexec_cleanup
      powerpc/kexec: Remove ppc_md.machine_kexec
      powerpc/kdump: Remove ppc_md.machine_crash_shutdown
      powerpc/kexec: Don't initialise kexec hooks to default handlers
      powerpc/kexec: Remove empty ppc_md.machine_kexec_prepare
      powerpc/kdump: Move crash_kexec_stop_spus to kdump crash handler
      powerpc/kdump: Disable ftrace during kexec
      powerpc: Print 32 bits of DSISR in show_regs
      powerpc: Don't force MSR_RI in machine_check_exception
      powerpc: Never halt RTAS error logging after receiving an unrecoverable machine check
      powerpc: Remove duplicate debugger hook in machine_check_exception
      powerpc: Don't silently handle machine checks from userspace
      powerpc: Rework pseries machine check handler
      powerpc: Fix corruption when grabbing FWNMI data
      powerpc: Check RTAS extended log flag before checking length
      powerpc: machine_check_generic is wrong on 64bit
      powerpc: Disable mcount tracers in pseries defconfig
      powerpc: Enable 64kB pages and 1024 threads in pseries config

Ben Hutchings (1):
      powerpc/boot/dts: Install dts from the right directory

Benjamin Herrenschmidt (1):
      Merge remote branch 'kumar/next' into merge

Ilya Yanok (1):
      powerpc/mpc8308: fix USB DR controller initialization

Li Yang (1):
      powerpc/85xx: add e500 HID1 bit definition

Michael Ellerman (1):
      powerpc: Ensure the else case of feature sections will fit

Nishanth Aravamudan (1):
      powerpc/pseries: Add BNX2=m to defconfig

Scott Wood (1):
      powerpc/mpic: Fix mask/unmask timeout message

Shaohui Xie (1):
      powerpc/fsl_rio: Fix non-standard HID1 register access

Steven Rostedt (2):
      powerpc/ppc64/tracing: Add stack frame to calls of trace_hardirqs_on/off
      powerpc/ppc32/tracing: Add stack frame to calls of trace_hardirqs_on/off

Tejun Heo (1):
      powerpc/cell: Use system_wq in cpufreq_spudemand

Timur Tabi (2):
      powerpc/85xx: fix compatible properties of the P1022DS DMA nodes used for audio
      powerpc: fix warning when compiling immap_qe.h

roel kluin (1):
      powerpc/macintosh: Fix wrong test in fan_{read,write}_reg()

 arch/powerpc/boot/Makefile                      |    2 +-
 arch/powerpc/boot/dts/mpc8308rdb.dts            |    2 +-
 arch/powerpc/boot/dts/p1022ds.dts               |    4 +-
 arch/powerpc/configs/pseries_defconfig          |    7 +-
 arch/powerpc/include/asm/feature-fixups.h       |   27 ++++---
 arch/powerpc/include/asm/immap_qe.h             |   21 ++++--
 arch/powerpc/include/asm/irqflags.h             |   40 +++++++--
 arch/powerpc/include/asm/machdep.h              |   18 +----
 arch/powerpc/include/asm/reg.h                  |    2 +
 arch/powerpc/include/asm/reg_booke.h            |   14 +++
 arch/powerpc/include/asm/spu.h                  |    8 --
 arch/powerpc/kernel/cpu_setup_fsl_booke.S       |    6 ++
 arch/powerpc/kernel/cputable.c                  |   23 -----
 arch/powerpc/kernel/crash.c                     |   72 +----------------
 arch/powerpc/kernel/entry_32.S                  |   11 +++
 arch/powerpc/kernel/machine_kexec.c             |   19 ++--
 arch/powerpc/kernel/process.c                   |    2 +-
 arch/powerpc/kernel/rtas_flash.c                |   53 ++-----------
 arch/powerpc/kernel/rtasd.c                     |    2 +-
 arch/powerpc/kernel/time.c                      |   25 +++++-
 arch/powerpc/kernel/traps.c                     |   12 +---
 arch/powerpc/lib/feature-fixups-test.S          |   19 ++++
 arch/powerpc/platforms/83xx/mpc83xx.h           |    2 +
 arch/powerpc/platforms/83xx/usb.c               |   21 ++++-
 arch/powerpc/platforms/cell/cpufreq_spudemand.c |   20 +----
 arch/powerpc/platforms/cell/qpace_setup.c       |    5 -
 arch/powerpc/platforms/cell/spu_base.c          |   70 ++++++++++++++++
 arch/powerpc/platforms/cell/spufs/file.c        |   27 ++-----
 arch/powerpc/platforms/embedded6xx/gamecube.c   |   11 ---
 arch/powerpc/platforms/embedded6xx/wii.c        |   11 ---
 arch/powerpc/platforms/pseries/kexec.c          |   10 --
 arch/powerpc/platforms/pseries/ras.c            |  102 +++++++++++++++-------
 arch/powerpc/sysdev/fsl_rio.c                   |    2 -
 arch/powerpc/sysdev/mpic.c                      |    6 +-
 drivers/macintosh/therm_pm72.c                  |    4 +-
 35 files changed, 334 insertions(+), 346 deletions(-)

^ permalink raw reply

* [PATCH 0/4] powerpc/pseries: VPHN code cleanups
From: Jesse Larrew @ 2011-01-21  5:00 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: markn, tbreeds, lkessler, Jesse Larrew, mjwolf

From: Jesse Larrew <jlarrew@linux.vnet.ibm.com>

This patch set includes some simple style cleanups for VPHN:

PATCH 1/4: powerpc/pseries: Fix typo in VPHN comments
PATCH 2/4: powerpc/pseries: Fix brace placement in numa.c
PATCH 3/4: powerpc/pseries: Remove unnecessary initializations in numa.c
PATCH 4/4: powerpc/pseries: Reorder VPHN functions to reduce forward 
                            declarations

 arch/powerpc/mm/numa.c |  143 +++++++++++++++++++++++-------------------------
 1 files changed, 69 insertions(+), 74 deletions(-)

^ permalink raw reply

* [PATCH 1/4] powerpc/pseries: Fix typo in VPHN comments
From: Jesse Larrew @ 2011-01-21  5:00 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: markn, tbreeds, lkessler, Jesse Larrew, mjwolf
In-Reply-To: <20110121050010.5062.3390.sendpatchset@oc7304238415.ibm.com>

From: Jesse Larrew <jlarrew@linux.vnet.ibm.com>

Correct a spelling error in VPHN comments in numa.c.

Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
---
 arch/powerpc/mm/numa.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 8f8845e..5259dde 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1263,7 +1263,7 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
 
 #endif /* CONFIG_MEMORY_HOTPLUG */
 
-/* Vrtual Processor Home Node (VPHN) support */
+/* Virtual Processor Home Node (VPHN) support */
 #ifdef CONFIG_PPC_SPLPAR
 #define VPHN_NR_CHANGE_CTRS (8)
 static u8 vphn_cpu_change_counts[NR_CPUS][VPHN_NR_CHANGE_CTRS];
-- 
1.7.3.4

^ permalink raw reply related

* [PATCH 2/4] powerpc/pseries: Fix brace placement in numa.c
From: Jesse Larrew @ 2011-01-21  5:01 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: markn, tbreeds, lkessler, Jesse Larrew, mjwolf
In-Reply-To: <20110121050010.5062.3390.sendpatchset@oc7304238415.ibm.com>

From: Jesse Larrew <jlarrew@linux.vnet.ibm.com>

Fix brace placement in VPHN code.

Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
---
 arch/powerpc/mm/numa.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 5259dde..db36a2c 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1285,9 +1285,8 @@ static void setup_cpu_associativity_change_counters(void)
 		u8 *counts = vphn_cpu_change_counts[cpu];
 		volatile u8 *hypervisor_counts = lppaca[cpu].vphn_assoc_counts;
 
-		for (i = 0; i < VPHN_NR_CHANGE_CTRS; i++) {
+		for (i = 0; i < VPHN_NR_CHANGE_CTRS; i++)
 			counts[i] = hypervisor_counts[i];
-		}
 	}
 }
 
@@ -1354,14 +1353,12 @@ static int vphn_unpack_associativity(const long *packed, unsigned int *unpacked)
 			 */
 			unpacked[i] = *((u32*)field);
 			field += 2;
-		}
-		else if (*field & VPHN_FIELD_MSB) {
+		} else if (*field & VPHN_FIELD_MSB) {
 			/* Data is in the lower 15 bits of this field */
 			unpacked[i] = *field & VPHN_FIELD_MASK;
 			field++;
 			nr_assoc_doms++;
-		}
-		else {
+		} else {
 			/* Data is in the lower 15 bits of this field
 			 * concatenated with the next 16 bit field
 			 */
-- 
1.7.3.4

^ permalink raw reply related

* [PATCH 4/4] powerpc/pseries: Reorder VPHN functions to reduce forward declarations
From: Jesse Larrew @ 2011-01-21  5:01 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: markn, tbreeds, lkessler, Jesse Larrew, mjwolf
In-Reply-To: <20110121050010.5062.3390.sendpatchset@oc7304238415.ibm.com>

From: Jesse Larrew <jlarrew@linux.vnet.ibm.com>

Reorder VPHN functions to reduce the need for forward declarations.

Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
---
 arch/powerpc/mm/numa.c |  115 ++++++++++++++++++++++++------------------------
 1 files changed, 57 insertions(+), 58 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index f7971d2..2010a17 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1270,7 +1270,6 @@ static u8 vphn_cpu_change_counts[NR_CPUS][VPHN_NR_CHANGE_CTRS];
 static cpumask_t cpu_associativity_changes_mask;
 static int vphn_enabled;
 static void set_topology_timer(void);
-int stop_topology_update(void);
 
 /*
  * Store the current values of the associativity change counters in the
@@ -1328,6 +1327,63 @@ static int update_cpu_associativity_changes_mask(void)
 	return nr_cpus;
 }
 
+static void topology_work_fn(struct work_struct *work)
+{
+	rebuild_sched_domains();
+}
+static DECLARE_WORK(topology_work, topology_work_fn);
+
+void topology_schedule_update(void)
+{
+	schedule_work(&topology_work);
+}
+
+static void topology_timer_fn(unsigned long ignored)
+{
+	if (!vphn_enabled)
+		return;
+	if (update_cpu_associativity_changes_mask() > 0)
+		topology_schedule_update();
+	set_topology_timer();
+}
+static struct timer_list topology_timer =
+	TIMER_INITIALIZER(topology_timer_fn, 0, 0);
+
+static void set_topology_timer(void)
+{
+	topology_timer.data = 0;
+	topology_timer.expires = jiffies + 60 * HZ;
+	add_timer(&topology_timer);
+}
+
+/*
+ * Start polling for VPHN associativity changes.
+ */
+int start_topology_update(void)
+{
+	int rc = 0;
+
+	if (firmware_has_feature(FW_FEATURE_VPHN)) {
+		vphn_enabled = 1;
+		setup_cpu_associativity_change_counters();
+		init_timer_deferrable(&topology_timer);
+		set_topology_timer();
+		rc = 1;
+	}
+
+	return rc;
+}
+__initcall(start_topology_update);
+
+/*
+ * Disable polling for VPHN associativity changes.
+ */
+int stop_topology_update(void)
+{
+	vphn_enabled = 0;
+	return del_timer_sync(&topology_timer);
+}
+
 /* 6 64-bit registers unpacked into 12 32-bit associativity values */
 #define VPHN_ASSOC_BUFSIZE (6*sizeof(u64)/sizeof(u32))
 
@@ -1446,61 +1502,4 @@ int arch_update_cpu_topology(void)
 
 	return 1;
 }
-
-static void topology_work_fn(struct work_struct *work)
-{
-	rebuild_sched_domains();
-}
-static DECLARE_WORK(topology_work, topology_work_fn);
-
-void topology_schedule_update(void)
-{
-	schedule_work(&topology_work);
-}
-
-static void topology_timer_fn(unsigned long ignored)
-{
-	if (!vphn_enabled)
-		return;
-	if (update_cpu_associativity_changes_mask() > 0)
-		topology_schedule_update();
-	set_topology_timer();
-}
-static struct timer_list topology_timer =
-	TIMER_INITIALIZER(topology_timer_fn, 0, 0);
-
-static void set_topology_timer(void)
-{
-	topology_timer.data = 0;
-	topology_timer.expires = jiffies + 60 * HZ;
-	add_timer(&topology_timer);
-}
-
-/*
- * Start polling for VPHN associativity changes.
- */
-int start_topology_update(void)
-{
-	int rc = 0;
-
-	if (firmware_has_feature(FW_FEATURE_VPHN)) {
-		vphn_enabled = 1;
-		setup_cpu_associativity_change_counters();
-		init_timer_deferrable(&topology_timer);
-		set_topology_timer();
-		rc = 1;
-	}
-
-	return rc;
-}
-__initcall(start_topology_update);
-
-/*
- * Disable polling for VPHN associativity changes.
- */
-int stop_topology_update(void)
-{
-	vphn_enabled = 0;
-	return del_timer_sync(&topology_timer);
-}
 #endif /* CONFIG_PPC_SPLPAR */
-- 
1.7.3.4

^ permalink raw reply related

* [PATCH 3/4] powerpc/pseries: Remove unnecessary variable initializations in numa.c
From: Jesse Larrew @ 2011-01-21  5:01 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: markn, tbreeds, lkessler, Jesse Larrew, mjwolf
In-Reply-To: <20110121050010.5062.3390.sendpatchset@oc7304238415.ibm.com>

From: Jesse Larrew <jlarrew@linux.vnet.ibm.com>

Remove unnecessary variable initializations in VPHN functions.

Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
---
 arch/powerpc/mm/numa.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index db36a2c..f7971d2 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1278,10 +1278,10 @@ int stop_topology_update(void);
  */
 static void setup_cpu_associativity_change_counters(void)
 {
-	int cpu = 0;
+	int cpu;
 
 	for_each_possible_cpu(cpu) {
-		int i = 0;
+		int i;
 		u8 *counts = vphn_cpu_change_counts[cpu];
 		volatile u8 *hypervisor_counts = lppaca[cpu].vphn_assoc_counts;
 
@@ -1303,7 +1303,7 @@ static void setup_cpu_associativity_change_counters(void)
  */
 static int update_cpu_associativity_changes_mask(void)
 {
-	int cpu = 0, nr_cpus = 0;
+	int cpu, nr_cpus = 0;
 	cpumask_t *changes = &cpu_associativity_changes_mask;
 
 	cpumask_clear(changes);
@@ -1337,8 +1337,7 @@ static int update_cpu_associativity_changes_mask(void)
  */
 static int vphn_unpack_associativity(const long *packed, unsigned int *unpacked)
 {
-	int i = 0;
-	int nr_assoc_doms = 0;
+	int i, nr_assoc_doms = 0;
 	const u16 *field = (const u16*) packed;
 
 #define VPHN_FIELD_UNUSED	(0xffff)
@@ -1377,7 +1376,7 @@ static int vphn_unpack_associativity(const long *packed, unsigned int *unpacked)
  */
 static long hcall_vphn(unsigned long cpu, unsigned int *associativity)
 {
-	long rc = 0;
+	long rc;
 	long retbuf[PLPAR_HCALL9_BUFSIZE] = {0};
 	u64 flags = 1;
 	int hwcpu = get_hard_smp_processor_id(cpu);
@@ -1391,7 +1390,7 @@ static long hcall_vphn(unsigned long cpu, unsigned int *associativity)
 static long vphn_get_associativity(unsigned long cpu,
 					unsigned int *associativity)
 {
-	long rc = 0;
+	long rc;
 
 	rc = hcall_vphn(cpu, associativity);
 
@@ -1417,9 +1416,9 @@ static long vphn_get_associativity(unsigned long cpu,
  */
 int arch_update_cpu_topology(void)
 {
-	int cpu = 0, nid = 0, old_nid = 0;
+	int cpu, nid, old_nid;
 	unsigned int associativity[VPHN_ASSOC_BUFSIZE] = {0};
-	struct sys_device *sysdev = NULL;
+	struct sys_device *sysdev;
 
 	for_each_cpu_mask(cpu, cpu_associativity_changes_mask) {
 		vphn_get_associativity(cpu, associativity);
-- 
1.7.3.4

^ permalink raw reply related

* [git pull] devicetree build failure fix
From: Grant Likely @ 2011-01-21  5:41 UTC (permalink / raw)
  To: Linus Torvalds, linuxppc-dev, Benjamin Herrenschmidt,
	Linux Kernel Mailing List

Hi Linus,

Here's a fix for a stupid bug I introduced.

g.

The following changes since commit c56eb8fb6dccb83d9fe62fd4dc00c834de9bc470:

  Linux 2.6.38-rc1 (2011-01-18 15:14:02 -0800)

are available in the git repository at:
  git://git.secretlab.ca/git/linux-2.6 devicetree/merge

Grant Likely (1):
      powerpc/83xx: fix build failures on dt compatible list.

 arch/powerpc/platforms/83xx/mpc830x_rdb.c |    4 ++--
 arch/powerpc/platforms/83xx/mpc831x_rdb.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply

* Re: of_flat_dt_match() helper build FAIL
From: Grant Likely @ 2011-01-21  5:44 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1295576122.2148.271.camel@pasglop>

On Thu, Jan 20, 2011 at 7:15 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> a4f740cf33f7f6c164bbde3c0cdbcc77b0c4997c introduces:
>
> /arch/powerpc/platforms/83xx/mpc831x_rdb.c:63: error: expected '{'
> before 'const'
>
> =A0and more...
>
> This hunk is obviously bogus:
>
> +struct const char *board[] __initdata =3D {
> + =A0 =A0 =A0 "MPC8313ERDB",
> + =A0 =A0 =A0 "fsl,mpc8315erdb",
> + =A0 =A0 =A0 NULL
> +}
> +
>
> You should at least compile test your changes :-(

I do.  Always.  Over Christmas I even set up an autotest instance to
automate a bunch of the sanity testing so I'd get better coverage, and
I always get changes into linux-next, this commit included. Sometimes
I miss a configuration though, and I apologize.  Sorry.

> Please send Linus a fix.

I wrote and pushed out the fix yesterday and I just sent Linus the pull req=
.

g.

^ permalink raw reply

* [PATCH] powerpc: Fix some 6xx/7xxx CPU setup functions
From: Benjamin Herrenschmidt @ 2011-01-21  6:35 UTC (permalink / raw)
  To: linuxppc-dev

Some of those functions try to adjust the CPU features, for example
to remove NAP support on some revisions. However, they seem to use
r5 as an index into the CPU table entry, which might have been right
a long time ago but no longer is. r4 is the right register to use.

This probably caused some off behaviours on some PowerMac variants
using 750cx or 7455 processor revisions.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

Can somebody with one of these PowerMacs test this ? I only managed to
find a 7448 which not directly affected...

In absence of good testing I would appreciate a close inspection of the patch
by different pairs of eyes :-)

Cheers,
Ben.

diff --git a/arch/powerpc/kernel/cpu_setup_6xx.S b/arch/powerpc/kernel/cpu_setup_6xx.S
index 55cba4a..f8cd9fb 100644
--- a/arch/powerpc/kernel/cpu_setup_6xx.S
+++ b/arch/powerpc/kernel/cpu_setup_6xx.S
@@ -18,7 +18,7 @@
 #include <asm/mmu.h>
 
 _GLOBAL(__setup_cpu_603)
-	mflr	r4
+	mflr	r5
 BEGIN_MMU_FTR_SECTION
 	li	r10,0
 	mtspr	SPRN_SPRG_603_LRU,r10		/* init SW LRU tracking */
@@ -27,60 +27,60 @@ BEGIN_FTR_SECTION
 	bl	__init_fpu_registers
 END_FTR_SECTION_IFCLR(CPU_FTR_FPU_UNAVAILABLE)
 	bl	setup_common_caches
-	mtlr	r4
+	mtlr	r5
 	blr
 _GLOBAL(__setup_cpu_604)
-	mflr	r4
+	mflr	r5
 	bl	setup_common_caches
 	bl	setup_604_hid0
-	mtlr	r4
+	mtlr	r5
 	blr
 _GLOBAL(__setup_cpu_750)
-	mflr	r4
+	mflr	r5
 	bl	__init_fpu_registers
 	bl	setup_common_caches
 	bl	setup_750_7400_hid0
-	mtlr	r4
+	mtlr	r5
 	blr
 _GLOBAL(__setup_cpu_750cx)
-	mflr	r4
+	mflr	r5
 	bl	__init_fpu_registers
 	bl	setup_common_caches
 	bl	setup_750_7400_hid0
 	bl	setup_750cx
-	mtlr	r4
+	mtlr	r5
 	blr
 _GLOBAL(__setup_cpu_750fx)
-	mflr	r4
+	mflr	r5
 	bl	__init_fpu_registers
 	bl	setup_common_caches
 	bl	setup_750_7400_hid0
 	bl	setup_750fx
-	mtlr	r4
+	mtlr	r5
 	blr
 _GLOBAL(__setup_cpu_7400)
-	mflr	r4
+	mflr	r5
 	bl	__init_fpu_registers
 	bl	setup_7400_workarounds
 	bl	setup_common_caches
 	bl	setup_750_7400_hid0
-	mtlr	r4
+	mtlr	r5
 	blr
 _GLOBAL(__setup_cpu_7410)
-	mflr	r4
+	mflr	r5
 	bl	__init_fpu_registers
 	bl	setup_7410_workarounds
 	bl	setup_common_caches
 	bl	setup_750_7400_hid0
 	li	r3,0
 	mtspr	SPRN_L2CR2,r3
-	mtlr	r4
+	mtlr	r5
 	blr
 _GLOBAL(__setup_cpu_745x)
-	mflr	r4
+	mflr	r5
 	bl	setup_common_caches
 	bl	setup_745x_specifics
-	mtlr	r4
+	mtlr	r5
 	blr
 
 /* Enable caches for 603's, 604, 750 & 7400 */
@@ -194,10 +194,10 @@ setup_750cx:
 	cror	4*cr0+eq,4*cr0+eq,4*cr1+eq
 	cror	4*cr0+eq,4*cr0+eq,4*cr2+eq
 	bnelr
-	lwz	r6,CPU_SPEC_FEATURES(r5)
+	lwz	r6,CPU_SPEC_FEATURES(r4)
 	li	r7,CPU_FTR_CAN_NAP
 	andc	r6,r6,r7
-	stw	r6,CPU_SPEC_FEATURES(r5)
+	stw	r6,CPU_SPEC_FEATURES(r4)
 	blr
 
 /* 750fx specific
@@ -225,12 +225,12 @@ BEGIN_FTR_SECTION
 	andis.	r11,r11,L3CR_L3E@h
 	beq	1f
 END_FTR_SECTION_IFSET(CPU_FTR_L3CR)
-	lwz	r6,CPU_SPEC_FEATURES(r5)
+	lwz	r6,CPU_SPEC_FEATURES(r4)
 	andi.	r0,r6,CPU_FTR_L3_DISABLE_NAP
 	beq	1f
 	li	r7,CPU_FTR_CAN_NAP
 	andc	r6,r6,r7
-	stw	r6,CPU_SPEC_FEATURES(r5)
+	stw	r6,CPU_SPEC_FEATURES(r4)
 1:
 	mfspr	r11,SPRN_HID0
 

^ permalink raw reply related

* [PATCH] powerpc: Pass the right cpu_spec to ->setup_cpu() on 64-bit
From: Benjamin Herrenschmidt @ 2011-01-21  6:36 UTC (permalink / raw)
  To: linuxppc-dev

When calling setup_cpu() on 64-bit, we pass a pointer to the
cputable entry we have found. This used to be fine when cur_cpu_spec
was a pointer to that entry, but nowadays, we copy the entry into
a separate variable, and we do so before we call the setup_cpu()
callback. That means that any attempt by that callback at patching
the CPU table entry (to adjust CPU features for example) will patch
the wrong table.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/kernel/cputable.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 843abf7..fb83d36 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -2105,8 +2105,8 @@ static void __init setup_cpu_spec(unsigned long offset, struct cpu_spec *s)
 	 * pointer on ppc64 and booke as we are running at 0 in real mode
 	 * on ppc64 and reloc_offset is always 0 on booke.
 	 */
-	if (s->cpu_setup) {
-		s->cpu_setup(offset, s);
+	if (t->cpu_setup) {
+		t->cpu_setup(offset, t);
 	}
 #endif /* CONFIG_PPC64 || CONFIG_BOOKE */
 }

^ permalink raw reply related

* Re: mpc880 linux-2.6.32 slow running processes
From: Heiko Schocher @ 2011-01-21  6:53 UTC (permalink / raw)
  To: Joakim Tjernlund
  Cc: Wolfgang Denk, Rafael Beims, scottwood, linuxppc-dev, michael,
	RFeany
In-Reply-To: <OF14B8C2B7.A99F8A1E-ONC1257815.0057AC0A-C1257815.0057F664@transmode.se>

Hello Joakim,

Joakim Tjernlund wrote:
>> Sent by: linuxppc-dev-bounces+joakim.tjernlund=transmode.se@lists.ozlabs.org
>>
>> Rafael Beims <rbeims@gmail.com> wrote on 2011/01/10 17:35:38:
>>>> Once you have tested it and it works, please send a patch to remove the 8xx workaround.
>>>> Make sure Scott is cc:ed
>>>>
>>>>
>>> I tested linux-2.6.33 on my ppc880 board today, and even without the
>>> slowdown.patch applied, the board runs processes with good
>>> performance.
>>> It really seems that the problem is solved from linux-2.6.33 on.
>>>
>>> I'm not sure what you mean by sending a patch to remove the
>>> workaround. The only thing that I did in the 2.6.32 version was to
>>> apply the slowdown.patch attached in the message from Michael.
>>>
>>> Could you clarify please?
>> Yes, this part in arch/powerpc/mm/pgtable.c:
>> #ifdef CONFIG_8xx
>>          /* On 8xx, cache control instructions (particularly
>>           * "dcbst" from flush_dcache_icache) fault as write
>>           * operation if there is an unpopulated TLB entry
>>           * for the address in question. To workaround that,
>>           * we invalidate the TLB here, thus avoiding dcbst
>>           * misbehaviour.
>>           */
>>          /* 8xx doesn't care about PID, size or ind args */
>>          _tlbil_va(addr, 0, 0, 0);
>> #endif /* CONFIG_8xx */
>>
>> Should be removed in >= 2.6.33 kernels.
>> My 8xx TLB work fixes this problem more efficiently.
> 
> Can you test these 2 patches on recent 2.6 linux:
>>From 9024200169bf86b4f34cb3b1ebf68e0056237bc0 Mon Sep 17 00:00:00 2001
> From: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> Date: Tue, 11 Jan 2011 13:43:42 +0100
> Subject: [PATCH 1/2] powerpc: Move 8xx invalidation of non present TLBs
[...]
> and
> 
>>From 0ef93601290a75b087495dddeee6062a870f1dc6 Mon Sep 17 00:00:00 2001
> From: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
> Date: Tue, 11 Jan 2011 13:55:22 +0100
> Subject: [PATCH 2/2] powerpc: Remove 8xx redundant dcbst workaround.

Tested this on a board similliar to the mainline tqm8xx board with
lmbench:

-bash-3.2# cat /proc/cpuinfo
processor       : 0
cpu             : 8xx
clock           : 80.000000MHz
revision        : 0.0 (pvr 0050 0000)
bogomips        : 10.00
timebase        : 5000000
platform        : KUP4K
model           : KUP4K
Memory          : 96 MB
-bash-3.2#

-bash-3.2# cat /proc/version
Linux version 2.6.34-00064-g3e81b6b (hs@pollux.denx.de) (gcc version 4.2.2) #89 Thu Jan 20 08:39:52 CET 2011
-bash-3.2#

(First run of lmbench without your 2 patches, the two other runs with it)

-bash-3.2# make see
cd results && make summary >summary.out 2>summary.errs
cd results && make percent >percent.out 2>percent.errs
-bash-3.2# cat results/summary.out
make[1]: Entering directory `/home/hs/lmbench-3.0-a9/results'

                 L M B E N C H  3 . 0   S U M M A R Y
                 ------------------------------------
                 (Alpha software, do not distribute)

Basic system parameters
------------------------------------------------------------------------------
Host                 OS Description              Mhz  tlb  cache  mem   scal
                                                     pages line   par   load
                                                           bytes
--------- ------------- ----------------------- ---- ----- ----- ------ ----
kup4k     Linux 2.6.34-       powerpc-linux-gnu   79    28    16 1.1400    1
kup4k     Linux 2.6.34-       powerpc-linux-gnu   79    28    16 1.0200    1
kup4k     Linux 2.6.34-       powerpc-linux-gnu   79    28    16 1.1000    1

Processor, Processes - times in microseconds - smaller is better
------------------------------------------------------------------------------
Host                 OS  Mhz null null      open slct sig  sig  fork exec sh
                             call  I/O stat clos TCP  inst hndl proc proc proc
--------- ------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
kup4k     Linux 2.6.34-   79 2.58 12.3 126. 1285 353. 22.8 149. 8418 34.K 101K
kup4k     Linux 2.6.34-   79 2.59 13.1 127. 1273 320. 23.4 127. 8251 33.K 100K
kup4k     Linux 2.6.34-   79 2.47 13.1 127. 1288 315. 23.6 128. 8413 34.K 101K

Basic integer operations - times in nanoseconds - smaller is better
-------------------------------------------------------------------
Host                 OS  intgr intgr  intgr  intgr  intgr
                          bit   add    mul    div    mod
--------- ------------- ------ ------ ------ ------ ------
kup4k     Linux 2.6.34-   12.6   14.4 1.3500  103.9  170.6
kup4k     Linux 2.6.34-   13.2   15.0 1.3100  100.0  170.5
kup4k     Linux 2.6.34-   13.2   14.4 1.2900  104.1  162.1

Basic uint64 operations - times in nanoseconds - smaller is better
------------------------------------------------------------------
Host                 OS int64  int64  int64  int64  int64
                         bit    add    mul    div    mod
--------- ------------- ------ ------ ------ ------ ------
kup4k     Linux 2.6.34-    12.          11.1 1637.9 1602.4
kup4k     Linux 2.6.34-    13.          11.1 1643.6 1604.2
kup4k     Linux 2.6.34-    13.          11.1 1639.7 1600.8

Basic float operations - times in nanoseconds - smaller is better
-----------------------------------------------------------------
Host                 OS  float  float  float  float
                         add    mul    div    bogo
--------- ------------- ------ ------ ------ ------
kup4k     Linux 2.6.34-  840.5 1304.3 4593.3 8703.0
kup4k     Linux 2.6.34-  843.5 1366.6 4601.7 8814.0
kup4k     Linux 2.6.34-  807.8 1377.5 4610.0 8710.0

Basic double operations - times in nanoseconds - smaller is better
------------------------------------------------------------------
Host                 OS  double double double double
                         add    mul    div    bogo
--------- ------------- ------  ------ ------ ------
kup4k     Linux 2.6.34- 1309.2 2235.2 3132.2  13.9K
kup4k     Linux 2.6.34- 1252.0 2339.0 2993.8  13.9K
kup4k     Linux 2.6.34- 1311.2 2335.2 2997.2  13.9K

Context switching - times in microseconds - smaller is better
-------------------------------------------------------------------------
Host                 OS  2p/0K 2p/16K 2p/64K 8p/16K 8p/64K 16p/16K 16p/64K
                         ctxsw  ctxsw  ctxsw ctxsw  ctxsw   ctxsw   ctxsw
--------- ------------- ------ ------ ------ ------ ------ ------- -------
kup4k     Linux 2.6.34-  131.8  144.7  130.8  168.4  207.8   190.7   248.1
kup4k     Linux 2.6.34-  129.4  142.4  140.8  186.4  211.1   187.0   257.9
kup4k     Linux 2.6.34-  121.3  155.6  131.0  196.8  201.5   198.5   240.7

*Local* Communication latencies in microseconds - smaller is better
---------------------------------------------------------------------
Host                 OS 2p/0K  Pipe AF     UDP  RPC/   TCP  RPC/ TCP
                        ctxsw       UNIX         UDP         TCP conn
--------- ------------- ----- ----- ---- ----- ----- ----- ----- ----
kup4k     Linux 2.6.34- 131.8 444.2 771. 1024.       1432.       3876
kup4k     Linux 2.6.34- 129.4 455.2 722. 1021.       1434.       3831
kup4k     Linux 2.6.34- 121.3 458.8 761. 1004.       1435.       3866

*Remote* Communication latencies in microseconds - smaller is better
---------------------------------------------------------------------
Host                 OS   UDP  RPC/  TCP   RPC/ TCP
                               UDP         TCP  conn
--------- ------------- ----- ----- ----- ----- ----
kup4k     Linux 2.6.34-
kup4k     Linux 2.6.34-
kup4k     Linux 2.6.34-

File & VM system latencies in microseconds - smaller is better
-------------------------------------------------------------------------------
Host                 OS   0K File      10K File     Mmap    Prot   Page   100fd
                        Create Delete Create Delete Latency Fault  Fault  selct
--------- ------------- ------ ------ ------ ------ ------- ----- ------- -----
kup4k     Linux 2.6.34-  16.7K  10.3K  90.9K  13.7K   22.6K  27.1    43.4 117.9
kup4k     Linux 2.6.34-  16.9K  15.6K 100.0K  16.1K   22.7K 9.590    39.8 119.2
kup4k     Linux 2.6.34-  16.7K  13.5K 100.0K  15.9K   22.8K 9.306    39.8 119.6

*Local* Communication bandwidths in MB/s - bigger is better
-----------------------------------------------------------------------------
Host                OS  Pipe AF    TCP  File   Mmap  Bcopy  Bcopy  Mem   Mem
                             UNIX      reread reread (libc) (hand) read write
--------- ------------- ---- ---- ---- ------ ------ ------ ------ ---- -----
kup4k     Linux 2.6.34- 13.3 13.3 11.0   18.3   49.5   23.7   23.3 49.5  35.5
kup4k     Linux 2.6.34- 13.2 13.4 10.8   18.4   49.5   23.4   23.2 49.5  35.4
kup4k     Linux 2.6.34- 13.1 13.2 11.0   18.3   49.5   23.7   23.4 49.5  35.5

Memory latencies in nanoseconds - smaller is better
    (WARNING - may not be correct, check graphs)
------------------------------------------------------------------------------
Host                 OS   Mhz   L1 $   L2 $    Main mem    Rand mem    Guesses
--------- -------------   ---   ----   ----    --------    --------    -------
kup4k     Linux 2.6.34-    79   26.4  278.6       277.0      1145.6    No L2 cache?
kup4k     Linux 2.6.34-    79   26.4  278.7       277.1      1147.1    No L2 cache?
kup4k     Linux 2.6.34-    79   26.4  278.8       276.6      1146.9    No L2 cache?
make[1]: Leaving directory `/home/hs/lmbench-3.0-a9/results'
-bash-3.2#

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply

* Re: [PATCH] change acquire/release_console_sem() to console_lock/unlock()
From: Geert Uytterhoeven @ 2011-01-21  8:10 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-fbdev, Greg KH, Lars-Peter Clausen, James Hogan,
	David Airlie, Daniel Vetter, linux-omap, Jesse Barnes,
	James E.J. Bottomley, David S. Miller, Paul Mackerras,
	Liam Girdwood, Kyle McMartin, Jiri Slaby, Thomas Gleixner,
	Caglar Akyuz, devel, Alberto Panizzo, Phil Edworthy, xen-devel,
	Russell King, Kuninori Morimoto, Wu Zhangjin,
	Florian Tobias Schandinat, Lionel Debroux, Helge Deller,
	Kay Sievers, James Morris, Kevin Hilman, Tony Lindgren,
	Ben Skeggs, Andres Salomon, Julia Lawall, Dave Airlie, Kees Cook,
	Francisco Jerez, Abhijeet Dharmapurikar, Marcin Slusarz,
	cbe-oss-dev, linuxppc-dev, Ondrej Zary, Denys Vlasenko,
	Konrad Rzeszutek Wilk, linux-kernel, Namhyung Kim, Rusty Russell,
	Werner Fink, linux-geode, torbenh, Jean Delvare, Magnus Damm,
	Jeremy Fitzhardinge, dri-devel, Daniel Mack, Nicolas Pitre,
	Dan Williams, virtualization, Ingo Molnar, linux-arm-kernel,
	Thomas Gleixner, Daniel Walker, Linus Walleij, linux-parisc,
	Geoff Levand, Jiri Kosina, Mark Brown, Jerome Glisse,
	Ralf Baechle, Alexey Dobriyan, Guy Martin, Ondrej Zajicek,
	Paul Mundt, Arnd Bergmann, Takashi Iwai, Jason Wessel,
	Alex Deucher, Tejun Heo, Antonino Daplas, Guennadi Liakhovetski,
	Marcin Kościelnicki, David Brown
In-Reply-To: <20110120123507.ac89c034.akpm@linux-foundation.org>

On Thu, Jan 20, 2011 at 21:35, Andrew Morton <akpm@linux-foundation.org> wr=
ote:
> On Thu, 20 Jan 2011 17:55:02 +0100
> torbenh <torbenh@gmx.de> wrote:
>
>> On Thu, Jan 20, 2011 at 08:34:48AM -0800, Greg KH wrote:
>> > On Thu, Jan 20, 2011 at 04:58:13PM +0100, Torben Hohn wrote:
>> > > the -rt patches change the console_semaphore to console_mutex.
>> > > so a quite large chunk of the patches changes all
>> > > acquire/release_console_sem() to acquire/release_console_mutex()
>> >
>> > Why not just change the functionality of the existing function to be a
>> > mutex in the rt patches, instead of having to rename it everywhere?
>>
>> i hope that Thomas already did this in his upcoming -rt series.
>>
>> >
>> > > this commit makes things use more neutral function names
>> > > which dont make implications about the underlying lock.
>> > >
>> > > the only real change is the return value of console_trylock
>> > > which is inverted from try_acquire_console_sem()
>> > >
>> > > Signed-off-by: Torben Hohn <torbenh@gmx.de>
>> > > CC: Thomas Gleixner <tglx@tglx.de>
>> >
>> > I don't mind this rename, but is it really going to help anything out?
>> > What's the odds of the -rt portion of this patch ever making it to
>> > mainline?
>>
>> the -rt portion only changes the semaphore to a mutex.
>> since the console_sem is used with mutex semantics, i dont see any
>> reason, not to merge that portion too.
>>
>> i am just trying to shrink the -rt patch to make it more maintanable :)
>>
>
> Yeah, I think it's a better name and if we can indeed switch that
> semaphore to a mutex then that's a good thing to do.

include/linux/mutex.h:

/*
 * NOTE: mutex_trylock() follows the spin_trylock() convention,
 *       not the down_trylock() convention!
 *
 * Returns 1 if the mutex has been acquired successfully, and 0 on contenti=
on.
 */
extern int mutex_trylock(struct mutex *lock);

So that's why the return value was inverted (when treating it as a boolean)=
.
I can understand that.

However:

+/**
+ * console_trylock - try to lock the console system for exclusive use.
+ *
+ * Tried to acquire a lock which guarantees that the caller has
+ * exclusive access to the console system and the console_drivers list.
+ *
+ * returns -1 on success, and 0 on failure to acquire the lock.
+ */
+int console_trylock(void)

So this one returns -1 on success, not 1? Why?

Gr{oetje,eeting}s,

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 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. Bu=
t
when I'm talking to journalists I just say "programmer" or something like t=
hat.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0 =C2=A0=C2=A0 -- Linus Torvalds

^ permalink raw reply

* Re: [PATCH] change acquire/release_console_sem() to console_lock/unlock()
From: Andrew Morton @ 2011-01-21  8:23 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-fbdev, Greg KH, Lars-Peter Clausen, James Hogan,
	David Airlie, Daniel Vetter, linux-omap, Jesse Barnes,
	James E.J. Bottomley, David S. Miller, Paul Mackerras,
	Liam Girdwood, Kyle McMartin, Jiri Slaby, Thomas Gleixner,
	Caglar Akyuz, devel, Alberto Panizzo, Phil Edworthy, xen-devel,
	Russell King, Kuninori Morimoto, Wu Zhangjin,
	Florian Tobias Schandinat, Lionel Debroux, Helge Deller,
	Kay Sievers, James Morris, Kevin Hilman, Tony Lindgren,
	Ben Skeggs, Andres Salomon, Julia Lawall, Dave Airlie, Kees Cook,
	Francisco Jerez, Abhijeet Dharmapurikar, Marcin Slusarz,
	cbe-oss-dev, linuxppc-dev, Ondrej Zary, Denys Vlasenko,
	Konrad Rzeszutek Wilk, linux-kernel, Namhyung Kim, Rusty Russell,
	Werner Fink, linux-geode, torbenh, Jean Delvare, Magnus Damm,
	Jeremy Fitzhardinge, dri-devel, Daniel Mack, Nicolas Pitre,
	Dan Williams, virtualization, Ingo Molnar, linux-arm-kernel,
	Thomas Gleixner, Daniel Walker, Linus Walleij, linux-parisc,
	Geoff Levand, Jiri Kosina, Mark Brown, Jerome Glisse,
	Ralf Baechle, Alexey Dobriyan, Guy Martin, Ondrej Zajicek,
	Paul Mundt, Arnd Bergmann, Takashi Iwai, Jason Wessel,
	Alex Deucher, Tejun Heo, Antonino Daplas, Guennadi Liakhovetski,
	Marcin Kościelnicki, David Brown
In-Reply-To: <AANLkTinN2+pNGk1hwrcMhH5qDNZK=Egrw7P6c-cdJTmH@mail.gmail.com>

On Fri, 21 Jan 2011 09:10:06 +0100 Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> include/linux/mutex.h:
> 
> /*
>  * NOTE: mutex_trylock() follows the spin_trylock() convention,
>  *       not the down_trylock() convention!
>  *
>  * Returns 1 if the mutex has been acquired successfully, and 0 on contention.
>  */
> extern int mutex_trylock(struct mutex *lock);
> 
> So that's why the return value was inverted (when treating it as a boolean).
> I can understand that.
> 
> However:
> 
> +/**
> + * console_trylock - try to lock the console system for exclusive use.
> + *
> + * Tried to acquire a lock which guarantees that the caller has
> + * exclusive access to the console system and the console_drivers list.
> + *
> + * returns -1 on success, and 0 on failure to acquire the lock.
> + */
> +int console_trylock(void)
> 
> So this one returns -1 on success, not 1? Why?

Yup.  All callers just test for non-zero, so...

--- a/kernel/printk.c~change-acquire-release_console_sem-to-console_lock-unlock-fix-2
+++ a/kernel/printk.c
@@ -1058,7 +1058,7 @@ EXPORT_SYMBOL(console_lock);
  * Tried to acquire a lock which guarantees that the caller has
  * exclusive access to the console system and the console_drivers list.
  *
- * returns -1 on success, and 0 on failure to acquire the lock.
+ * returns 1 on success, and 0 on failure to acquire the lock.
  */
 int console_trylock(void)
 {
@@ -1070,7 +1070,7 @@ int console_trylock(void)
 	}
 	console_locked = 1;
 	console_may_schedule = 0;
-	return -1;
+	return 1;
 }
 EXPORT_SYMBOL(console_trylock);
 
_

^ permalink raw reply

* Re: [PATCH] powerpc: Fix some 6xx/7xxx CPU setup functions
From: Andreas Schwab @ 2011-01-21  9:48 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1295591723.2148.281.camel__36384.4125684865$1295591768$gmane$org@pasglop>

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

> In absence of good testing I would appreciate a close inspection of the patch
> by different pairs of eyes :-)

Looks good to me.  That broke apparently in 400d221 ("ppc32: make
cur_cpu_spec a single pointer instead of an array"), which changed the
calling convention in call_setup_cpu.

Andreas.

-- 
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."

^ permalink raw reply

* Re: [PATCH] powerpc: Pass the right cpu_spec to ->setup_cpu() on 64-bit
From: Andreas Schwab @ 2011-01-21  9:52 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1295591763.2148.282.camel__24783.9240976193$1295591799$gmane$org@pasglop>

You may also want to remove the misleading sentence about PTRRELOC in
the preceding comment, since both s and t were already passed through it
anyway.

Andreas.

-- 
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."

^ permalink raw reply

* Re: [PATCH] powerpc: Fix some 6xx/7xxx CPU setup functions
From: Benjamin Herrenschmidt @ 2011-01-21 10:00 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: linuxppc-dev
In-Reply-To: <m31v4660zb.fsf@redhat.com>

On Fri, 2011-01-21 at 10:48 +0100, Andreas Schwab wrote:
> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> 
> > In absence of good testing I would appreciate a close inspection of the patch
> > by different pairs of eyes :-)
> 
> Looks good to me.  That broke apparently in 400d221 ("ppc32: make
> cur_cpu_spec a single pointer instead of an array"), which changed the
> calling convention in call_setup_cpu.

Nice, >5 years ago and it's not even my fault :-) Thanks for the
review !

Cheers,
Ben.

^ permalink raw reply

* [patch 1/2] powerpc: Use ARCH_IRQ_INIT_FLAGS
From: Thomas Gleixner @ 2011-01-21 16:12 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <20110121142848.050196552@linutronix.de>

Define the ARCH_IRQ_INIT_FLAGS instead of fixing it up in a loop.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/powerpc/include/asm/hw_irq.h |    2 ++
 arch/powerpc/kernel/irq.c         |   15 ---------------
 2 files changed, 2 insertions(+), 15 deletions(-)

Index: linux-2.6-tip/arch/powerpc/include/asm/hw_irq.h
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/include/asm/hw_irq.h
+++ linux-2.6-tip/arch/powerpc/include/asm/hw_irq.h
@@ -141,6 +141,8 @@ static inline bool arch_irqs_disabled(vo
 
 #endif /* CONFIG_PPC64 */
 
+#define ARCH_IRQ_INIT_FLAGS	IRQ_NOREQUEST
+
 /*
  * interrupt-retrigger: should we handle this via lost interrupts and IPIs
  * or should we not care like we do now ? --BenH.
Index: linux-2.6-tip/arch/powerpc/kernel/irq.c
===================================================================
--- linux-2.6-tip.orig/arch/powerpc/kernel/irq.c
+++ linux-2.6-tip/arch/powerpc/kernel/irq.c
@@ -1074,21 +1074,6 @@ void irq_free_virt(unsigned int virq, un
 
 int arch_early_irq_init(void)
 {
-	struct irq_desc *desc;
-	int i;
-
-	for (i = 0; i < NR_IRQS; i++) {
-		desc = irq_to_desc(i);
-		if (desc)
-			desc->status |= IRQ_NOREQUEST;
-	}
-
-	return 0;
-}
-
-int arch_init_chip_data(struct irq_desc *desc, int node)
-{
-	desc->status |= IRQ_NOREQUEST;
 	return 0;
 }
 

^ permalink raw reply

* [patch 0/2] Sparse irq cleanup - Resend
From: Thomas Gleixner @ 2011-01-21 16:12 UTC (permalink / raw)
  To: linuxppc-dev

The following series cleans up the left overs of the old sparse irq
code.

Thanks,

	tglx

^ 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