Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Latest patches seem to have broken pcmcia?
@ 1997-08-12  2:07 Thunderhawk Alpha
  0 siblings, 0 replies; 2+ messages in thread
From: Thunderhawk Alpha @ 1997-08-12  2:07 UTC (permalink / raw)


I downloaded a pristine kernel and the new 2.0.30-0.1 patches and made a new
kernel. The new kernel lets quake run (un-breaks the MIT-SHM problem). Much
obliged to the contributors. However, when I recompiled the pcmcia stuff
(2.9.7) I get warnings about pointer-to-integer argument passing for
function __get_user. When insmod goes to load ds.o, i get:

...ds.o: In function 'bind_request':
...pcmcia/ds.o(.text+0xfb0): Undefined reference to 'bad_user_access_length'
...pcmcia/ds.o(.text+0xfb4): Undefined reference to 'bad_user_access_length'

I noticed there is a file in the pcmcia sources (include/pcmcia/k_compat.h)
that appears to have a convoluted ifdef structure to either redefine (or
not) a get_user function. I've included a snippet from there below. I'm not
proficient enough to know whether this is good, bad, or indifferent but I do
know something's broke now. Any suggestions would be helpful...

seafire@ix.netcom.com

--------------------------included file----------------------------
/*
 * k_compat.h 1.32 1997/06/30 15:27:16 (David Hinds)
 */

<------------snip--------------------->

#if (LINUX_VERSION_CODE < VERSION(2,1,0))
#define copy_from_user		memcpy_fromfs
#define copy_to_user		memcpy_tofs
#define ioremap			vremap
#define iounmap			vfree

#if (LINUX_VERSION_CODE >= VERSION(1,3,0))
/* This is evil... throw away the built-in get_user in 1.3, 2.0 */
#include <asm/segment.h>
#undef get_user
#else
#define put_user(x, ptr) \
		((sizeof(*ptr) == 4) ? put_fs_long(x, ptr) : \
		 (sizeof(*ptr) == 2) ? put_fs_word(x, ptr) : \
		 put_fs_byte(x, ptr))
#endif

#ifdef __alpha__
#define get_user(x, ptr)	__get_user(x, ptr)
#else
#define get_user(x, ptr) \
		((sizeof(*ptr) == 4) ? (x = get_fs_long(ptr)) : \
		 (sizeof(*ptr) == 2) ? (x = get_fs_word(ptr)) : \
		 (x = get_fs_byte(ptr)))
#endif

#else /* 2.1.X */
#include <asm/uaccess.h>
#endif

#endif /* _LINUX_K_COMPAT_H */

<---------------end of include------------------>

Thunderhawk Alpha
seafire@ix.netcom.com
"One if by land, two if by sea, or press 0 followed by the pound sign to
leave a message."

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Latest patches seem to have broken pcmcia?
@ 1997-08-12 20:14 Bob Bottomley
  0 siblings, 0 replies; 2+ messages in thread
From: Bob Bottomley @ 1997-08-12 20:14 UTC (permalink / raw)


Here is the change you need:

-#define get_user(x, ptr) __get_user(x, ptr)
+#define get_user(x, ptr) ((x) = __get_user((ptr), sizeof(*(ptr))))

------------------------
  From: Thunderhawk Alpha <seafire@ix.netcom.com>
  Subject: Latest patches seem to have broken pcmcia? 
  Date: Mon, 11 Aug 1997 21:07:57 -0500 (CDT) 
  To: axp-list@redhat.com
  Cc: seafire@ix.netcom.com

> #ifdef __alpha__
> #define get_user(x, ptr)	__get_user(x, ptr)
> #else

--------------------------------------------------------------------------
"It is by caffeine alone I set my mind in motion.
It is by the juice of cola that thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion."
                               --The Programmer's Creed

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-08-12 20:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-08-12 20:14 Latest patches seem to have broken pcmcia? Bob Bottomley
  -- strict thread matches above, loose matches on Subject: below --
1997-08-12  2:07 Thunderhawk Alpha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox