* [RFC PATCH 2/4] powerpc 2.6.16-rt17: to boot on powerpc w/ RT
From: Tsutomu OWA @ 2006-08-11 2:02 UTC (permalink / raw)
To: linux-kernel; +Cc: linuxppc-dev, mingo, tglx
To boot on powermac and cell.
---
with PREEMPT_RT
BUG: using smp_processor_id() in preemptible [00000000] code: init/1
caller is .hpte_update+0x4c/0x250
Call Trace:
[C000000001467850] [C00000000000F250] .show_stack+0x68/0x1b4
(unreliable)
[C000000001467900] [C00000000014C4A4] .debug_smp_processor_id+0xc4/0xf4
[C000000001467990] [C00000000002BEC0] .hpte_update+0x4c/0x250
[C000000001467A40] [C00000000008C670] .do_wp_page+0x474/0x618
[C000000001467B10] [C00000000008DC30] .__handle_mm_fault+0xd50/0xe68
[C000000001467C20] [C000000000029EFC] .do_page_fault+0x48c/0x674
[C000000001467E30] [C000000000004760] .handle_page_fault+0x20/0x54
o to enable drivers.
powermac/low_i2c.c:
struct semaphore -> struct compat_semaphore
spinlock_t -> raw_spinlock_t
drivers/net/sungem.c: transmit_tx_frame(). try_spinlock_irqsave()
make spinlock_t to raw_spinlock_t for mpic and native_tlbie_lock.
make struct semaphore to struct compat_semaphore for kw2_i2c.
* to boot on cell
o port systemsim bogus disk and console. (not included in this patch)
with PREEMPT_RT
BUG: swapper:0 task might have lost a preemption check!
Call Trace:
[C0000000002FFC40] [C00000000000F250] .show_stack+0x68/0x1b4
(unreliable)
[C0000000002FFCF0] [C0000000000425F8]
.preempt_enable_no_resched+0x68/0x80
[C0000000002FFD70] [C000000000032EC0] .cbe_idle+0x168/0x184
[C0000000002FFE00] [C000000000018DD0] .cpu_idle+0x4c/0x60
[C0000000002FFE70] [C000000000009290] .rest_init+0x60/0x78
[C0000000002FFEF0] [C0000000002CE890] .start_kernel+0x310/0x330
[C0000000002FFF90] [C000000000008574] .start_here_common+0x88/0x114
--
BUG: using smp_processor_id() in preemptible [00000000] code: init/1
caller is .hpte_update+0x4c/0x250
Call Trace:
[C000000001467850] [C00000000000F250] .show_stack+0x68/0x1b4
(unreliable)
[C000000001467900] [C00000000014C4A4] .debug_smp_processor_id+0xc4/0xf4
[C000000001467990] [C00000000002BEC0] .hpte_update+0x4c/0x250
[C000000001467A40] [C00000000008C670] .do_wp_page+0x474/0x618
[C000000001467B10] [C00000000008DC30] .__handle_mm_fault+0xd50/0xe68
[C000000001467C20] [C000000000029EFC] .do_page_fault+0x48c/0x674
[C000000001467E30] [C000000000004760] .handle_page_fault+0x20/0x54
-- owa
diff -rup -x CVS 2.6.16-rt17/arch/powerpc/mm/hash_native_64.c rt-powerpc/arch/powerpc/mm/hash_native_64.c
--- 2.6.16-rt17/arch/powerpc/mm/hash_native_64.c 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/arch/powerpc/mm/hash_native_64.c 2006-07-12 14:38:24.000000000 +0900
@@ -35,7 +35,10 @@
#define HPTE_LOCK_BIT 3
-static DEFINE_SPINLOCK(native_tlbie_lock);
+/*
+ * to avoid "BUG: scheduling while atomic at native_flush_hash_range.
+ */
+static DEFINE_RAW_SPINLOCK(native_tlbie_lock);
static inline void __tlbie(unsigned long va, unsigned int psize)
{
diff -rup -x CVS 2.6.16-rt17/arch/powerpc/mm/tlb_64.c rt-powerpc/arch/powerpc/mm/tlb_64.c
--- 2.6.16-rt17/arch/powerpc/mm/tlb_64.c 2006-04-26 18:24:28.000000000 +0900
+++ rt-powerpc/arch/powerpc/mm/tlb_64.c 2006-07-12 13:47:32.000000000 +0900
@@ -95,9 +95,15 @@ static void pte_free_submit(struct pte_f
void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf)
{
+#ifndef CONFIG_PREEMPT_RT
/* This is safe since tlb_gather_mmu has disabled preemption */
cpumask_t local_cpumask = cpumask_of_cpu(smp_processor_id());
struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur);
+#else
+ cpumask_t local_cpumask = cpumask_of_cpu(raw_smp_processor_id());
+ struct pte_freelist_batch **batchp = &get_cpu_var(pte_freelist_cur);
+ put_cpu_var(pte_freelist_cur);
+#endif /* !CONFIG_PREEMPT_RT */
if (atomic_read(&tlb->mm->mm_users) < 2 ||
cpus_equal(tlb->mm->cpu_vm_mask, local_cpumask)) {
diff -rup -x CVS 2.6.16-rt17/arch/powerpc/platforms/cell/pervasive.c rt-powerpc/arch/powerpc/platforms/cell/pervasive.c
--- 2.6.16-rt17/arch/powerpc/platforms/cell/pervasive.c 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/arch/powerpc/platforms/cell/pervasive.c 2006-07-12 13:48:09.000000000 +0900
@@ -136,8 +136,8 @@ static void cbe_idle(void)
*/
ppc64_runlatch_on();
- preempt_enable_no_resched();
- schedule();
+ __preempt_enable_no_resched();
+ __schedule();
preempt_disable();
}
}
diff -rup -x CVS 2.6.16-rt17/arch/powerpc/platforms/powermac/low_i2c.c rt-powerpc/arch/powerpc/platforms/powermac/low_i2c.c
--- 2.6.16-rt17/arch/powerpc/platforms/powermac/low_i2c.c 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/arch/powerpc/platforms/powermac/low_i2c.c 2006-07-12 13:49:09.000000000 +0900
@@ -85,7 +85,7 @@ struct pmac_i2c_bus
void *hostdata;
int channel; /* some hosts have multiple */
int mode; /* current mode */
- struct semaphore sem;
+ struct compat_semaphore sem;
int opened;
int polled; /* open mode */
struct platform_device *platform_dev;
@@ -105,7 +105,7 @@ static LIST_HEAD(pmac_i2c_busses);
struct pmac_i2c_host_kw
{
- struct semaphore mutex; /* Access mutex for use by
+ struct compat_semaphore mutex; /* Access mutex for use by
* i2c-keywest */
void __iomem *base; /* register base address */
int bsteps; /* register stepping */
@@ -119,6 +119,9 @@ struct pmac_i2c_host_kw
int result;
struct completion complete;
spinlock_t lock;
+ /* "BUG: scheduling while at atomic" at del_timer() called
+ * from kw_i2c_irq() if raw_spinlock_t.
+ */
struct timer_list timeout_timer;
};
diff -rup -x CVS 2.6.16-rt17/arch/powerpc/sysdev/mpic.c rt-powerpc/arch/powerpc/sysdev/mpic.c
--- 2.6.16-rt17/arch/powerpc/sysdev/mpic.c 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/arch/powerpc/sysdev/mpic.c 2006-07-11 16:19:06.000000000 +0900
@@ -45,7 +45,7 @@
static struct mpic *mpics;
static struct mpic *mpic_primary;
-static DEFINE_SPINLOCK(mpic_lock);
+static DEFINE_RAW_SPINLOCK(mpic_lock);
#ifdef CONFIG_PPC32 /* XXX for now */
#ifdef CONFIG_IRQ_ALL_CPUS
@@ -1009,13 +1009,13 @@ void mpic_request_ipis(void)
printk("requesting IPIs ... \n");
/* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */
- request_irq(mpic->ipi_offset+0, mpic_ipi_action, SA_INTERRUPT,
+ request_irq(mpic->ipi_offset+0, mpic_ipi_action, SA_INTERRUPT | SA_NODELAY,
"IPI0 (call function)", mpic);
- request_irq(mpic->ipi_offset+1, mpic_ipi_action, SA_INTERRUPT,
+ request_irq(mpic->ipi_offset+1, mpic_ipi_action, SA_INTERRUPT | SA_NODELAY,
"IPI1 (reschedule)", mpic);
- request_irq(mpic->ipi_offset+2, mpic_ipi_action, SA_INTERRUPT,
+ request_irq(mpic->ipi_offset+2, mpic_ipi_action, SA_INTERRUPT | SA_NODELAY,
"IPI2 (unused)", mpic);
- request_irq(mpic->ipi_offset+3, mpic_ipi_action, SA_INTERRUPT,
+ request_irq(mpic->ipi_offset+3, mpic_ipi_action, SA_INTERRUPT | SA_NODELAY,
"IPI3 (debugger break)", mpic);
printk("IPIs requested... \n");
diff -rup -x CVS 2.6.16-rt17/drivers/ide/ide-io.c rt-powerpc/drivers/ide/ide-io.c
--- 2.6.16-rt17/drivers/ide/ide-io.c 2006-04-26 18:24:28.000000000 +0900
+++ rt-powerpc/drivers/ide/ide-io.c 2006-07-12 13:50:47.000000000 +0900
@@ -1560,8 +1560,10 @@ irqreturn_t ide_intr (int irq, void *dev
del_timer(&hwgroup->timer);
spin_unlock(&ide_lock);
+#if !defined(CONFIG_PREEMPT_HARDIRQS) || !defined(CONFIG_PPC_PMAC64)
if (drive->unmask)
local_irq_enable_nort();
+#endif /* !(CONFIG_PREEMPT_HARDIRQS && CONFIG_PPC_PMAC64) */
/* service this interrupt, may set handler for next interrupt */
startstop = handler(drive);
spin_lock_irq(&ide_lock);
diff -rup -x CVS 2.6.16-rt17/drivers/ide/ide-probe.c rt-powerpc/drivers/ide/ide-probe.c
--- 2.6.16-rt17/drivers/ide/ide-probe.c 2006-04-26 18:24:28.000000000 +0900
+++ rt-powerpc/drivers/ide/ide-probe.c 2006-07-12 14:07:23.000000000 +0900
@@ -51,6 +51,7 @@
#include <linux/spinlock.h>
#include <linux/kmod.h>
#include <linux/pci.h>
+#include <linux/irq.h>
#include <asm/byteorder.h>
#include <asm/irq.h>
@@ -1088,6 +1089,10 @@ static int init_irq (ide_hwif_t *hwif)
sa = SA_SHIRQ;
#endif /* __mc68000__ || CONFIG_APUS */
+#if defined(CONFIG_PREEMPT_HARDIRQS) && defined(CONFIG_PPC_PMAC64)
+ sa |= SA_NODELAY | SA_INTERRUPT;
+#endif /* (CONFIG_PREEMPT_HARDIRQS && CONFIG_PPC_PMAC64) */
+
if (IDE_CHIPSET_IS_PCI(hwif->chipset)) {
sa = SA_SHIRQ;
#ifndef CONFIG_IDEPCI_SHARE_IRQ
diff -rup -x CVS 2.6.16-rt17/drivers/net/sungem.c rt-powerpc/drivers/net/sungem.c
--- 2.6.16-rt17/drivers/net/sungem.c 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/drivers/net/sungem.c 2006-07-11 17:07:43.000000000 +0900
@@ -1036,10 +1036,8 @@ static int gem_start_xmit(struct sk_buff
(csum_stuff_off << 21));
}
- local_irq_save(flags);
- if (!spin_trylock(&gp->tx_lock)) {
+ if (!spin_trylock_irqsave(&gp->tx_lock, flags)) {
/* Tell upper layer to requeue */
- local_irq_restore(flags);
return NETDEV_TX_LOCKED;
}
/* We raced with gem_do_stop() */
diff -rup -x CVS 2.6.16-rt17/include/asm-powerpc/mpic.h rt-powerpc/include/asm-powerpc/mpic.h
--- 2.6.16-rt17/include/asm-powerpc/mpic.h 2006-03-20 14:53:29.000000000 +0900
+++ rt-powerpc/include/asm-powerpc/mpic.h 2006-05-19 20:48:49.000000000 +0900
@@ -160,7 +160,7 @@ struct mpic
#ifdef CONFIG_MPIC_BROKEN_U3
/* The fixup table */
struct mpic_irq_fixup *fixups;
- spinlock_t fixup_lock;
+ raw_spinlock_t fixup_lock;
#endif
/* The various ioremap'ed bases */
diff -rup -x CVS 2.6.16-rt17/kernel/latency.c rt-powerpc/kernel/latency.c
--- 2.6.16-rt17/kernel/latency.c 2006-04-26 18:24:29.000000000 +0900
+++ rt-powerpc/kernel/latency.c 2006-07-12 13:57:31.000000000 +0900
@@ -1787,7 +1787,12 @@ void notrace add_preempt_count(unsigned
#endif
preempt_count() += val;
+
#ifdef CONFIG_PREEMPT_TRACE
+#if 1 /* FIXME: somehow current is NULL. why? */
+ if (!current)
+ return;
+#endif
^ permalink raw reply
* [RFC PATCH 4/4] powerpc 2.6.16-rt29: to fix network driver (workaround)
From: Tsutomu OWA @ 2006-08-11 2:04 UTC (permalink / raw)
To: linux-kernel; +Cc: linuxppc-dev, mingo, tglx
To make network driver available for rt29 (actually rt21 and later).
When doing "ping -f", the network driver seems to hang without this
workaround for rt version 29.
-- owa
# I suppose this should be fixed in other way in future but for now...
--- rt29/kernel/irq/manage.c 2006-07-10 09:01:21.000000000 +0900
+++ rt-powerpc/kernel/irq/manage.c 2006-07-21 20:17:50.000000000 +0900
@@ -723,15 +723,24 @@ static int do_irqd(void * __desc)
set_current_state(TASK_INTERRUPTIBLE);
do_hardirq(desc);
cond_resched_all();
+#ifndef CONFIG_PPC_PMAC64 /* work around: to revert to patch-2.6.16-rt20 version */
local_irq_disable();
+#endif /* !CONFIG_PPC_PMAC64 */
__do_softirq();
local_irq_enable();
#ifdef CONFIG_SMP
/*
* Did IRQ affinities change?
*/
+#ifdef CONFIG_PPC_PMAC64 /* work around; revert to patch-2.6.16-rt20 version */
+ if (!cpu_isset(smp_processor_id(), irq_affinity[irq])) {
+ mask = cpumask_of_cpu(any_online_cpu(irq_affinity[irq]));
+ set_cpus_allowed(current, mask);
+ }
+#else
if (!cpus_equal(current->cpus_allowed, irq_affinity[irq]))
set_cpus_allowed(current, irq_affinity[irq]);
+#endif /* CONFIG_PPC_PMAC64 */
#endif
schedule();
}
^ permalink raw reply
* [RFC PATCH 0/4] powerpc 2.6.16-rt17: to port rt patch to powerpc
From: Tsutomu OWA @ 2006-08-11 2:01 UTC (permalink / raw)
To: linux-kernel; +Cc: linuxppc-dev, mingo, tglx
Hi, I'm trying to port realtime-preempt patch to powerpc. The primary
purpose to post an experimental work is for review and to see if I'm on
the right track. The same material is placed on CE Linux Forum's wiki
page;
http://tree.celinuxforum.org/CelfPubWiki/RTPatchForPowerPC
This series of patches adds support to make rt patch work on powerpc64
targets. Currently two platforms (powermac and cell) are tested.
These patches apply to 2.6.16 kernel with realtime preempt patch
(patch-2.6.16-rt17) by Ingo Molnar at
http://people.redhat.com/mingo/realtime-preempt/.
Compile tested for both powermac and cell w/ and w/o PREEMPT_RT.
Boot tested for powermac w/ and w/o PREEMPT_RT on a Dual Power Mac
G5. (boots on initrd and CONFIG_BLK_DEV_IDE_PMAC is disabled (or with a
work around included in the patch) for PREEMPT_RT, see *1).
Boot tested for cell w/ and w/o PREEMPT_RT on the systemsim simulator
provided by IBM. Note that "iommu=off" command line option is applied.
[RFC PATCH 1/4] powerpc 2.6.16-rt17: to build on powerpc w/ RT
[RFC PATCH 2/4] powerpc 2.6.16-rt17: to boot on powerpc w/ RT
[RFC PATCH 3/4] powerpc 2.6.16-rt17: to support CONFIG_MCOUNT
[RFC PATCH 4/4] powerpc 2.6.16-rt29: to fix network driver (workaround)
These patches are provided under GNU GPL.
Comments and suggestions are welcome.
Thanks in advance.
*1: There seem to be some flaw(s) which make(s) some devices unavailable
(namely a cdrom drive and a SATA drive so far) when PREEMPT_HARDIRQS is
enabled. "hda: lost interrupt" and/or "ata1: command 0x50 host_stat
0x4" show up. Other devices such as network, keyboard etc. seem to work
fine. I've looked into this for a couple of weeks in vain.
-- owa
Software Engineering Center, TOSHIBA.
^ permalink raw reply
* Re: Gianfar eth driver on 8540 ppc - for 2.4 and 2.6 : different outputs
From: Kumar Gala @ 2006-08-11 4:10 UTC (permalink / raw)
To: Prashant Yendigeri; +Cc: linuxppc-embedded
In-Reply-To: <OF403D77BC.13F5C3B5-ON652571C6.003D5A1C-652571C6.003E28AE@lntinfotech.com>
On Aug 10, 2006, at 6:18 AM, Prashant Yendigeri wrote:
>
> Hi,
>
> The gianfar driver of 2.6.12 and 2.4.20 give different outputs on
> the same PPC 8540 board.
>
> What could be the reason ?
>
> Output on 2.4.20 :
> /root # ifconfig eth0 172.28.8.254 up
> eth0: PHY is Marvell 88E1011S (1410c62)
> eth0: Auto-negotiation done
> eth0: Half Duplex
> eth0: Speed 10BT
> eth0: Link is up
>
> Output on 2.6.12
> / # ifconfig eth0 172.28.8.254 up
> eth0: PHY is Generic MII (ffffffff)
It looks like your 2.6.12 kernel isn't handling the PHY correctly.
I'd recommend upgrading to something newer which has the phylib
(can't remember which 2.6 that went into).
- kumar
^ permalink raw reply
* Re: [RFC] consolidated libdt proposal
From: Milton Miller @ 2006-08-11 4:55 UTC (permalink / raw)
To: Mark A. Greer
Cc: hollisb, pantelis, xen-ppc-devel, linuxppc-dev, linuxppc-embedded
In-Reply-To: <20060810185514.GA12848@mag.az.mvista.com>
On Aug 10, 2006, at 1:55 PM, Mark A. Greer wrote:
> On Thu, Aug 10, 2006 at 11:51:30AM -0500, Milton Miller wrote:
>> On Tue Aug 8 2006 01:04:08 PM CDT, Mark A. Greer wrote:
>>> If we're going to allow cmdline editing in the bootwrapper, we would
>>> need to extend the size of a property.
...
>> We already have replace the command line merged (it's why my patches
>> don't apply).
> That's different.
...
Yes, but it still requires changing the size or inserting a
property, which is the real requirement we were discussing.
Yes, editing at command line would require an input function.
milton
^ permalink raw reply
* [PATCH 0/2]: powerpc: Cpu init cleanups
From: Olof Johansson @ 2006-08-11 5:01 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
Hi,
Attached are two patches to cleanup the cpu inits a bit. First one just
renames cpu_setup_power4.S to cpu_setup_ppc970.S, since that's really
what it contains. No functional changes at all in there to simplify
review.
Second patch renames some of the setup functions, and make the restore
functions come of the cputable instead of being hardcoded. Current setup
makes it awkward to add new cpus without editing the ppc970 setup/restore
functions or add more PVR checks in the assembly, which would be nice
to avoid. Only the really early one is still needed in assembly, since
cputables have not yet been setup at that point.
Earlier patch submission was all baked together, which makes it harder
to review and tell what is new and not.
Boot tested on PowerMac and POWER5. Please consider for 2.6.19 merge
window.
Thanks,
Olof
^ permalink raw reply
* [PATCH 1/2] powerpc: Rename cpu_setup_power4.S to cpu_setup_ppc970.S
From: Olof Johansson @ 2006-08-11 5:03 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20060811050159.GA5879@pb15.lixom.net>
Rename cpu_setup_power4.S to cpu_setup_ppc970.S, since that's
really what it is.
No functional or other changes.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: linux-2.6/arch/powerpc/kernel/cpu_setup_power4.S
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/cpu_setup_power4.S
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * This file contains low level CPU setup functions.
- * Copyright (C) 2003 Benjamin Herrenschmidt (benh@kernel.crashing.org)
- *
- * 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 <asm/processor.h>
-#include <asm/page.h>
-#include <asm/cputable.h>
-#include <asm/ppc_asm.h>
-#include <asm/asm-offsets.h>
-#include <asm/cache.h>
-
-_GLOBAL(__970_cpu_preinit)
- /*
- * Do nothing if not running in HV mode
- */
- mfmsr r0
- rldicl. r0,r0,4,63
- beqlr
-
- /*
- * Deal only with PPC970 and PPC970FX.
- */
- mfspr r0,SPRN_PVR
- srwi r0,r0,16
- cmpwi r0,0x39
- beq 1f
- cmpwi r0,0x3c
- beq 1f
- cmpwi r0,0x44
- bnelr
-1:
-
- /* Make sure HID4:rm_ci is off before MMU is turned off, that large
- * pages are enabled with HID4:61 and clear HID5:DCBZ_size and
- * HID5:DCBZ32_ill
- */
- li r0,0
- mfspr r3,SPRN_HID4
- rldimi r3,r0,40,23 /* clear bit 23 (rm_ci) */
- rldimi r3,r0,2,61 /* clear bit 61 (lg_pg_en) */
- sync
- mtspr SPRN_HID4,r3
- isync
- sync
- mfspr r3,SPRN_HID5
- rldimi r3,r0,6,56 /* clear bits 56 & 57 (DCBZ*) */
- sync
- mtspr SPRN_HID5,r3
- isync
- sync
-
- /* Setup some basic HID1 features */
- mfspr r0,SPRN_HID1
- li r3,0x1200 /* enable i-fetch cacheability */
- sldi r3,r3,44 /* and prefetch */
- or r0,r0,r3
- mtspr SPRN_HID1,r0
- mtspr SPRN_HID1,r0
- isync
-
- /* Clear HIOR */
- li r0,0
- sync
- mtspr SPRN_HIOR,0 /* Clear interrupt prefix */
- isync
- blr
-
-_GLOBAL(__setup_cpu_ppc970)
- mfspr r0,SPRN_HID0
- li r11,5 /* clear DOZE and SLEEP */
- rldimi r0,r11,52,8 /* set NAP and DPM */
- mtspr SPRN_HID0,r0
- mfspr r0,SPRN_HID0
- mfspr r0,SPRN_HID0
- mfspr r0,SPRN_HID0
- mfspr r0,SPRN_HID0
- mfspr r0,SPRN_HID0
- mfspr r0,SPRN_HID0
- sync
- isync
- blr
-
-/* Definitions for the table use to save CPU states */
-#define CS_HID0 0
-#define CS_HID1 8
-#define CS_HID4 16
-#define CS_HID5 24
-#define CS_SIZE 32
-
- .data
- .balign L1_CACHE_BYTES,0
-cpu_state_storage:
- .space CS_SIZE
- .balign L1_CACHE_BYTES,0
- .text
-
-/* Called in normal context to backup CPU 0 state. This
- * does not include cache settings. This function is also
- * called for machine sleep. This does not include the MMU
- * setup, BATs, etc... but rather the "special" registers
- * like HID0, HID1, HID4, etc...
- */
-_GLOBAL(__save_cpu_setup)
- /* Some CR fields are volatile, we back it up all */
- mfcr r7
-
- /* Get storage ptr */
- LOAD_REG_IMMEDIATE(r5,cpu_state_storage)
-
- /* We only deal with 970 for now */
- mfspr r0,SPRN_PVR
- srwi r0,r0,16
- cmpwi r0,0x39
- beq 1f
- cmpwi r0,0x3c
- beq 1f
- cmpwi r0,0x44
- bne 2f
-
-1: /* skip if not running in HV mode */
- mfmsr r0
- rldicl. r0,r0,4,63
- beq 2f
-
- /* Save HID0,1,4 and 5 */
- mfspr r3,SPRN_HID0
- std r3,CS_HID0(r5)
- mfspr r3,SPRN_HID1
- std r3,CS_HID1(r5)
- mfspr r3,SPRN_HID4
- std r3,CS_HID4(r5)
- mfspr r3,SPRN_HID5
- std r3,CS_HID5(r5)
-
-2:
- mtcr r7
- blr
-
-/* Called with no MMU context (typically MSR:IR/DR off) to
- * restore CPU state as backed up by the previous
- * function. This does not include cache setting
- */
-_GLOBAL(__restore_cpu_setup)
- /* Get storage ptr (FIXME when using anton reloc as we
- * are running with translation disabled here
- */
- LOAD_REG_IMMEDIATE(r5,cpu_state_storage)
-
- /* We only deal with 970 for now */
- mfspr r0,SPRN_PVR
- srwi r0,r0,16
- cmpwi r0,0x39
- beq 1f
- cmpwi r0,0x3c
- beq 1f
- cmpwi r0,0x44
- bnelr
-
-1: /* skip if not running in HV mode */
- mfmsr r0
- rldicl. r0,r0,4,63
- beqlr
-
- /* Before accessing memory, we make sure rm_ci is clear */
- li r0,0
- mfspr r3,SPRN_HID4
- rldimi r3,r0,40,23 /* clear bit 23 (rm_ci) */
- sync
- mtspr SPRN_HID4,r3
- isync
- sync
-
- /* Clear interrupt prefix */
- li r0,0
- sync
- mtspr SPRN_HIOR,0
- isync
-
- /* Restore HID0 */
- ld r3,CS_HID0(r5)
- sync
- isync
- mtspr SPRN_HID0,r3
- mfspr r3,SPRN_HID0
- mfspr r3,SPRN_HID0
- mfspr r3,SPRN_HID0
- mfspr r3,SPRN_HID0
- mfspr r3,SPRN_HID0
- mfspr r3,SPRN_HID0
- sync
- isync
-
- /* Restore HID1 */
- ld r3,CS_HID1(r5)
- sync
- isync
- mtspr SPRN_HID1,r3
- mtspr SPRN_HID1,r3
- sync
- isync
-
- /* Restore HID4 */
- ld r3,CS_HID4(r5)
- sync
- isync
- mtspr SPRN_HID4,r3
- sync
- isync
-
- /* Restore HID5 */
- ld r3,CS_HID5(r5)
- sync
- isync
- mtspr SPRN_HID5,r3
- sync
- isync
- blr
-
Index: linux-2.6/arch/powerpc/kernel/cpu_setup_ppc970.S
===================================================================
--- /dev/null
+++ linux-2.6/arch/powerpc/kernel/cpu_setup_ppc970.S
@@ -0,0 +1,225 @@
+/*
+ * This file contains low level CPU setup functions.
+ * Copyright (C) 2003 Benjamin Herrenschmidt (benh@kernel.crashing.org)
+ *
+ * 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 <asm/processor.h>
+#include <asm/page.h>
+#include <asm/cputable.h>
+#include <asm/ppc_asm.h>
+#include <asm/asm-offsets.h>
+#include <asm/cache.h>
+
+_GLOBAL(__970_cpu_preinit)
+ /*
+ * Do nothing if not running in HV mode
+ */
+ mfmsr r0
+ rldicl. r0,r0,4,63
+ beqlr
+
+ /*
+ * Deal only with PPC970 and PPC970FX.
+ */
+ mfspr r0,SPRN_PVR
+ srwi r0,r0,16
+ cmpwi r0,0x39
+ beq 1f
+ cmpwi r0,0x3c
+ beq 1f
+ cmpwi r0,0x44
+ bnelr
+1:
+
+ /* Make sure HID4:rm_ci is off before MMU is turned off, that large
+ * pages are enabled with HID4:61 and clear HID5:DCBZ_size and
+ * HID5:DCBZ32_ill
+ */
+ li r0,0
+ mfspr r3,SPRN_HID4
+ rldimi r3,r0,40,23 /* clear bit 23 (rm_ci) */
+ rldimi r3,r0,2,61 /* clear bit 61 (lg_pg_en) */
+ sync
+ mtspr SPRN_HID4,r3
+ isync
+ sync
+ mfspr r3,SPRN_HID5
+ rldimi r3,r0,6,56 /* clear bits 56 & 57 (DCBZ*) */
+ sync
+ mtspr SPRN_HID5,r3
+ isync
+ sync
+
+ /* Setup some basic HID1 features */
+ mfspr r0,SPRN_HID1
+ li r3,0x1200 /* enable i-fetch cacheability */
+ sldi r3,r3,44 /* and prefetch */
+ or r0,r0,r3
+ mtspr SPRN_HID1,r0
+ mtspr SPRN_HID1,r0
+ isync
+
+ /* Clear HIOR */
+ li r0,0
+ sync
+ mtspr SPRN_HIOR,0 /* Clear interrupt prefix */
+ isync
+ blr
+
+_GLOBAL(__setup_cpu_ppc970)
+ mfspr r0,SPRN_HID0
+ li r11,5 /* clear DOZE and SLEEP */
+ rldimi r0,r11,52,8 /* set NAP and DPM */
+ mtspr SPRN_HID0,r0
+ mfspr r0,SPRN_HID0
+ mfspr r0,SPRN_HID0
+ mfspr r0,SPRN_HID0
+ mfspr r0,SPRN_HID0
+ mfspr r0,SPRN_HID0
+ mfspr r0,SPRN_HID0
+ sync
+ isync
+ blr
+
+/* Definitions for the table use to save CPU states */
+#define CS_HID0 0
+#define CS_HID1 8
+#define CS_HID4 16
+#define CS_HID5 24
+#define CS_SIZE 32
+
+ .data
+ .balign L1_CACHE_BYTES,0
+cpu_state_storage:
+ .space CS_SIZE
+ .balign L1_CACHE_BYTES,0
+ .text
+
+/* Called in normal context to backup CPU 0 state. This
+ * does not include cache settings. This function is also
+ * called for machine sleep. This does not include the MMU
+ * setup, BATs, etc... but rather the "special" registers
+ * like HID0, HID1, HID4, etc...
+ */
+_GLOBAL(__save_cpu_setup)
+ /* Some CR fields are volatile, we back it up all */
+ mfcr r7
+
+ /* Get storage ptr */
+ LOAD_REG_IMMEDIATE(r5,cpu_state_storage)
+
+ /* We only deal with 970 for now */
+ mfspr r0,SPRN_PVR
+ srwi r0,r0,16
+ cmpwi r0,0x39
+ beq 1f
+ cmpwi r0,0x3c
+ beq 1f
+ cmpwi r0,0x44
+ bne 2f
+
+1: /* skip if not running in HV mode */
+ mfmsr r0
+ rldicl. r0,r0,4,63
+ beq 2f
+
+ /* Save HID0,1,4 and 5 */
+ mfspr r3,SPRN_HID0
+ std r3,CS_HID0(r5)
+ mfspr r3,SPRN_HID1
+ std r3,CS_HID1(r5)
+ mfspr r3,SPRN_HID4
+ std r3,CS_HID4(r5)
+ mfspr r3,SPRN_HID5
+ std r3,CS_HID5(r5)
+
+2:
+ mtcr r7
+ blr
+
+/* Called with no MMU context (typically MSR:IR/DR off) to
+ * restore CPU state as backed up by the previous
+ * function. This does not include cache setting
+ */
+_GLOBAL(__restore_cpu_setup)
+ /* Get storage ptr (FIXME when using anton reloc as we
+ * are running with translation disabled here
+ */
+ LOAD_REG_IMMEDIATE(r5,cpu_state_storage)
+
+ /* We only deal with 970 for now */
+ mfspr r0,SPRN_PVR
+ srwi r0,r0,16
+ cmpwi r0,0x39
+ beq 1f
+ cmpwi r0,0x3c
+ beq 1f
+ cmpwi r0,0x44
+ bnelr
+
+1: /* skip if not running in HV mode */
+ mfmsr r0
+ rldicl. r0,r0,4,63
+ beqlr
+
+ /* Before accessing memory, we make sure rm_ci is clear */
+ li r0,0
+ mfspr r3,SPRN_HID4
+ rldimi r3,r0,40,23 /* clear bit 23 (rm_ci) */
+ sync
+ mtspr SPRN_HID4,r3
+ isync
+ sync
+
+ /* Clear interrupt prefix */
+ li r0,0
+ sync
+ mtspr SPRN_HIOR,0
+ isync
+
+ /* Restore HID0 */
+ ld r3,CS_HID0(r5)
+ sync
+ isync
+ mtspr SPRN_HID0,r3
+ mfspr r3,SPRN_HID0
+ mfspr r3,SPRN_HID0
+ mfspr r3,SPRN_HID0
+ mfspr r3,SPRN_HID0
+ mfspr r3,SPRN_HID0
+ mfspr r3,SPRN_HID0
+ sync
+ isync
+
+ /* Restore HID1 */
+ ld r3,CS_HID1(r5)
+ sync
+ isync
+ mtspr SPRN_HID1,r3
+ mtspr SPRN_HID1,r3
+ sync
+ isync
+
+ /* Restore HID4 */
+ ld r3,CS_HID4(r5)
+ sync
+ isync
+ mtspr SPRN_HID4,r3
+ sync
+ isync
+
+ /* Restore HID5 */
+ ld r3,CS_HID5(r5)
+ sync
+ isync
+ mtspr SPRN_HID5,r3
+ sync
+ isync
+ blr
+
Index: linux-2.6/arch/powerpc/kernel/Makefile
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/Makefile
+++ linux-2.6/arch/powerpc/kernel/Makefile
@@ -16,7 +16,7 @@ obj-y := semaphore.o cputable.o ptrac
obj-y += vdso32/
obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \
signal_64.o ptrace32.o \
- paca.o cpu_setup_power4.o \
+ paca.o cpu_setup_ppc970.o \
firmware.o sysfs.o
obj-$(CONFIG_PPC64) += vdso64/
obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o
^ permalink raw reply
* [PATCH 2/2]: powerpc: Cleanup CPU inits
From: Olof Johansson @ 2006-08-11 5:07 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
In-Reply-To: <20060811050159.GA5879@pb15.lixom.net>
Cleanup CPU inits a bit more, Geoff Levand already did some earlier.
* Move CPU state save to cpu_setup, since cpu_setup is only ever done
on cpu 0 on 64-bit and save is never done more than once.
* Rename __restore_cpu_setup to __restore_cpu_ppc970 and add
function pointers to the cputable to use instead. Powermac always
has 970 so no need to check there.
* Rename __970_cpu_preinit to __cpu_preinit_ppc970 and check PVR before
calling it instead of in it, it's too early to use cputable.
* Rename pSeries_secondary_smp_init to generic_secondary_smp_init since
everyone but powermac and iSeries use it.
Signed-off-by: Olof Johansson <olof@lixom.net>
Index: linux-2.6/arch/powerpc/kernel/cpu_setup_ppc970.S
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/cpu_setup_ppc970.S
+++ linux-2.6/arch/powerpc/kernel/cpu_setup_ppc970.S
@@ -16,27 +16,12 @@
#include <asm/asm-offsets.h>
#include <asm/cache.h>
-_GLOBAL(__970_cpu_preinit)
- /*
- * Do nothing if not running in HV mode
- */
+_GLOBAL(__cpu_preinit_ppc970)
+ /* Do nothing if not running in HV mode */
mfmsr r0
rldicl. r0,r0,4,63
beqlr
- /*
- * Deal only with PPC970 and PPC970FX.
- */
- mfspr r0,SPRN_PVR
- srwi r0,r0,16
- cmpwi r0,0x39
- beq 1f
- cmpwi r0,0x3c
- beq 1f
- cmpwi r0,0x44
- bnelr
-1:
-
/* Make sure HID4:rm_ci is off before MMU is turned off, that large
* pages are enabled with HID4:61 and clear HID5:DCBZ_size and
* HID5:DCBZ32_ill
@@ -72,21 +57,6 @@ _GLOBAL(__970_cpu_preinit)
isync
blr
-_GLOBAL(__setup_cpu_ppc970)
- mfspr r0,SPRN_HID0
- li r11,5 /* clear DOZE and SLEEP */
- rldimi r0,r11,52,8 /* set NAP and DPM */
- mtspr SPRN_HID0,r0
- mfspr r0,SPRN_HID0
- mfspr r0,SPRN_HID0
- mfspr r0,SPRN_HID0
- mfspr r0,SPRN_HID0
- mfspr r0,SPRN_HID0
- mfspr r0,SPRN_HID0
- sync
- isync
- blr
-
/* Definitions for the table use to save CPU states */
#define CS_HID0 0
#define CS_HID1 8
@@ -101,33 +71,28 @@ cpu_state_storage:
.balign L1_CACHE_BYTES,0
.text
-/* Called in normal context to backup CPU 0 state. This
- * does not include cache settings. This function is also
- * called for machine sleep. This does not include the MMU
- * setup, BATs, etc... but rather the "special" registers
- * like HID0, HID1, HID4, etc...
- */
-_GLOBAL(__save_cpu_setup)
- /* Some CR fields are volatile, we back it up all */
- mfcr r7
-
- /* Get storage ptr */
- LOAD_REG_IMMEDIATE(r5,cpu_state_storage)
-
- /* We only deal with 970 for now */
- mfspr r0,SPRN_PVR
- srwi r0,r0,16
- cmpwi r0,0x39
- beq 1f
- cmpwi r0,0x3c
- beq 1f
- cmpwi r0,0x44
- bne 2f
-1: /* skip if not running in HV mode */
+_GLOBAL(__setup_cpu_ppc970)
+ /* Do nothing if not running in HV mode */
mfmsr r0
rldicl. r0,r0,4,63
- beq 2f
+ beqlr
+
+ mfspr r0,SPRN_HID0
+ li r11,5 /* clear DOZE and SLEEP */
+ rldimi r0,r11,52,8 /* set NAP and DPM */
+ mtspr SPRN_HID0,r0
+ mfspr r0,SPRN_HID0
+ mfspr r0,SPRN_HID0
+ mfspr r0,SPRN_HID0
+ mfspr r0,SPRN_HID0
+ mfspr r0,SPRN_HID0
+ mfspr r0,SPRN_HID0
+ sync
+ isync
+
+ /* Save away cpu state */
+ LOAD_REG_IMMEDIATE(r5,cpu_state_storage)
/* Save HID0,1,4 and 5 */
mfspr r3,SPRN_HID0
@@ -139,35 +104,19 @@ _GLOBAL(__save_cpu_setup)
mfspr r3,SPRN_HID5
std r3,CS_HID5(r5)
-2:
- mtcr r7
blr
/* Called with no MMU context (typically MSR:IR/DR off) to
* restore CPU state as backed up by the previous
* function. This does not include cache setting
*/
-_GLOBAL(__restore_cpu_setup)
- /* Get storage ptr (FIXME when using anton reloc as we
- * are running with translation disabled here
- */
- LOAD_REG_IMMEDIATE(r5,cpu_state_storage)
-
- /* We only deal with 970 for now */
- mfspr r0,SPRN_PVR
- srwi r0,r0,16
- cmpwi r0,0x39
- beq 1f
- cmpwi r0,0x3c
- beq 1f
- cmpwi r0,0x44
- bnelr
-
-1: /* skip if not running in HV mode */
+_GLOBAL(__restore_cpu_ppc970)
+ /* Do nothing if not running in HV mode */
mfmsr r0
rldicl. r0,r0,4,63
beqlr
+ LOAD_REG_IMMEDIATE(r5,cpu_state_storage)
/* Before accessing memory, we make sure rm_ci is clear */
li r0,0
mfspr r3,SPRN_HID4
Index: linux-2.6/arch/powerpc/kernel/head_64.S
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/head_64.S
+++ linux-2.6/arch/powerpc/kernel/head_64.S
@@ -132,7 +132,7 @@ _GLOBAL(__secondary_hold)
bne 100b
#if defined(CONFIG_SMP) || defined(CONFIG_KEXEC)
- LOAD_REG_IMMEDIATE(r4, .pSeries_secondary_smp_init)
+ LOAD_REG_IMMEDIATE(r4, .generic_secondary_smp_init)
mtctr r4
mr r3,r24
bctr
@@ -1484,19 +1484,17 @@ fwnmi_data_area:
. = 0x8000
/*
- * On pSeries, secondary processors spin in the following code.
+ * On pSeries and most other platforms, secondary processors spin
+ * in the following code.
* At entry, r3 = this processor's number (physical cpu id)
*/
-_GLOBAL(pSeries_secondary_smp_init)
+_GLOBAL(generic_secondary_smp_init)
mr r24,r3
/* turn on 64-bit mode */
bl .enable_64b_mode
isync
- /* Copy some CPU settings from CPU 0 */
- bl .__restore_cpu_setup
-
/* Set up a paca value for this processor. Since we have the
* physical cpu id in r24, we need to search the pacas to find
* which logical id maps to our physical one.
@@ -1522,15 +1520,28 @@ _GLOBAL(pSeries_secondary_smp_init)
/* start. */
sync
- /* Create a temp kernel stack for use before relocation is on. */
+#ifndef CONFIG_SMP
+ b 3b /* Never go on non-SMP */
+#else
+ cmpwi 0,r23,0
+ beq 3b /* Loop until told to go */
+
+ /* See if we need to call a cpu state restore handler */
+ LOAD_REG_IMMEDIATE(r23, cur_cpu_spec)
+ ld r23,0(r23)
+ ld r23,CPU_SPEC_RESTORE(r23)
+ cmpdi 0,r23,0
+ beq 4f
+ ld r23,0(r23)
+ mtctr r23
+ bctrl
+
+4: /* Create a temp kernel stack for use before relocation is on. */
ld r1,PACAEMERGSP(r13)
subi r1,r1,STACK_FRAME_OVERHEAD
- cmpwi 0,r23,0
-#ifdef CONFIG_SMP
- bne .__secondary_start
+ b .__secondary_start
#endif
- b 3b /* Loop until told to go */
#ifdef CONFIG_PPC_ISERIES
_STATIC(__start_initialization_iSeries)
@@ -1611,7 +1622,16 @@ _GLOBAL(__start_initialization_multiplat
bl .enable_64b_mode
/* Setup some critical 970 SPRs before switching MMU off */
- bl .__970_cpu_preinit
+ mfspr r0,SPRN_PVR
+ srwi r0,r0,16
+ cmpwi r0,0x39 /* 970 */
+ beq 1f
+ cmpwi r0,0x3c /* 970FX */
+ beq 1f
+ cmpwi r0,0x44 /* 970MP */
+ bne 2f
+1: bl .__cpu_preinit_ppc970
+2:
/* Switch off MMU if not already */
LOAD_REG_IMMEDIATE(r4, .__after_prom_start - KERNELBASE)
@@ -1782,7 +1802,7 @@ _GLOBAL(pmac_secondary_start)
isync
/* Copy some CPU settings from CPU 0 */
- bl .__restore_cpu_setup
+ bl .__restore_cpu_ppc970
/* pSeries do that early though I don't think we really need it */
mfmsr r3
@@ -1932,12 +1952,6 @@ _STATIC(start_here_multiplatform)
mr r5,r26
bl .identify_cpu
- /* Save some low level config HIDs of CPU0 to be copied to
- * other CPUs later on, or used for suspend/resume
- */
- bl .__save_cpu_setup
- sync
-
/* Do very early kernel initializations, including initial hash table,
* stab and slb setup before we turn on relocation. */
Index: linux-2.6/arch/powerpc/platforms/cell/smp.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/smp.c
+++ linux-2.6/arch/powerpc/platforms/cell/smp.c
@@ -57,7 +57,7 @@
*/
static cpumask_t of_spin_map;
-extern void pSeries_secondary_smp_init(unsigned long);
+extern void generic_secondary_smp_init(unsigned long);
/**
* smp_startup_cpu() - start the given cpu
@@ -74,7 +74,7 @@ static inline int __devinit smp_startup_
{
int status;
unsigned long start_here = __pa((u32)*((unsigned long *)
- pSeries_secondary_smp_init));
+ generic_secondary_smp_init));
unsigned int pcpu;
int start_cpu;
Index: linux-2.6/arch/powerpc/platforms/pseries/smp.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/pseries/smp.c
+++ linux-2.6/arch/powerpc/platforms/pseries/smp.c
@@ -62,7 +62,7 @@
*/
static cpumask_t of_spin_map;
-extern void pSeries_secondary_smp_init(unsigned long);
+extern void generic_secondary_smp_init(unsigned long);
#ifdef CONFIG_HOTPLUG_CPU
@@ -270,7 +270,7 @@ static inline int __devinit smp_startup_
{
int status;
unsigned long start_here = __pa((u32)*((unsigned long *)
- pSeries_secondary_smp_init));
+ generic_secondary_smp_init));
unsigned int pcpu;
int start_cpu;
Index: linux-2.6/arch/powerpc/kernel/asm-offsets.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/asm-offsets.c
+++ linux-2.6/arch/powerpc/kernel/asm-offsets.c
@@ -241,6 +241,7 @@ int main(void)
DEFINE(CPU_SPEC_PVR_VALUE, offsetof(struct cpu_spec, pvr_value));
DEFINE(CPU_SPEC_FEATURES, offsetof(struct cpu_spec, cpu_features));
DEFINE(CPU_SPEC_SETUP, offsetof(struct cpu_spec, cpu_setup));
+ DEFINE(CPU_SPEC_RESTORE, offsetof(struct cpu_spec, cpu_restore));
#ifndef CONFIG_PPC64
DEFINE(pbe_address, offsetof(struct pbe, address));
Index: linux-2.6/arch/powerpc/kernel/cputable.c
===================================================================
--- linux-2.6.orig/arch/powerpc/kernel/cputable.c
+++ linux-2.6/arch/powerpc/kernel/cputable.c
@@ -39,7 +39,10 @@ extern void __setup_cpu_7400(unsigned lo
extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
#endif /* CONFIG_PPC32 */
+#ifdef CONFIG_PPC64
extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
+extern void __restore_cpu_ppc970(void);
+#endif /* CONFIG_PPC64 */
/* This table only contains "desktop" CPUs, it need to be filled with embedded
* ones as well...
@@ -184,6 +187,7 @@ struct cpu_spec cpu_specs[] = {
.dcache_bsize = 128,
.num_pmcs = 8,
.cpu_setup = __setup_cpu_ppc970,
+ .cpu_restore = __restore_cpu_ppc970,
.oprofile_cpu_type = "ppc64/970",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "ppc970",
@@ -199,6 +203,7 @@ struct cpu_spec cpu_specs[] = {
.dcache_bsize = 128,
.num_pmcs = 8,
.cpu_setup = __setup_cpu_ppc970,
+ .cpu_restore = __restore_cpu_ppc970,
.oprofile_cpu_type = "ppc64/970",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "ppc970",
@@ -214,6 +219,7 @@ struct cpu_spec cpu_specs[] = {
.dcache_bsize = 128,
.num_pmcs = 8,
.cpu_setup = __setup_cpu_ppc970,
+ .cpu_restore = __restore_cpu_ppc970,
.oprofile_cpu_type = "ppc64/970",
.oprofile_type = PPC_OPROFILE_POWER4,
.platform = "ppc970",
Index: linux-2.6/include/asm-powerpc/cputable.h
===================================================================
--- linux-2.6.orig/include/asm-powerpc/cputable.h
+++ linux-2.6/include/asm-powerpc/cputable.h
@@ -36,6 +36,7 @@
struct cpu_spec;
typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec);
+typedef void (*cpu_restore_t)(void);
enum powerpc_oprofile_type {
PPC_OPROFILE_INVALID = 0,
@@ -65,6 +66,8 @@ struct cpu_spec {
* BHT, SPD, etc... from head.S before branching to identify_machine
*/
cpu_setup_t cpu_setup;
+ /* Used to restore cpu setup on secondary processors and at resume */
+ cpu_restore_t cpu_restore;
/* Used by oprofile userspace to select the right counters */
char *oprofile_cpu_type;
^ permalink raw reply
* Re: [RFC PATCH 1/4] powerpc 2.6.16-rt17: to build on powerpc w/ RT
From: Paul Mackerras @ 2006-08-11 5:11 UTC (permalink / raw)
To: Tsutomu OWA; +Cc: linuxppc-dev, mingo, tglx, linux-kernel
In-Reply-To: <yyiodushvxs.wl@forest.swc.toshiba.co.jp>
Tsutomu OWA writes:
> diff -rup -x CVS 2.6.16-rt17/arch/powerpc/kernel/time.c rt-powerpc/arch/powerpc/kernel/time.c
> --- 2.6.16-rt17/arch/powerpc/kernel/time.c 2006-04-26 18:24:28.000000000 +0900
> +++ rt-powerpc/arch/powerpc/kernel/time.c 2006-07-12 13:45:31.000000000 +0900
> @@ -200,6 +200,7 @@ void udelay(unsigned long usecs)
> }
> EXPORT_SYMBOL(udelay);
>
> +#ifndef CONFIG_GENERIC_TIME
I would be very surprised if this is all that is required for
CONFIG_GENERIC_TIME to work correctly on powerpc. Have you verified
that the CONFIG_GENERIC_TIME stuff works correctly on powerpc and
provides all the features provided by the current implementation?
Paul.
^ permalink raw reply
* Re: [RFC PATCH 1/4] powerpc 2.6.16-rt17: to build on powerpc w/ RT
From: Tsutomu OWA @ 2006-08-11 6:08 UTC (permalink / raw)
To: Paul Mackerras; +Cc: mingo, tglx, linux-kernel, linuxppc-dev
In-Reply-To: <17628.4499.609213.401518@cargo.ozlabs.ibm.com>
Hi,
> On Fri, 11 Aug 2006 15:11:47 +1000
> Paul Mackerras <paulus@samba.org> said:
> I would be very surprised if this is all that is required for
> CONFIG_GENERIC_TIME to work correctly on powerpc. Have you verified
> that the CONFIG_GENERIC_TIME stuff works correctly on powerpc and
> provides all the features provided by the current implementation?
Well, probably no as you say so.
What I did for CONFIG_GENERIC_TIME is just to fix a compile
error and to see if the kernel boots or not. As I mentioned,
it's experimental and is posted to see whether I'm moving in the
right direction or not.
I'm afraid I have not yet looked into any generic time related
features/implementations. Looks like generic time related things
should be on the ToDo list.
Thanks a lot for your response.
-- owa
^ permalink raw reply
* how to apply a PowerPC patch to linux 2.4 kernel and port to memec board with vertex II pro FPGA?
From: Ujwal @ 2006-08-11 6:10 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 296 bytes --]
hi all,
im new to porting of Linux to PowerPC . Could anyone let me know
1) the procedure of how to Port a linux OS to PowerPC for a VirtexII Pro
memec board??
whats are the steps that i need to follow?
2) where can i find the power-pc patch for linux 2.4 kernel?
Thanks and Regards,
Ujwal
[-- Attachment #2: Type: text/html, Size: 480 bytes --]
^ permalink raw reply
* latest git: compile error: arch/powerpc/kernel/built-in.o
From: Niels Kristian Bech Jensen @ 2006-08-11 6:13 UTC (permalink / raw)
To: linuxppc-dev
> LD .tmp_vmlinux1
> arch/powerpc/kernel/built-in.o: In function `__restore_cpu_setup':
> (.text+0xcd34): undefined reference to `kexec_sr_activated'
> arch/powerpc/kernel/built-in.o: In function `__restore_cpu_setup':
> (.text+0xcd44): undefined reference to `crash_kexec_secondary'
> arch/powerpc/kernel/built-in.o: In function `early_init_devtree':
> (.init.text+0x1cdc): undefined reference to `reserve_crashkernel'
> arch/powerpc/kernel/built-in.o: In function `early_init_devtree':
> (.init.text+0x1e1c): undefined reference to `overlaps_crashkernel'
> make[1]: *** [.tmp_vmlinux1] Error 1
> make[1]: Leaving directory `/home/shorty/kernel-factory/git.08102006/linux-2.6'
> make: *** [debian/stamp-build-kernel] Error 2
I've hit the same build error in 2.6.18-rc4. Maybe the patches should also be added to the main kernel tree?
Regards,
Niels Kristian
^ permalink raw reply
* Re: [PATCH 3/6] ehea: queue management
From: Thomas Klein @ 2006-08-11 7:28 UTC (permalink / raw)
To: Michael Neuling
Cc: Thomas Klein, netdev, linux-kernel, Christoph Raisch,
linuxppc-dev, Marcus Eder, Alexey Dobriyan
In-Reply-To: <20060811004602.23EB467B64@ozlabs.org>
Michael Neuling wrote:
>>>> +static inline u32 map_swqe_size(u8 swqe_enc_size)
>>>> +{
>>>> + return 128 << swqe_enc_size;
>>>> +} ^
>>>> + |
>>>> +static inline u32|map_rwqe_size(u8 rwqe_enc_size)
>>>> +{ |
>>>> + return 128 << rwqe_enc_size;
>>>>
>> ^
>>
>>>> +} |
>>>>
>>> |
>>> Snap! These are ide|tical...
>>>
>> |
>> No, they aren't. -----+
>>
>
> Functionally identical.
>
> Mikey
>
>
Agreed. Functions were replaced by a single map_wqe_size() function.
Thomas
^ permalink raw reply
* Re: [PATCH 6/6] ehea: Kernel build (Kconfig / Makefile)
From: Thomas Q Klein @ 2006-08-11 8:03 UTC (permalink / raw)
To: Michael Neuling; +Cc: linux-ppc, mikey, Christoph Raisch, osstklei
In-Reply-To: <20060810053024.C691F67A5E@ozlabs.org>
[-- Attachment #1: Type: text/plain, Size: 774 bytes --]
mikey@ozlabs.org wrote on 10.08.2006 07:30:24:
> > --- linux-2.6.18-rc4/drivers/net/Makefile 2006-08-06
11:20:11.000000000 -
> 0700
> > +++ patched_kernel/drivers/net/Makefile 2006-08-08
03:00:30.061451584 -
> 0700
> > @@ -10,6 +10,7 @@ obj-$(CONFIG_E1000) += e1000/
> > obj-$(CONFIG_IBM_EMAC) += ibm_emac/
> > obj-$(CONFIG_IXGB) += ixgb/
> > obj-$(CONFIG_CHELSIO_T1) += chelsio/
> > +obj-$(CONFIG_EHEA) += ehea/
> > obj-$(CONFIG_BONDING) += bonding/
> > obj-$(CONFIG_GIANFAR) += gianfar_driver.o
>
> Looks like the whitespace has been munged here...
>
> Mikey
I see it looks damaged but infact it isn't. All obj-$(CONFIG_*) lines in
the Makefile start at column 0 and so does the one I added. I don't know
why it appears in the diff like that.
Thomas
[-- Attachment #2: Type: text/html, Size: 1121 bytes --]
^ permalink raw reply
* Re: XUPV2P, which kernel 2.6. device drivers are available?
From: Benjamin Heyne @ 2006-08-11 8:30 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <44D7644A.5070107@gmail.com>
And so it came to pass, that on Mon, 07 Aug 2006 17:03:22 +0100
Ameet Patil <ammubhai@gmail.com> wrote as thus:
> Hi Benjamin,
> I had ported the ENET driver but it was a bit buggy. Could you send
> me your driver patch so I can test it?
>
Hi,
I have put all necessary files into an archive. I have implemented
the driver into a patched version of the 2.6.18-rc3 kernel, so
I thought it would be the best to provide all modified files in an
archive (also, I am not familiar with generating patches and stuff... ;-).
Please feel free to provide a "real" patch.
Ok, here we go:
http://www.dt.e-technik.uni-dortmund.de/mitarbeiter/heyne/xilinx/xilinx_emac_26.zip
Be warned:
This driver probably can be considered as BadHack(TM) -
It's the first one I am providing to the public. So if
you have any suggestions for improving it, please tell me.
TODO (As far as I can tell):
- Make it a real platform device
- Make use of the XILINX_EDK config of the TEMAC driver patch
(Btw.: Will this be officially integrated into the kernel?).
Any feedback will be appreciated...
Best regards
--
Benjamin Heyne
^ permalink raw reply
* RE: PCI driver on EB8347
From: rajan rai @ 2006-08-11 9:15 UTC (permalink / raw)
To: Liu Dave-r63238, Gala Kumar K.-galak; +Cc: linuxppc-embedded
In-Reply-To: <995B09A8299C2C44B59866F6391D2635018CA7@zch01exm21.fsl.freescale.net>
[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]
I'm using polling mechanism and not interrupts in my driver. Although I'm not using polling I see strange behavior When I do lspci -v I don't see any interrupts being allocated to PCI device behind PCI bridge !!!! But when I use same card directly on primary bus I do see interrupt being allocated to PCI device. Any advise why IRQ's being not allocated in case its attached to PCI bridge ?
Do I need to take care of any extra configuration in case of PCI card is attached to PCI bridge ?
Yaa you are correct I shouldn't use CONFIG_85xx_PCI2
Thanks,
-Rajan
________________________________
From: Liu Dave-r63238 [mailto:DaveLiu@freescale.com]
Sent: Thu 8/10/2006 10:40 PM
To: rajan rai; Gala Kumar K.-galak
Cc: linuxppc-embedded@ozlabs.org
Subject: RE: PCI driver on EB8347
Rajan> I have written PCI driver which works fine along with
MPC8347 and two PCI
Rajan> card connected in a single PCI bus. When I try to communicate
same PCI card
Rajan> using PCI bridge ( PCI2050B ), Linux does detect PCI card on
Secondary bus
Rajan> but same driver doesn't work !!!!
PCI interrupt for secondary bus set up properly?
Rajan> Do I need to enable support for second PCI host controller
at kernel level to
Rajan>make it work? Or I need to do something else ? I tried compiling
PPC-linux kernel
Rajan> after enabling CONFIG_85xx_PCI2 kernel doesn't compile it gives
me error while
Rajan>compiling "arch/ppc/syslib/ppc83xx_setup.c" Kernel version I'm
using is 2.6.13.
Why you enable CONFIG_85xx_PCI2 in kernel? It is for 85xx, but you are
using 8347 processor.
<snip>
Dave
[-- Attachment #2: Type: text/html, Size: 3177 bytes --]
^ permalink raw reply
* Re: SystemAce Driver.
From: Ameet Patil @ 2006-08-11 9:34 UTC (permalink / raw)
To: sudheer; +Cc: linuxppc-embedded
In-Reply-To: <44D9F9DF.5020100@gmail.com>
Hi Sudheer,
Frank has already answered your questions. If you have any problems
with the SysAce patch... do let me know. I have written a small tutorial
here if it helps...
http://linux.get2knowmore.com
-Ameet
sudheer wrote:
> Hello Ameet Patil
>
> I am looking for linux kernel source 2.6.16 with system ace controller
> support. I downloaded the linux-2.6.16 and linux-2.6.17-1 source from
> kernel.org but could not find any files related to system ace
> controller ( No xilinx_sysace directory in drivers/block/) . I have
> checked penguinppc.org also but could not get it.
>
> Can you please send to me the link where i could download the
> linuxppc-2.6.16 source with system ace support.
>
> Thanks & Regards
> Sudheer
>
> Ameet Patil wrote:
>> Hi Raja,
>> I have ported the Xilinx System ACE driver to 2.6 kernel. Find the
>> latest one here:
>> http://www.cs.york.ac.uk/rtslab/demos/amos/xupv2pro/patches/linuxppc-2.6.17.1-sysace-1.2.patch
>>
>> NOTE: this patch wouldn't work if you are using the TEMAC driver. In
>> which case use the -after-TEMAC patch found in the patches folder above.
>>
>> Check the following discussions (threads) for more details:
>> 1. "Xilinx SystemACE driver for 2.6"
>> 2. "Xilinx BSP for linux 2.6"
>> 3. "Kernel hangs after "Now booting the kernel"."
>>
>> cheers,
>> -Ameet
>>
>> Raja Chidambaram wrote:
>>
>>> Hi all,
>>> We are working on customized board with amcc 440SPe
>>> processor & xilinx System Ace controller. The System
>>> Ace controller is connected to compact flash driver.
>>>
>>> We use u-boot 1.2 as bootloader & linux kernel
>>> 2.6.16-2.
>>>
>>> On the process the u-boot is able to detect compact
>>> flash through Xilinx SystemAce controller & able to
>>> load the kernel image into compact flash.But when the
>>> linux boot's up it not able to detect the System Ace
>>> controller or compact flash.
>>>
>>> Note:we need to have the root file system in compact
>>> flash.
>>>
>>> Is their any drivers available for SystemAce
>>> controller on linux 2.6,if their how to get it.please
>>> help me in this
>>> with regards
>>> raja
>>>
>>>
>>>
>>> __________________________________________________
>>> Do You Yahoo!?
>>> Tired of spam? Yahoo! Mail has the best spam protection around
>>> http://mail.yahoo.com
>>> _______________________________________________
>>> Linuxppc-embedded mailing list
>>> Linuxppc-embedded@ozlabs.org
>>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>>
>>>
>> _______________________________________________
>> Linuxppc-embedded mailing list
>> Linuxppc-embedded@ozlabs.org
>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>
>>
>
^ permalink raw reply
* Re: [PATCH 3/6] ehea: queue management
From: Jörn Engel @ 2006-08-11 9:21 UTC (permalink / raw)
To: Thomas Klein
Cc: Thomas Klein, Michael Neuling, netdev, linux-kernel,
Christoph Raisch, linuxppc-dev, Marcus Eder, Alexey Dobriyan
In-Reply-To: <44DC319A.10802@de.ibm.com>
On Fri, 11 August 2006 09:28:26 +0200, Thomas Klein wrote:
> Michael Neuling wrote:
> >>>>+static inline u32 map_swqe_size(u8 swqe_enc_size)
> >>>>+static inline u32|map_rwqe_size(u8 rwqe_enc_size)
> >
> Agreed. Functions were replaced by a single map_wqe_size() function.
Just a general thing, try to avoid having two identifiers that are
near-100% identical. As seen in this thread, they are _very_ easy to
confuse.
Ime, there are two methods to avoid this. One is to make the
identifiers longer, something like "map_seek_wqe_size" and
"map_read_wqe_size". The other is to make them shorter, just "s" and
"r" is less confusing than the above.
Which method works best depends on many things, including personal
taste.
Jörn
--
And spam is a useful source of entropy for /dev/random too!
-- Jasmine Strong
^ permalink raw reply
* [PATCH] ehea: PPC - New hcall opcode defines
From: Thomas Klein @ 2006-08-11 9:40 UTC (permalink / raw)
To: linux-ppc; +Cc: Thomas Klein, Christoph Raisch, Marcus Eder, Jan-Bernd Themann
Hi,
this patch adds additional hcall opcode defines in asm-powerpc/hvcall.h
which are required for the IBM eHEA Ethernet Device Driver which is
targeted for kernel inclusion in the near future.
Including those defines in hvcall.h was a request we got in reply to
posting our driver.
Driver post: http://ozlabs.org/pipermail/linuxppc-dev/2006-August/024947.html
Reply: http://ozlabs.org/pipermail/linuxppc-dev/2006-August/024971.html
I'm aware this does not fix a bug and we're already at rc4 but since it
adds only a few innocent defines it would be great if it could be included
in 2.6.18-rc5.
This patch replaces yesterday's patch with the same title. It contains
the modification requested by a comment I got.
Kind regards
Thomas
Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Changelog-by: Thomas Klein <tklein@de.ibm.com>
Differences to patch
http://ozlabs.org/pipermail/linuxppc-dev/2006-August/025000.html
Changelog:
- New defines rearranged according to their numerical value
include/asm-powerpc/hvcall.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff -Nurp -X dontdiff linux-2.6.18-rc4/include/asm-powerpc/hvcall.h patched_kernel/include/asm-powerpc/hvcall.h
--- linux-2.6.18-rc4/include/asm-powerpc/hvcall.h 2006-08-06 11:20:11.000000000 -0700
+++ patched_kernel/include/asm-powerpc/hvcall.h 2006-08-11 01:54:49.696514466 -0700
@@ -198,6 +198,19 @@
#define H_MANAGE_TRACE 0x1C0
#define H_QUERY_INT_STATE 0x1E4
#define H_POLL_PENDING 0x1D8
+#define H_MODIFY_HEA_QP 0x250
+#define H_QUERY_HEA_QP 0x254
+#define H_QUERY_HEA 0x258
+#define H_QUERY_HEA_PORT 0x25C
+#define H_MODIFY_HEA_PORT 0x260
+#define H_REG_BCMC 0x264
+#define H_DEREG_BCMC 0x268
+#define H_REGISTER_HEA_RPAGES 0x26C
+#define H_DISABLE_AND_GET_HEA 0x270
+#define H_GET_HEA_INFO 0x274
+#define H_ALLOC_HEA_RESOURCE 0x278
+#define H_ADD_CONN 0x284
+#define H_DEL_CONN 0x288
#define H_JOIN 0x298
#define H_VASI_STATE 0x2A4
#define H_ENABLE_CRQ 0x2B0
^ permalink raw reply
* Re: [PATCH] ehea: PPC - New hcall opcode defines
From: Thomas Klein @ 2006-08-11 9:49 UTC (permalink / raw)
To: Stephen Rothwell
Cc: tklein, themann, Thomas Klein, linuxppc-dev, raisch, meder
In-Reply-To: <20060811012044.1c8fcd20.sfr@canb.auug.org.au>
Stephen Rothwell wrote:
> On Thu, 10 Aug 2006 17:05:28 +0200 Thomas Klein <osstklei@de.ibm.com> wrote:
>
>> diff -Nurp -X dontdiff linux-2.6.18-rc4/include/asm-powerpc/hvcall.h patched_kernel/include/asm-powerpc/hvcall.h
>> --- linux-2.6.18-rc4/include/asm-powerpc/hvcall.h 2006-08-06 11:20:11.000000000 -0700
>> +++ patched_kernel/include/asm-powerpc/hvcall.h 2006-08-10 06:26:33.018907062 -0700
>> @@ -201,6 +201,19 @@
>> #define H_JOIN 0x298
>> #define H_VASI_STATE 0x2A4
>> #define H_ENABLE_CRQ 0x2B0
>> +#define H_ALLOC_HEA_RESOURCE 0x278
>> +#define H_MODIFY_HEA_QP 0x250
>> +#define H_QUERY_HEA_QP 0x254
>> +#define H_QUERY_HEA 0x258
>> +#define H_QUERY_HEA_PORT 0x25C
>> +#define H_MODIFY_HEA_PORT 0x260
>> +#define H_REG_BCMC 0x264
>> +#define H_DEREG_BCMC 0x268
>> +#define H_REGISTER_HEA_RPAGES 0x26C
>> +#define H_DISABLE_AND_GET_HEA 0x270
>> +#define H_GET_HEA_INFO 0x274
>> +#define H_ADD_CONN 0x284
>> +#define H_DEL_CONN 0x288
>>
>
> This patch appears to be whitespace damaged and it would be preferable if
> the new defines were in there correct places in numerical order.
>
> Thanks.
>
>
I agree. I posted a new patch
(http://ozlabs.org/pipermail/linuxppc-dev/2006-August/025032.html)
where I rearranged the defines to fit in the numerical order with the
other defines.
The whitespaces are not damaged although they appear to be. This is due
to the usage of
TAB characters to align the hex values. TAB characters are used in the
whole file to align the
numerical values. I applied the patch and the result looks okay.
^ permalink raw reply
* mpc8xx usb controller on linux 2.6
From: Josef Angermeier @ 2006-08-11 10:39 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
I am using linux 2.6.18 on a MPC875, which runs on a custom board. Some changes to the official kernel allow me to get the mpc8xx internal usb host controller working and access an usb stick successfully. I just used Brad Parkers 2.4 patch, ported it to linux 2.6 and merged
it with the cpm2usb project. Until now it just worked for my board. Maybe any skilled programmer would like to test the patch also on his own board, fix some bugs and give me some confidence that the patch is somehow stable so that it once can be added to official linux source tree. I would appreciate that and try to help to get it working.
You can find the patch at
http://wwwcip.informatik.uni-erlangen.de/~sijoange/
Because of a bug in the m8xx USB CPM (read m8xx errata) you must feed a 1khz signal out and feed it at the DREQ pin in again on your board. Then you have to patch the kernel, configure linux to use the m8xx usb sof patch and the m8xx usb host controller, startup the compiled linux, fix some bugs, give me some feedback.
Regards,
Josef
^ permalink raw reply
* Re: SystemAce Driver.
From: sudheer @ 2006-08-11 10:42 UTC (permalink / raw)
To: Ameet Patil; +Cc: linuxppc-embedded
In-Reply-To: <44DC4F34.1070308@gmail.com>
Hi Ameet,
Firstly, thanks for the mail.
I am able to compile the linux-2.6.16 and got the ace support files with
the patch.
While compiling got some errors with xparameters, but am rectify them.
I need to wait for the hardware to test the source.
Thanks & Regards
Sudheer
Ameet Patil wrote:
> Hi Sudheer,
> Frank has already answered your questions. If you have any problems
> with the SysAce patch... do let me know. I have written a small
> tutorial here if it helps...
>
> http://linux.get2knowmore.com
>
>
> -Ameet
>
> sudheer wrote:
>> Hello Ameet Patil
>>
>> I am looking for linux kernel source 2.6.16 with system ace
>> controller support. I downloaded the linux-2.6.16 and linux-2.6.17-1
>> source from kernel.org but could not find any files related to system
>> ace controller ( No xilinx_sysace directory in drivers/block/) . I
>> have checked penguinppc.org also but could not get it.
>>
>> Can you please send to me the link where i could download the
>> linuxppc-2.6.16 source with system ace support.
>>
>> Thanks & Regards
>> Sudheer
>>
>> Ameet Patil wrote:
>>> Hi Raja,
>>> I have ported the Xilinx System ACE driver to 2.6 kernel. Find
>>> the latest one here:
>>> http://www.cs.york.ac.uk/rtslab/demos/amos/xupv2pro/patches/linuxppc-2.6.17.1-sysace-1.2.patch
>>>
>>>
>>> NOTE: this patch wouldn't work if you are using the TEMAC driver. In
>>> which case use the -after-TEMAC patch found in the patches folder
>>> above.
>>>
>>> Check the following discussions (threads) for more details:
>>> 1. "Xilinx SystemACE driver for 2.6"
>>> 2. "Xilinx BSP for linux 2.6"
>>> 3. "Kernel hangs after "Now booting the kernel"."
>>>
>>> cheers,
>>> -Ameet
>>>
>>> Raja Chidambaram wrote:
>>>
>>>> Hi all,
>>>> We are working on customized board with amcc 440SPe
>>>> processor & xilinx System Ace controller. The System
>>>> Ace controller is connected to compact flash driver.
>>>>
>>>> We use u-boot 1.2 as bootloader & linux kernel
>>>> 2.6.16-2.
>>>>
>>>> On the process the u-boot is able to detect compact
>>>> flash through Xilinx SystemAce controller & able to
>>>> load the kernel image into compact flash.But when the
>>>> linux boot's up it not able to detect the System Ace
>>>> controller or compact flash.
>>>>
>>>> Note:we need to have the root file system in compact
>>>> flash.
>>>>
>>>> Is their any drivers available for SystemAce
>>>> controller on linux 2.6,if their how to get it.please
>>>> help me in this
>>>> with regards
>>>> raja
>>>>
>>>>
>>>>
>>>> __________________________________________________
>>>> Do You Yahoo!?
>>>> Tired of spam? Yahoo! Mail has the best spam protection around
>>>> http://mail.yahoo.com _______________________________________________
>>>> Linuxppc-embedded mailing list
>>>> Linuxppc-embedded@ozlabs.org
>>>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>>>
>>>>
>>> _______________________________________________
>>> Linuxppc-embedded mailing list
>>> Linuxppc-embedded@ozlabs.org
>>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>>
>>>
>>
>
^ permalink raw reply
* how to apply a PowerPC patch to linux 2.4 kernel and port to memec board with vertex II pro FPGA?
From: Ujwal @ 2006-08-11 11:02 UTC (permalink / raw)
To: linuxppc-embedded
In-Reply-To: <b47d45990608102310l4cba891fnce5ee8d60c7134ef@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 298 bytes --]
hi all,
im new to porting of Linux to PowerPC . Could anyone let me know
1) the procedure of how to Port a linux OS to PowerPC for a VirtexII Pro
memec board??
whats are the steps that i need to follow?
2) where can i find the power-pc patch for linux 2.4 kernel?
Thanks and Regards,
Ujwal
[-- Attachment #2: Type: text/html, Size: 570 bytes --]
^ permalink raw reply
* Re: Gianfar eth driver on 8540 ppc - for 2.4 and 2.6 : different outputs
From: Prashant Yendigeri @ 2006-08-11 11:21 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-embedded
In-Reply-To: <E5C22C0A-45C9-4FA8-B10D-8F3EBDA03878@kernel.crashing.org>
[-- Attachment #1: Type: text/plain, Size: 2411 bytes --]
Hi,
Downloaded 2.6.16.26 and booted up and got this :
/ # ifconfig eth0 172.28.8.254 up
[ 34.034596] 0:00 not found
[ 34.037330] eth0: Could not attach to PHY
[ 34.041809] 0:00 not found
SIOCSIFFLAGS: No[ 34.044526] eth0: Could not attach to PHY
such device
SIOCSIFFLAGS: No such device
I had enabled all the PHY devices in .config and also tried only with
Marvell phy enabled.
Kernel boot messages :
[ 2.296555] Gianfar MII Bus: probed
[ 2.301789] eth0: Gianfar Ethernet Controller Version 1.2,
00:01:af:07:9b:8a
[ 2.309039] eth0: Running with NAPI disabled
[ 2.313307] eth0: 64/64 RX/TX BD ring size
[ 2.318498] eth1: Gianfar Ethernet Controller Version 1.2,
00:00:00:00:72:6f
[ 2.325738] eth1: Running with NAPI disabled
[ 2.330006] eth1: 64/64 RX/TX BD ring size
[ 2.335198] eth2: Gianfar Ethernet Controller Version 1.2,
6f:74:3d:2f:64:65
[ 2.342377] eth2: Running with NAPI disabled
[ 2.346662] eth2: 64/64 RX/TX BD ring size
[ 2.351586] Marvell 88E1101: Registered new driver
[ 2.357010] Davicom DM9161E: Registered new driver
[ 2.362443] Davicom DM9131: Registered new driver
[ 2.367775] Cicada Cis8204: Registered new driver
[ 2.373136] LXT970: Registered new driver
[ 2.377794] LXT971: Registered new driver
[ 2.382461] QS6612: Registered new driver
Regards,
Prashant
Kumar Gala <galak@kernel.crashing.org>
08/11/2006 09:40 AM
To
Prashant Yendigeri <Prashant.Yendigeri@lntinfotech.com>
cc
linuxppc-embedded@ozlabs.org
Subject
Re: Gianfar eth driver on 8540 ppc - for 2.4 and 2.6 : different outputs
On Aug 10, 2006, at 6:18 AM, Prashant Yendigeri wrote:
>
> Hi,
>
> The gianfar driver of 2.6.12 and 2.4.20 give different outputs on
> the same PPC 8540 board.
>
> What could be the reason ?
>
> Output on 2.4.20 :
> /root # ifconfig eth0 172.28.8.254 up
> eth0: PHY is Marvell 88E1011S (1410c62)
> eth0: Auto-negotiation done
> eth0: Half Duplex
> eth0: Speed 10BT
> eth0: Link is up
>
> Output on 2.6.12
> / # ifconfig eth0 172.28.8.254 up
> eth0: PHY is Generic MII (ffffffff)
It looks like your 2.6.12 kernel isn't handling the PHY correctly.
I'd recommend upgrading to something newer which has the phylib
(can't remember which 2.6 that went into).
- kumar
______________________________________________________________________
______________________________________________________________________
[-- Attachment #2: Type: text/html, Size: 4795 bytes --]
^ permalink raw reply
* [PATCH] kprobes/powerpc: Fix possible system crash during out-of-line single-stepping
From: Ananth N Mavinakayanahalli @ 2006-08-11 11:31 UTC (permalink / raw)
To: linuxppc-dev; +Cc: willschm, Paul Mackerras, Anton Blanchard
- On archs that have no-exec support, we vmalloc() a executable scratch
area of PAGE_SIZE and divide it up into an array of slots of maximum
instruction size for that arch
- On a kprobe registration, the original instruction is copied to the
first available free slot, so if multiple kprobes are registered, chances
are, they get contiguous slots
- On POWER4, due to not having coherent icaches, we could hit a situation
where a probe that is registered on one processor, is hit immediately on
another. This second processor could have fetched the stream of text from
the out-of-line single-stepping area *before* the probe registration
completed, possibly due to an earlier (and a different) kprobe hit and
hence would see stale data at the slot.
Executing such an arbitrary instruction lead to a problem as reported
in LTC bugzilla 23555.
The correct solution is to call flush_icache_range() as soon as the
instruction is copied for out-of-line single-stepping, so the correct
instruction is seen on all processors.
Thanks to Will Schmidt who tracked this down.
Ananth
---
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
---
arch/powerpc/kernel/kprobes.c | 2 ++
1 files changed, 2 insertions(+)
Index: linux-2.6.18-rc4/arch/powerpc/kernel/kprobes.c
===================================================================
--- linux-2.6.18-rc4.orig/arch/powerpc/kernel/kprobes.c
+++ linux-2.6.18-rc4/arch/powerpc/kernel/kprobes.c
@@ -61,6 +61,8 @@ int __kprobes arch_prepare_kprobe(struct
if (!ret) {
memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
p->opcode = *p->addr;
+ flush_icache_range((unsigned long)p->ainsn.insn,
+ (unsigned long)p->ainsn.insn + sizeof(kprobe_opcode_t));
}
return ret;
^ 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