mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: andrew.j.wade@gmail.com
Cc: linux-kernel@vger.kernel.org, Andi Kleen <ak@suse.de>
Subject: Re: [2.6.19-rc3-mm1] BUG at arch/i386/mm/pageattr.c:165
Date: Mon, 30 Oct 2006 18:04:30 -0800	[thread overview]
Message-ID: <20061030180430.2466212f.akpm@osdl.org> (raw)
In-Reply-To: <200610302026.24724.ajwade@cpe001346162bf9-cm0011ae8cd564.cpe.net.cable.rogers.com>

On Mon, 30 Oct 2006 20:26:24 -0500
Andrew James Wade <andrew.j.wade@gmail.com> wrote:

> I got the BUG below while booting. -rc2-mm2 worked fine, but with a
> different .config. I'm going to try and narrow this down further.
> 
> cheers,
> Andrew Wade
> 
> agpgart: Detected VIA KT266/KY266x/KT333 chipset
> agpgart: unable to get minor: 175
> agpgart: agp_frontend_initialize() failed.
> ------------[ cut here ]------------
> kernel BUG at arch/i386/mm/pageattr.c:165!
> invalid opcode: 0000 [#1]
> last sysfs file: 
> CPU:    0
> EIP:    0060:[<c010fdd7>]    Not tainted VLI
> EFLAGS: 00010082   (2.6.19-rc3-mm1 #1)
> EIP is at change_page_attr+0x167/0x234
> eax: 1fc001e3   ebx: c1009c80   ecx: dfc20000   edx: c04e4dfc
> esi: 1fc20000   edi: e0820000   ebp: 00000005   esp: dffc5e7c
> ds: 007b   es: 007b   ss: 0068
> Process swapper (pid: 1, ti=dffc4000 task=dffc3530 task.ti=dffc4000)
> Stack: 00000011 c13f8400 00000010 00000292 c04e4dfc dfc20000 00000163 00000163 
>        c13f8200 dfe66984 e0820000 00000005 c010fab8 c03ee740 c03ee740 dfe2334c 
>        00000004 e080f000 c0289195 dfe2334c dfe2334c e080f000 c02881f6 fffffffb 
> Call Trace:
>  [<c010fab8>] iounmap+0xaa/0xdc
>  [<00000004>] 0x4
>  =======================
> Code: 84 b7 00 00 00 eb d2 ff 43 0c eb 23 84 c0 78 1b 0b 74 24 1c 8b 54 24 10 89 32 8b 43 0c 85 c0 75 04 0f 0b eb fe 48 89 43 0c eb 04 <0f> 0b eb fe 8b 03 f6 c4 04 75 6c f6 05 0c 7c 45 c0 08 74 63 83 
> EIP: [<c010fdd7>] change_page_attr+0x167/0x234 SS:ESP 0068:dffc5e7c
>  <0>Kernel panic - not syncing: Attempted to kill init!

I'd be suspecting x86_64-mm-i386-clflush-size.patch and
x86_64-mm-i386-cpa-clflush.patch.  Because x86_64-mm-cpa-clflush.patch made
my x86_64 box instacrash in a similar manner, so I reverted that.

below is a ptch which reverts x86_64-mm-i386-clflush-size.patch and
x86_64-mm-i386-cpa-clflush.patch.  Can you test it please?

 arch/i386/kernel/cpu/common.c |    3 ---
 arch/i386/kernel/cpu/proc.c   |    3 +--
 arch/i386/mm/pageattr.c       |   24 +++++++-----------------
 include/asm-i386/cpufeature.h |    1 -
 include/asm-i386/processor.h  |    1 -
 5 files changed, 8 insertions(+), 24 deletions(-)

diff -puN arch/i386/mm/pageattr.c~revert-x86_64-mm-i386-cpa-clflush arch/i386/mm/pageattr.c
--- a/arch/i386/mm/pageattr.c~revert-x86_64-mm-i386-cpa-clflush
+++ a/arch/i386/mm/pageattr.c
@@ -67,17 +67,11 @@ static struct page *split_large_page(uns
 	return base;
 } 
 
-static void flush_kernel_map(void *arg)
+static void flush_kernel_map(void *dummy) 
 { 
-	unsigned long adr = (unsigned long)arg;
-
-	if (adr && cpu_has_clflush) {
-		int i;
-		for (i = 0; i < PAGE_SIZE; i += boot_cpu_data.x86_clflush_size)
-			asm volatile("clflush (%0)" :: "r" (adr + i));
-	} else if (boot_cpu_data.x86_model >= 4)
+	/* Could use CLFLUSH here if the CPU supports it (Hammer,P4) */
+	if (boot_cpu_data.x86_model >= 4) 
 		wbinvd();
-
 	/* Flush all to work around Errata in early athlons regarding 
 	 * large page flushing. 
 	 */
@@ -179,9 +173,9 @@ __change_page_attr(struct page *page, pg
 	return 0;
 } 
 
-static inline void flush_map(void *adr)
+static inline void flush_map(void)
 {
-	on_each_cpu(flush_kernel_map, adr, 1, 1);
+	on_each_cpu(flush_kernel_map, NULL, 1, 1);
 }
 
 /*
@@ -223,13 +217,9 @@ void global_flush_tlb(void)
 	spin_lock_irq(&cpa_lock);
 	list_replace_init(&df_list, &l);
 	spin_unlock_irq(&cpa_lock);
-	if (!cpu_has_clflush)
-		flush_map(0);
-	list_for_each_entry_safe(pg, next, &l, lru) {
-		if (cpu_has_clflush)
-			flush_map(page_address(pg));
+	flush_map();
+	list_for_each_entry_safe(pg, next, &l, lru)
 		__free_page(pg);
-	}
 }
 
 #ifdef CONFIG_DEBUG_PAGEALLOC
diff -puN include/asm-i386/cpufeature.h~revert-x86_64-mm-i386-cpa-clflush include/asm-i386/cpufeature.h
--- a/include/asm-i386/cpufeature.h~revert-x86_64-mm-i386-cpa-clflush
+++ a/include/asm-i386/cpufeature.h
@@ -137,7 +137,6 @@
 #define cpu_has_pmm_enabled	boot_cpu_has(X86_FEATURE_PMM_EN)
 #define cpu_has_ds		boot_cpu_has(X86_FEATURE_DS)
 #define cpu_has_pebs 		boot_cpu_has(X86_FEATURE_PEBS)
-#define cpu_has_clflush		boot_cpu_has(X86_FEATURE_CLFLSH)
 
 #endif /* __ASM_I386_CPUFEATURE_H */
 
diff -puN arch/i386/kernel/cpu/common.c~revert-x86_64-mm-i386-cpa-clflush arch/i386/kernel/cpu/common.c
--- a/arch/i386/kernel/cpu/common.c~revert-x86_64-mm-i386-cpa-clflush
+++ a/arch/i386/kernel/cpu/common.c
@@ -314,8 +314,6 @@ static void __cpuinit generic_identify(s
 #else
 			c->apicid = (ebx >> 24) & 0xFF;
 #endif
-			if (c->x86_capability[0] & (1<<19))
-				c->x86_clflush_size = ((ebx >> 8) & 0xff) * 8;
 		} else {
 			/* Have CPUID level 0 only - unheard of */
 			c->x86 = 4;
@@ -380,7 +378,6 @@ void __cpuinit identify_cpu(struct cpuin
 	c->x86_vendor_id[0] = '\0'; /* Unset */
 	c->x86_model_id[0] = '\0';  /* Unset */
 	c->x86_max_cores = 1;
-	c->x86_clflush_size = 32;
 	memset(&c->x86_capability, 0, sizeof c->x86_capability);
 
 	if (!have_cpuid_p()) {
diff -puN arch/i386/kernel/cpu/proc.c~revert-x86_64-mm-i386-cpa-clflush arch/i386/kernel/cpu/proc.c
--- a/arch/i386/kernel/cpu/proc.c~revert-x86_64-mm-i386-cpa-clflush
+++ a/arch/i386/kernel/cpu/proc.c
@@ -152,10 +152,9 @@ static int show_cpuinfo(struct seq_file 
 				seq_printf(m, " [%d]", i);
 		}
 
-	seq_printf(m, "\nbogomips\t: %lu.%02lu\n",
+	seq_printf(m, "\nbogomips\t: %lu.%02lu\n\n",
 		     c->loops_per_jiffy/(500000/HZ),
 		     (c->loops_per_jiffy/(5000/HZ)) % 100);
-	seq_printf(m, "clflush size\t: %u\n\n", c->x86_clflush_size);
 
 	return 0;
 }
diff -puN include/asm-i386/processor.h~revert-x86_64-mm-i386-cpa-clflush include/asm-i386/processor.h
--- a/include/asm-i386/processor.h~revert-x86_64-mm-i386-cpa-clflush
+++ a/include/asm-i386/processor.h
@@ -73,7 +73,6 @@ struct cpuinfo_x86 {
 #endif
 	unsigned char x86_max_cores;	/* cpuid returned max cores value */
 	unsigned char apicid;
-	unsigned short x86_clflush_size;
 #ifdef CONFIG_SMP
 	unsigned char booted_cores;	/* number of cores as seen by OS */
 	__u8 phys_proc_id; 		/* Physical processor id. */
_


  reply	other threads:[~2006-10-31  2:04 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-30  0:00 2.6.19-rc3-mm1 Andrew Morton
2006-10-30  2:50 ` 2.6.19-rc3-mm1 Dave Jones
2006-10-30  3:54   ` 2.6.19-rc3-mm1 Greg KH
2006-10-30  5:16     ` 2.6.19-rc3-mm1 Andrew Morton
2006-10-30  5:56       ` 2.6.19-rc3-mm1 Greg KH
2006-10-30 19:55       ` 2.6.19-rc3-mm1 - ATI SATA controller not detected Rafael J. Wysocki
2006-10-30 20:04         ` Greg KH
2006-10-30 20:15           ` 2.6.19-rc3-mm1 - udev doesn't work (was: ATI SATA controller not detected) Rafael J. Wysocki
2006-10-30 20:22             ` Greg KH
2006-10-30 20:48               ` Rafael J. Wysocki
2006-10-30 20:57                 ` Greg KH
2006-10-31  0:19                   ` Rafael J. Wysocki
2006-10-31  7:29                   ` Rafael J. Wysocki
2006-10-31  7:40                     ` Andrew Morton
2006-10-31  7:48                       ` Rafael J. Wysocki
2006-10-31  7:58                         ` Andrew Morton
2006-11-02  2:29                           ` 2.6.19-rc3-mm1 - udev doesn't work Andy Whitcroft
2006-10-30 20:36             ` Jeff Garzik
2006-10-30 20:45               ` Rafael J. Wysocki
2006-10-30 10:36 ` 2.6.19-rc3-mm1 Reuben Farrelly
2006-10-30 16:53   ` 2.6.19-rc3-mm1 Om Narasimhan
2006-10-30 15:25 ` 2.6.19-rc3-mm1 -- missing network adaptors Andy Whitcroft
2006-10-30 15:47   ` Martin J. Bligh
2006-10-30 16:47     ` Andrew Morton
2006-10-30 17:09       ` Martin Bligh
2006-10-30 17:21         ` Andy Whitcroft
2006-10-30 20:14           ` Cornelia Huck
2006-10-31  6:30             ` Mike Galbraith
2006-10-31  6:37               ` Martin J. Bligh
2006-10-31  6:54                 ` Mike Galbraith
2006-10-31  7:13                   ` Greg KH
2006-10-31  7:15                     ` Mike Galbraith
2006-10-31  7:21                       ` Greg KH
2006-10-31  7:31                         ` Mike Galbraith
2006-10-31  8:03                           ` Mike Galbraith
2006-10-31 19:07                             ` Greg KH
2006-10-31  6:59                 ` Greg KH
2006-10-31  7:09                   ` Mike Galbraith
2006-10-31  7:22                     ` Greg KH
2006-10-31 16:28                       ` Mike Galbraith
2006-10-31 18:14                         ` Mike Galbraith
2006-11-01  4:43                           ` Mike Galbraith
2006-11-01  5:25                             ` Andrew Morton
2006-11-01  6:12                               ` Mike Galbraith
2006-11-01  7:43                                 ` Mike Galbraith
2006-11-01  9:26                                 ` Mike Galbraith
2006-11-01 18:48                                   ` Andrew Morton
2006-11-01 20:13                                     ` Greg KH
2006-11-01 21:15                                     ` Mike Galbraith
2006-10-31  7:30                   ` Martin J. Bligh
2006-10-31  7:58                     ` Greg KH
2006-10-31 15:52                       ` Martin J. Bligh
2006-10-31 16:46                         ` Cornelia Huck
2006-10-31 17:09                           ` Martin J. Bligh
2006-10-31 17:29                             ` Cornelia Huck
2006-10-31 17:55                               ` Andy Whitcroft
2006-11-01  1:39                               ` Martin Bligh
2006-11-01  2:08                                 ` Greg KH
2006-11-01  2:11                                   ` Martin Bligh
2006-11-01 16:43                                     ` Greg KH
2006-11-02  5:24                                     ` Greg KH
2006-11-02  5:26                                       ` Martin J. Bligh
2006-11-02  5:49                                         ` Greg KH
2006-11-02  5:54                                         ` Mike Galbraith
2006-11-02  6:02                                         ` Greg KH
2006-11-02  6:07                                           ` Andrew Morton
2006-11-02  6:42                                             ` Greg KH
2006-11-02  6:49                                               ` Andrew Morton
2006-11-02  6:56                                                 ` Greg KH
2006-11-02  9:22                                                   ` Andy Whitcroft
2006-11-02 10:26                                                   ` Cornelia Huck
2006-11-03  0:57                                                     ` Greg KH
2006-11-02  6:32                                           ` Martin J. Bligh
2006-11-02  6:41                                             ` Andrew Morton
2006-11-01 10:00                                   ` Andy Whitcroft
2006-10-31 21:31                           ` Greg KH
2006-11-01  4:44                             ` Mike Galbraith
2006-10-31  7:36                   ` Mike Galbraith
2006-10-31  8:03             ` Cornelia Huck
2006-10-30 20:38           ` Andy Whitcroft
2006-10-31  1:03             ` Andy Whitcroft
2006-10-31  1:26 ` [2.6.19-rc3-mm1] BUG at arch/i386/mm/pageattr.c:165 Andrew James Wade
2006-10-31  2:04   ` Andrew Morton [this message]
2006-10-31  3:03     ` Andrew James Wade
2006-10-31  3:13       ` Andrew Morton
2006-10-31  3:58         ` Andrew James Wade
2006-10-31  4:11           ` Andrew Morton
2006-10-31  4:20             ` Greg KH
2006-10-31  5:09               ` Andrew James Wade
2006-11-01 16:25                 ` Andrew James Wade
2006-10-31  5:10           ` Andrew Morton
2006-10-31  6:31             ` Mike Galbraith
2006-10-31  7:03             ` Greg KH
2006-10-31  7:34               ` Andrew Morton
2006-10-31  7:48                 ` Andrew Morton
2006-10-31  8:01                 ` Greg KH
2006-10-31  8:12                   ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061030180430.2466212f.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=ak@suse.de \
    --cc=andrew.j.wade@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®