summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fca44df)
raw | patch | inline | side by side (parent: fca44df)
author | Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de> | |
Mon, 5 Nov 2018 23:01:38 +0000 (23:01 +0000) | ||
committer | Jan Kiszka <jan.kiszka@siemens.com> | |
Tue, 13 Nov 2018 10:50:44 +0000 (11:50 +0100) |
There is a enum type for the return value of traps: enum trap_return. Use the
proper return type, wherever it is used.
Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
proper return type, wherever it is used.
Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
diff --git a/hypervisor/arch/arm-common/include/asm/smccc.h b/hypervisor/arch/arm-common/include/asm/smccc.h
index 24bda10e8a43c934a5d247e5bf6a46a85274f0b7..563ab9ef8915a3f72083ae4acb07cf7357c50207 100644 (file)
#define SMCCC_IS_CONV_64(function_id) !!(function_id & (1 << 30))
-int handle_smc(struct trap_context *ctx);
+enum trap_return handle_smc(struct trap_context *ctx);
diff --git a/hypervisor/arch/arm-common/include/asm/traps.h b/hypervisor/arch/arm-common/include/asm/traps.h
index e72d9fb9896f19f7b29714ada53e67fea94a7b79..ce3907d07e5613061bab52670a366e8d2e1bc38f 100644 (file)
TRAP_FORBIDDEN = -1,
};
-typedef int (*trap_handler)(struct trap_context *ctx);
+typedef enum trap_return (*trap_handler)(struct trap_context *ctx);
void arch_skip_instruction(struct trap_context *ctx);
-int arch_handle_dabt(struct trap_context *ctx);
+enum trap_return arch_handle_dabt(struct trap_context *ctx);
#endif /* !_JAILHOUSE_ASM_TRAPS_H */
index 463a0133e278681f43af2cd3d61ed202a21ba4aa..211d6cd764ee52bbdc6ba3591c4a7b25e6cfb8da 100644 (file)
}
}
-int handle_smc(struct trap_context *ctx)
+enum trap_return handle_smc(struct trap_context *ctx)
{
unsigned long *regs = ctx->regs;
u32 *stats = this_cpu_public()->stats;
index 19c03a0fcedf5dab568e3d754d4f08a7acffe149..726ea751e9512ba783217fe3416660c71460457f 100644 (file)
arm_write_sysreg(DFAR, addr);
}
-int arch_handle_dabt(struct trap_context *ctx)
+enum trap_return arch_handle_dabt(struct trap_context *ctx)
{
enum mmio_result mmio_result;
struct mmio_access mmio;
index 0589a335bf0cbb05b1f3bb02ac9da8996b1c3a76..10b3fdbff3cd40c9cf7e93d83eee5fac2332bd4c 100644 (file)
panic_printk("\n");
}
-static int arch_handle_smc(struct trap_context *ctx)
+static enum trap_return arch_handle_smc(struct trap_context *ctx)
{
unsigned long *regs = ctx->regs;
return handle_smc(ctx);
}
-static int arch_handle_hvc(struct trap_context *ctx)
+static enum trap_return arch_handle_hvc(struct trap_context *ctx)
{
unsigned long *regs = ctx->regs;
unsigned long code = regs[0];
return TRAP_HANDLED;
}
-static int arch_handle_cp15_32(struct trap_context *ctx)
+static enum trap_return arch_handle_cp15_32(struct trap_context *ctx)
{
u32 hsr = ctx->hsr;
u32 rt = (hsr >> 5) & 0xf;
return TRAP_HANDLED;
}
-static int arch_handle_cp15_64(struct trap_context *ctx)
+static enum trap_return arch_handle_cp15_64(struct trap_context *ctx)
{
u32 hsr = ctx->hsr;
u32 rt2 = (hsr >> 10) & 0xf;
return TRAP_HANDLED;
}
-static int handle_iabt(struct trap_context *ctx)
+static enum trap_return handle_iabt(struct trap_context *ctx)
{
unsigned long hpfar, hdfar;
index 772eb5f6280a2aa038dd8e4fc28ebef78e541173..4961b03051adfdd086a21bfac995e90c337e18c8 100644 (file)
while (1);
}
-int arch_handle_dabt(struct trap_context *ctx)
+enum trap_return arch_handle_dabt(struct trap_context *ctx)
{
enum mmio_result mmio_result;
struct mmio_access mmio;
index 734602ca730a35a815ffefa5819bdda51f6cd2a1..e2397b119daad4c0cc2ea1b4b84ee9b949d25273 100644 (file)
arm_write_sysreg(ELR_EL2, pc);
}
-static int handle_hvc(struct trap_context *ctx)
+static enum trap_return handle_hvc(struct trap_context *ctx)
{
unsigned long *regs = ctx->regs;
unsigned long code = regs[0];
return TRAP_HANDLED;
}
-static int handle_sysreg(struct trap_context *ctx)
+static enum trap_return handle_sysreg(struct trap_context *ctx)
{
u32 esr = ctx->esr;
u32 rt = (esr >> 5) & 0x1f;
return TRAP_UNHANDLED;
}
-static int handle_iabt(struct trap_context *ctx)
+static enum trap_return handle_iabt(struct trap_context *ctx)
{
unsigned long hpfar, hdfar;