aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-01-31 08:21:39 -0500
committerIngo Molnar <mingo@kernel.org>2017-02-01 02:45:45 -0500
commitc4c39c70c5fef43655019236bec8ba5e7273b868 (patch)
treecb3c392e9c0dbd4454ec0a4b52095788921b0e5c
parente66880808960322d8126f878d7fe315a3f1ada74 (diff)
efi: Use typed function pointers for the runtime services table
Instead of using void pointers, and casting them to correctly typed function pointers upon use, declare the runtime services pointers as function pointers using their respective prototypes, for which typedefs are already available. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1485868902-20401-8-git-send-email-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--include/linux/efi.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 5f632bf9969d..85e9fdaa8d07 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -509,24 +509,6 @@ typedef struct {
509 u64 query_variable_info; 509 u64 query_variable_info;
510} efi_runtime_services_64_t; 510} efi_runtime_services_64_t;
511 511
512typedef struct {
513 efi_table_hdr_t hdr;
514 void *get_time;
515 void *set_time;
516 void *get_wakeup_time;
517 void *set_wakeup_time;
518 void *set_virtual_address_map;
519 void *convert_pointer;
520 void *get_variable;
521 void *get_next_variable;
522 void *set_variable;
523 void *get_next_high_mono_count;
524 void *reset_system;
525 void *update_capsule;
526 void *query_capsule_caps;
527 void *query_variable_info;
528} efi_runtime_services_t;
529
530typedef efi_status_t efi_get_time_t (efi_time_t *tm, efi_time_cap_t *tc); 512typedef efi_status_t efi_get_time_t (efi_time_t *tm, efi_time_cap_t *tc);
531typedef efi_status_t efi_set_time_t (efi_time_t *tm); 513typedef efi_status_t efi_set_time_t (efi_time_t *tm);
532typedef efi_status_t efi_get_wakeup_time_t (efi_bool_t *enabled, efi_bool_t *pending, 514typedef efi_status_t efi_get_wakeup_time_t (efi_bool_t *enabled, efi_bool_t *pending,
@@ -561,6 +543,24 @@ typedef efi_status_t efi_query_variable_store_t(u32 attributes,
561 unsigned long size, 543 unsigned long size,
562 bool nonblocking); 544 bool nonblocking);
563 545
546typedef struct {
547 efi_table_hdr_t hdr;
548 efi_get_time_t *get_time;
549 efi_set_time_t *set_time;
550 efi_get_wakeup_time_t *get_wakeup_time;
551 efi_set_wakeup_time_t *set_wakeup_time;
552 efi_set_virtual_address_map_t *set_virtual_address_map;
553 void *convert_pointer;
554 efi_get_variable_t *get_variable;
555 efi_get_next_variable_t *get_next_variable;
556 efi_set_variable_t *set_variable;
557 efi_get_next_high_mono_count_t *get_next_high_mono_count;
558 efi_reset_system_t *reset_system;
559 efi_update_capsule_t *update_capsule;
560 efi_query_capsule_caps_t *query_capsule_caps;
561 efi_query_variable_info_t *query_variable_info;
562} efi_runtime_services_t;
563
564void efi_native_runtime_setup(void); 564void efi_native_runtime_setup(void);
565 565
566/* 566/*