diff --git a/drivers/virt/tegra/Makefile b/drivers/virt/tegra/Makefile index 1c1328c3..3897f7c9 100644 --- a/drivers/virt/tegra/Makefile +++ b/drivers/virt/tegra/Makefile @@ -4,6 +4,10 @@ # # Makefile for Hypervisor interface # +ifeq ($(CONFIG_LOCALVERSION), -prod) +ccflags-y += -DCONFIG_BUILD_PROD +endif + ifneq ($(NV_OOT_TEGRA_HV_SKIP_BUILD),y) obj-m += tegra_hv.o else diff --git a/drivers/virt/tegra/tegra_hv.c b/drivers/virt/tegra/tegra_hv.c index 20977a5e..c8be1a93 100644 --- a/drivers/virt/tegra/tegra_hv.c +++ b/drivers/virt/tegra/tegra_hv.c @@ -819,6 +819,7 @@ int tegra_hv_ivc_read_user(struct tegra_hv_ivc_cookie *ivck, void __user *buf, i } EXPORT_SYMBOL(tegra_hv_ivc_read_user); +#ifndef CONFIG_BUILD_PROD int tegra_hv_ivc_read_peek(struct tegra_hv_ivc_cookie *ivck, void *buf, int off, int count) { @@ -827,6 +828,7 @@ int tegra_hv_ivc_read_peek(struct tegra_hv_ivc_cookie *ivck, void *buf, return tegra_ivc_read_peek(&ivc->ivc, NULL, buf, off, count); } EXPORT_SYMBOL(tegra_hv_ivc_read_peek); +#endif int tegra_hv_ivc_can_read(struct tegra_hv_ivc_cookie *ivck) { @@ -844,6 +846,7 @@ int tegra_hv_ivc_can_write(struct tegra_hv_ivc_cookie *ivck) } EXPORT_SYMBOL(tegra_hv_ivc_can_write); +#ifndef CONFIG_BUILD_PROD int tegra_hv_ivc_tx_empty(struct tegra_hv_ivc_cookie *ivck) { struct hv_ivc *ivc = cookie_to_ivc_dev(ivck); @@ -874,6 +877,7 @@ int tegra_hv_ivc_dump(struct tegra_hv_ivc_cookie *ivck) return ivc_dump(ivc); } EXPORT_SYMBOL(tegra_hv_ivc_dump); +#endif void *tegra_hv_ivc_read_get_next_frame(struct tegra_hv_ivc_cookie *ivck) { diff --git a/include/soc/tegra/virt/hv-ivc.h b/include/soc/tegra/virt/hv-ivc.h index 653fa92d..4c39172c 100644 --- a/include/soc/tegra/virt/hv-ivc.h +++ b/include/soc/tegra/virt/hv-ivc.h @@ -132,6 +132,7 @@ int tegra_hv_ivc_can_read(struct tegra_hv_ivc_cookie *ivck); */ int tegra_hv_ivc_can_write(struct tegra_hv_ivc_cookie *ivck); +#ifndef CONFIG_BUILD_PROD /** * tegra_ivc_tx_frames_available - gets number of free entries in tx queue * @ivc/@ivck IVC channel or cookie @@ -153,21 +154,6 @@ uint32_t tegra_hv_ivc_tx_frames_available(struct tegra_hv_ivc_cookie *ivck); */ int tegra_hv_ivc_tx_empty(struct tegra_hv_ivc_cookie *ivck); -/** - * ivc_hv_ivc_loopback - Sets (or clears) loopback mode - * @ivck IVC cookie of the queue - * @mode Set loopback on/off (1 = on, 0 = off) - * - * Sets or clears loopback mode accordingly. - * - * When loopback is active any writes are ignored, while - * reads do not return data. - * Incoming data are copied immediately to the tx queue. - * - * Returns 0 on success, a negative error code otherwise - */ -int tegra_hv_ivc_set_loopback(struct tegra_hv_ivc_cookie *ivck, int mode); - /* debugging aid */ int tegra_hv_ivc_dump(struct tegra_hv_ivc_cookie *ivck); @@ -186,6 +172,7 @@ int tegra_hv_ivc_dump(struct tegra_hv_ivc_cookie *ivck); int tegra_hv_ivc_read_peek(struct tegra_hv_ivc_cookie *ivck, void *buf, int off, int count); +#endif /** * ivc_hv_ivc_read_get_next_frame - Peek at the next frame to receive * @ivck IVC cookie of the queue @@ -207,21 +194,6 @@ void *tegra_hv_ivc_read_get_next_frame(struct tegra_hv_ivc_cookie *ivck); */ int tegra_hv_ivc_read_advance(struct tegra_hv_ivc_cookie *ivck); -/** - * ivc_hv_ivc_write_poke - Poke data to a frame to be transmitted - * @ivck IVC cookie of the queue - * @buf Buffer to the data - * @off Offset in the frame - * @count Count of bytes to copy - * - * Copy data to a transmit frame, copying from buf, without advancing - * the the transmit queue. - * - * Returns 0 on success, a negative error code otherwise - */ -int tegra_hv_ivc_write_poke(struct tegra_hv_ivc_cookie *ivck, - const void *buf, int off, int count); - /** * ivc_hv_ivc_write_get_next_frame - Poke at the next frame to transmit * @ivck IVC cookie of the queue