From: "Martin J. Bligh" Subject: Re: [RFC PATCH 18/35] Support gdt/idt/ldt handling on Xen. Date: Tue, 09 May 2006 07:49:54 -0700 Message-ID: <4460AC12.3000006@mbligh.org> References: <20060509084945.373541000@sous-sol.org> <20060509085155.177937000@sous-sol.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060509085155.177937000@sous-sol.org> Sender: linux-kernel-owner@vger.kernel.org To: Chris Wright Cc: linux-kernel@vger.kernel.org, virtualization@lists.osdl.org, xen-devel@lists.xensource.com, Ian Pratt List-Id: xen-devel@lists.xenproject.org > +static inline void load_TLS(struct thread_struct *t, unsigned int cpu) > +{ > +#define C(i) HYPERVISOR_update_descriptor(virt_to_machine(&get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN + i]), *(u64 *)&t->tls_array[i]) > + C(0); C(1); C(2); > +#undef C > +} Please just expand this or make it a real function call (static inline), not a temporary macro ..