e500.c (ae19b15d917887a450787de6f5c8f26a16d3fba9) e500.c (81a1cf9f89a6b71e71bfd7d43837ce9235e70b38)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2008-2011 Freescale Semiconductor, Inc. All rights reserved.
4 *
5 * Author: Yu Liu, <yu.liu@freescale.com>
6 *
7 * Description:
8 * This file is derived from arch/powerpc/kvm/44x.c,

--- 517 unchanged lines hidden (view full) ---

526 handler_len = handler[i + 1] - handler[i];
527 memcpy((void *)kvmppc_booke_handlers + ivor[i],
528 (void *)handler[i], handler_len);
529 }
530 handler_len = handler[max_ivor + 1] - handler[max_ivor];
531 flush_icache_range(kvmppc_booke_handlers, kvmppc_booke_handlers +
532 ivor[max_ivor] + handler_len);
533
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2008-2011 Freescale Semiconductor, Inc. All rights reserved.
4 *
5 * Author: Yu Liu, <yu.liu@freescale.com>
6 *
7 * Description:
8 * This file is derived from arch/powerpc/kvm/44x.c,

--- 517 unchanged lines hidden (view full) ---

526 handler_len = handler[i + 1] - handler[i];
527 memcpy((void *)kvmppc_booke_handlers + ivor[i],
528 (void *)handler[i], handler_len);
529 }
530 handler_len = handler[max_ivor + 1] - handler[max_ivor];
531 flush_icache_range(kvmppc_booke_handlers, kvmppc_booke_handlers +
532 ivor[max_ivor] + handler_len);
533
534 r = kvm_init(NULL, sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
534 r = kvm_init(sizeof(struct kvmppc_vcpu_e500), 0, THIS_MODULE);
535 if (r)
536 goto err_out;
537 kvm_ops_e500.owner = THIS_MODULE;
538 kvmppc_pr_ops = &kvm_ops_e500;
539
540err_out:
541 return r;
542}
543
544static void __exit kvmppc_e500_exit(void)
545{
546 kvmppc_pr_ops = NULL;
547 kvmppc_booke_exit();
548}
549
550module_init(kvmppc_e500_init);
551module_exit(kvmppc_e500_exit);
552MODULE_ALIAS_MISCDEV(KVM_MINOR);
553MODULE_ALIAS("devname:kvm");
535 if (r)
536 goto err_out;
537 kvm_ops_e500.owner = THIS_MODULE;
538 kvmppc_pr_ops = &kvm_ops_e500;
539
540err_out:
541 return r;
542}
543
544static void __exit kvmppc_e500_exit(void)
545{
546 kvmppc_pr_ops = NULL;
547 kvmppc_booke_exit();
548}
549
550module_init(kvmppc_e500_init);
551module_exit(kvmppc_e500_exit);
552MODULE_ALIAS_MISCDEV(KVM_MINOR);
553MODULE_ALIAS("devname:kvm");