From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,e2eb33a329d9725,start X-Google-Attributes: gid111c93,public From: "P.Copeland" Subject: linux2.4.0-test4 failures + fixes Date: 2000/07/10 Message-ID: <3969F97A.4C304C36@redhat.com>#1/1 X-Deja-AN: 647129471 Content-Transfer-Encoding: 7bit To: alan@redhat.com X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news2atm.raleigh.ibm.com X-Trace: news2atm.raleigh.ibm.com 963787738 39112 9.37.3.198 (16 Jul 2000 22:48:58 GMT) Organization: LinuxNET Mime-Version: 1.0 NNTP-Posting-Date: 16 Jul 2000 22:48:58 GMT Newsgroups: comp.os.linux.alpha (Alpha) Two places that I've found broken in 2.4.0-test4 1) OSF partition handling (MAJOR) 2) the USB ov511 module (minor) OSF partition handling relies on the include/linux/poll.h define KFDS_NR in 2.4.0-test3 this was defined as follows --- /* * For the kernel fd_set we use a fixed set-size for allocation purposes. * This set-size doesn't necessarily bear any relation to the size the user * uses, but should preferably obviously be larger than any possible user * size (NR_OPEN bits). * * We need 6 bitmaps (in/out/ex for both incoming and outgoing), and we * allocate one page for all the bitmaps. Thus we have 8*PAGE_SIZE bits, * to be divided by 6. And we'd better make sure we round to a full * long-word (in fact, we'll round to 64 bytes). */ #define KFDS_64BLOCK ((PAGE_SIZE/(6*64))*64) #define KFDS_NR (KFDS_64BLOCK*8 > NR_OPEN ? NR_OPEN : KFDS_64BLOCK*8) --- This has disappeared from the kernel entirely in the test3->test4 patches so the following happens osf_sys.c: In function `osf_select': osf_sys.c:1079: `KFDS_NR' undeclared (first use in this function) osf_sys.c:1079: (Each undeclared identifier is reported only once osf_sys.c:1079: for each function it appears in.) make[1]: *** [osf_sys.o] Error 1 make[1]: Leaving directory `/usr/src/linux/arch/alpha/kernel' make: *** [_dir_arch/alpha/kernel] Error 2 I don't undestand the rationale for removing the two defines though unless they got zapped as a logical extension of getting rid of kernel_fd_set typedef unsigned long kernel_fd_set[KFDS_NR/__NFDBITS]; 2) The ov511 driver. Using /lib/modules/2.4.0-test4/usb/ov511.o /lib/modules/2.4.0-test4/usb/ov511.o: unresolved symbol __fixdfsi gcc in it's infinite wisdom compiles up the module and assumes floating point A dissasembly of the module shows a .global definition for fixdfsi but no associated code,.. very peculiar, fixdfsi() is simply not used >From the dissassembly this seems related to the section in ov511.c +1020 1020: const double brightness = 1.0; /* 0->black; 1->full scale */ 1021: const double saturation = 1.0; /* 0->greyscale; 1->full color */ 1022: const double fixScale = brightness * 256 * 256; I was under the distinct impression that floating point operations were not allowed in the kernel due to the FPU interrupt handling. Line 1022 would seem to violate that and I suspect gcc, spotting real numbers, decides to include the math library routine fixdfsi to handle 64bit-> 32bit conversions even though it is not used. As the math used is 'magic' and fixed this was the reason why I sent you the change of double to int patch last time since 1*256*256 = 65536 = FFFF and fits in an int Phil (running Linux Alpha 2.4.0-test4 #7 Mon Jul 10 10:25:54 EDT 2000 alpha unknown) =--= --- linux-2.4.0-test4/drivers/usb/ov511.c Mon Jul 10 09:51:40 2000 +++ linux/drivers/usb/ov511.c Mon Jul 10 11:52:17 2000 @@ -1017,9 +1017,9 @@ ov511_move_420_block(int yTL, int yTR, int yBL, int yBR, int u, int v, int rowPixels, unsigned char * rgb) { - const double brightness = 1.0; /* 0->black; 1->full scale */ - const double saturation = 1.0; /* 0->greyscale; 1->full color */ - const double fixScale = brightness * 256 * 256; + const int brightness = 1.0; /* 0->black; 1->full scale */ + const int saturation = 1.0; /* 0->greyscale; 1->full color */ + const int fixScale = brightness * 256 * 256; const int rvScale = (int)(1.402 * saturation * fixScale); const int guScale = (int)(-0.344136 * saturation * fixScale); const int gvScale = (int)(-0.714136 * saturation * fixScale); --- linux-2.4.0-test4/include/linux/poll.h Mon Jul 10 09:54:46 2000 +++ linux/include/linux/poll.h Mon Jul 10 09:25:49 2000 @@ -38,6 +38,24 @@ __pollwait(filp, wait_address, p); } +/* + * For the kernel fd_set we use a fixed set-size for allocation purposes. + * This set-size doesn't necessarily bear any relation to the size the user + * uses, but should preferably obviously be larger than any possible user + * size (NR_OPEN bits). + * + * We need 6 bitmaps (in/out/ex for both incoming and outgoing), and we + * allocate one page for all the bitmaps. Thus we have 8*PAGE_SIZE bits, + * to be divided by 6. And we'd better make sure we round to a full + * long-word (in fact, we'll round to 64 bytes). + */ + + +#define KFDS_64BLOCK ((PAGE_SIZE/(6*64))*64) +#define KFDS_NR (KFDS_64BLOCK*8 > NR_OPEN ? NR_OPEN : KFDS_64BLOCK*8) + + static inline void poll_initwait(poll_table* pt) { pt->error = 0;