xfree86: Move generic unaligned helpers into int10 code
This is the only place they're actually used (well, aside from some XAA code in the s3 driver, but one s3 and 2 XAA). Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
956a8d5c92
commit
d28b788e11
|
@ -236,42 +236,6 @@ extern unsigned short ldw_brx(volatile unsigned char *, int);
|
||||||
#define write_mem_barrier() /* NOP */
|
#define write_mem_barrier() /* NOP */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string.h> /* needed for memmove */
|
|
||||||
|
|
||||||
static __inline__ uint32_t
|
|
||||||
ldl_u(uint32_t * p)
|
|
||||||
{
|
|
||||||
uint32_t ret;
|
|
||||||
|
|
||||||
memmove(&ret, p, sizeof(*p));
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static __inline__ uint16_t
|
|
||||||
ldw_u(uint16_t * p)
|
|
||||||
{
|
|
||||||
uint16_t ret;
|
|
||||||
|
|
||||||
memmove(&ret, p, sizeof(*p));
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static __inline__ void
|
|
||||||
stl_u(uint32_t val, uint32_t * p)
|
|
||||||
{
|
|
||||||
uint32_t tmp = val;
|
|
||||||
|
|
||||||
memmove(p, &tmp, sizeof(*p));
|
|
||||||
}
|
|
||||||
|
|
||||||
static __inline__ void
|
|
||||||
stw_u(uint16_t val, uint16_t * p)
|
|
||||||
{
|
|
||||||
uint16_t tmp = val;
|
|
||||||
|
|
||||||
memmove(p, &tmp, sizeof(*p));
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && (defined(__alpha__))
|
#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && (defined(__alpha__))
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,42 @@
|
||||||
|
|
||||||
#define ALLOC_ENTRIES(x) ((V_RAM / x) - 1)
|
#define ALLOC_ENTRIES(x) ((V_RAM / x) - 1)
|
||||||
|
|
||||||
|
#include <string.h> /* needed for memmove */
|
||||||
|
|
||||||
|
static __inline__ uint32_t
|
||||||
|
ldl_u(uint32_t * p)
|
||||||
|
{
|
||||||
|
uint32_t ret;
|
||||||
|
|
||||||
|
memmove(&ret, p, sizeof(*p));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ uint16_t
|
||||||
|
ldw_u(uint16_t * p)
|
||||||
|
{
|
||||||
|
uint16_t ret;
|
||||||
|
|
||||||
|
memmove(&ret, p, sizeof(*p));
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void
|
||||||
|
stl_u(uint32_t val, uint32_t * p)
|
||||||
|
{
|
||||||
|
uint32_t tmp = val;
|
||||||
|
|
||||||
|
memmove(p, &tmp, sizeof(*p));
|
||||||
|
}
|
||||||
|
|
||||||
|
static __inline__ void
|
||||||
|
stw_u(uint16_t val, uint16_t * p)
|
||||||
|
{
|
||||||
|
uint16_t tmp = val;
|
||||||
|
|
||||||
|
memmove(p, &tmp, sizeof(*p));
|
||||||
|
}
|
||||||
|
|
||||||
static uint8_t read_b(xf86Int10InfoPtr pInt, int addr);
|
static uint8_t read_b(xf86Int10InfoPtr pInt, int addr);
|
||||||
static uint16_t read_w(xf86Int10InfoPtr pInt, int addr);
|
static uint16_t read_w(xf86Int10InfoPtr pInt, int addr);
|
||||||
static uint32_t read_l(xf86Int10InfoPtr pInt, int addr);
|
static uint32_t read_l(xf86Int10InfoPtr pInt, int addr);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user