Re: [PATCH 12/21] i386 Deprecate descriptor asm

Ingo Molnar
2005-11-08T07:31:24Z

* Zachary Amsden <zach@vmware.com> wrote:

> +static inline unsigned long get_desc_base(struct desc_struct *desc)
> +{
> + unsigned long base;
> + struct desc_internal_struct *dint = desc_internal(desc);
> + base = (dint->base0) | (dint->base1 << 16) | (dint->base2 << 24);
> + return base;
> +}

these cleanups are very nice too. I only have minor style nits: e.g. the
above is more readable as:

> +static inline unsigned long get_desc_base(struct desc_struct *desc)
> +{
> + struct desc_internal_struct *dint = desc_internal(desc);
> +
> + return dint->base0 | (dint->base1 << 16) | (dint->base2 << 24);
> +}

same for the remaining inline files.

also, these should quite likely be non-inlined functions - leading to
even more compact code. I'd suggest to put them into a new
arch/i386/kernel/segments.c file.

Ingo