* Re: [PATCH 2/2] ftrace: support for PowerPC
From: Steven Rostedt @ 2008-05-15 13:38 UTC (permalink / raw)
To: David Miller
Cc: proski, a.p.zijlstra, pq, linux-kernel, srostedt, linuxppc-dev,
sandmann, paulus, mingo
In-Reply-To: <20080514.222857.246967279.davem@davemloft.net>
On Wed, 14 May 2008, David Miller wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
> Date: Wed, 14 May 2008 23:49:44 -0400
>
> > +#ifdef CONFIG_FTRACE
> > +#ifdef CONFIG_DYNAMIC_FTRACE
> > +_GLOBAL(mcount)
> > +_GLOBAL(_mcount)
> > + stwu r1,-48(r1)
> > + stw r3, 12(r1)
> > + stw r4, 16(r1)
> > + stw r5, 20(r1)
> > + stw r6, 24(r1)
> > + mflr r3
> > + stw r7, 28(r1)
> > + mfcr r5
> > + stw r8, 32(r1)
> > + stw r9, 36(r1)
> > + stw r10,40(r1)
> > + stw r3, 44(r1)
> > + stw r5, 8(r1)
>
> Yikes, that's really expensive.
Well, at least with dynamic ftrace, it's only expensive when tracing is
enabled.
>
> Can't you do a tail call and let the function you end
> up calling do all the callee-saved register pops onto
> the stack?
Not sure PPC has such a thing. I'm only a hobby PPC hacker (did it full
time in another life). If there is such a way, I'll be happy to Ack any
patches.
>
> That's what I did on sparc.
>
So that was your secret! ;-)
-- Steve
^ permalink raw reply
* [PATCHv2] [POWERPC] Add i2c pins to dts and board setup
From: Jochen Friedrich @ 2008-05-15 14:44 UTC (permalink / raw)
To: Jean Delvare
Cc: Kernel, Linux, linuxppc-dev list, Linux I2C, Scott Wood,
Andrew Morton
Initialize I2C pins on boards with CPM1/CPM2 controllers.
Signed-off-by: Jochen Friedrich <jochen@scram.de>
---
Documentation/powerpc/booting-without-of.txt | 39 ++++++++++++++++++++++++++
arch/powerpc/boot/dts/mpc8272ads.dts | 12 ++++++++
arch/powerpc/boot/dts/mpc866ads.dts | 12 ++++++++
arch/powerpc/boot/dts/mpc885ads.dts | 12 ++++++++
arch/powerpc/platforms/82xx/mpc8272_ads.c | 4 ++
arch/powerpc/platforms/8xx/mpc86xads_setup.c | 4 ++
arch/powerpc/platforms/8xx/mpc885ads_setup.c | 3 ++
7 files changed, 86 insertions(+), 0 deletions(-)
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index 1d2a772..b95f03a 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -2132,6 +2132,45 @@ platforms are moved over to use the flattened-device-tree model.
};
};
+ ix) I2C
+
+ The I2C controller is expressed as a bus under the CPM node.
+
+ Properties:
+ - compatible : "fsl,cpm1-i2c", "fsl,cpm2-i2c", "fsl,cpm-i2c"
+ - reg : On CPM2 devices, the second resource doesn't specify
+ the I2C Parameter RAM itself, but the I2C_BASE field
+ of the CPM2 Parameter RAM (typically 0x8afc 0x2).
+ - #address-cells : Should be one. The cell is the i2c device address with
+ the r/w bit set to zero.
+ - #size-cells : Should be zero.
+ - linux,i2c-index : Can be used to hard code an i2c bus nummer.
+ - linux,i2c-class : Can be used to override the i2c class. The class is used
+ by old style i2c device drivers to find a bus in a
+ specific context like system management, video or sound.
+ By default, I2C_CLASS_HWMON (1) is being used. The
+ definition of the classes can be found in
+ include/i2c/i2c.h
+
+ Example, based on mpc823:
+
+ i2c@860 {
+ compatible = "fsl,mpc823-i2c",
+ "fsl,cpm1-i2c",
+ "fsl,cpm-i2c";
+ reg = <0x860 0x20 0x3c80 0x30>;
+ interrupts = <16>;
+ interrupt-parent = <&CPM_PIC>;
+ fsl,cpm-command = <0x10>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@68 {
+ compatible = "dallas,ds1307";
+ reg = <0x68>;
+ };
+ };
+
m) Chipselect/Local Bus
Properties:
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
index 46e2da3..8ed1d22 100644
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -217,6 +217,18 @@
linux,network-index = <1>;
fsl,cpm-command = <0x16200300>;
};
+
+ i2c@11860 {
+ compatible = "fsl,mpc8272-i2c",
+ "fsl,cpm2-i2c",
+ "fsl,cpm-i2c";
+ reg = <0x11860 0x20 0x8afc 0x2>;
+ interrupts = <1 8>;
+ interrupt-parent = <&PIC>;
+ fsl,cpm-command = <0x29600000>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
};
PIC: interrupt-controller@10c00 {
diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts
index 765e43c..50565b5 100644
--- a/arch/powerpc/boot/dts/mpc866ads.dts
+++ b/arch/powerpc/boot/dts/mpc866ads.dts
@@ -171,6 +171,18 @@
fsl,cpm-command = <0000>;
linux,network-index = <1>;
};
+
+ i2c@860 {
+ compatible = "fsl,mpc866-i2c",
+ "fsl,cpm1-i2c",
+ "fsl,cpm-i2c";
+ reg = <0x860 0x20 0x3c80 0x30>;
+ interrupts = <16>;
+ interrupt-parent = <&CPM_PIC>;
+ fsl,cpm-command = <0x10>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
};
};
diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts
index 9895043..d76331a 100644
--- a/arch/powerpc/boot/dts/mpc885ads.dts
+++ b/arch/powerpc/boot/dts/mpc885ads.dts
@@ -215,6 +215,18 @@
fsl,cpm-command = <0x80>;
linux,network-index = <2>;
};
+
+ i2c@860 {
+ compatible = "fsl,mpc885-i2c",
+ "fsl,cpm1-i2c",
+ "fsl,cpm-i2c";
+ reg = <0x860 0x20 0x3c80 0x30>;
+ interrupts = <16>;
+ interrupt-parent = <&CPM_PIC>;
+ fsl,cpm-command = <0x10>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
};
};
diff --git a/arch/powerpc/platforms/82xx/mpc8272_ads.c b/arch/powerpc/platforms/82xx/mpc8272_ads.c
index 7d30187..8054c68 100644
--- a/arch/powerpc/platforms/82xx/mpc8272_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc8272_ads.c
@@ -96,6 +96,10 @@ static struct cpm_pin mpc8272_ads_pins[] = {
{1, 31, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
{2, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
{2, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+
+ /* I2C */
+ {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN},
+ {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN},
};
static void __init init_ioports(void)
diff --git a/arch/powerpc/platforms/8xx/mpc86xads_setup.c b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
index c028a5b..caaec29 100644
--- a/arch/powerpc/platforms/8xx/mpc86xads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc86xads_setup.c
@@ -65,6 +65,10 @@ static struct cpm_pin mpc866ads_pins[] = {
{CPM_PORTD, 13, CPM_PIN_OUTPUT},
{CPM_PORTD, 14, CPM_PIN_OUTPUT},
{CPM_PORTD, 15, CPM_PIN_OUTPUT},
+
+ /* I2C */
+ {CPM_PORTB, 26, CPM_PIN_INPUT | CPM_PIN_OPENDRAIN},
+ {CPM_PORTB, 27, CPM_PIN_INPUT | CPM_PIN_OPENDRAIN},
};
static void __init init_ioports(void)
diff --git a/arch/powerpc/platforms/8xx/mpc885ads_setup.c b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
index 6e7ded0..45ed6cd 100644
--- a/arch/powerpc/platforms/8xx/mpc885ads_setup.c
+++ b/arch/powerpc/platforms/8xx/mpc885ads_setup.c
@@ -158,6 +158,9 @@ static struct cpm_pin mpc885ads_pins[] = {
{CPM_PORTE, 28, CPM_PIN_OUTPUT},
{CPM_PORTE, 29, CPM_PIN_OUTPUT},
#endif
+ /* I2C */
+ {CPM_PORTB, 26, CPM_PIN_INPUT | CPM_PIN_OPENDRAIN},
+ {CPM_PORTB, 27, CPM_PIN_INPUT | CPM_PIN_OPENDRAIN},
};
static void __init init_ioports(void)
--
1.5.5.1
^ permalink raw reply related
* [PATCH] 4xx: Fix PCI mem in rainier DTS
From: Josh Boyer @ 2008-05-15 14:41 UTC (permalink / raw)
To: linuxppc-dev
This fixes the PCI node in the Rainier to match the spec from AMCC. A
similar fix was done for 440EPx, which shares the same values as 440GRx.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
---
arch/powerpc/boot/dts/rainier.dts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- linux-2.6.orig/arch/powerpc/boot/dts/rainier.dts
+++ linux-2.6/arch/powerpc/boot/dts/rainier.dts
@@ -328,8 +328,9 @@
* later cannot be changed. Chip supports a second
* IO range but we don't use it for now
*/
- ranges = <02000000 0 80000000 1 80000000 0 10000000
- 01000000 0 00000000 1 e8000000 0 00100000>;
+ ranges = <02000000 0 80000000 1 80000000 0 40000000
+ 01000000 0 00000000 1 e8000000 0 00010000
+ 01000000 0 00000000 1 e8800000 0 03800000>;
/* Inbound 2GB range starting at 0 */
dma-ranges = <42000000 0 0 0 0 0 80000000>;
^ permalink raw reply
* [PATCH] 4xx: Workaround for CHIP_11 Errata
From: Josh Boyer @ 2008-05-15 14:43 UTC (permalink / raw)
To: linuxppc-dev
The PowerPC 440EP, 440GR, 440EPx, and 440GRx chips have an issue that
causes the PLB3-to-PLB4 bridge to wait indefinitely for transaction
requests that cross the end-of-memory-range boundary. Since the DDR
controller only returns the valid portion of a read request, the bridge
will prevent other PLB masters from completing their transactions.
This implements the recommended workaround for this errata for chips that
use older versions of firmware that do not already handle it. The last
4KiB of memory are hidden from the kernel to prevent the problem
transactions from occurring.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
---
arch/powerpc/boot/4xx.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
--- linux-2.6.orig/arch/powerpc/boot/4xx.c
+++ linux-2.6/arch/powerpc/boot/4xx.c
@@ -21,6 +21,25 @@
#include "reg.h"
#include "dcr.h"
+static unsigned long chip_11_errata(unsigned long memsize)
+{
+ unsigned long pvr;
+
+ pvr = mfpvr();
+
+ switch (pvr & 0xf0000ff0) {
+ case 0x40000850:
+ case 0x400008d0:
+ case 0x200008d0:
+ memsize -= 4096;
+ break;
+ default:
+ break;
+ }
+
+ return memsize;
+}
+
/* Read the 4xx SDRAM controller to get size of system memory. */
void ibm4xx_sdram_fixup_memsize(void)
{
@@ -34,6 +53,7 @@ void ibm4xx_sdram_fixup_memsize(void)
memsize += SDRAM_CONFIG_BANK_SIZE(bank_config);
}
+ memsize = chip_11_errata(memsize);
dt_fixup_memory(0, memsize);
}
@@ -199,6 +219,7 @@ void ibm4xx_denali_fixup_memsize(void)
bank = 4; /* 4 banks */
memsize = cs * (1 << (col+row)) * bank * dpath;
+ memsize = chip_11_errata(memsize);
dt_fixup_memory(0, memsize);
}
^ permalink raw reply
* Re: [patch 1/4] powerpc: fix for OProfile callgraph for Power 64 bit user apps
From: Carl Love @ 2008-05-15 14:50 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, akpm, carll
In-Reply-To: <18475.46317.936165.577835@cargo.ozlabs.ibm.com>
On Thu, 2008-05-15 at 13:58 +1000, Paul Mackerras wrote:
> Michael Ellerman writes:
>
> > __copy_from_user_inatomic() accepts any value for n, it just has a
> > special case for 1, 2, 4 and 8 - but it should still work for other
> > values.
>
> There is a bug in __copy_from_user_inatomic that
>
> http://patchwork.ozlabs.org/linuxppc/patch?id=18418
>
> fixes, and I'm about to send that Linus-wards.
>
> Carl, to what extent does that fix eliminate the need for the changes
> in your patch?
>
> Paul.
Paul:
I will have to apply the above mentioned patch to see if it fixes the
issue. What I found was when the original code tried to copy three
unsigned long into stack_frame[3], i.e. 24 bytes my system consistently
failed. The comment about 48 bytes is a note that is all that is
guaranteed to be there according to the API. I found by restricting the
copy to the values in the case statement, things worked.
Carl Love
^ permalink raw reply
* Re: dead network on JS21 with tg3 driver after flowcontrol changes
From: Michael Chan @ 2008-05-15 15:10 UTC (permalink / raw)
To: Olaf Hering, Matthew Carlson; +Cc: linuxppc-dev, netdev
In-Reply-To: <20080515121340.GA23033@aepfle.de>
Olaf Hering wrote:
> Any ideas how to fix this?
> What info do you need from the system?
Are you using eth0 or eth1? The dmesg below shows that
link came up on eth1 and IP address from DHCP was received.
> Sending DHCP requests .<6>tg3: eth1: Link is up at 1000 Mbps,=20
> full duplex.
> tg3: eth1: Flow control is off for TX and off for RX.
> ., OK
> IP-Config: Got DHCP answer from 10.10.4.97, my address is 10.10.1.110
> IP-Config: Complete:
If you're using eth0 and link did not come up, please provide
mii-tool -vvv eth0.
Thanks.
^ permalink raw reply
* Re: [PATCH] 4xx: Workaround for CHIP_11 Errata
From: Stefan Roese @ 2008-05-15 15:16 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20080515094346.3338e1f3@zod.rchland.ibm.com>
On Thursday 15 May 2008, Josh Boyer wrote:
> The PowerPC 440EP, 440GR, 440EPx, and 440GRx chips have an issue that
> causes the PLB3-to-PLB4 bridge to wait indefinitely for transaction
> requests that cross the end-of-memory-range boundary. Since the DDR
> controller only returns the valid portion of a read request, the bridge
> will prevent other PLB masters from completing their transactions.
>
> This implements the recommended workaround for this errata for chips that
> use older versions of firmware that do not already handle it. The last
> 4KiB of memory are hidden from the kernel to prevent the problem
> transactions from occurring.
>
> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Acked-by: Stefan Roese <sr@denx.de>
Thanks.
Best regards,
Stefan
^ permalink raw reply
* Re: [PATCH] Updated: Reworked Cell OProfile: SPU mutex lock fix
From: Arnd Bergmann @ 2008-05-15 15:39 UTC (permalink / raw)
To: Carl Love; +Cc: linuxppc-dev, oprofile-list, cbe-oss-dev, linux-kernel
In-Reply-To: <1209652994.17842.1.camel@carll-linux-desktop>
On Thursday 01 May 2008, Carl Love wrote:
> Finally, this patch backs out the changes previously added to the
> oprofile generic code for handling the architecture specific
> ops.sync_start and ops.sync_stop that allowed the architecture
> to skip the per CPU buffer creation.
Thanks for your patch, it looks a lot better than your previous version.
It would be good to have an oprofile person look into the changes
to the common code though.
Just a few more comments/questions this time:
> -static DEFINE_SPINLOCK(buffer_lock);
> +static DEFINE_SPINLOCK(add_value_lock);
> static DEFINE_SPINLOCK(cache_lock);
> static int num_spu_nodes;
> int spu_prof_num_nodes;
> int last_guard_val[MAX_NUMNODES * 8];
> +static int spu_ctx_sw_seen[MAX_NUMNODES * 8];
>
> /* Container for caching information about an active SPU task. */
> struct cached_info {
I noticed now that you are indexing arrays by SPU number. This is not
a good idea, because you make assumptions about the system that may
not be true. Better pass around 'struct spu' pointers and put those
values in there if you need them. Then again, the last_guard_val looks
like you should really store that information in the context instead
of the physical SPU, but that is something else to work on.
Let's leave this one as it is for now and fix the current bug at hand,
but please remember to fix the assumptions in the code later.
> @@ -289,6 +290,7 @@ static int process_context_switch(struct
> int retval;
> unsigned int offset = 0;
> unsigned long spu_cookie = 0, app_dcookie;
> + int cpu_buf;
>
> retval = prepare_cached_spu_info(spu, objectId);
> if (retval)
> @@ -303,17 +305,28 @@ static int process_context_switch(struct
> goto out;
> }
>
> - /* Record context info in event buffer */
> - spin_lock_irqsave(&buffer_lock, flags);
> - add_event_entry(ESCAPE_CODE);
> - add_event_entry(SPU_CTX_SWITCH_CODE);
> - add_event_entry(spu->number);
> - add_event_entry(spu->pid);
> - add_event_entry(spu->tgid);
> - add_event_entry(app_dcookie);
> - add_event_entry(spu_cookie);
> - add_event_entry(offset);
> - spin_unlock_irqrestore(&buffer_lock, flags);
> + /* Record context info in event buffer. Note, there are 4x more
> + * SPUs then CPUs. Map the SPU events/data for a given SPU to
> + * the same CPU buffer. Need to ensure the cntxt switch data and
> + * samples stay in order.
> + */
> + cpu_buf = spu->number >> 2;
The ratio of CPUs versus SPUs is anything but fixed, and the CPU numbers
may not start at 0. If you have a hypervisor (think PS3), or you are
running a non-SMP kernel, this is practically always wrong.
Please use get_cpu()/put_cpu() to read the current CPU number instead.
This one needs to be fixed now.
> + spin_lock_irqsave(&add_value_lock, flags);
> + oprofile_add_value(ESCAPE_CODE, cpu_buf);
> + oprofile_add_value(SPU_CTX_SWITCH_CODE, cpu_buf);
> + oprofile_add_value(spu->number, cpu_buf);
> + oprofile_add_value(spu->pid, cpu_buf);
> + oprofile_add_value(spu->tgid, cpu_buf);
> + oprofile_add_value(app_dcookie, cpu_buf);
> + oprofile_add_value(spu_cookie, cpu_buf);
> + oprofile_add_value(offset, cpu_buf);
> +
> + /* Set flag to indicate SPU PC data can now be written out. If
> + * the SPU program counter data is seen before an SPU context
> + * record is seen, the postprocessing will fail.
> + */
> + spu_ctx_sw_seen[spu->number] = 1;
> + spin_unlock_irqrestore(&add_value_lock, flags);
> smp_wmb(); /* insure spu event buffer updates are written */
> /* don't want entries intermingled... */
> out:
How does the spinlock protect you from racing against other values added
for the same CPU?
I'm not sure if this patch can still fix the original bug that you
are trying to solve, although it will certainly be harder to trigger.
If you are using the get_cpu() number for passing down the samples,
it is probably safe because you then can't add anything else to the
same buffer from a different CPU or from an interrupt, but I don't
understand enough about oprofile to be sure about that.
> - spin_lock_irqsave(&buffer_lock, flags);
> - add_event_entry(ESCAPE_CODE);
> - add_event_entry(SPU_PROFILING_CODE);
> - add_event_entry(num_spu_nodes);
> - spin_unlock_irqrestore(&buffer_lock, flags);
> + /* The SPU_PROFILING_CODE escape sequence must proceed
> + * the SPU context switch info.
> + */
> + for_each_online_cpu(cpu) {
> + oprofile_add_value(ESCAPE_CODE, cpu);
> + oprofile_add_value(SPU_PROFILING_CODE, cpu);
> + oprofile_add_value((unsigned long int)
> + num_spu_nodes, cpu);
> + }
>
You are no longer holding a lock while adding the events, which
may be correct as long as no switch_events come in, but it's
still inconsistent. Do you mind just adding the spinlock here
as well?
> @@ -452,31 +464,38 @@ void spu_sync_buffer(int spu_num, unsign
> break;
> }
>
> - add_event_entry(file_offset | spu_num_shifted);
> + /* We must ensure that the SPU context switch has been written
> + * out before samples for the SPU. Otherwise, the SPU context
> + * information is not available and the postprocessing of the
> + * SPU PC will fail with no available anonymous map information.
> + */
> + if (spu_ctx_sw_seen[spu_num])
> + oprofile_add_value((file_offset | spu_num_shifted),
> + (spu_num >> 2));
Again, I think this should just be added on the local CPU, as 'spu_num >> 2'
may not be a valid CPU number.
Arnd <><
^ permalink raw reply
* Re: dead network on JS21 with tg3 driver after flowcontrol changes
From: Olaf Hering @ 2008-05-15 15:49 UTC (permalink / raw)
To: Michael Chan; +Cc: linuxppc-dev, Matthew Carlson, netdev
In-Reply-To: <1551EAE59135BE47B544934E30FC4FC002AABCEE@nt-irva-0751.brcm.ad.broadcom.com>
On Thu, May 15, Michael Chan wrote:
> Olaf Hering wrote:
>
> > Any ideas how to fix this?
> > What info do you need from the system?
>
> Are you using eth0 or eth1? The dmesg below shows that
> link came up on eth1 and IP address from DHCP was received.
I'm using eth1.
The log was done with the patch reverted.
^ permalink raw reply
* Re: [RFC PATCH 0/3] Board-specific PCI fixups [was: Re: [PATCH 2/2] [POWERPC] 86xx: mpc8610_hpcd: add support for ULI RTC]
From: Anton Vorontsov @ 2008-05-15 16:20 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <20080508142005.GA6749@polina.dev.rtsoft.ru>
On Thu, May 08, 2008 at 06:20:05PM +0400, Anton Vorontsov wrote:
> On Mon, May 05, 2008 at 02:11:30PM -0500, Kumar Gala wrote:
> >
> > On May 5, 2008, at 1:56 PM, Anton Vorontsov wrote:
> >
> >> The ULI "Super South Bridge" contains ISA bridge to the legacy
> >> devices, such as Super IO mouse/keyboard/floppy disk controllers,
> >> parallel port, i8259 interrupt controller and so on.
> >>
> >> On the MPC8610HPCD, i8259 seems to be disabled (mpc8610_hpcd.c
> >> confirms this), and other peripherals are not traced out.
> >> So we use only RTC.
> >>
> >> This patch also adds ULI quirk to make RTC actually work (this
> >> quirk differs a bit from the one in the fsl_uli1575.c).
> >
> > Can we just one quick for both?
>
> Probably yes, but fsl_uli1575 needs some other changes for this.
>
> This series fully tested on MPC8610HPCD, and build-tested for
> MPC85xxDS and MPC8641HPCN.
Are these patches ideal? No comments so far... ;-)
Could we then apply this to the powerpc-next for proper testing?
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply
* Re: dead network on JS21 with tg3 driver after flowcontrol changes
From: Michael Chan @ 2008-05-15 17:37 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev, Matthew Carlson, netdev
In-Reply-To: <20080515154948.GA23647@aepfle.de>
On Thu, 2008-05-15 at 17:49 +0200, Olaf Hering wrote:
> On Thu, May 15, Michael Chan wrote:
>
> > Olaf Hering wrote:
> >
> > > Any ideas how to fix this?
> > > What info do you need from the system?
> >
> > Are you using eth0 or eth1? The dmesg below shows that
> > link came up on eth1 and IP address from DHCP was received.
>
> I'm using eth1.
> The log was done with the patch reverted.
>
In that case, please re-apply the patch and provide mii-tool -vvv eth1.
^ permalink raw reply
* Using GPIO
From: Guillaume Dargaud @ 2008-05-15 16:35 UTC (permalink / raw)
To: linuxppc-dev
Hello all,
I'm trying to use the Xilinx GPIO from a user program.
Since I haven't managed to compile their example (simon.c is given without a
makefile), I wanted to try using /dev/gpio...
So I added
/dev/gpio0 c 666 0 0 10 185 - - -
to device_table.txt when I generated my root filesystem with buildroot, but
apparently this leads nowhere as it's not visible in /proc/devices.
Is there some example or tutorial on how to use CONFIG_XILINX_GPIO ? Either
as a device or as API calls...
--
Guillaume Dargaud
http://www.gdargaud.net/
^ permalink raw reply
* Re: [PATCH 2/2] ftrace: support for PowerPC
From: Scott Wood @ 2008-05-15 16:48 UTC (permalink / raw)
To: David Miller
Cc: proski, a.p.zijlstra, sandmann, pq, linux-kernel, rostedt,
linuxppc-dev, srostedt, paulus, mingo
In-Reply-To: <20080514.222857.246967279.davem@davemloft.net>
On Wed, May 14, 2008 at 10:28:57PM -0700, David Miller wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
> Date: Wed, 14 May 2008 23:49:44 -0400
>
> > +#ifdef CONFIG_FTRACE
> > +#ifdef CONFIG_DYNAMIC_FTRACE
> > +_GLOBAL(mcount)
> > +_GLOBAL(_mcount)
> > + stwu r1,-48(r1)
> > + stw r3, 12(r1)
> > + stw r4, 16(r1)
> > + stw r5, 20(r1)
> > + stw r6, 24(r1)
> > + mflr r3
> > + stw r7, 28(r1)
> > + mfcr r5
> > + stw r8, 32(r1)
> > + stw r9, 36(r1)
> > + stw r10,40(r1)
> > + stw r3, 44(r1)
> > + stw r5, 8(r1)
>
> Yikes, that's really expensive.
>
> Can't you do a tail call and let the function you end
> up calling do all the callee-saved register pops onto
> the stack?
The PPC32 ABI seems to (unfortunately) suggest that, with mcount, all
registers are callee-saved (except for the modifiable-during-function-linkage
registers like r0, r11, and r12) -- so mcount has to save the registers that
the callee won't (because they're normally volatile).
-Scott
^ permalink raw reply
* [PATCH 0/8 v3] mpc83xx_wdt rework, support for mpc8610 and mpc8xx
From: Anton Vorontsov @ 2008-05-15 16:52 UTC (permalink / raw)
To: Kumar Gala, Wim Van Sebroeck
Cc: Stephen Rothwell, linuxppc-dev, Chen Gong, Scott Wood, Timur Tabi
Hi all,
Once again thanks for the previous review, updated series follows.
Changes since v2:
- New patch to fix current driver's checkpatch issues;
- New patch supporting MPC8xx watchdogs (ok to drop until tested);
- Removed MODULE_ALIAS("platform:mpc83xx_wdt"), since this driver is no
longer on the platform bus;
- When renaming the driver also mention what kind of CPUs we support.
Also give a pointer for BookE watchdog driver. Though BookE users will
not see the MPC8xxx driver at all, because we're explicitly listing the
CPU families in "depends on". But this tip might be useful for
developers.
- Scott Wood noticed that we don't need device_type anymore. I thought
that OpenFirmware defines this type, but google didn't prove that.
So I just removed the device_type.
Changes since v1:
- Scott Wood asked for mpc83xx_wdt on multiplatform kernels. Done via
OF platform driver;
- Kumar Gala asked for mpc83xx_wdt -> mpc8xxx_wdt rename. Done in two
steps;
- Segher Boessenkool noticed a negligence in the wdt device tree node.
Fixed by removing mpc83xx_wdt compatible entry.
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply
* [PATCH 1/8] [WATCHDOG] mpc83xx_wdt: fix checkpatch issues
From: Anton Vorontsov @ 2008-05-15 16:53 UTC (permalink / raw)
To: Kumar Gala, Wim Van Sebroeck
Cc: Stephen Rothwell, linuxppc-dev, Chen Gong, Scott Wood, Timur Tabi
In-Reply-To: <20080515165250.GA30738@polina.dev.rtsoft.ru>
Quite tired of these warnings ;-), checkpatch spitting them when
seeing the rename patch.
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
#25: FILE: watchdog/mpc83xx_wdt.c:25:
+#include <asm/io.h>
WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
#26: FILE: watchdog/mpc83xx_wdt.c:26:
+#include <asm/uaccess.h>
WARNING: line over 80 characters
#45: FILE: watchdog/mpc83xx_wdt.c:45:
+MODULE_PARM_DESC(timeout, "Watchdog timeout in ticks. (0<timeout<65536, default=65535");
WARNING: line over 80 characters
#49: FILE: watchdog/mpc83xx_wdt.c:49:
+MODULE_PARM_DESC(reset, "Watchdog Interrupt/Reset Mode. 0 = interrupt, 1 = reset");
WARNING: space prohibited between function name and open parenthesis '('
#164: FILE: watchdog/mpc83xx_wdt.c:164:
+ wd_base = ioremap(r->start, sizeof (struct mpc83xx_wdt));
total: 0 errors, 5 warnings, 230 lines checked
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
drivers/watchdog/mpc83xx_wdt.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/watchdog/mpc83xx_wdt.c b/drivers/watchdog/mpc83xx_wdt.c
index b16c5cd..6905712 100644
--- a/drivers/watchdog/mpc83xx_wdt.c
+++ b/drivers/watchdog/mpc83xx_wdt.c
@@ -22,8 +22,8 @@
#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/watchdog.h>
-#include <asm/io.h>
-#include <asm/uaccess.h>
+#include <linux/io.h>
+#include <linux/uaccess.h>
struct mpc83xx_wdt {
__be32 res0;
@@ -42,11 +42,13 @@ static struct mpc83xx_wdt __iomem *wd_base;
static u16 timeout = 0xffff;
module_param(timeout, ushort, 0);
-MODULE_PARM_DESC(timeout, "Watchdog timeout in ticks. (0<timeout<65536, default=65535");
+MODULE_PARM_DESC(timeout, "Watchdog timeout in ticks. "
+ "(0<timeout<65536, default=65535");
static int reset = 1;
module_param(reset, bool, 0);
-MODULE_PARM_DESC(reset, "Watchdog Interrupt/Reset Mode. 0 = interrupt, 1 = reset");
+MODULE_PARM_DESC(reset, "Watchdog Interrupt/Reset Mode. "
+ "0 = interrupt, 1 = reset");
/*
* We always prescale, but if someone really doesn't want to they can set this
@@ -161,7 +163,7 @@ static int __devinit mpc83xx_wdt_probe(struct platform_device *dev)
goto err_out;
}
- wd_base = ioremap(r->start, sizeof (struct mpc83xx_wdt));
+ wd_base = ioremap(r->start, sizeof(struct mpc83xx_wdt));
if (wd_base == NULL) {
ret = -ENOMEM;
--
1.5.5.1
^ permalink raw reply related
* [PATCH 2/8] [WATCHDOG] mpc83xx_wdt: convert to the OF platform driver
From: Anton Vorontsov @ 2008-05-15 16:53 UTC (permalink / raw)
To: Kumar Gala, Wim Van Sebroeck
Cc: Stephen Rothwell, linuxppc-dev, Chen Gong, Scott Wood, Timur Tabi
In-Reply-To: <20080515165250.GA30738@polina.dev.rtsoft.ru>
This patch simply converts mpc83xx_wdt to the OF platform driver so we
can directly work with the device tree without passing various stuff
through platform data.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
drivers/watchdog/mpc83xx_wdt.c | 62 +++++++++++++++++++--------------------
1 files changed, 30 insertions(+), 32 deletions(-)
diff --git a/drivers/watchdog/mpc83xx_wdt.c b/drivers/watchdog/mpc83xx_wdt.c
index 6905712..127d85e 100644
--- a/drivers/watchdog/mpc83xx_wdt.c
+++ b/drivers/watchdog/mpc83xx_wdt.c
@@ -19,11 +19,12 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/miscdevice.h>
-#include <linux/platform_device.h>
+#include <linux/of_platform.h>
#include <linux/module.h>
#include <linux/watchdog.h>
#include <linux/io.h>
#include <linux/uaccess.h>
+#include <sysdev/fsl_soc.h>
struct mpc83xx_wdt {
__be32 res0;
@@ -149,53 +150,42 @@ static struct miscdevice mpc83xx_wdt_miscdev = {
.fops = &mpc83xx_wdt_fops,
};
-static int __devinit mpc83xx_wdt_probe(struct platform_device *dev)
+static int __devinit mpc83xx_wdt_probe(struct of_device *ofdev,
+ const struct of_device_id *match)
{
- struct resource *r;
int ret;
- unsigned int *freq = dev->dev.platform_data;
+ u32 freq = fsl_get_sys_freq();
- /* get a pointer to the register memory */
- r = platform_get_resource(dev, IORESOURCE_MEM, 0);
+ if (!freq || freq == -1)
+ return -EINVAL;
- if (!r) {
- ret = -ENODEV;
- goto err_out;
- }
-
- wd_base = ioremap(r->start, sizeof(struct mpc83xx_wdt));
-
- if (wd_base == NULL) {
- ret = -ENOMEM;
- goto err_out;
- }
+ wd_base = of_iomap(ofdev->node, 0);
+ if (!wd_base)
+ return -ENOMEM;
ret = misc_register(&mpc83xx_wdt_miscdev);
if (ret) {
- printk(KERN_ERR "cannot register miscdev on minor=%d "
- "(err=%d)\n",
- WATCHDOG_MINOR, ret);
+ pr_err("cannot register miscdev on minor=%d (err=%d)\n",
+ WATCHDOG_MINOR, ret);
goto err_unmap;
}
/* Calculate the timeout in seconds */
if (prescale)
- timeout_sec = (timeout * 0x10000) / (*freq);
+ timeout_sec = (timeout * 0x10000) / freq;
else
- timeout_sec = timeout / (*freq);
+ timeout_sec = timeout / freq;
- printk(KERN_INFO "WDT driver for MPC83xx initialized. "
- "mode:%s timeout=%d (%d seconds)\n",
- reset ? "reset":"interrupt", timeout, timeout_sec);
+ pr_info("WDT driver for MPC83xx initialized. mode:%s timeout=%d "
+ "(%d seconds)\n", reset ? "reset" : "interrupt", timeout,
+ timeout_sec);
return 0;
-
err_unmap:
iounmap(wd_base);
-err_out:
return ret;
}
-static int __devexit mpc83xx_wdt_remove(struct platform_device *dev)
+static int __devexit mpc83xx_wdt_remove(struct of_device *ofdev)
{
misc_deregister(&mpc83xx_wdt_miscdev);
iounmap(wd_base);
@@ -203,7 +193,16 @@ static int __devexit mpc83xx_wdt_remove(struct platform_device *dev)
return 0;
}
-static struct platform_driver mpc83xx_wdt_driver = {
+static const struct of_device_id mpc83xx_wdt_match[] = {
+ {
+ .compatible = "mpc83xx_wdt",
+ },
+ {},
+};
+MODULE_DEVICE_TABLE(of, mpc83xx_wdt_match);
+
+static struct of_platform_driver mpc83xx_wdt_driver = {
+ .match_table = mpc83xx_wdt_match,
.probe = mpc83xx_wdt_probe,
.remove = __devexit_p(mpc83xx_wdt_remove),
.driver = {
@@ -214,12 +213,12 @@ static struct platform_driver mpc83xx_wdt_driver = {
static int __init mpc83xx_wdt_init(void)
{
- return platform_driver_register(&mpc83xx_wdt_driver);
+ return of_register_platform_driver(&mpc83xx_wdt_driver);
}
static void __exit mpc83xx_wdt_exit(void)
{
- platform_driver_unregister(&mpc83xx_wdt_driver);
+ of_unregister_platform_driver(&mpc83xx_wdt_driver);
}
module_init(mpc83xx_wdt_init);
@@ -229,4 +228,3 @@ MODULE_AUTHOR("Dave Updegraff, Kumar Gala");
MODULE_DESCRIPTION("Driver for watchdog timer in MPC83xx uProcessor");
MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
-MODULE_ALIAS("platform:mpc83xx_wdt");
--
1.5.5.1
^ permalink raw reply related
* [PATCH 3/8] [WATCHDOG] mpc83xx_wdt: add support for MPC86xx CPUs
From: Anton Vorontsov @ 2008-05-15 16:53 UTC (permalink / raw)
To: Kumar Gala, Wim Van Sebroeck
Cc: Stephen Rothwell, linuxppc-dev, Chen Gong, Scott Wood, Timur Tabi
In-Reply-To: <20080515165250.GA30738@polina.dev.rtsoft.ru>
On MPC86xx the watchdog could be enabled only at power-on-reset, and
could not be disabled afterwards. We must ping the watchdog from the
kernel until the userspace handles it.
MPC83xx CPUs are only differ in a way that watchdog could be disabled
once, but after it was enabled via software it becomes just the same
as MPC86xx.
Thus, to support MPC86xx I added the kernel timer which pings the
watchdog until the userspace opens it.
Since we implemented the timer, now we're able to implement proper
handling for the CONFIG_WATCHDOG_NOWAYOUT case, for MPC83xx and MPC86xx.
Also move the probe code into subsys_initcall, because we want start
pinging the watchdog ASAP, and misc devices are available in
subsys_initcall.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
drivers/watchdog/Kconfig | 4 +-
drivers/watchdog/mpc83xx_wdt.c | 80 ++++++++++++++++++++++++++++++++++++----
2 files changed, 74 insertions(+), 10 deletions(-)
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 254d115..2929055 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -683,8 +683,8 @@ config 8xx_WDT
depends on 8xx
config 83xx_WDT
- tristate "MPC83xx Watchdog Timer"
- depends on PPC_83xx
+ tristate "MPC83xx/MPC86xx Watchdog Timer"
+ depends on PPC_83xx || PPC_86xx
config MV64X60_WDT
tristate "MV64X60 (Marvell Discovery) Watchdog Timer"
diff --git a/drivers/watchdog/mpc83xx_wdt.c b/drivers/watchdog/mpc83xx_wdt.c
index 127d85e..19e3082 100644
--- a/drivers/watchdog/mpc83xx_wdt.c
+++ b/drivers/watchdog/mpc83xx_wdt.c
@@ -1,10 +1,12 @@
/*
- * mpc83xx_wdt.c - MPC83xx watchdog userspace interface
+ * mpc83xx_wdt.c - MPC83xx/MPC86xx watchdog userspace interface
*
* Authors: Dave Updegraff <dave@cray.org>
* Kumar Gala <galak@kernel.crashing.org>
* Attribution: from 83xx_wst: Florian Schirmer <jolt@tuxbox.org>
* ..and from sc520_wdt
+ * Copyright (c) 2008 MontaVista Software, Inc.
+ * Anton Vorontsov <avorontsov@ru.mvista.com>
*
* Note: it appears that you can only actually ENABLE or DISABLE the thing
* once after POR. Once enabled, you cannot disable, and vice versa.
@@ -18,6 +20,7 @@
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/kernel.h>
+#include <linux/timer.h>
#include <linux/miscdevice.h>
#include <linux/of_platform.h>
#include <linux/module.h>
@@ -39,6 +42,11 @@ struct mpc83xx_wdt {
u8 res2[0xF0];
};
+struct mpc83xx_wdt_type {
+ int prescaler;
+ bool hw_enabled;
+};
+
static struct mpc83xx_wdt __iomem *wd_base;
static u16 timeout = 0xffff;
@@ -51,6 +59,11 @@ module_param(reset, bool, 0);
MODULE_PARM_DESC(reset, "Watchdog Interrupt/Reset Mode. "
"0 = interrupt, 1 = reset");
+static int nowayout = WATCHDOG_NOWAYOUT;
+module_param(nowayout, int, 0);
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
+ "(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
+
/*
* We always prescale, but if someone really doesn't want to they can set this
* to 0
@@ -70,6 +83,22 @@ static void mpc83xx_wdt_keepalive(void)
spin_unlock(&wdt_spinlock);
}
+static void mpc83xx_wdt_timer_ping(unsigned long arg);
+static DEFINE_TIMER(wdt_timer, mpc83xx_wdt_timer_ping, 0, 0);
+
+static void mpc83xx_wdt_timer_ping(unsigned long arg)
+{
+ mpc83xx_wdt_keepalive();
+ /* We're pinging it twice faster than needed, just to be sure. */
+ mod_timer(&wdt_timer, jiffies + HZ * timeout_sec / 2);
+}
+
+static void mpc83xx_wdt_pr_warn(const char *msg)
+{
+ pr_crit("mpc83xx_wdt: %s, expect the %s soon!\n", msg,
+ reset ? "reset" : "machine check exception");
+}
+
static ssize_t mpc83xx_wdt_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
@@ -85,7 +114,8 @@ static int mpc83xx_wdt_open(struct inode *inode, struct file *file)
return -EBUSY;
/* Once we start the watchdog we can't stop it */
- __module_get(THIS_MODULE);
+ if (nowayout)
+ __module_get(THIS_MODULE);
/* Good, fire up the show */
if (prescale)
@@ -97,13 +127,17 @@ static int mpc83xx_wdt_open(struct inode *inode, struct file *file)
out_be32(&wd_base->swcrr, tmp);
+ del_timer_sync(&wdt_timer);
+
return nonseekable_open(inode, file);
}
static int mpc83xx_wdt_release(struct inode *inode, struct file *file)
{
- printk(KERN_CRIT "Unexpected close, not stopping watchdog!\n");
- mpc83xx_wdt_keepalive();
+ if (!nowayout)
+ mpc83xx_wdt_timer_ping(0);
+ else
+ mpc83xx_wdt_pr_warn("watchdog closed");
clear_bit(0, &wdt_is_open);
return 0;
}
@@ -154,15 +188,25 @@ static int __devinit mpc83xx_wdt_probe(struct of_device *ofdev,
const struct of_device_id *match)
{
int ret;
+ struct device_node *np = ofdev->node;
+ struct mpc83xx_wdt_type *wdt_type = match->data;
u32 freq = fsl_get_sys_freq();
+ bool enabled;
if (!freq || freq == -1)
return -EINVAL;
- wd_base = of_iomap(ofdev->node, 0);
+ wd_base = of_iomap(np, 0);
if (!wd_base)
return -ENOMEM;
+ enabled = in_be32(&wd_base->swcrr) & SWCRR_SWEN;
+ if (!enabled && wdt_type->hw_enabled) {
+ pr_info("mpc83xx_wdt: could not be enabled in software\n");
+ ret = -ENOSYS;
+ goto err_unmap;
+ }
+
ret = misc_register(&mpc83xx_wdt_miscdev);
if (ret) {
pr_err("cannot register miscdev on minor=%d (err=%d)\n",
@@ -172,13 +216,21 @@ static int __devinit mpc83xx_wdt_probe(struct of_device *ofdev,
/* Calculate the timeout in seconds */
if (prescale)
- timeout_sec = (timeout * 0x10000) / freq;
+ timeout_sec = (timeout * wdt_type->prescaler) / freq;
else
timeout_sec = timeout / freq;
pr_info("WDT driver for MPC83xx initialized. mode:%s timeout=%d "
"(%d seconds)\n", reset ? "reset" : "interrupt", timeout,
timeout_sec);
+
+ /*
+ * If the watchdog was previously enabled or we're running on
+ * MPC86xx, we should ping the wdt from the kernel until the
+ * userspace handles it.
+ */
+ if (enabled)
+ mpc83xx_wdt_timer_ping(0);
return 0;
err_unmap:
iounmap(wd_base);
@@ -187,6 +239,8 @@ err_unmap:
static int __devexit mpc83xx_wdt_remove(struct of_device *ofdev)
{
+ mpc83xx_wdt_pr_warn("watchdog removed");
+ del_timer_sync(&wdt_timer);
misc_deregister(&mpc83xx_wdt_miscdev);
iounmap(wd_base);
@@ -196,6 +250,16 @@ static int __devexit mpc83xx_wdt_remove(struct of_device *ofdev)
static const struct of_device_id mpc83xx_wdt_match[] = {
{
.compatible = "mpc83xx_wdt",
+ .data = &(struct mpc83xx_wdt_type) {
+ .prescaler = 0x10000,
+ },
+ },
+ {
+ .compatible = "fsl,mpc8610-wdt",
+ .data = &(struct mpc83xx_wdt_type) {
+ .prescaler = 0x10000,
+ .hw_enabled = true,
+ },
},
{},
};
@@ -221,10 +285,10 @@ static void __exit mpc83xx_wdt_exit(void)
of_unregister_platform_driver(&mpc83xx_wdt_driver);
}
-module_init(mpc83xx_wdt_init);
+subsys_initcall(mpc83xx_wdt_init);
module_exit(mpc83xx_wdt_exit);
MODULE_AUTHOR("Dave Updegraff, Kumar Gala");
-MODULE_DESCRIPTION("Driver for watchdog timer in MPC83xx uProcessor");
+MODULE_DESCRIPTION("Driver for watchdog timer in MPC83xx/MPC86xx uProcessors");
MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
--
1.5.5.1
^ permalink raw reply related
* [PATCH 4/8] [WATCHDOG] mpc83xx_wdt: rename to mpc8xxx_wdt
From: Anton Vorontsov @ 2008-05-15 16:53 UTC (permalink / raw)
To: Kumar Gala, Wim Van Sebroeck
Cc: Stephen Rothwell, linuxppc-dev, Chen Gong, Scott Wood, Timur Tabi
In-Reply-To: <20080515165250.GA30738@polina.dev.rtsoft.ru>
Rename the driver because now we support some MPC86xx processors.
There are no changes to the mpc83xx_wdt.c file, yet. When possible, we do
file renames and changes separately (because Linus once asked so, because
it helps git to track the renamed files).
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
drivers/watchdog/Kconfig | 11 ++-
drivers/watchdog/Makefile | 2 +-
drivers/watchdog/mpc83xx_wdt.c | 294 ----------------------------------------
drivers/watchdog/mpc8xxx_wdt.c | 294 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 304 insertions(+), 297 deletions(-)
delete mode 100644 drivers/watchdog/mpc83xx_wdt.c
create mode 100644 drivers/watchdog/mpc8xxx_wdt.c
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 2929055..008eaa6 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -682,9 +682,16 @@ config 8xx_WDT
tristate "MPC8xx Watchdog Timer"
depends on 8xx
-config 83xx_WDT
- tristate "MPC83xx/MPC86xx Watchdog Timer"
+config 8xxx_WDT
+ tristate "MPC8xxx Platform Watchdog Timer"
depends on PPC_83xx || PPC_86xx
+ help
+ This driver is for a SoC level watchdog that exists on some
+ Freescale PowerPC processors. So far this driver supports:
+ - MPC83xx watchdogs
+ - MPC86xx watchdogs
+
+ For BookE processors (MPC85xx) use the BOOKE_WDT driver instead.
config MV64X60_WDT
tristate "MV64X60 (Marvell Discovery) Watchdog Timer"
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
index f3fb170..d5782f9 100644
--- a/drivers/watchdog/Makefile
+++ b/drivers/watchdog/Makefile
@@ -102,7 +102,7 @@ obj-$(CONFIG_TXX9_WDT) += txx9wdt.o
# POWERPC Architecture
obj-$(CONFIG_8xx_WDT) += mpc8xx_wdt.o
obj-$(CONFIG_MPC5200_WDT) += mpc5200_wdt.o
-obj-$(CONFIG_83xx_WDT) += mpc83xx_wdt.o
+obj-$(CONFIG_8xxx_WDT) += mpc8xxx_wdt.o
obj-$(CONFIG_MV64X60_WDT) += mv64x60_wdt.o
obj-$(CONFIG_BOOKE_WDT) += booke_wdt.o
diff --git a/drivers/watchdog/mpc83xx_wdt.c b/drivers/watchdog/mpc83xx_wdt.c
deleted file mode 100644
index 19e3082..0000000
--- a/drivers/watchdog/mpc83xx_wdt.c
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * mpc83xx_wdt.c - MPC83xx/MPC86xx watchdog userspace interface
- *
- * Authors: Dave Updegraff <dave@cray.org>
- * Kumar Gala <galak@kernel.crashing.org>
- * Attribution: from 83xx_wst: Florian Schirmer <jolt@tuxbox.org>
- * ..and from sc520_wdt
- * Copyright (c) 2008 MontaVista Software, Inc.
- * Anton Vorontsov <avorontsov@ru.mvista.com>
- *
- * Note: it appears that you can only actually ENABLE or DISABLE the thing
- * once after POR. Once enabled, you cannot disable, and vice versa.
- *
- * 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.
- */
-
-#include <linux/fs.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/timer.h>
-#include <linux/miscdevice.h>
-#include <linux/of_platform.h>
-#include <linux/module.h>
-#include <linux/watchdog.h>
-#include <linux/io.h>
-#include <linux/uaccess.h>
-#include <sysdev/fsl_soc.h>
-
-struct mpc83xx_wdt {
- __be32 res0;
- __be32 swcrr; /* System watchdog control register */
-#define SWCRR_SWTC 0xFFFF0000 /* Software Watchdog Time Count. */
-#define SWCRR_SWEN 0x00000004 /* Watchdog Enable bit. */
-#define SWCRR_SWRI 0x00000002 /* Software Watchdog Reset/Interrupt Select bit.*/
-#define SWCRR_SWPR 0x00000001 /* Software Watchdog Counter Prescale bit. */
- __be32 swcnr; /* System watchdog count register */
- u8 res1[2];
- __be16 swsrr; /* System watchdog service register */
- u8 res2[0xF0];
-};
-
-struct mpc83xx_wdt_type {
- int prescaler;
- bool hw_enabled;
-};
-
-static struct mpc83xx_wdt __iomem *wd_base;
-
-static u16 timeout = 0xffff;
-module_param(timeout, ushort, 0);
-MODULE_PARM_DESC(timeout, "Watchdog timeout in ticks. "
- "(0<timeout<65536, default=65535");
-
-static int reset = 1;
-module_param(reset, bool, 0);
-MODULE_PARM_DESC(reset, "Watchdog Interrupt/Reset Mode. "
- "0 = interrupt, 1 = reset");
-
-static int nowayout = WATCHDOG_NOWAYOUT;
-module_param(nowayout, int, 0);
-MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
- "(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
-
-/*
- * We always prescale, but if someone really doesn't want to they can set this
- * to 0
- */
-static int prescale = 1;
-static unsigned int timeout_sec;
-
-static unsigned long wdt_is_open;
-static DEFINE_SPINLOCK(wdt_spinlock);
-
-static void mpc83xx_wdt_keepalive(void)
-{
- /* Ping the WDT */
- spin_lock(&wdt_spinlock);
- out_be16(&wd_base->swsrr, 0x556c);
- out_be16(&wd_base->swsrr, 0xaa39);
- spin_unlock(&wdt_spinlock);
-}
-
-static void mpc83xx_wdt_timer_ping(unsigned long arg);
-static DEFINE_TIMER(wdt_timer, mpc83xx_wdt_timer_ping, 0, 0);
-
-static void mpc83xx_wdt_timer_ping(unsigned long arg)
-{
- mpc83xx_wdt_keepalive();
- /* We're pinging it twice faster than needed, just to be sure. */
- mod_timer(&wdt_timer, jiffies + HZ * timeout_sec / 2);
-}
-
-static void mpc83xx_wdt_pr_warn(const char *msg)
-{
- pr_crit("mpc83xx_wdt: %s, expect the %s soon!\n", msg,
- reset ? "reset" : "machine check exception");
-}
-
-static ssize_t mpc83xx_wdt_write(struct file *file, const char __user *buf,
- size_t count, loff_t *ppos)
-{
- if (count)
- mpc83xx_wdt_keepalive();
- return count;
-}
-
-static int mpc83xx_wdt_open(struct inode *inode, struct file *file)
-{
- u32 tmp = SWCRR_SWEN;
- if (test_and_set_bit(0, &wdt_is_open))
- return -EBUSY;
-
- /* Once we start the watchdog we can't stop it */
- if (nowayout)
- __module_get(THIS_MODULE);
-
- /* Good, fire up the show */
- if (prescale)
- tmp |= SWCRR_SWPR;
- if (reset)
- tmp |= SWCRR_SWRI;
-
- tmp |= timeout << 16;
-
- out_be32(&wd_base->swcrr, tmp);
-
- del_timer_sync(&wdt_timer);
-
- return nonseekable_open(inode, file);
-}
-
-static int mpc83xx_wdt_release(struct inode *inode, struct file *file)
-{
- if (!nowayout)
- mpc83xx_wdt_timer_ping(0);
- else
- mpc83xx_wdt_pr_warn("watchdog closed");
- clear_bit(0, &wdt_is_open);
- return 0;
-}
-
-static int mpc83xx_wdt_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
-{
- void __user *argp = (void __user *)arg;
- int __user *p = argp;
- static struct watchdog_info ident = {
- .options = WDIOF_KEEPALIVEPING,
- .firmware_version = 1,
- .identity = "MPC83xx",
- };
-
- switch (cmd) {
- case WDIOC_GETSUPPORT:
- return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0;
- case WDIOC_GETSTATUS:
- case WDIOC_GETBOOTSTATUS:
- return put_user(0, p);
- case WDIOC_KEEPALIVE:
- mpc83xx_wdt_keepalive();
- return 0;
- case WDIOC_GETTIMEOUT:
- return put_user(timeout_sec, p);
- default:
- return -ENOTTY;
- }
-}
-
-static const struct file_operations mpc83xx_wdt_fops = {
- .owner = THIS_MODULE,
- .llseek = no_llseek,
- .write = mpc83xx_wdt_write,
- .ioctl = mpc83xx_wdt_ioctl,
- .open = mpc83xx_wdt_open,
- .release = mpc83xx_wdt_release,
-};
-
-static struct miscdevice mpc83xx_wdt_miscdev = {
- .minor = WATCHDOG_MINOR,
- .name = "watchdog",
- .fops = &mpc83xx_wdt_fops,
-};
-
-static int __devinit mpc83xx_wdt_probe(struct of_device *ofdev,
- const struct of_device_id *match)
-{
- int ret;
- struct device_node *np = ofdev->node;
- struct mpc83xx_wdt_type *wdt_type = match->data;
- u32 freq = fsl_get_sys_freq();
- bool enabled;
-
- if (!freq || freq == -1)
- return -EINVAL;
-
- wd_base = of_iomap(np, 0);
- if (!wd_base)
- return -ENOMEM;
-
- enabled = in_be32(&wd_base->swcrr) & SWCRR_SWEN;
- if (!enabled && wdt_type->hw_enabled) {
- pr_info("mpc83xx_wdt: could not be enabled in software\n");
- ret = -ENOSYS;
- goto err_unmap;
- }
-
- ret = misc_register(&mpc83xx_wdt_miscdev);
- if (ret) {
- pr_err("cannot register miscdev on minor=%d (err=%d)\n",
- WATCHDOG_MINOR, ret);
- goto err_unmap;
- }
-
- /* Calculate the timeout in seconds */
- if (prescale)
- timeout_sec = (timeout * wdt_type->prescaler) / freq;
- else
- timeout_sec = timeout / freq;
-
- pr_info("WDT driver for MPC83xx initialized. mode:%s timeout=%d "
- "(%d seconds)\n", reset ? "reset" : "interrupt", timeout,
- timeout_sec);
-
- /*
- * If the watchdog was previously enabled or we're running on
- * MPC86xx, we should ping the wdt from the kernel until the
- * userspace handles it.
- */
- if (enabled)
- mpc83xx_wdt_timer_ping(0);
- return 0;
-err_unmap:
- iounmap(wd_base);
- return ret;
-}
-
-static int __devexit mpc83xx_wdt_remove(struct of_device *ofdev)
-{
- mpc83xx_wdt_pr_warn("watchdog removed");
- del_timer_sync(&wdt_timer);
- misc_deregister(&mpc83xx_wdt_miscdev);
- iounmap(wd_base);
-
- return 0;
-}
-
-static const struct of_device_id mpc83xx_wdt_match[] = {
- {
- .compatible = "mpc83xx_wdt",
- .data = &(struct mpc83xx_wdt_type) {
- .prescaler = 0x10000,
- },
- },
- {
- .compatible = "fsl,mpc8610-wdt",
- .data = &(struct mpc83xx_wdt_type) {
- .prescaler = 0x10000,
- .hw_enabled = true,
- },
- },
- {},
-};
-MODULE_DEVICE_TABLE(of, mpc83xx_wdt_match);
-
-static struct of_platform_driver mpc83xx_wdt_driver = {
- .match_table = mpc83xx_wdt_match,
- .probe = mpc83xx_wdt_probe,
- .remove = __devexit_p(mpc83xx_wdt_remove),
- .driver = {
- .name = "mpc83xx_wdt",
- .owner = THIS_MODULE,
- },
-};
-
-static int __init mpc83xx_wdt_init(void)
-{
- return of_register_platform_driver(&mpc83xx_wdt_driver);
-}
-
-static void __exit mpc83xx_wdt_exit(void)
-{
- of_unregister_platform_driver(&mpc83xx_wdt_driver);
-}
-
-subsys_initcall(mpc83xx_wdt_init);
-module_exit(mpc83xx_wdt_exit);
-
-MODULE_AUTHOR("Dave Updegraff, Kumar Gala");
-MODULE_DESCRIPTION("Driver for watchdog timer in MPC83xx/MPC86xx uProcessors");
-MODULE_LICENSE("GPL");
-MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
new file mode 100644
index 0000000..19e3082
--- /dev/null
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -0,0 +1,294 @@
+/*
+ * mpc83xx_wdt.c - MPC83xx/MPC86xx watchdog userspace interface
+ *
+ * Authors: Dave Updegraff <dave@cray.org>
+ * Kumar Gala <galak@kernel.crashing.org>
+ * Attribution: from 83xx_wst: Florian Schirmer <jolt@tuxbox.org>
+ * ..and from sc520_wdt
+ * Copyright (c) 2008 MontaVista Software, Inc.
+ * Anton Vorontsov <avorontsov@ru.mvista.com>
+ *
+ * Note: it appears that you can only actually ENABLE or DISABLE the thing
+ * once after POR. Once enabled, you cannot disable, and vice versa.
+ *
+ * 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.
+ */
+
+#include <linux/fs.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/timer.h>
+#include <linux/miscdevice.h>
+#include <linux/of_platform.h>
+#include <linux/module.h>
+#include <linux/watchdog.h>
+#include <linux/io.h>
+#include <linux/uaccess.h>
+#include <sysdev/fsl_soc.h>
+
+struct mpc83xx_wdt {
+ __be32 res0;
+ __be32 swcrr; /* System watchdog control register */
+#define SWCRR_SWTC 0xFFFF0000 /* Software Watchdog Time Count. */
+#define SWCRR_SWEN 0x00000004 /* Watchdog Enable bit. */
+#define SWCRR_SWRI 0x00000002 /* Software Watchdog Reset/Interrupt Select bit.*/
+#define SWCRR_SWPR 0x00000001 /* Software Watchdog Counter Prescale bit. */
+ __be32 swcnr; /* System watchdog count register */
+ u8 res1[2];
+ __be16 swsrr; /* System watchdog service register */
+ u8 res2[0xF0];
+};
+
+struct mpc83xx_wdt_type {
+ int prescaler;
+ bool hw_enabled;
+};
+
+static struct mpc83xx_wdt __iomem *wd_base;
+
+static u16 timeout = 0xffff;
+module_param(timeout, ushort, 0);
+MODULE_PARM_DESC(timeout, "Watchdog timeout in ticks. "
+ "(0<timeout<65536, default=65535");
+
+static int reset = 1;
+module_param(reset, bool, 0);
+MODULE_PARM_DESC(reset, "Watchdog Interrupt/Reset Mode. "
+ "0 = interrupt, 1 = reset");
+
+static int nowayout = WATCHDOG_NOWAYOUT;
+module_param(nowayout, int, 0);
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
+ "(default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
+
+/*
+ * We always prescale, but if someone really doesn't want to they can set this
+ * to 0
+ */
+static int prescale = 1;
+static unsigned int timeout_sec;
+
+static unsigned long wdt_is_open;
+static DEFINE_SPINLOCK(wdt_spinlock);
+
+static void mpc83xx_wdt_keepalive(void)
+{
+ /* Ping the WDT */
+ spin_lock(&wdt_spinlock);
+ out_be16(&wd_base->swsrr, 0x556c);
+ out_be16(&wd_base->swsrr, 0xaa39);
+ spin_unlock(&wdt_spinlock);
+}
+
+static void mpc83xx_wdt_timer_ping(unsigned long arg);
+static DEFINE_TIMER(wdt_timer, mpc83xx_wdt_timer_ping, 0, 0);
+
+static void mpc83xx_wdt_timer_ping(unsigned long arg)
+{
+ mpc83xx_wdt_keepalive();
+ /* We're pinging it twice faster than needed, just to be sure. */
+ mod_timer(&wdt_timer, jiffies + HZ * timeout_sec / 2);
+}
+
+static void mpc83xx_wdt_pr_warn(const char *msg)
+{
+ pr_crit("mpc83xx_wdt: %s, expect the %s soon!\n", msg,
+ reset ? "reset" : "machine check exception");
+}
+
+static ssize_t mpc83xx_wdt_write(struct file *file, const char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ if (count)
+ mpc83xx_wdt_keepalive();
+ return count;
+}
+
+static int mpc83xx_wdt_open(struct inode *inode, struct file *file)
+{
+ u32 tmp = SWCRR_SWEN;
+ if (test_and_set_bit(0, &wdt_is_open))
+ return -EBUSY;
+
+ /* Once we start the watchdog we can't stop it */
+ if (nowayout)
+ __module_get(THIS_MODULE);
+
+ /* Good, fire up the show */
+ if (prescale)
+ tmp |= SWCRR_SWPR;
+ if (reset)
+ tmp |= SWCRR_SWRI;
+
+ tmp |= timeout << 16;
+
+ out_be32(&wd_base->swcrr, tmp);
+
+ del_timer_sync(&wdt_timer);
+
+ return nonseekable_open(inode, file);
+}
+
+static int mpc83xx_wdt_release(struct inode *inode, struct file *file)
+{
+ if (!nowayout)
+ mpc83xx_wdt_timer_ping(0);
+ else
+ mpc83xx_wdt_pr_warn("watchdog closed");
+ clear_bit(0, &wdt_is_open);
+ return 0;
+}
+
+static int mpc83xx_wdt_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ void __user *argp = (void __user *)arg;
+ int __user *p = argp;
+ static struct watchdog_info ident = {
+ .options = WDIOF_KEEPALIVEPING,
+ .firmware_version = 1,
+ .identity = "MPC83xx",
+ };
+
+ switch (cmd) {
+ case WDIOC_GETSUPPORT:
+ return copy_to_user(argp, &ident, sizeof(ident)) ? -EFAULT : 0;
+ case WDIOC_GETSTATUS:
+ case WDIOC_GETBOOTSTATUS:
+ return put_user(0, p);
+ case WDIOC_KEEPALIVE:
+ mpc83xx_wdt_keepalive();
+ return 0;
+ case WDIOC_GETTIMEOUT:
+ return put_user(timeout_sec, p);
+ default:
+ return -ENOTTY;
+ }
+}
+
+static const struct file_operations mpc83xx_wdt_fops = {
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+ .write = mpc83xx_wdt_write,
+ .ioctl = mpc83xx_wdt_ioctl,
+ .open = mpc83xx_wdt_open,
+ .release = mpc83xx_wdt_release,
+};
+
+static struct miscdevice mpc83xx_wdt_miscdev = {
+ .minor = WATCHDOG_MINOR,
+ .name = "watchdog",
+ .fops = &mpc83xx_wdt_fops,
+};
+
+static int __devinit mpc83xx_wdt_probe(struct of_device *ofdev,
+ const struct of_device_id *match)
+{
+ int ret;
+ struct device_node *np = ofdev->node;
+ struct mpc83xx_wdt_type *wdt_type = match->data;
+ u32 freq = fsl_get_sys_freq();
+ bool enabled;
+
+ if (!freq || freq == -1)
+ return -EINVAL;
+
+ wd_base = of_iomap(np, 0);
+ if (!wd_base)
+ return -ENOMEM;
+
+ enabled = in_be32(&wd_base->swcrr) & SWCRR_SWEN;
+ if (!enabled && wdt_type->hw_enabled) {
+ pr_info("mpc83xx_wdt: could not be enabled in software\n");
+ ret = -ENOSYS;
+ goto err_unmap;
+ }
+
+ ret = misc_register(&mpc83xx_wdt_miscdev);
+ if (ret) {
+ pr_err("cannot register miscdev on minor=%d (err=%d)\n",
+ WATCHDOG_MINOR, ret);
+ goto err_unmap;
+ }
+
+ /* Calculate the timeout in seconds */
+ if (prescale)
+ timeout_sec = (timeout * wdt_type->prescaler) / freq;
+ else
+ timeout_sec = timeout / freq;
+
+ pr_info("WDT driver for MPC83xx initialized. mode:%s timeout=%d "
+ "(%d seconds)\n", reset ? "reset" : "interrupt", timeout,
+ timeout_sec);
+
+ /*
+ * If the watchdog was previously enabled or we're running on
+ * MPC86xx, we should ping the wdt from the kernel until the
+ * userspace handles it.
+ */
+ if (enabled)
+ mpc83xx_wdt_timer_ping(0);
+ return 0;
+err_unmap:
+ iounmap(wd_base);
+ return ret;
+}
+
+static int __devexit mpc83xx_wdt_remove(struct of_device *ofdev)
+{
+ mpc83xx_wdt_pr_warn("watchdog removed");
+ del_timer_sync(&wdt_timer);
+ misc_deregister(&mpc83xx_wdt_miscdev);
+ iounmap(wd_base);
+
+ return 0;
+}
+
+static const struct of_device_id mpc83xx_wdt_match[] = {
+ {
+ .compatible = "mpc83xx_wdt",
+ .data = &(struct mpc83xx_wdt_type) {
+ .prescaler = 0x10000,
+ },
+ },
+ {
+ .compatible = "fsl,mpc8610-wdt",
+ .data = &(struct mpc83xx_wdt_type) {
+ .prescaler = 0x10000,
+ .hw_enabled = true,
+ },
+ },
+ {},
+};
+MODULE_DEVICE_TABLE(of, mpc83xx_wdt_match);
+
+static struct of_platform_driver mpc83xx_wdt_driver = {
+ .match_table = mpc83xx_wdt_match,
+ .probe = mpc83xx_wdt_probe,
+ .remove = __devexit_p(mpc83xx_wdt_remove),
+ .driver = {
+ .name = "mpc83xx_wdt",
+ .owner = THIS_MODULE,
+ },
+};
+
+static int __init mpc83xx_wdt_init(void)
+{
+ return of_register_platform_driver(&mpc83xx_wdt_driver);
+}
+
+static void __exit mpc83xx_wdt_exit(void)
+{
+ of_unregister_platform_driver(&mpc83xx_wdt_driver);
+}
+
+subsys_initcall(mpc83xx_wdt_init);
+module_exit(mpc83xx_wdt_exit);
+
+MODULE_AUTHOR("Dave Updegraff, Kumar Gala");
+MODULE_DESCRIPTION("Driver for watchdog timer in MPC83xx/MPC86xx uProcessors");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
--
1.5.5.1
^ permalink raw reply related
* [PATCH 5/8] [WATCHDOG] mpc8xxx_wdt: various renames, mostly s/mpc83xx/mpc8xxx/g
From: Anton Vorontsov @ 2008-05-15 16:53 UTC (permalink / raw)
To: Kumar Gala, Wim Van Sebroeck
Cc: Stephen Rothwell, linuxppc-dev, Chen Gong, Scott Wood, Timur Tabi
In-Reply-To: <20080515165250.GA30738@polina.dev.rtsoft.ru>
mpc83xx_wdt.c renamed to mpc8xxx_wdt.c, now we can do various renames
in the file itself.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
drivers/watchdog/mpc8xxx_wdt.c | 104 ++++++++++++++++++++--------------------
1 files changed, 52 insertions(+), 52 deletions(-)
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
index 19e3082..2f0681f 100644
--- a/drivers/watchdog/mpc8xxx_wdt.c
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -1,5 +1,5 @@
/*
- * mpc83xx_wdt.c - MPC83xx/MPC86xx watchdog userspace interface
+ * mpc8xxx_wdt.c - MPC83xx/MPC86xx watchdog userspace interface
*
* Authors: Dave Updegraff <dave@cray.org>
* Kumar Gala <galak@kernel.crashing.org>
@@ -29,7 +29,7 @@
#include <linux/uaccess.h>
#include <sysdev/fsl_soc.h>
-struct mpc83xx_wdt {
+struct mpc8xxx_wdt {
__be32 res0;
__be32 swcrr; /* System watchdog control register */
#define SWCRR_SWTC 0xFFFF0000 /* Software Watchdog Time Count. */
@@ -42,12 +42,12 @@ struct mpc83xx_wdt {
u8 res2[0xF0];
};
-struct mpc83xx_wdt_type {
+struct mpc8xxx_wdt_type {
int prescaler;
bool hw_enabled;
};
-static struct mpc83xx_wdt __iomem *wd_base;
+static struct mpc8xxx_wdt __iomem *wd_base;
static u16 timeout = 0xffff;
module_param(timeout, ushort, 0);
@@ -74,7 +74,7 @@ static unsigned int timeout_sec;
static unsigned long wdt_is_open;
static DEFINE_SPINLOCK(wdt_spinlock);
-static void mpc83xx_wdt_keepalive(void)
+static void mpc8xxx_wdt_keepalive(void)
{
/* Ping the WDT */
spin_lock(&wdt_spinlock);
@@ -83,31 +83,31 @@ static void mpc83xx_wdt_keepalive(void)
spin_unlock(&wdt_spinlock);
}
-static void mpc83xx_wdt_timer_ping(unsigned long arg);
-static DEFINE_TIMER(wdt_timer, mpc83xx_wdt_timer_ping, 0, 0);
+static void mpc8xxx_wdt_timer_ping(unsigned long arg);
+static DEFINE_TIMER(wdt_timer, mpc8xxx_wdt_timer_ping, 0, 0);
-static void mpc83xx_wdt_timer_ping(unsigned long arg)
+static void mpc8xxx_wdt_timer_ping(unsigned long arg)
{
- mpc83xx_wdt_keepalive();
+ mpc8xxx_wdt_keepalive();
/* We're pinging it twice faster than needed, just to be sure. */
mod_timer(&wdt_timer, jiffies + HZ * timeout_sec / 2);
}
-static void mpc83xx_wdt_pr_warn(const char *msg)
+static void mpc8xxx_wdt_pr_warn(const char *msg)
{
- pr_crit("mpc83xx_wdt: %s, expect the %s soon!\n", msg,
+ pr_crit("mpc8xxx_wdt: %s, expect the %s soon!\n", msg,
reset ? "reset" : "machine check exception");
}
-static ssize_t mpc83xx_wdt_write(struct file *file, const char __user *buf,
+static ssize_t mpc8xxx_wdt_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
if (count)
- mpc83xx_wdt_keepalive();
+ mpc8xxx_wdt_keepalive();
return count;
}
-static int mpc83xx_wdt_open(struct inode *inode, struct file *file)
+static int mpc8xxx_wdt_open(struct inode *inode, struct file *file)
{
u32 tmp = SWCRR_SWEN;
if (test_and_set_bit(0, &wdt_is_open))
@@ -132,17 +132,17 @@ static int mpc83xx_wdt_open(struct inode *inode, struct file *file)
return nonseekable_open(inode, file);
}
-static int mpc83xx_wdt_release(struct inode *inode, struct file *file)
+static int mpc8xxx_wdt_release(struct inode *inode, struct file *file)
{
if (!nowayout)
- mpc83xx_wdt_timer_ping(0);
+ mpc8xxx_wdt_timer_ping(0);
else
- mpc83xx_wdt_pr_warn("watchdog closed");
+ mpc8xxx_wdt_pr_warn("watchdog closed");
clear_bit(0, &wdt_is_open);
return 0;
}
-static int mpc83xx_wdt_ioctl(struct inode *inode, struct file *file,
+static int mpc8xxx_wdt_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
void __user *argp = (void __user *)arg;
@@ -150,7 +150,7 @@ static int mpc83xx_wdt_ioctl(struct inode *inode, struct file *file,
static struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING,
.firmware_version = 1,
- .identity = "MPC83xx",
+ .identity = "MPC8xxx",
};
switch (cmd) {
@@ -160,7 +160,7 @@ static int mpc83xx_wdt_ioctl(struct inode *inode, struct file *file,
case WDIOC_GETBOOTSTATUS:
return put_user(0, p);
case WDIOC_KEEPALIVE:
- mpc83xx_wdt_keepalive();
+ mpc8xxx_wdt_keepalive();
return 0;
case WDIOC_GETTIMEOUT:
return put_user(timeout_sec, p);
@@ -169,27 +169,27 @@ static int mpc83xx_wdt_ioctl(struct inode *inode, struct file *file,
}
}
-static const struct file_operations mpc83xx_wdt_fops = {
+static const struct file_operations mpc8xxx_wdt_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
- .write = mpc83xx_wdt_write,
- .ioctl = mpc83xx_wdt_ioctl,
- .open = mpc83xx_wdt_open,
- .release = mpc83xx_wdt_release,
+ .write = mpc8xxx_wdt_write,
+ .ioctl = mpc8xxx_wdt_ioctl,
+ .open = mpc8xxx_wdt_open,
+ .release = mpc8xxx_wdt_release,
};
-static struct miscdevice mpc83xx_wdt_miscdev = {
+static struct miscdevice mpc8xxx_wdt_miscdev = {
.minor = WATCHDOG_MINOR,
.name = "watchdog",
- .fops = &mpc83xx_wdt_fops,
+ .fops = &mpc8xxx_wdt_fops,
};
-static int __devinit mpc83xx_wdt_probe(struct of_device *ofdev,
+static int __devinit mpc8xxx_wdt_probe(struct of_device *ofdev,
const struct of_device_id *match)
{
int ret;
struct device_node *np = ofdev->node;
- struct mpc83xx_wdt_type *wdt_type = match->data;
+ struct mpc8xxx_wdt_type *wdt_type = match->data;
u32 freq = fsl_get_sys_freq();
bool enabled;
@@ -202,12 +202,12 @@ static int __devinit mpc83xx_wdt_probe(struct of_device *ofdev,
enabled = in_be32(&wd_base->swcrr) & SWCRR_SWEN;
if (!enabled && wdt_type->hw_enabled) {
- pr_info("mpc83xx_wdt: could not be enabled in software\n");
+ pr_info("mpc8xxx_wdt: could not be enabled in software\n");
ret = -ENOSYS;
goto err_unmap;
}
- ret = misc_register(&mpc83xx_wdt_miscdev);
+ ret = misc_register(&mpc8xxx_wdt_miscdev);
if (ret) {
pr_err("cannot register miscdev on minor=%d (err=%d)\n",
WATCHDOG_MINOR, ret);
@@ -220,73 +220,73 @@ static int __devinit mpc83xx_wdt_probe(struct of_device *ofdev,
else
timeout_sec = timeout / freq;
- pr_info("WDT driver for MPC83xx initialized. mode:%s timeout=%d "
+ pr_info("WDT driver for MPC8xxx initialized. mode:%s timeout=%d "
"(%d seconds)\n", reset ? "reset" : "interrupt", timeout,
timeout_sec);
/*
* If the watchdog was previously enabled or we're running on
- * MPC86xx, we should ping the wdt from the kernel until the
+ * MPC8xxx, we should ping the wdt from the kernel until the
* userspace handles it.
*/
if (enabled)
- mpc83xx_wdt_timer_ping(0);
+ mpc8xxx_wdt_timer_ping(0);
return 0;
err_unmap:
iounmap(wd_base);
return ret;
}
-static int __devexit mpc83xx_wdt_remove(struct of_device *ofdev)
+static int __devexit mpc8xxx_wdt_remove(struct of_device *ofdev)
{
- mpc83xx_wdt_pr_warn("watchdog removed");
+ mpc8xxx_wdt_pr_warn("watchdog removed");
del_timer_sync(&wdt_timer);
- misc_deregister(&mpc83xx_wdt_miscdev);
+ misc_deregister(&mpc8xxx_wdt_miscdev);
iounmap(wd_base);
return 0;
}
-static const struct of_device_id mpc83xx_wdt_match[] = {
+static const struct of_device_id mpc8xxx_wdt_match[] = {
{
.compatible = "mpc83xx_wdt",
- .data = &(struct mpc83xx_wdt_type) {
+ .data = &(struct mpc8xxx_wdt_type) {
.prescaler = 0x10000,
},
},
{
.compatible = "fsl,mpc8610-wdt",
- .data = &(struct mpc83xx_wdt_type) {
+ .data = &(struct mpc8xxx_wdt_type) {
.prescaler = 0x10000,
.hw_enabled = true,
},
},
{},
};
-MODULE_DEVICE_TABLE(of, mpc83xx_wdt_match);
+MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match);
-static struct of_platform_driver mpc83xx_wdt_driver = {
- .match_table = mpc83xx_wdt_match,
- .probe = mpc83xx_wdt_probe,
- .remove = __devexit_p(mpc83xx_wdt_remove),
+static struct of_platform_driver mpc8xxx_wdt_driver = {
+ .match_table = mpc8xxx_wdt_match,
+ .probe = mpc8xxx_wdt_probe,
+ .remove = __devexit_p(mpc8xxx_wdt_remove),
.driver = {
- .name = "mpc83xx_wdt",
+ .name = "mpc8xxx_wdt",
.owner = THIS_MODULE,
},
};
-static int __init mpc83xx_wdt_init(void)
+static int __init mpc8xxx_wdt_init(void)
{
- return of_register_platform_driver(&mpc83xx_wdt_driver);
+ return of_register_platform_driver(&mpc8xxx_wdt_driver);
}
-static void __exit mpc83xx_wdt_exit(void)
+static void __exit mpc8xxx_wdt_exit(void)
{
- of_unregister_platform_driver(&mpc83xx_wdt_driver);
+ of_unregister_platform_driver(&mpc8xxx_wdt_driver);
}
-subsys_initcall(mpc83xx_wdt_init);
-module_exit(mpc83xx_wdt_exit);
+subsys_initcall(mpc8xxx_wdt_init);
+module_exit(mpc8xxx_wdt_exit);
MODULE_AUTHOR("Dave Updegraff, Kumar Gala");
MODULE_DESCRIPTION("Driver for watchdog timer in MPC83xx/MPC86xx uProcessors");
--
1.5.5.1
^ permalink raw reply related
* [PATCH 6/8] [WATCHDOG] mpc8xxx_wdt: add support for MPC8xx watchdogs
From: Anton Vorontsov @ 2008-05-15 16:54 UTC (permalink / raw)
To: Kumar Gala, Wim Van Sebroeck
Cc: Stephen Rothwell, linuxppc-dev, Chen Gong, Scott Wood, Timur Tabi
In-Reply-To: <20080515165250.GA30738@polina.dev.rtsoft.ru>
The mpc8xxx_wdt driver is using two registers: SWSRR to push magic
numbers, and SWCRR to control the watchdog. Both registers are available
on the MPC8xx, and seem to have the same offsets and semantics as in
MPC83xx/MPC86xx watchdogs. The only difference is prescale value. So this
driver should simply work on the MPC8xx CPUs.
MPC823 seem to be the first CPU in MPC8xx line, so we use fsl,mpc823-wdt
compatible matching.
Though, this patch was only build-tested and okay to drop from this
series until tested or corrected to work on the actual hardware.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
drivers/watchdog/Kconfig | 3 ++-
drivers/watchdog/mpc8xxx_wdt.c | 11 +++++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 008eaa6..f9e617b 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -684,10 +684,11 @@ config 8xx_WDT
config 8xxx_WDT
tristate "MPC8xxx Platform Watchdog Timer"
- depends on PPC_83xx || PPC_86xx
+ depends on PPC_8xx || PPC_83xx || PPC_86xx
help
This driver is for a SoC level watchdog that exists on some
Freescale PowerPC processors. So far this driver supports:
+ - MPC8xx watchdogs
- MPC83xx watchdogs
- MPC86xx watchdogs
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
index 2f0681f..c7e28f0 100644
--- a/drivers/watchdog/mpc8xxx_wdt.c
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -1,5 +1,5 @@
/*
- * mpc8xxx_wdt.c - MPC83xx/MPC86xx watchdog userspace interface
+ * mpc8xxx_wdt.c - MPC8xx/MPC83xx/MPC86xx watchdog userspace interface
*
* Authors: Dave Updegraff <dave@cray.org>
* Kumar Gala <galak@kernel.crashing.org>
@@ -261,6 +261,12 @@ static const struct of_device_id mpc8xxx_wdt_match[] = {
.hw_enabled = true,
},
},
+ {
+ .compatible = "fsl,mpc823-wdt",
+ .data = &(struct mpc8xxx_wdt_type) {
+ .prescaler = 0x800,
+ },
+ },
{},
};
MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match);
@@ -289,6 +295,7 @@ subsys_initcall(mpc8xxx_wdt_init);
module_exit(mpc8xxx_wdt_exit);
MODULE_AUTHOR("Dave Updegraff, Kumar Gala");
-MODULE_DESCRIPTION("Driver for watchdog timer in MPC83xx/MPC86xx uProcessors");
+MODULE_DESCRIPTION("Driver for watchdog timer in MPC8xx/MPC83xx/MPC86xx "
+ "uProcessors");
MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
--
1.5.5.1
^ permalink raw reply related
* [PATCH 7/8] [POWERPC] fsl_soc: remove mpc83xx_wdt code
From: Anton Vorontsov @ 2008-05-15 16:54 UTC (permalink / raw)
To: Kumar Gala, Wim Van Sebroeck
Cc: Stephen Rothwell, linuxppc-dev, Chen Gong, Scott Wood, Timur Tabi
In-Reply-To: <20080515165250.GA30738@polina.dev.rtsoft.ru>
mpc83xx_wdt is the OF driver now, so we don't need fsl_soc constructor.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
arch/powerpc/sysdev/fsl_soc.c | 46 -----------------------------------------
1 files changed, 0 insertions(+), 46 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index a5ceeef..32a3ac8 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -545,52 +545,6 @@ err:
arch_initcall(fsl_i2c_of_init);
#endif
-#ifdef CONFIG_PPC_83xx
-static int __init mpc83xx_wdt_init(void)
-{
- struct resource r;
- struct device_node *np;
- struct platform_device *dev;
- u32 freq = fsl_get_sys_freq();
- int ret;
-
- np = of_find_compatible_node(NULL, "watchdog", "mpc83xx_wdt");
-
- if (!np) {
- ret = -ENODEV;
- goto nodev;
- }
-
- memset(&r, 0, sizeof(r));
-
- ret = of_address_to_resource(np, 0, &r);
- if (ret)
- goto err;
-
- dev = platform_device_register_simple("mpc83xx_wdt", 0, &r, 1);
- if (IS_ERR(dev)) {
- ret = PTR_ERR(dev);
- goto err;
- }
-
- ret = platform_device_add_data(dev, &freq, sizeof(freq));
- if (ret)
- goto unreg;
-
- of_node_put(np);
- return 0;
-
-unreg:
- platform_device_unregister(dev);
-err:
- of_node_put(np);
-nodev:
- return ret;
-}
-
-arch_initcall(mpc83xx_wdt_init);
-#endif
-
static enum fsl_usb2_phy_modes determine_usb_phy(const char *phy_type)
{
if (!phy_type)
--
1.5.5.1
^ permalink raw reply related
* [PATCH 8/8] [POWERPC] 86xx: mpc8610_hpcd: add watchdog node
From: Anton Vorontsov @ 2008-05-15 16:54 UTC (permalink / raw)
To: Kumar Gala, Wim Van Sebroeck
Cc: Stephen Rothwell, linuxppc-dev, Chen Gong, Scott Wood, Timur Tabi
In-Reply-To: <20080515165250.GA30738@polina.dev.rtsoft.ru>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
arch/powerpc/boot/dts/mpc8610_hpcd.dts | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
index 5030533..b502202 100644
--- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts
+++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
@@ -195,6 +195,11 @@
fsl,has-rstcr;
};
+ wdt@e4000 {
+ compatible = "fsl,mpc8610-wdt";
+ reg = <0xe4000 0x100>;
+ };
+
gpio@f000 {
compatible = "fsl,mpc8610-gpio";
reg = <0xf000 0x100>;
--
1.5.5.1
^ permalink raw reply related
* Re: dead network on JS21 with tg3 driver after flowcontrol changes
From: Matt Carlson @ 2008-05-15 17:15 UTC (permalink / raw)
To: Olaf Hering; +Cc: linuxppc-dev, netdev, Matt Carlson, Michael Chan
In-Reply-To: <20080515121340.GA23033@aepfle.de>
If you were to start with the original file, does the following patch
fix the problem?
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 07b3f77..4c248d7 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -3168,8 +3168,7 @@ static int tg3_setup_fiber_mii_phy(struct tg3 *tp, int force_reset)
err |= tg3_readphy(tp, MII_BMCR, &bmcr);
if ((tp->link_config.autoneg == AUTONEG_ENABLE) && !force_reset &&
- (tp->tg3_flags2 & TG3_FLG2_PARALLEL_DETECT) &&
- tp->link_config.flowctrl == tp->link_config.active_flowctrl) {
+ (tp->tg3_flags2 & TG3_FLG2_PARALLEL_DETECT)) {
/* do nothing, just check for link up at the end */
} else if (tp->link_config.autoneg == AUTONEG_ENABLE) {
u32 adv, new_adv;
^ permalink raw reply related
* Re: [patch 3/4] macintosh: replace deprecated __initcall with device_initcall
From: Andrew Morton @ 2008-05-15 17:43 UTC (permalink / raw)
To: michael; +Cc: linuxppc-dev, rpjday, Paul Mackerras
In-Reply-To: <1210842517.17568.41.camel@localhost>
On Thu, 15 May 2008 19:08:37 +1000 Michael Ellerman <michael@ellerman.id.au> wrote:
> On Wed, 2008-05-14 at 23:41 -0700, Andrew Morton wrote:
> > On Thu, 15 May 2008 16:28:28 +1000 Michael Ellerman <michael@ellerman.id.au> wrote:
> >
> > > On Wed, 2008-05-14 at 23:06 -0700, Andrew Morton wrote:
> > > > On Thu, 15 May 2008 14:14:38 +1000 Paul Mackerras <paulus@samba.org> wrote:
> > > >
> > > > > akpm@linux-foundation.org writes:
> > > > >
> > > > > > -__initcall(adb_init);
> > > > > > +device_initcall(adb_init);
> > > > >
> > > > > There's no particular reason why this needs to go in 2.6.26, is there?
> > > > > It looks to me like something that I should queue up for 2.6.27.
> > > > >
> > > >
> > > > No, this make no difference in code generation - it's just a
> > > > use-the-modern-interface thing.
> > >
> > > I missed the memo about __initcall being deprecated, or is it only
> > > deprecated for use in device drivers?
> > >
> >
> > It's just old-fashioned, that's all.
> >
> > #define pure_initcall(fn) __define_initcall("0",fn,0)
> >
> > #define core_initcall(fn) __define_initcall("1",fn,1)
> > #define core_initcall_sync(fn) __define_initcall("1s",fn,1s)
> > #define postcore_initcall(fn) __define_initcall("2",fn,2)
> > #define postcore_initcall_sync(fn) __define_initcall("2s",fn,2s)
> > #define arch_initcall(fn) __define_initcall("3",fn,3)
> > #define arch_initcall_sync(fn) __define_initcall("3s",fn,3s)
> > #define subsys_initcall(fn) __define_initcall("4",fn,4)
> > #define subsys_initcall_sync(fn) __define_initcall("4s",fn,4s)
> > #define fs_initcall(fn) __define_initcall("5",fn,5)
> > #define fs_initcall_sync(fn) __define_initcall("5s",fn,5s)
> > #define rootfs_initcall(fn) __define_initcall("rootfs",fn,rootfs)
> > #define device_initcall(fn) __define_initcall("6",fn,6)
> > #define device_initcall_sync(fn) __define_initcall("6s",fn,6s)
> > #define late_initcall(fn) __define_initcall("7",fn,7)
> > #define late_initcall_sync(fn) __define_initcall("7s",fn,7s)
> >
> > #define __initcall(fn) device_initcall(fn)
> >
> > See, we have the nicely-ordered foo_initcall()'s, and the old-fashioned
> > legacy __initcall happens to map onto device_initcall().
> >
> > Such code should use device_initcall() directly. So we see at which
> > stage in initcalls this function will be called.
>
> Yeah fair enough.
>
> A little git'ing tells me there were 31 new __initcall()'s added between
> 2.6.24 and 2.6.25, and there are 12 more lurking between 2.6.25 and
> linux-next. They're breeding!
>
> You can't stick a #warning inside a #define can you? How about:
>
> #define __initcall(fn) \
> do { \
> int Use_device_initcall_not___initcall_please; \
> device_initcall(fn); \
> } while (0)
>
> Which gives:
> warning: unused variable ______Use_device_initcall_not___initcall_please___
>
> ..
>
> Yeah OK that was a joke.
I'm sure Andy can give us a checkpatch warning when someone uses
__initcall. That'll help a bit.
^ permalink raw reply
* Re: [PATCH] Fix for OProfile callgraph for Power 64 bit user apps
From: Carl Love @ 2008-05-15 18:01 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, linux-kernel
In-Reply-To: <18476.5290.709729.582063@cargo.ozlabs.ibm.com>
On Thu, 2008-05-15 at 20:47 +1000, Paul Mackerras wrote:
> Carl Love writes:
>
> > The following patch fixes the 64 bit user code backtrace
> > which currently may hang the system.
>
> What exactly is wrong with it?
>
> Having now taken a much closer look, I now don't think Nate Case's
> patch addresses this, since it only affects constant size arguments
> <= 8 to copy_{to,from}_user_inatomic.
>
> However, I don't see why your patch fixes anything. It means we do
> two access_ok calls and two __copy_from_user_inatomic calls, for 8
> bytes, at sp and at sp + 16, rather than doing one access_ok and
> __copy_from_user_inatomic for 24 bytes at sp. Why does that make any
> difference (apart from being slower)?
>
> Paul
When I tried testing the oprofile call graph on a 64 bit app the system
consistently hung. I was able to isolate it to the
__copy_from_user_inatomic() call. When I made the change in my patch to
make sure I was only requesting one of the values (8bytes) listed in the
case statement this fixed the issue. I do not know nor was I able to
figure out why the __copy_from_user_inatomic() call failed trying to
read 24 bytes. The system would hang and any attempt to use printk to
see what was going on failed as the output of the print would not go to
the console before the system hangs.
I backed out my patch, put in Nate's patch. The call graph test ran
fine. I then backed out Nate's patch to go back and try to re-validate
that the system still hangs with the original code and it is not
hanging. Not sure why it now seems to work. I have done some other
work on the system but I don't see how that would have changed this.
Argh, I hate chasing phantom bugs! I was working on 2.6.21. I believe
the 2.6.21 kernel had not been changed. Let me load the latest 2.6.25
and start over with a pristine kernel and see if I can reproduce the
hang. Sorry for all the hassle.
Carl Love
^ 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