2005-01-25 12:17:43

by Norbert Preining

[permalink] [raw]
Subject: 2.6.11-rc2-mm1 strange messages

Hi Andrew!

After fixing the agpgart (fix by dj) 2.6.11-rc2-mm1 boots and runs wiht
X on my Acer TM654LCi, radeon M7.

But I found the following strange stuff in my dmesg:

. __iounmap:
------------
ACPI: DSDT (v001 ACER IBIS 0x20020930 MSFT 0x0100000e) @ 0x00000000
Built 1 zonelists
__iounmap: bad address c00fffd9
Local APIC disabled by BIOS -- you can enable it with "lapic"

and:
__journal_remove_journal_head: freeing b_committed_data

Any comments on this? Full dmesg attached.

Best wishes

Norbert

-------------------------------------------------------------------------------
Norbert Preining <preining AT logic DOT at> Technische Universit?t Wien
sip:[email protected] +43 (0) 59966-690018
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
DRAFFAN (n.)
An infuriating person who always manages to look much more dashing
that anyone else by turning up unshaven and hangover at a formal
party.
--- Douglas Adams, The Meaning of Liff


Attachments:
(No filename) (1.08 kB)
dmesg.txt (16.28 kB)
Download all attachments

2005-01-25 18:29:39

by Andrew Morton

[permalink] [raw]
Subject: Re: 2.6.11-rc2-mm1 strange messages

Norbert Preining <[email protected]> wrote:
>
> ACPI: DSDT (v001 ACER IBIS 0x20020930 MSFT 0x0100000e) @ 0x00000000
> Built 1 zonelists
> __iounmap: bad address c00fffd9

Can you please add this?

--- 25/arch/i386/mm/ioremap.c~iounmap-debugging 2005-01-25 10:26:29.448809152 -0800
+++ 25-akpm/arch/i386/mm/ioremap.c 2005-01-25 10:27:07.054092280 -0800
@@ -233,7 +233,8 @@ void iounmap(volatile void __iomem *addr
return;
p = remove_vm_area((void *) (PAGE_MASK & (unsigned long __force) addr));
if (!p) {
- printk("__iounmap: bad address %p\n", addr);
+ printk("iounmap: bad address %p\n", addr);
+ dump_stack();
return;
}

_

> and:
> __journal_remove_journal_head: freeing b_committed_data
>

OK, that might be due to Alex's changes. Is being crunched on, thanks.

2005-01-27 01:31:11

by Brown, Len

[permalink] [raw]
Subject: Re: 2.6.11-rc2-mm1 strange messages

On Tue, 2005-01-25 at 13:28, Andrew Morton wrote:
> Norbert Preining <[email protected]> wrote:
> >
> > ACPI: DSDT (v001 ACER IBIS 0x20020930 MSFT 0x0100000e) @
> 0x00000000
> > Built 1 zonelists
> > __iounmap: bad address c00fffd9
>
> Can you please add this?
>
> --- 25/arch/i386/mm/ioremap.c~iounmap-debugging 2005-01-25
> 10:26:29.448809152 -0800
> +++ 25-akpm/arch/i386/mm/ioremap.c 2005-01-25 10:27:07.054092280
> -0800
> @@ -233,7 +233,8 @@ void iounmap(volatile void __iomem *addr
> return;
> p = remove_vm_area((void *) (PAGE_MASK & (unsigned long
> __force) addr));
> if (!p) {
> - printk("__iounmap: bad address %p\n", addr);
> + printk("iounmap: bad address %p\n", addr);
> + dump_stack();
> return;
> }
>
> _
>

Better yet, can you please add this?

http://lkml.org/lkml/2005/1/3/136


2005-01-27 06:24:58

by Norbert Preining

[permalink] [raw]
Subject: Re: 2.6.11-rc2-mm1 strange messages

On Mit, 26 Jan 2005, Len Brown wrote:
> > Can you please add this?
> >
> > --- 25/arch/i386/mm/ioremap.c~iounmap-debugging 2005-01-25
> > 10:26:29.448809152 -0800
> > +++ 25-akpm/arch/i386/mm/ioremap.c 2005-01-25 10:27:07.054092280
> > -0800
> > @@ -233,7 +233,8 @@ void iounmap(volatile void __iomem *addr
> > return;
> > p = remove_vm_area((void *) (PAGE_MASK & (unsigned long
> > __force) addr));
> > if (!p) {
> > - printk("__iounmap: bad address %p\n", addr);
> > + printk("iounmap: bad address %p\n", addr);
> > + dump_stack();
> > return;
> > }
> >
> > _
> >
>
> Better yet, can you please add this?
>
> http://lkml.org/lkml/2005/1/3/136

I only get hands on the laptop today noon, but then I will immediately
recompile ...

Best wishes

Norbert

-------------------------------------------------------------------------------
Norbert Preining <preining AT logic DOT at> Technische Universit?t Wien
sip:[email protected] +43 (0) 59966-690018
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
SCRABSTER (n.)
One of those dogs which has it off on your leg during tea.
--- Douglas Adams, The Meaning of Liff

2005-01-27 12:52:57

by Norbert Preining

[permalink] [raw]
Subject: Re: 2.6.11-rc2-mm1 strange messages

Hi all!

I used the patch by Joe and got:

Built 1 zonelists
iounmap: bad address c00fffd9
[<c0404430>] trap_init+0x30/0x190
[<c03fe697>] start_kernel+0x47/0x1c0
Local APIC disabled by BIOS -- you can enable it with "lapic"


On Mit, 26 Jan 2005, Len Brown wrote:
> Better yet, can you please add this?
>
> http://lkml.org/lkml/2005/1/3/136

Hmm, it seems that this is included in 2.6.11-rc2-mm1, at least AFAIS.

Best wishes

Norbert

-------------------------------------------------------------------------------
Norbert Preining <preining AT logic DOT at> Technische Universit?t Wien
sip:[email protected] +43 (0) 59966-690018
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
VANCOUVER (n.)
The technical name for one of those huge trucks with whirling brushes
on the bottom used to clean streets.
--- Douglas Adams, The Meaning of Liff

2005-02-24 14:10:30

by Norbert Preining

[permalink] [raw]
Subject: Re: 2.6.11-rc2-mm1 strange messages

Hi Andrew!

On Die, 25 Jan 2005, Andrew Morton wrote:
> Norbert Preining <[email protected]> wrote:
> >
> > ACPI: DSDT (v001 ACER IBIS 0x20020930 MSFT 0x0100000e) @ 0x00000000
> > Built 1 zonelists
> > __iounmap: bad address c00fffd9

I still have this with 2.6.11-rc4-mm1 and the patch you proposed is
included in this kernel. Is this something I should be nervous about, or
is there a fix?

Best wishes

Norbert

> Can you please add this?
>
> --- 25/arch/i386/mm/ioremap.c~iounmap-debugging 2005-01-25 10:26:29.448809152 -0800
> +++ 25-akpm/arch/i386/mm/ioremap.c 2005-01-25 10:27:07.054092280 -0800
> @@ -233,7 +233,8 @@ void iounmap(volatile void __iomem *addr
> return;
> p = remove_vm_area((void *) (PAGE_MASK & (unsigned long __force) addr));
> if (!p) {
> - printk("__iounmap: bad address %p\n", addr);
> + printk("iounmap: bad address %p\n", addr);
> + dump_stack();
> return;
> }
>
> _
>

-------------------------------------------------------------------------------
Norbert Preining <preining AT logic DOT at> Universit? di Siena
sip:[email protected] +43 (0) 59966-690018
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
SIDCUP (n.)
One of those hats made from tying knots in the corners of a
handkerchief.
--- Douglas Adams, The Meaning of Liff

2005-02-24 23:04:17

by Andrew Morton

[permalink] [raw]
Subject: Re: 2.6.11-rc2-mm1 strange messages

Norbert Preining <[email protected]> wrote:
>
> On Die, 25 Jan 2005, Andrew Morton wrote:
> > Norbert Preining <[email protected]> wrote:
> > >
> > > ACPI: DSDT (v001 ACER IBIS 0x20020930 MSFT 0x0100000e) @ 0x00000000
> > > Built 1 zonelists
> > > __iounmap: bad address c00fffd9
>
> I still have this with 2.6.11-rc4-mm1 and the patch you proposed is
> included in this kernel. Is this something I should be nervous about, or
> is there a fix?

What does the stack backtrace from iounmap-debugging.patch say?

2005-02-25 01:23:33

by Norbert Preining

[permalink] [raw]
Subject: Re: 2.6.11-rc2-mm1 strange messages

On Don, 24 Feb 2005, Andrew Morton wrote:
> What does the stack backtrace from iounmap-debugging.patch say?

iounmap: bad address c00fffd9
[<c03f8430>] trap_init+0x30/0x190
[<c03f2697>] start_kernel+0x47/0x1c0


Best wishes

Norbert

-------------------------------------------------------------------------------
Norbert Preining <preining AT logic DOT at> Universit? di Siena
sip:[email protected] +43 (0) 59966-690018
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
"What was the self-sacrifice?"
"I jettisoned half of a much loved and I think
irreplaceable pair of shoes."
"Why was that self-sacrifice?"
"Because they were mine!" said Ford crossly.
"I think we have different value systems."
"Well mine's better."
"That's according to your... oh never mind."
--- Douglas Adams, The Hitchhikers Guide to the Galaxy

2005-02-25 02:15:13

by Andrew Morton

[permalink] [raw]
Subject: Re: 2.6.11-rc2-mm1 strange messages

Norbert Preining <[email protected]> wrote:
>
> On Don, 24 Feb 2005, Andrew Morton wrote:
> > What does the stack backtrace from iounmap-debugging.patch say?
>
> iounmap: bad address c00fffd9
> [<c03f8430>] trap_init+0x30/0x190
> [<c03f2697>] start_kernel+0x47/0x1c0

ah hah.

trap_init() does:

void __iomem *p = ioremap(0x0FFFD9, 4);

which returns phys_to_virt(0x0FFFD9) = 0xc00fffd9

then trap_init() does:

iounmap(p);

and iounmap() does

if ((void __force *) addr <= high_memory)
return;

which doesn't work, because 0xc00fffd9 is outside 0 ... high_memory.

A quick fix is to delete that iounmap() call from trap_init(), because we
"know" how ioremap() works. Or, better, simply use phys_to_virt(0x0FFFD9)
in trap_init().

Although a better fix might be to make __iounmap() behave symmetrically:

if ((long)addr >= phys_to_virt(0xA0000) &&
(long)addr < phys_to_virt(0x100000))
return;

but that's not quite right, because we're assuming that the range to be
unmapped is wholly within the PCI/ISA region. Without a VMA there just
isn't enough info to determine that.

Does anyone have any preferences?

2005-02-25 06:13:43

by Linus Torvalds

[permalink] [raw]
Subject: Re: 2.6.11-rc2-mm1 strange messages



On Thu, 24 Feb 2005, Andrew Morton wrote:
>
> Although a better fix might be to make __iounmap() behave symmetrically:
>
> if ((long)addr >= phys_to_virt(0xA0000) &&
> (long)addr < phys_to_virt(0x100000))
> return;
>
> but that's not quite right, because we're assuming that the range to be
> unmapped is wholly within the PCI/ISA region. Without a VMA there just
> isn't enough info to determine that.
>
> Does anyone have any preferences?

I think the "as symmetric as possible" thing is probably the thing to do.
It might not be perfect in theory, but hey, practice is what matters. And
in practice it's the "right thing", I think.

Linus

2005-02-25 06:34:03

by Andrew Morton

[permalink] [raw]
Subject: Re: 2.6.11-rc2-mm1 strange messages

Linus Torvalds <[email protected]> wrote:
>
> On Thu, 24 Feb 2005, Andrew Morton wrote:
> >
> > Although a better fix might be to make __iounmap() behave symmetrically:
> >
> > if ((long)addr >= phys_to_virt(0xA0000) &&
> > (long)addr < phys_to_virt(0x100000))
> > return;
> >
> > but that's not quite right, because we're assuming that the range to be
> > unmapped is wholly within the PCI/ISA region. Without a VMA there just
> > isn't enough info to determine that.
> >
> > Does anyone have any preferences?
>
> I think the "as symmetric as possible" thing is probably the thing to do.
> It might not be perfect in theory, but hey, practice is what matters. And
> in practice it's the "right thing", I think.

OK..

Norbert, does this make the warnings go away?

--- 25/arch/i386/mm/ioremap.c~iounmap-isa-special-case 2005-02-24 22:24:24.000000000 -0800
+++ 25-akpm/arch/i386/mm/ioremap.c 2005-02-24 22:32:08.000000000 -0800
@@ -17,6 +17,9 @@
#include <asm/tlbflush.h>
#include <asm/pgtable.h>

+#define ISA_START_ADDRESS 0xa0000
+#define ISA_END_ADDRESS 0x100000
+
static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
unsigned long phys_addr, unsigned long flags)
{
@@ -129,7 +132,7 @@ void __iomem * __ioremap(unsigned long p
/*
* Don't remap the low PCI/ISA area, it's always mapped..
*/
- if (phys_addr >= 0xA0000 && last_addr < 0x100000)
+ if (phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS)
return (void __iomem *) phys_to_virt(phys_addr);

/*
@@ -230,7 +233,17 @@ void iounmap(volatile void __iomem *addr
{
struct vm_struct *p;
if ((void __force *) addr <= high_memory)
- return;
+ return;
+
+ /*
+ * __ioremap special-cases the PCI/ISA range by not instantiating a
+ * vm_area and by simply returning an address into the kernel mapping
+ * of ISA space. So handle that here.
+ */
+ if (addr >= (void *)virt_to_phys((void *)ISA_START_ADDRESS) &&
+ addr < (void *)virt_to_phys((void *)ISA_END_ADDRESS))
+ return;
+
p = remove_vm_area((void *) (PAGE_MASK & (unsigned long __force) addr));
if (!p) {
printk("__iounmap: bad address %p\n", addr);
@@ -261,7 +274,7 @@ void __init *bt_ioremap(unsigned long ph
/*
* Don't remap the low PCI/ISA area, it's always mapped..
*/
- if (phys_addr >= 0xA0000 && last_addr < 0x100000)
+ if (phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS)
return phys_to_virt(phys_addr);

/*
_

2005-02-25 09:15:26

by Norbert Preining

[permalink] [raw]
Subject: Re: 2.6.11-rc2-mm1 strange messages

On Don, 24 Feb 2005, Andrew Morton wrote:
> Norbert, does this make the warnings go away?

Unfortunately no, still the very same error.

I checked double, the patch is in and new compiled and new booted
kernel!

Best wishes

Norbert

-------------------------------------------------------------------------------
Norbert Preining <preining AT logic DOT at> Universit? di Siena
sip:[email protected] +43 (0) 59966-690018
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
SNITTER (n.)
One of the rather unfunny newspaper clippings pinned to an office
wall, the humour of which is supposed to derive from the fact that the
headline contains a name similar to that of one of the occupants to
the office.
--- Douglas Adams, The Meaning of Liff

2005-02-25 09:53:49

by Andrew Morton

[permalink] [raw]
Subject: Re: 2.6.11-rc2-mm1 strange messages

Norbert Preining <[email protected]> wrote:
>
> On Don, 24 Feb 2005, Andrew Morton wrote:
> > Norbert, does this make the warnings go away?
>
> Unfortunately no, still the very same error.

Doh. This works.

--- 25/arch/i386/mm/ioremap.c~iounmap-isa-special-case 2005-02-25 01:38:51.000000000 -0800
+++ 25-akpm/arch/i386/mm/ioremap.c 2005-02-25 01:52:01.000000000 -0800
@@ -17,6 +17,9 @@
#include <asm/tlbflush.h>
#include <asm/pgtable.h>

+#define ISA_START_ADDRESS 0xa0000
+#define ISA_END_ADDRESS 0x100000
+
static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
unsigned long phys_addr, unsigned long flags)
{
@@ -129,7 +132,7 @@ void __iomem * __ioremap(unsigned long p
/*
* Don't remap the low PCI/ISA area, it's always mapped..
*/
- if (phys_addr >= 0xA0000 && last_addr < 0x100000)
+ if (phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS)
return (void __iomem *) phys_to_virt(phys_addr);

/*
@@ -230,7 +233,17 @@ void iounmap(volatile void __iomem *addr
{
struct vm_struct *p;
if ((void __force *) addr <= high_memory)
- return;
+ return;
+
+ /*
+ * __ioremap special-cases the PCI/ISA range by not instantiating a
+ * vm_area and by simply returning an address into the kernel mapping
+ * of ISA space. So handle that here.
+ */
+ if (addr >= phys_to_virt(ISA_START_ADDRESS) &&
+ addr < phys_to_virt(ISA_END_ADDRESS))
+ return;
+
p = remove_vm_area((void *) (PAGE_MASK & (unsigned long __force) addr));
if (!p) {
printk("__iounmap: bad address %p\n", addr);
@@ -261,7 +274,7 @@ void __init *bt_ioremap(unsigned long ph
/*
* Don't remap the low PCI/ISA area, it's always mapped..
*/
- if (phys_addr >= 0xA0000 && last_addr < 0x100000)
+ if (phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS)
return phys_to_virt(phys_addr);

/*
_

2005-02-25 13:27:25

by Norbert Preining

[permalink] [raw]
Subject: Re: 2.6.11-rc2-mm1 strange messages

On Fre, 25 Feb 2005, Andrew Morton wrote:
> Doh. This works.

True. Thanks.

Best wishes

Norbert

-------------------------------------------------------------------------------
Norbert Preining <preining AT logic DOT at> Universit? di Siena
sip:[email protected] +43 (0) 59966-690018
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
BOTCHERBY
The principle by which British roads are signposted.
--- Douglas Adams, The Meaning of Liff