From: William Lee Irwin III <wli@holomorphy.com>
To: linux-kernel@vger.kernel.org
Subject: Re: pgcl-2.6.0-test5-bk3-17
Date: Sun, 30 Nov 2003 23:36:32 -0800 [thread overview]
Message-ID: <20031201073632.GQ8039@holomorphy.com> (raw)
In-Reply-To: <20031130164301.GK8039@holomorphy.com>
On Sun, Nov 30, 2003 at 08:43:01AM -0800, William Lee Irwin III wrote:
> I wonder if this would be enough to get sysenter support going again.
> I've not got a sysenter-capable userspace around, so I can't really
> test this myself.
> vs. pgcl-2.6.0-test11-5
Stack decoding fixes, shutting up some compiler warnings, and dumping
PAGE_SIZE and MMUPAGE_SIZE into /proc/meminfo (for lack of a better place).
The printk()'s down there should eventually get ripped out anyway for
minimal impact and a quieter boot, but until then...
-- wli
diff -prauN pgcl-2.6.0-test11-6/arch/i386/kernel/process.c pgcl-2.6.0-test11-7/arch/i386/kernel/process.c
--- pgcl-2.6.0-test11-6/arch/i386/kernel/process.c 2003-11-27 21:55:16.000000000 -0800
+++ pgcl-2.6.0-test11-7/arch/i386/kernel/process.c 2003-11-30 11:37:50.000000000 -0800
@@ -648,12 +648,12 @@ unsigned long get_wchan(struct task_stru
return 0;
stack_page = (unsigned long)p->thread_info;
esp = p->thread.esp;
- if (!stack_page || esp < stack_page || esp > 8188+stack_page)
+ if (!stack_page || esp < stack_page || esp > THREAD_SIZE+stack_page-4)
return 0;
/* include/asm-i386/system.h:switch_to() pushes ebp last. */
ebp = *(unsigned long *) esp;
do {
- if (ebp < stack_page || ebp > 8184+stack_page)
+ if (ebp < stack_page || ebp > THREAD_SIZE + stack_page - 8)
return 0;
eip = *(unsigned long *) (ebp+4);
if (eip < first_sched || eip >= last_sched)
diff -prauN pgcl-2.6.0-test11-6/arch/i386/mm/discontig.c pgcl-2.6.0-test11-7/arch/i386/mm/discontig.c
--- pgcl-2.6.0-test11-6/arch/i386/mm/discontig.c 2003-11-27 22:02:41.000000000 -0800
+++ pgcl-2.6.0-test11-7/arch/i386/mm/discontig.c 2003-11-30 12:46:50.000000000 -0800
@@ -268,10 +268,10 @@ unsigned long __init setup_memory(void)
for (nid = 0; nid < numnodes; nid++)
find_max_pfn_node(nid);
printk("vmallocspace = [0x%lx, 0x%lx)\n",
- VMALLOC_START, VMALLOC_END);
+ (unsigned long)VMALLOC_START, (unsigned long)VMALLOC_END);
printk("fixmapspace = [0x%lx, 0x%lx)\n",
- FIXADDR_START, FIXADDR_TOP);
- printk("MAXMEM = 0x%lx\n", MAXMEM);
+ (unsigned long)FIXADDR_START, (unsigned long)FIXADDR_TOP);
+ printk("MAXMEM = 0x%lx\n", (unsigned long)MAXMEM);
for (nid = 0; nid < numnodes; ++nid)
printk("node %d at pfns [0x%lx, 0x%lx)\n",
nid, node_start_pfn[nid], node_end_pfn[nid]);
diff -prauN pgcl-2.6.0-test11-6/arch/i386/mm/init.c pgcl-2.6.0-test11-7/arch/i386/mm/init.c
--- pgcl-2.6.0-test11-6/arch/i386/mm/init.c 2003-11-27 22:10:55.000000000 -0800
+++ pgcl-2.6.0-test11-7/arch/i386/mm/init.c 2003-11-30 12:45:48.000000000 -0800
@@ -514,24 +514,24 @@ void __init mem_init(void)
);
printk("MAXMEM=0x%lx\n", MAXMEM);
printk("vmalloc: start = 0x%lx, end = 0x%lx\n",
- VMALLOC_START, VMALLOC_END);
+ (unsigned long)VMALLOC_START, (unsigned long)VMALLOC_END);
printk("fixaddr: start = 0x%lx, end = 0x%lx\n",
- FIXADDR_START, FIXADDR_TOP);
+ (unsigned long)FIXADDR_START, (unsigned long)FIXADDR_TOP);
#ifdef CONFIG_HIGHMEM
- printk("FIX_KMAP_END == %lx\n", __fix_to_virt(FIX_KMAP_END));
+ printk("FIX_KMAP_END == %lx\n", (unsigned long)__fix_to_virt(FIX_KMAP_END));
if (__fix_to_virt(FIX_KMAP_END) % PAGE_SIZE)
printk(KERN_CRIT "kmap_atomic() area misaligned!\n");
- printk("FIX_KMAP_BEGIN == %lx\n", __fix_to_virt(FIX_KMAP_BEGIN));
+ printk("FIX_KMAP_BEGIN == %lx\n", (unsigned long)__fix_to_virt(FIX_KMAP_BEGIN));
if ((__fix_to_virt(FIX_KMAP_BEGIN) + MMUPAGE_SIZE) % PAGE_SIZE)
printk(KERN_CRIT "kmap_atomic() area misaligned!\n");
- printk("FIX_PKMAP_END == %lx\n", __fix_to_virt(FIX_PKMAP_END));
+ printk("FIX_PKMAP_END == %lx\n", (unsigned long)__fix_to_virt(FIX_PKMAP_END));
if (__fix_to_virt(FIX_PKMAP_END) % PAGE_SIZE)
printk(KERN_CRIT "kmap() area misaligned!\n");
- printk("FIX_PKMAP_BEGIN == %lx\n", __fix_to_virt(FIX_PKMAP_BEGIN));
+ printk("FIX_PKMAP_BEGIN == %lx\n", (unsigned long)__fix_to_virt(FIX_PKMAP_BEGIN));
if ((__fix_to_virt(FIX_PKMAP_BEGIN) + MMUPAGE_SIZE) % PAGE_SIZE)
printk(KERN_CRIT "kmap() area misaligned!\n");
#endif
diff -prauN pgcl-2.6.0-test11-6/fs/proc/proc_misc.c pgcl-2.6.0-test11-7/fs/proc/proc_misc.c
--- pgcl-2.6.0-test11-6/fs/proc/proc_misc.c 2003-11-27 21:55:19.000000000 -0800
+++ pgcl-2.6.0-test11-7/fs/proc/proc_misc.c 2003-11-30 12:50:32.000000000 -0800
@@ -206,7 +206,9 @@ static int meminfo_read_proc(char *page,
"PageTables: %8lu kB\n"
"VmallocTotal: %8lu kB\n"
"VmallocUsed: %8lu kB\n"
- "VmallocChunk: %8lu kB\n",
+ "VmallocChunk: %8lu kB\n"
+ "PAGE_SIZE: %8lu kB\n"
+ "MMUPAGE_SIZE: %8d kB\n",
K(i.totalram),
K(i.freeram),
K(i.bufferram),
@@ -228,7 +230,9 @@ static int meminfo_read_proc(char *page,
K(ps.nr_page_table_pages),
vmtot,
vmi.used,
- vmi.largest_chunk
+ vmi.largest_chunk,
+ K(PAGE_SIZE),
+ K(MMUPAGE_SIZE)
);
len += hugetlb_report_meminfo(page + len);
diff -prauN pgcl-2.6.0-test11-6/include/asm-i386/processor.h pgcl-2.6.0-test11-7/include/asm-i386/processor.h
--- pgcl-2.6.0-test11-6/include/asm-i386/processor.h 2003-11-26 12:42:55.000000000 -0800
+++ pgcl-2.6.0-test11-7/include/asm-i386/processor.h 2003-11-30 11:41:11.000000000 -0800
@@ -495,8 +495,16 @@ extern unsigned long thread_saved_pc(str
void show_trace(struct task_struct *task, unsigned long *stack);
unsigned long get_wchan(struct task_struct *p);
-#define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)->thread_info))[1019])
-#define KSTK_ESP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)->thread_info))[1022])
+
+#define THREAD_SIZE_LONGS (THREAD_SIZE/sizeof(unsigned long))
+#define task_pt_regs(task) \
+({ \
+ unsigned long *__ptr__ = (unsigned long *)(task)->thread_info; \
+ (struct pt_regs *)(&__ptr__[THREAD_SIZE_LONGS-1]); \
+})
+
+#define KSTK_EIP(task) (task_pt_regs(task)->eip)
+#define KSTK_ESP(task) (task_pt_regs(task)->esp)
struct microcode_header {
unsigned int hdrver;
next prev parent reply other threads:[~2003-12-01 7:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-28 4:15 pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-11-28 7:21 ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-11-28 23:51 ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-11-30 1:12 ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-11-30 16:43 ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-11-30 18:46 ` pgcl-2.6.0-test5-bk3-17 Zwane Mwaikambo
2003-11-30 18:50 ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-12-01 7:36 ` William Lee Irwin III [this message]
2003-12-01 7:44 ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-12-07 7:28 ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-12-07 18:45 ` pgcl-2.6.0-test5-bk3-17 Zwane Mwaikambo
2003-12-07 19:12 ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
2003-12-01 16:46 ` pgcl-2.6.0-test5-bk3-17 William Lee Irwin III
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=20031201073632.GQ8039@holomorphy.com \
--to=wli@holomorphy.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;
as well as URLs for NNTP newsgroup(s).