How to build the kernel without any optimization?

2010-08-20 Thread Shawn Jin
Hi,

I'm tracing the execution of ds1307_probe() and find that some of
variables or function arguments cannot be printed in gdb because they
are optimized out or not in the current context. This really gives
some headache. Is there a way to build the kernel without any
optimization? What gcc option shall I disable or add?

I already added the following to arch/powerpc/Makefile.

# Prevent GDB from jumping around in the code when trying to single step
ifeq ($(CONFIG_DEBUG_KERNEL),y)
KBUILD_CFLAGS   += -fno-schedule-insns -fno-schedule-insns2
endif

Thanks,
-Shawn.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] hvc_console: fix dropping of characters when output byte channel is full

2010-08-20 Thread Timur Tabi
hvc_console_print() calls the HVC client driver's put_chars() callback
to write some characters to the console.  If the callback returns 0, that
indicates that no characters were written (perhaps the output buffer is
full), but hvc_console_print() treats that as an error and discards the
rest of the buffer.

So change hvc_console_print() to just loop and call put_chars() again if it
returns a 0 return code.

This change makes hvc_console_print() behave more like hvc_push(), which
does check for a 0 return code and re-schedules itself.

Signed-off-by: Timur Tabi 
---
 drivers/char/hvc_console.c |   19 ++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index fa27d16..b4deffd 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2001 Paul Mackerras , IBM
  * Copyright (C) 2004 Benjamin Herrenschmidt , IBM 
Corp.
  * Copyright (C) 2004 IBM Corporation
+ * Copyright 2009 Freescale Semiconductor, Inc.
  *
  * Additional Author(s):
  *  Ryan S. Arnold 
@@ -141,6 +142,7 @@ static void hvc_console_print(struct console *co, const 
char *b,
char c[N_OUTBUF] __ALIGNED__;
unsigned i = 0, n = 0;
int r, donecr = 0, index = co->index;
+   unsigned int timeout = 100; /* Keep trying for up to one second */
 
/* Console access attempt outside of acceptable console range. */
if (index >= MAX_NR_HVC_CONSOLES)
@@ -152,6 +154,10 @@ static void hvc_console_print(struct console *co, const 
char *b,
 
while (count > 0 || i > 0) {
if (count > 0 && i < sizeof(c)) {
+   /* If the local buffer (c) is not full, then copy some
+* bytes from the input buffer to it. We stop when the
+* local buffer is full. \n is converted to \r\n.
+*/
if (b[n] == '\n' && !donecr) {
c[i++] = '\r';
donecr = 1;
@@ -162,14 +168,25 @@ static void hvc_console_print(struct console *co, const 
char *b,
}
} else {
r = cons_ops[index]->put_chars(vtermnos[index], c, i);
-   if (r <= 0) {
+   if (r < 0) {
/* throw away chars on error */
i = 0;
} else if (r > 0) {
i -= r;
if (i > 0)
memmove(c, c+r, i);
+   } else {
+   /* If r == 0, then the client driver didn't do
+* anything, so wait 1us and try again.  If we
+* time out, then just exit.
+*/
+   if (!--timeout)
+   return;
+   udelay(1);
+   continue;
}
+   /* Reset the timeout */
+   timeout = 100;
}
}
 }
-- 
1.7.0.1


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] Documentation: fix ozlabs.org mailing list address

2010-08-20 Thread Stephen Rothwell
This list moved to lists.ozlabs.org quite some time ago.

Signed-off-by: Stephen Rothwell 
---
 Documentation/powerpc/hvcs.txt |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Documentation/powerpc/hvcs.txt b/Documentation/powerpc/hvcs.txt
index f93462c..6d8be34 100644
--- a/Documentation/powerpc/hvcs.txt
+++ b/Documentation/powerpc/hvcs.txt
@@ -560,7 +560,7 @@ The proper channel for reporting bugs is either through the 
Linux OS
 distribution company that provided your OS or by posting issues to the
 PowerPC development mailing list at:
 
-linuxppc-...@ozlabs.org
+linuxppc-...@lists.ozlabs.org
 
 This request is to provide a documented and searchable public exchange
 of the problems and solutions surrounding this driver for the benefit of
-- 
1.7.1

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] MAINTAINERS: Fix ozlabs.org mailing list addresses

2010-08-20 Thread Stephen Rothwell
All these lists moved to lists.ozlabs.org quite a while ago.

Signed-off-by: Stephen Rothwell 
---
 MAINTAINERS |   56 
 1 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index b5b8baa..433f353 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -456,7 +456,7 @@ F:  drivers/infiniband/hw/amso1100/
 
 AOA (Apple Onboard Audio) ALSA DRIVER
 M: Johannes Berg 
-L: linuxppc-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
 L: alsa-de...@alsa-project.org (moderated for non-subscribers)
 S: Maintained
 F: sound/aoa/
@@ -1472,8 +1472,8 @@ F:include/linux/can/platform/
 
 CELL BROADBAND ENGINE ARCHITECTURE
 M: Arnd Bergmann 
-L: linuxppc-...@ozlabs.org
-L: cbe-oss-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
+L: cbe-oss-...@lists.ozlabs.org
 W: http://www.ibm.com/developerworks/power/cell/
 S: Supported
 F: arch/powerpc/include/asm/cell*.h
@@ -2371,13 +2371,13 @@ F:  include/linux/fb.h
 FREESCALE DMA DRIVER
 M: Li Yang 
 M: Zhang Wei 
-L: linuxppc-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
 S: Maintained
 F: drivers/dma/fsldma.*
 
 FREESCALE I2C CPM DRIVER
 M: Jochen Friedrich 
-L: linuxppc-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
 L: linux-...@vger.kernel.org
 S: Maintained
 F: drivers/i2c/busses/i2c-cpm.c
@@ -2393,7 +2393,7 @@ F:drivers/video/imxfb.c
 FREESCALE SOC FS_ENET DRIVER
 M: Pantelis Antoniou 
 M: Vitaly Bordug 
-L: linuxppc-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
 L: net...@vger.kernel.org
 S: Maintained
 F: drivers/net/fs_enet/
@@ -2401,7 +2401,7 @@ F:include/linux/fs_enet_pd.h
 
 FREESCALE QUICC ENGINE LIBRARY
 M: Timur Tabi 
-L: linuxppc-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
 S: Supported
 F: arch/powerpc/sysdev/qe_lib/
 F: arch/powerpc/include/asm/*qe.h
@@ -2409,27 +2409,27 @@ F:  arch/powerpc/include/asm/*qe.h
 FREESCALE USB PERIPHERAL DRIVERS
 M: Li Yang 
 L: linux-...@vger.kernel.org
-L: linuxppc-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
 S: Maintained
 F: drivers/usb/gadget/fsl*
 
 FREESCALE QUICC ENGINE UCC ETHERNET DRIVER
 M: Li Yang 
 L: net...@vger.kernel.org
-L: linuxppc-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
 S: Maintained
 F: drivers/net/ucc_geth*
 
 FREESCALE QUICC ENGINE UCC UART DRIVER
 M: Timur Tabi 
-L: linuxppc-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
 S: Supported
 F: drivers/serial/ucc_uart.c
 
 FREESCALE SOC SOUND DRIVERS
 M: Timur Tabi 
 L: alsa-de...@alsa-project.org (moderated for non-subscribers)
-L: linuxppc-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
 S: Supported
 F: sound/soc/fsl/fsl*
 F: sound/soc/fsl/mpc8610_hpcd.c
@@ -2564,7 +2564,7 @@ F:mm/memory-failure.c
 F: mm/hwpoison-inject.c
 
 HYPERVISOR VIRTUAL CONSOLE DRIVER
-L: linuxppc-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
 S: Odd Fixes
 F: drivers/char/hvc_*
 
@@ -3476,7 +3476,7 @@ F:drivers/usb/misc/legousbtower.c
 
 LGUEST
 M: Rusty Russell 
-L: lgu...@ozlabs.org
+L: lgu...@lists.ozlabs.org
 W: http://lguest.ozlabs.org/
 S: Maintained
 F: Documentation/lguest/
@@ -3495,7 +3495,7 @@ LINUX FOR POWERPC (32-BIT AND 64-BIT)
 M: Benjamin Herrenschmidt 
 M: Paul Mackerras 
 W: http://www.penguinppc.org/
-L: linuxppc-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
 Q: http://patchwork.ozlabs.org/project/linuxppc-dev/list/
 T: git git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
 S: Supported
@@ -3505,14 +3505,14 @@ F:  arch/powerpc/
 LINUX FOR POWER MACINTOSH
 M: Benjamin Herrenschmidt 
 W: http://www.penguinppc.org/
-L: linuxppc-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
 S: Maintained
 F: arch/powerpc/platforms/powermac/
 F: drivers/macintosh/
 
 LINUX FOR POWERPC EMBEDDED MPC5XXX
 M: Grant Likely 
-L: linuxppc-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
 T: git git://git.secretlab.ca/git/linux-2.6.git
 S: Maintained
 F: arch/powerpc/platforms/512x/
@@ -3522,7 +3522,7 @@ LINUX FOR POWERPC EMBEDDED PPC4XX
 M: Josh Boyer 
 M: Matt Porter 
 W: http://www.penguinppc.org/
-L: linuxppc-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
 T: git 
git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git
 S: Maintained
 F: arch/powerpc/platforms/40x/
@@ -3531,7 +3531,7 @@ F:arch/powerpc/platforms/44x/
 LINUX FOR POWERPC EMBEDDED XILINX VIRTEX
 M: Grant Likely 
 W: http://wiki.secretlab.ca/index.php/Linux_on_Xilinx_Virtex
-L: linuxppc-...@ozlabs.org
+L: linuxppc-dev@lists.ozlabs.org
 T: git git://git.secretlab.ca/git/linux-2.6.git
 S: Maintained
 F

Re: cc'ing old list

2010-08-20 Thread Stephen Rothwell
Hi Christoph,

On Fri, 20 Aug 2010 10:36:58 +0200 Christoph Hellwig  wrote:
>
> On Fri, Aug 20, 2010 at 01:26:42PM +1000, Stephen Rothwell wrote:
> > Yes, I do know that the kernel MAINTAINERS file has the old address. :-(
> 
> Time to fix it..

Yeah. Patch on its way ...

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


pgpJXMqvcb8jf.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: cc'ing old list

2010-08-20 Thread Christoph Hellwig
On Fri, Aug 20, 2010 at 01:26:42PM +1000, Stephen Rothwell wrote:
> Yes, I do know that the kernel MAINTAINERS file has the old address. :-(

Time to fix it..

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2 0/3] Misc. bug fixes for ppc32

2010-08-20 Thread Simon Horman
On Wed, Aug 18, 2010 at 11:56:48PM -0500, Matthew McClintock wrote:
> This patch series fixes a few issues I have discovered with my previous
> patch series. Nothing new has been added.

Thanks, all applied.

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v4] powerpc/mpc8xxx_gpio.c: extend the driver to support mpc512x gpios

2010-08-20 Thread Peter Korsgaard
> "Anatolij" == Anatolij Gustschin  writes:

 Anatolij> The GPIO controller of MPC512x is slightly different from
 Anatolij> 8xxx GPIO controllers. The register interface is the same
 Anatolij> except the external interrupt control register. The MPC512x
 Anatolij> GPIO controller differentiates between four interrupt event
 Anatolij> types and therefore provides two interrupt control registers,
 Anatolij> GPICR1 and GPICR2. GPIO[0:15] interrupt event types are
 Anatolij> configured in GPICR1 register, GPIO[16:31] - in GPICR2 register.

 Anatolij> This patch adds MPC512x speciffic set_type() callback and
 Anatolij> updates config file and comments. Additionally the gpio chip
 Anatolij> registration function is changed to use for_each_matching_node()
 Anatolij> preventing multiple registration if a node claimes compatibility
 Anatolij> with another gpio controller type.

 Anatolij> Signed-off-by: Anatolij Gustschin 

Sorry, was away on holiday.

Acked-by: Peter Korsgaard 

-- 
Bye, Peter Korsgaard
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev