diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2013-08-06 14:11:21 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2013-08-12 14:46:18 -0400 |
commit | bda0f5bad812df076a28fa5e58d86dfe68415251 (patch) | |
tree | 221517adf66b504282e484d9d2faaee4efe3602d /arch/tile/include/hv/hypervisor.h | |
parent | 7c29b78a0e0c7df6e0ba0092fee334ddc3086f16 (diff) |
tile: various console improvements
This change improves and cleans up the tile console.
- We enable HVC_IRQ support on tilegx, with the addition of a new
Tilera hypervisor API for tilegx to allow a console IPI. If IPI
support is not available we fall back to the previous polling mode.
- We simplify the earlyprintk code to use CON_BOOT and eliminate some
of the other supporting earlyprintk code.
- A new tile_console_write() primitive is used to send output to
the console and is factored out of the hvc_tile driver.
This lets us support a "sim_console" boot argument to allow using
simulator hooks to send output to the "console" as a slightly
faster alternative to emulating the hardware more directly.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/tile/include/hv/hypervisor.h')
-rw-r--r-- | arch/tile/include/hv/hypervisor.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/arch/tile/include/hv/hypervisor.h b/arch/tile/include/hv/hypervisor.h index 837dca5328c2..f882ebcf43a9 100644 --- a/arch/tile/include/hv/hypervisor.h +++ b/arch/tile/include/hv/hypervisor.h | |||
@@ -318,8 +318,11 @@ | |||
318 | /** hv_set_pte_super_shift */ | 318 | /** hv_set_pte_super_shift */ |
319 | #define HV_DISPATCH_SET_PTE_SUPER_SHIFT 57 | 319 | #define HV_DISPATCH_SET_PTE_SUPER_SHIFT 57 |
320 | 320 | ||
321 | /** hv_console_set_ipi */ | ||
322 | #define HV_DISPATCH_CONSOLE_SET_IPI 63 | ||
323 | |||
321 | /** One more than the largest dispatch value */ | 324 | /** One more than the largest dispatch value */ |
322 | #define _HV_DISPATCH_END 58 | 325 | #define _HV_DISPATCH_END 64 |
323 | 326 | ||
324 | 327 | ||
325 | #ifndef __ASSEMBLER__ | 328 | #ifndef __ASSEMBLER__ |
@@ -585,6 +588,30 @@ typedef struct | |||
585 | */ | 588 | */ |
586 | int hv_get_ipi_pte(HV_Coord tile, int pl, HV_PTE* pte); | 589 | int hv_get_ipi_pte(HV_Coord tile, int pl, HV_PTE* pte); |
587 | 590 | ||
591 | /** Configure the console interrupt. | ||
592 | * | ||
593 | * When the console client interrupt is enabled, the hypervisor will | ||
594 | * deliver the specified IPI to the client in the following situations: | ||
595 | * | ||
596 | * - The console has at least one character available for input. | ||
597 | * | ||
598 | * - The console can accept new characters for output, and the last call | ||
599 | * to hv_console_write() did not write all of the characters requested | ||
600 | * by the client. | ||
601 | * | ||
602 | * Note that in some system configurations, console interrupt will not | ||
603 | * be available; clients should be prepared for this routine to fail and | ||
604 | * to fall back to periodic console polling in that case. | ||
605 | * | ||
606 | * @param ipi Index of the IPI register which will receive the interrupt. | ||
607 | * @param event IPI event number for console interrupt. If less than 0, | ||
608 | * disable the console IPI interrupt. | ||
609 | * @param coord Tile to be targeted for console interrupt. | ||
610 | * @return 0 on success, otherwise, HV_EINVAL if illegal parameter, | ||
611 | * HV_ENOTSUP if console interrupt are not available. | ||
612 | */ | ||
613 | int hv_console_set_ipi(int ipi, int event, HV_Coord coord); | ||
614 | |||
588 | #else /* !CHIP_HAS_IPI() */ | 615 | #else /* !CHIP_HAS_IPI() */ |
589 | 616 | ||
590 | /** A set of interrupts. */ | 617 | /** A set of interrupts. */ |