Re: [uml-devel] [PATCH 1/3] UML - Fix stub address calculations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 1 Oct 2007, Jeff Dike wrote:
> The Kconfig language seems not to allow calculation of hex constants,
> so I moved this to as-layout.h.  CONFIG_STUB_CODE, CONFIG_STUB_DATA,
> and CONFIG_STUB_START are now gone.  In their place are STUB_CODE,
> STUB_DATA, and STUB_START in as-layout.h.

Hmm, perhaps you can use _AC() (from <linux/const.h>) to defined the original
constants instead, so you don't need the #ifdefs?

> --- linux-2.6.22.orig/arch/um/include/as-layout.h	2007-09-27 11:47:22.000000000 -0400
> +++ linux-2.6.22/arch/um/include/as-layout.h	2007-10-01 16:41:26.000000000 -0400
> @@ -6,6 +6,28 @@
>  #ifndef __START_H__
>  #define __START_H__
>  
> +#include "uml-config.h"
> +#include "kern_constants.h"
> +
> +/*
> + * Assembly doesn't want any casting, but C does, so define these
> + * without casts here, and define new symbols with casts inside the C
> + * section.
> + */
> +#define ASM_STUB_CODE (UML_CONFIG_TOP_ADDR - 2 * UM_KERN_PAGE_SIZE)
> +#define ASM_STUB_DATA (UML_CONFIG_TOP_ADDR - UM_KERN_PAGE_SIZE)
> +#define ASM_STUB_START ASM_STUB_CODE
> +
> +/*
> + * This file is included by the assembly stubs, which just want the
> + * definitions above.
> + */
> +#ifndef __ASSEMBLY__
> +
> +#define STUB_CODE ((unsigned long) ASM_STUB_CODE)
> +#define STUB_DATA ((unsigned long) ASM_STUB_DATA)
> +#define STUB_START ((unsigned long) ASM_STUB_START)
> +
>  #include "sysdep/ptrace.h"
>  
>  struct cpu_task {
> @@ -32,3 +54,5 @@ extern int linux_main(int argc, char **a
>  extern void (*sig_info[])(int, struct uml_pt_regs *);
>  
>  #endif
> +
> +#endif

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux