Displaying 6 results from an estimated 6 matches for "newldt".
2007 Apr 18
2
[PATCH 3/6] i386 virtualization - Make ldt a desc struct
...@@ -28,28 +28,27 @@
> }
> #endif
>
> -static inline int alloc_ldt(mm_context_t *pc, const int oldsize, int mincount, const int reload)
> +static inline int alloc_ldt(mm_context_t *pc, const int old_pages, int new_pages, const int reload)
> {
> - void *oldldt;
> - void *newldt;
> + struct desc_struct *oldldt;
> + struct desc_struct *newldt;
>
Not quite related here (since change was introduced in earlier patch),
but old alloc_ldt special cased when room was available. This is gone,
so am I reading this correctly, each time through it will allocate a
new one,...
2007 Apr 18
2
[PATCH 3/6] i386 virtualization - Make ldt a desc struct
...@@ -28,28 +28,27 @@
> }
> #endif
>
> -static inline int alloc_ldt(mm_context_t *pc, const int oldsize, int mincount, const int reload)
> +static inline int alloc_ldt(mm_context_t *pc, const int old_pages, int new_pages, const int reload)
> {
> - void *oldldt;
> - void *newldt;
> + struct desc_struct *oldldt;
> + struct desc_struct *newldt;
>
Not quite related here (since change was introduced in earlier patch),
but old alloc_ldt special cased when room was available. This is gone,
so am I reading this correctly, each time through it will allocate a
new one,...
2007 Apr 18
0
[PATCH 20/21] i386 Ldt cleanups 3
...*null)
{
if (current->active_mm)
@@ -27,33 +27,33 @@ static void flush_ldt(void *null)
}
#endif
-static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
+static inline int alloc_ldt(mm_context_t *pc, const int old_pages, int new_pages, const int reload)
{
- void *oldldt;
- void *newldt;
- int oldsize;
+ struct desc_struct *oldldt;
+ struct desc_struct *newldt;
- if (mincount <= pc->size)
- return 0;
- oldsize = pc->size;
- mincount = (mincount+511)&(~511);
- if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE)
- newldt = vmalloc(mincount*LDT_ENTRY_SIZE);
+ if (new_pages &...
2007 Apr 18
0
[PATCH 20/21] i386 Ldt cleanups 3
...*null)
{
if (current->active_mm)
@@ -27,33 +27,33 @@ static void flush_ldt(void *null)
}
#endif
-static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
+static inline int alloc_ldt(mm_context_t *pc, const int old_pages, int new_pages, const int reload)
{
- void *oldldt;
- void *newldt;
- int oldsize;
+ struct desc_struct *oldldt;
+ struct desc_struct *newldt;
- if (mincount <= pc->size)
- return 0;
- oldsize = pc->size;
- mincount = (mincount+511)&(~511);
- if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE)
- newldt = vmalloc(mincount*LDT_ENTRY_SIZE);
+ if (new_pages &...
2007 Apr 18
0
[PATCH 12/14] i386 / Move context switch inline
...rning */
static void flush_ldt(void *null)
{
if (current->active_mm)
@@ -27,15 +27,11 @@
}
#endif
-static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
+static inline int alloc_ldt(mm_context_t *pc, const int oldsize, int mincount, const int reload)
{
void *oldldt;
void *newldt;
- int oldsize;
- if (mincount <= pc->size)
- return 0;
- oldsize = pc->size;
mincount = (mincount+511)&(~511);
if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE)
newldt = vmalloc(mincount*LDT_ENTRY_SIZE);
@@ -48,12 +44,17 @@
if (oldsize)
memcpy(newldt, pc->ldt, oldsize*LDT_...
2007 Apr 18
0
[PATCH 12/14] i386 / Move context switch inline
...rning */
static void flush_ldt(void *null)
{
if (current->active_mm)
@@ -27,15 +27,11 @@
}
#endif
-static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
+static inline int alloc_ldt(mm_context_t *pc, const int oldsize, int mincount, const int reload)
{
void *oldldt;
void *newldt;
- int oldsize;
- if (mincount <= pc->size)
- return 0;
- oldsize = pc->size;
mincount = (mincount+511)&(~511);
if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE)
newldt = vmalloc(mincount*LDT_ENTRY_SIZE);
@@ -48,12 +44,17 @@
if (oldsize)
memcpy(newldt, pc->ldt, oldsize*LDT_...