Current File : //proc/thread-self/root/usr/src/linux-headers-6.8.0-59/include/misc/cxl.h
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright 2015 IBM Corp.
 */

#ifndef _MISC_CXL_H
#define _MISC_CXL_H

#include <linux/pci.h>
#include <linux/poll.h>
#include <linux/interrupt.h>
#include <uapi/misc/cxl.h>

/*
 * This documents the in kernel API for driver to use CXL. It allows kernel
 * drivers to bind to AFUs using an AFU configuration record exposed as a PCI
 * configuration record.
 *
 * This API enables control over AFU and contexts which can't be part of the
 * generic PCI API. This API is agnostic to the actual AFU.
 */

/* Get the AFU associated with a pci_dev */
struct cxl_afu *cxl_pci_to_afu(struct pci_dev *dev);

/* Get the AFU conf record number associated with a pci_dev */
unsigned int cxl_pci_to_cfg_record(struct pci_dev *dev);


/*
 * Context lifetime overview:
 *
 * An AFU context may be inited and then started and stopped multiple times
 * before it's released. ie.
 *    - cxl_dev_context_init()
 *      - cxl_start_context()
 *      - cxl_stop_context()
 *      - cxl_start_context()
 *      - cxl_stop_context()
 *     ...repeat...
 *    - cxl_release_context()
 * Once released, a context can't be started again.
 *
 * One context is inited by the cxl driver for every pci_dev. This is to be
 * used as a default kernel context. cxl_get_context() will get this
 * context. This context will be released by PCI hot unplug, so doesn't need to
 * be released explicitly by drivers.
 *
 * Additional kernel contexts may be inited using cxl_dev_context_init().
 * These must be released using cxl_context_detach().
 *
 * Once a context has been inited, IRQs may be configured. Firstly these IRQs
 * must be allocated (cxl_allocate_afu_irqs()), then individually mapped to
 * specific handlers (cxl_map_afu_irq()).
 *
 * These IRQs can be unmapped (cxl_unmap_afu_irq()) and finally released
 * (cxl_free_afu_irqs()).
 *
 * The AFU can be reset (cxl_afu_reset()). This will cause the PSL/AFU
 * hardware to lose track of all contexts. It's upto the caller of
 * cxl_afu_reset() to restart these contexts.
 */

/*
 * On pci_enabled_device(), the cxl driver will init a single cxl context for
 * use by the driver. It doesn't start this context (as that will likely
 * generate DMA traffic for most AFUs).
 *
 * This gets the default context associated with this pci_dev.  This context
 * doesn't need to be released as this will be done by the PCI subsystem on hot
 * unplug.
 */
struct cxl_context *cxl_get_context(struct pci_dev *dev);
/*
 * Allocate and initalise a context associated with a AFU PCI device. This
 * doesn't start the context in the AFU.
 */
struct cxl_context *cxl_dev_context_init(struct pci_dev *dev);
/*
 * Release and free a context. Context should be stopped before calling.
 */
int cxl_release_context(struct cxl_context *ctx);

/*
 * Set and get private data associated with a context. Allows drivers to have a
 * back pointer to some useful structure.
 */
int cxl_set_priv(struct cxl_context *ctx, void *priv);
void *cxl_get_priv(struct cxl_context *ctx);

/*
 * Allocate AFU interrupts for this context. num=0 will allocate the default
 * for this AFU as given in the AFU descriptor. This number doesn't include the
 * interrupt 0 (CAIA defines AFU IRQ 0 for page faults). Each interrupt to be
 * used must map a handler with cxl_map_afu_irq.
 */
int cxl_allocate_afu_irqs(struct cxl_context *cxl, int num);
/* Free allocated interrupts */
void cxl_free_afu_irqs(struct cxl_context *cxl);

/*
 * Map a handler for an AFU interrupt associated with a particular context. AFU
 * IRQS numbers start from 1 (CAIA defines AFU IRQ 0 for page faults). cookie
 * is private data is that will be provided to the interrupt handler.
 */
int cxl_map_afu_irq(struct cxl_context *cxl, int num,
		    irq_handler_t handler, void *cookie, char *name);
/* unmap mapped IRQ handlers */
void cxl_unmap_afu_irq(struct cxl_context *cxl, int num, void *cookie);

/*
 * Start work on the AFU. This starts an cxl context and associates it with a
 * task. task == NULL will make it a kernel context.
 */
int cxl_start_context(struct cxl_context *ctx, u64 wed,
		      struct task_struct *task);
/*
 * Stop a context and remove it from the PSL
 */
int cxl_stop_context(struct cxl_context *ctx);

/* Reset the AFU */
int cxl_afu_reset(struct cxl_context *ctx);

/*
 * Set a context as a master context.
 * This sets the default problem space area mapped as the full space, rather
 * than just the per context area (for slaves).
 */
void cxl_set_master(struct cxl_context *ctx);

/*
 * Map and unmap the AFU Problem Space area. The amount and location mapped
 * depends on if this context is a master or slave.
 */
void __iomem *cxl_psa_map(struct cxl_context *ctx);
void cxl_psa_unmap(void __iomem *addr);

/*  Get the process element for this context */
int cxl_process_element(struct cxl_context *ctx);

/*
 * These calls allow drivers to create their own file descriptors and make them
 * identical to the cxl file descriptor user API. An example use case:
 *
 * struct file_operations cxl_my_fops = {};
 * ......
 *	// Init the context
 *	ctx = cxl_dev_context_init(dev);
 *	if (IS_ERR(ctx))
 *		return PTR_ERR(ctx);
 *	// Create and attach a new file descriptor to my file ops
 *	file = cxl_get_fd(ctx, &cxl_my_fops, &fd);
 *	// Start context
 *	rc = cxl_start_work(ctx, &work.work);
 *	if (rc) {
 *		fput(file);
 *		put_unused_fd(fd);
 *		return -ENODEV;
 *	}
 *	// No error paths after installing the fd
 *	fd_install(fd, file);
 *	return fd;
 *
 * This inits a context, and gets a file descriptor and associates some file
 * ops to that file descriptor. If the file ops are blank, the cxl driver will
 * fill them in with the default ones that mimic the standard user API.  Once
 * completed, the file descriptor can be installed. Once the file descriptor is
 * installed, it's visible to the user so no errors must occur past this point.
 *
 * If cxl_fd_release() file op call is installed, the context will be stopped
 * and released when the fd is released. Hence the driver won't need to manage
 * this itself.
 */

/*
 * Take a context and associate it with my file ops. Returns the associated
 * file and file descriptor. Any file ops which are blank are filled in by the
 * cxl driver with the default ops to mimic the standard API.
 */
struct file *cxl_get_fd(struct cxl_context *ctx, struct file_operations *fops,
			int *fd);
/* Get the context associated with this file */
struct cxl_context *cxl_fops_get_context(struct file *file);
/*
 * Start a context associated a struct cxl_ioctl_start_work used by the
 * standard cxl user API.
 */
int cxl_start_work(struct cxl_context *ctx,
		   struct cxl_ioctl_start_work *work);
/*
 * Export all the existing fops so drivers can use them
 */
int cxl_fd_open(struct inode *inode, struct file *file);
int cxl_fd_release(struct inode *inode, struct file *file);
long cxl_fd_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
int cxl_fd_mmap(struct file *file, struct vm_area_struct *vm);
__poll_t cxl_fd_poll(struct file *file, struct poll_table_struct *poll);
ssize_t cxl_fd_read(struct file *file, char __user *buf, size_t count,
			   loff_t *off);

/*
 * For EEH, a driver may want to assert a PERST will reload the same image
 * from flash into the FPGA.
 *
 * This is a property of the entire adapter, not a single AFU, so drivers
 * should set this property with care!
 */
void cxl_perst_reloads_same_image(struct cxl_afu *afu,
				  bool perst_reloads_same_image);

/*
 * Read the VPD for the card where the AFU resides
 */
ssize_t cxl_read_adapter_vpd(struct pci_dev *dev, void *buf, size_t count);

/*
 * AFU driver ops allow an AFU driver to create their own events to pass to
 * userspace through the file descriptor as a simpler alternative to overriding
 * the read() and poll() calls that works with the generic cxl events. These
 * events are given priority over the generic cxl events, so they will be
 * delivered first if multiple types of events are pending.
 *
 * The AFU driver must call cxl_context_events_pending() to notify the cxl
 * driver that new events are ready to be delivered for a specific context.
 * cxl_context_events_pending() will adjust the current count of AFU driver
 * events for this context, and wake up anyone waiting on the context wait
 * queue.
 *
 * The cxl driver will then call fetch_event() to get a structure defining
 * the size and address of the driver specific event data. The cxl driver
 * will build a cxl header with type and process_element fields filled in,
 * and header.size set to sizeof(struct cxl_event_header) + data_size.
 * The total size of the event is limited to CXL_READ_MIN_SIZE (4K).
 *
 * fetch_event() is called with a spin lock held, so it must not sleep.
 *
 * The cxl driver will then deliver the event to userspace, and finally
 * call event_delivered() to return the status of the operation, identified
 * by cxl context and AFU driver event data pointers.
 *   0        Success
 *   -EFAULT  copy_to_user() has failed
 *   -EINVAL  Event data pointer is NULL, or event size is greater than
 *            CXL_READ_MIN_SIZE.
 */
struct cxl_afu_driver_ops {
	struct cxl_event_afu_driver_reserved *(*fetch_event) (
						struct cxl_context *ctx);
	void (*event_delivered) (struct cxl_context *ctx,
				 struct cxl_event_afu_driver_reserved *event,
				 int rc);
};

/*
 * Associate the above driver ops with a specific context.
 * Reset the current count of AFU driver events.
 */
void cxl_set_driver_ops(struct cxl_context *ctx,
			struct cxl_afu_driver_ops *ops);

/* Notify cxl driver that new events are ready to be delivered for context */
void cxl_context_events_pending(struct cxl_context *ctx,
				unsigned int new_events);

#endif /* _MISC_CXL_H */
¿Qué es la limpieza dental de perros? - Clínica veterinaria


Es la eliminación del sarro y la placa adherida a la superficie de los dientes mediante un equipo de ultrasonidos que garantiza la integridad de las piezas dentales a la vez que elimina en profundidad cualquier resto de suciedad.

A continuación se procede al pulido de los dientes mediante una fresa especial que elimina la placa bacteriana y devuelve a los dientes el aspecto sano que deben tener.

Una vez terminado todo el proceso, se mantiene al perro en observación hasta que se despierta de la anestesia, bajo la atenta supervisión de un veterinario.

¿Cada cuánto tiempo tengo que hacerle una limpieza dental a mi perro?

A partir de cierta edad, los perros pueden necesitar una limpieza dental anual o bianual. Depende de cada caso. En líneas generales, puede decirse que los perros de razas pequeñas suelen acumular más sarro y suelen necesitar una atención mayor en cuanto a higiene dental.


Riesgos de una mala higiene


Los riesgos más evidentes de una mala higiene dental en los perros son los siguientes:

  • Cuando la acumulación de sarro no se trata, se puede producir una inflamación y retracción de las encías que puede descalzar el diente y provocar caídas.
  • Mal aliento (halitosis).
  • Sarro perros
  • Puede ir a más
  • Las bacterias de la placa pueden trasladarse a través del torrente circulatorio a órganos vitales como el corazón ocasionando problemas de endocarditis en las válvulas. Las bacterias pueden incluso acantonarse en huesos (La osteomielitis es la infección ósea, tanto cortical como medular) provocando mucho dolor y una artritis séptica).

¿Cómo se forma el sarro?

El sarro es la calcificación de la placa dental. Los restos de alimentos, junto con las bacterias presentes en la boca, van a formar la placa bacteriana o placa dental. Si la placa no se retira, al mezclarse con la saliva y los minerales presentes en ella, reaccionará formando una costra. La placa se calcifica y se forma el sarro.

El sarro, cuando se forma, es de color blanquecino pero a medida que pasa el tiempo se va poniendo amarillo y luego marrón.

Síntomas de una pobre higiene dental
La señal más obvia de una mala salud dental canina es el mal aliento.

Sin embargo, a veces no es tan fácil de detectar
Y hay perros que no se dejan abrir la boca por su dueño. Por ejemplo…

Recientemente nos trajeron a la clínica a un perro que parpadeaba de un ojo y decía su dueño que le picaba un lado de la cara. Tenía molestias y dificultad para comer, lo que había llevado a sus dueños a comprarle comida blanda (que suele ser un poco más cara y llevar más contenido en grasa) durante medio año. Después de una exploración oftalmológica, nos dimos cuenta de que el ojo tenía una úlcera en la córnea probablemente de rascarse . Además, el canto lateral del ojo estaba inflamado. Tenía lo que en humanos llamamos flemón pero como era un perro de pelo largo, no se le notaba a simple vista. Al abrirle la boca nos llamó la atención el ver una muela llena de sarro. Le realizamos una radiografía y encontramos una fístula que llegaba hasta la parte inferior del ojo.

Le tuvimos que extraer la muela. Tras esto, el ojo se curó completamente con unos colirios y una lentilla protectora de úlcera. Afortunadamente, la úlcera no profundizó y no perforó el ojo. Ahora el perro come perfectamente a pesar de haber perdido una muela.

¿Cómo mantener la higiene dental de tu perro?
Hay varias maneras de prevenir problemas derivados de la salud dental de tu perro.

Limpiezas de dientes en casa
Es recomendable limpiar los dientes de tu perro semanal o diariamente si se puede. Existe una gran variedad de productos que se pueden utilizar:

Pastas de dientes.
Cepillos de dientes o dedales para el dedo índice, que hacen más fácil la limpieza.
Colutorios para echar en agua de bebida o directamente sobre el diente en líquido o en spray.

En la Clínica Tus Veterinarios enseñamos a nuestros clientes a tomar el hábito de limpiar los dientes de sus perros desde que son cachorros. Esto responde a nuestro compromiso con la prevención de enfermedades caninas.

Hoy en día tenemos muchos clientes que limpian los dientes todos los días a su mascota, y como resultado, se ahorran el dinero de hacer limpiezas dentales profesionales y consiguen una mejor salud de su perro.


Limpiezas dentales profesionales de perros y gatos

Recomendamos hacer una limpieza dental especializada anualmente. La realizamos con un aparato de ultrasonidos que utiliza agua para quitar el sarro. Después, procedemos a pulir los dientes con un cepillo de alta velocidad y una pasta especial. Hacemos esto para proteger el esmalte.

La frecuencia de limpiezas dentales necesaria varía mucho entre razas. En general, las razas grandes tienen buena calidad de esmalte, por lo que no necesitan hacerlo tan a menudo e incluso pueden pasarse la vida sin requerir una limpieza. Sin embargo, razas pequeñas como el Yorkshire o el Maltés, deben hacérselas todos los años desde cachorros si se quiere conservar sus piezas dentales.

Otro factor fundamental es la calidad del pienso. Algunas marcas han diseñado croquetas que limpian la superficie del diente y de la muela al masticarse.

Ultrasonido para perros

¿Se necesita anestesia para las limpiezas dentales de perros y gatos?

La limpieza dental en perros no es una técnica que pueda practicarse sin anestesia general , aunque hay veces que los propietarios no quieren anestesiar y si tiene poco sarro y el perro es muy bueno se puede intentar…… , pero no se va a poder pulir ni acceder a todas la zona de la boca …. Además los limpiadores dentales van a irrigar agua y hay riesgo de aspiración a vías respiratorias si no se realiza una anestesia correcta con intubación traqueal . En resumen , sin anestesia no se va hacer una correcta limpieza dental.

Tampoco sirve la sedación ya que necesitamos que el animal esté totalmente quieto, y el veterinario tenga un acceso completo a todas sus piezas dentales y encías.

Alimentos para la limpieza dental

Hay que tener cierto cuidado a la hora de comprar determinados alimentos porque no todos son saludables. Algunos tienen demasiado contenido graso, que en exceso puede causar problemas cardiovasculares y obesidad.

Los mejores alimentos para los dientes son aquellos que están elaborados por empresas farmacéuticas y llevan componentes químicos con tratamientos específicos para el diente del perro. Esto implica no solo limpieza a través de la acción mecánica de morder sino también un tratamiento antibacteriano para prevenir el sarro.

Conclusión

Si eres como la mayoría de dueños, por falta de tiempo , es probable que no estés prestando la suficiente atención a la limpieza dental de tu perro. Por eso te animamos a que comiences a limpiar los dientes de tu perro y consideres atender a su higiene bucal con frecuencia.

Estas simples medidas pueden conllevar a que tu perro tenga una vida más larga y mucho más saludable.

Si te resulta imposible introducir un cepillo de dientes a tu perro en la boca, pásate con él por clínica Tus Veterinarios y te explicamos cómo hacerlo.

Necesitas hacer una limpieza dental profesional a tu mascota?
Llámanos al 622575274 o contacta con nosotros

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

¡Hola!