[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45177664.3060103@goop.org>
Date: Sun, 24 Sep 2006 23:25:40 -0700
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Rusty Russell <rusty@...tcorp.com.au>
CC: Andi Kleen <ak@....de>,
lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>,
virtualization <virtualization@...ts.osdl.org>
Subject: Re: [PATCH 5/7] Use %gs for per-cpu sections in kernel
Rusty Russell wrote:
> I don't think so. There's *never* address subtraction, there's
> sometimes 32 bit wrap (glibc uses this to effect subtraction, sure).
> But there's no wrap here.
>
Hm, I guess, so long as you assume the kernel data segment is always
below the kernel heap.
> To test, I changed the following:
>
> --- smpboot.c.~8~ 2006-09-25 15:51:50.000000000 +1000
> +++ smpboot.c 2006-09-25 16:00:36.000000000 +1000
> @@ -926,8 +926,9 @@
> unsigned long per_cpu_off)
> {
> unsigned limit, flags;
> + extern char __per_cpu_end[];
>
> - limit = (1 << 20);
> + limit = PAGE_ALIGN((long)__per_cpu_end) >> PAGE_SHIFT;
>
limit is a size, rather than the end address, so this isn't quite right.
J
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists