Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 161378
Collapse All | Expand All

(-)a/common/lib/modules/fglrx/build_mod/2.6.x/Makefile (-1 / +1 lines)
Lines 6-12 obj-m += fglrx.o Link Here
6
fglrx-libs      += libfglrx_ip.a.GCC$(GCC_VER_MAJ)
6
fglrx-libs      += libfglrx_ip.a.GCC$(GCC_VER_MAJ)
7
fglrx-c-objs    += firegl_public.o
7
fglrx-c-objs    += firegl_public.o
8
fglrx-objs      += $(fglrx-c-objs) $(fglrx-libs)
8
fglrx-objs      += $(fglrx-c-objs) $(fglrx-libs)
9
fglrx-hdrs      += firegl_public.h
9
fglrx-hdrs      += firegl_public.h syscall.h
10
drm-hdrs        += drm.h drmP.h drm_os_linux.h drm_proc.h drm_compat.h
10
drm-hdrs        += drm.h drmP.h drm_os_linux.h drm_proc.h drm_compat.h
11
11
12
ifeq ($(PAGE_ATTR_FIX),)
12
ifeq ($(PAGE_ATTR_FIX),)
(-)a/common/lib/modules/fglrx/build_mod/firegl_public.h (+2 lines)
Lines 17-22 Link Here
17
#ifndef _FIREGL_PUBLIC_H_
17
#ifndef _FIREGL_PUBLIC_H_
18
#define _FIREGL_PUBLIC_H_
18
#define _FIREGL_PUBLIC_H_
19
19
20
#include "syscall.h"
21
20
#ifdef DEBUG
22
#ifdef DEBUG
21
#include <stdarg.h>
23
#include <stdarg.h>
22
#endif
24
#endif
(-)a/common/lib/modules/fglrx/build_mod/syscall.h (+62 lines)
Line 0 Link Here
1
// x86_64
2
//#define __syscall_clobber "r11","rcx","memory"
3
//#endif
4
5
#include <linux/err.h>
6
7
/*
8
 * user-visible error numbers are in the range -1 - -MAX_ERRNO: see
9
 * <asm-i386/errno.h>
10
 */
11
#define __syscall_return(type, res) \
12
do { \
13
	if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
14
		errno = -(res); \
15
		res = -1; \
16
	} \
17
	return (type) (res); \
18
} while (0)
19
20
/* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */
21
#define _syscall0(type,name) \
22
type name(void) \
23
{ \
24
long __res; \
25
__asm__ volatile ("int $0x80" \
26
	: "=a" (__res) \
27
	: "0" (__NR_##name)); \
28
__syscall_return(type,__res); \
29
}
30
31
#define _syscall1(type,name,type1,arg1) \
32
type name(type1 arg1) \
33
{ \
34
long __res; \
35
__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
36
	: "=a" (__res) \
37
	: "0" (__NR_##name),"ri" ((long)(arg1)) : "memory"); \
38
__syscall_return(type,__res); \
39
}
40
41
#define _syscall2(type,name,type1,arg1,type2,arg2) \
42
type name(type1 arg1,type2 arg2) \
43
{ \
44
long __res; \
45
__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
46
	: "=a" (__res) \
47
	: "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)) \
48
	: "memory"); \
49
__syscall_return(type,__res); \
50
}
51
52
#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
53
type name(type1 arg1,type2 arg2,type3 arg3) \
54
{ \
55
long __res; \
56
__asm__ volatile ("push %%ebx ; movl %2,%%ebx ; int $0x80 ; pop %%ebx" \
57
	: "=a" (__res) \
58
	: "0" (__NR_##name),"ri" ((long)(arg1)),"c" ((long)(arg2)), \
59
		  "d" ((long)(arg3)) : "memory"); \
60
__syscall_return(type,__res); \
61
}
62

Return to bug 161378