search for: rom48

Displaying 2 results from an estimated 2 matches for "rom48".

Did you mean: rom
2013 Mar 13
1
Fix unaligned accesses for SPARC
...X_NUM_GPIO_ENTRIES 32 @@ -33,10 +35,10 @@ #define DCB_LOC_ON_CHIP 0 -#define ROM16(x) le16_to_cpu(*(u16 *)&(x)) -#define ROM32(x) le32_to_cpu(*(u32 *)&(x)) +#define ROM16(x) le16_to_cpu(get_unaligned((u16 *)&(x))) +#define ROM32(x) le32_to_cpu(get_unaligned((u32 *)&(x))) #define ROM48(x) ({ u8 *p = &(x); (u64)ROM16(p[4]) << 32 | ROM32(p[0]); }) -#define ROM64(x) le64_to_cpu(*(u64 *)&(x)) +#define ROM64(x) le64_to_cpu(get_unaligned((u64 *)&(x))) #define ROMPTR(d,x) ({ \ struct nouveau_drm *drm = nouveau_drm((d)); \ ROM16(x) ? &drm...
2016 Jul 27
0
[PATCH] nouveau: bios pointers may be unaligned, use proper accessors
...veau/nouveau_bios.h b/drm/nouveau/nouveau_bios.h index 0067586..18eb061 100644 --- a/drm/nouveau/nouveau_bios.h +++ b/drm/nouveau/nouveau_bios.h @@ -31,10 +31,8 @@ #define DCB_LOC_ON_CHIP 0 -#define ROM16(x) le16_to_cpu(*(u16 *)&(x)) -#define ROM32(x) le32_to_cpu(*(u32 *)&(x)) -#define ROM48(x) ({ u8 *p = &(x); (u64)ROM16(p[4]) << 32 | ROM32(p[0]); }) -#define ROM64(x) le64_to_cpu(*(u64 *)&(x)) +#define ROM16(x) get_unaligned_le16(&(x)) +#define ROM32(x) get_unaligned_le32(&(x)) #define ROMPTR(d,x) ({ \ struct nouveau_drm *drm = nouveau_drm((d)); \...