Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#466977: 2.6.24-1-sb1-bcm91250a mipsel hangs running init

0 views
Skip to first unread message

Florian Lohoff

unread,
Feb 22, 2008, 3:50:06 AM2/22/08
to

Package: linux-image-2.6.24-1-sb1-bcm91250a
Version: 2.6.24-4
Arch: mipsel

Hi,
running on a Broadcom SB1 *little endian* the kernel hangs trying to run
init. The old 2.6.17 works (linux-image-2.6.17-1-sb1 version 2.6.17-5):

Set up command line arguments to: root=/dev/hda3 console=duart0
Setting up initial prom_init arguments
Cleaning up state...
Transferring control to the kernel.
Kernel entry point is at 0x80404b00
Initializing cgroup subsys cpuset
Linux version 2.6.24-1-sb1-bcm91250a (Debian 2.6.24-4) (wa...@debian.org) (gcc version 4.1.3 20071208
console [early0] enabled
CPU revision is: 01040102 (SiByte SB1)
FPU revision is: 000f0102
Broadcom SiByte BCM1250 B2 @ 800 MHz (SB1 rev 2)
Board type: SiByte BCM91250A (SWARM)
This kernel optimized for board runs with CFE
Determined physical RAM map:
memory: 000000000fe48e00 @ 0000000000000000 (usable)
memory: 000000000ffffe00 @ 0000000080000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
DMA32 0 -> 1048576
Normal 1048576 -> 1048576
Movable zone start PFN for each node
early_node_map[2] active PFN ranges
0: 0 -> 65096
0: 524288 -> 589823
Detected 1 available secondary CPU(s)
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 122568
Kernel command line: root=/dev/hda3 console=duart0
Primary instruction cache 32kB, VIVT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
Synthesized TLB refill handler (45 instructions).
Synthesized TLB load handler fastpath (59 instructions).
Synthesized TLB store handler fastpath (54 instructions).
Synthesized TLB modify handler fastpath (53 instructions).
PID hash table entries: 2048 (order: 11, 16384 bytes)
Console: colour dum7���ͽ���handover: boot [early0] -> real [duart0]
Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
Memory: 483204k/522524k available (3114k kernel code, 38732k reserved, 930k data, 196k init, 0k high)
Security Framework initialized
SELinux: Disabled at boot.
Capability LSM initialized
Mount-cache hash table entries: 256
Initializing cgroup subsys ns
Initializing cgroup subsys cpuacct
Checking for the multiply/shift bug... no.
Checking for the daddi bug... no.
Checking for the daddiu bug... no.
CPU revision is: 03040102 (SiByte SB1)
FPU revision is: 000f0102
Primary instruction cache 32kB, VIVT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
Synthesized TLB refill handler (45 instructions).
Brought up 2 CPUs
net_namespace: 120 bytes
NET: Registered protocol family 16
registering PCI controller with io_map_base unset
NET: Registered protocol family 2
Time: bcm1250-counter-3 clocksource has been installed.
IP route cache hash table entries: 4096 (order: 3, 32768 bytes)
TCP established hash table entries: 16384 (order: 6, 262144 bytes)
TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
audit: initializing netlink socket (disabled)
audit(1203668933.428:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
Installing knfsd (copyright (C) 1996 ok...@monad.swb.de).
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
duart0 at MMIO 0x10060100 (irq = 8) is a SB1250 DUART
duart1 at MMIO 0x10060200 (irq = 9) is a SB1250 DUART
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
SWARM IDE driver
ide-swarm: IDE interface at GenBus slot 4
hda: MAXTOR 6L040J2, ATA DISK drive
ide0 at 0x90000000100b3e00-0x90000000100b3e07,0x90000000100b7ec0 on irq 36
hda: max request size: 128KiB
hda: 78177792 sectors (40027 MB) w/1818KiB Cache, CHS=65535/16/63
hda: cache flushes supported
hda: hda1 hda2 hda3 hda4
mice: PS/2 mouse device common for all mice
TCP bic registered
Initializing XFRM netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
registered taskstats version 1
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 196k freed

--
Florian Lohoff f...@rfc822.org +49-171-2280134
Those who would give up a little freedom to get a little
security shall soon have neither - Benjamin Franklin

signature.asc

Martin Michlmayr

unread,
Feb 22, 2008, 5:30:13 AM2/22/08
to
* Florian Lohoff <f...@rfc822.org> [2008-02-22 09:38]:

> running on a Broadcom SB1 *little endian* the kernel hangs trying to run
> init. The old 2.6.17 works (linux-image-2.6.17-1-sb1 version 2.6.17-5):

Your best bet is to forward this to linux...@linux-mips.org

--
Martin Michlmayr
http://www.cyrius.com/

--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Florian Lohoff

unread,
Feb 22, 2008, 5:40:11 AM2/22/08
to
On Fri, Feb 22, 2008 at 11:22:26AM +0100, Martin Michlmayr wrote:
> * Florian Lohoff <f...@rfc822.org> [2008-02-22 09:38]:
> > running on a Broadcom SB1 *little endian* the kernel hangs trying to run
> > init. The old 2.6.17 works (linux-image-2.6.17-1-sb1 version 2.6.17-5):
>
> Your best bet is to forward this to linux...@linux-mips.org

:)

http://www.debian.org/Bugs/Reporting
"Don't file bugs upstream
If you file a bug in Debian, don't send a copy to the upstream
software maintainers yourself, as it is possible"

Just nitpicking ... I CCed debian-mips as Thiemo is reading there aswell.
IIRC he said that he is beating sb1 kernel to get it functional so i
was planning to point him to the bug report and opened it to make it visible
that the little endian sb1 port is currently non functional.

Flo

signature.asc

Thiemo Seufer

unread,
Feb 25, 2008, 1:40:10 PM2/25/08
to
Florian Lohoff wrote:
>
> Package: linux-image-2.6.24-1-sb1-bcm91250a
> Version: 2.6.24-4
> Arch: mipsel
>
> Hi,
> running on a Broadcom SB1 *little endian* the kernel hangs trying to run
> init. The old 2.6.17 works (linux-image-2.6.17-1-sb1 version 2.6.17-5):

Same for big endian.

[...]


> kjournald starting. Commit interval 5 seconds
> EXT3-fs: mounted filesystem with ordered data mode.
> VFS: Mounted root (ext3 filesystem) readonly.
> Freeing unused kernel memory: 196k freed

I tracked that down (in linux-mips.org's 2.6.16 tree, which was my
testcase of choice) to:
http://www.linux-mips.org/git?p=linux.git;a=commit;h=3a57f2ad7436d27dfa90717921b921fc3a168504


Thiemo

Thiemo Seufer

unread,
Mar 3, 2008, 8:10:10 AM3/3/08
to
Florian Lohoff wrote:
>
> Package: linux-image-2.6.24-1-sb1-bcm91250a
> Version: 2.6.24-4
> Arch: mipsel
>
> Hi,
> running on a Broadcom SB1 *little endian* the kernel hangs trying to run
> init. The old 2.6.17 works (linux-image-2.6.17-1-sb1 version 2.6.17-5):

The appended patch works around the problem. I don't tag it as patch
because its implications are not fully analyzed upstream. It works
well on my bcm91250a system, though.


Thiemo


This patch marks pages tainted by PIO IDE as dirty, instead of trying
to flush them right away. This

a) fixes PIO IDE for systems without dcache aliases (which lacked
the necessary cache flush so far)
b) improves performance a bit, since some pages may never need a
cache flush
c) obsoletes local_flush_data_cache_page


Signed-off-by: Thiemo Seufer <t...@networkno.de>
---

Changed to avoid some compiler warnings.


Index: linux.git/include/asm-mips/mach-generic/ide.h
===================================================================
--- linux.git.orig/include/asm-mips/mach-generic/ide.h 2008-03-02 20:15:24.000000000 +0000
+++ linux.git/include/asm-mips/mach-generic/ide.h 2008-03-02 21:52:46.000000000 +0000
@@ -107,107 +107,66 @@
#endif

/* MIPS port and memory-mapped I/O string operations. */
-static inline void __ide_flush_prologue(void)
+static inline void __ide_set_pages_dirty(const void *addr, unsigned long size)
{
-#ifdef CONFIG_SMP
- if (cpu_has_dc_aliases)
- preempt_disable();
-#endif
-}
+ unsigned long end = (unsigned long)addr + size;

-static inline void __ide_flush_epilogue(void)
-{
-#ifdef CONFIG_SMP
- if (cpu_has_dc_aliases)
- preempt_enable();
-#endif
-}
-
-static inline void __ide_flush_dcache_range(unsigned long addr, unsigned long size)
-{
- if (cpu_has_dc_aliases) {
- unsigned long end = addr + size;
-
- while (addr < end) {
- local_flush_data_cache_page((void *)addr);
- addr += PAGE_SIZE;
- }
+ while ((unsigned long)addr < end) {
+ SetPageDcacheDirty(virt_to_page(addr));
+ addr += PAGE_SIZE;
}
}

-/*
- * insw() and gang might be called with interrupts disabled, so we can't
- * send IPIs for flushing due to the potencial of deadlocks, see the comment
- * above smp_call_function() in arch/mips/kernel/smp.c. We work around the
- * problem by disabling preemption so we know we actually perform the flush
- * on the processor that actually has the lines to be flushed which hopefully
- * is even better for performance anyway.
- */
static inline void __ide_insw(unsigned long port, void *addr,
unsigned int count)
{
- __ide_flush_prologue();
insw(port, addr, count);
- __ide_flush_dcache_range((unsigned long)addr, count * 2);
- __ide_flush_epilogue();
+ __ide_set_pages_dirty(addr, count * 2);
}

-static inline void __ide_insl(unsigned long port, void *addr, unsigned int count)
+static inline void __ide_insl(unsigned long port, void *addr,
+ unsigned int count)
{
- __ide_flush_prologue();
insl(port, addr, count);
- __ide_flush_dcache_range((unsigned long)addr, count * 4);
- __ide_flush_epilogue();
+ __ide_set_pages_dirty(addr, count * 4);
}

static inline void __ide_outsw(unsigned long port, const void *addr,
unsigned long count)
{
- __ide_flush_prologue();
outsw(port, addr, count);
- __ide_flush_dcache_range((unsigned long)addr, count * 2);
- __ide_flush_epilogue();
+ __ide_set_pages_dirty(addr, count * 2);
}

static inline void __ide_outsl(unsigned long port, const void *addr,
unsigned long count)
{
- __ide_flush_prologue();
outsl(port, addr, count);
- __ide_flush_dcache_range((unsigned long)addr, count * 4);
- __ide_flush_epilogue();
+ __ide_set_pages_dirty(addr, count * 4);
}

static inline void __ide_mm_insw(void __iomem *port, void *addr, u32 count)
{
- __ide_flush_prologue();
readsw(port, addr, count);
- __ide_flush_dcache_range((unsigned long)addr, count * 2);
- __ide_flush_epilogue();
+ __ide_set_pages_dirty(addr, count * 2);
}

static inline void __ide_mm_insl(void __iomem *port, void *addr, u32 count)
{
- __ide_flush_prologue();
readsl(port, addr, count);
- __ide_flush_dcache_range((unsigned long)addr, count * 4);
- __ide_flush_epilogue();
+ __ide_set_pages_dirty(addr, count * 4);
}

static inline void __ide_mm_outsw(void __iomem *port, void *addr, u32 count)
{
- __ide_flush_prologue();
writesw(port, addr, count);
- __ide_flush_dcache_range((unsigned long)addr, count * 2);
- __ide_flush_epilogue();
+ __ide_set_pages_dirty(addr, count * 2);
}

static inline void __ide_mm_outsl(void __iomem * port, void *addr, u32 count)
{
- __ide_flush_prologue();
writesl(port, addr, count);
- __ide_flush_dcache_range((unsigned long)addr, count * 4);
- __ide_flush_epilogue();
+ __ide_set_pages_dirty(addr, count * 4);
}

/* ide_insw calls insw, not __ide_insw. Why? */
Index: linux.git/arch/mips/mm/c-r3k.c
===================================================================
--- linux.git.orig/arch/mips/mm/c-r3k.c 2008-03-02 20:15:24.000000000 +0000
+++ linux.git/arch/mips/mm/c-r3k.c 2008-03-02 21:42:33.000000000 +0000
@@ -266,10 +266,6 @@
r3k_flush_icache_range(kaddr, kaddr + PAGE_SIZE);
}

-static void local_r3k_flush_data_cache_page(void *addr)
-{
-}
-
static void r3k_flush_data_cache_page(unsigned long addr)
{
}
@@ -322,7 +318,6 @@
flush_icache_range = r3k_flush_icache_range;

flush_cache_sigtramp = r3k_flush_cache_sigtramp;
- local_flush_data_cache_page = local_r3k_flush_data_cache_page;
flush_data_cache_page = r3k_flush_data_cache_page;

_dma_cache_wback_inv = r3k_dma_cache_wback_inv;
Index: linux.git/arch/mips/mm/c-r4k.c
===================================================================
--- linux.git.orig/arch/mips/mm/c-r4k.c 2008-03-02 21:33:29.000000000 +0000
+++ linux.git/arch/mips/mm/c-r4k.c 2008-03-02 21:42:33.000000000 +0000
@@ -1296,7 +1296,6 @@

flush_cache_sigtramp = r4k_flush_cache_sigtramp;
flush_icache_all = r4k_flush_icache_all;
- local_flush_data_cache_page = local_r4k_flush_data_cache_page;
flush_data_cache_page = r4k_flush_data_cache_page;
flush_icache_range = r4k_flush_icache_range;

Index: linux.git/arch/mips/mm/c-tx39.c
===================================================================
--- linux.git.orig/arch/mips/mm/c-tx39.c 2008-03-02 20:15:24.000000000 +0000
+++ linux.git/arch/mips/mm/c-tx39.c 2008-03-02 21:42:33.000000000 +0000
@@ -210,11 +210,6 @@
tx39_blast_icache_page_indexed(page);
}

-static void local_tx39_flush_data_cache_page(void * addr)
-{
- tx39_blast_dcache_page((unsigned long)addr);
-}
-
static void tx39_flush_data_cache_page(unsigned long addr)
{
tx39_blast_dcache_page(addr);
@@ -352,7 +347,6 @@
flush_icache_range = (void *) tx39h_flush_icache_all;

flush_cache_sigtramp = (void *) tx39h_flush_icache_all;
- local_flush_data_cache_page = (void *) tx39h_flush_icache_all;
flush_data_cache_page = (void *) tx39h_flush_icache_all;

_dma_cache_wback_inv = tx39h_dma_cache_wback_inv;
@@ -377,7 +371,6 @@
flush_icache_range = tx39_flush_icache_range;

flush_cache_sigtramp = tx39_flush_cache_sigtramp;
- local_flush_data_cache_page = local_tx39_flush_data_cache_page;
flush_data_cache_page = tx39_flush_data_cache_page;

_dma_cache_wback_inv = tx39_dma_cache_wback_inv;
Index: linux.git/arch/mips/mm/cache.c
===================================================================
--- linux.git.orig/arch/mips/mm/cache.c 2008-03-02 20:15:24.000000000 +0000
+++ linux.git/arch/mips/mm/cache.c 2008-03-02 21:42:33.000000000 +0000
@@ -32,11 +32,9 @@

/* MIPS specific cache operations */
void (*flush_cache_sigtramp)(unsigned long addr);
-void (*local_flush_data_cache_page)(void * addr);
void (*flush_data_cache_page)(unsigned long addr);
void (*flush_icache_all)(void);

-EXPORT_SYMBOL_GPL(local_flush_data_cache_page);
EXPORT_SYMBOL(flush_data_cache_page);

#ifdef CONFIG_DMA_NONCOHERENT
Index: linux.git/include/asm-mips/cacheflush.h
===================================================================
--- linux.git.orig/include/asm-mips/cacheflush.h 2008-03-02 20:15:24.000000000 +0000
+++ linux.git/include/asm-mips/cacheflush.h 2008-03-02 21:42:33.000000000 +0000
@@ -76,7 +76,6 @@

extern void (*flush_cache_sigtramp)(unsigned long addr);
extern void (*flush_icache_all)(void);
-extern void (*local_flush_data_cache_page)(void * addr);
extern void (*flush_data_cache_page)(unsigned long addr);

/*

Martin Michlmayr

unread,
Mar 3, 2008, 10:00:15 AM3/3/08
to
* Thiemo Seufer <t...@networkno.de> [2008-03-03 12:51]:

> > running on a Broadcom SB1 *little endian* the kernel hangs trying to run
> > init. The old 2.6.17 works (linux-image-2.6.17-1-sb1 version 2.6.17-5):
>
> The appended patch works around the problem. I don't tag it as patch
> because its implications are not fully analyzed upstream. It works
> well on my bcm91250a system, though.

Do you want me to put this into our kernel package, or should I wait
for Ralf to comment on the patch?


--
Martin Michlmayr
http://www.cyrius.com/

--

Thiemo Seufer

unread,
Mar 3, 2008, 10:30:26 AM3/3/08
to
Martin Michlmayr wrote:
> * Thiemo Seufer <t...@networkno.de> [2008-03-03 12:51]:
> > > running on a Broadcom SB1 *little endian* the kernel hangs trying to run
> > > init. The old 2.6.17 works (linux-image-2.6.17-1-sb1 version 2.6.17-5):
> >
> > The appended patch works around the problem. I don't tag it as patch
> > because its implications are not fully analyzed upstream. It works
> > well on my bcm91250a system, though.
>
> Do you want me to put this into our kernel package, or should I wait
> for Ralf to comment on the patch?

I would like to wait a bit (unless we miss an important debian kernel
deadline).


Thiemo

Martin Michlmayr

unread,
Apr 20, 2008, 7:00:18 AM4/20/08
to
* Thiemo Seufer <t...@networkno.de> [2008-03-03 15:18]:

> > > The appended patch works around the problem. I don't tag it as patch
> > > because its implications are not fully analyzed upstream. It works
> > > well on my bcm91250a system, though.
> >
> > Do you want me to put this into our kernel package, or should I wait
> > for Ralf to comment on the patch?
>
> I would like to wait a bit (unless we miss an important debian kernel
> deadline).

Any update on this?

--
Martin Michlmayr
http://www.cyrius.com/

--

Thiemo Seufer

unread,
Apr 21, 2008, 12:10:08 AM4/21/08
to
Martin Michlmayr wrote:
> * Thiemo Seufer <t...@networkno.de> [2008-03-03 15:18]:
> > > > The appended patch works around the problem. I don't tag it as patch
> > > > because its implications are not fully analyzed upstream. It works
> > > > well on my bcm91250a system, though.
> > >
> > > Do you want me to put this into our kernel package, or should I wait
> > > for Ralf to comment on the patch?
> >
> > I would like to wait a bit (unless we miss an important debian kernel
> > deadline).
>
> Any update on this?

My patch improves things, but the latest kernel is still somewhat crashy
on SWARM. It works on BigSur, though. I didn't get any upstream comments
about my patch.


Thiemo

Martin Michlmayr

unread,
Jul 26, 2008, 5:00:15 PM7/26/08
to
* Thiemo Seufer <t...@networkno.de> [2008-04-21 04:54]:

> > Any update on this?
>
> My patch improves things, but the latest kernel is still somewhat crashy
> on SWARM. It works on BigSur, though. I didn't get any upstream comments
> about my patch.

Has that changed in the meantime?

Martin, who thinks we should just got rid of SWARM and BigSur "support".


--
Martin Michlmayr
http://www.cyrius.com/

--

Martin Michlmayr

unread,
Sep 14, 2008, 3:30:14 AM9/14/08
to
* Thiemo Seufer <t...@networkno.de> [2008-04-21 04:54]:
> > Any update on this?
>
> My patch improves things, but the latest kernel is still somewhat crashy
> on SWARM. It works on BigSur, though. I didn't get any upstream comments
> about my patch.

Any update on this? Thomas, do you have a moment to look at the
patch? (I'll bounce you the original message from Thiemo)


--
Martin Michlmayr
http://www.cyrius.com/

--

0 new messages