* Re: [PATCH -mm 2/6] powerpc: convert little-endian bitops macros to static inline functions
From: Benjamin Herrenschmidt @ 2011-02-06 23:14 UTC (permalink / raw)
To: Akinobu Mita; +Cc: linux-arch, linuxppc-dev, akpm, Paul Mackerras, linux-kernel
In-Reply-To: <1296136583-13815-3-git-send-email-akinobu.mita@gmail.com>
On Thu, 2011-01-27 at 22:56 +0900, Akinobu Mita wrote:
> (This patch is intended to be folded into the patch in -mm:
> powerpc-introduce-little-endian-bitops.patch)
>
> The little-endian bitops on powerpc are written as preprocessor
> macros with the cast to "unsigned long *".
> This means that even non-pointers will be accepted without an error, and
> that is a Very Bad Thing.
>
> This converts the little-endian bitops macros to static inline functions
> with proper prototypes.
No objection to the powerpc variant of the patches. What is the status
with the wholes series tho ? Does it looks like its going to be
accepted ? Do you expect my Ack and will merge the whole thing at once ?
Does it break bisection unless it's merged as one single giant patch ?
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()
From: Benjamin Herrenschmidt @ 2011-02-06 23:26 UTC (permalink / raw)
To: Peter Zijlstra
Cc: linux-m32r-ja, linux-mips, linux-ia64, linux-sh, H. Peter Anvin,
Heiko Carstens, Paul Mackerras, Helge Deller, sparclinux,
Linux-Arch, linux-s390, Jesper Nilsson, Jeremy Fitzhardinge,
Russell King, Hirokazu Takata, x86, James E.J. Bottomley,
virtualization, Ingo Molnar, Matt Turner, Fenghua Yu,
Mike Frysinger, user-mode-linux-devel, Konrad Rzeszutek Wilk,
Jeff Dike, Chris Metcalf, xen-devel, Mikael Starvik, linux-m32r,
Ivan Kokshaysky, user-mode-linux-user, uclinux-dist-devel,
Thomas Gleixner, linux-arm-kernel, Richard Henderson, Tony Luck,
linux-parisc, linux-cris-kernel, linux-am33-list, linux-kernel,
Ralf Baechle, Kyle McMartin, Paul Mundt, linux-alpha,
Martin Schwidefsky, linux390, Koichi Yasutake, linuxppc-dev,
David S. Miller
In-Reply-To: <1295262433.30950.53.camel@laptop>
On Mon, 2011-01-17 at 12:07 +0100, Peter Zijlstra wrote:
> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> index 68034bb..7ee0fc3 100644
> --- a/arch/powerpc/kernel/smp.c
> +++ b/arch/powerpc/kernel/smp.c
> @@ -128,6 +128,7 @@ static irqreturn_t call_function_action(int irq, void *data)
> static irqreturn_t reschedule_action(int irq, void *data)
> {
> /* we just need the return path side effect of checking need_resched */
> + scheduler_ipi();
> return IRQ_HANDLED;
> }
>
You missed:
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 9813605..467d122 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -98,6 +98,7 @@ void smp_message_recv(int msg)
break;
case PPC_MSG_RESCHEDULE:
/* we notice need_resched on exit */
+ scheduler_ipi();
break;
case PPC_MSG_CALL_FUNC_SINGLE:
generic_smp_call_function_single_interrupt();
Fold that in and add:
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
(We have two variants of the IPIs)
Cheers,
Ben.
^ permalink raw reply related
* Re: [PATCH v3 1/4] powerpc: Removing support for 'protected-sources'
From: Benjamin Herrenschmidt @ 2011-02-06 23:35 UTC (permalink / raw)
To: Meador Inge; +Cc: Hollis Blanchard, devicetree-discuss, linuxppc-dev
In-Reply-To: <1296861941-3370-2-git-send-email-meador_inge@mentor.com>
On Fri, 2011-02-04 at 17:25 -0600, Meador Inge wrote:
> In a recent thread [1,2,3] concerning device trees for AMP systems, the
> question of whether we really need 'protected-sources' arose. The general
> consensus was that a new boolean property 'pic-no-reset' (described in more
> detail in a following patch) could be expanded to cover the use cases that
> 'protected-sources' was covering.
>
> One concern that was raised was for legacy systems which already use the
> 'protected-sources' property [4]. For legacy use cases, 'protected-sources'
> will be treated as an alias of 'pic-no-reset'. The sources
> encoded in the 'protected-sources' cells, however, will not be processed. This
> legacy check is added in a later patch in the series.
I'm a bit annoyed here. Why do we need to do that ? Those Cell machines
are going to be real bastards to find and test with, and I don't really
see the point...
The reason for not resetting the MPIC wasn't -only- about the protected
sources, but also because, from memory, some MPIC implementations had
issues when toggling the reset lines (pseries I think is one).
That's actually why the MPIC_WANTS_RESET flag is working the other way
around, only platforms that actually want the reset set it.
This is orthogonal to the need to touch or not touch the interrupt
sources as set by firmware. Yes, having protected sources probably
implies no-reset but the reverse isn't necessarily true.
Ben.
> [1] http://lists.ozlabs.org/pipermail/devicetree-discuss/2011-January/004038.html
> [2] http://lists.ozlabs.org/pipermail/devicetree-discuss/2011-January/003991.html
> [3] http://lists.ozlabs.org/pipermail/devicetree-discuss/2011-January/004043.html
> [4] http://lists.ozlabs.org/pipermail/devicetree-discuss/2011-February/004254.html
>
> Signed-off-by: Meador Inge <meador_inge@mentor.com>
> Cc: Hollis Blanchard <hollis_blanchard@mentor.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> arch/powerpc/include/asm/mpic.h | 3 ---
> arch/powerpc/sysdev/mpic.c | 38 --------------------------------------
> 2 files changed, 0 insertions(+), 41 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/mpic.h b/arch/powerpc/include/asm/mpic.h
> index e000cce..9b94f18 100644
> --- a/arch/powerpc/include/asm/mpic.h
> +++ b/arch/powerpc/include/asm/mpic.h
> @@ -301,9 +301,6 @@ struct mpic
> struct mpic_reg_bank cpuregs[MPIC_MAX_CPUS];
> struct mpic_reg_bank isus[MPIC_MAX_ISU];
>
> - /* Protected sources */
> - unsigned long *protected;
> -
> #ifdef CONFIG_MPIC_WEIRD
> /* Pointer to HW info array */
> u32 *hw_set;
> diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
> index 7c13426..a98f41d 100644
> --- a/arch/powerpc/sysdev/mpic.c
> +++ b/arch/powerpc/sysdev/mpic.c
> @@ -947,8 +947,6 @@ static int mpic_host_map(struct irq_host *h, unsigned int virq,
>
> if (hw == mpic->spurious_vec)
> return -EINVAL;
> - if (mpic->protected && test_bit(hw, mpic->protected))
> - return -EINVAL;
>
> #ifdef CONFIG_SMP
> else if (hw >= mpic->ipi_vecs[0]) {
> @@ -1095,26 +1093,6 @@ struct mpic * __init mpic_alloc(struct device_node *node,
> if (node && of_get_property(node, "big-endian", NULL) != NULL)
> mpic->flags |= MPIC_BIG_ENDIAN;
>
> - /* Look for protected sources */
> - if (node) {
> - int psize;
> - unsigned int bits, mapsize;
> - const u32 *psrc =
> - of_get_property(node, "protected-sources", &psize);
> - if (psrc) {
> - psize /= 4;
> - bits = intvec_top + 1;
> - mapsize = BITS_TO_LONGS(bits) * sizeof(unsigned long);
> - mpic->protected = kzalloc(mapsize, GFP_KERNEL);
> - BUG_ON(mpic->protected == NULL);
> - for (i = 0; i < psize; i++) {
> - if (psrc[i] > intvec_top)
> - continue;
> - __set_bit(psrc[i], mpic->protected);
> - }
> - }
> - }
> -
> #ifdef CONFIG_MPIC_WEIRD
> mpic->hw_set = mpic_infos[MPIC_GET_REGSET(flags)];
> #endif
> @@ -1321,9 +1299,6 @@ void __init mpic_init(struct mpic *mpic)
> u32 vecpri = MPIC_VECPRI_MASK | i |
> (8 << MPIC_VECPRI_PRIORITY_SHIFT);
>
> - /* check if protected */
> - if (mpic->protected && test_bit(i, mpic->protected))
> - continue;
> /* init hw */
> mpic_irq_write(i, MPIC_INFO(IRQ_VECTOR_PRI), vecpri);
> mpic_irq_write(i, MPIC_INFO(IRQ_DESTINATION), 1 << cpu);
> @@ -1492,13 +1467,6 @@ static unsigned int _mpic_get_one_irq(struct mpic *mpic, int reg)
> mpic_eoi(mpic);
> return NO_IRQ;
> }
> - if (unlikely(mpic->protected && test_bit(src, mpic->protected))) {
> - if (printk_ratelimit())
> - printk(KERN_WARNING "%s: Got protected source %d !\n",
> - mpic->name, (int)src);
> - mpic_eoi(mpic);
> - return NO_IRQ;
> - }
>
> return irq_linear_revmap(mpic->irqhost, src);
> }
> @@ -1532,12 +1500,6 @@ unsigned int mpic_get_coreint_irq(void)
> mpic_eoi(mpic);
> return NO_IRQ;
> }
> - if (unlikely(mpic->protected && test_bit(src, mpic->protected))) {
> - if (printk_ratelimit())
> - printk(KERN_WARNING "%s: Got protected source %d !\n",
> - mpic->name, (int)src);
> - return NO_IRQ;
> - }
>
> return irq_linear_revmap(mpic->irqhost, src);
> #else
^ permalink raw reply
* Re: [PATCH 3/4]Define memory_block_size_bytes for powerpc/pseries
From: Benjamin Herrenschmidt @ 2011-02-06 23:39 UTC (permalink / raw)
To: Nathan Fontenot
Cc: Greg KH, linux-kernel, linux-mm, Robin Holt, linuxppc-dev,
KAMEZAWA Hiroyuki
In-Reply-To: <4D3866A0.6010803@austin.ibm.com>
On Thu, 2011-01-20 at 10:45 -0600, Nathan Fontenot wrote:
> Define a version of memory_block_size_bytes() for powerpc/pseries such that
> a memory block spans an entire lmb.
>
> Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
> Reviewed-by: Robin Holt <holt@sgi.com>
Hi Nathan !
Is somebody from -mm picking the rest of the series ? This patch as well
or shall I wait for the first two to go in and then pick that one in
-powerpc ?
Cheers,
Ben.
> ---
> arch/powerpc/platforms/pseries/hotplug-memory.c | 66 +++++++++++++++++++-----
> 1 file changed, 53 insertions(+), 13 deletions(-)
>
> Index: linux-2.6/arch/powerpc/platforms/pseries/hotplug-memory.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/pseries/hotplug-memory.c 2011-01-20 08:18:21.000000000 -0600
> +++ linux-2.6/arch/powerpc/platforms/pseries/hotplug-memory.c 2011-01-20 08:21:07.000000000 -0600
> @@ -17,6 +17,54 @@
> #include <asm/pSeries_reconfig.h>
> #include <asm/sparsemem.h>
>
> +static unsigned long get_memblock_size(void)
> +{
> + struct device_node *np;
> + unsigned int memblock_size = 0;
> +
> + np = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory");
> + if (np) {
> + const unsigned long *size;
> +
> + size = of_get_property(np, "ibm,lmb-size", NULL);
> + memblock_size = size ? *size : 0;
> +
> + of_node_put(np);
> + } else {
> + unsigned int memzero_size = 0;
> + const unsigned int *regs;
> +
> + np = of_find_node_by_path("/memory@0");
> + if (np) {
> + regs = of_get_property(np, "reg", NULL);
> + memzero_size = regs ? regs[3] : 0;
> + of_node_put(np);
> + }
> +
> + if (memzero_size) {
> + /* We now know the size of memory@0, use this to find
> + * the first memoryblock and get its size.
> + */
> + char buf[64];
> +
> + sprintf(buf, "/memory@%x", memzero_size);
> + np = of_find_node_by_path(buf);
> + if (np) {
> + regs = of_get_property(np, "reg", NULL);
> + memblock_size = regs ? regs[3] : 0;
> + of_node_put(np);
> + }
> + }
> + }
> +
> + return memblock_size;
> +}
> +
> +unsigned long memory_block_size_bytes(void)
> +{
> + return get_memblock_size();
> +}
> +
> static int pseries_remove_memblock(unsigned long base, unsigned int memblock_size)
> {
> unsigned long start, start_pfn;
> @@ -127,30 +175,22 @@ static int pseries_add_memory(struct dev
>
> static int pseries_drconf_memory(unsigned long *base, unsigned int action)
> {
> - struct device_node *np;
> - const unsigned long *lmb_size;
> + unsigned long memblock_size;
> int rc;
>
> - np = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory");
> - if (!np)
> + memblock_size = get_memblock_size();
> + if (!memblock_size)
> return -EINVAL;
>
> - lmb_size = of_get_property(np, "ibm,lmb-size", NULL);
> - if (!lmb_size) {
> - of_node_put(np);
> - return -EINVAL;
> - }
> -
> if (action == PSERIES_DRCONF_MEM_ADD) {
> - rc = memblock_add(*base, *lmb_size);
> + rc = memblock_add(*base, memblock_size);
> rc = (rc < 0) ? -EINVAL : 0;
> } else if (action == PSERIES_DRCONF_MEM_REMOVE) {
> - rc = pseries_remove_memblock(*base, *lmb_size);
> + rc = pseries_remove_memblock(*base, memblock_size);
> } else {
> rc = -EINVAL;
> }
>
> - of_node_put(np);
> return rc;
> }
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply
* [PATCH 21/23] hvc_console: Fix race between hvc_close and hvc_remove
From: Willy Tarreau @ 2011-02-06 23:23 UTC (permalink / raw)
To: linux-kernel, stable, stable-review
Cc: Greg Kroah-Hartman, Rusty Russell, linuxppc-dev, Amit Shah,
Willy Tarreau, Alan Cox
In-Reply-To: <4beed4da27f06efb2c13d6ed48850634@local>
2.6.27.58-stable review patch. If anyone has any objections, please let us know.
------------------
From: Amit Shah <amit.shah@redhat.com>
commit e74d098c66543d0731de62eb747ccd5b636a6f4c upstream.
Alan pointed out a race in the code where hvc_remove is invoked. The
recent virtio_console work is the first user of hvc_remove().
Alan describes it thus:
The hvc_console assumes that a close and remove call can't occur at the
same time.
In addition tty_hangup(tty) is problematic as tty_hangup is asynchronous
itself....
So this can happen
hvc_close hvc_remove
hung up ? - no
lock
tty = hp->tty
unlock
lock
hp->tty = NULL
unlock
notify del
kref_put the hvc struct
close completes
tty is destroyed
tty_hangup dead tty
tty->ops will be NULL
NULL->...
This patch adds some tty krefs and also converts to using tty_vhangup().
Reported-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
CC: linuxppc-dev@ozlabs.org
CC: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Willy Tarreau <w@1wt.eu>
---
drivers/char/hvc_console.c | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
Index: longterm-2.6.27/drivers/char/hvc_console.c
===================================================================
--- longterm-2.6.27.orig/drivers/char/hvc_console.c 2011-01-23 10:52:15.000000000 +0100
+++ longterm-2.6.27/drivers/char/hvc_console.c 2011-01-29 15:33:05.169065818 +0100
@@ -312,6 +312,7 @@
spin_lock_irqsave(&hp->lock, flags);
/* Check and then increment for fast path open. */
if (hp->count++ > 0) {
+ tty_kref_get(tty);
spin_unlock_irqrestore(&hp->lock, flags);
hvc_kick();
return 0;
@@ -320,7 +321,7 @@
tty->driver_data = hp;
tty->low_latency = 1; /* Makes flushes to ldisc synchronous. */
- hp->tty = tty;
+ hp->tty = tty_kref_get(tty);
spin_unlock_irqrestore(&hp->lock, flags);
@@ -337,6 +338,7 @@
spin_lock_irqsave(&hp->lock, flags);
hp->tty = NULL;
spin_unlock_irqrestore(&hp->lock, flags);
+ tty_kref_put(tty);
tty->driver_data = NULL;
kref_put(&hp->kref, destroy_hvc_struct);
printk(KERN_ERR "hvc_open: request_irq failed with rc %d.\n", rc);
@@ -364,13 +366,18 @@
return;
hp = tty->driver_data;
+
spin_lock_irqsave(&hp->lock, flags);
+ tty_kref_get(tty);
if (--hp->count == 0) {
/* We are done with the tty pointer now. */
hp->tty = NULL;
spin_unlock_irqrestore(&hp->lock, flags);
+ /* Put the ref obtained in hvc_open() */
+ tty_kref_put(tty);
+
if (hp->ops->notifier_del)
hp->ops->notifier_del(hp, hp->data);
@@ -387,6 +394,7 @@
spin_unlock_irqrestore(&hp->lock, flags);
}
+ tty_kref_put(tty);
kref_put(&hp->kref, destroy_hvc_struct);
}
@@ -423,6 +431,7 @@
while(temp_open_count) {
--temp_open_count;
+ tty_kref_put(tty);
kref_put(&hp->kref, destroy_hvc_struct);
}
}
@@ -550,7 +559,7 @@
poll_mask |= HVC_POLL_WRITE;
/* No tty attached, just skip */
- tty = hp->tty;
+ tty = tty_kref_get(hp->tty);
if (tty == NULL)
goto bail;
@@ -627,6 +636,8 @@
tty_flip_buffer_push(tty);
}
+ if (tty)
+ tty_kref_put(tty);
return poll_mask;
}
@@ -749,7 +760,7 @@
struct tty_struct *tty;
spin_lock_irqsave(&hp->lock, flags);
- tty = hp->tty;
+ tty = tty_kref_get(hp->tty);
if (hp->index < MAX_NR_HVC_CONSOLES)
vtermnos[hp->index] = -1;
@@ -761,18 +772,18 @@
/*
* We 'put' the instance that was grabbed when the kref instance
* was initialized using kref_init(). Let the last holder of this
- * kref cause it to be removed, which will probably be the tty_hangup
+ * kref cause it to be removed, which will probably be the tty_vhangup
* below.
*/
kref_put(&hp->kref, destroy_hvc_struct);
/*
- * This function call will auto chain call hvc_hangup. The tty should
- * always be valid at this time unless a simultaneous tty close already
- * cleaned up the hvc_struct.
+ * This function call will auto chain call hvc_hangup.
*/
- if (tty)
- tty_hangup(tty);
+ if (tty) {
+ tty_vhangup(tty);
+ tty_kref_put(tty);
+ }
return 0;
}
^ permalink raw reply
* RE: [PATCH] e500: Erratum cpu a005 workaround
From: Benjamin Herrenschmidt @ 2011-02-06 23:49 UTC (permalink / raw)
To: Liu Yu-B13201; +Cc: Gala Kumar-B11780, linuxppc-dev@lists.ozlabs.org
In-Reply-To: <FBDE6FBB4662C043AC9EECB95F62CDDE114038@039-SN1MPN1-005.039d.mgd.msft.net>
> >
> > This isn't the way to do this. We normally add entries in
> > cputable.c an add a new cpu_feature_bit for the errata.
> >
> > Than above we'd do:
> >
> > if (cur_cpu_spec->cpu_features & CPU_FTR_E500_A005_ERRATUM)
> >
> >
>
> IMHO, a cpu erratum is not a cpu feature.
> See there're only 32 bits can be used for all PowerPC platform to represent cpu feature,
> then is it worth consuming one of them to represent one e500 erratum?
This is an interesting debate :-)
We have used cpu_features for errata in the past. However, we are
getting a bit short and I'd rather keep CPU features for things
that are spread out in multiple places and/or hitting hot code path.
If the workaround is very limited to a single non-critical code path,
testing the PVR might actually be a nicer way to do it.
Now, this specific patch is ... hrm ... hard to decide. I don't like
that much the global variable. On the other hand, it's static and allows
the whole business of this errata to be completely local to the
math_efp.c file which is a good thing.
So I'm tempted to say go with the patch as it-is, but I'll let Kumar
ultimately decide.
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCH 1/2] video, sm501: add OF binding to support SM501
From: Benjamin Herrenschmidt @ 2011-02-06 23:45 UTC (permalink / raw)
To: Heiko Schocher; +Cc: linux-fbdev, devicetree-discuss, linuxppc-dev
In-Reply-To: <1291451028-22532-1-git-send-email-hs@denx.de>
On Sat, 2010-12-04 at 09:23 +0100, Heiko Schocher wrote:
> - add binding to OF, compatible name "smi,sm501"
>
> - add read/write functions for using this driver
> also on powerpc plattforms
.../...
Who plans to merge that patch series ? I'm happy for whoever is doing
that to take the powerpc patch at the end (that adds the entry to
the .dts file) with my
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCH] watchdog: booke_wdt: clean up status messages
From: Benjamin Herrenschmidt @ 2011-02-07 1:06 UTC (permalink / raw)
To: Timur Tabi; +Cc: linuxppc-dev, wim, linux-watchdog
In-Reply-To: <1295299780-27338-1-git-send-email-timur@freescale.com>
On Mon, 2011-01-17 at 15:29 -0600, Timur Tabi wrote:
> Improve the status messages that are displayed during some operations of the
> PowerPC watchdog timer driver. When the watchdog is enabled, the timeout is
> displayed as a number of seconds, instead of an obscure "period". The "period"
> is the position of a bit in a 64-bit timer register. The higher the value,
> the quicker the watchdog timeout occurs. Some people chose a high "period"
> value for the timer and get confused as to why the board resets within a
> few seconds.
>
> Messages displayed during open and close are now debug messages, so that they
> don't clutter the console by default. Finally, printk() is replaced with the
> pr_xxx() equivalent.
Minor nit bu
>
> - printk(KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n");
> + pr_info("PowerPC Book-E Watchdog Timer Loaded\n");
> ident.firmware_version = cur_cpu_spec->pvr_value;
>
> ret = misc_register(&booke_wdt_miscdev);
> if (ret) {
> - printk(KERN_CRIT "Cannot register miscdev on minor=%d: %d\n",
> - WATCHDOG_MINOR, ret);
> + pr_err("booke_wdt: cannot register device (minor=%u, ret=%i)\n",
> + WATCHDOG_MINOR, ret);
> return ret;
> }
>
> spin_lock(&booke_wdt_lock);
> if (booke_wdt_enabled == 1) {
> - printk(KERN_INFO
> - "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n",
> - booke_wdt_period);
> + pr_info("booke_wdt: watchdog enabled (timeout = %llu sec)\n",
> + period_to_sec(booke_wdt_period));
> on_each_cpu(__booke_wdt_enable, NULL, 0);
> }
If you're going to cleanup the messages, then I think displaying:
PowerPC Book-E Watchdog Timer Loaded
booke_wdt: watchdog enabled (timeout = xxx sec)
Isn't very nice.
Lacks consistency ... you can prefix both lines the same way, or
maybe better print only one line with all the necessary info.
Ben.
^ permalink raw reply
* Re: [PATCH v3 1/4] powerpc: Removing support for 'protected-sources'
From: Meador Inge @ 2011-02-07 1:32 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Hollis Blanchard, devicetree-discuss, linuxppc-dev
In-Reply-To: <1297035336.14982.14.camel@pasglop>
On 02/06/2011 05:35 PM, Benjamin Herrenschmidt wrote:
> On Fri, 2011-02-04 at 17:25 -0600, Meador Inge wrote:
>> In a recent thread [1,2,3] concerning device trees for AMP systems, the
>> question of whether we really need 'protected-sources' arose. The general
>> consensus was that a new boolean property 'pic-no-reset' (described in more
>> detail in a following patch) could be expanded to cover the use cases that
>> 'protected-sources' was covering.
>>
>> One concern that was raised was for legacy systems which already use the
>> 'protected-sources' property [4]. For legacy use cases, 'protected-sources'
>> will be treated as an alias of 'pic-no-reset'. The sources
>> encoded in the 'protected-sources' cells, however, will not be processed. This
>> legacy check is added in a later patch in the series.
>
> I'm a bit annoyed here. Why do we need to do that ? Those Cell machines
Apologies, that certainly was not the intent.
> are going to be real bastards to find and test with, and I don't really
> see the point...
The idea came up when submitting a patch for documenting an Open PIC
binding. The following two properties were documented in that binding:
(1) "protected-sources" and (2) "pic-no-reset". "pic-no-reset" is a
newly proposed property with the intent of specifying from a device tree
that the PIC should not be reset. The question of whether the one
property, "pic-no-reset", would suffice for both purposes came up.
It seems reasonable that "pic-no-reset" could satisfy the use case that
"protected-sources" is covering (since all of the sources that a
particular machine is actually using are already explicitly mentioned in
the device tree) and the use case of marking from a device tree that the
PIC should not be reset. So it is not so much as a need as it is a
potential simplification. It sounds like as a practical concern
(several systems using "protected-sources" are already in the wild and
testing considerations) that this may not be possible, which is fine.
> The reason for not resetting the MPIC wasn't -only- about the protected
> sources, but also because, from memory, some MPIC implementations had
> issues when toggling the reset lines (pseries I think is one).
>
> That's actually why the MPIC_WANTS_RESET flag is working the other way
> around, only platforms that actually want the reset set it.
>
> This is orthogonal to the need to touch or not touch the interrupt
> sources as set by firmware. Yes, having protected sources probably
> implies no-reset but the reverse isn't necessarily true.
So barring the removal of protected sources, does the inclusion of the
"pic-no-reset" property seem reasonable?
> Ben.
--
Meador Inge | meador_inge AT mentor.com
Mentor Embedded | http://www.mentor.com/embedded-software
^ permalink raw reply
* Re: [PATCH v3 1/4] powerpc: Removing support for 'protected-sources'
From: Benjamin Herrenschmidt @ 2011-02-07 1:37 UTC (permalink / raw)
To: Meador Inge; +Cc: Hollis Blanchard, devicetree-discuss, linuxppc-dev
In-Reply-To: <4D4F4BAD.4000909@mentor.com>
On Sun, 2011-02-06 at 19:32 -0600, Meador Inge wrote:
> So barring the removal of protected sources, does the inclusion of the
> "pic-no-reset" property seem reasonable?
Sure.
Ben.
^ permalink raw reply
* Re: [PATCH 3/4]Define memory_block_size_bytes for powerpc/pseries
From: Greg KH @ 2011-02-07 1:42 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: linux-kernel, linux-mm, Robin Holt, linuxppc-dev,
KAMEZAWA Hiroyuki
In-Reply-To: <1297035563.14982.15.camel@pasglop>
On Mon, Feb 07, 2011 at 10:39:23AM +1100, Benjamin Herrenschmidt wrote:
> On Thu, 2011-01-20 at 10:45 -0600, Nathan Fontenot wrote:
> > Define a version of memory_block_size_bytes() for powerpc/pseries such that
> > a memory block spans an entire lmb.
> >
> > Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
> > Reviewed-by: Robin Holt <holt@sgi.com>
>
> Hi Nathan !
>
> Is somebody from -mm picking the rest of the series ? This patch as well
> or shall I wait for the first two to go in and then pick that one in
> -powerpc ?
I took all of these in my tree already, is that ok?
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH] powerpc: Fix call to flush_ptrace_hw_breakpoint()
From: K.Prasad @ 2011-02-07 2:56 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1297032853.14982.3.camel@pasglop>
On Mon, Feb 07, 2011 at 09:54:13AM +1100, Benjamin Herrenschmidt wrote:
> A typo in the #ifdef statement makes us never call it
> in flush_thread()
>
I wish it never compiled for such typos :-)
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: K.Prasad <prasad@linux.vnet.ibm.com>
> ---
>
> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> index 7a1d5cb..c4e4eab 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -670,11 +670,11 @@ void flush_thread(void)
> {
> discard_lazy_cpu_state();
>
> -#ifdef CONFIG_HAVE_HW_BREAKPOINTS
> +#ifdef CONFIG_HAVE_HW_BREAKPOINT
> flush_ptrace_hw_breakpoint(current);
> -#else /* CONFIG_HAVE_HW_BREAKPOINTS */
> +#else /* CONFIG_HAVE_HW_BREAKPOINT */
> set_debug_reg_defaults(¤t->thread);
> -#endif /* CONFIG_HAVE_HW_BREAKPOINTS */
> +#endif /* CONFIG_HAVE_HW_BREAKPOINT */
> }
>
> void
>
>
^ permalink raw reply
* Re: [PATCH -mm 2/6] powerpc: convert little-endian bitops macros to static inline functions
From: Akinobu Mita @ 2011-02-07 3:08 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: linux-arch, linuxppc-dev, akpm, Paul Mackerras, linux-kernel
In-Reply-To: <1297034086.14982.8.camel@pasglop>
2011/2/7 Benjamin Herrenschmidt <benh@kernel.crashing.org>:
> On Thu, 2011-01-27 at 22:56 +0900, Akinobu Mita wrote:
>> (This patch is intended to be folded into the patch in -mm:
>> powerpc-introduce-little-endian-bitops.patch)
>>
>> The little-endian bitops on powerpc are written as preprocessor
>> macros with the cast to "unsigned long *".
>> This means that even non-pointers will be accepted without an error, and
>> that is a Very Bad Thing.
>>
>> This converts the little-endian bitops macros to static inline functions
>> with proper prototypes.
>
> No objection to the powerpc variant of the patches. What is the status
> with the wholes series tho ? Does it looks like its going to be
> accepted ? Do you expect my Ack and will merge the whole thing at once ?
The whole series now seems acceptable since I fixed two issues
that Linus found annoying. (the naming and the change of prototype)
Please give your ack if it is OK.
I should have fixed them quickly so that the series went upstream
in the last merge windows. But I couldn't because I spent some time
fixing and compile testing for a bisection hole.
> Does it break bisection unless it's merged as one single giant patch ?
I think there is no known problem that breaks bisectability by
this patch series.
^ permalink raw reply
* Re: [PATCH] powerpc: Fix call to flush_ptrace_hw_breakpoint()
From: Benjamin Herrenschmidt @ 2011-02-07 3:10 UTC (permalink / raw)
To: prasad; +Cc: linuxppc-dev, David Kleikamp
In-Reply-To: <20110207025643.GA12223@in.ibm.com>
On Mon, 2011-02-07 at 08:26 +0530, K.Prasad wrote:
> On Mon, Feb 07, 2011 at 09:54:13AM +1100, Benjamin Herrenschmidt wrote:
> > A typo in the #ifdef statement makes us never call it
> > in flush_thread()
> >
>
> I wish it never compiled for such typos :-)
>
>
> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Acked-by: K.Prasad <prasad@linux.vnet.ibm.com>
Interestingly, that 'fix' now breaks the build:
cc1: warnings being treated as errors
/home/benh/linux-powerpc-test/arch/powerpc/kernel/process.c:356: error:
'set_debug_reg_defaults' defined but not used
This file is is becoming an absolute mess of ifdef's in large part due
to the new BookE debug stuff and your HW breakpoint stuff... Any chance
you and Shaggy see if you can improve that situation a bit ?
Cheers,
Ben.
^ permalink raw reply
* [git pull] Please pull powerpc.git merge branch
From: Benjamin Herrenschmidt @ 2011-02-07 3:57 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linuxppc-dev list, Andrew Morton, Linux Kernel list
Hi Linus !
Here are a few powerpc bug fixes for you. Mostly Anton and Jesse fixing
up the new VPNH feature (which was added this cycle) and a handful of
other fixes worth having.
Cheers,
Ben.
The following changes since commit 8dbdea8444d303a772bceb1ba963f0e3273bfc5e:
Merge branch 'ixp4xx' of git://git.kernel.org/pub/scm/linux/kernel/git/chris/linux-2.6 (2011-02-06 12:05:58 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git merge
Anton Blanchard (6):
powerpc/numa: Only use active VPHN count fields
powerpc/numa: Check for all VPHN changes
powerpc/numa: Add length when creating OF properties via VPHN
powerpc/numa: Disable VPHN on dedicated processor partitions
powerpc/numa: Fix bug in unmap_cpu_from_node
powerpc: Fix hcall tracepoint recursion
Benjamin Herrenschmidt (2):
powerpc: Pass the right cpu_spec to ->setup_cpu() on 64-bit
powerpc: Fix some 6xx/7xxx CPU setup functions
Jesse Larrew (3):
powerpc/pseries: Fix typo in VPHN comments
powerpc/pseries: Fix brace placement in numa.c
powerpc/pseries: Remove unnecessary variable initializations in numa.c
Scott Wood (2):
powerpc: Fix pfn_valid() when memory starts at a non-zero address
powerpc/book3e: Protect complex macro args in mmu-book3e.h
arch/powerpc/include/asm/mmu-book3e.h | 8 ++--
arch/powerpc/include/asm/page.h | 2 +-
arch/powerpc/kernel/cpu_setup_6xx.S | 40 ++++++++++++------------
arch/powerpc/kernel/cputable.c | 4 +-
arch/powerpc/mm/numa.c | 55 ++++++++++++++++++---------------
arch/powerpc/platforms/pseries/lpar.c | 37 ++++++++++++++++++++++
6 files changed, 94 insertions(+), 52 deletions(-)
^ permalink raw reply
* [PATCH] powerpc/pseries: Reduce HVCS driver insanity
From: Benjamin Herrenschmidt @ 2011-02-07 4:26 UTC (permalink / raw)
To: linuxppc-dev
The HVCS driver, for those who don't know, is a driver for the "server" side
of the IBM virtual terminal mechanism allowing Linux partitions to act as
terminal servers under IBM PowerVM hypervisor. It's almost never used on
the field at the moment.
However, it's part of our configs, and in its current incarnation, will
allocate the tty driver & major (with 64 minors) and create a kernel thread
whether it's used or not, ie, whether the hypervisor did put a virtual
terminal server device node in the partition or not (or whether running on
a pseries machine or not even).
This in turns causes modern distro's udev's to start trying to open all
those 64 minors at boot, which, since they aren't linked to anything,
causes the driver to spew errors in the kernel log for each of them.
Not nice.
This moves all that initialization to a function which is now only called
the first time a terminal server virtual IO device is actually probed
(that is almost never).
There's still a _LOT_ of cleanup that can be done in this driver, some
simple (almost all printk's statements in there shall either just be
removed or in some case turned into better written & more informative
messages, including using the dev_* variants etc...). This is left as
an exercise for whoever actually cares about that driver.
One could also try to be smart and dispose of all the tty related
resources when the last instance of the VIO server device
is removed (Hotplug anybody ?).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index bedc6c1..7e315b7 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -309,6 +309,7 @@ struct hvcs_struct {
static LIST_HEAD(hvcs_structs);
static DEFINE_SPINLOCK(hvcs_structs_lock);
+static DEFINE_MUTEX(hvcs_init_mutex);
static void hvcs_unthrottle(struct tty_struct *tty);
static void hvcs_throttle(struct tty_struct *tty);
@@ -340,6 +341,7 @@ static int __devinit hvcs_probe(struct vio_dev *dev,
static int __devexit hvcs_remove(struct vio_dev *dev);
static int __init hvcs_module_init(void);
static void __exit hvcs_module_exit(void);
+static int __devinit hvcs_initialize(void);
#define HVCS_SCHED_READ 0x00000001
#define HVCS_QUICK_READ 0x00000002
@@ -762,7 +764,7 @@ static int __devinit hvcs_probe(
const struct vio_device_id *id)
{
struct hvcs_struct *hvcsd;
- int index;
+ int index, rc;
int retval;
if (!dev || !id) {
@@ -770,6 +772,13 @@ static int __devinit hvcs_probe(
return -EPERM;
}
+ /* Make sure we are properly initialized */
+ rc = hvcs_initialize();
+ if (rc) {
+ pr_err("HVCS: Failed to initialize core driver.\n");
+ return rc;
+ }
+
/* early to avoid cleanup on failure */
index = hvcs_get_index();
if (index < 0) {
@@ -1464,12 +1473,15 @@ static void hvcs_free_index_list(void)
hvcs_index_count = 0;
}
-static int __init hvcs_module_init(void)
+static int __devinit hvcs_initialize(void)
{
- int rc;
- int num_ttys_to_alloc;
+ int rc, num_ttys_to_alloc;
- printk(KERN_INFO "Initializing %s\n", hvcs_driver_string);
+ mutex_lock(&hvcs_init_mutex);
+ if (hvcs_task) {
+ mutex_unlock(&hvcs_init_mutex);
+ return 0;
+ }
/* Has the user specified an overload with an insmod param? */
if (hvcs_parm_num_devs <= 0 ||
@@ -1528,35 +1540,13 @@ static int __init hvcs_module_init(void)
hvcs_task = kthread_run(khvcsd, NULL, "khvcsd");
if (IS_ERR(hvcs_task)) {
- printk(KERN_ERR "HVCS: khvcsd creation failed. Driver not loaded.\n");
+ printk(KERN_ERR "HVCS: khvcsd creation failed.\n");
rc = -EIO;
goto kthread_fail;
}
-
- rc = vio_register_driver(&hvcs_vio_driver);
- if (rc) {
- printk(KERN_ERR "HVCS: can't register vio driver\n");
- goto vio_fail;
- }
-
- /*
- * This needs to be done AFTER the vio_register_driver() call or else
- * the kobjects won't be initialized properly.
- */
- rc = driver_create_file(&(hvcs_vio_driver.driver), &driver_attr_rescan);
- if (rc) {
- printk(KERN_ERR "HVCS: sysfs attr create failed\n");
- goto attr_fail;
- }
-
- printk(KERN_INFO "HVCS: driver module inserted.\n");
-
+ mutex_unlock(&hvcs_init_mutex);
return 0;
-attr_fail:
- vio_unregister_driver(&hvcs_vio_driver);
-vio_fail:
- kthread_stop(hvcs_task);
kthread_fail:
kfree(hvcs_pi_buff);
buff_alloc_fail:
@@ -1566,15 +1556,39 @@ register_fail:
index_fail:
put_tty_driver(hvcs_tty_driver);
hvcs_tty_driver = NULL;
+ mutex_unlock(&hvcs_init_mutex);
return rc;
}
+static int __init hvcs_module_init(void)
+{
+ int rc = vio_register_driver(&hvcs_vio_driver);
+ if (rc) {
+ printk(KERN_ERR "HVCS: can't register vio driver\n");
+ return rc;
+ }
+
+ pr_info("HVCS: Driver registered.\n");
+
+ /* This needs to be done AFTER the vio_register_driver() call or else
+ * the kobjects won't be initialized properly.
+ */
+ rc = driver_create_file(&(hvcs_vio_driver.driver), &driver_attr_rescan);
+ if (rc)
+ pr_warning(KERN_ERR "HVCS: Failed to create rescan file (err %d)\n", rc);
+
+ return 0;
+}
+
static void __exit hvcs_module_exit(void)
{
/*
* This driver receives hvcs_remove callbacks for each device upon
* module removal.
*/
+ vio_unregister_driver(&hvcs_vio_driver);
+ if (!hvcs_task)
+ return;
/*
* This synchronous operation will wake the khvcsd kthread if it is
@@ -1589,8 +1603,6 @@ static void __exit hvcs_module_exit(void)
driver_remove_file(&hvcs_vio_driver.driver, &driver_attr_rescan);
- vio_unregister_driver(&hvcs_vio_driver);
-
tty_unregister_driver(hvcs_tty_driver);
hvcs_free_index_list();
^ permalink raw reply related
* Re: [PATCH 5/6] nvram: Slim down zlib_deflate workspace when possible
From: Benjamin Herrenschmidt @ 2011-02-07 4:39 UTC (permalink / raw)
To: Jim Keniston; +Cc: linuxppc-dev
In-Reply-To: <20101114041539.9457.11974.stgit@localhost.localdomain>
On Sat, 2010-11-13 at 20:15 -0800, Jim Keniston wrote:
> Instead of always creating a huge (268K) deflate_workspace with the
> maximum compression parameters (windowBits=15, memLevel=8), allow the
> caller to obtain a smaller workspace (24K in our case) by specifying
> smaller parameter values -- via zlib_deflate_workspacesize2(). In our
> case, a small workspace is a win because our choices are to allocate
> the workspace when we need it (i.e., during an oops or panic) or
> allocate it at boot time. (We do the latter.)
>
> Signed-off-by: Jim Keniston <jkenisto@us.ibm.com>
> ---
Can you submit that to lkml please ? CC Linus and Andrew (or send to
Andrew/Linus and CC lkml). This change shouldn't go via the powerpc tree
since it changes the generic zlib code.
I'm dropping 5/6 and 6/6 for now... still reviewing the rest.
Cheers,
Ben.
> include/linux/zlib.h | 14 ++++++++++++--
> lib/zlib_deflate/deflate.c | 33 ++++++++++++++++++++++++++++++++-
> lib/zlib_deflate/deflate_syms.c | 1 +
> lib/zlib_deflate/defutil.h | 17 +++++++++++++----
> 4 files changed, 58 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/zlib.h b/include/linux/zlib.h
> index 40c49cb..3f15036 100644
> --- a/include/linux/zlib.h
> +++ b/include/linux/zlib.h
> @@ -179,11 +179,21 @@ typedef z_stream *z_streamp;
>
> /* basic functions */
>
> +extern int zlib_deflate_workspacesize2 (int windowBits, int memLevel);
> +/*
> + Returns the number of bytes that needs to be allocated for a per-
> + stream workspace with the specified parameters. A pointer to this
> + number of bytes should be returned in stream->workspace before
> + calling zlib_deflateInit2(); and the windowBits and memLevel
> + parameters passed to zlib_deflateInit2() must not exceed those
> + passed here.
> +*/
> +
> extern int zlib_deflate_workspacesize (void);
> /*
> Returns the number of bytes that needs to be allocated for a per-
> - stream workspace. A pointer to this number of bytes should be
> - returned in stream->workspace before calling zlib_deflateInit().
> + stream workspace with the default (large) windowBits and memLevel
> + parameters.
> */
>
> /*
> diff --git a/lib/zlib_deflate/deflate.c b/lib/zlib_deflate/deflate.c
> index 46a31e5..cdb207a 100644
> --- a/lib/zlib_deflate/deflate.c
> +++ b/lib/zlib_deflate/deflate.c
> @@ -176,6 +176,7 @@ int zlib_deflateInit2(
> deflate_state *s;
> int noheader = 0;
> deflate_workspace *mem;
> + char *next;
>
> ush *overlay;
> /* We overlay pending_buf and d_buf+l_buf. This works since the average
> @@ -199,6 +200,21 @@ int zlib_deflateInit2(
> strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
> return Z_STREAM_ERROR;
> }
> +
> + /*
> + * Direct the workspace's pointers to the chunks that were allocated
> + * along with the deflate_workspace struct.
> + */
> + next = (char *) mem;
> + next += sizeof(*mem);
> + mem->window_memory = (Byte *) next;
> + next += zlib_deflate_window_memsize(windowBits);
> + mem->prev_memory = (Pos *) next;
> + next += zlib_deflate_prev_memsize(windowBits);
> + mem->head_memory = (Pos *) next;
> + next += zlib_deflate_head_memsize(memLevel);
> + mem->overlay_memory = next;
> +
> s = (deflate_state *) &(mem->deflate_memory);
> strm->state = (struct internal_state *)s;
> s->strm = strm;
> @@ -1249,5 +1265,20 @@ static block_state deflate_slow(
>
> int zlib_deflate_workspacesize(void)
> {
> - return sizeof(deflate_workspace);
> + return zlib_deflate_workspacesize2(MAX_WBITS, MAX_MEM_LEVEL);
> +}
> +
> +int zlib_deflate_workspacesize2(int windowBits, int memLevel)
> +{
> + if (windowBits < 0) /* undocumented feature: suppress zlib header */
> + windowBits = -windowBits;
> + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL ||
> + windowBits < 9 || windowBits > 15)
> + return -1;
> +
> + return sizeof(deflate_workspace)
> + + zlib_deflate_window_memsize(windowBits)
> + + zlib_deflate_prev_memsize(windowBits)
> + + zlib_deflate_head_memsize(memLevel)
> + + zlib_deflate_overlay_memsize(memLevel);
> }
> diff --git a/lib/zlib_deflate/deflate_syms.c b/lib/zlib_deflate/deflate_syms.c
> index ccfe25f..cdf1cdd 100644
> --- a/lib/zlib_deflate/deflate_syms.c
> +++ b/lib/zlib_deflate/deflate_syms.c
> @@ -11,6 +11,7 @@
> #include <linux/zlib.h>
>
> EXPORT_SYMBOL(zlib_deflate_workspacesize);
> +EXPORT_SYMBOL(zlib_deflate_workspacesize2);
> EXPORT_SYMBOL(zlib_deflate);
> EXPORT_SYMBOL(zlib_deflateInit2);
> EXPORT_SYMBOL(zlib_deflateEnd);
> diff --git a/lib/zlib_deflate/defutil.h b/lib/zlib_deflate/defutil.h
> index 6b15a90..b640b64 100644
> --- a/lib/zlib_deflate/defutil.h
> +++ b/lib/zlib_deflate/defutil.h
> @@ -241,12 +241,21 @@ typedef struct deflate_state {
> typedef struct deflate_workspace {
> /* State memory for the deflator */
> deflate_state deflate_memory;
> - Byte window_memory[2 * (1 << MAX_WBITS)];
> - Pos prev_memory[1 << MAX_WBITS];
> - Pos head_memory[1 << (MAX_MEM_LEVEL + 7)];
> - char overlay_memory[(1 << (MAX_MEM_LEVEL + 6)) * (sizeof(ush)+2)];
> + Byte *window_memory;
> + Pos *prev_memory;
> + Pos *head_memory;
> + char *overlay_memory;
> } deflate_workspace;
>
> +#define zlib_deflate_window_memsize(windowBits) \
> + (2 * (1 << (windowBits)) * sizeof(Byte))
> +#define zlib_deflate_prev_memsize(windowBits) \
> + ((1 << (windowBits)) * sizeof(Pos))
> +#define zlib_deflate_head_memsize(memLevel) \
> + ((1 << ((memLevel)+7)) * sizeof(Pos))
> +#define zlib_deflate_overlay_memsize(memLevel) \
> + ((1 << ((memLevel)+6)) * (sizeof(ush)+2))
> +
> /* Output a byte on the stream.
> * IN assertion: there is enough room in pending_buf.
> */
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply
* Re: [PATCH] powerpc: Fix call to flush_ptrace_hw_breakpoint()
From: K.Prasad @ 2011-02-07 4:52 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, David Kleikamp
In-Reply-To: <1297048239.14982.29.camel@pasglop>
On Mon, Feb 07, 2011 at 02:10:39PM +1100, Benjamin Herrenschmidt wrote:
> On Mon, 2011-02-07 at 08:26 +0530, K.Prasad wrote:
> > On Mon, Feb 07, 2011 at 09:54:13AM +1100, Benjamin Herrenschmidt wrote:
> > > A typo in the #ifdef statement makes us never call it
> > > in flush_thread()
> > >
> >
> > I wish it never compiled for such typos :-)
> >
> >
> > > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Acked-by: K.Prasad <prasad@linux.vnet.ibm.com>
>
> Interestingly, that 'fix' now breaks the build:
>
> cc1: warnings being treated as errors
> /home/benh/linux-powerpc-test/arch/powerpc/kernel/process.c:356: error:
> 'set_debug_reg_defaults' defined but not used
>
> This file is is becoming an absolute mess of ifdef's in large part due
> to the new BookE debug stuff and your HW breakpoint stuff... Any chance
> you and Shaggy see if you can improve that situation a bit ?
>
> Cheers,
> Ben.
>
>
Okay! Another wrapper of "#ifndef CONFIG_HAVE_HW_BREAKPOINT" around the
definition of 'set_debug_reg_defaults'.
There's indeed too much sprinkling of #ifdefs in the code, but most of
it would go away when the BookE code also uses the generic hw-breakpoint
interfaces. Given the advanced debug features that BookE supports, it's
unfortunately not that straight-forward (needs additions to generic
hw-breakpoint infrastructure).
Thanks,
K.Prasad
^ permalink raw reply
* Re: [PATCH 1/6] nvram: Generalize code for OS partitions in NVRAM
From: Benjamin Herrenschmidt @ 2011-02-07 4:57 UTC (permalink / raw)
To: Jim Keniston; +Cc: linuxppc-dev
In-Reply-To: <20101114041516.9457.2462.stgit@localhost.localdomain>
On Sat, 2010-11-13 at 20:15 -0800, Jim Keniston wrote:
> Adapt the functions used to create and write to the RTAS-log partition
> to work with any OS-type partition.
>
> Signed-off-by: Jim Keniston <jkenisto@us.ibm.com>
> ---
Overall pretty good (sorry for taking that long to review, I've been
swamped down). Just a handful of minor nits:
> +/*
> + * Per the criteria passed via nvram_remove_partition(), should this
> + * partition be removed? 1=remove, 0=keep
> + */
> +static int nvram_condemn_partition(struct nvram_partition *part,
> + const char *name, int sig, const char *exceptions[])
As "fun" as this name is, it didn't help me understand what the function
was about until I read the code for the next one :-)
What about instead something like nvram_can_remove_partition() or
something a bit more explicit like that ?
"comdemn" made me thought it was a function used to "mark" partitions
to be killed later, which is not what the function does.
.../...
> +static const char *valid_os_partitions[] = {
> + "ibm,rtas-log",
> + NULL
> +};
Can you pick a name that will be less confusing in the global
symbol table ? Something like "pseries_nvram_os_partitions"
or whatever shorter you can come up with which doesn't suck ?
Also, should we move that "os partition" core out of pseries ?
Looks like it will be useful for a few other platforms, I'd like
to move that to a more generically useful location in arch/powerpc
but that's not a blocker for this series but something to do next
maybe ?
In that case "struct os_partition" should also find itself a better
name, maybe struct nvram_os_partition ?
> static ssize_t pSeries_nvram_read(char *buf, size_t count, loff_t *index)
> {
> @@ -134,7 +147,7 @@ static ssize_t pSeries_nvram_get_size(void)
> }
>
>
> -/* nvram_write_error_log
> +/* nvram_write_os_partition, nvram_write_error_log
> *
> * We need to buffer the error logs into nvram to ensure that we have
> * the failure information to decode. If we have a severe error there
> @@ -156,48 +169,55 @@ static ssize_t pSeries_nvram_get_size(void)
> * The 'data' section would look like (in bytes):
> * +--------------+------------+-----------------------------------+
> * | event_logged | sequence # | error log |
> - * |0 3|4 7|8 nvram_error_log_size-1|
> + * |0 3|4 7|8 error_log_size-1|
> * +--------------+------------+-----------------------------------+
> *
> * event_logged: 0 if event has not been logged to syslog, 1 if it has
> * sequence #: The unique sequence # for each event. (until it wraps)
> * error log: The error log from event_scan
> */
> -int nvram_write_error_log(char * buff, int length,
> +int nvram_write_os_partition(struct os_partition *part, char * buff, int length,
> unsigned int err_type, unsigned int error_log_cnt)
> {
> int rc;
> loff_t tmp_index;
> struct err_log_info info;
>
> - if (nvram_error_log_index == -1) {
> + if (part->index == -1) {
> return -ESPIPE;
> }
>
> - if (length > nvram_error_log_size) {
> - length = nvram_error_log_size;
> + if (length > part->size) {
> + length = part->size;
> }
>
> info.error_type = err_type;
> info.seq_num = error_log_cnt;
>
> - tmp_index = nvram_error_log_index;
> + tmp_index = part->index;
>
> rc = ppc_md.nvram_write((char *)&info, sizeof(struct err_log_info), &tmp_index);
> if (rc <= 0) {
> - printk(KERN_ERR "nvram_write_error_log: Failed nvram_write (%d)\n", rc);
> + printk(KERN_ERR "nvram_write_os_partition: Failed nvram_write (%d)\n", rc);
> return rc;
> }
>
> rc = ppc_md.nvram_write(buff, length, &tmp_index);
> if (rc <= 0) {
> - printk(KERN_ERR "nvram_write_error_log: Failed nvram_write (%d)\n", rc);
> + printk(KERN_ERR "nvram_write_os_partition: Failed nvram_write (%d)\n", rc);
> return rc;
> }
>
> return 0;
> }
While at it, turn these into pr_err and use __FUNCTION__ or __func__
> +int nvram_write_error_log(char * buff, int length,
> + unsigned int err_type, unsigned int error_log_cnt)
> +{
> + return nvram_write_os_partition(&rtas_log_partition, buff, length,
> + err_type, error_log_cnt);
> +}
That's a candidate for a static inline in a .h
> /* nvram_read_error_log
> *
> * Reads nvram for error log for at most 'length'
> @@ -209,13 +229,13 @@ int nvram_read_error_log(char * buff, int length,
> loff_t tmp_index;
> struct err_log_info info;
>
> - if (nvram_error_log_index == -1)
> + if (rtas_log_partition.index == -1)
> return -1;
>
> - if (length > nvram_error_log_size)
> - length = nvram_error_log_size;
> + if (length > rtas_log_partition.size)
> + length = rtas_log_partition.size;
>
> - tmp_index = nvram_error_log_index;
> + tmp_index = rtas_log_partition.index;
>
> rc = ppc_md.nvram_read((char *)&info, sizeof(struct err_log_info), &tmp_index);
> if (rc <= 0) {
> @@ -244,10 +264,10 @@ int nvram_clear_error_log(void)
> int clear_word = ERR_FLAG_ALREADY_LOGGED;
> int rc;
>
> - if (nvram_error_log_index == -1)
> + if (rtas_log_partition.index == -1)
> return -1;
>
> - tmp_index = nvram_error_log_index;
> + tmp_index = rtas_log_partition.index;
>
> rc = ppc_md.nvram_write((char *)&clear_word, sizeof(int), &tmp_index);
> if (rc <= 0) {
> @@ -258,67 +278,71 @@ int nvram_clear_error_log(void)
> return 0;
> }
>
> -/* pseries_nvram_init_log_partition
> +/* pseries_nvram_init_os_partition
> *
> - * This will setup the partition we need for buffering the
> - * error logs and cleanup partitions if needed.
> + * This set up a partition with an "OS" signature.
> *
> * The general strategy is the following:
> - * 1.) If there is log partition large enough then use it.
> - * 2.) If there is none large enough, search
> - * for a free partition that is large enough.
> - * 3.) If there is not a free partition large enough remove
> - * _all_ OS partitions and consolidate the space.
> - * 4.) Will first try getting a chunk that will satisfy the maximum
> - * error log size (NVRAM_MAX_REQ).
> - * 5.) If the max chunk cannot be allocated then try finding a chunk
> - * that will satisfy the minum needed (NVRAM_MIN_REQ).
> + * 1.) If a partition with the indicated name already exists...
> + * - If it's large enough, use it.
> + * - Otherwise, recycle it and keep going.
> + * 2.) Search for a free partition that is large enough.
> + * 3.) If there's not a free partition large enough, recycle any obsolete
> + * OS partitions and try again.
> + * 4.) Will first try getting a chunk that will satisfy the requested size.
> + * 5.) If a chunk of the requested size cannot be allocated, then try finding
> + * a chunk that will satisfy the minum needed.
> + *
> + * Returns 0 on success, else -1.
> */
> -static int __init pseries_nvram_init_log_partition(void)
> +static int __init pseries_nvram_init_os_partition(struct os_partition *part)
> {
> loff_t p;
> int size;
>
> - p = nvram_find_partition(NVRAM_LOG_PART_NAME, NVRAM_SIG_OS, &size);
> + p = nvram_find_partition(part->name, NVRAM_SIG_OS, &size);
>
> /* Found one but too small, remove it */
> - if (p && size < NVRAM_MIN_REQ) {
> - pr_info("nvram: Found too small "NVRAM_LOG_PART_NAME" partition"
> - ",removing it...");
> - nvram_remove_partition(NVRAM_LOG_PART_NAME, NVRAM_SIG_OS);
> + if (p && size < part->min_size) {
> + pr_info("nvram: Found too small %s partition,"
> + " removing it...\n", part->name);
> + nvram_remove_partition(part->name, NVRAM_SIG_OS, NULL);
> p = 0;
> }
>
> /* Create one if we didn't find */
> if (!p) {
> - p = nvram_create_partition(NVRAM_LOG_PART_NAME, NVRAM_SIG_OS,
> - NVRAM_MAX_REQ, NVRAM_MIN_REQ);
> - /* No room for it, try to get rid of any OS partition
> - * and try again
> - */
> + p = nvram_create_partition(part->name, NVRAM_SIG_OS,
> + part->req_size, part->min_size);
> if (p == -ENOSPC) {
> - pr_info("nvram: No room to create "NVRAM_LOG_PART_NAME
> - " partition, deleting all OS partitions...");
> - nvram_remove_partition(NULL, NVRAM_SIG_OS);
> - p = nvram_create_partition(NVRAM_LOG_PART_NAME,
> - NVRAM_SIG_OS, NVRAM_MAX_REQ,
> - NVRAM_MIN_REQ);
> + pr_info("nvram: No room to create %s partition, "
> + "deleting any obsolete OS partitions...\n",
> + part->name);
> + nvram_remove_partition(NULL, NVRAM_SIG_OS,
> + valid_os_partitions);
> + p = nvram_create_partition(part->name, NVRAM_SIG_OS,
> + part->req_size, part->min_size);
> }
> }
>
> if (p <= 0) {
> - pr_err("nvram: Failed to find or create "NVRAM_LOG_PART_NAME
> - " partition, err %d\n", (int)p);
> - return 0;
> + pr_err("nvram: Failed to find or create %s"
> + " partition, err %d\n", part->name, (int)p);
> + return -1;
> }
>
> - nvram_error_log_index = p;
> - nvram_error_log_size = nvram_get_partition_size(p) -
> - sizeof(struct err_log_info);
> + part->index = p;
> + part->size = nvram_get_partition_size(p) - sizeof(struct err_log_info);
>
> return 0;
> }
> -machine_late_initcall(pseries, pseries_nvram_init_log_partition);
> +
> +static int __init pseries_nvram_init_log_partitions(void)
> +{
> + (void) pseries_nvram_init_os_partition(&rtas_log_partition);
> + return 0;
> +}
> +machine_late_initcall(pseries, pseries_nvram_init_log_partitions);
>
> int __init pSeries_nvram_init(void)
> {
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply
* Re: [PATCH 2/6] nvram: Capture oops/panic reports in ibm, oops-log partition
From: Benjamin Herrenschmidt @ 2011-02-07 5:01 UTC (permalink / raw)
To: Jim Keniston; +Cc: linuxppc-dev
In-Reply-To: <20101114041521.9457.69485.stgit@localhost.localdomain>
On Sat, 2010-11-13 at 20:15 -0800, Jim Keniston wrote:
> Create the ibm,oops-log NVRAM partition, and capture the end of the printk
> buffer in it when there's an oops or panic. If we can't create the
> ibm,oops-log partition, capture the oops/panic report in ibm,rtas-log.
Won't the parsing tools choke on the oops log in the RTAS log
partition ?
Also, maybe remove the "ibm," prefix on the nvram partition, make it
"lnx," instead.
Then, if you move the rest of the code out of pseries, you can move that
out too, just make pseries platform code call the init code for it, that
way other platforms can re-use that as-is.
But that later part can wait a separate patch series, just make sure you
change the partition name now.
Cheers,
Ben.
> Signed-off-by: Jim Keniston <jkenisto@us.ibm.com>
> ---
>
> arch/powerpc/platforms/pseries/nvram.c | 89 ++++++++++++++++++++++++++++++++
> 1 files changed, 88 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c
> index 43d5c52..6c88cda 100644
> --- a/arch/powerpc/platforms/pseries/nvram.c
> +++ b/arch/powerpc/platforms/pseries/nvram.c
> @@ -16,6 +16,8 @@
> #include <linux/errno.h>
> #include <linux/init.h>
> #include <linux/spinlock.h>
> +#include <linux/slab.h>
> +#include <linux/kmsg_dump.h>
> #include <asm/uaccess.h>
> #include <asm/nvram.h>
> #include <asm/rtas.h>
> @@ -50,11 +52,32 @@ static struct os_partition rtas_log_partition = {
> .index = -1
> };
>
> +static struct os_partition oops_log_partition = {
> + .name = "ibm,oops-log",
> + .req_size = 4000,
> + .min_size = 2000,
> + .index = -1
> +};
> +
> static const char *valid_os_partitions[] = {
> "ibm,rtas-log",
> + "ibm,oops-log",
> NULL
> };
>
> +static void oops_to_nvram(struct kmsg_dumper *dumper,
> + enum kmsg_dump_reason reason,
> + const char *old_msgs, unsigned long old_len,
> + const char *new_msgs, unsigned long new_len);
> +
> +static struct kmsg_dumper nvram_kmsg_dumper = {
> + .dump = oops_to_nvram
> +};
> +
> +/* We preallocate oops_buf during init to avoid kmalloc during oops/panic. */
> +static size_t oops_buf_sz;
> +static char *oops_buf;
> +
> static ssize_t pSeries_nvram_read(char *buf, size_t count, loff_t *index)
> {
> unsigned int i;
> @@ -337,9 +360,36 @@ static int __init pseries_nvram_init_os_partition(struct os_partition *part)
> return 0;
> }
>
> +static void __init nvram_init_oops_partition(int rtas_partition_exists)
> +{
> + int rc;
> +
> + rc = pseries_nvram_init_os_partition(&oops_log_partition);
> + if (rc != 0) {
> + if (!rtas_partition_exists)
> + return;
> + pr_notice("nvram: Using %s partition to log both"
> + " RTAS errors and oops/panic reports\n",
> + rtas_log_partition.name);
> + memcpy(&oops_log_partition, &rtas_log_partition,
> + sizeof(rtas_log_partition));
> + }
> + oops_buf_sz = oops_log_partition.size - sizeof(struct err_log_info);
> + oops_buf = kmalloc(oops_buf_sz, GFP_KERNEL);
> + rc = kmsg_dump_register(&nvram_kmsg_dumper);
> + if (rc != 0) {
> + pr_err("nvram: kmsg_dump_register() failed; returned %d\n", rc);
> + kfree(oops_buf);
> + return;
> + }
> +}
> +
> static int __init pseries_nvram_init_log_partitions(void)
> {
> - (void) pseries_nvram_init_os_partition(&rtas_log_partition);
> + int rc;
> +
> + rc = pseries_nvram_init_os_partition(&rtas_log_partition);
> + nvram_init_oops_partition(rc == 0);
> return 0;
> }
> machine_late_initcall(pseries, pseries_nvram_init_log_partitions);
> @@ -373,3 +423,40 @@ int __init pSeries_nvram_init(void)
>
> return 0;
> }
> +
> +/*
> + * Try to capture the last capture_len bytes of the printk buffer. Return
> + * the amount actually captured.
> + */
> +static size_t capture_last_msgs(const char *old_msgs, size_t old_len,
> + const char *new_msgs, size_t new_len,
> + char *captured, size_t capture_len)
> +{
> + if (new_len >= capture_len) {
> + memcpy(captured, new_msgs + (new_len - capture_len),
> + capture_len);
> + return capture_len;
> + } else {
> + /* Grab the end of old_msgs. */
> + size_t old_tail_len = min(old_len, capture_len - new_len);
> + memcpy(captured, old_msgs + (old_len - old_tail_len),
> + old_tail_len);
> + memcpy(captured + old_tail_len, new_msgs, new_len);
> + return old_tail_len + new_len;
> + }
> +}
> +
> +/* our kmsg_dump callback */
> +static void oops_to_nvram(struct kmsg_dumper *dumper,
> + enum kmsg_dump_reason reason,
> + const char *old_msgs, unsigned long old_len,
> + const char *new_msgs, unsigned long new_len)
> +{
> + static unsigned int oops_count = 0;
> + size_t text_len;
> +
> + text_len = capture_last_msgs(old_msgs, old_len, new_msgs, new_len,
> + oops_buf, oops_buf_sz);
> + (void) nvram_write_os_partition(&oops_log_partition, oops_buf,
> + (int) text_len, ERR_TYPE_KERNEL_PANIC, ++oops_count);
> +}
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply
* Re: [PATCH v2 3/3] powerpc: Add IO event interrupt support
From: Benjamin Herrenschmidt @ 2011-02-07 5:10 UTC (permalink / raw)
To: Tseng-Hui (Frank) Lin; +Cc: tsenglin, linuxppc-dev
In-Reply-To: <1294267483.24377.30.camel@flin.austin.ibm.com>
On Wed, 2011-01-05 at 16:44 -0600, Tseng-Hui (Frank) Lin wrote:
> This patch adds support for handling IO Event interrupts which come
> through at the /event-sources/ibm,io-events device tree node.
.../...
The previous patches regarding the error log sometimes call it error log
and sometimes event log. Can you consolidate that ?
> +int pseries_ioei_register_handler(pseries_ioei_handler_t handler)
> +{
Shouldn't we have a void * to attach with each client so it can put
its private data there and get them back in the handler ?
We are -really- re-inventing interrupts and/or notifiers here, which
I find a tad annoying..
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCH] powerpc: Fix call to flush_ptrace_hw_breakpoint()
From: Benjamin Herrenschmidt @ 2011-02-07 5:13 UTC (permalink / raw)
To: prasad; +Cc: linuxppc-dev, David Kleikamp
In-Reply-To: <20110207045230.GB4287@in.ibm.com>
On Mon, 2011-02-07 at 10:22 +0530, K.Prasad wrote:
> Okay! Another wrapper of "#ifndef CONFIG_HAVE_HW_BREAKPOINT" around
> the
> definition of 'set_debug_reg_defaults'.
Can you send a patch ?
> There's indeed too much sprinkling of #ifdefs in the code, but most of
> it would go away when the BookE code also uses the generic
> hw-breakpoint interfaces.
What's your status for those patches ?
> Given the advanced debug features that BookE supports, it's
> unfortunately not that straight-forward (needs additions to generic
> hw-breakpoint infrastructure).
Might want to move a lot of that code to a separate set of files maybe
and just call a single hook from the various process.c locations ?
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCH V2 1/6] powerpc: Move udbg_early_init() after early_init_devtree()
From: David Gibson @ 2011-02-07 8:29 UTC (permalink / raw)
To: Dave Kleikamp; +Cc: linuxppc-dev
In-Reply-To: <1296691225.12290.112.camel@shaggy-w500>
On Wed, Feb 02, 2011 at 06:00:25PM -0600, Dave Kleikamp wrote:
> On Thu, 2011-02-03 at 10:06 +1100, David Gibson wrote:
> > On Tue, Feb 01, 2011 at 12:48:41PM -0600, Dave Kleikamp wrote:
> > > so that it can use information from the device tree.
> >
> > Hrm. On the other hand this means that the early_init_devtree() code
> > can't benefit from hardcoded early debugging. Since you don't
> > actually appear to use devtree information in udbg_early_init() in the
> > latest series, I'd suggest dropping this patch.
>
> Patch 2 depends on early_init_devtree() being run. Until then, I don't
> know of a way to get at the bootargs.
Ah, yes. Drat.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH V2 4/6] powerpc/44x: don't use tlbivax on AMP systems
From: David Gibson @ 2011-02-07 8:30 UTC (permalink / raw)
To: Dave Kleikamp; +Cc: linuxppc-dev
In-Reply-To: <1296774957.14077.23.camel@shaggy-w500>
On Thu, Feb 03, 2011 at 05:15:57PM -0600, Dave Kleikamp wrote:
> On Thu, 2011-02-03 at 16:03 +1100, David Gibson wrote:
> > On Wed, Feb 02, 2011 at 05:53:59PM -0600, Dave Kleikamp wrote:
> > > On Thu, 2011-02-03 at 10:08 +1100, David Gibson wrote:
> > > > On Tue, Feb 01, 2011 at 12:48:44PM -0600, Dave Kleikamp wrote:
> > > > > Since other OS's may be running on the other cores don't use tlbivax
> > > >
> > > > [snip]
> > > > > +#ifdef CONFIG_44x
> > > > > +void __init early_init_mmu_44x(void)
> > > > > +{
> > > > > + unsigned long root = of_get_flat_dt_root();
> > > > > + if (of_flat_dt_is_compatible(root, "ibm,47x-AMP"))
> > > > > + amp = 1;
> > > > > +}
> > > > > +#endif /* CONFIG_44x */
> > > >
> > > > A test against a hardcoded compatible string seems a nasty way to do
> > > > this. Maybe we should define a new boolean property for the root
> > > > node.
> > >
> > > I'm not crazy about this string, but I needed something in the device
> > > tree to key off of. Freescale has something similar (i.e.
> > > MPC8572DS-CAMP), so I chose to follow their example. I'd be happy to
> > > replace it with a boolean property. Any objection to just using
> > > "amp"?
> >
> > Bit too short, I think. I'd suggest either spelling out
> > 'asymmetric-multiprocessor' or 'cooperative-partition' (a more
> > accurate term, IMO).
>
> I could be wrong, but I thought the A stands for Asynchronous, not
> Asymmetric. I thought Asymmetric means that different types of tasks
> run on the secondary processors, as on the Cell.
Yeah, I thought so too, but Freescale at least seem to use it this
way. 'Asynchronous' would make even less sense.
> Anyway, going with
> 'cooperative-partition' would avoid that confusion.
>
> Shaggy
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply
* Re: [PATCH] sched: provide scheduler_ipi() callback in response to smp_send_reschedule()
From: Peter Zijlstra @ 2011-02-07 13:54 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: linux-m32r-ja, linux-mips, linux-ia64, linux-sh, H. Peter Anvin,
Heiko Carstens, Paul Mackerras, Helge Deller, sparclinux,
Linux-Arch, linux-s390, Jesper Nilsson, Jeremy Fitzhardinge,
Russell King, Hirokazu Takata, x86, James E.J. Bottomley,
virtualization, Ingo Molnar, Matt Turner, Fenghua Yu,
Mike Frysinger, user-mode-linux-devel, Konrad Rzeszutek Wilk,
Jeff Dike, Chris Metcalf, xen-devel, Mikael Starvik, linux-m32r,
Ivan Kokshaysky, user-mode-linux-user, uclinux-dist-devel,
Thomas Gleixner, linux-arm-kernel, Richard Henderson, Tony Luck,
linux-parisc, linux-cris-kernel, linux-am33-list, linux-kernel,
Ralf Baechle, Kyle McMartin, Paul Mundt, linux-alpha,
Martin Schwidefsky, linux390, Koichi Yasutake, linuxppc-dev,
David S. Miller
In-Reply-To: <1297034792.14982.10.camel@pasglop>
On Mon, 2011-02-07 at 10:26 +1100, Benjamin Herrenschmidt wrote:
> You missed:
>
> diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
> index 9813605..467d122 100644
> --- a/arch/powerpc/kernel/smp.c
> +++ b/arch/powerpc/kernel/smp.c
> @@ -98,6 +98,7 @@ void smp_message_recv(int msg)
> break;
> case PPC_MSG_RESCHEDULE:
> /* we notice need_resched on exit */
> + scheduler_ipi();
> break;
> case PPC_MSG_CALL_FUNC_SINGLE:
> generic_smp_call_function_single_interrupt();
>
> Fold that in and add:
>
> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Thanks Ben!
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox