From 265ec1b9d708b64e6fd7428877a6c411c06c800f Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 21 Aug 2018 00:02:16 +0100 Subject: [PATCH] bank32k: Handle high/low stubs In 32K/32K mode we have stubs high and low so program_vectors is needed if we shrink space too --- Kernel/bank32k.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Kernel/bank32k.c b/Kernel/bank32k.c index a4fca37b..17ec0995 100644 --- a/Kernel/bank32k.c +++ b/Kernel/bank32k.c @@ -129,9 +129,13 @@ int pagemap_realloc(usize_t code, usize_t size, usize_t stack) { if (want == have) return 0; if (have > want) { + /* Make a copy of the high vectors in the new low page */ pfree[pfptr++] = ptr[1]; ptr[1] = *ptr; + irq = __hard_di(); + program_vectors(&udata.u_page); udata.u_ptab->p_page = udata.u_page; + __hard_irqrestore(irq); return 0; } /* If we are adding then just insert the new pages, keeping the common -- 2.34.1