* [PATCH] ppc4xx: mmu_mapin_ram bugfix for booting with mem<16 MB
From: Magnus Hjorth @ 2007-10-27 8:35 UTC (permalink / raw)
To: Grant Likely; +Cc: Linuxppc-embedded
In-Reply-To: <fa686aa40710261254r105530d4u2e95d96948030ed7@mail.gmail.com>
From: Magnus Hjorth <mh@omnisys.se>
This patch (for 2.6.23.1) fixes an unsigned arithmetic bug causing the
kernel to hang when booting with less than 16 MB of memory on ppc4xx.
Signed-off-by: Magnus Hjorth <mh@omnisys.se>
---
OK, trying to do this by the book now...
--- linux-2.6.23.1/arch/ppc/mm/4xx_mmu.c.orig 2007-10-27 10:14:42.000000000 +0200
+++ linux-2.6.23.1/arch/ppc/mm/4xx_mmu.c 2007-10-27 10:15:34.000000000 +0200
@@ -105,7 +105,7 @@ unsigned long __init mmu_mapin_ram(void)
return s;
}
- while (s <= (total_lowmem - LARGE_PAGE_SIZE_16M)) {
+ while (s + LARGE_PAGE_SIZE_16M <= total_lowmem) {
pmd_t *pmdp;
unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE;
@@ -120,7 +120,7 @@ unsigned long __init mmu_mapin_ram(void)
s += LARGE_PAGE_SIZE_16M;
}
- while (s <= (total_lowmem - LARGE_PAGE_SIZE_4M)) {
+ while (s + LARGE_PAGE_SIZE_4M <= total_lowmem) {
pmd_t *pmdp;
unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE;
^ permalink raw reply
* Re: [PATCH 1/2] PowerPC: Add 44x NDFC device-tree aware support
From: Thomas Gleixner @ 2007-10-27 8:46 UTC (permalink / raw)
To: Stefan Roese; +Cc: linuxppc-dev, linux-mtd
In-Reply-To: <200710270653.32459.sr@denx.de>
On Sat, 27 Oct 2007, Stefan Roese wrote:
> Hi Valentine,
>
> On Friday 26 October 2007, Valentine Barshak wrote:
> > This adds device-tree aware PowerPC 44x NDFC (NAND Flash Controller)
> > driver. The code is based on the original ndfc.c driver by Thomas Gleixner.
> > The major difference is that here we try to handle all chips found as one
> > mtd device instead of having a separate one on each chip.
> > The partition handling code is based on the physmap_of one.
> > The the first 4 bits of the "bank-mask" property show which of the 4 NDFC
> > banks have chips attached. The "bank-width" property is 1 for 8-bit flash
> > and 2 for a 16-bit one.
> >
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
>
> Are you sure you have the Signed-off-by from Thomas already on this?
Definitely not.
tglx
^ permalink raw reply
* [PATCH] compat_ioctl: fix block device compat ioctl regression
From: Arnd Bergmann @ 2007-10-27 9:38 UTC (permalink / raw)
To: akpm, linuxppc-dev, Geert Uytterhoeven, Johannes Berg, Jens Axboe
Cc: linux-kernel, Philip Langdale
In-Reply-To: <47228A9E.80505@overt.org>
From: Philip Langdale <philipl@overt.org>
The conversion of handlers to compat_blkdev_ioctl accidentally
disabled handling of most ioctl numbers on block devices because
of a typo. Fix the one line to enable it all again.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Mea Culpa. This should have been found by my testing, as it's clear
that most of my big patch never worked at all. Sorry for causing
problems for everyone involved here.
I'm attributing the patch to Philip, as he's the one who pointed
out to me what the fix is.
Arnd <><
--- a/block/compat_ioctl.c
+++ b/block/compat_ioctl.c
@@ -581,7 +581,7 @@ static int compat_blkdev_driver_ioctl(struct inode *inode, struct file *file,
{
int ret;
- switch (arg) {
+ switch (cmd) {
case HDIO_GET_UNMASKINTR:
case HDIO_GET_MULTCOUNT:
case HDIO_GET_KEEPSETTINGS:
^ permalink raw reply
* Re: [PATCH 6/7] mpc83xx: timer driver for PM wakeup
From: Anton Vorontsov @ 2007-10-27 10:46 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev, paulus
In-Reply-To: <20071023212502.GE30959@loki.buserror.net>
Hi Scott,
On Tue, Oct 23, 2007 at 04:25:02PM -0500, Scott Wood wrote:
> This is a driver for the mpc83xx's GTM4 timer. It's functionality
> is limited to providing a wakeup source for suspend-to-RAM.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
I think you can use dev_err(&dev->dev
> +static int __devinit gtm_probe(struct of_device *dev,
> + const struct of_device_id *match)
> +{
> + struct device_node *np = dev->node;
> + struct resource res;
> + int ret = 0;
> + u32 busfreq = fsl_get_sys_freq();
> + struct gtm_priv *priv;
> +
> + if (busfreq == 0) {
> + printk(KERN_ERR "gtm: No bus frequency in device tree.\n");
here
> + return -ENODEV;
> + }
> +
> + priv = kmalloc(sizeof(struct gtm_priv), GFP_KERNEL);
> + if (!priv)
> + return -ENOMEM;
> +
> + spin_lock_init(&priv->lock);
> + dev_set_drvdata(&dev->dev, priv);
> +
> + ret = of_address_to_resource(np, 0, &res);
> + if (ret)
> + goto out;
> +
> + priv->irq = irq_of_parse_and_map(np, 0);
> + if (priv->irq == NO_IRQ) {
> + printk(KERN_ERR "mpc83xx-gtm exists in device tree "
> + "without an IRQ.\n");
and here.
Thanks,
--
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2
^ permalink raw reply
* Re: [PATCH] compat_ioctl: fix block device compat ioctl regression
From: Jens Axboe @ 2007-10-27 11:34 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-kernel, linuxppc-dev, Geert Uytterhoeven, akpm,
Johannes Berg, Philip Langdale
In-Reply-To: <200710271138.06456.arnd@arndb.de>
On Sat, Oct 27 2007, Arnd Bergmann wrote:
> From: Philip Langdale <philipl@overt.org>
> The conversion of handlers to compat_blkdev_ioctl accidentally
> disabled handling of most ioctl numbers on block devices because
> of a typo. Fix the one line to enable it all again.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>
> Mea Culpa. This should have been found by my testing, as it's clear
> that most of my big patch never worked at all. Sorry for causing
> problems for everyone involved here.
>
> I'm attributing the patch to Philip, as he's the one who pointed
> out to me what the fix is.
Oops, added for swift inclusion.
--
Jens Axboe
^ permalink raw reply
* arch/powerpc/boot/wrapper broken
From: Michael Buesch @ 2007-10-27 12:42 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
It calls the "mkimage" command, which does not exist
in my $PATH.
--
Greetings Michael.
^ permalink raw reply
* Re: arch/powerpc/boot/wrapper broken
From: Vitaly Bordug @ 2007-10-27 12:55 UTC (permalink / raw)
To: Michael Buesch; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <200710271442.50158.mb@bu3sch.de>
On Sat, 27 Oct 2007 14:42:49 +0200
Michael Buesch wrote:
> It calls the "mkimage" command, which does not exist
> in my $PATH.
>
well, mkImage is a part of u-boot and there was some talk to make it part of kernel too,
since it does not take alot of place but still mandatory for a number of platforms to work.
I think, Paul will clarify the details, meanwhile you can install mkImage say building u-boot, and
some distros may have such a package.
--
Sincerely, Vitaly
^ permalink raw reply
* Re: arch/powerpc/boot/wrapper broken
From: Michael Buesch @ 2007-10-27 13:01 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20071027165549.3288d76e@kernel.crashing.org>
On Saturday 27 October 2007 14:55:49 Vitaly Bordug wrote:
> On Sat, 27 Oct 2007 14:42:49 +0200
> Michael Buesch wrote:
>
> > It calls the "mkimage" command, which does not exist
> > in my $PATH.
> >
> well, mkImage is a part of u-boot and there was some talk to make it part of kernel too,
> since it does not take alot of place but still mandatory for a number of platforms to work.
>
> I think, Paul will clarify the details, meanwhile you can install mkImage say building u-boot, and
> some distros may have such a package.
>
Ubuntu doesn't seem to, though.
In any case, I think that the name "mkimage" is bad for a tool installed
globally in /usr. Does it make a iso9660 image? (No it doesn't, I know :) )
I'd vote for shipping it with the kernel in /scripts or something like that.
--
Greetings Michael.
^ permalink raw reply
* Re: [PATCH] ucc_geth: add support for netpoll
From: Sergei Shtylyov @ 2007-10-27 13:09 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: netdev, leoli, linux-kernel, linuxppc-dev
In-Reply-To: <20071011124842.GB13963@localhost.localdomain>
Hello.
Anton Vorontsov wrote:
> This patch adds netpoll support for the QE UCC Gigabit Ethernet
> driver. The approach is very similar to the gianfar driver.
It's rather contrarywise -- this is standard approach and gianfar with its
3 TSEC IRQs has a quite non-standard poll_controller() implementation.
> Tested using netconsole.
KGDBoE is considered a better test (I hope you've also tested with it).
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
> index 18a6f48..06807ce 100644
> --- a/drivers/net/ucc_geth.c
> +++ b/drivers/net/ucc_geth.c
> @@ -3691,6 +3691,22 @@ static irqreturn_t ucc_geth_irq_handler(int irq, void *info)
> return IRQ_HANDLED;
> }
>
> +#ifdef CONFIG_NET_POLL_CONTROLLER
> +/*
> + * Polling 'interrupt' - used by things like netconsole to send skbs
> + * without having to re-enable interrupts. It's not called while
> + * the interrupt routine is executing.
> + */
> +static void ucc_netpoll(struct net_device *dev)
> +{
> + struct ucc_geth_private *ugeth = netdev_priv(dev);
> +
> + disable_irq(ugeth->ug_info->uf_info.irq);
> + ucc_geth_irq_handler(ugeth->ug_info->uf_info.irq, dev);
> + enable_irq(ugeth->ug_info->uf_info.irq);
Why not make it less complex (for a reader and gcc too :-) ?
struct ucc_geth_private *ugeth = netdev_priv(dev);
int irq = ugeth->ug_info->uf_info.irq;
disable_irq(irq);
ucc_geth_irq_handler(irq, dev);
enable_irq(irq);
> +}
> +#endif /* CONFIG_NET_POLL_CONTROLLER */
> +
> /* Called when something needs to use the ethernet device */
> /* Returns 0 for success. */
> static int ucc_geth_open(struct net_device *dev)
WBR, Sergei
^ permalink raw reply
* [PATCH] allocation fix in ppc/platforms/4xx/luan.c
From: Roel Kluin @ 2007-10-27 14:22 UTC (permalink / raw)
To: linuxppc-dev
Don't allocate hose2 when when hose1 can't be allocated and free hose1 when
hose2 can't be allocated.
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c
index 4b16961..b79ebb8 100644
--- a/arch/ppc/platforms/4xx/luan.c
+++ b/arch/ppc/platforms/4xx/luan.c
@@ -230,9 +230,14 @@ luan_setup_hoses(void)
/* Allocate hoses for PCIX1 and PCIX2 */
hose1 = pcibios_alloc_controller();
+ if (!hose1)
+ return;
+
hose2 = pcibios_alloc_controller();
- if (!hose1 || !hose2)
+ if (!hose2) {
+ pcibios_free_controller(hose1);
return;
+ }
/* Setup PCIX1 */
hose1->first_busno = 0;
^ permalink raw reply related
* [PATCH] Free when ioremap fails in powerpc/platforms/52xx/mpc52xx_pci.c
From: Roel Kluin @ 2007-10-27 14:11 UTC (permalink / raw)
To: linuxppc-dev
Free hose when ioremap fails
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
---
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
index 4c6c82a..50f9655 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c
@@ -395,8 +395,10 @@ mpc52xx_add_bridge(struct device_node *node)
hose->ops = &mpc52xx_pci_ops;
pci_regs = ioremap(rsrc.start, rsrc.end - rsrc.start + 1);
- if (!pci_regs)
+ if (!pci_regs) {
+ pcibios_free_controller(hose);
return -ENOMEM;
+ }
pci_process_bridge_OF_ranges(hose, node, 1);
^ permalink raw reply related
* Re: [PATCH] ucc_geth: add support for netpoll
From: Anton Vorontsov @ 2007-10-27 14:37 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: linuxppc-dev, netdev, leoli, linux-kernel
In-Reply-To: <4723389F.7010109@ru.mvista.com>
On Sat, Oct 27, 2007 at 05:09:51PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> Anton Vorontsov wrote:
>
> > This patch adds netpoll support for the QE UCC Gigabit Ethernet
> > driver. The approach is very similar to the gianfar driver.
>
> It's rather contrarywise -- this is standard approach and gianfar with its
> 3 TSEC IRQs has a quite non-standard poll_controller() implementation.
Oh.. well, right -- gianfar a bit more comlex in that regard.
>
> > Tested using netconsole.
>
> KGDBoE is considered a better test (I hope you've also tested with it).
At the time of posting it was tested using netconsole only, a few
days later it's was tested using KGDBoE also. So, it works indeed.
> > Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> > diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
> > index 18a6f48..06807ce 100644
> > --- a/drivers/net/ucc_geth.c
> > +++ b/drivers/net/ucc_geth.c
> > @@ -3691,6 +3691,22 @@ static irqreturn_t ucc_geth_irq_handler(int irq, void *info)
> > return IRQ_HANDLED;
> > }
> >
> > +#ifdef CONFIG_NET_POLL_CONTROLLER
> > +/*
> > + * Polling 'interrupt' - used by things like netconsole to send skbs
> > + * without having to re-enable interrupts. It's not called while
> > + * the interrupt routine is executing.
> > + */
> > +static void ucc_netpoll(struct net_device *dev)
> > +{
> > + struct ucc_geth_private *ugeth = netdev_priv(dev);
> > +
> > + disable_irq(ugeth->ug_info->uf_info.irq);
> > + ucc_geth_irq_handler(ugeth->ug_info->uf_info.irq, dev);
> > + enable_irq(ugeth->ug_info->uf_info.irq);
>
> Why not make it less complex (for a reader and gcc too :-) ?
Yup, I'm agree here but it's too late. Again. ;-)
This patch already accepted into the -mm (a week or so after the
silence), so.. now I'd rather not bother Andrew with such really
cosmetic changes. But if Jeff would directly apply modfied patch,
I'll send it. ;-)
Anyhow, I'm sincerely appreciate your comments.
Thanks,
--
Anton Vorontsov
email: cbou@mail.ru
backup email: ya-cbou@yandex.ru
irc://irc.freenode.net/bd2
^ permalink raw reply
* [PATCH v2] [POWERPC] Fix CONFIG_SMP=n build break
From: Olof Johansson @ 2007-10-27 17:28 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linuxppc-dev, paulus, linux-kernel
In-Reply-To: <200710262019.12094.arnd@arndb.de>
Fix two build errors on powerpc allyesconfig + CONFIG_SMP=n:
arch/powerpc/platforms/built-in.o: In function `cpu_affinity_set':
arch/powerpc/platforms/cell/spu_priv1_mmio.c:78: undefined reference to `.iic_get_target_id'
arch/powerpc/platforms/built-in.o: In function `iic_init_IRQ':
arch/powerpc/platforms/cell/interrupt.c:397: undefined reference to `.iic_setup_cpu'
Signed-off-by: Olof Johansson <olof@lixom.net>
---
On Fri, Oct 26, 2007 at 08:19:10PM +0200, Arnd Bergmann wrote:
> I think here it would be better to move iic_get_target_id out of
> CONFIG_SMP as well. We might want to kexec from an SMP kernel into
> a UP kernel, and in that case, cpu_affinity_set() should better
> reset the routing to CPU 0.
Makes sense. New patch.
-Olof
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index 151fd8b..04f74f9 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -158,6 +158,18 @@ static unsigned int iic_get_irq(void)
return virq;
}
+void iic_setup_cpu(void)
+{
+ out_be64(&__get_cpu_var(iic).regs->prio, 0xff);
+}
+
+u8 iic_get_target_id(int cpu)
+{
+ return per_cpu(iic, cpu).target_id;
+}
+
+EXPORT_SYMBOL_GPL(iic_get_target_id);
+
#ifdef CONFIG_SMP
/* Use the highest interrupt priorities for IPI */
@@ -166,29 +178,17 @@ static inline int iic_ipi_to_irq(int ipi)
return IIC_IRQ_TYPE_IPI + 0xf - ipi;
}
-void iic_setup_cpu(void)
-{
- out_be64(&__get_cpu_var(iic).regs->prio, 0xff);
-}
-
void iic_cause_IPI(int cpu, int mesg)
{
out_be64(&per_cpu(iic, cpu).regs->generate, (0xf - mesg) << 4);
}
-u8 iic_get_target_id(int cpu)
-{
- return per_cpu(iic, cpu).target_id;
-}
-EXPORT_SYMBOL_GPL(iic_get_target_id);
-
struct irq_host *iic_get_irq_host(int node)
{
return iic_host;
}
EXPORT_SYMBOL_GPL(iic_get_irq_host);
-
static irqreturn_t iic_ipi_action(int irq, void *dev_id)
{
int ipi = (int)(long)dev_id;
^ permalink raw reply related
* Re: [PATCH] [Powerpc] fix switch_slb handling of 1T ESID values
From: Will Schmidt @ 2007-10-27 17:36 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev, paulus
In-Reply-To: <1193458771.18243.55.camel@pasglop>
On Sat, 2007-10-27 at 14:19 +1000, Benjamin Herrenschmidt wrote:
> On Fri, 2007-10-26 at 15:46 -0500, Will Schmidt wrote:
> > [Powerpc] fix switch_slb handling of 1T ESID values
> >
> > Now that we have 1TB segment size support, we need to be using the
> > GET_ESID_1T macro when comparing ESID values for pc,stack, and
> > unmapped_base within switch_slb() when we're on a CPU that supports it.
> >
> > This also happens to fix a duplicate-slb-entry inspired machine-check
> > exception I was seeing when trying to run java on a power6 partition.
> >
> > Tested on power6 and power5.
> >
> > Signed-Off-By: Will Schmidt <will_schmidt@vnet.ibm.com>
>
> Good catch !
>
> A minor comment is maybe you could factor out the code better doing
> something like a ESID_COMPARE() macro ?
Yeah, thats a good idea. I'll spin up a new patch in the next day or
so.
It occurred to me that I should continue to use GET_ESID when the user
address is < 1T too.
>
> > ---
> >
> > There is a similar bit of code in stab.c switch_stab(). Should this change also be made there?
> > ---
>
> There is no machine that does stab and 1T segments.
Ok, thanks for the clarification.
-Will
>
> Ben.
>
> >
> > arch/powerpc/mm/slb.c | 19 ++++++++++++++-----
> > 1 files changed, 14 insertions(+), 5 deletions(-)
> >
> >
> > diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
> > index bbd2c51..0c527d7 100644
> > --- a/arch/powerpc/mm/slb.c
> > +++ b/arch/powerpc/mm/slb.c
> > @@ -193,16 +193,25 @@ void switch_slb(struct task_struct *tsk, struct mm_struct *mm)
> > return;
> > slb_allocate(pc);
> >
> > - if (GET_ESID(pc) == GET_ESID(stack))
> > - return;
> > + if (cpu_has_feature(CPU_FTR_1T_SEGMENT)) {
> > + if (GET_ESID_1T(pc) == GET_ESID_1T(stack))
> > + return;
> > + } else
> > + if (GET_ESID(pc) == GET_ESID(stack))
> > + return;
> >
> > if (is_kernel_addr(stack))
> > return;
> > slb_allocate(stack);
> >
> > - if ((GET_ESID(pc) == GET_ESID(unmapped_base))
> > - || (GET_ESID(stack) == GET_ESID(unmapped_base)))
> > - return;
> > + if (cpu_has_feature(CPU_FTR_1T_SEGMENT)) {
> > + if ((GET_ESID_1T(pc) == GET_ESID_1T(unmapped_base))
> > + || (GET_ESID_1T(stack) == GET_ESID_1T(unmapped_base)))
> > + return;
> > + } else
> > + if ((GET_ESID(pc) == GET_ESID(unmapped_base))
> > + || (GET_ESID(stack) == GET_ESID(unmapped_base)))
> > + return;
> >
> > if (is_kernel_addr(unmapped_base))
> > return;
> >
> >
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@ozlabs.org
> > https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
^ permalink raw reply
* 2.6.24-rc1 sysctl table check failed on PowerMac
From: Mikael Pettersson @ 2007-10-27 17:57 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev, linux-kernel
Booting 2.6.24-rc1 on my PowerMac the kernel now spits
out a sysctl warning early in the boot sequence:
--- dmesg-2.6.23
+++ dmesg-2.6.24-rc1
...
IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
+sysctl table check failed: /kernel .1 Writable sysctl directory
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
^ permalink raw reply
* Re: [PATCH v2] [POWERPC] Fix CONFIG_SMP=n build break
From: Arnd Bergmann @ 2007-10-27 18:08 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev, paulus, linux-kernel
In-Reply-To: <20071027172851.GA11930@lixom.net>
On Saturday 27 October 2007, Olof Johansson wrote:
> Fix two build errors on powerpc allyesconfig + CONFIG_SMP=n:
>
> arch/powerpc/platforms/built-in.o: In function `cpu_affinity_set':
> arch/powerpc/platforms/cell/spu_priv1_mmio.c:78: undefined reference to `.iic_get_target_id'
> arch/powerpc/platforms/built-in.o: In function `iic_init_IRQ':
> arch/powerpc/platforms/cell/interrupt.c:397: undefined reference to `.iic_setup_cpu'
>
> Signed-off-by: Olof Johansson <olof@lixom.net>
>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
^ permalink raw reply
* Re: 2.6.24-rc1 sysctl table check failed on PowerMac
From: Alexey Dobriyan @ 2007-10-27 18:34 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: linuxppc-dev, paulus, linux-kernel
In-Reply-To: <200710271757.l9RHvcY9021751@harpo.it.uu.se>
On Sat, Oct 27, 2007 at 07:57:38PM +0200, Mikael Pettersson wrote:
> Booting 2.6.24-rc1 on my PowerMac the kernel now spits
> out a sysctl warning early in the boot sequence:
>
> --- dmesg-2.6.23
> +++ dmesg-2.6.24-rc1
> ...
> IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
> TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
> TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
> TCP: Hash tables configured (established 131072 bind 65536)
> TCP reno registered
> +sysctl table check failed: /kernel .1 Writable sysctl directory
[PATCH] powerpc: fix sysctl whining re kernel.powersave-nap
kernel was marked with 0755. Everywhere else it's 0555.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
arch/powerpc/kernel/idle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -122,7 +122,7 @@ static ctl_table powersave_nap_sysctl_root[] = {
{
.ctl_name = CTL_KERN,
.procname = "kernel",
- .mode = 0755,
+ .mode = 0555,
.child = powersave_nap_ctl_table,
},
{}
^ permalink raw reply
* Re: 2.6.24-rc1 sysctl table check failed on PowerMac
From: Mikael Pettersson @ 2007-10-27 19:37 UTC (permalink / raw)
To: adobriyan, mikpe; +Cc: linuxppc-dev, paulus, linux-kernel
On Sat, 27 Oct 2007 22:34:53 +0400, Alexey Dobriyan wrote:
> On Sat, Oct 27, 2007 at 07:57:38PM +0200, Mikael Pettersson wrote:
> > Booting 2.6.24-rc1 on my PowerMac the kernel now spits
> > out a sysctl warning early in the boot sequence:
> >
> > --- dmesg-2.6.23
> > +++ dmesg-2.6.24-rc1
> > ...
> > IP route cache hash table entries: 32768 (order: 5, 131072 bytes)
> > TCP established hash table entries: 131072 (order: 8, 1048576 bytes)
> > TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
> > TCP: Hash tables configured (established 131072 bind 65536)
> > TCP reno registered
> > +sysctl table check failed: /kernel .1 Writable sysctl directory
>
> [PATCH] powerpc: fix sysctl whining re kernel.powersave-nap
>
> kernel was marked with 0755. Everywhere else it's 0555.
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
>
> arch/powerpc/kernel/idle.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- a/arch/powerpc/kernel/idle.c
> +++ b/arch/powerpc/kernel/idle.c
> @@ -122,7 +122,7 @@ static ctl_table powersave_nap_sysctl_root[] = {
> {
> .ctl_name = CTL_KERN,
> .procname = "kernel",
> - .mode = 0755,
> + .mode = 0555,
> .child = powersave_nap_ctl_table,
> },
> {}
>
This eliminated the warning. Thanks.
^ permalink raw reply
* [PATCH] fix breakage in pegasos_eth (fallout from commit b45d9147f1582333e180e1023624c003874b7312)
From: Al Viro @ 2007-10-27 20:02 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linuxppc-dev, linux-kernel, buytenh
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h
index 3f27239..8df230a 100644
--- a/include/linux/mv643xx_eth.h
+++ b/include/linux/mv643xx_eth.h
@@ -8,6 +8,9 @@
#define MV643XX_ETH_NAME "mv643xx_eth"
#define MV643XX_ETH_SHARED_REGS 0x2000
#define MV643XX_ETH_SHARED_REGS_SIZE 0x2000
+#define MV643XX_ETH_BAR_4 0x220
+#define MV643XX_ETH_SIZE_REG_4 0x224
+#define MV643XX_ETH_BASE_ADDR_ENABLE_REG 0x0290
struct mv643xx_eth_platform_data {
int port_number;
^ permalink raw reply related
* RE: [i2c] i2c-mpc.c driver issues
From: Joakim Tjernlund @ 2007-10-27 20:52 UTC (permalink / raw)
To: 'Jean Delvare'; +Cc: linuxppc-dev, i2c
In-Reply-To: <20071026115329.0307e207@hyperion.delvare>
> -----Original Message-----
> From:
> linuxppc-dev-bounces+joakim.tjernlund=transmode.se@ozlabs.org
> [mailto:linuxppc-dev-bounces+joakim.tjernlund=transmode.se@ozl
abs.org] On Behalf Of Jean Delvare
> Sent: den 26 oktober 2007 11:53
> To: Tjernlund
> Cc: linuxppc-dev@ozlabs.org; i2c@lm-sensors.org
> Subject: Re: [i2c] i2c-mpc.c driver issues
>
> Hi Jocke,
>
> On Wed, 24 Oct 2007 23:06:13 +0200, Tjernlund wrote:
> > While browsing the i2c-mpc.c driver I noticed some things
> that look odd
> > to me so I figured I report them. Could not find a
> maintainer in the MAINTANERS file
> > so I sent here, cc:ed linuxppc-dev as well.
> >
> > 1) There are a lot of return -1 error code that is
> propagated back to
> > userspace. Should be changed to proper -Exxx codes.
>
> This is true of many Linux i2c bus drivers, unfortunately.
> While nothing
> actually prevents drivers from returning -1 to userspace on error,
> meaningful error codes would of course be preferred.
>
> > 2) mpc_read(), according to the comment below it sends a
> STOP condition here but
> > this function does not known if this is the last read or
> not. mpc_xfer is
> > the one that knows when the transaction is over and
> should send the stop, which it already
> > does.
> >
> > /* Generate stop on last byte */
> > if (i == length - 1)
> > writeccr(i2c, CCR_MIEN | CCR_MEN | CCR_TXAK);
>
> Probably correct, although I am not familiar with this specific
> hardware. I guess that the same is true of mpc_write as well, which is
> even worse because write + read combined transactions are very common
> (while read + write are not.)
>
> I'm not completely sure that mpc_xfer sends the stop. mpc_i2c_stop
> doesn't seem to do much.
Don't have the manual handy, but there is something bothering me with
the read function. After reading the last char there is nothing that
wait for the STOP to complete, instead one just exits and call
mpc_i2c_stop(). It might be so that the i2c_wait() won't complete until
the STOP has been sent, but I would not bet on it.
Jocke
^ permalink raw reply
* [PATCH] powerpc: Fix cache line vs. block size confusion
From: Benjamin Herrenschmidt @ 2007-10-27 21:49 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev list, Ronald L Rockhold, Lixin Zhang
We had an historical confusion in the kernel between cache line
and cache block size. The former is an implementation detail of
the L1 cache which can be useful for performance optimisations,
the later is the actual size on which the cache control
instructions operate, which can be different.
For some reason, we had a weird hack reading the right property
on powermac and the wrong one on any other 64 bits (32 bits is
unaffected as it only uses the cputable for cache block size
infos at this stage).
This fixes the booting-without-of.txt documentation to mention
the right properties, and fixes the 64 bits initialization code
to look for the block size first, with a fallback to the line
size if the property is missing.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Note: I didn't update all the .dts files which is fine as only
64 bits currently cares about those properties and the code has
a fallback to the line size property. So they can be fixed
gradually if necessary.
Index: linux-work/Documentation/powerpc/booting-without-of.txt
===================================================================
--- linux-work.orig/Documentation/powerpc/booting-without-of.txt 2007-10-28 08:45:27.000000000 +1100
+++ linux-work/Documentation/powerpc/booting-without-of.txt 2007-10-28 08:45:38.000000000 +1100
@@ -851,12 +851,18 @@ address which can extend beyond that lim
/cpus/PowerPC,970FX@0
/cpus/PowerPC,970FX@1
(unit addresses do not require leading zeroes)
- - d-cache-line-size : one cell, L1 data cache line size in bytes
- - i-cache-line-size : one cell, L1 instruction cache line size in
+ - d-cache-block-size : one cell, L1 data cache block size in bytes (*)
+ - i-cache-block-size : one cell, L1 instruction cache block size in
bytes
- d-cache-size : one cell, size of L1 data cache in bytes
- i-cache-size : one cell, size of L1 instruction cache in bytes
+(*) The cache "block" size is the size on which the cache management
+instructions operate. Historically, this document used the cache
+"line" size here which is incorrect. The kernel will prefer the cache
+block size and will fallback to cache line size for backward
+compatibility.
+
Recommended properties:
- timebase-frequency : a cell indicating the frequency of the
@@ -870,6 +876,10 @@ address which can extend beyond that lim
for the above, the common code doesn't use that property, but
you are welcome to re-use the pSeries or Maple one. A future
kernel version might provide a common function for this.
+ - d-cache-line-size : one cell, L1 data cache line size in bytes
+ if different from the block size
+ - i-cache-line-size : one cell, L1 instruction cache line size in
+ bytes if different from the block size
You are welcome to add any property you find relevant to your board,
like some information about the mechanism used to soft-reset the
Index: linux-work/arch/powerpc/kernel/setup_64.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/setup_64.c 2007-10-28 08:45:27.000000000 +1100
+++ linux-work/arch/powerpc/kernel/setup_64.c 2007-10-28 08:46:19.000000000 +1100
@@ -291,23 +291,16 @@ static void __init initialize_cache_info
if ( num_cpus == 1 ) {
const u32 *sizep, *lsizep;
u32 size, lsize;
- const char *dc, *ic;
-
- /* Then read cache informations */
- if (machine_is(powermac)) {
- dc = "d-cache-block-size";
- ic = "i-cache-block-size";
- } else {
- dc = "d-cache-line-size";
- ic = "i-cache-line-size";
- }
size = 0;
lsize = cur_cpu_spec->dcache_bsize;
sizep = of_get_property(np, "d-cache-size", NULL);
if (sizep != NULL)
size = *sizep;
- lsizep = of_get_property(np, dc, NULL);
+ lsizep = of_get_property(np, "d-cache-block-size", NULL);
+ /* fallback if block size missing */
+ if (lsizep == NULL)
+ lsizep = of_get_property(np, "d-cache-line-size", NULL);
if (lsizep != NULL)
lsize = *lsizep;
if (sizep == 0 || lsizep == 0)
@@ -324,7 +317,9 @@ static void __init initialize_cache_info
sizep = of_get_property(np, "i-cache-size", NULL);
if (sizep != NULL)
size = *sizep;
- lsizep = of_get_property(np, ic, NULL);
+ lsizep = of_get_property(np, "i-cache-block-size", NULL);
+ if (lsizep == NULL)
+ lsizep = of_get_property(np, "i-cache-line-size", NULL);
if (lsizep != NULL)
lsize = *lsizep;
if (sizep == 0 || lsizep == 0)
^ permalink raw reply
* Re: [PATCH v2] [POWERPC] Fix CONFIG_SMP=n build break
From: Stephen Rothwell @ 2007-10-28 1:38 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev, paulus, linux-kernel, Arnd Bergmann
In-Reply-To: <20071027172851.GA11930@lixom.net>
[-- Attachment #1: Type: text/plain, Size: 436 bytes --]
Hi Olof,
Just a trivial thing ...
On Sat, 27 Oct 2007 12:28:51 -0500 Olof Johansson <olof@lixom.net> wrote:
>
> +u8 iic_get_target_id(int cpu)
> +{
> + return per_cpu(iic, cpu).target_id;
> +}
> +
> +EXPORT_SYMBOL_GPL(iic_get_target_id);
We don't normally put a blank line between a function and its EXPORT...
--
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 v2] [POWERPC] Fix CONFIG_SMP=n build break
From: Olof Johansson @ 2007-10-28 2:02 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: linuxppc-dev, paulus, linux-kernel, Arnd Bergmann
In-Reply-To: <20071028123850.e5b9c555.sfr@canb.auug.org.au>
On Sun, Oct 28, 2007 at 12:38:50PM +1100, Stephen Rothwell wrote:
> Hi Olof,
>
> Just a trivial thing ...
>
> On Sat, 27 Oct 2007 12:28:51 -0500 Olof Johansson <olof@lixom.net> wrote:
> >
> > +u8 iic_get_target_id(int cpu)
> > +{
> > + return per_cpu(iic, cpu).target_id;
> > +}
> > +
> > +EXPORT_SYMBOL_GPL(iic_get_target_id);
>
> We don't normally put a blank line between a function and its EXPORT...
Yeah, sloppy of me, I thought I just copied and pasted. Paulus: feel
free to fix up before applying.
Thanks for your feedback,
-Olof
^ permalink raw reply
* Re: [PATCH] fix appletouch geyser 1 breakage
From: Dmitry Torokhov @ 2007-10-28 5:00 UTC (permalink / raw)
To: Johannes Berg; +Cc: linuxppc-dev list, Benjamin Berg, Anton Ekblad
In-Reply-To: <1193430697.15686.1.camel@johannes.berg>
On Friday 26 October 2007 16:31, Johannes Berg wrote:
>
> > Johannes, and what is product ID for your touchpad?
>
> It's 0x20e, listed as 'fountain'
>
OK, then maybe instead of reverting the change outright we could try the
patch below?
--
Dmitry
Input: appletouch - idle reset logic broke older Fountains
Older models of fountains do not support change mode request and
therefore shoudl be excluded from idle reset attempts.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
drivers/input/mouse/appletouch.c | 83 +++++++++++++++++++++++----------------
1 file changed, 49 insertions(+), 34 deletions(-)
Index: work/drivers/input/mouse/appletouch.c
===================================================================
--- work.orig/drivers/input/mouse/appletouch.c
+++ work/drivers/input/mouse/appletouch.c
@@ -130,11 +130,11 @@ MODULE_DEVICE_TABLE (usb, atp_table);
#define ATP_THRESHOLD 5
/* MacBook Pro (Geyser 3 & 4) initialization constants */
-#define ATP_GEYSER3_MODE_READ_REQUEST_ID 1
-#define ATP_GEYSER3_MODE_WRITE_REQUEST_ID 9
-#define ATP_GEYSER3_MODE_REQUEST_VALUE 0x300
-#define ATP_GEYSER3_MODE_REQUEST_INDEX 0
-#define ATP_GEYSER3_MODE_VENDOR_VALUE 0x04
+#define ATP_GEYSER_MODE_READ_REQUEST_ID 1
+#define ATP_GEYSER_MODE_WRITE_REQUEST_ID 9
+#define ATP_GEYSER_MODE_REQUEST_VALUE 0x300
+#define ATP_GEYSER_MODE_REQUEST_INDEX 0
+#define ATP_GEYSER_MODE_VENDOR_VALUE 0x04
/* Structure to hold all of our device specific stuff */
struct atp {
@@ -188,6 +188,14 @@ static int debug = 1;
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Activate debugging output");
+static inline int atp_is_old_fountain(struct atp *dev)
+{
+ u16 productId = le16_to_cpu(dev->udev->descriptor.idProduct);
+
+ return productId == FOUNTAIN_ANSI_PRODUCT_ID ||
+ productId == FOUNTAIN_ISO_PRODUCT_ID;
+}
+
/* Checks if the device a Geyser 2 (ANSI, ISO, JIS) */
static inline int atp_is_geyser_2(struct atp *dev)
{
@@ -211,52 +219,55 @@ static inline int atp_is_geyser_3(struct
}
/*
- * By default Geyser 3 device sends standard USB HID mouse
+ * By default newer Geyser devices send standard USB HID mouse
* packets (Report ID 2). This code changes device mode, so it
* sends raw sensor reports (Report ID 5).
*/
-static int atp_geyser3_init(struct usb_device *udev)
+static int atp_geyser_init(struct usb_device *udev)
{
char data[8];
int size;
size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
- ATP_GEYSER3_MODE_READ_REQUEST_ID,
+ ATP_GEYSER_MODE_READ_REQUEST_ID,
USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
- ATP_GEYSER3_MODE_REQUEST_VALUE,
- ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000);
+ ATP_GEYSER_MODE_REQUEST_VALUE,
+ ATP_GEYSER_MODE_REQUEST_INDEX, &data, 8, 5000);
if (size != 8) {
err("Could not do mode read request from device"
- " (Geyser 3 mode)");
+ " (Geyser Raw mode)");
return -EIO;
}
/* Apply the mode switch */
- data[0] = ATP_GEYSER3_MODE_VENDOR_VALUE;
+ data[0] = ATP_GEYSER_MODE_VENDOR_VALUE;
size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
- ATP_GEYSER3_MODE_WRITE_REQUEST_ID,
+ ATP_GEYSER_MODE_WRITE_REQUEST_ID,
USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
- ATP_GEYSER3_MODE_REQUEST_VALUE,
- ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000);
+ ATP_GEYSER_MODE_REQUEST_VALUE,
+ ATP_GEYSER_MODE_REQUEST_INDEX, &data, 8, 5000);
if (size != 8) {
err("Could not do mode write request to device"
- " (Geyser 3 mode)");
+ " (Geyser Raw mode)");
return -EIO;
}
return 0;
}
-/* Reinitialise the device if it's a geyser 3 */
+/*
+ * Reinitialise the device. This usually stops stream of empty packets
+ * coming form it.
+ */
static void atp_reinit(struct work_struct *work)
{
struct atp *dev = container_of(work, struct atp, work);
struct usb_device *udev = dev->udev;
dev->idlecount = 0;
- atp_geyser3_init(udev);
+ atp_geyser_init(udev);
}
static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact,
@@ -507,19 +518,23 @@ static void atp_complete(struct urb* urb
input_report_key(dev->input, BTN_LEFT, key);
input_sync(dev->input);
- /* Many Geysers will continue to send packets continually after
- the first touch unless reinitialised. Do so if it's been
- idle for a while in order to avoid waking the kernel up
- several hundred times a second */
-
- if (!x && !y && !key) {
- dev->idlecount++;
- if (dev->idlecount == 10) {
- dev->valid = 0;
- schedule_work(&dev->work);
- }
- } else
- dev->idlecount = 0;
+ /*
+ * Many Geysers will continue to send packets continually after
+ * the first touch unless reinitialised. Do so if it's been
+ * idle for a while in order to avoid waking the kernel up
+ * several hundred times a second. Re-initialization does not
+ * work on older versions of Fountain touchpads.
+ */
+ if (!atp_is_old_fountain(dev)) {
+ if (!x && !y && !key) {
+ dev->idlecount++;
+ if (dev->idlecount == 10) {
+ dev->valid = 0;
+ schedule_work(&dev->work);
+ }
+ } else
+ dev->idlecount = 0;
+ }
exit:
retval = usb_submit_urb(dev->urb, GFP_ATOMIC);
@@ -593,12 +608,12 @@ static int atp_probe(struct usb_interfac
else
dev->datalen = 81;
- if (atp_is_geyser_3(dev)) {
+ if (!atp_is_old_fountain(dev)) {
/* switch to raw sensor mode */
- if (atp_geyser3_init(udev))
+ if (atp_geyser_init(udev))
goto err_free_devs;
- printk("appletouch Geyser 3 inited.\n");
+ printk(KERN_INFO "appletouch: Geyser mode initialized.\n");
}
dev->urb = usb_alloc_urb(0, GFP_KERNEL);
^ permalink raw reply
* Unable to single step under ppc?
From: Wang, Baojun @ 2007-10-28 9:05 UTC (permalink / raw)
To: Nicholas Mc Guire, gdb, linuxppc-dev, linuxppc-embedded
In-Reply-To: <393557867.17823@lzu.edu.cn>
[-- Attachment #1: Type: text/plain, Size: 6067 bytes --]
On Saturday 27 October 2007 07:14:45, you wrote:
> >>> stw r0,INT_FRAME_SIZE+4(r1)
> >>>
> >>> stw r31,INT_FRAME_SIZE+128(r1)
> >>>
> >>> lwz r5,EVENTS_USER_ADDR_OFFSET(r4)
> >>> mr r31,r5 /* r31 to hold new_domain->events_user_addr */
> >>>
> >>> cmpwi r3,0
> >>> beq 1f
> >>>
> >>> mtctr r3
>
> ^^^^^ whats in R3 then ? Having 0 in r3 seems plain
> wrong !
>
> > hi, If they were not setup properly in tlb, then we should get a
> > DataTLBError/InstructionTLBError, I single stepped(stepi) to the `mtctr'
> > insn, then set a breakpoint at DataTLBError/InstructionTLBError, but both
> > of them were not triggered. Also, when I was at `mtctr', I could not
> > single step (use stepi) thus unable to debug the program.
>
> If you cant single step over this instruction then the address
> you are loading must have some problem.
>
> hofrat
Hi, I'm using bdi2000/gdb to debug a program which is like a module (the
excutable is loaded by myself), but I can not single step while executing
`bctrl', where ctr contains the valid address for the _start() function, it
is valid because I could use `x' or `disas' command to display the contents
of register `ctr', however when `bctrl' execute, I got unable to access
address xxx, what the problem could be? Could somebody give me some hints?
Thanks very much.
here is a sample debug session:
(gdb) b jump_xm_dom
Breakpoint 1 at 0xc001e694
(gdb) c
Continuing.
Breakpoint 1, 0xc001e694 in jump_xm_dom ()
Current language: auto; currently asm
(gdb) disas $pc $pc+32
Dump of assembler code from 0xc001e694 to 0xc001e6b4:
0xc001e694 <jump_xm_dom+16>: lwz r5,36(r4)
0xc001e698 <jump_xm_dom+20>: mr r31,r5
0xc001e69c <jump_xm_dom+24>: cmpwi r3,0
0xc001e6a0 <jump_xm_dom+28>: beq- 0xc001e6c0 <jump_xm_dom+60>
0xc001e6a4 <jump_xm_dom+32>: mfmsr r11
0xc001e6a8 <jump_xm_dom+36>: stw r11,240(r1) /* store old msr */
0xc001e6ac <jump_xm_dom+40>: andi. r11,r11,16384 /* drop privilege */
0xc001e6b0 <jump_xm_dom+44>: mtmsr r11
End of assembler dump.
(gdb) nexti
0xc001e698 in jump_xm_dom ()
(gdb)
0xc001e69c in jump_xm_dom ()
(gdb)
0xc001e6a0 in jump_xm_dom ()
(gdb)
0xc001e6a4 in jump_xm_dom ()
(gdb)
0xc001e6a8 in jump_xm_dom ()
(gdb)
0xc001e6ac in jump_xm_dom ()
(gdb)
0xc001e6b0 in jump_xm_dom ()
(gdb) disas $pc $pc+32
Dump of assembler code from 0xc001e6b0 to 0xc001e6d0:
0xc001e6b0 <jump_xm_dom+44>: mtmsr r11
0xc001e6b4 <jump_xm_dom+48>: mtctr r3 /* r3 contains _start() address */
0xc001e6b8 <jump_xm_dom+52>: bctrl
0xc001e6bc <jump_xm_dom+56>: li r3,0
0xc001e6c0 <jump_xm_dom+60>: lwz r31,320(r1) /* restore r31 */
0xc001e6c4 <jump_xm_dom+64>: lwz r11,240(r1) /* restore msr */
0xc001e6c8 <jump_xm_dom+68>: mtmsr r11
0xc001e6cc <jump_xm_dom+72>: lwz r0,196(r1)
End of assembler dump.
(gdb) nexti
0xc001e6b4 in jump_xm_dom ()
(gdb)
0xc001e6b8 in jump_xm_dom ()
(gdb) info registers
r0 0xc001b908 3221338376
r1 0xd1072e60 3506908768
r2 0xc0549b70 3226770288
r3 0x10000094 268435604
r4 0xd106c000 3506880512
r5 0x2000000 33554432
r6 0xc014033c 3222537020
r7 0xc0240000 3223584768
r8 0x20000 131072
r9 0xc02c0000 3224109056
r10 0x0 0
r11 0x0 0
r12 0x0 0
r13 0x0 0
r14 0x0 0
r15 0x0 0
r16 0x0 0
r17 0x0 0
r18 0x0 0
r19 0x0 0
r20 0x0 0
r21 0x0 0
r22 0x0 0
r23 0x0 0
r24 0x0 0
r25 0x0 0
r26 0x0 0
r27 0x0 0
r28 0x0 0
r29 0xc02c0000 3224109056
r30 0x0 0
r31 0x2000000 33554432
pc 0xc001e6b8 3221350072
cr 0x28000022 671088674
lr 0xc001b908 3221338376
---Type <return> to continue, or q <return> to quit---
ctr 0x10000094 268435604
xer 0x0 0
(gdb) x/32b $r3
0x10000094: 0x94 0x21 0xff 0x40 0x7c 0x08 0x02 0xa6
0x1000009c: 0x90 0x01 0x00 0xc4 0x7f 0xe3 0xfb 0x78
0x100000a4: 0x3d 0x20 0x10 0x01 0x90 0x69 0x07 0xa0
0x100000ac: 0x48 0x00 0x02 0x55 0x80 0x01 0x00 0xc4
(gdb) disas $r3 $r3+32
Dump of assembler code from 0x10000094 to 0x100000b4:
0x10000094: stwu r1,-192(r1)
0x10000098: mflr r0
0x1000009c: stw r0,196(r1)
0x100000a0: mr r3,r31
0x100000a4: lis r9,4097
0x100000a8: stw r3,1952(r9)
0x100000ac: bl 0x10000300
0x100000b0: lwz r0,196(r1)
End of assembler dump.
(gdb) nexti
Cannot access memory at address 0xd1072e60 /* this is the SP address */
(gdb)
0x10000094 in ?? ()
Cannot access memory at address 0x10000094 /* r3 or ctr address */
(gdb)
the address 0x10000094 is accessable before `bctrl' we could see.. Is it
because $r3 is just contain a address just for data access not instruction
access? the page prot is: _PAGE_PRESENT | _PAGE_RW | _PAGE_HWEXEC |
_PAGE_WRENABLE | _PAGE_USER, I think it's ready for exec..
Regards,
Wang
--
Wang, Baojun Lanzhou University
Distributed & Embedded System Lab http://dslab.lzu.edu.cn
School of Information Science and Engeneering wangbj@lzu.edu.cn
Tianshui South Road 222. Lanzhou 730000 .P.R.China
Tel:+86-931-8912025 Fax:+86-931-8912022
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ 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