* Xilinx EDK BSP generation of device trees for microblaze and PowerPC
From: Stephen Neuendorffer @ 2007-11-20 19:44 UTC (permalink / raw)
To: microblaze-uclinux, linuxppc-dev, Grant Likely, Michal Simek
=09
I've updated some code from Michel Simek to generate Flat Device Trees
from Xilinx EDK projects. This code is now hosted at:
git://git.xilinx.com/gen-mhs-devtree.git
This has one major advantage over the gen-mhs-devtree.py approach:
default IP core parameters that are not specified in the mhs file can
now be generated, since EDK pulls these in from the core .mpd file.
I've also managed to incorporate a few more improvements from the
previous review, so the BSP generator should include at least as much
information as gen-mhs-devtree.py
The next major order of business is to represent the DMA engines in the
MPMC and locallink connections to the lltemac.
Steve
^ permalink raw reply
* USB failure on mpc8347 based board
From: Grant Likely @ 2007-11-20 20:26 UTC (permalink / raw)
To: linuxppc-dev, Kim Phillips
I'm seeing the following error on an MPC8347 based board. The
physical board is wired up with the fsl-usb2-dr controller setup as a
USB device using port0 and fsl-usb2-mph as a USB host using port1.
The EHCI driver fails with the following error when initializing the
fsl-usb2-mph controller:
In particular I'm wondering if anyone knows the cause of "HC died; cleaning up".
The board has a hard wired USB hub connected to port1, and the host
controller seems to be dying while probing that device.
Cheers,
g.
[ 0.754259] usbmon: debugfs is not available
[ 0.758862] fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
[ 0.765948] fsl-ehci fsl-ehci.0: new USB bus registered, assigned
bus number 1
[ 0.795863] fsl-ehci fsl-ehci.0: irq 39, io base 0xe0022000
[ 0.801475] fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00, driver
10 Dec 2004
[ 0.809948] usb usb1: configuration #1 chosen from 1 choice
[ 0.815971] hub 1-0:1.0: USB hub found
[ 0.819778] hub 1-0:1.0: 2 ports detected
[ 0.928972] USB Universal Host Controller Interface driver v3.0
[ 0.935257] Initializing USB Mass Storage driver...
[ 1.167836] usb 1-1: new high speed USB device using fsl-ehci and address 2
[ 1.175150] fsl-ehci fsl-ehci.0: fatal error
[ 1.179467] fsl-ehci fsl-ehci.0: HC died; cleaning up
[ 1.184585] hub 1-0:1.0: cannot reset port 1 (err = -19)
[ 1.189934] hub 1-0:1.0: cannot disable port 1 (err = -19)
[ 1.195465] hub 1-0:1.0: cannot reset port 1 (err = -19)
[ 1.200809] hub 1-0:1.0: cannot disable port 1 (err = -19)
[ 1.206327] hub 1-0:1.0: cannot reset port 1 (err = -19)
[ 1.211666] hub 1-0:1.0: cannot disable port 1 (err = -19)
[ 1.217189] hub 1-0:1.0: cannot reset port 1 (err = -19)
[ 1.222527] hub 1-0:1.0: cannot disable port 1 (err = -19)
[ 1.228044] hub 1-0:1.0: cannot disable port 1 (err = -19)
[ 1.233558] hub 1-0:1.0: hub_port_status failed (err = -19)
[ 1.239246] usbcore: registered new interface driver usb-storage
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply
* linux2.6.19.2-> mpc8xx_wdt.c: timeout extended to reach several seconds... but I have a problem
From: DI BACCO ANTONIO - technolabs @ 2007-11-20 20:26 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 6398 bytes --]
Till yesterday I thought I was able to code a simple driver but now I'm facing a problem that is puzzling me.
I added a kernel timer (triggering every 500 ms) to reset the watchdog of mpc8xx. This timer starts when the driver is opened. The timer is rearmed till a counter reaches a zero value. A process can use the write method of the driver to set the counter to a preferred value. If the application misses to set the counter, it will decrease to zero and then the board will restart.
Unfortunately as soon as my application "calls" the write method the kernel freezes. If the watchdog is enabled the board restarts otherwise the kernel remains blocked forever without any indication. Even if I empty the write method leaving only the get_user the board freezes. Below you can find the code, if anyone has an hint I would really appreciate his advice:
___________________________________________________________________________________
/*
* mpc8xx_wdt.c - MPC8xx watchdog userspace interface
*
* Author: Florian Schirmer <jolt@tuxbox.org>
*
* 2002 (c) Florian Schirmer <jolt@tuxbox.org> This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
#include <linux/watchdog.h>
#include <asm/8xx_immap.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <syslib/m8xx_wdt.h>
#define KTIMER_TIMEOUT (HZ/2)
static struct timer_list wd_timer; /* structure for timer administration */
static unsigned long mpc8xx_wdt_dummy;
static int timer_count = 600;
static unsigned long wdt_opened;
static int wdt_status;
static spinlock_t counter_spinlock;
static void mpc8xx_wdt_handler_disable(void)
{
volatile ushort __iomem *piscr;
piscr = (ushort *)&((immap_t*)IMAP_ADDR)->im_sit.sit_piscr;
if (!m8xx_has_internal_rtc)
m8xx_wdt_stop_timer();
else
out_be16(piscr, in_be16(piscr) & ~(PISCR_PIE | PISCR_PTE));
printk(KERN_NOTICE "mpc8xx_wdt: keep-alive handler deactivated\n");
}
static void mpc8xx_wdt_handler_enable(void)
{
volatile ushort __iomem *piscr;
piscr = (ushort *)&((immap_t*)IMAP_ADDR)->im_sit.sit_piscr;
if (!m8xx_has_internal_rtc)
m8xx_wdt_install_timer();
else
out_be16(piscr, in_be16(piscr) | PISCR_PIE | PISCR_PTE);
printk(KERN_NOTICE "mpc8xx_wdt: keep-alive handler activated\n");
}
static int mpc8xx_wdt_open(struct inode *inode, struct file *file)
{
if (test_and_set_bit(0, &wdt_opened))
return -EBUSY;
m8xx_wdt_reset();
wd_timer.expires = jiffies + KTIMER_TIMEOUT;
add_timer (&wd_timer); /* ...re-activate timer */
mpc8xx_wdt_handler_disable();
return 0;
}
static int mpc8xx_wdt_release(struct inode *inode, struct file *file)
{
m8xx_wdt_reset();
#if !defined(CONFIG_WATCHDOG_NOWAYOUT)
mpc8xx_wdt_handler_enable();
#endif
clear_bit(0, &wdt_opened);
return 0;
}
static void mpc8xx_wdt_ktimer_handler(unsigned long data)
{
int counter;
spin_lock(&counter_spinlock);
counter = timer_count--;
spin_unlock(&counter_spinlock);
printk("Counter %d\n", counter);
if (counter > 0)
{
wd_timer.expires = jiffies + KTIMER_TIMEOUT;
add_timer (&wd_timer); /* ...re-activate timer */
m8xx_wdt_reset();
}
else
{
printk(KERN_NOTICE "mpc8xx_wdt: Watchdog expired ... restarting\n");
}
}
static ssize_t mpc8xx_wdt_write(struct file *file, const char *data, size_t len, loff_t * ppos)
{
unsigned long flags;
int new_count;
if (len != sizeof(new_count))
{
return -EINVAL;
}
/* copy count value into kernel space */
get_user(new_count, (int *) data);
printk("new_count %d\n", new_count);
/* Removing the following three lines doesn't prevent
the kernel freeze */
spin_lock_irqsave(&counter_spinlock, flags);
timer_count = (HZ*new_count)/KTIMER_TIMEOUT;
spin_unlock_irqrestore(&counter_spinlock, flags);
return (sizeof(new_count));
}
static int mpc8xx_wdt_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
int timeout;
static struct watchdog_info info = {
.options = WDIOF_KEEPALIVEPING,
.firmware_version = 0,
.identity = "MPC8xx watchdog",
};
switch (cmd) {
case WDIOC_GETSUPPORT:
if (copy_to_user((void *)arg, &info, sizeof(info)))
return -EFAULT;
break;
case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS:
if (put_user(wdt_status, (int *)arg))
return -EFAULT;
wdt_status &= ~WDIOF_KEEPALIVEPING;
break;
case WDIOC_GETTEMP:
return -EOPNOTSUPP;
case WDIOC_SETOPTIONS:
return -EOPNOTSUPP;
case WDIOC_KEEPALIVE:
m8xx_wdt_reset();
wdt_status |= WDIOF_KEEPALIVEPING;
break;
case WDIOC_SETTIMEOUT:
return -EOPNOTSUPP;
case WDIOC_GETTIMEOUT:
timeout = m8xx_wdt_get_timeout();
if (put_user(timeout, (int *)arg))
return -EFAULT;
break;
default:
return -ENOTTY;
}
return 0;
}
static const struct file_operations mpc8xx_wdt_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.write = mpc8xx_wdt_write,
.ioctl = mpc8xx_wdt_ioctl,
.open = mpc8xx_wdt_open,
.release = mpc8xx_wdt_release,
};
static struct miscdevice mpc8xx_wdt_miscdev = {
.minor = WATCHDOG_MINOR,
.name = "watchdog",
.fops = &mpc8xx_wdt_fops,
};
static int __init mpc8xx_wdt_init(void)
{
init_timer (&wd_timer); /* initialize timer-structure... */
wd_timer.function = mpc8xx_wdt_ktimer_handler;
wd_timer.data = (unsigned long) &mpc8xx_wdt_dummy;
spin_lock_init(&counter_spinlock);
return misc_register(&mpc8xx_wdt_miscdev);
}
static void __exit mpc8xx_wdt_exit(void)
{
misc_deregister(&mpc8xx_wdt_miscdev);
m8xx_wdt_reset();
mpc8xx_wdt_handler_enable();
}
module_init(mpc8xx_wdt_init);
module_exit(mpc8xx_wdt_exit);
MODULE_AUTHOR("Florian Schirmer <jolt@tuxbox.org>");
MODULE_DESCRIPTION("MPC8xx watchdog driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
____________________________________________________________________________
[-- Attachment #2: Type: text/html, Size: 13939 bytes --]
^ permalink raw reply
* Debugging with gdbserver slow
From: khollan @ 2007-11-20 20:59 UTC (permalink / raw)
To: linuxppc-embedded
Hi everyone,
Im using gdbserver to debug Linux apps on my embedded board, but it takes
like 3-6 sec to step one line of code. Its about the same to go from
breakpoint to breakpont. Im using TCP to connect the host to the target.
Is this typical or is there some setting wrong or was it built wrong. Its a
PPC405 in a Xilinx FPGA.
Thanks
khollan
--
View this message in context: http://www.nabble.com/Debugging-with-gdbserver-slow-tf4846374.html#a13865715
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
^ permalink raw reply
* Re: [PATCH] [POWERPC] Emulate isel (Integer Select) instruction
From: Kumar Gala @ 2007-11-20 21:01 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20071120175416.GA4389@loki.buserror.net>
On Nov 20, 2007, at 11:54 AM, Scott Wood wrote:
> On Mon, Nov 19, 2007 at 09:36:57PM -0600, Kumar Gala wrote:
>> isel (Integer Select) is a new user space instruction in the
>> PowerISA 2.04 spec. Not all processors implement it so lets emulate
>> to ensure code built with isel will run everywhere.
>
> Given that the instruction is meant to be a performance enhancement,
> we should probably warn the first few times it's emulated, so the user
> knows they should change their toolchain setup if possible.
The same is true of mcrxr, popcntb, and possibly string ld/st.
Feel free to submit a patch that warns about their usage.
- k
^ permalink raw reply
* Re: [PATCH] commit e8f605cd71aa09a8f8b73f410a15d2a46022a60e
From: Kumar Gala @ 2007-11-20 21:35 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
In-Reply-To: <20071017234100.7729.85901.stgit@trillian.cg.shawcable.net>
On Wed, 17 Oct 2007, Grant Likely wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> mpc8349emitx(gp): add UHCI and USB storage support
>
> USB support for the 8349itx got added a while back; but the defconfig
> never got updated. This patch adds the appropriate USB config options
> to defconfig
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> CC: Scott Wood <scottwood@freescale.com>
> CC: Kumar Gala <galak@kernel.crashing.org>
> CC: Timur Tabi <timur@freescale.com>
> ---
>
> arch/powerpc/configs/mpc834x_itx_defconfig | 2 -
> arch/powerpc/configs/mpc834x_itxgp_defconfig | 88 ++++++++++++++++++++++++++
> 2 files changed, 88 insertions(+), 2 deletions(-)
applied.
- k
^ permalink raw reply
* Re: [PATCH] powerpc: mpc8xxx MDS board RTC fixes
From: Kumar Gala @ 2007-11-20 21:35 UTC (permalink / raw)
To: Kim Phillips; +Cc: linuxppc-dev
In-Reply-To: <20071108133706.961af8d2.kim.phillips@freescale.com>
On Thu, 8 Nov 2007, Kim Phillips wrote:
> Now the rtc class ds1374 driver has been added,
> remove the old rtc driver hookup code, add rtc node
> to device trees, and turn on the new driver in the defconfigs.
>
> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> ---
> arch/powerpc/boot/dts/mpc832x_mds.dts | 7 ++++
> arch/powerpc/boot/dts/mpc834x_mds.dts | 9 +++++
> arch/powerpc/boot/dts/mpc836x_mds.dts | 9 +++++
> arch/powerpc/configs/mpc832x_mds_defconfig | 48 +++++++++++++++++++++++++++-
> arch/powerpc/configs/mpc834x_mds_defconfig | 48 +++++++++++++++++++++++++++-
> arch/powerpc/configs/mpc836x_mds_defconfig | 48 +++++++++++++++++++++++++++-
> arch/powerpc/configs/mpc8568mds_defconfig | 48 +++++++++++++++++++++++++++-
> arch/powerpc/platforms/83xx/mpc832x_mds.c | 24 --------------
> arch/powerpc/platforms/83xx/mpc834x_mds.c | 24 --------------
> arch/powerpc/platforms/83xx/mpc836x_mds.c | 24 --------------
> 10 files changed, 213 insertions(+), 76 deletions(-)
applied.
- k
^ permalink raw reply
* Re: [PATCH 1/3] [POWERPC] mpc832x_rdb: remove spidev stub, use mmc_spi
From: Kumar Gala @ 2007-11-20 21:35 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: linuxppc-dev
In-Reply-To: <20071113170011.GA23979@localhost.localdomain>
On Tue, 13 Nov 2007, Anton Vorontsov wrote:
> mmc_spi has hit the mainline, so we can start using it.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/platforms/83xx/mpc832x_rdb.c | 14 +++++++++-----
> 1 files changed, 9 insertions(+), 5 deletions(-)
>
applied.
- k
^ permalink raw reply
* Re: [PATCH 3/3] [POWERPC] mpc832x_rdb_defconfig: enable SPI_MPC83xx and MMC-over-SPI
From: Kumar Gala @ 2007-11-20 21:36 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: linuxppc-dev
In-Reply-To: <20071113170043.GC23979@localhost.localdomain>
On Tue, 13 Nov 2007, Anton Vorontsov wrote:
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/configs/mpc832x_rdb_defconfig | 43 ++++++++++++++++++++++++----
> 1 files changed, 37 insertions(+), 6 deletions(-)
>
applied.
- k
^ permalink raw reply
* Re: dtc: Add testcases for tree checks
From: David Gibson @ 2007-11-20 22:03 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
In-Reply-To: <E1IuUiz-00022Y-E1@jdl.com>
On Tue, Nov 20, 2007 at 09:09:17AM -0600, Jon Loeliger wrote:
> So, like, the other day David Gibson mumbled:
> > This patch adds a group of testcases to check that dtc correctly
> > rejects trees with various structural errors.
> >
> > To make things easier to test, we change dtc so that failing checks
> > (as opposed to other errors) result in exit code 2.
> >
> > This patch also fixes an embarrasing bug uncovered by these new tests:
> > check_phandles() worked out if the tree's phandles were valid, then
> > throws that information away and returns success always.
> >
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> >
> > NOTE! jdl, you'll need to chmod +x tests/dtc-checkfails.sh before you
> > git commit this - it's a new shell script and patch can't encode the
> > permissions info.
> >
> > Index: dtc/tests/dup-nodename.dts
> > ===================================================================
> > --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> > +++ dtc/tests/dup-nodename.dts 2007-11-20 16:02:22.000000000 +1100
>
>
> Actually, this is the official third time now that it would have
> been significantly nicer had you been using git for patches as
> it does correctly handle excute permissions properly in patches.
Well, yes. But, IMO, every time anyone other that you or I has
commented on one of these patches as it goes past counts as an
occasion when it's better that I've been using patches, rather than
pushing to you direct with git.
> And, it allows for side-band commentary such as your NOTE!, above,
> to be included in the patch mail, but not in the patch log itself
> such that it too doesn't have to be "git commit --amend"'ed out
> as well.
Actually, that should be possible with mails too, it's just that I
forgot the --- line.
> In any event, Applied and Adjusted.
--
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
* mmap on PPC removes file refcount?
From: Dave Jiang @ 2007-11-20 21:35 UTC (permalink / raw)
To: linuxppc-dev
It seems the mmap() userland call on PPC causes the kernel to lose the ref
count for the mount point. This is what I did on a prpmc2800 board (74xx) with
latest powerpc.git tree (but also seem to happen on 8548 as well).
I mounted an IDE partition. The userland test app opens a file on the mounted
partition and sits in a sleep loop while holding the file open. I call umount
on the partition and I get "device is busy" which is suppose to happen.
However, after the test app calls mmap on the file id for the opened file, I
can successfully umount even though it should still say "device is busy". This
does not happen on x86 so I'm assuming something is going on with just PPC.
So using lsof I can list the opened files on a particular partition. When the
file is opened, it lists 1 entry. When mmaped, on x86 it would list 2 entries,
but on ppc it lists nothing. Not only did the mmaped entry not show up, the
entry caused by open disappeared as well. Also, I put a printk in do_umount()
to see what the refcount is. On x86, it would be 3 and thus causes device busy.
On PPC it is 3 when the file is openend, however if mmap is called, the
refcount becomes 2 and thus umount proceeds. It's almost as if the mmap call
wiped out the opened file entry and decremented the mount count as well.
--
------------------------------------------------------
Dave Jiang
Software Engineer
MontaVista Software, Inc.
http://www.mvista.com
------------------------------------------------------
^ permalink raw reply
* Re: dtc: Add testcases for tree checks
From: Jon Loeliger @ 2007-11-20 22:22 UTC (permalink / raw)
To: David Gibson; +Cc: linuxppc-dev@ozlabs.org, Jon Loeliger
In-Reply-To: <20071120220309.GB13156@localhost.localdomain>
On Tue, 2007-11-20 at 16:03, David Gibson wrote:
> Well, yes. But, IMO, every time anyone other that you or I has
> commented on one of these patches as it goes past counts as an
> occasion when it's better that I've been using patches, rather than
> pushing to you direct with git.
I am not asking you to stop sending patches.
I'm asking you to generate your patches with git.
Git's patch format, send through mail, handles
the execute permissions.
> Actually, that should be possible with mails too, it's just that I
> forgot the --- line.
Right. I'm just asking for it to be used. :-)
jdl
^ permalink raw reply
* Re: dtc: Add testcases for tree checks
From: Scott Wood @ 2007-11-20 22:23 UTC (permalink / raw)
To: Jon Loeliger, linuxppc-dev
In-Reply-To: <20071120220309.GB13156@localhost.localdomain>
David Gibson wrote:
> On Tue, Nov 20, 2007 at 09:09:17AM -0600, Jon Loeliger wrote:
>> Actually, this is the official third time now that it would have
>> been significantly nicer had you been using git for patches as
>> it does correctly handle excute permissions properly in patches.
>
> Well, yes. But, IMO, every time anyone other that you or I has
> commented on one of these patches as it goes past counts as an
> occasion when it's better that I've been using patches, rather than
> pushing to you direct with git.
Generating patches with "git-format-patch -M" isn't the same as pushing
directly...
-Scot
^ permalink raw reply
* Please pull from 'for-2.6.24' branch (fwd)
From: Kumar Gala @ 2007-11-20 23:38 UTC (permalink / raw)
To: linuxppc-dev
didn't cc linuxppc-dev.
---------- Forwarded message ----------
Date: Tue, 20 Nov 2007 15:40:57 -0600 (CST)
From: Kumar Gala <galak@kernel.crashing.org>
To: Paul Mackerras <paulus@samba.org>
Subject: Please pull from 'for-2.6.24' branch
Please pull from 'for-2.6.24' branch of
master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git for-2.6.24
to receive the following updates:
arch/powerpc/boot/dts/mpc832x_mds.dts | 7 ++
arch/powerpc/boot/dts/mpc834x_mds.dts | 9 ++
arch/powerpc/boot/dts/mpc836x_mds.dts | 9 ++
arch/powerpc/configs/mpc832x_mds_defconfig | 48 ++++++++++++++
arch/powerpc/configs/mpc832x_rdb_defconfig | 41 +++++++++++-
arch/powerpc/configs/mpc834x_itx_defconfig | 2
arch/powerpc/configs/mpc834x_itxgp_defconfig | 88 ++++++++++++++++++++++++++-
arch/powerpc/configs/mpc834x_mds_defconfig | 48 ++++++++++++++
arch/powerpc/configs/mpc836x_mds_defconfig | 48 ++++++++++++++
arch/powerpc/configs/mpc8568mds_defconfig | 48 ++++++++++++++
arch/powerpc/platforms/83xx/mpc832x_mds.c | 24 -------
arch/powerpc/platforms/83xx/mpc832x_rdb.c | 14 ++--
arch/powerpc/platforms/83xx/mpc834x_mds.c | 24 -------
arch/powerpc/platforms/83xx/mpc836x_mds.c | 24 -------
14 files changed, 346 insertions(+), 88 deletions(-)
Anton Vorontsov (2):
[POWERPC] 83xx: MPC832x RDB - remove spidev stub, use mmc_spi
[POWERPC] 83xx: Update mpc832x_rdb_defconfig to enable MMC-over-SPI
Grant Likely (1):
[POWERPC] 83xx: Update mpc8349emitx(gp) defconfig for USB
Kim Phillips (1):
[POWERPC] 8xxx: MDS board RTC fixes
^ permalink raw reply
* Re: [PATCH try2] powerpc: Add support for PORTA and PORTB odr registers
From: Scott Wood @ 2007-11-20 23:48 UTC (permalink / raw)
To: Jochen Friedrich; +Cc: paulus, linux-kernel, linuxppc-embedded
In-Reply-To: <474316A4.4010807@scram.de>
Jochen Friedrich wrote:
> PORTA and PORTB have odr registers, as well. However, the PORTB odr
> register is only 16bit.
>
> Signed-off-by: Jochen Friedrich <jochen@scram.de>
Acked-by: Scott Wood <scottwood@freescale.com>
BTW, you may want to send the patches to linuxppc-dev rather than
linuxppc-embedded... Despite what MAINTAINERS says, the former is where
most patches get posted.
-Scott
^ permalink raw reply
* dtc: Remove some redundant testcases
From: David Gibson @ 2007-11-21 0:29 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
This patch removes a number of testcases from the testsuite that are
extremely unlikely to find any bugs that won't be found by the other
tests. This speeds up the testsuite.
- Both loops across the various tree block layouts run the
tree1_tests on the basic mangled tree. This is completely redundant,
so remove the second copy. This removes 456 testcases.
- We currently run tree1_tests on various trees manipulated by
move_and_save. We replace those with just a dtbs_equal_ordered test
to check that the manipulated tree is equal to the original. What
we're testing here is that fdt_move() operates correctly - it's very
unlikely it would succeed well enough for the ordered_equal test to
succeed, but the tree1_tests would fail on the result. This removes
162 testcases.
- Currently we re-ordered with mangle-layout both the basic
test_tree1.dtb and sw_tree1.test.dtb. Since we've already checked
that these dtbs are equivalent with dtbs_ordered_equal, it's very
unlikely that the tests would fail on one but not the other.
Therefore reduce this to only using test_tree1.dtb. This removes 828
testcases.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/tests/run_tests.sh
===================================================================
--- dtc.orig/tests/run_tests.sh 2007-11-21 00:13:40.000000000 +1100
+++ dtc/tests/run_tests.sh 2007-11-21 00:19:11.000000000 +1100
@@ -76,13 +76,13 @@
for tree in test_tree1.dtb sw_tree1.test.dtb unfinished_tree1.test.dtb; do
rm -f moved.$tree shunted.$tree deshunted.$tree
run_test move_and_save $tree
- tree1_tests moved.$tree
- tree1_tests shunted.$tree
- tree1_tests deshunted.$tree
+ run_test dtbs_equal_ordered $tree moved.$tree
+ run_test dtbs_equal_ordered $tree shunted.$tree
+ run_test dtbs_equal_ordered $tree deshunted.$tree
done
# v16 and alternate layout tests
- for tree in test_tree1.dtb sw_tree1.test.dtb; do
+ for tree in test_tree1.dtb; do
for version in 17 16; do
for layout in $ALL_LAYOUTS; do
run_test mangle-layout $tree $version $layout
@@ -93,13 +93,12 @@
done
# Read-write tests
- for basetree in test_tree1.dtb sw_tree1.test.dtb; do
+ for basetree in test_tree1.dtb; do
for version in 17 16; do
for layout in $ALL_LAYOUTS; do
tree=v$version.$layout.$basetree
rm -f opened.$tree repacked.$tree
run_test open_pack $tree
- tree1_tests $tree
tree1_tests opened.$tree
tree1_tests repacked.$tree
--
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
* [PATCH] [POWERPC] Update iseries_defconfig
From: Stephen Rothwell @ 2007-11-21 0:45 UTC (permalink / raw)
To: paulus; +Cc: ppc-dev
The notable changes hare are the enabling of NO_HZ and HIGH_RES_TIMERS.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/configs/iseries_defconfig | 123 +++++++++++++++++---------------
1 files changed, 64 insertions(+), 59 deletions(-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig
index d78e3a6..4a87745 100644
--- a/arch/powerpc/configs/iseries_defconfig
+++ b/arch/powerpc/configs/iseries_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.23-rc4
-# Thu Aug 30 16:37:16 2007
+# Linux kernel version: 2.6.24-rc3
+# Wed Nov 21 11:19:59 2007
#
CONFIG_PPC64=y
@@ -11,6 +11,7 @@ CONFIG_PPC64=y
# CONFIG_POWER4_ONLY is not set
CONFIG_POWER3=y
CONFIG_POWER4=y
+# CONFIG_TUNE_CELL is not set
CONFIG_PPC_FPU=y
# CONFIG_ALTIVEC is not set
CONFIG_PPC_STD_MMU=y
@@ -19,8 +20,13 @@ CONFIG_VIRT_CPU_ACCOUNTING=y
CONFIG_SMP=y
CONFIG_NR_CPUS=32
CONFIG_64BIT=y
+CONFIG_WORD_SIZE=64
CONFIG_PPC_MERGE=y
CONFIG_MMU=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_IRQ_PER_CPU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
@@ -63,12 +69,17 @@ CONFIG_POSIX_MQUEUE=y
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
+CONFIG_AUDIT_TREE=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=17
-# CONFIG_CPUSETS is not set
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_RELAY is not set
CONFIG_BLK_DEV_INITRD=y
@@ -89,7 +100,6 @@ CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
@@ -110,6 +120,7 @@ CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
# CONFIG_BLK_DEV_IO_TRACE is not set
CONFIG_BLK_DEV_BSG=y
+CONFIG_BLOCK_COMPAT=y
#
# IO Schedulers
@@ -128,7 +139,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
# Platform support
#
CONFIG_PPC_MULTIPLATFORM=y
-# CONFIG_EMBEDDED6xx is not set
# CONFIG_PPC_82xx is not set
# CONFIG_PPC_83xx is not set
# CONFIG_PPC_86xx is not set
@@ -172,6 +182,10 @@ CONFIG_GENERIC_IOMAP=y
#
# Kernel options
#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
@@ -201,6 +215,7 @@ CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_RESOURCES_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
@@ -227,11 +242,8 @@ CONFIG_PCI_SYSCALL=y
# CONFIG_PCIEPORTBUS is not set
CONFIG_ARCH_SUPPORTS_MSI=y
# CONFIG_PCI_MSI is not set
+CONFIG_PCI_LEGACY=y
# CONFIG_PCI_DEBUG is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
# CONFIG_PCCARD is not set
# CONFIG_HOTPLUG_PCI is not set
CONFIG_KERNEL_START=0xc000000000000000
@@ -271,6 +283,7 @@ CONFIG_INET_TUNNEL=y
CONFIG_INET_XFRM_MODE_TRANSPORT=y
CONFIG_INET_XFRM_MODE_TUNNEL=y
CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
# CONFIG_TCP_CONG_ADVANCED is not set
@@ -338,6 +351,7 @@ CONFIG_NETFILTER_XT_MATCH_SCTP=m
# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
CONFIG_NETFILTER_XT_MATCH_STRING=m
CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+CONFIG_NETFILTER_XT_MATCH_TIME=m
# CONFIG_NETFILTER_XT_MATCH_U32 is not set
# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
@@ -403,10 +417,6 @@ CONFIG_LLC=y
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
# CONFIG_NET_SCHED is not set
CONFIG_NET_CLS_ROUTE=y
@@ -436,6 +446,7 @@ CONFIG_NET_CLS_ROUTE=y
#
# Generic Driver Options
#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=m
@@ -508,6 +519,7 @@ CONFIG_SCSI_FC_ATTRS=y
CONFIG_SCSI_SAS_ATTRS=m
CONFIG_SCSI_SAS_LIBSAS=m
CONFIG_SCSI_SAS_LIBSAS_DEBUG=y
+CONFIG_SCSI_SRP_ATTRS=m
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
@@ -559,14 +571,8 @@ CONFIG_DM_MIRROR=m
CONFIG_DM_ZERO=m
# CONFIG_DM_MULTIPATH is not set
# CONFIG_DM_DELAY is not set
-
-#
-# Fusion MPT device support
-#
+# CONFIG_DM_UEVENT is not set
# CONFIG_FUSION is not set
-# CONFIG_FUSION_SPI is not set
-# CONFIG_FUSION_FC is not set
-# CONFIG_FUSION_SAS is not set
#
# IEEE 1394 (FireWire) support
@@ -582,6 +588,8 @@ CONFIG_BONDING=m
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_IP1000 is not set
# CONFIG_ARCNET is not set
# CONFIG_PHYLIB is not set
CONFIG_NET_ETHERNET=y
@@ -592,6 +600,10 @@ CONFIG_MII=y
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
CONFIG_NET_PCI=y
CONFIG_PCNET32=y
CONFIG_PCNET32_NAPI=y
@@ -599,7 +611,6 @@ CONFIG_PCNET32_NAPI=y
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
-# CONFIG_DGRS is not set
# CONFIG_EEPRO100 is not set
CONFIG_E100=y
# CONFIG_FEALNX is not set
@@ -619,6 +630,7 @@ CONFIG_ACENIC=m
CONFIG_E1000=m
# CONFIG_E1000_NAPI is not set
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
+# CONFIG_E1000E is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
@@ -626,6 +638,7 @@ CONFIG_E1000=m
# CONFIG_SIS190 is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
+# CONFIG_SK98LIN is not set
# CONFIG_VIA_VELOCITY is not set
# CONFIG_TIGON3 is not set
# CONFIG_BNX2 is not set
@@ -634,12 +647,15 @@ CONFIG_E1000=m
CONFIG_NETDEV_10000=y
# CONFIG_CHELSIO_T1 is not set
# CONFIG_CHELSIO_T3 is not set
+# CONFIG_IXGBE is not set
# CONFIG_IXGB is not set
# CONFIG_S2IO is not set
# CONFIG_MYRI10GE is not set
# CONFIG_NETXEN_NIC is not set
+# CONFIG_NIU is not set
# CONFIG_PASEMI_MAC is not set
# CONFIG_MLX4_CORE is not set
+# CONFIG_TEHUTI is not set
CONFIG_TR=y
CONFIG_IBMOL=y
# CONFIG_3C359 is not set
@@ -669,6 +685,7 @@ CONFIG_SLHC=m
# CONFIG_NET_FC is not set
# CONFIG_SHAPER is not set
CONFIG_NETCONSOLE=y
+# CONFIG_NETCONSOLE_DYNAMIC is not set
CONFIG_NETPOLL=y
CONFIG_NETPOLL_TRAP=y
CONFIG_NET_POLL_CONTROLLER=y
@@ -690,7 +707,6 @@ CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set
@@ -736,14 +752,11 @@ CONFIG_LEGACY_PTY_COUNT=256
CONFIG_HVC_DRIVER=y
CONFIG_HVC_ISERIES=y
# CONFIG_IPMI_HANDLER is not set
-# CONFIG_WATCHDOG is not set
# CONFIG_HW_RANDOM is not set
CONFIG_GEN_RTC=y
# CONFIG_GEN_RTC_X is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
-# CONFIG_AGP is not set
-# CONFIG_DRM is not set
CONFIG_RAW_DRIVER=y
CONFIG_MAX_RAW_DEVS=256
# CONFIG_HANGCHECK_TIMER is not set
@@ -759,6 +772,13 @@ CONFIG_DEVPORT=y
# CONFIG_W1 is not set
# CONFIG_POWER_SUPPLY is not set
# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
#
# Multifunction device drivers
@@ -775,16 +795,17 @@ CONFIG_DEVPORT=y
#
# Graphics support
#
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set
-# CONFIG_VGASTATE is not set
-# CONFIG_VIDEO_OUTPUT_CONTROL is not set
-# CONFIG_FB is not set
-# CONFIG_FB_IBM_GXT4500 is not set
#
# Console display driver support
@@ -806,19 +827,6 @@ CONFIG_DUMMY_CONSOLE=y
# CONFIG_RTC_CLASS is not set
#
-# DMA Engine support
-#
-# CONFIG_DMA_ENGINE is not set
-
-#
-# DMA Clients
-#
-
-#
-# DMA Devices
-#
-
-#
# Userspace I/O
#
# CONFIG_UIO is not set
@@ -902,7 +910,6 @@ CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
CONFIG_CONFIGFS_FS=m
#
@@ -921,10 +928,7 @@ CONFIG_CRAMFS=y
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
+CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
@@ -963,10 +967,6 @@ CONFIG_CIFS_POSIX=y
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
-
-#
-# Native Language Support
-#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
@@ -1007,10 +1007,6 @@ CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
-
-#
-# Distributed Lock Manager
-#
CONFIG_DLM=m
# CONFIG_DLM_DEBUG is not set
# CONFIG_UCC_SLOW is not set
@@ -1035,17 +1031,16 @@ CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
-
-#
-# Instrumentation Support
-#
+CONFIG_INSTRUMENTATION=y
# CONFIG_PROFILING is not set
# CONFIG_KPROBES is not set
+# CONFIG_MARKERS is not set
#
# Kernel hacking
#
# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_UNUSED_SYMBOLS is not set
@@ -1069,14 +1064,18 @@ CONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
# CONFIG_FORCED_INLINING is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_DEBUG_STACK_USAGE=y
# CONFIG_DEBUG_PAGEALLOC is not set
# CONFIG_DEBUGGER is not set
CONFIG_IRQSTACKS=y
+# CONFIG_VIRQ_DEBUG is not set
# CONFIG_BOOTX_TEXT is not set
# CONFIG_PPC_EARLY_DEBUG is not set
@@ -1085,8 +1084,10 @@ CONFIG_IRQSTACKS=y
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_AEAD=m
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_MANAGER=y
@@ -1105,6 +1106,7 @@ CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_PCBC=m
# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_DES=y
# CONFIG_CRYPTO_FCRYPT is not set
@@ -1119,9 +1121,12 @@ CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_ARC4=m
CONFIG_CRYPTO_KHAZAD=m
CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_SEED=m
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_CRC32C=m
# CONFIG_CRYPTO_CAMELLIA is not set
CONFIG_CRYPTO_TEST=m
+CONFIG_CRYPTO_AUTHENC=m
# CONFIG_CRYPTO_HW is not set
+# CONFIG_PPC_CLOCK is not set
--
1.5.3.6
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
^ permalink raw reply related
* dtc: Add valgrind support to testsuite
From: David Gibson @ 2007-11-21 0:56 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev
This patch adds some options to the run_tests.sh script allowing it to
run all the testcases under valgrind to check for pointer corruption
bugs and memory leaks. Invoking "make checkm" will run the testsuite
with valgrind.
It include a mechanism for specifying valgrind errors to be suppressed
on a per-testcase basis, and adds a couple of such suppression files
for the mangle-layout and open_pack testcases which dump for use by
other testcases a buffer which may contain uninitialized sections. We
use suppressions rather than initializing the buffer so that valgrind
will catch any internal access s to the uninitialized data, which
would be a bug.
The patch also fixes one genuine bug caught by valgrind -
_packblocks() in fdt_rw.c was using memcpy() where it should have been
using memmove().
At present the valgrinding won't do anything useful for testcases
invoked via a shell script - which includes all the dtc testcases. I
plan to fix that later.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/tests/run_tests.sh
===================================================================
--- dtc.orig/tests/run_tests.sh 2007-11-21 11:29:28.000000000 +1100
+++ dtc/tests/run_tests.sh 2007-11-21 11:44:55.000000000 +1100
@@ -2,16 +2,26 @@
export QUIET_TEST=1
+export VALGRIND=
+VGCODE=126
+
tot_tests=0
tot_pass=0
tot_fail=0
tot_config=0
+tot_vg=0
tot_strange=0
run_test () {
tot_tests=$[tot_tests + 1]
echo -n "$@: "
- if "./$@"; then
+ VGLOCAL="$VALGRIND"
+ if [ -n "$VALGRIND" ]; then
+ if [ -f $1.supp ]; then
+ VGLOCAL="$VGLOCAL --suppressions=$1.supp"
+ fi
+ fi
+ if $VGLOCAL "./$@"; then
tot_pass=$[tot_pass + 1]
else
ret="$?"
@@ -19,6 +29,8 @@
tot_config=$[tot_config + 1]
elif [ "$ret" == "2" ]; then
tot_fail=$[tot_fail + 1]
+ elif [ "$ret" == "$VGCODE" ]; then
+ tot_vg=$[tot_vg + 1]
else
tot_strange=$[tot_strange + 1]
fi
@@ -148,7 +160,7 @@
run_test dtc-checkfails.sh -I dts -O dtb minusone-phandle.dts
}
-while getopts "vdt:" ARG ; do
+while getopts "vt:m" ARG ; do
case $ARG in
"v")
unset QUIET_TEST
@@ -156,6 +168,9 @@
"t")
TESTSETS=$OPTARG
;;
+ "m")
+ VALGRIND="valgrind --tool=memcheck -q --error-exitcode=$VGCODE"
+ ;;
esac
done
@@ -182,6 +197,9 @@
echo -e "* PASS: $tot_pass"
echo -e "* FAIL: $tot_fail"
echo -e "* Bad configuration: $tot_config"
+if [ -n "$VALGRIND" ]; then
+ echo -e "* valgrind errors: $tot_vg"
+fi
echo -e "* Strange test result: $tot_strange"
echo -e "**********"
Index: dtc/tests/Makefile.tests
===================================================================
--- dtc.orig/tests/Makefile.tests 2007-11-21 11:29:29.000000000 +1100
+++ dtc/tests/Makefile.tests 2007-11-21 11:29:39.000000000 +1100
@@ -26,7 +26,7 @@
TESTS_DEPFILES = $(TESTS:%=%.d) \
$(addprefix $(TESTS_PREFIX),testutils.d trees.d dumptrees.d)
-TESTS_CLEANFILES_L = *.output vgcore.* *.dtb *.test.dts
+TESTS_CLEANFILES_L = *.output vglog.* vgcore.* *.dtb *.test.dts
TESTS_CLEANFILES = $(TESTS_CLEANFILES_L:%=$(TESTS_PREFIX)%)
BIN += $(TESTS) $(TESTS_PREFIX)dumptrees
@@ -52,6 +52,9 @@
check: tests dtc
cd $(TESTS_PREFIX); ./run_tests.sh
+checkm: tests dtc
+ cd $(TESTS_PREFIX); ./run_tests.sh -m 2>&1 | tee vglog.$$$$
+
checkv: tests dtc
cd $(TESTS_PREFIX); ./run_tests.sh -v
Index: dtc/libfdt/fdt_rw.c
===================================================================
--- dtc.orig/libfdt/fdt_rw.c 2007-11-21 11:29:28.000000000 +1100
+++ dtc/libfdt/fdt_rw.c 2007-11-21 11:29:39.000000000 +1100
@@ -358,12 +358,12 @@
memmove(buf + mem_rsv_off, fdt + fdt_off_mem_rsvmap(fdt), mem_rsv_size);
fdt_set_off_mem_rsvmap(buf, mem_rsv_off);
- memcpy(buf + struct_off, fdt + fdt_off_dt_struct(fdt), struct_size);
+ memmove(buf + struct_off, fdt + fdt_off_dt_struct(fdt), struct_size);
fdt_set_off_dt_struct(buf, struct_off);
fdt_set_size_dt_struct(buf, struct_size);
- memcpy(buf + strings_off, fdt + fdt_off_dt_strings(fdt),
- fdt_size_dt_strings(fdt));
+ memmove(buf + strings_off, fdt + fdt_off_dt_strings(fdt),
+ fdt_size_dt_strings(fdt));
fdt_set_off_dt_strings(buf, strings_off);
fdt_set_size_dt_strings(buf, fdt_size_dt_strings(fdt));
}
Index: dtc/tests/open_pack.supp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/tests/open_pack.supp 2007-11-21 11:29:39.000000000 +1100
@@ -0,0 +1,7 @@
+{
+ opened blob dumps uninitialized data
+ Memcheck:Param
+ write(buf)
+ obj:/lib/ld-2.6.1.so
+ fun:main
+}
Index: dtc/tests/mangle-layout.supp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ dtc/tests/mangle-layout.supp 2007-11-21 11:34:33.000000000 +1100
@@ -0,0 +1,7 @@
+{
+ uninitialized alignment gaps can be dumped to output
+ Memcheck:Param
+ write(buf)
+ obj:/lib/ld-2.6.1.so
+ fun:main
+}
--
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
* [PATCH] powerpc/pseries: tell phyp to auto-restart
From: Linas Vepstas @ 2007-11-21 2:09 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, strosake
The pseries hypervisor attempts to detect and prevent an
infinite loop of kernel crashes and auto-reboots. It does
so by refusing to auto-reboot unless we indicate that the
current boot was sucessful. So, indicate success late in
the boot sequence.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
----
Sigh. This is a side-effect of the patch I sent yesterday.
Its supposed to simplify the management large numbers of
partitions.
arch/powerpc/platforms/pseries/setup.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
Index: linux-2.6.24-rc3-git1/arch/powerpc/platforms/pseries/setup.c
===================================================================
--- linux-2.6.24-rc3-git1.orig/arch/powerpc/platforms/pseries/setup.c 2007-11-20 18:37:14.000000000 -0600
+++ linux-2.6.24-rc3-git1/arch/powerpc/platforms/pseries/setup.c 2007-11-20 19:08:12.000000000 -0600
@@ -491,6 +491,37 @@ void pSeries_power_off(void)
for (;;);
}
+/**
+ * pSeries_auto_restart - tell hypervisor that boot succeeded.
+ *
+ * The pseries hypervisor attempts to detect and prevent an
+ * infinite loop of kernel crashes and auto-reboots. It does
+ * so by refusing to auto-reboot unless we indicate that the
+ * current boot was sucessful. So, indicate success late in
+ * the boot sequence.
+ */
+static int __init pSeries_auto_restart(void)
+{
+ static char buff[3]; /* static so that its in RMO region */
+ int rc;
+ int token = rtas_token("ibm,set-system-parameter");
+ if (!token)
+ return 0;
+
+ /* partition_auto_restart is 21; set to to 1 to auto-restart the OS. */
+ buff[0] = 0;
+ buff[1] = 1; /* length */
+ buff[2] = 1; /* value */
+ do {
+ rc = rtas_call (token, 2, 1, NULL, 21, buff);
+ } while (rtas_busy_delay(rc));
+ if (rc)
+ printk(KERN_INFO "pSeries_auto_restart(): "
+ "unable to setup autorestart, rc=%d\n", rc);
+ return 0;
+}
+late_initcall(pSeries_auto_restart);
+
#ifndef CONFIG_PCI
void pSeries_final_fixup(void) { }
#endif
^ permalink raw reply
* [PATCH] sys_indirect kernel implementation for PowerPC
From: Paul Mackerras @ 2007-11-21 3:08 UTC (permalink / raw)
To: Ulrich Drepper, linuxppc-dev
This implements sys_indirect for 32-bit and 64-bit powerpc machines,
including a 32-bit compatibility implementation for 64-bit powerpc.
I decided to use assembly language for call_syscall because on 64-bit
powerpc the system call table has the addresses of the function text
rather than pointers to function descriptors; hence the system call
functions can't be called from C via the system call table.
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
This patch applies on top of Ulrich Drepper's series adding the
generic and x86-specific code for sys_indirect.
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index 69a91bd..fd6781c 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -461,6 +461,25 @@ ppc_swapcontext:
b sys_swapcontext
/*
+ * long call_compat_syscall(struct indirect_registers32 *regs)
+ * This function assumes that regs->syscall_nr has already been validated.
+ */
+_GLOBAL(call_syscall)
+ lwz r0,0(r3) /* system call number */
+ lis r11,sys_call_table@ha
+ addi r11,r11,sys_call_table@l
+ slwi r0,r0,2
+ lwzx r10,r11,r0
+ mtctr r10
+ lwz r4,8(r3)
+ lwz r5,12(r3)
+ lwz r6,16(r3)
+ lwz r7,20(r3)
+ lwz r8,24(r3)
+ lwz r3,4(r3)
+ bctr
+
+/*
* Top-level page fault handling.
* This is in assembler because if do_page_fault tells us that
* it is a bad kernel page fault, we want to save the non-volatile
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 148a354..516ee70 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -315,6 +315,43 @@ _GLOBAL(ret_from_fork)
b syscall_exit
/*
+ * long call_syscall(struct indirect_registers *regs)
+ * This function assumes that regs->syscall_nr has already been validated.
+ */
+_GLOBAL(call_syscall)
+ ld r11,.SYS_CALL_TABLE@toc(2)
+ ld r0,0(r3) /* system call number */
+ sldi r0,r0,4
+ ldx r10,r11,r0
+ mtctr r10
+ ld r4,16(r3)
+ ld r5,24(r3)
+ ld r6,32(r3)
+ ld r7,40(r3)
+ ld r8,48(r3)
+ ld r3,8(r3)
+ bctr
+
+/*
+ * long call_compat_syscall(struct indirect_registers32 *regs)
+ * This function assumes that regs->syscall_nr has already been validated.
+ */
+_GLOBAL(call_compat_syscall)
+ ld r11,.SYS_CALL_TABLE@toc(2)
+ lwz r0,0(r3) /* system call number */
+ sldi r0,r0,4
+ addi r11,r11,8
+ ldx r10,r11,r0
+ mtctr r10
+ lwz r4,8(r3)
+ lwz r5,12(r3)
+ lwz r6,16(r3)
+ lwz r7,20(r3)
+ lwz r8,24(r3)
+ lwz r3,4(r3)
+ bctr
+
+/*
* This routine switches between two different tasks. The process
* state of one is saved on its kernel stack. Then the state
* of the other is restored from its kernel stack. The memory
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index 4a4f5c6..fcaf0b2 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -826,3 +826,37 @@ asmlinkage long compat_sys_sync_file_range2(int fd, unsigned int flags,
return sys_sync_file_range(fd, offset, nbytes, flags);
}
+
+long compat_sys_indirect(struct indirect_registers32 __user *userregs,
+ void __user *userparams, size_t paramslen,
+ int flags)
+{
+ struct indirect_registers32 regs;
+ long result;
+
+ if (unlikely(flags != 0))
+ return -EINVAL;
+
+ if (copy_from_user(®s, userregs, sizeof(regs)))
+ return -EFAULT;
+
+ switch (regs.syscall_nr) {
+#define INDSYSCALL(name) __NR_##name
+#include <linux/indirect.h>
+ break;
+
+ default:
+ return -EINVAL;
+ }
+
+ if (paramslen > sizeof(union indirect_params))
+ return -EINVAL;
+
+ result = -EFAULT;
+ if (!copy_from_user(¤t->indirect_params, userparams, paramslen))
+ result = call_compat_syscall(®s);
+
+ memset(¤t->indirect_params, '\0', paramslen);
+
+ return result;
+}
diff --git a/include/asm-powerpc/indirect.h b/include/asm-powerpc/indirect.h
new file mode 100644
index 0000000..fcc6729
--- /dev/null
+++ b/include/asm-powerpc/indirect.h
@@ -0,0 +1,32 @@
+#ifndef _ASM_POWERPC_INDIRECT_H_
+#define _ASM_POWERPC_INDIRECT_H_
+/*
+ * Copyright 2007 Paul Mackerras <paulus@au1.ibm.com>, IBM Corporation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+struct indirect_registers {
+ unsigned long syscall_nr;
+ unsigned long args[6];
+};
+
+extern long call_syscall(struct indirect_registers *regs);
+
+#define INDIRECT_SYSCALL(regs) (regs)->syscall_nr
+#define CALL_INDIRECT(regs) call_syscall(regs)
+
+#ifdef CONFIG_PPC64
+struct indirect_registers32 {
+ unsigned int syscall_nr;
+ unsigned int args[6];
+};
+
+extern long call_compat_syscall(struct indirect_registers32 *regs);
+
+#endif /* CONFIG_PPC64 */
+
+#endif /* _ASM_POWERPC_INDIRECT_H_ */
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h
index 11d5383..de2f4d7 100644
--- a/include/asm-powerpc/systbl.h
+++ b/include/asm-powerpc/systbl.h
@@ -313,3 +313,4 @@ COMPAT_SYS_SPU(timerfd)
SYSCALL_SPU(eventfd)
COMPAT_SYS_SPU(sync_file_range2)
COMPAT_SYS(fallocate)
+COMPAT_SYS(indirect)
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h
index 97d82b6..400e4a6 100644
--- a/include/asm-powerpc/unistd.h
+++ b/include/asm-powerpc/unistd.h
@@ -332,10 +332,11 @@
#define __NR_eventfd 307
#define __NR_sync_file_range2 308
#define __NR_fallocate 309
+#define __NR_indirect 310
#ifdef __KERNEL__
-#define __NR_syscalls 310
+#define __NR_syscalls 311
#define __NR__exit __NR_exit
#define NR_syscalls __NR_syscalls
^ permalink raw reply related
* Re: [PATCH] sys_indirect kernel implementation for PowerPC
From: Stephen Rothwell @ 2007-11-21 3:29 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, Ulrich Drepper
In-Reply-To: <18243.41278.72798.100000@cargo.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 476 bytes --]
On Wed, 21 Nov 2007 14:08:46 +1100 Paul Mackerras <paulus@samba.org> wrote:
>
> +++ b/arch/powerpc/kernel/entry_32.S
> @@ -461,6 +461,25 @@ ppc_swapcontext:
> b sys_swapcontext
>
> /*
> + * long call_compat_syscall(struct indirect_registers32 *regs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Presumably a copy and paste glitch.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [PATCH v7 3/9] add Freescale SerDes PHY support
From: Kumar Gala @ 2007-11-21 3:31 UTC (permalink / raw)
To: Li Yang; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <fa686aa40710190835t4329d52bt74fb3b8f30b25847@mail.gmail.com>
On Oct 19, 2007, at 10:35 AM, Grant Likely wrote:
> On 10/19/07, Li Yang <leoli@freescale.com> wrote:
>> The SerDes(serializer/deserializer) PHY block is a new SoC block used
>> in Freescale chips to support multiple serial interfaces, such as PCI
>> Express, SGMII, SATA.
>
> This looks like board setup behaviour. Shouldn't setting this up be
> the responsibility firmware? And failing that, I think it should be
> done directly by the platform setup function (in other words; make it
> a helper function and call it at board setup time). Besides, you want
> to provide guarantees that the board is setup correctly before the
> device driver that uses it gets probed.
>
> Cheers,
> g.
Upon further review of all this I don't think this belongs in the
kernel at all. This is one time setup and should be done in firmware.
- k
^ permalink raw reply
* Re: [PATCH] sys_indirect kernel implementation for PowerPC
From: Stephen Rothwell @ 2007-11-21 3:42 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, Ulrich Drepper
In-Reply-To: <18243.41278.72798.100000@cargo.ozlabs.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 597 bytes --]
On Wed, 21 Nov 2007 14:08:46 +1100 Paul Mackerras <paulus@samba.org> wrote:
>
> +#ifdef CONFIG_PPC64
Use CONFIG_COMPAT?
> +struct indirect_registers32 {
> + unsigned int syscall_nr;
> + unsigned int args[6];
These could (should?) be compat_ulong_t
> +++ b/include/asm-powerpc/systbl.h
> @@ -313,3 +313,4 @@ COMPAT_SYS_SPU(timerfd)
> SYSCALL_SPU(eventfd)
> COMPAT_SYS_SPU(sync_file_range2)
> COMPAT_SYS(fallocate)
> +COMPAT_SYS(indirect)
Do the SPUs want this?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* RE: [PATCH v7 3/9] add Freescale SerDes PHY support
From: Li Yang @ 2007-11-21 3:48 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <68738B73-92D6-459F-88A7-BBE66967A3A0@kernel.crashing.org>
> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]=20
> Sent: Wednesday, November 21, 2007 11:32 AM
> To: Li Yang
> Cc: Paul Mackerras; linuxppc-dev@ozlabs.org; Grant Likely
> Subject: Re: [PATCH v7 3/9] add Freescale SerDes PHY support
>=20
>=20
> On Oct 19, 2007, at 10:35 AM, Grant Likely wrote:
>=20
> > On 10/19/07, Li Yang <leoli@freescale.com> wrote:
> >> The SerDes(serializer/deserializer) PHY block is a new SoC=20
> block used=20
> >> in Freescale chips to support multiple serial interfaces,=20
> such as PCI=20
> >> Express, SGMII, SATA.
> >
> > This looks like board setup behaviour. Shouldn't setting=20
> this up be=20
> > the responsibility firmware? And failing that, I think it=20
> should be=20
> > done directly by the platform setup function (in other=20
> words; make it=20
> > a helper function and call it at board setup time). =20
> Besides, you want=20
> > to provide guarantees that the board is setup correctly before the=20
> > device driver that uses it gets probed.
> >
> > Cheers,
> > g.
>=20
> Upon further review of all this I don't think this belongs in=20
> the kernel at all. This is one time setup and should be done=20
> in firmware.
I'm ok for it to be taken care of in u-boot for now. However, if we
later plan to add power management support to this block. We probably
have to do it in kernel.
- Leo
^ permalink raw reply
* RE: [PATCH v7 3/9] add Freescale SerDes PHY support
From: Liu Dave @ 2007-11-21 3:48 UTC (permalink / raw)
To: Kumar Gala, Li Yang; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <68738B73-92D6-459F-88A7-BBE66967A3A0@kernel.crashing.org>
> On Oct 19, 2007, at 10:35 AM, Grant Likely wrote:
>=20
> > On 10/19/07, Li Yang <leoli@freescale.com> wrote:
> >> The SerDes(serializer/deserializer) PHY block is a new SoC=20
> block used
> >> in Freescale chips to support multiple serial interfaces,=20
> such as PCI
> >> Express, SGMII, SATA.
> >
> > This looks like board setup behaviour. Shouldn't setting this up be
> > the responsibility firmware? And failing that, I think it should be
> > done directly by the platform setup function (in other=20
> words; make it
> > a helper function and call it at board setup time). =20
> Besides, you want
> > to provide guarantees that the board is setup correctly before the
> > device driver that uses it gets probed.
> >
> > Cheers,
> > g.
>=20
> Upon further review of all this I don't think this belongs in the =20
> kernel at all. This is one time setup and should be done in firmware.
The latest u-boot supports the serdes initialization for 837x.
So, it can be dropped from kernel for now.
Dave
^ 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