* RE: Porting RapidIO from ppc arch to powerpc arch in support of MPC8641D
From: Phil Terry @ 2007-05-23 15:37 UTC (permalink / raw)
To: galak; +Cc: linuxppc-dev, Zhang Wei-r63237
In-Reply-To: <Pine.LNX.4.64.0705230916170.535@localhost.localdomain>
On Wed, 2007-05-23 at 09:21 -0500, Kumar Gala wrote:
> On Wed, 23 May 2007, Zhang Wei-r63237 wrote:
>
> > > So I'm taking the boot/dts/mpc8641_hpcn.dts and producing a new
> > > mpc8641D_umem.dts with the following addition to the soc.
> > >
> > > srio@c0000 {
> > > device_type = "srio";
> > > compatible = "86xx,85xx";
>
> We really need to think about this, is their really any difference between
> srio and prio from a software view point?
I didn't mean to imply that, the above was just my strawman for
discussion purposes in my overview question. As per a suggestion I was
now calling it rapidio@c0000.
But maybe this is moot, the patches are on their way (yippee) Thanks
Zhang.
>
> > > reg = <c0000 20000>;
> > > law = <400000000 e00000000>;
> >
> > Please use range = <0 address_start size>
>
> The law should really be removed.
In my application I'm may be using a huge part of the 36-bit address
space to address multiple remote RIO boards in a peer DMA multicomputer
application. The default law just for maintenance messages isn't going
to cut it. Now I suppose we could say that my DMA oriented driver should
be responsible for another law for that purpose but that seemed wasteful
to me, there aren't that many laws to go around. So I wanted to hijack
and make this one configurable. But this was just my first idea so I'm
open to suggestions.
>
> >
> > > dbells = <0 ffff>;
> > > mboxs = <0 4>;
> >
> > The dbells and mboxs can be removed. The default setting in rio is okay.
>
> this could possibly be useful.
Again, the current setup seems to be the minimum required to support
rionet. The hardware can support multiple mailboxes as is not just mbox
0 used by rionet. As I understand it one message unit is dedicated to
mbox 0 and mboxes 1 to 63 are used by the second message unit. I want in
my application to use the "clean" mbox 0 for my apps messaging and
relegate rionet to mbox 1. So in the interests of generality I wanted to
make the number of mboxes supported configurable. Is this something I
should not do in dts but relegate somewhere else?
The doorbells is debatable. There is only a single unit supporting all
doorbells in extant hardware (AFAIK) so this was again for generality in
case a dual doorbell hw unit arrives.
>
> >
> > > interrupt-parent = <&mpic>;
> > > interrupts = <30 1 31 1 32 1 35 1 36 1 37 1 38 1>;
> > > };
> > >
> > Do you really use all of this interrupts? In my test, three <32 2 35 2
> > 36 2> are okay, and the sense is 2.
>
> I think we need to list all the interrupts possible from RIO, not just the
> ones the driver happens to use.
Sorry about the senses, again I just threw that in the email as a
strawman to kick off discussion (which now seems moot as Wei has the
patches (yippee)). The second set of interrupts 37 and 38 are for the
second message unit which I want to use (see above). 30 is for
port-write/error which I will be using to get interrupts from my
switches for topology changes. 31 is the out doorbell done which the
driver doesn't use cos of the synchronous nature of the out doorbell I
suppose.
>
> - k
>
>
^ permalink raw reply
* Re: [PATCH] powerpc timer sysdev: use mktime
From: Johannes Berg @ 2007-05-23 15:28 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <1178115942.13233.61.camel@johannes.berg>
[-- Attachment #1: Type: text/plain, Size: 2072 bytes --]
On Wed, 2007-05-02 at 16:25 +0200, Johannes Berg wrote:
> This patch makes the timer sysdev use mktime instead of rtc_tm_to_time
> by simply copying the function to avoid using rtc-lib.
I think you asked for this, any reason you then didn't take it? Just
missed? Or is something wrong with it?
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
>
> --- wireless-dev.orig/arch/powerpc/sysdev/timer.c 2007-05-02 16:16:52.639177080 +0200
> +++ wireless-dev/arch/powerpc/sysdev/timer.c 2007-05-02 16:21:56.429177080 +0200
> @@ -24,7 +24,12 @@ static int timer_resume(struct sys_devic
>
> /* get current RTC time and convert to seconds */
> get_rtc_time(&cur_rtc_tm);
> - rtc_tm_to_time(&cur_rtc_tm, &cur_rtc_time);
> + cur_rtc_time = mktime(cur_rtc_tm.tm_year + 1900,
> + cur_rtc_tm.tm_mon + 1,
> + cur_rtc_tm.tm_mday,
> + cur_rtc_tm.tm_hour,
> + cur_rtc_tm.tm_min,
> + cur_rtc_tm.tm_sec);
>
> diff = cur_rtc_time - suspend_rtc_time;
>
> @@ -44,7 +49,12 @@ static int timer_suspend(struct sys_devi
> WARN_ON(!ppc_md.get_rtc_time);
>
> get_rtc_time(&suspend_rtc_tm);
> - rtc_tm_to_time(&suspend_rtc_tm, &suspend_rtc_time);
> + suspend_rtc_time = mktime(suspend_rtc_tm.tm_year + 1900,
> + suspend_rtc_tm.tm_mon + 1,
> + suspend_rtc_tm.tm_mday,
> + suspend_rtc_tm.tm_hour,
> + suspend_rtc_tm.tm_min,
> + suspend_rtc_tm.tm_sec);
>
> return 0;
> }
> --- wireless-dev.orig/arch/powerpc/Kconfig 2007-05-02 16:22:07.619177080 +0200
> +++ wireless-dev/arch/powerpc/Kconfig 2007-05-02 16:22:12.759177080 +0200
> @@ -11,11 +11,6 @@ config PPC64
> This option selects whether a 32-bit or a 64-bit kernel
> will be built.
>
> -config PPC_PM_NEEDS_RTC_LIB
> - bool
> - select RTC_LIB
> - default y if PM
> -
> config PPC32
> bool
> default y if !PPC64
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply
* Please pull powerpc.git for_paulus branch
From: Kumar Gala @ 2007-05-23 14:53 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Please pull from 'for_paulus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git for_paulus
to receive the following updates:
arch/powerpc/Kconfig | 1 +
arch/powerpc/boot/dts/lite5200.dts | 2 +-
arch/powerpc/boot/dts/lite5200b.dts | 2 +-
arch/powerpc/mm/pgtable_32.c | 2 +-
arch/powerpc/platforms/chrp/pegasos_eth.c | 2 +-
arch/powerpc/platforms/powermac/setup.c | 2 +-
arch/powerpc/sysdev/qe_lib/Kconfig | 4 +---
arch/ppc/kernel/entry.S | 18 +++++++++++++++---
arch/ppc/kernel/ppc_ksyms.c | 2 --
arch/ppc/mm/hashtable.S | 20 ++++++++++++++++----
arch/ppc/mm/pgtable.c | 2 +-
drivers/macintosh/Kconfig | 1 -
drivers/net/Kconfig | 1 -
13 files changed, 39 insertions(+), 20 deletions(-)
Domen Puncer (1):
[POWERPC] 52xx: unbreak lite5200 dts (_pic vs. -pic)
Kumar Gala (5):
[PPC] Fix COMMON symbol warnings
[PPC] Remove duplicate export of __div64_32.
[POWERPC] Fix modpost warning
[PPC] Fix modpost warning
[POWERPC] Fix Kconfig warning
Li Yang (1):
[POWERPC] Fix Section mismatch warnings
Timur Tabi (1):
[POWERPC] QE: fix Kconfig 'select' warning with UCC_FAST
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 56d3c0d..5eaeafd 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -118,6 +118,7 @@ config GENERIC_BUG
depends on BUG
config SYS_SUPPORTS_APM_EMULATION
+ default y if PMAC_APM_EMU
bool
config DEFAULT_UIMAGE
diff --git a/arch/powerpc/boot/dts/lite5200.dts b/arch/powerpc/boot/dts/lite5200.dts
index eae68ab..d29308f 100644
--- a/arch/powerpc/boot/dts/lite5200.dts
+++ b/arch/powerpc/boot/dts/lite5200.dts
@@ -67,7 +67,7 @@
interrupt-controller;
#interrupt-cells = <3>;
device_type = "interrupt-controller";
- compatible = "mpc5200_pic";
+ compatible = "mpc5200-pic";
reg = <500 80>;
built-in;
};
diff --git a/arch/powerpc/boot/dts/lite5200b.dts b/arch/powerpc/boot/dts/lite5200b.dts
index 5185625..f242531 100644
--- a/arch/powerpc/boot/dts/lite5200b.dts
+++ b/arch/powerpc/boot/dts/lite5200b.dts
@@ -67,7 +67,7 @@
interrupt-controller;
#interrupt-cells = <3>;
device_type = "interrupt-controller";
- compatible = "mpc5200b-pic\0mpc5200_pic";
+ compatible = "mpc5200b-pic\0mpc5200-pic";
reg = <500 80>;
built-in;
};
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index d8232b7..f6ae1a5 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -93,7 +93,7 @@ void pgd_free(pgd_t *pgd)
free_pages((unsigned long)pgd, PGDIR_ORDER);
}
-pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
+__init_refok pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
{
pte_t *pte;
extern int mem_init_done;
diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c b/arch/powerpc/platforms/chrp/pegasos_eth.c
index 7104567..5bcc58d 100644
--- a/arch/powerpc/platforms/chrp/pegasos_eth.c
+++ b/arch/powerpc/platforms/chrp/pegasos_eth.c
@@ -169,7 +169,7 @@ static int Enable_SRAM(void)
/***********/
/***********/
-int mv643xx_eth_add_pds(void)
+static int __init mv643xx_eth_add_pds(void)
{
int ret = 0;
static struct pci_device_id pci_marvell_mv64360[] = {
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index a410bc7..07b1c4e 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -384,7 +384,7 @@ int boot_part;
static dev_t boot_dev;
#ifdef CONFIG_SCSI
-void __init note_scsi_host(struct device_node *node, void *host)
+void note_scsi_host(struct device_node *node, void *host)
{
int l;
char *p;
diff --git a/arch/powerpc/sysdev/qe_lib/Kconfig b/arch/powerpc/sysdev/qe_lib/Kconfig
index 887739f..f611d34 100644
--- a/arch/powerpc/sysdev/qe_lib/Kconfig
+++ b/arch/powerpc/sysdev/qe_lib/Kconfig
@@ -5,15 +5,13 @@
config UCC_SLOW
bool
default n
- select UCC
help
This option provides qe_lib support to UCC slow
protocols: UART, BISYNC, QMC
config UCC_FAST
bool
- default n
- select UCC
+ default y if UCC_GETH
help
This option provides qe_lib support to UCC fast
protocols: HDLC, Ethernet, ATM, transparent
diff --git a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S
index ab64256..fba7ca1 100644
--- a/arch/ppc/kernel/entry.S
+++ b/arch/ppc/kernel/entry.S
@@ -596,7 +596,11 @@ fast_exception_return:
mr r12,r4 /* restart at exc_exit_restart */
b 2b
- .comm fee_restarts,4
+ .section .bss
+ .align 2
+fee_restarts:
+ .space 4
+ .previous
/* aargh, a nonrecoverable interrupt, panic */
/* aargh, we don't know which trap this is */
@@ -851,7 +855,11 @@ load_dbcr0:
mtspr SPRN_DBSR,r11 /* clear all pending debug events */
blr
- .comm global_dbcr0,8
+ .section .bss
+ .align 4
+global_dbcr0:
+ .space 8
+ .previous
#endif /* !(CONFIG_4xx || CONFIG_BOOKE) */
do_work: /* r10 contains MSR_KERNEL here */
@@ -926,4 +934,8 @@ END_FTR_SECTION_IFSET(CPU_FTR_601)
/* shouldn't return */
b 4b
- .comm ee_restarts,4
+ .section .bss
+ .align 2
+ee_restarts:
+ .space 4
+ .previous
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index 4ad4996..a416520 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -40,7 +40,6 @@
#include <asm/time.h>
#include <asm/cputable.h>
#include <asm/btext.h>
-#include <asm/div64.h>
#include <asm/xmon.h>
#include <asm/signal.h>
#include <asm/dcr.h>
@@ -93,7 +92,6 @@ EXPORT_SYMBOL(strncpy);
EXPORT_SYMBOL(strcat);
EXPORT_SYMBOL(strlen);
EXPORT_SYMBOL(strcmp);
-EXPORT_SYMBOL(__div64_32);
EXPORT_SYMBOL(csum_partial);
EXPORT_SYMBOL(csum_partial_copy_generic);
diff --git a/arch/ppc/mm/hashtable.S b/arch/ppc/mm/hashtable.S
index e756942..5f364dc 100644
--- a/arch/ppc/mm/hashtable.S
+++ b/arch/ppc/mm/hashtable.S
@@ -30,7 +30,11 @@
#include <asm/asm-offsets.h>
#ifdef CONFIG_SMP
- .comm mmu_hash_lock,4
+ .section .bss
+ .align 2
+ .globl mmu_hash_lock
+mmu_hash_lock:
+ .space 4
#endif /* CONFIG_SMP */
/*
@@ -461,9 +465,17 @@ found_slot:
sync /* make sure pte updates get to memory */
blr
- .comm next_slot,4
- .comm primary_pteg_full,4
- .comm htab_hash_searches,4
+ .section .bss
+ .align 2
+next_slot:
+ .space 4
+ .globl primary_pteg_full
+primary_pteg_full:
+ .space 4
+ .globl htab_hash_searches
+htab_hash_searches:
+ .space 4
+ .previous
/*
* Flush the entry for a particular page from the hash table.
diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c
index c023b72..35ebb63 100644
--- a/arch/ppc/mm/pgtable.c
+++ b/arch/ppc/mm/pgtable.c
@@ -92,7 +92,7 @@ void pgd_free(pgd_t *pgd)
free_pages((unsigned long)pgd, PGDIR_ORDER);
}
-pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
+__init_refok pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
{
pte_t *pte;
extern int mem_init_done;
diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig
index 58926da..f44c94a 100644
--- a/drivers/macintosh/Kconfig
+++ b/drivers/macintosh/Kconfig
@@ -113,7 +113,6 @@ config PMAC_SMU
config PMAC_APM_EMU
tristate "APM emulation"
- select SYS_SUPPORTS_APM_EMULATION
select APM_EMULATION
depends on ADB_PMU && PM
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index c5baa19..3b204ba 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2280,7 +2280,6 @@ config GFAR_NAPI
config UCC_GETH
tristate "Freescale QE Gigabit Ethernet"
depends on QUICC_ENGINE
- select UCC_FAST
help
This driver supports the Gigabit Ethernet mode of the QUICC Engine,
which is available on some Freescale SOCs.
^ permalink raw reply related
* RE: Porting RapidIO from ppc arch to powerpc arch in support of MPC8641D
From: Kumar Gala @ 2007-05-23 14:21 UTC (permalink / raw)
To: Zhang Wei-r63237; +Cc: linuxppc-dev
In-Reply-To: <46B96294322F7D458F9648B60E15112C234AE6@zch01exm26.fsl.freescale.net>
On Wed, 23 May 2007, Zhang Wei-r63237 wrote:
> > So I'm taking the boot/dts/mpc8641_hpcn.dts and producing a new
> > mpc8641D_umem.dts with the following addition to the soc.
> >
> > srio@c0000 {
> > device_type = "srio";
> > compatible = "86xx,85xx";
We really need to think about this, is their really any difference between
srio and prio from a software view point?
> > reg = <c0000 20000>;
> > law = <400000000 e00000000>;
>
> Please use range = <0 address_start size>
The law should really be removed.
>
> > dbells = <0 ffff>;
> > mboxs = <0 4>;
>
> The dbells and mboxs can be removed. The default setting in rio is okay.
this could possibly be useful.
>
> > interrupt-parent = <&mpic>;
> > interrupts = <30 1 31 1 32 1 35 1 36 1 37 1 38 1>;
> > };
> >
> Do you really use all of this interrupts? In my test, three <32 2 35 2
> 36 2> are okay, and the sense is 2.
I think we need to list all the interrupts possible from RIO, not just the
ones the driver happens to use.
- k
^ permalink raw reply
* Re: Kconfig warnings on latest GIT
From: Johannes Berg @ 2007-05-23 14:26 UTC (permalink / raw)
To: Kumar Gala
Cc: Linux Kernel Development, ppc-dev dev ML, Simon Horman,
Geert Uytterhoeven, Paul Mackerras
In-Reply-To: <Pine.LNX.4.64.0705230913420.535@localhost.localdomain>
[-- Attachment #1: Type: text/plain, Size: 580 bytes --]
On Wed, 2007-05-23 at 09:14 -0500, Kumar Gala wrote:
> On Wed, 23 May 2007, Johannes Berg wrote:
>
> > On Wed, 2007-05-23 at 07:37 -0500, Kumar Gala wrote:
> >
> > > Was my patch ok, if so I'll push it up through my git tree to paul?
> >
> > Yeah, looks fine to me, or will the ARCH=ppc folks then scream and want
> > that added to the Kconfig there as well?
>
> I can't imagine they will since pmac is only supported in ARCH=powerpc.
Oh right, that was the point of not mentioning
SYS_SUPPORTS_APM_EMULATION any more in the drivers/macintosh/Kconfig
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply
* Re: Kconfig warnings on latest GIT
From: Kumar Gala @ 2007-05-23 14:14 UTC (permalink / raw)
To: Johannes Berg
Cc: Linux Kernel Development, ppc-dev dev ML, Simon Horman,
Geert Uytterhoeven, Paul Mackerras
In-Reply-To: <1179928646.14317.6.camel@johannes.berg>
On Wed, 23 May 2007, Johannes Berg wrote:
> On Wed, 2007-05-23 at 07:37 -0500, Kumar Gala wrote:
>
> > Was my patch ok, if so I'll push it up through my git tree to paul?
>
> Yeah, looks fine to me, or will the ARCH=ppc folks then scream and want
> that added to the Kconfig there as well?
I can't imagine they will since pmac is only supported in ARCH=powerpc.
- k
^ permalink raw reply
* RE: Porting RapidIO from ppc arch to powerpc arch in support of MPC8641D
From: Zhang Wei-r63237 @ 2007-05-23 14:03 UTC (permalink / raw)
To: Mark A. Greer; +Cc: linuxppc-dev
In-Reply-To: <20070523133238.GB942@mag.az.mvista.com>
Hi, Mark
Yes, I'm glad to share it. I have added the memory mapping codes into
it.
These codes are reviewing and testing with our engineers. Could you
waiting for a little while? It will be soon.
Best Regards,
Zhang Wei
> -----Original Message-----
> From: Mark A. Greer [mailto:mgreer@mvista.com]=20
> Sent: Wednesday, May 23, 2007 9:33 PM
> To: Zhang Wei-r63237
> Cc: pterry@micromemory.com; linuxppc-dev@ozlabs.org
> Subject: Re: Porting RapidIO from ppc arch to powerpc arch in=20
> support of MPC8641D
>=20
> On Wed, May 23, 2007 at 09:26:59PM +0800, Zhang Wei-r63237 wrote:
> > I've finished the porting RIO from ppc to powerpc, do you need some
> > helps?
>=20
> Care to share the patches?
>=20
> Mark
>=20
^ permalink raw reply
* RE: TSI ethernet PHY question
From: Alexandre Bounine @ 2007-05-23 13:43 UTC (permalink / raw)
To: Benjamin Herrenschmidt, tie-fei.zang; +Cc: linuxppc-dev list, David Gibson
In-Reply-To: <1179903798.32247.918.camel@localhost.localdomain>
Hi Ben,
The BCM PHY workaround is exactly for the Holly board with BCM5461A on
it. The BCM54xx option which is confusing in this context originally
was used with board type option (other boards used BCM PHY). The
workaround added for Holly is caused by use of BCM5461A
Quality/TXC_RXC_DELAY pin.
This pin is a dual function pin. In normal operation, it is used to
drive an LED to indicate signal quality. The LED connected to this pin
acts as a pull up to VCC.
On power up, because this pin is pulled high by the LED, the
TXC_RXC_DELAY mode is enabled, causing a 1.9ns delay between the clock
and data on the GMII interface. Tsi109 could not operate properly with
this delay. The TXC_RXC_DELAY mode has to be disabled by software.
If the Quality/TXC_RXC_DELAY pin is left not connected PHY will work in
normal mode without delay and therefore the workaround is not required.
=20
>>In addition I'd like to know if the driver is known to be used in
>>situations where the PHY ID cannot be probed via MDIO ?=20
No.
>>I'm basically contemplating moving the driver to the generic phylib,
>>which would mean adding a phylib specific driver for that broadcom
chip
>>that contains that workaround, but I need to know which exact chip=20=20
>>revision needs it.
I think that for situations like one on the Holly board we may need
board-specific hooks which modify normal initialization. As in our case:
no LED - no trouble.
I have put into my plans switching Tsi108/9 driver to common PHY lib
(after Josh released his patch for Holly) but it looks like you will
beat me here - I still have to close some other tasks. Let me know if I
can help with anything around Tsi109.
Alex.
=20
-----Original Message-----
From: Benjamin Herrenschmidt [mailto:benh@kernel.crashing.org]=20
Sent: Wednesday, May 23, 2007 3:03 AM
To: tie-fei.zang@freescale.com; Alexandre Bounine
Cc: linuxppc-dev list; David Gibson
Subject: TSI ethernet PHY question
Hi Folks !
While investigating some trouble we've had with networking on an Holly
eval board (TSI109 with IBM 750CL and Broadcom 5461A), I've had a look
at the PHY management code. There, it has a little workaround for
BCM54xx PHYs writing some hard coded values to some broadcom private
registers.
It's my experience that every revision of broadcom PHY around needs
different workarounds in different places though. Thus, I'd like to
better understand:
- What is this workaround necessary for ?
- What exact PHY model & version is it for ?
In addition I'd like to know if the driver is known to be used in
situations where the PHY ID cannot be probed via MDIO ?
I'm basically contemplating moving the driver to the generic phylib,
which would mean adding a phylib specific driver for that broadcom chip
that contains that workaround, but I need to know which exact chip
revision needs it. There are lots of BCM 54xx and I'm pretty sure for
example that this won't be needed on a BCM 5411 for example (or a
different one). In fact, I do intend to port sungem to phylib as well
which mean that I'll dump a whole load of BCM PHY specific drivers in
there.
Cheers,
Ben.
=20
---=0D
=0D
Important Notice: This message is intended for the use of the individual to=
whom it is addressed and may contain information which is privileged, conf=
idential and/or exempt from disclosure under applicable law. If the reader =
of this message is not the intended recipient, or is not the employee or ag=
ent responsible for delivering the message to the intended recipient, you a=
re hereby notified that any dissemination, distribution, or copying of this=
communication is strictly prohibited. If you have received this communicat=
ion in error, please notify the sender immediately by telephone or return e=
-mail and delete the original message from your systems. Thank you. =0D
^ permalink raw reply
* Re: Kconfig warnings on latest GIT
From: Johannes Berg @ 2007-05-23 13:57 UTC (permalink / raw)
To: Kumar Gala
Cc: Linux Kernel Development, ppc-dev dev ML, Simon Horman,
Geert Uytterhoeven, Paul Mackerras
In-Reply-To: <943F0161-121D-4697-AE69-78BD605A8033@kernel.crashing.org>
[-- Attachment #1: Type: text/plain, Size: 256 bytes --]
On Wed, 2007-05-23 at 07:37 -0500, Kumar Gala wrote:
> Was my patch ok, if so I'll push it up through my git tree to paul?
Yeah, looks fine to me, or will the ARCH=ppc folks then scream and want
that added to the Kconfig there as well?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply
* Re: Porting RapidIO from ppc arch to powerpc arch in support of MPC8641D
From: Mark A. Greer @ 2007-05-23 13:32 UTC (permalink / raw)
To: Zhang Wei-r63237; +Cc: linuxppc-dev
In-Reply-To: <46B96294322F7D458F9648B60E15112C234AE6@zch01exm26.fsl.freescale.net>
On Wed, May 23, 2007 at 09:26:59PM +0800, Zhang Wei-r63237 wrote:
> I've finished the porting RIO from ppc to powerpc, do you need some
> helps?
Care to share the patches?
Mark
^ permalink raw reply
* RE: Porting RapidIO from ppc arch to powerpc arch in support of MPC8641D
From: Zhang Wei-r63237 @ 2007-05-23 13:26 UTC (permalink / raw)
To: pterry, linuxppc-dev
In-Reply-To: <1179862732.25914.40.camel@pterry-fc6.micromemory.com>
> So I'm taking the boot/dts/mpc8641_hpcn.dts and producing a new
> mpc8641D_umem.dts with the following addition to the soc.
>=20
> srio@c0000 {
> device_type =3D "srio";
> compatible =3D "86xx,85xx";
> reg =3D <c0000 20000>;
> law =3D <400000000 e00000000>;
Please use range =3D <0 address_start size>
> dbells =3D <0 ffff>;
> mboxs =3D <0 4>;
The dbells and mboxs can be removed. The default setting in rio is okay.
> interrupt-parent =3D <&mpic>;
> interrupts =3D <30 1 31 1 32 1 35 1 36 1 37 1 38 1>;
> };
>=20
Do you really use all of this interrupts? In my test, three <32 2 35 2
36 2> are okay, and the sense is 2.
I've finished the porting RIO from ppc to powerpc, do you need some
helps?
Best Regards,
Zhang Wei
^ permalink raw reply
* Re: [PATCH] unbreak lite5200 dts (_pic vs. -pic)
From: Kumar Gala @ 2007-05-23 12:44 UTC (permalink / raw)
To: Domen Puncer; +Cc: Sylvain Munaut, linuxppc-embedded
In-Reply-To: <20070521065600.GD20713@moe.telargo.com>
On Mon, 21 May 2007, Domen Puncer wrote:
> Unbreak lite5200 dts, which were broken by
> 5c1992f83304cf2d56934dd6c06709b96e1b0c81
>
>
> Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
applied.
- k
^ permalink raw reply
* Re: Kconfig warnings on latest GIT
From: Kumar Gala @ 2007-05-23 12:37 UTC (permalink / raw)
To: Johannes Berg
Cc: Linux Kernel Development, ppc-dev dev ML, Simon Horman,
Geert Uytterhoeven, Paul Mackerras
In-Reply-To: <1179159951.2647.49.camel@johannes.berg>
On May 14, 2007, at 11:25 AM, Johannes Berg wrote:
> On Mon, 2007-05-14 at 09:24 -0500, Kumar Gala wrote:
>
>> this was my fix which looks pretty much the same.
>
> [...]
>
> Great, thanks.
>
> johannes
Was my patch ok, if so I'll push it up through my git tree to paul?
- k
^ permalink raw reply
* Re: anyone have a good config file for a taiga/hpc2 with a 7448?
From: Kumar Gala @ 2007-05-23 12:06 UTC (permalink / raw)
To: Leisner, Martin; +Cc: linuxppc-embedded
In-Reply-To: <556445368AFA1C438794ABDA8901891C034458D9@usa0300ms03.na.xerox.net>
On May 22, 2007, at 1:41 PM, Leisner, Martin wrote:
> Before I tried to do one myself, I figured I'd bounce it off to see if
> anyone has a working
> .config (the newer kernel, the better).
Does arch/powerpc/configs/mpc7448_hpc2_defconfig not work for you?
- k
^ permalink raw reply
* Re: [Patch 2/2] Kexec/Kdump support - POWER6
From: Paul Mackerras @ 2007-05-23 10:55 UTC (permalink / raw)
To: sachinp; +Cc: Olof Johansson, linuxppc-dev, ellerman, Milton Miller II
In-Reply-To: <46540B6F.6030300@in.ibm.com>
Sachin P. Sant writes:
> On Power machines supporting VRMA, Kexec/Kdump does not work.
> Hypervisor stores VRMA mapping used by the OS, in the hpte hash
> tables. Make sure these hpte entries are left untouched.
Surely all we need to do is to avoid clearing the VRMA entries. We
can do this by not clearing any HPTE where the top 40 bits of the
first dword are 0x4001ffffff (B=1 for a 1TB segment and the
0x0001ffffff special VSID). In fact we can avoid having to read each
entry by doing the H_REMOVEs with H_ANDCOND and the bolted bit when we
clear the hash table, and only reading the HPTEs for which the
H_REMOVE returns an error.
Paul.
^ permalink raw reply
* HIGHMEM on 440EPx board with 1GB of RAM
From: Matthias Fuchs @ 2007-05-23 9:41 UTC (permalink / raw)
To: Linux PPC Linux PPC
Hi,
I ran into some trouble with a custom 440EPx board that uses 1GB of RAM
(SO-DIMM module). The board and kernel port is very identical to the AMCC
sequoia board.
The kernel (recent version from Denx 2.6 repository) is configured with
HIGHMEM support.
The most obvious problems are crashes when accessing yaffs2 partitions on NAND
flashes. This seems to be no NAND or yaffs filesystem issue.
My problems dissapear when passing the mem= kernel parameter with mem=768M.
In general the system is stable with the full gig of ram and e.g. not using
yaffs. So I do not believe in a hardware issue.
Can anybody give me a hint where I should start to investigate ?
Matthias
^ permalink raw reply
* [Patch 2/2] Kexec/Kdump support - POWER6
From: Sachin P. Sant @ 2007-05-23 9:37 UTC (permalink / raw)
To: Olof Johansson, Paul Mackerras; +Cc: linuxppc-dev, ellerman, Milton Miller II
In-Reply-To: <20070522153419.GA22047@lixom.net>
[-- Attachment #1: Type: text/plain, Size: 287 bytes --]
On Power machines supporting VRMA, Kexec/Kdump does not work.
Hypervisor stores VRMA mapping used by the OS, in the hpte hash
tables. Make sure these hpte entries are left untouched.
This patch also adds plpar_pte_read_raw() on the lines of
plpar_pte_remove_raw().
Thanks
-Sachin
[-- Attachment #2: kexec-kdump-support-on-POWER6 --]
[-- Type: text/plain, Size: 3525 bytes --]
* On Power machines supporting VRMA, Kexec/Kdump does not work.
* Hypervisor stores VRMA mapping used by the OS, in the hpte hash tables.
* Make sure these hpte entries are left untouched.
Signed-off-by : Sachin Sant <sachinp@in.ibm.com>
Signed-off-by : Mohan Kumar M <mohan@in.ibm.com>
---
diff -Naurp linux-2.6.22-rc2-vrma/arch/powerpc/platforms/pseries/lpar.c linux-2.6.22-rc2-kexec/arch/powerpc/platforms/pseries/lpar.c
--- linux-2.6.22-rc2-vrma/arch/powerpc/platforms/pseries/lpar.c 2007-05-19 09:36:17.000000000 +0530
+++ linux-2.6.22-rc2-kexec/arch/powerpc/platforms/pseries/lpar.c 2007-05-23 13:47:54.000000000 +0530
@@ -369,6 +369,62 @@ static long pSeries_lpar_hpte_remove(uns
return -1;
}
+#define VRMA_VPN ASM_CONST(0x001FFFFFF0000000)
+#define VRMA_MASK ASM_CONST(0xc000000000000000)
+#define VRMA_HPTE_B_1TB ASM_CONST(0x4000000000000000)
+#define VRMA_NUM 16
+
+unsigned long hpte_vrma_slots[VRMA_NUM];
+unsigned int num_hpte_vrma_slots = 0;
+
+static void pSeries_save_hpte_vrma(void)
+{
+ unsigned int step;
+ unsigned long hash, slot, vaddr;
+ unsigned long dword0, dummy1, rma_size;
+ long lpar_rc;
+ int i;
+
+ /* Get the RMA size */
+ rma_size = lmb.rmo_size;
+
+ /* Get the VRMA page size */
+ step = 1 << ppc64_vrma_page_shift;
+
+ vaddr = VRMA_VPN + rma_size;
+
+ /* Find hpte's with VRMA mappings */
+ for (; vaddr >= VRMA_VPN; vaddr -= step) {
+ hash = hpt_hash(vaddr, ppc64_vrma_page_shift);
+ slot = ((hash & htab_hash_mask) * HPTES_PER_GROUP);
+
+ for (i = 0; i < HPTES_PER_GROUP; i++) {
+ lpar_rc = plpar_pte_read_raw(0, slot,
+ &dword0, &dummy1);
+ if (!lpar_rc && dword0 &&
+ ((dword0 & VRMA_MASK) == VRMA_HPTE_B_1TB) &&
+ (num_hpte_vrma_slots < VRMA_NUM)) {
+ /* store the hpte */
+ hpte_vrma_slots[num_hpte_vrma_slots++] = slot;
+ break;
+ }
+ slot++;
+ }
+ }
+}
+
+static inline int check_vrma_slot(int slot)
+{
+ int j;
+
+ for (j = 0; j < num_hpte_vrma_slots; j++)
+ if (hpte_vrma_slots[j] == slot)
+ return 1;
+
+ return 0;
+
+}
+
static void pSeries_lpar_hptab_clear(void)
{
unsigned long size_bytes = 1UL << ppc64_pft_size;
@@ -376,9 +432,16 @@ static void pSeries_lpar_hptab_clear(voi
unsigned long dummy1, dummy2;
int i;
+ if (have_vrma)
+ pSeries_save_hpte_vrma();
+
/* TODO: Use bulk call */
- for (i = 0; i < hpte_count; i++)
+ for (i = 0; i < hpte_count; i++) {
+ if (have_vrma && check_vrma_slot(i))
+ /* You don't want to remove this hpte */
+ continue;
plpar_pte_remove_raw(0, i, 0, &dummy1, &dummy2);
+ }
}
/*
diff -Naurp linux-2.6.22-rc2-vrma/arch/powerpc/platforms/pseries/plpar_wrappers.h linux-2.6.22-rc2-kexec/arch/powerpc/platforms/pseries/plpar_wrappers.h
--- linux-2.6.22-rc2-vrma/arch/powerpc/platforms/pseries/plpar_wrappers.h 2007-05-19 09:36:17.000000000 +0530
+++ linux-2.6.22-rc2-kexec/arch/powerpc/platforms/pseries/plpar_wrappers.h 2007-05-23 11:38:12.000000000 +0530
@@ -108,6 +108,21 @@ static inline long plpar_pte_read(unsign
return rc;
}
+/* plpar_pte_read_raw can be called in real mode. It calls plpar_hcall_raw */
+static inline long plpar_pte_read_raw(unsigned long flags, unsigned long ptex,
+ unsigned long *old_pteh_ret, unsigned long *old_ptel_ret)
+{
+ long rc;
+ unsigned long retbuf[PLPAR_HCALL_BUFSIZE];
+
+ rc = plpar_hcall_raw(H_READ, retbuf, flags, ptex);
+
+ *old_pteh_ret = retbuf[0];
+ *old_ptel_ret = retbuf[1];
+
+ return rc;
+}
+
static inline long plpar_pte_protect(unsigned long flags, unsigned long ptex,
unsigned long avpn)
{
^ permalink raw reply
* [Patch 1/2] Kexec/Kdump support POWER6
From: Sachin P. Sant @ 2007-05-23 9:34 UTC (permalink / raw)
To: linuxppc-dev, Paul Mackerras; +Cc: Olof Johansson, Milton Miller II
[-- Attachment #1: Type: text/plain, Size: 67 bytes --]
Read supported VRMA page size from device tree.
Thanks
-Sachin
[-- Attachment #2: detect-vrma-page-size --]
[-- Type: text/plain, Size: 2012 bytes --]
* Read supported VRMA page size from device tree.
Signed-Off-By : Sachin Sant <sachinp@in.ibm.com>
Signed-Off-By : Mohan Kumar M <mohan@in.ibm.com>
---
diff -Naurp linux-2.6.22-rc2/arch/powerpc/kernel/setup_64.c linux-2.6.22-rc2-vrma/arch/powerpc/kernel/setup_64.c
--- linux-2.6.22-rc2/arch/powerpc/kernel/setup_64.c 2007-05-19 09:36:17.000000000 +0530
+++ linux-2.6.22-rc2-vrma/arch/powerpc/kernel/setup_64.c 2007-05-23 11:25:45.000000000 +0530
@@ -73,6 +73,10 @@ int have_of = 1;
int boot_cpuid = 0;
u64 ppc64_pft_size;
+/* For VRMA */
+u64 ppc64_vrma_page_shift;
+int have_vrma = 0;
+
/* Pick defaults since we might want to patch instructions
* before we've read this from the device tree.
*/
diff -Naurp linux-2.6.22-rc2/arch/powerpc/mm/hash_utils_64.c linux-2.6.22-rc2-vrma/arch/powerpc/mm/hash_utils_64.c
--- linux-2.6.22-rc2/arch/powerpc/mm/hash_utils_64.c 2007-05-19 09:36:17.000000000 +0530
+++ linux-2.6.22-rc2-vrma/arch/powerpc/mm/hash_utils_64.c 2007-05-23 11:26:03.000000000 +0530
@@ -199,6 +199,13 @@ static int __init htab_dt_scan_page_size
if (type == NULL || strcmp(type, "cpu") != 0)
return 0;
+ prop = (u32 *)of_get_flat_dt_prop(node, "ibm,vrma-page-sizes", &size);
+ if (prop != NULL) {
+ DBG("VRMA Page size from device-tree:\n");
+ ppc64_vrma_page_shift = prop[0];
+ have_vrma = 1;
+ }
+
prop = (u32 *)of_get_flat_dt_prop(node,
"ibm,segment-page-sizes", &size);
if (prop != NULL) {
diff -Naurp linux-2.6.22-rc2/include/asm-powerpc/page_64.h linux-2.6.22-rc2-vrma/include/asm-powerpc/page_64.h
--- linux-2.6.22-rc2/include/asm-powerpc/page_64.h 2007-05-19 09:36:17.000000000 +0530
+++ linux-2.6.22-rc2-vrma/include/asm-powerpc/page_64.h 2007-05-23 11:25:27.000000000 +0530
@@ -76,6 +76,10 @@ static inline void copy_page(void *to, v
/* Log 2 of page table size */
extern u64 ppc64_pft_size;
+/* For VRMA */
+extern u64 ppc64_vrma_page_shift;
+extern int have_vrma;
+
/* Large pages size */
#ifdef CONFIG_HUGETLB_PAGE
extern unsigned int HPAGE_SHIFT;
^ permalink raw reply
* [Patch 0/2] Kexec/Kdump support POWER6
From: Sachin P. Sant @ 2007-05-23 9:32 UTC (permalink / raw)
To: linuxppc-dev, paulus; +Cc: Olof Johansson, Milton Miller II, ellerman
Here is updated set of patches which adds kdump support for Power6.
The first patch reads VRMA page size from device tree.
Second patch adds Kexec/Kdump support for Power6 processor.
On Power machines supporting VRMA, Kexec/Kdump does not work.
Hypervisor stores VRMA mapping used by the OS, in the hpte
hash tables. This patch makes sure these hpte entries are
left untouched.
Thanks
-Sachin
Signed-off-by : Sachin Sant <sachinp@in.ibm.com>
Signed-off-by : Mohan Kumar M <mohan@in.ibm.com>
---
^ permalink raw reply
* Re: fsl booke MM vs. SMP questions
From: Gabriel Paubert @ 2007-05-23 9:12 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: ppc-dev, Dave Liu, Paul Mackerras, Kumar Gala
In-Reply-To: <1179828342.32247.832.camel@localhost.localdomain>
On Tue, May 22, 2007 at 08:05:42PM +1000, Benjamin Herrenschmidt wrote:
> On Tue, 2007-05-22 at 12:02 +0200, Gabriel Paubert wrote:
> >
> > Well, there should always be an stwcx. to clear reservation before
> > any interrupt return. Otherwise you'll be able to cause hard to
> > reproduce bugs in the interrupted code.
>
> Well, that's the point. The BookE TLB refill exception is a very fast
> path that doesn't use the normal interrupt return code path. It thus
> needs to be careful about not leaving dangling reservations.
Ok, thanks. I missed that critical piece of information from
the context. In this case it makes sense, although I wonder
if a different order of instructions could shave some latency
from the critical path:
1 - rX = read PTE value (normal load)
2 - if (!_PAGE_PRESENT)) -> out
3 - rY = rX | _PAGE_ACCESSED
4 - if (rX != rY)
Specifically here, I wonder whether instead of the sequence:
ori ry, rx, PAGE_ACCESSED
cmpw rx, ry
beq 11f ; Needs non-default static prediction?
it might be better to write it as:
andi. rz, rx, PAGE_ACCESSED
ori ry, rx, PAGE_ACCESSED
bne 11f
since on some processors the branch might be resolved one cycle
earlier. But I don't know very well the processors with these MMU.
5 - rZ = lwarx PTE value
6 - if (rZ != rX)
7 - stdcx. PTE, rZ (rewrite just read value to clear reserv)
Hmm, lWarx paired with stDcx., looks like a typo ?
8 - goto 1 (try again)
9 - stdcx. PTE, rY
Ditto.
10 - if failed -> goto 1 (try again)
11 - that's it !
I suspect that in the TLB handler, you've got something
like 4 registers and one CR field to play with. So more
clever solutions may be impossible to implement.
> On some CPUs, there are also performance issues with leaving dangling
> lwarx iirc but I don't have the details off the top of my mind.
>
I don't know of any, but I almost exclusively use 603e and 750.
Gabriel
^ permalink raw reply
* [PATCH 1/1] Update documentation for of_find_node_by_type()
From: Michael Ellerman @ 2007-05-23 8:08 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
The documentation for of_find_node_by_type() incorrectly refers to the
"name" parameter - it should be "type".
Also the behaviour when from == NULL is not really documented, fix that.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
arch/powerpc/kernel/prom.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index c065b55..a589b42 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1171,11 +1171,12 @@ EXPORT_SYMBOL(of_find_node_by_name);
/**
* of_find_node_by_type - Find a node by its "device_type" property
- * @from: The node to start searching from or NULL, the node
- * you pass will not be searched, only the next one
- * will; typically, you pass what the previous call
- * returned. of_node_put() will be called on it
- * @name: The type string to match against
+ * @from: The node to start searching from, or NULL to start searching
+ * the entire device tree. The node you pass will not be
+ * searched, only the next one will; typically, you pass
+ * what the previous call returned. of_node_put() will be
+ * called on from for you.
+ * @type: The type string to match against
*
* Returns a node pointer with refcount incremented, use
* of_node_put() on it when done.
--
1.5.1.3.g7a33b
^ permalink raw reply related
* TSI ethernet PHY question
From: Benjamin Herrenschmidt @ 2007-05-23 7:03 UTC (permalink / raw)
To: tie-fei.zang, alexandre.bounine; +Cc: linuxppc-dev list, David Gibson
Hi Folks !
While investigating some trouble we've had with networking on an Holly
eval board (TSI109 with IBM 750CL and Broadcom 5461A), I've had a look
at the PHY management code. There, it has a little workaround for
BCM54xx PHYs writing some hard coded values to some broadcom private
registers.
It's my experience that every revision of broadcom PHY around needs
different workarounds in different places though. Thus, I'd like to
better understand:
- What is this workaround necessary for ?
- What exact PHY model & version is it for ?
In addition I'd like to know if the driver is known to be used in
situations where the PHY ID cannot be probed via MDIO ?
I'm basically contemplating moving the driver to the generic phylib,
which would mean adding a phylib specific driver for that broadcom chip
that contains that workaround, but I need to know which exact chip
revision needs it. There are lots of BCM 54xx and I'm pretty sure for
example that this won't be needed on a BCM 5411 for example (or a
different one). In fact, I do intend to port sungem to phylib as well
which mean that I'll dump a whole load of BCM PHY specific drivers in
there.
Cheers,
Ben.
^ permalink raw reply
* Problems with access to PCI on MVME3100
From: Johan Borkhuis @ 2007-05-23 6:48 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
I am working on porting a PCI driver from I386-Linux to PPC (MVME-3100).
The device is a Reflective Memory card (VMIC 5565), and we use a driver
based on the standard Linux driver, provided by the supplier.
I try to start a DMA transfer (using the DMA engine on the PCI card)
from user space, but then I get a PCI Error. The following data is
displayed:
PCI Error!
PCI ERROR DETECT REG 0x00000042
PCI ERROR ADDRESS REG 0x00fffa00
PCI ERROR EXT ADDRESS REG 0x00000000
PCI ERROR ATTRIBUTES REG 0x0000c001
PCI ERROR DATA HIGH REG 0x60010004
PCI ERROR DATA LOW REG 0x10060020
PCI STATUS REG 0x0000
PCI GASKET TIMER REG 0x00003fff
PCI PCIX TIMER REG 0x01ffffff
Access to the registers from kernel mode is no problem. I did an mmap to
map the registers into user space, and then access the registers as an
array of chars or ints. Is there a limitation in access to PCI registers
from user space on PPC?
When I try to do this in kernel mode I don't get any errors, but the
transfer is not started. I am not sure if this is a SW problem, or that
it might be caused by the PCI-PCI bridge.
The code runs perfectly on a I386 platform, and I use read[bwl] and
write[bwl] to access the registers, so this should fix the endianess
problems that exist.
Below is the PCI information from the card:
01:00.0 Network controller: VMIC: Unknown device 5565 (rev 01)
Subsystem: PLX Technology, Inc.: Unknown device 9656
Flags: 66Mhz, medium devsel, IRQ 52
Memory at 00000000dfeffe00 (32-bit, non-prefetchable) [size=512]
I/O ports at e0ffff00 [size=256]
Memory at 00000000dfeffdc0 (32-bit, non-prefetchable) [size=64]
Memory at 00000000d8000000 (32-bit, non-prefetchable) [size=64M]
Capabilities: [40] Power Management version 2
Capabilities: [48] #00 [0080]
Kind regards,
Johan Borkhuis
^ permalink raw reply
* Re: [RFC] BOOKE watchdog and kexec
From: Kumar Gala @ 2007-05-23 6:10 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev
In-Reply-To: <1179891419.6145.19.camel@concordia.ozlabs.ibm.com>
On May 22, 2007, at 10:36 PM, Michael Ellerman wrote:
> On Tue, 2007-05-22 at 16:53 -0700, Dave Jiang wrote:
>> What would be the appropriate way to deal with the BOOKE watchdog
>> in order to
>> properly kexec? The BOOKE watchdog cannot be disabled. With the
>> current
>> implementation, a watchdog daemon in userland is required to poke the
>> /dev/watchdog continously in order to keep it from going off. In
>> the kexec
>> situation, the watchdog daemon in userland goes away when the new
>> kernel is
>> executed. It is very possible that the new kernel can potentially
>> timeout on a
>> certain hardware device initialization (i.e. SCSI discovery/
>> timeout) and causes
>> the watchdog to go off and reset the hardware. The reset is of
>> course not
>> wanted in this situation.
>>
>> Several solutions comes into mind:
>> 1. Have the kernel timer poke the watchdog. This would ensure
>> situation
>> described above would never happen. I think x86 does this with NMI
>> watchdog.
>>
>> 2. Have the watchdog driver spawn a kernel thread to poke the
>> watchdog at a
>> periodic time. Or perhaps use the delayed-work mechanism to do that.
>>
>> 3. Set the highest bit of the watchdog register so that it does
>> not expire for
>> 2^32 ticks.
>
> #3 sounds the easiest. You'd set it in machine_kexec_prepare() and
> then
> have the second kernel restore a sane value. I assume 2^32 ticks is
> long
> enough to boot?
I haven't looked at the 4xx side, but on fsl parts you can pick any
of 64-bits in the time base as the transition point, so you should
have enough time, however maybe setting it to something like the
panic_timeout or make it configurable is the best choice.
However, I agree that just tweaking the time and restoring it the
best option.
- k
^ permalink raw reply
* Re: [Patch 2/2] Kexec/Kdump support POWER6
From: Sachin P. Sant @ 2007-05-23 5:14 UTC (permalink / raw)
To: Olof Johansson; +Cc: linuxppc-dev, ellerman, Milton Miller II
In-Reply-To: <20070522153419.GA22047@lixom.net>
Hi Olof, thanks for the review.
>> + if (have_vrma)
>> + pSeries_find_hpte_vrma();
>> +
>>
>
> This will break kexec builds on non-pseries. It's referring to platform
> code that might not be built.
>
>
Ok. Will call this function from lpar.c instead of
default_machine_kexec().
> Does this function find the vrma, or save it away? Seems like the name
> is misleading.
>
>
Well it finds a vrma entry and saves it. I thought of
pSeries_find_save_hpte_vrma(), but decided against it. I could
change it to pSeries_save_hpte_vrma().
> Is ppc64_vrma_page_size really the size, or the shift? Above would
> indicate that it's really a shift value.
>
>
It is a shift. I will change it to ppc64_vrma_page_shift.
> Why is 16M hardcoded here, when you're taking such great care to read
> out the pagesize earlier?
>
>
Hrmm. Ok will use the vrma_page_shift value.
>> + ((dword0 & HPTE_V_MASK) == MAGIC_SKIP_HPTE)) {
>>
> Indentation
>
Done.
>> + /* store the hpte */
>> + hpte_vrma_slots[num_hpte_vrma_slots++] = slot;
>>
>
> Here you rely on global exported state (num_hpte_vrma_slots), increasing it without
> checking for limits. What happens if this function is ever called twice? Should you
> set it to 0 in the beginning of the function and check it against the size of the
> hpte_vrma_slots array instead?
>
Will add proper checks for num_hpte_vrma_slots variable value.
>> +extern void pSeries_find_hpte_vrma(void);
>>
>>
> Same comment as above: This isn't a kexec function as much as a pseries function, so
> it should be defined in some other header instead.
>
>>
>> +#define HPTE_V_RMA_VPN ASM_CONST(0x001FFFFFF0000000)
>> +#define HPTE_V_MASK ASM_CONST(0xc000000000000000)
>> +#define MAGIC_SKIP_HPTE ASM_CONST(0x4000000000000000)
>> +#define HPTE_V_RMA_NUM 16
>>
>
> "MAGIC_SKIP_HPTE"? I'm sure there's a proper name for this field in the
> PAPR, isn't there? Also, HPTE_V_RMA_NUM isn't a HPTE_V field, it shouldn't
> have that prefix. It's not a property of the mmu in the first place.
>
> These should maybe be local defines in the pseries lpar code instead, since it's
> more of a lpar<->phyp interface than mmu programming interface.
>
Will move them to pseries lpar code.
Updated patch on its way.
Thanks
-Sachin
^ 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