diff --git a/kernel/src/api/v4/smp.h b/kernel/src/api/v4/smp.h index 91f4e321..c23d4b20 100644 --- a/kernel/src/api/v4/smp.h +++ b/kernel/src/api/v4/smp.h @@ -45,7 +45,7 @@ template INLINE T *get_on_cpu(cpuid_t cpu, T *item) bool ret = kspace->lookup_mapping(item, &pgent, &pgsize, cpu); if (ret) - return (T *) addr_offset(phys_to_virt(pgent->address(kspace, pgsize)), + return (T *) addr_offset(phys_to_virt((addr_t)pgent->address(kspace, pgsize)), addr_mask(item, page_mask (pgsize))); else return NULL; diff --git a/kernel/src/glue/v4-powerpc/pgent.h b/kernel/src/arch/powerpc/pgent-pghash.h similarity index 100% rename from kernel/src/glue/v4-powerpc/pgent.h rename to kernel/src/arch/powerpc/pgent-pghash.h diff --git a/kernel/src/glue/v4-powerpc/pgent_inline.h b/kernel/src/arch/powerpc/pgent-pghash_functions.h similarity index 98% rename from kernel/src/glue/v4-powerpc/pgent_inline.h rename to kernel/src/arch/powerpc/pgent-pghash_functions.h index b2e66ac5..ef4cd686 100644 --- a/kernel/src/glue/v4-powerpc/pgent_inline.h +++ b/kernel/src/arch/powerpc/pgent-pghash_functions.h @@ -3,7 +3,7 @@ * Copyright (C) 1999-2010, Karlsruhe University * Copyright (C) 2008-2009, Volkmar Uhlig, IBM Corporation * - * File path: src/glue/v4-powerpc/pgent_inline.h + * File path: arch/powerpc/pgent-pghash_functions.h * Description: * * Redistribution and use in source and binary forms, with or without @@ -36,7 +36,7 @@ #include -#include INC_GLUE(pgent.h) +#include INC_ARCH(pgent.h) #include INC_GLUE(space.h) #include INC_GLUE(pghash.h) diff --git a/kernel/src/glue/v4-powerpc/pgent-swtlb.h b/kernel/src/arch/powerpc/pgent-swtlb.h similarity index 96% rename from kernel/src/glue/v4-powerpc/pgent-swtlb.h rename to kernel/src/arch/powerpc/pgent-swtlb.h index bc2a2cb2..84dd4f5a 100644 --- a/kernel/src/glue/v4-powerpc/pgent-swtlb.h +++ b/kernel/src/arch/powerpc/pgent-swtlb.h @@ -3,7 +3,7 @@ * Copyright (C) 1999-2010, Karlsruhe University * Copyright (C) 2008-2009, Volkmar Uhlig, IBM Corporation * - * File path: glue/v4-powerpc/pgent-swtlb.h + * File path: arch/powerpc/pgent-swtlb.h * Description: * * Redistribution and use in source and binary forms, with or without @@ -30,8 +30,9 @@ * $Id$ * ********************************************************************/ -#ifndef __GLUE__V4_POWERPC__PGENT_SWTLB_H__ -#define __GLUE__V4_POWERPC__PGENT_SWTLB_H__ +#ifndef __ARCH__POWERPC__PGENT_SWTLB_H__ +#define __ARCH__POWERPC__PGENT_SWTLB_H__ + class space_t; class mapnode_t; @@ -143,5 +144,4 @@ public: }; - -#endif /* !__GLUE__V4_POWERPC__PGENT_SWTLB_H__ */ +#endif /* !__ARCH__POWERPC__PGENT_SWTLB_H__ */ diff --git a/kernel/src/glue/v4-powerpc/pgent-swtlb_inline.h b/kernel/src/arch/powerpc/pgent-swtlb_functions.h similarity index 99% rename from kernel/src/glue/v4-powerpc/pgent-swtlb_inline.h rename to kernel/src/arch/powerpc/pgent-swtlb_functions.h index b9444ea5..c2fdb67f 100644 --- a/kernel/src/glue/v4-powerpc/pgent-swtlb_inline.h +++ b/kernel/src/arch/powerpc/pgent-swtlb_functions.h @@ -3,7 +3,7 @@ * Copyright (C) 1999-2010, Karlsruhe University * Copyright (C) 2008-2009, Volkmar Uhlig, IBM Corporation * - * File path: glue/v4-powerpc/pgent-swtlb_inline.h + * File path: arch/powerpc/pgent-swtlb_functions.h * Description: * * Redistribution and use in source and binary forms, with or without diff --git a/kernel/src/arch/powerpc/pgent.h b/kernel/src/arch/powerpc/pgent.h index 9643280e..9b5d991b 100644 --- a/kernel/src/arch/powerpc/pgent.h +++ b/kernel/src/arch/powerpc/pgent.h @@ -3,7 +3,7 @@ * Copyright (C) 1999-2010, Karlsruhe University * Copyright (C) 2008-2009, Volkmar Uhlig, IBM Corporation * - * File path: src/arch/powerpc/pgent.h + * File path: arch/powerpc/pgent.h * Description: * * Redistribution and use in source and binary forms, with or without @@ -39,15 +39,11 @@ #endif #if defined(CONFIG_PPC_MMU_SEGMENTS) - -#include INC_GLUE(pgent.h) -#include INC_GLUE(pgent_inline.h) - +#include INC_ARCH(pgent-pghash.h) +#include INC_ARCH(pgent-pghash_functions.h) #elif defined(CONFIG_PPC_MMU_TLB) - -#include INC_GLUE(pgent-swtlb.h) -#include INC_GLUE(pgent-swtlb_inline.h) - +#include INC_ARCH(pgent-swtlb.h) +#include INC_ARCH(pgent-swtlb_functions.h) #endif #if defined(CONFIG_NEW_MDB) diff --git a/kernel/src/glue/v4-powerpc/pghash.cc b/kernel/src/glue/v4-powerpc/pghash.cc index 11325590..ddb45bcf 100644 --- a/kernel/src/glue/v4-powerpc/pghash.cc +++ b/kernel/src/glue/v4-powerpc/pghash.cc @@ -33,10 +33,9 @@ #include #include INC_API(kernelinterface.h) - +#include INC_ARCH(pgent.h) #include INC_GLUE(pghash.h) #include INC_GLUE(space.h) -#include INC_GLUE(pgent_inline.h) #define TRACE_PGHASH(x...) //#define TRACE_PGHASH(x...) TRACEF(x) diff --git a/kernel/src/glue/v4-powerpc/resources_inline.h b/kernel/src/glue/v4-powerpc/resource_functions.h similarity index 95% rename from kernel/src/glue/v4-powerpc/resources_inline.h rename to kernel/src/glue/v4-powerpc/resource_functions.h index e3a88677..66b3eae1 100644 --- a/kernel/src/glue/v4-powerpc/resources_inline.h +++ b/kernel/src/glue/v4-powerpc/resource_functions.h @@ -3,7 +3,7 @@ * Copyright (C) 1999-2010, Karlsruhe University * Copyright (C) 2008-2009, Volkmar Uhlig, IBM Corporation * - * File path: glue/v4-powerpc/resources_inline.h + * File path: glue/v4-powerpc/resource_functions.h * Description: * * Redistribution and use in source and binary forms, with or without @@ -30,9 +30,8 @@ * $Id$ * ********************************************************************/ -#ifndef __GLUE__V4_POWERPC__RESOURCES_INLINE_H__ -#define __GLUE__V4_POWERPC__RESOURCES_INLINE_H__ - +#ifndef __GLUE__V4_POWERPC__RESOURCE_FUNCTIONS_H__ +#define __GLUE__V4_POWERPC__RESOURCE_FUNCTIONS_H__ #include INC_API(resources.h) INLINE void thread_resources_t::fpu_unavail_exception( tcb_t *tcb ) @@ -115,4 +114,5 @@ INLINE void thread_resources_t::set_kernel_thread( tcb_t *tcb ) tcb->resource_bits += KERNEL_THREAD; } -#endif /* !__GLUE__V4_POWERPC__RESOURCES_H__ */ + +#endif /* !__GLUE__V4_POWERPC__RESOURCE_FUNCTIONS_H__ */ diff --git a/kernel/src/glue/v4-powerpc/softhvm.cc b/kernel/src/glue/v4-powerpc/softhvm.cc index 9224414b..9458f1a0 100644 --- a/kernel/src/glue/v4-powerpc/softhvm.cc +++ b/kernel/src/glue/v4-powerpc/softhvm.cc @@ -3,7 +3,7 @@ * Copyright (C) 1999-2010, Karlsruhe University * Copyright (C) 2008-2009, Volkmar Uhlig, IBM Corporation * - * File path: src/glue/v4-powerpc/softhvm.cc + * File path: glue/v4-powerpc/softhvm.cc * Description: * * Redistribution and use in source and binary forms, with or without @@ -36,13 +36,13 @@ #include INC_ARCH(phys.h) #include INC_ARCH(softhvm.h) +#include INC_ARCH(pgent.h) #include INC_API(tcb.h) #include INC_API(schedule.h) #include INC_API(kernelinterface.h) #include INC_GLUE(exception.h) -#include INC_GLUE(pgent-swtlb_inline.h) #define TRACE_EMUL(args...) #define MAX_INSTR_EMULATE 10 @@ -249,7 +249,7 @@ space_t::handle_hvm_tlb_miss(ppc_softhvm_t *vm, ppc_softhvm_t::tlb_t *tlbentry, return false; size_t hsize = page_shift (pgsize); - paddr_t hpaddr = pg->paddress (this, pgsize) | (gpaddr & ((1ull << hsize) - 1)); + paddr_t hpaddr = pg->address (this, pgsize) | (gpaddr & ((1ull << hsize) - 1)); /* we have a valid entry in the TLB and in the ptab --> we * can create a TLB entry */ diff --git a/kernel/src/glue/v4-powerpc/space.h b/kernel/src/glue/v4-powerpc/space.h index 9aab553d..4333dec4 100644 --- a/kernel/src/glue/v4-powerpc/space.h +++ b/kernel/src/glue/v4-powerpc/space.h @@ -42,9 +42,9 @@ #include INC_API(thread.h) #if defined(CONFIG_PPC_MMU_SEGMENTS) -#include INC_GLUE(pgent.h) +#include INC_ARCH(pgent-pghash.h) #else -#include INC_GLUE(pgent-swtlb.h) +#include INC_ARCH(pgent-swtlb.h) #include INC_ARCH(swtlb.h) #define HAVE_ARCH_FREE_SPACE #include INC_ARCH(softhvm.h) diff --git a/kernel/src/glue/v4-powerpc/tcb.h b/kernel/src/glue/v4-powerpc/tcb.h index 35df6c78..67433b74 100644 --- a/kernel/src/glue/v4-powerpc/tcb.h +++ b/kernel/src/glue/v4-powerpc/tcb.h @@ -36,7 +36,7 @@ #include INC_ARCH(msr.h) #include INC_API(syscalls.h) #include INC_API(ipc.h) -#include INC_GLUE(resources_inline.h) +#include INC_GLUE(resource_functions.h) #define TRACE_TCB(x...) //#define TRACE_TCB(x...) TRACEF(x) diff --git a/kernel/src/platform/ofpower3/opic.cc b/kernel/src/platform/ofpower3/opic.cc index 46484620..018bf95b 100644 --- a/kernel/src/platform/ofpower3/opic.cc +++ b/kernel/src/platform/ofpower3/opic.cc @@ -34,9 +34,9 @@ #include INC_GLUE(intctrl.h) #include INC_ARCH(1275tree.h) -#include INC_PLAT(opic.h) +#include INC_ARCH(pgent.h) #include INC_ARCH(segment.h) -#include INC_GLUE(pgent_inline.h) +#include INC_PLAT(opic.h) intctrl_t intctrl; diff --git a/kernel/src/platform/ofpower4/xics.cc b/kernel/src/platform/ofpower4/xics.cc index 8c2e3cf4..d1d96fd5 100644 --- a/kernel/src/platform/ofpower4/xics.cc +++ b/kernel/src/platform/ofpower4/xics.cc @@ -33,11 +33,11 @@ #include INC_GLUE(intctrl.h) #include INC_ARCH(rtas.h) #include INC_ARCH(1275tree.h) +#include INC_ARCH(pgent.h) #include INC_PLAT(xics.h) #include INC_PLAT(prom.h) #include INC_GLUE(space.h) #include INC_GLUE(pghash.h) -#include INC_GLUE(pgent_inline.h) intctrl_t intctrl;