You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
(2) |
Oct
(43) |
Nov
(4) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(78) |
Feb
(97) |
Mar
(29) |
Apr
(2) |
May
(22) |
Jun
(38) |
Jul
(11) |
Aug
(27) |
Sep
(40) |
Oct
(2) |
Nov
(17) |
Dec
(8) |
2002 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(480) |
May
(456) |
Jun
(12) |
Jul
|
Aug
(1) |
Sep
|
Oct
(18) |
Nov
(3) |
Dec
(6) |
2003 |
Jan
|
Feb
(18) |
Mar
(1) |
Apr
|
May
(6) |
Jun
(147) |
Jul
(7) |
Aug
(3) |
Sep
(235) |
Oct
(10) |
Nov
(2) |
Dec
(1) |
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/cris/drivers/lpslave In directory usw-pr-cvs1:/tmp/cvs-serv13825/cris/drivers/lpslave Added Files: Makefile bintocarr.pl e100lpslave.README e100lpslave.S e100lpslave.h e100lpslaveld e100lpslavenet.c Log Message: synch 2.4.15 commit 29 --- NEW FILE --- # # Makefile for parallel port slave drivers # O_TARGET := lpslavedrivers.o obj-y = e100lpslavenet.o e100lpslave_code.o include $(TOPDIR)/Rules.make e100lpslave_code.o: e100lpslave.o e100lpslaveld $(CROSS_COMPILE)ld -qmagic -Te100lpslaveld e100lpslave.o -o e100lpslave $(CROSS_COMPILE)objcopy -O binary --remove-section=.data --remove-section=.bss e100lpslave e100lpslave.text $(CROSS_COMPILE)objcopy -O binary --remove-section=.text --remove-section=.bss e100lpslave e100lpslave.data cat e100lpslave.text e100lpslave.data |\ ./bintocarr.pl e100lpslaveprog |\ $(CC) $(CFLAGS) -pipe -o e100lpslave_code.o -c -x c - ls -l e100lpslave.text e100lpslave.data rm -f e100lpslave e100lpslave.text e100lpslave.data --- NEW FILE --- #!/usr/bin/perl -w # $Id: bintocarr.pl,v 1.1 2002/04/09 17:03:15 atp Exp $ # Copy of mkjulbin.pl made by Olof # convert a binary stdin to a C-file containing a char array of the input # first argument is the symbol name $symbol = shift @ARGV; print "#include <linux/init.h>\n\n"; #print "unsigned char $symbol", "[] __initdata = {\n"; print "unsigned char $symbol", "[] = {\n"; my $char; $bcount = 0; while(read STDIN, $char, 1) { printf("0x%x, ", ord($char)); $bcount++; if(!($bcount % 16)) { print "\n"; } } print "\n};\n"; $lensymb = ("_" . ($symbol . "_length")); print "__asm__(\"\\t.globl $lensymb\\n$lensymb = $bcount\\n\");\n"; --- NEW FILE --- ***** MODIFICATIONS To use a 5600 as a slave device it has to somewhat modified. This has to be done on a 5600 (art no 16144 R2) to automatically set it to parallel port boot mode: 1) Close to the LPT1 connector there are two resistors, between the "Pulse" inductor and the LS245. The one closest to the LS245 is a 4k7 pull up (R105). Remove it. 2) Between the other "Pulse" inductor and Etrax there is a black 5-pin inverter (D15). Short connectors 2 and 3 with a solder blob. ***** PINOUT To use this driver use cables connected like this: DSUB25-Male DSUB25Male 1 10 2-9 2-9 10 1 11 14 12 18 13 NC 14 11 15 NC 16 NC 17 NC 18 12 19 NC 20-25 20-25 Thus the cables are symmetrical with most cables straight through, some crossed (1-10, 11-14 and 12-18) and some Not connected (NC 13,15,16,17 and 19). ******* Only for reference To ease the use of flat-cable connectors, here are the notes of wich wires to cross and cut with pin 1 being cable 1: Cross: 1 19 2 21 10 23 Cut: 4 6 8 12 25 jon...@ax... --- NEW FILE --- ;; $Id: e100lpslave.S,v 1.1 2002/04/09 17:03:15 atp Exp $ ;; ;; Etrax100 slave network<->parport forwarder ;; ;; Copyright (c) 1999 Bjorn Wesen, Axis Communications AB ;; ;; We got 784 bytes (par loader size) to do DMA forwarding ;; between DMA0/1 (ethernet) and DMA3/4 (par port 0 RX/1 TX) ;; #include <linux/config.h> #if 0 #define ASSEMBLER_MACROS_ONLY #endif #include <asm/sv_addr_ag.h> #define BUFSIZE 0x600 ;; R_IRQ_READ2 #define DMA1EOPBIT 3 #define DMA0EOPBIT 1 #define DMA3EOPBIT 7 #define DMA4DESCBIT 8 ;; R_IRQ_READ0 #define PAR0ECPCMDBIT 11 ;; get host CMDs #include "e100lpslave.h" start: ;; disable interrupts. we are not going to use them at all. di ;; setup DMA connections and port configuration movu.w 0x84, r0 ; DMA2/3/4/5 to par ports move.d r0, [R_GEN_CONFIG] ;; setup port PA dirs and turn on the LED to show were alive movu.w 0x0cfb, r0 ; PA2-PA3 out, PA2 inactive move.d r0, [R_PORT_PA_SET] ;; enable MDIO output pin moveq IO_STATE(R_NETWORK_MGM_CTRL, mdoe, enable), r0 move.d r0, [R_NETWORK_MGM_CTRL] ;; accept broadcast frames, and enable station address 0 moveq IO_STATE(R_NETWORK_REC_CONFIG, broadcast, receive) | \ IO_STATE(R_NETWORK_REC_CONFIG, ma0, enable), r0 move.d r0, [R_NETWORK_REC_CONFIG] ;; use MII CLK mode, and enable the controller moveq IO_STATE(R_NETWORK_GEN_CONFIG, phy, mii_clk) | \ IO_STATE(R_NETWORK_GEN_CONFIG, enable, on), r0 move.d r0, [R_NETWORK_GEN_CONFIG] move.d IO_STATE(R_PAR0_CONFIG, ioe, noninv) | \ IO_STATE(R_PAR0_CONFIG, iseli, noninv) | \ IO_STATE(R_PAR0_CONFIG, iautofd, noninv) | \ IO_STATE(R_PAR0_CONFIG, istrb, noninv) | \ IO_STATE(R_PAR0_CONFIG, iinit, noninv) | \ IO_STATE(R_PAR0_CONFIG, iperr, noninv) | \ IO_STATE(R_PAR0_CONFIG, iack, noninv) | \ IO_STATE(R_PAR0_CONFIG, ibusy, noninv) | \ IO_STATE(R_PAR0_CONFIG, ifault, noninv) | \ IO_STATE(R_PAR0_CONFIG, isel, noninv) | \ IO_STATE(R_PAR0_CONFIG, dma, enable) | \ IO_STATE(R_PAR0_CONFIG, rle_in, disable) | \ IO_STATE(R_PAR0_CONFIG, rle_out, disable) | \ IO_STATE(R_PAR0_CONFIG, enable, on) | \ IO_STATE(R_PAR0_CONFIG, force, on) | \ IO_STATE(R_PAR0_CONFIG, mode, ecp_rev), r0 ; Reverse ECP - PAR0 is RX move.d r0, [R_PAR0_CONFIG] move.d IO_STATE(R_PAR1_CONFIG, ioe, noninv) | \ IO_STATE(R_PAR1_CONFIG, iseli, noninv) | \ IO_STATE(R_PAR1_CONFIG, iautofd, noninv) | \ IO_STATE(R_PAR1_CONFIG, istrb, noninv) | \ IO_STATE(R_PAR1_CONFIG, iinit, noninv) | \ IO_STATE(R_PAR1_CONFIG, iperr, inv) | \ IO_STATE(R_PAR1_CONFIG, iack, noninv) | \ IO_STATE(R_PAR1_CONFIG, ibusy, noninv) | \ IO_STATE(R_PAR1_CONFIG, ifault, noninv) | \ IO_STATE(R_PAR1_CONFIG, isel, noninv) | \ IO_STATE(R_PAR1_CONFIG, dma, enable) | \ IO_STATE(R_PAR1_CONFIG, rle_in, disable) | \ IO_STATE(R_PAR1_CONFIG, rle_out, disable) | \ IO_STATE(R_PAR1_CONFIG, enable, on) | \ IO_STATE(R_PAR1_CONFIG, force, on) | \ IO_STATE(R_PAR1_CONFIG, mode, ecp_fwd), r0 ; Forward ECP - PAR1 is TX move.d r0, [R_PAR1_CONFIG] moveq IO_FIELD(R_PAR1_DELAY, setup, 0), r0 ; setup time of value * 160 + 20 == 20 ns move.d r0, [R_PAR1_DELAY] ;; we got four descriptors, that can be active at the same time: ;; 1) from network ;; 2) to parport ;; 3) from parport ;; 4) to network ;; ;; we got four buffers, each can hold a max packet (we use 1536 bytes) ;; buffers 1 and 2 are used from network to parport, while ;; buffers 3 and 4 are used from parport to network. ;; ;; a double buffering scheme is used, so that new data can be read ;; into a buffer pair while the last data is written out from the ;; last buffer. if the read buffer is done before the write buffer, ;; the reading will halt until the writing is done, at which point ;; writing starts from the newly read and reading can start with ;; the newly written. ;; move.d R_DMA_CH0_FIRST, r1 ; we use this as base for subsequent DMA ops moveq IO_STATE(R_DMA_CH1_CMD, cmd, start), r6 move.d FN1desc, r7 move.d R_IRQ_READ0, r9 ;; start receiving from network jsr startdmaFPTN jsr startdmaFNTP ;; ------------------- MAIN LOOP ;; IRQ bits: parport rcv is par0_ecp_cmd, then dma3_eop ;; network rcv is dma1_eop ;; parport tx is dma4_desc ;; network tx is dma0_eop mainloop: ;; ------- first handle the parport -> network link ;; check if we got something from the parport move.d [r9], r0 ; r0 <- *R_IRQ_READ0 btstq PAR0ECPCMDBIT, r0 bpl noparecp nop ;; ack it by reading PAR0_STATUS_DATA move.d [R_PAR0_STATUS_DATA], r0 ;; trigger EOP on DMA3 (par0 incoming channel) moveq IO_STATE(R_SET_EOP, ch3_eop, set), r0 move.d r0, [R_SET_EOP] noparecp: ;; if we simultaneously have parport rx EOP and ;; network TX eop, we can swap buffers and start a new RX/TX move.d [r9 + (R_IRQ_READ2 - R_IRQ_READ0)], r0 btstq DMA3EOPBIT, r0 ; check parport rx bpl noswap1 btstq DMA0EOPBIT, r0 ; check network tx bpl noswap1 nop ;; prepare to swap buffer ptrs (FN3b <-> TN4b) move.d [r4 = r7 + 56], r0; FP3b move.d [r3 = r7 + 72], r2; TN4b ;; but first check if this was a Host Command Packet move.d [r0], r5 ; r5 <- first 4 bytes in PAR-received packet bne handle_command ; if non-zero, it was a host command addq 4, r0 ; skip command (in delay slot - handle_command requires this) move.d r0, [r3] ; write to To Network descriptor subq 4, r2 ; undo the skipping done last swap move.d r2, [r4] ; write to From Parport descriptor ;; clear the interrupts moveq IO_STATE(R_DMA_CH0_CLR_INTR, clr_eop, do), r0 move.b r0, [r1 + (R_DMA_CH0_CLR_INTR - R_DMA_CH0_FIRST)] move.b r0, [r1 + (R_DMA_CH3_CLR_INTR - R_DMA_CH0_FIRST)] ;; copy received length to outgoing network length move.w [r7 + 60], r0 ; FPhlen subq 4, r0 ; skip command move.w r0, [r7 + 64] ; TN4desc ;; restart DMAs jsr startdmaFPTN #ifdef CONFIG_ETRAX_ETHERNET_LPSLAVE_HAS_LEDS #if defined(CONFIG_ETRAX_NETWORK_LED_ON_WHEN_LINK) ;; Turn off the LED signaling an outgoing network packet movu.b [LEDOff], r0 #elif defined(CONFIG_ETRAX_NETWORK_LED_ON_WHEN_ACTIVITY) ;; Light the LED signaling an outgoing network packet movu.b [LEDAmber], r0 #else #error "Define either CONFIG_ETRAX_NETWORK_LED_ON_WHEN_LINK or CONFIG_ETRAX_NETWORK_LED_ON_WHEN_ACTIVITY" #endif move.b r0, [R_PORT_PA_DATA] move.d 0x00011000, r0 move.d r0,[LEDCount] #endif noswap1: ;; ----- now check the network -> parport link ;; if we simultaneously have network rx EOP and ;; parport TX desc, we can swap buffers and start a new RX/TX move.d [r9 + (R_IRQ_READ2 - R_IRQ_READ0)], r0 btstq DMA1EOPBIT, r0 ; check network rx bpl noswap2 btstq DMA4DESCBIT, r0 ; check parport tx bpl noswap2 nop ;; prepare to swap buffer ptrs (FP1b <-> TP2b) move.d [r4 = r7 + 8], r0; FN1b move.d [r3 = r7 + 24], r2; TP2b move.d r0, [r3] ; write to To Parport descriptor move.d r2, [r4] ; write to From Network descriptor ;; clear the interrupts moveq IO_STATE(R_DMA_CH1_CLR_INTR, clr_eop, do) | \ IO_STATE(R_DMA_CH1_CLR_INTR, clr_descr, do), r0 move.b r0, [r1 + (R_DMA_CH1_CLR_INTR - R_DMA_CH0_FIRST)] move.b r0, [r1 + (R_DMA_CH4_CLR_INTR - R_DMA_CH0_FIRST)] ;; copy received network length to outgoing parport length move.w [r7 + 12], r0 ; FNhlen move.w r0, [r7 + 16] ; TP2desc ;; restart DMAs jsr startdmaFNTP #if 0 #ifdef CONFIG_ETRAX_ETHERNET_LPSLAVE_HAS_LEDS ;; Light the LED signaling an incoming networkpacket movu.b 0xFB, r0 move.b r0, [R_PORT_PA_DATA] move.d 0x00010000, r0 move.d r0,[LEDCount] #endif #endif noswap2: #ifdef CONFIG_ETRAX_ETHERNET_LPSLAVE_HAS_LEDS ;; Count down LED counter, and turn off the network LED if required move.d [LEDCount], r0 beq mainloop nop subq 1, r0 move.d r0, [LEDCount] bne mainloop nop #if defined(CONFIG_ETRAX_NETWORK_LED_ON_WHEN_LINK) ;; Light the network LED , and start over the main loop movu.b [LEDAmber], r0 #elif defined(CONFIG_ETRAX_NETWORK_LED_ON_WHEN_ACTIVITY) ;; Turn off the network LED, and start over the main loop movu.b [LEDOff], r0 #else #error "Define either CONFIG_ETRAX_NETWORK_LED_ON_WHEN_LINK or CONFIG_ETRAX_NETWORK_LED_ON_WHEN_ACTIVITY" #endif move.b r0, [R_PORT_PA_DATA] #endif ba mainloop nop ;; --- some useful subroutines. handle_command: ;; handle command. we also need to clear the PAR0 RX EOP IRQ, and ;; restart the PAR0 dma. command is in R5, packet after cmd is in R0 moveq IO_STATE(R_DMA_CH3_CLR_INTR, clr_eop, do), r2 move.b r2, [r1 + (R_DMA_CH3_CLR_INTR - R_DMA_CH0_FIRST)] cmpq HOST_CMD_SETMAC, r5 bne no_setmac nop ;; copy station address (6 bytes) from packet to hardware move.d [r0+], r2 move.d R_NETWORK_SA_0, r3 move.d r2, [r3] move.w [r0], r2 move.w r2, [r3 + 4] no_setmac: move noswap1, SRP ba startdmaFP nop ;; start DMAs, from parport and to network startdmaFPTN: ;; start transmitting to the network (CH0) move.d TN4desc, r8 move.d r8, [r1] ; TN4desc -> FIRST0 move.b r6, [r1 + (R_DMA_CH0_CMD - R_DMA_CH0_FIRST)] ; start -> CMD0 startdmaFP: ;; start receiving from parport (CH3) move.d FP3desc, r8 move.d r8, [r1 + (R_DMA_CH3_FIRST - R_DMA_CH0_FIRST)] ; FP3desc -> FIRST3 move.b r6, [r1 + (R_DMA_CH3_CMD - R_DMA_CH0_FIRST)] ; start -> CMD3 ret nop ;; start DMAs, from network and to parport startdmaFNTP: ;; start transmitting to the parport (CH4) move.d TP2desc, r8 move.d r8, [r1 + (R_DMA_CH4_FIRST - R_DMA_CH0_FIRST)] ; TP2desc -> FIRST4 move.b r6, [r1 + (R_DMA_CH4_CMD - R_DMA_CH0_FIRST)] ; start -> CMD4 ;; start receiving from network (CH1) (r7 already contains FN1desc) move.d r7, [r1 + (R_DMA_CH1_FIRST - R_DMA_CH0_FIRST)] ; FN1desc -> FIRST1 move.b r6, [r1 + (R_DMA_CH1_CMD - R_DMA_CH0_FIRST)] ; start -> CMD1 ret nop ;; --- DMA descriptors - each descriptor is 4 longwords (16 bytes) ;; DONT MOVE THESE AROUND. Due to the as/ld "hole-in-the-head", ;; we cant write stuff like (TP2b - TP2desc) but the offsets ;; have to be hardcoded. .data ;; 0 from network FN1desc: .word BUFSIZE ; sw_len .word 0x0001 ; ctrl, d_eol is only flag we need .dword 0 ; next FN1b: .dword buffers ; buffer 1 8 .word 0 ; hw_len .word 0 ; status ;; 16 to parport TP2desc: .word 2 ; sw_len, filled in by code .word 0x0004 ; ctrl, d_wait because ecp cmd in next .dword TP2desc2 ; next TP2b: .dword buffers + BUFSIZE ; buffer 2 24 .word 0 ; hw_len .word 0 ; status ;; 32 to parport second descriptor, for the ECP command TP2desc2: .word 0x0001 ; sw_len, 1 byte (ecp command) .word 0x0019 ; ctrl, d_ecp | d_eol | d_int .dword 0 ; next .dword TP2desc2 ; buffer, dont care .word 0 ; hw_len .word 0 ; status ;; 48 from parport FP3desc: .word BUFSIZE ; sw_len .word 0x0001 ; ctrl, d_eol is only flag we need .dword 0 ; next FP3b: .dword buffers + BUFSIZE * 2 ; 56 buffer 3 FPhlen: .word 0 ; 60 hw_len .word 0 ; status ;; 64 to network TN4desc: .word 2 ; sw_len, filled in by code .word 0x0007 ; ctrl, d_eop | d_eol | d_wait .dword 0 ; next TN4b: .dword buffers + BUFSIZE * 3 + 4 ; 72 buffer 4 (the +4 is to offset the anti-skipping) .word 0 ; hw_len .word 0 ; status #ifdef CONFIG_ETRAX_ETHERNET_LPSLAVE_HAS_LEDS LEDCount: .dword 0 LEDOff: .word 0xff LEDGreen: .word 0xfb LEDRed: .word 0xf7 LEDAmber: .word 0xf3 LED: .word 0xf7 #endif ;; after the prog we put the buffers. not in the asm program, we just use ;; the address generated buffers: ;; END --- NEW FILE --- #define HOST_CMD_SENDPACK 0 #define HOST_CMD_SETMAC 1 --- NEW FILE --- MEMORY { cache : ORIGIN = 0x380000f0, LENGTH = 784 } SECTIONS { .text : { *(.text) } > cache .data : { *(.data) *(COMMON) } > cache .bss : { *(.bss) } > cache } --- NEW FILE --- /* $Id: e100lpslavenet.c,v 1.1 2002/04/09 17:03:15 atp Exp $ * * e100lpslavenet.c: A network driver for the ETRAX 100LX slave controller. * * Copyright (c) 1998-2001 Axis Communications AB. * * The outline of this driver comes from skeleton.c. * * $Log: e100lpslavenet.c,v $ * Revision 1.1 2002/04/09 17:03:15 atp * synch 2.4.15 commit 29 * * Revision 1.4 2001/06/21 16:55:26 olof * Minimized par port setup time to gain bandwidth * * Revision 1.3 2001/06/21 15:49:02 olof * Removed setting of default MAC address * * Revision 1.2 2001/06/11 15:39:52 olof [...996 lines suppressed...] } #endif /* ETHDEBUG */ static struct net_device dev_etrax_slave_ethernet; static int etrax_init_module(void) { struct net_device *d = &dev_etrax_slave_ethernet; d->init = etrax_ethernet_lpslave_init; if(register_netdev(d) == 0) return 0; else return -ENODEV; } module_init(etrax_init_module); |
From: Andy P. <at...@us...> - 2002-04-09 17:08:09
|
Update of /cvsroot/linux-vax/kernel-2.4/Documentation/i2c In directory usw-pr-cvs1:/tmp/cvs-serv7449/i2c Modified Files: dev-interface summary writing-clients Log Message: synch 2.4.15 commit 28 Index: dev-interface =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/i2c/dev-interface,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- dev-interface 14 Jan 2001 20:06:36 -0000 1.1.1.1 +++ dev-interface 9 Apr 2002 16:55:41 -0000 1.2 @@ -70,6 +70,9 @@ /* buf[0] contains the read byte */ } +IMPORTANT: because of the use of inline functions, you *have* to use +'-O' or some variation when you compile your program! + Full interface description ========================== Index: summary =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/i2c/summary,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- summary 14 Jan 2001 20:06:37 -0000 1.1.1.1 +++ summary 9 Apr 2002 16:55:41 -0000 1.2 @@ -1,9 +1,9 @@ -This is an explanation of what i2c is, and what is supported. +This is an explanation of what i2c is, and what is supported in this package. I2C and SMBus ============= -I2C (pronounce: I square C) is a protocol developed by Philips. It is a +I2C (pronounce: I squared C) is a protocol developed by Philips. It is a slow two-wire protocol (10-100 kHz), but it suffices for many types of devices. @@ -25,6 +25,7 @@ Adapter Device -> Driver Client + An Algorithm driver contains general code that can be used for a whole class of I2C adapters. Each specific adapter driver depends on one algorithm driver. @@ -35,29 +36,40 @@ For a given configuration, you will need a driver for your I2C bus (usually a separate Adapter and Algorithm driver), and drivers for your I2C devices -(usually one driver for each device). +(usually one driver for each device). There are no I2C device drivers +in this package. See the lm_sensors project http://www.lm-sensors.nu +for device drivers. + +Included Bus Drivers +==================== +Note that not only stable drivers are patched into the kernel by 'mkpatch'. -Included Drivers -================ Base modules ------------ i2c-core: The basic I2C code, including the /proc interface i2c-dev: The /dev interface +i2c-proc: The /proc interface for device (client) drivers Algorithm drivers ----------------- -i2c-algo-bit: A bit-banging algorithm -i2c-algo-pcf: A PCF 8584 style algorithm +i2c-algo-8xx: An algorithm for CPM's I2C device in Motorola 8xx processors (NOT BUILT BY DEFAULT) +i2c-algo-bit: A bit-banging algorithm +i2c-algo-pcf: A PCF 8584 style algorithm +i2c-algo-ppc405: An algorithm for the I2C device in IBM 405xx processors (NOT BUILT BY DEFAULT) Adapter drivers --------------- i2c-elektor: Elektor ISA card (uses i2c-algo-pcf) i2c-elv: ELV parallel port adapter (uses i2c-algo-bit) +i2c-pcf-epp: PCF8584 on a EPP parallel port (uses i2c-algo-pcf) (BROKEN - missing i2c-pcf-epp.h) i2c-philips-par: Philips style parallel port adapter (uses i2c-algo-bit) +i2c-ppc405: IBM 405xx processor I2C device (uses i2c-algo-ppc405) (NOT BUILT BY DEFAULT) +i2c-pport: Primitive parallel port adapter (uses i2c-algo-bit) +i2c-rpx: RPX board Motorola 8xx I2C device (uses i2c-algo-8xx) (NOT BUILT BY DEFAULT) i2c-velleman: Velleman K9000 parallel port adapter (uses i2c-algo-bit) Index: writing-clients =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/i2c/writing-clients,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- writing-clients 14 Jan 2001 20:06:42 -0000 1.1.1.1 +++ writing-clients 9 Apr 2002 16:55:41 -0000 1.2 @@ -33,7 +33,7 @@ /* detach_client */ &foo_detach_client, /* command */ &foo_command, /* May be NULL */ /* inc_use */ &foo_inc_use, /* May be NULL */ - /* dec_use */ &foo_dev_use /* May be NULL */ + /* dec_use */ &foo_dec_use /* May be NULL */ } The name can be chosen freely, and may be upto 40 characters long. Please @@ -190,7 +190,7 @@ detection algorithm. You do not have to use this parameter interface; but don't try to use -function i2c_probe() (or sensors_detect()) if you don't. +function i2c_probe() (or i2c_detect()) if you don't. NOTE: If you want to write a `sensors' driver, the interface is slightly different! See below. @@ -344,17 +344,17 @@ return i2c_probe(adapter,&addr_data,&foo_detect_client); } -For `sensors' drivers, use the sensors_detect function instead: +For `sensors' drivers, use the i2c_detect function instead: int foo_attach_adapter(struct i2c_adapter *adapter) { - return sensors_detect(adapter,&addr_data,&foo_detect_client); + return i2c_detect(adapter,&addr_data,&foo_detect_client); } Remember, structure `addr_data' is defined by the macros explained above, so you do not have to define it yourself. -The i2c_probe or sensors_detect function will call the foo_detect_client +The i2c_probe or i2c_detect function will call the foo_detect_client function only for those i2c addresses that actually have a device on them (unless a `force' parameter was used). In addition, addresses that are already in use (by some other registered client) are skipped. @@ -363,9 +363,9 @@ The detect client function -------------------------- -The detect client function is called by i2c_probe or sensors_detect. +The detect client function is called by i2c_probe or i2c_detect. The `kind' parameter contains 0 if this call is due to a `force' -parameter, and 0 otherwise (for sensors_detect, it contains 0 if +parameter, and 0 otherwise (for i2c_detect, it contains 0 if this call is due to the generic `force' parameter, and the chip type number if it is due to a specific `force' parameter). @@ -530,7 +530,7 @@ /* SENSORS ONLY BEGIN */ /* Register a new directory entry with module sensors. See below for the `template' structure. */ - if ((i = sensors_register_entry(new_client, type_name, + if ((i = i2c_register_entry(new_client, type_name, foo_dir_table_template,THIS_MODULE)) < 0) { err = i; goto ERROR4; @@ -574,8 +574,8 @@ int err,i; /* SENSORS ONLY START */ - /* Deregister with the `sensors' module. */ - sensors_deregister_entry(((struct lm78_data *)(client->data))->sysctl_id); + /* Deregister with the `i2c-proc' module. */ + i2c_deregister_entry(((struct lm78_data *)(client->data))->sysctl_id); /* SENSORS ONLY END */ /* Try to detach the client from i2c space */ @@ -772,12 +772,12 @@ First, I will give an example definition. static ctl_table foo_dir_table_template[] = { - { FOO_SYSCTL_FUNC1, "func1", NULL, 0, 0644, NULL, &sensors_proc_real, - &sensors_sysctl_real,NULL,&foo_func }, - { FOO_SYSCTL_FUNC2, "func2", NULL, 0, 0644, NULL, &sensors_proc_real, - &sensors_sysctl_real,NULL,&foo_func }, - { FOO_SYSCTL_DATA, "data", NULL, 0, 0644, NULL, &sensors_proc_real, - &sensors_sysctl_real,NULL,&foo_data }, + { FOO_SYSCTL_FUNC1, "func1", NULL, 0, 0644, NULL, &i2c_proc_real, + &i2c_sysctl_real,NULL,&foo_func }, + { FOO_SYSCTL_FUNC2, "func2", NULL, 0, 0644, NULL, &i2c_proc_real, + &i2c_sysctl_real,NULL,&foo_func }, + { FOO_SYSCTL_DATA, "data", NULL, 0, 0644, NULL, &i2c_proc_real, + &i2c_sysctl_real,NULL,&foo_data }, { 0 } }; @@ -791,8 +791,8 @@ fourth should always be 0. The fifth is the mode of the /proc file; 0644 is safe, as the file will be owned by root:root. -The seventh and eighth parameters should be &sensors_proc_real and -&sensors_sysctl_real if you want to export lists of reals (scaled +The seventh and eighth parameters should be &i2c_proc_real and +&i2c_sysctl_real if you want to export lists of reals (scaled integers). You can also use your own function for them, as usual. Finally, the last parameter is the call-back to gather the data (see below) if you use the *_proc_real functions. |
From: Andy P. <at...@us...> - 2002-04-09 17:08:09
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/pci In directory usw-pr-cvs1:/tmp/cvs-serv6177/pci Modified Files: Makefile compat.c gen-devlist.c names.c pci.c pci.ids proc.c quirks.c setup-bus.c setup-irq.c setup-res.c Log Message: synch 2.4.15 commit 27 Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/pci/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- Makefile 14 Jan 2001 18:35:34 -0000 1.1.1.1 +++ Makefile 9 Apr 2002 16:45:52 -0000 1.2 @@ -13,14 +13,23 @@ export-objs := pci.o -obj-$(CONFIG_PCI) += pci.o quirks.o compat.o names.o setup-res.o +obj-$(CONFIG_PCI) += pci.o quirks.o compat.o names.o obj-$(CONFIG_PROC_FS) += proc.o +ifndef CONFIG_SPARC64 +obj-$(CONFIG_PCI) += setup-res.o +endif + # # Some architectures use the generic PCI setup functions # obj-$(CONFIG_ALPHA) += setup-bus.o setup-irq.o obj-$(CONFIG_ARM) += setup-bus.o setup-irq.o +obj-$(CONFIG_PARISC) += setup-bus.o +obj-$(CONFIG_SUPERH) += setup-bus.o setup-irq.o +obj-$(CONFIG_ALL_PPC) += setup-bus.o +obj-$(CONFIG_DDB5476) += setup-bus.o +obj-$(CONFIG_SGI_IP27) += setup-irq.o ifndef CONFIG_X86 obj-y += syscall.o Index: compat.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/pci/compat.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- compat.c 14 Jan 2001 18:35:38 -0000 1.1.1.1 +++ compat.c 9 Apr 2002 16:45:52 -0000 1.2 @@ -3,7 +3,7 @@ * * PCI Bus Services -- Function For Backward Compatibility * - * Copyright 1998--2000 Martin Mares <mj...@su...> + * Copyright 1998--2000 Martin Mares <mj...@uc...> */ #include <linux/types.h> Index: gen-devlist.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/pci/gen-devlist.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- gen-devlist.c 14 Jan 2001 18:36:02 -0000 1.1.1.1 +++ gen-devlist.c 9 Apr 2002 16:45:52 -0000 1.2 @@ -1,7 +1,7 @@ /* * Generate devlist.h and classlist.h from the PCI ID file. * - * (c) 1999--2000 Martin Mares <mj...@su...> + * (c) 1999--2000 Martin Mares <mj...@uc...> */ #include <stdio.h> @@ -68,6 +68,7 @@ bra[-1] = 0; if (vendor_len + strlen(c) + 1 > MAX_NAME_SIZE) { fprintf(stderr, "Line %d: Device name too long\n", lino); + fprintf(stderr, "%s\n", c); return 1; } } Index: names.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/pci/names.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- names.c 14 Jan 2001 18:35:42 -0000 1.1.1.1 +++ names.c 9 Apr 2002 16:45:52 -0000 1.2 @@ -32,9 +32,9 @@ * real memory.. Parse the same file multiple times * to get all the info. */ -#define VENDOR( vendor, name ) static const char __vendorstr_##vendor[] __initdata = name; +#define VENDOR( vendor, name ) static char __vendorstr_##vendor[] __initdata = name; #define ENDVENDOR() -#define DEVICE( vendor, device, name ) static const char __devicestr_##vendor##device[] __initdata = name; +#define DEVICE( vendor, device, name ) static char __devicestr_##vendor##device[] __initdata = name; #include "devlist.h" @@ -43,7 +43,7 @@ #define DEVICE( vendor, device, name ) { 0x##device, 0, __devicestr_##vendor##device }, #include "devlist.h" -static const struct pci_vendor_info __initdata pci_vendor_list[] = { +static struct pci_vendor_info __initdata pci_vendor_list[] = { #define VENDOR( vendor, name ) { 0x##vendor, sizeof(__devices_##vendor) / sizeof(struct pci_device_info), __vendorstr_##vendor, __devices_##vendor }, #define ENDVENDOR() #define DEVICE( vendor, device, name ) @@ -52,7 +52,7 @@ #define VENDORS (sizeof(pci_vendor_list)/sizeof(struct pci_vendor_info)) -void __init pci_name_device(struct pci_dev *dev) +void __devinit pci_name_device(struct pci_dev *dev) { const struct pci_vendor_info *vendor_p = pci_vendor_list; int i = VENDORS; Index: pci.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/pci/pci.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- pci.c 25 Feb 2001 23:15:09 -0000 1.1.1.2 +++ pci.c 9 Apr 2002 16:45:52 -0000 1.2 @@ -6,7 +6,7 @@ * Copyright 1993 -- 1997 Drew Eckhardt, Frederic Potter, * David Mosberger-Tang * - * Copyright 1997 -- 2000 Martin Mares <mj...@su...> + * Copyright 1997 -- 2000 Martin Mares <mj...@uc...> */ #include <linux/config.h> @@ -21,6 +21,8 @@ #include <linux/spinlock.h> #include <linux/pm.h> [...1360 lines suppressed...] +EXPORT_SYMBOL(pci_set_power_state); +EXPORT_SYMBOL(pci_save_state); +EXPORT_SYMBOL(pci_restore_state); +EXPORT_SYMBOL(pci_enable_wake); + /* Obsolete functions */ EXPORT_SYMBOL(pcibios_present); @@ -1236,4 +2023,11 @@ EXPORT_SYMBOL(isa_dma_bridge_buggy); EXPORT_SYMBOL(pci_pci_problems); + +/* Pool allocator */ + +EXPORT_SYMBOL (pci_pool_create); +EXPORT_SYMBOL (pci_pool_destroy); +EXPORT_SYMBOL (pci_pool_alloc); +EXPORT_SYMBOL (pci_pool_free); Index: pci.ids =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/pci/pci.ids,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- pci.ids 14 Jan 2001 18:36:00 -0000 1.1.1.1 +++ pci.ids 9 Apr 2002 16:45:52 -0000 1.2 @@ -1,8 +1,11 @@ # # List of PCI ID's # -# Maintained by Martin Mares <pc...@uc...> -# If you have any new entries, send them to the maintainer. +# Maintained by Martin Mares <mj...@uc...> and other volunteers from the +# Linux PCI ID's Project at http://pciids.sf.net/. New data are always +# welcome (if they are accurate), we're eagerly expecting new entries, +# so if you have anything to contribute, please visit the home page or +# send a diff -u against the most recent pci.ids to pc...@uc.... # [...1675 lines suppressed...] 7810 AIC-7810 @@ -4783,6 +5235,7 @@ 00c0 7899A 00c1 7899B 00c3 7899D + 00c5 RAID subsystem HBA 00cf 7899P 907f Atronics 2015 IDE-2015PL @@ -4965,8 +5418,8 @@ 00 UHCI 10 OHCI 80 Unspecified - Fe USB Device - 04 Fiber Channel + fe USB Device + 04 Fibre Channel 05 SMBus 06 InfiniBand C 0d Wireless controller Index: proc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/pci/proc.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- proc.c 14 Jan 2001 18:35:40 -0000 1.1.1.1 +++ proc.c 9 Apr 2002 16:45:52 -0000 1.2 @@ -3,7 +3,7 @@ * * Procfs interface for the PCI bus. * - * Copyright (c) 1997--1999 Martin Mares <mj...@su...> + * Copyright (c) 1997--1999 Martin Mares <mj...@uc...> */ #include <linux/types.h> @@ -11,6 +11,7 @@ #include <linux/pci.h> #include <linux/proc_fs.h> #include <linux/init.h> +#include <linux/seq_file.h> #include <asm/uaccess.h> #include <asm/byteorder.h> @@ -191,10 +192,109 @@ return nbytes; } +struct pci_filp_private { + enum pci_mmap_state mmap_state; + int write_combine; +}; + +static int proc_bus_pci_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) +{ + const struct proc_dir_entry *dp = inode->u.generic_ip; + struct pci_dev *dev = dp->data; +#ifdef HAVE_PCI_MMAP + struct pci_filp_private *fpriv = file->private_data; +#endif /* HAVE_PCI_MMAP */ + int ret = 0; + + switch (cmd) { + case PCIIOC_CONTROLLER: + ret = pci_controller_num(dev); + break; + +#ifdef HAVE_PCI_MMAP + case PCIIOC_MMAP_IS_IO: + fpriv->mmap_state = pci_mmap_io; + break; + + case PCIIOC_MMAP_IS_MEM: + fpriv->mmap_state = pci_mmap_mem; + break; + + case PCIIOC_WRITE_COMBINE: + if (arg) + fpriv->write_combine = 1; + else + fpriv->write_combine = 0; + break; + +#endif /* HAVE_PCI_MMAP */ + + default: + ret = -EINVAL; + break; + }; + + return ret; +} + +#ifdef HAVE_PCI_MMAP +static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma) +{ + struct inode *inode = file->f_dentry->d_inode; + const struct proc_dir_entry *dp = inode->u.generic_ip; + struct pci_dev *dev = dp->data; + struct pci_filp_private *fpriv = file->private_data; + int ret; + + if (!capable(CAP_SYS_RAWIO)) + return -EPERM; + + ret = pci_mmap_page_range(dev, vma, + fpriv->mmap_state, + fpriv->write_combine); + if (ret < 0) + return ret; + + return 0; +} + +static int proc_bus_pci_open(struct inode *inode, struct file *file) +{ + struct pci_filp_private *fpriv = kmalloc(sizeof(*fpriv), GFP_KERNEL); + + if (!fpriv) + return -ENOMEM; + + fpriv->mmap_state = pci_mmap_io; + fpriv->write_combine = 0; + + file->private_data = fpriv; + + return 0; +} + +static int proc_bus_pci_release(struct inode *inode, struct file *file) +{ + kfree(file->private_data); + file->private_data = NULL; + + return 0; +} +#endif /* HAVE_PCI_MMAP */ + static struct file_operations proc_bus_pci_operations = { - llseek: proc_bus_pci_lseek, - read: proc_bus_pci_read, - write: proc_bus_pci_write, + llseek: proc_bus_pci_lseek, + read: proc_bus_pci_read, + write: proc_bus_pci_write, + ioctl: proc_bus_pci_ioctl, +#ifdef HAVE_PCI_MMAP + open: proc_bus_pci_open, + release: proc_bus_pci_release, + mmap: proc_bus_pci_mmap, +#ifdef HAVE_ARCH_PCI_GET_UNMAPPED_AREA + get_unmapped_area: get_pci_unmapped_area, +#endif /* HAVE_ARCH_PCI_GET_UNMAPPED_AREA */ +#endif /* HAVE_PCI_MMAP */ }; #if BITS_PER_LONG == 32 @@ -203,53 +303,72 @@ #define LONG_FORMAT "\t%16lx" #endif -static int -get_pci_dev_info(char *buf, char **start, off_t pos, int count) +/* iterator */ +static void *pci_seq_start(struct seq_file *m, loff_t *pos) +{ + struct list_head *p = &pci_devices; + loff_t n = *pos; + + /* XXX: surely we need some locking for traversing the list? */ + while (n--) { + p = p->next; + if (p == &pci_devices) + return NULL; + } + return p; +} +static void *pci_seq_next(struct seq_file *m, void *v, loff_t *pos) +{ + struct list_head *p = v; + (*pos)++; + return p->next != &pci_devices ? p->next : NULL; +} +static void pci_seq_stop(struct seq_file *m, void *v) { + /* release whatever locks we need */ +} + +static int show_device(struct seq_file *m, void *v) +{ + struct list_head *p = v; const struct pci_dev *dev; - off_t at = 0; - int len, i, cnt; + const struct pci_driver *drv; + int i; - cnt = 0; - pci_for_each_dev(dev) { - const struct pci_driver *drv = pci_dev_driver(dev); - len = sprintf(buf, "%02x%02x\t%04x%04x\t%x", + if (p == &pci_devices) + return 0; + + dev = pci_dev_g(p); + drv = pci_dev_driver(dev); + seq_printf(m, "%02x%02x\t%04x%04x\t%x", dev->bus->number, dev->devfn, dev->vendor, dev->device, dev->irq); - /* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */ - for(i=0; i<7; i++) - len += sprintf(buf+len, LONG_FORMAT, - dev->resource[i].start | (dev->resource[i].flags & PCI_REGION_FLAG_MASK)); - for(i=0; i<7; i++) - len += sprintf(buf+len, LONG_FORMAT, dev->resource[i].start < dev->resource[i].end ? - dev->resource[i].end - dev->resource[i].start + 1 : 0); - buf[len++] = '\t'; - if (drv) - len += sprintf(buf+len, "%s", drv->name); - buf[len++] = '\n'; - at += len; - if (at >= pos) { - if (!*start) { - *start = buf + (pos - (at - len)); - cnt = at - pos; - } else - cnt += len; - buf += len; - if (cnt >= count) - /* - * proc_file_read() gives us 1KB of slack so it's OK if the - * above printfs write a little beyond the buffer end (we - * never write more than 1KB beyond the buffer end). - */ - break; - } - } - return (count > cnt) ? cnt : count; + /* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */ + for(i=0; i<7; i++) + seq_printf(m, LONG_FORMAT, + dev->resource[i].start | + (dev->resource[i].flags & PCI_REGION_FLAG_MASK)); + for(i=0; i<7; i++) + seq_printf(m, LONG_FORMAT, + dev->resource[i].start < dev->resource[i].end ? + dev->resource[i].end - dev->resource[i].start + 1 : 0); + seq_putc(m, '\t'); + if (drv) + seq_printf(m, "%s", drv->name); + seq_putc(m, '\n'); + return 0; } +static struct seq_operations proc_bus_pci_devices_op = { + start: pci_seq_start, + next: pci_seq_next, + stop: pci_seq_stop, + show: show_device +}; + static struct proc_dir_entry *proc_bus_pci_dir; int pci_proc_attach_device(struct pci_dev *dev) @@ -287,6 +406,28 @@ return 0; } +int pci_proc_attach_bus(struct pci_bus* bus) +{ + struct proc_dir_entry *de = bus->procdir; + + if (!de) { + char name[16]; + sprintf(name, "%02x", bus->number); + de = bus->procdir = proc_mkdir(name, proc_bus_pci_dir); + if (!de) + return -ENOMEM; + } + return 0; +} + +int pci_proc_detach_bus(struct pci_bus* bus) +{ + struct proc_dir_entry *de = bus->procdir; + if (de) + remove_proc_entry(de->name, proc_bus_pci_dir); + return 0; +} + /* * Backward compatible /proc/pci interface. @@ -298,54 +439,56 @@ * The configuration string is stored starting at buf[len]. If the * string would exceed the size of the buffer (SIZE), 0 is returned. */ -static int sprint_dev_config(struct pci_dev *dev, char *buf, int size) +static int show_dev_config(struct seq_file *m, void *v) { + struct list_head *p = v; + struct pci_dev *dev; + struct pci_driver *drv; u32 class_rev; unsigned char latency, min_gnt, max_lat, *class; - int reg, len = 0; + int reg; + + if (p == &pci_devices) { + seq_puts(m, "PCI devices found:\n"); + return 0; + } + + dev = pci_dev_g(p); + drv = pci_dev_driver(dev); pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); pci_read_config_byte (dev, PCI_LATENCY_TIMER, &latency); pci_read_config_byte (dev, PCI_MIN_GNT, &min_gnt); pci_read_config_byte (dev, PCI_MAX_LAT, &max_lat); - if (len + 160 > size) - return -1; - len += sprintf(buf + len, " Bus %2d, device %3d, function %2d:\n", - dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); + seq_printf(m, " Bus %2d, device %3d, function %2d:\n", + dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); class = pci_class_name(class_rev >> 16); if (class) - len += sprintf(buf+len, " %s", class); + seq_printf(m, " %s", class); else - len += sprintf(buf+len, " Class %04x", class_rev >> 16); - len += sprintf(buf+len, ": %s (rev %d).\n", dev->name, class_rev & 0xff); + seq_printf(m, " Class %04x", class_rev >> 16); + seq_printf(m, ": %s (rev %d).\n", dev->name, class_rev & 0xff); - if (dev->irq) { - if (len + 40 > size) - return -1; - len += sprintf(buf + len, " IRQ %d.\n", dev->irq); - } + if (dev->irq) + seq_printf(m, " IRQ %d.\n", dev->irq); if (latency || min_gnt || max_lat) { - if (len + 80 > size) - return -1; - len += sprintf(buf + len, " Master Capable. "); + seq_printf(m, " Master Capable. "); if (latency) - len += sprintf(buf + len, "Latency=%d. ", latency); + seq_printf(m, "Latency=%d. ", latency); else - len += sprintf(buf + len, "No bursts. "); + seq_puts(m, "No bursts. "); if (min_gnt) - len += sprintf(buf + len, "Min Gnt=%d.", min_gnt); + seq_printf(m, "Min Gnt=%d.", min_gnt); if (max_lat) - len += sprintf(buf + len, "Max Lat=%d.", max_lat); - len += sprintf(buf + len, "\n"); + seq_printf(m, "Max Lat=%d.", max_lat); + seq_putc(m, '\n'); } for (reg = 0; reg < 6; reg++) { struct resource *res = dev->resource + reg; unsigned long base, end, flags; - if (len + 40 > size) - return -1; base = res->start; end = res->end; flags = res->flags; @@ -353,9 +496,8 @@ continue; if (flags & PCI_BASE_ADDRESS_SPACE_IO) { - len += sprintf(buf + len, - " I/O at 0x%lx [0x%lx].\n", - base, end); + seq_printf(m, " I/O at 0x%lx [0x%lx].\n", + base, end); } else { const char *pref, *type = "unknown"; @@ -371,65 +513,58 @@ case PCI_BASE_ADDRESS_MEM_TYPE_64: type = "64 bit"; break; } - len += sprintf(buf + len, - " %srefetchable %s memory at " + seq_printf(m, " %srefetchable %s memory at " "0x%lx [0x%lx].\n", pref, type, base, end); } } - - return len; + return 0; } -/* - * Return list of PCI devices as a character string for /proc/pci. - * BUF is a buffer that is PAGE_SIZE bytes long. - */ -static int pci_read_proc(char *buf, char **start, off_t off, - int count, int *eof, void *data) -{ - int nprinted, len, begin = 0; - struct pci_dev *dev; - - len = sprintf(buf, "PCI devices found:\n"); +static struct seq_operations proc_pci_op = { + start: pci_seq_start, + next: pci_seq_next, + stop: pci_seq_stop, + show: show_dev_config +}; - *eof = 1; - pci_for_each_dev(dev) { - nprinted = sprint_dev_config(dev, buf + len, PAGE_SIZE - len); - if (nprinted < 0) { - *eof = 0; - break; - } - len += nprinted; - if (len+begin < off) { - begin += len; - len = 0; - } - if (len+begin >= off+count) - break; - } - off -= begin; - *start = buf + off; - len -= off; - if (len>count) - len = count; - if (len<0) - len = 0; - return len; +static int proc_bus_pci_dev_open(struct inode *inode, struct file *file) +{ + return seq_open(file, &proc_bus_pci_devices_op); } +static struct file_operations proc_bus_pci_dev_operations = { + open: proc_bus_pci_dev_open, + read: seq_read, + llseek: seq_lseek, + release: seq_release, +}; +static int proc_pci_open(struct inode *inode, struct file *file) +{ + return seq_open(file, &proc_pci_op); +} +static struct file_operations proc_pci_operations = { + open: proc_pci_open, + read: seq_read, + llseek: seq_lseek, + release: seq_release, +}; static int __init pci_proc_init(void) { if (pci_present()) { + struct proc_dir_entry *entry; struct pci_dev *dev; proc_bus_pci_dir = proc_mkdir("pci", proc_bus); - create_proc_info_entry("devices", 0, proc_bus_pci_dir, - get_pci_dev_info); + entry = create_proc_entry("devices", 0, proc_bus_pci_dir); + if (entry) + entry->proc_fops = &proc_bus_pci_dev_operations; pci_for_each_dev(dev) { pci_proc_attach_device(dev); } - create_proc_read_entry("pci", 0, NULL, pci_read_proc, NULL); + entry = create_proc_entry("pci", 0, NULL); + if (entry) + entry->proc_fops = &proc_pci_operations; } return 0; } Index: quirks.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/pci/quirks.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- quirks.c 14 Jan 2001 18:35:41 -0000 1.1.1.1 +++ quirks.c 9 Apr 2002 16:45:52 -0000 1.2 @@ -5,17 +5,19 @@ * bugs. Devices present only on certain architectures (host * bridges et cetera) should be handled in arch-specific code. * - * Copyright (c) 1999 Martin Mares <mj...@su...> + * Copyright (c) 1999 Martin Mares <mj...@uc...> * * The bridge optimization stuff has been removed. If you really * have a silly BIOS which is unable to set your host bridge right, * use the PowerTweak utility (see http://powertweak.sourceforge.net). */ +#include <linux/config.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/pci.h> #include <linux/init.h> +#include <linux/delay.h> #undef DEBUG @@ -31,7 +33,7 @@ while ((d = pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_0, d))) { pci_read_config_byte(d, 0x82, &dlc); if (!(dlc & 1<<1)) { - printk("PCI: PIIX3: Enabling Passive Release on %s\n", d->slot_name); + printk(KERN_ERR "PCI: PIIX3: Enabling Passive Release on %s\n", d->slot_name); dlc |= 1<<1; pci_write_config_byte(d, 0x82, dlc); } @@ -85,6 +87,66 @@ } /* + * VIA Apollo KT133 needs PCI latency patch + * Made according to a windows driver based patch by George E. Breese + * see PCI Latency Adjust on http://www.viahardware.com/download/viatweak.shtm + * Also see http://home.tiscalinet.de/au-ja/review-kt133a-1-en.html for + * the info on which Mr Breese based his work. + * + * Updated based on further information from the site and also on + * information provided by VIA + */ +static void __init quirk_vialatency(struct pci_dev *dev) +{ + struct pci_dev *p; + u8 rev; + u8 busarb; + /* Ok we have a potential problem chipset here. Now see if we have + a buggy southbridge */ + + p=pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, NULL); + if(p!=NULL) + { + pci_read_config_byte(p, PCI_CLASS_REVISION, &rev); + /* 0x40 - 0x4f == 686B, 0x10 - 0x2f == 686A; thanks Dan Hollis */ + /* Check for buggy part revisions */ + if (rev < 0x40 || rev > 0x42) + return; + } + else + { + p = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, NULL); + if(p==NULL) /* No problem parts */ + return; + pci_read_config_byte(p, PCI_CLASS_REVISION, &rev); + /* Check for buggy part revisions */ + if (rev < 0x10 || rev > 0x12) + return; + } + + /* + * Ok we have the problem. Now set the PCI master grant to + * occur every master grant. The apparent bug is that under high + * PCI load (quite common in Linux of course) you can get data + * loss when the CPU is held off the bus for 3 bus master requests + * This happens to include the IDE controllers.... + * + * VIA only apply this fix when an SB Live! is present but under + * both Linux and Windows this isnt enough, and we have seen + * corruption without SB Live! but with things like 3 UDMA IDE + * controllers. So we ignore that bit of the VIA recommendation.. + */ + + pci_read_config_byte(dev, 0x76, &busarb); + /* Set bit 4 and bi 5 of byte 76 to 0x01 + "Master priority rotation on every PCI master grant */ + busarb &= ~(1<<5); + busarb |= (1<<4); + pci_write_config_byte(dev, 0x76, busarb); + printk(KERN_INFO "Applying VIA southbridge workaround.\n"); +} + +/* * VIA Apollo VP3 needs ETBF on BT848/878 */ @@ -96,6 +158,15 @@ pci_pci_problems|=PCIPCI_VIAETBF; } } +static void __init quirk_vsfx(struct pci_dev *dev) +{ + if((pci_pci_problems&PCIPCI_VSFX)==0) + { + printk(KERN_INFO "Limiting direct PCI/PCI transfers.\n"); + pci_pci_problems|=PCIPCI_VSFX; + } +} + /* * Natoma has some interesting boundary conditions with Zoran stuff @@ -215,6 +286,86 @@ quirk_io_region(dev, smb, 16, PCI_BRIDGE_RESOURCES + 2); } + +#ifdef CONFIG_X86_IO_APIC +extern int nr_ioapics; + +/* + * VIA 686A/B: If an IO-APIC is active, we need to route all on-chip + * devices to the external APIC. + * + * TODO: When we have device-specific interrupt routers, + * this code will go away from quirks. + */ +static void __init quirk_via_ioapic(struct pci_dev *dev) +{ + u8 tmp; + + if (nr_ioapics < 1) + tmp = 0; /* nothing routed to external APIC */ + else + tmp = 0x1f; /* all known bits (4-0) routed to external APIC */ + + printk(KERN_INFO "PCI: %sbling Via external APIC routing\n", + tmp == 0 ? "Disa" : "Ena"); + + /* Offset 0x58: External APIC IRQ output control */ + pci_write_config_byte (dev, 0x58, tmp); +} + +#endif /* CONFIG_X86_IO_APIC */ + + +/* + * Via 686A/B: The PCI_INTERRUPT_LINE register for the on-chip + * devices, USB0/1, AC97, MC97, and ACPI, has an unusual feature: + * when written, it makes an internal connection to the PIC. + * For these devices, this register is defined to be 4 bits wide. + * Normally this is fine. However for IO-APIC motherboards, or + * non-x86 architectures (yes Via exists on PPC among other places), + * we must mask the PCI_INTERRUPT_LINE value versus 0xf to get + * interrupts delivered properly. + * + * TODO: When we have device-specific interrupt routers, + * quirk_via_irqpic will go away from quirks. + */ + +/* + * FIXME: it is questionable that quirk_via_acpi + * is needed. It shows up as an ISA bridge, and does not + * support the PCI_INTERRUPT_LINE register at all. Therefore + * it seems like setting the pci_dev's 'irq' to the + * value of the ACPI SCI interrupt is only done for convenience. + * -jgarzik + */ +static void __init quirk_via_acpi(struct pci_dev *d) +{ + /* + * VIA ACPI device: SCI IRQ line in PCI config byte 0x42 + */ + u8 irq; + pci_read_config_byte(d, 0x42, &irq); + irq &= 0xf; + if (irq && (irq != 2)) + d->irq = irq; +} + +static void __init quirk_via_irqpic(struct pci_dev *dev) +{ + u8 irq, new_irq = dev->irq & 0xf; + + pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); + + if (new_irq != irq) { + printk(KERN_INFO "PCI: Via IRQ fixup for %s, from %d to %d\n", + dev->slot_name, irq, new_irq); + + udelay(15); + pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq); + } +} + + /* * PIIX3 USB: We have to disable USB interrupts that are * hardwired to PIRQD# and may be shared with an @@ -248,6 +399,62 @@ } /* + * CardBus controllers have a legacy base address that enables them + * to respond as i82365 pcmcia controllers. We don't want them to + * do this even if the Linux CardBus driver is not loaded, because + * the Linux i82365 driver does not (and should not) handle CardBus. + */ +static void __init quirk_cardbus_legacy(struct pci_dev *dev) +{ + if ((PCI_CLASS_BRIDGE_CARDBUS << 8) ^ dev->class) + return; + pci_write_config_dword(dev, PCI_CB_LEGACY_MODE_BASE, 0); +} + +/* + * The AMD io apic can hang the box when an apic irq is masked. + * We check all revs >= B0 (yet not in the pre production!) as the bug + * is currently marked NoFix + * + * We have multiple reports of hangs with this chipset that went away with + * noapic specified. For the moment we assume its the errata. We may be wrong + * of course. However the advice is demonstrably good even if so.. + */ + +static void __init quirk_amd_ioapic(struct pci_dev *dev) +{ + u8 rev; + + pci_read_config_byte(dev, PCI_REVISION_ID, &rev); + if(rev >= 0x02) + { + printk(KERN_WARNING "I/O APIC: AMD Errata #22 may be present. In the event of instability try\n"); + printk(KERN_WARNING " : booting with the \"noapic\" option.\n"); + } +} + +/* + * Following the PCI ordering rules is optional on the AMD762. I'm not + * sure what the designers were smoking but let's not inhale... + * + * To be fair to AMD, it follows the spec by default, its BIOS people + * who turn it off! + */ + +static void __init quirk_amd_ordering(struct pci_dev *dev) +{ + u32 pcic; + + pci_read_config_dword(dev, 0x42, &pcic); + if((pcic&2)==0) + { + pcic |= 2; + printk(KERN_WARNING "BIOS disabled PCI ordering compliance, so we enabled it again.\n"); + pci_write_config_dword(dev, 0x42, pcic); + } +} + +/* * The main table of quirks. */ @@ -275,6 +482,10 @@ { PCI_FIXUP_FINAL, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_2, quirk_natoma }, { PCI_FIXUP_FINAL, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, quirk_nopcipci }, { PCI_FIXUP_FINAL, PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496, quirk_nopcipci }, + { PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, quirk_vialatency }, + { PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8371_1, quirk_vialatency }, + { PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, 0x3112 /* Not out yet ? */, quirk_vialatency }, + { PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576, quirk_vsfx }, { PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, quirk_viaetbf }, { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, quirk_vt82c598_id }, { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_vt82c586_acpi }, @@ -283,6 +494,20 @@ { PCI_FIXUP_HEADER, PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101, quirk_ali7101_acpi }, { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371SB_2, quirk_piix3_usb }, { PCI_FIXUP_HEADER, PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_2, quirk_piix3_usb }, + { PCI_FIXUP_FINAL, PCI_ANY_ID, PCI_ANY_ID, quirk_cardbus_legacy }, + +#ifdef CONFIG_X86_IO_APIC + { PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_ioapic }, +#endif + { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_via_acpi }, + { PCI_FIXUP_HEADER, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_acpi }, + { PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_2, quirk_via_irqpic }, + { PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irqpic }, + { PCI_FIXUP_FINAL, PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_6, quirk_via_irqpic }, + + { PCI_FIXUP_FINAL, PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7410, quirk_amd_ioapic }, + { PCI_FIXUP_FINAL, PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FE_GATE_700C, quirk_amd_ordering }, + { 0 } }; @@ -294,7 +519,7 @@ (f->vendor == dev->vendor || f->vendor == (u16) PCI_ANY_ID) && (f->device == dev->device || f->device == (u16) PCI_ANY_ID)) { #ifdef DEBUG - printk("PCI: Calling quirk %p for %s\n", f->hook, dev->slot_name); + printk(KERN_INFO "PCI: Calling quirk %p for %s\n", f->hook, dev->slot_name); #endif f->hook(dev); } Index: setup-bus.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/pci/setup-bus.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setup-bus.c 14 Jan 2001 18:36:03 -0000 1.1.1.1 +++ setup-bus.c 9 Apr 2002 16:45:52 -0000 1.2 @@ -23,7 +23,7 @@ #include <linux/slab.h> -#define DEBUG_CONFIG 1 +#define DEBUG_CONFIG 0 #if DEBUG_CONFIG # define DBGC(args) printk args #else @@ -136,9 +136,9 @@ ranges.mem_end = bus->resource[1]->end; pcibios_fixup_pbus_ranges(bus, &ranges); - DBGC(("PCI: Bus %d, bridge: %s\n", bus->number, bridge->name)); - DBGC((" IO window: %04lx-%04lx\n", ranges.io_start, ranges.io_end)); - DBGC((" MEM window: %08lx-%08lx\n", ranges.mem_start, ranges.mem_end)); + DBGC((KERN_ERR "PCI: Bus %d, bridge: %s\n", bus->number, bridge->name)); + DBGC((KERN_ERR " IO window: %04lx-%04lx\n", ranges.io_start, ranges.io_end)); + DBGC((KERN_ERR " MEM window: %08lx-%08lx\n", ranges.mem_start, ranges.mem_end)); /* Set up the top and bottom of the PCI I/O segment for this bus. */ pci_read_config_dword(bridge, PCI_IO_BASE, &l); Index: setup-irq.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/pci/setup-irq.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setup-irq.c 14 Jan 2001 18:36:03 -0000 1.1.1.1 +++ setup-irq.c 9 Apr 2002 16:45:52 -0000 1.2 @@ -53,7 +53,7 @@ irq = 0; dev->irq = irq; - DBGC(("PCI fixup irq: (%s) got %d\n", dev->name, dev->irq)); + DBGC((KERN_ERR "PCI fixup irq: (%s) got %d\n", dev->name, dev->irq)); /* Always tell the device, so the driver knows what is the real IRQ to use; the device does not use it. */ Index: setup-res.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/pci/setup-res.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- setup-res.c 14 Jan 2001 18:36:01 -0000 1.1.1.1 +++ setup-res.c 9 Apr 2002 16:45:52 -0000 1.2 @@ -25,7 +25,7 @@ #include <linux/slab.h> -#define DEBUG_CONFIG 1 +#define DEBUG_CONFIG 0 #if DEBUG_CONFIG # define DBGC(args) printk args #else @@ -115,12 +115,13 @@ * window (it will just not perform as well). */ if (!(res->flags & IORESOURCE_PREFETCH) || pci_assign_bus_resource(bus, dev, res, size, min, 0, i) < 0) { - printk(KERN_ERR "PCI: Failed to allocate resource %d for %s\n", i, dev->name); + printk(KERN_ERR "PCI: Failed to allocate resource %d(%lx-%lx) for %s\n", + i, res->start, res->end, dev->slot_name); return -EBUSY; } } - DBGC((" got res[%lx:%lx] for resource %d of %s\n", res->start, + DBGC((KERN_ERR " got res[%lx:%lx] for resource %d of %s\n", res->start, res->end, i, dev->name)); return 0; @@ -163,6 +164,10 @@ size = ln->res->end - ln->res->start; if (r_size > size) { tmp = kmalloc(sizeof(*tmp), GFP_KERNEL); + if (!tmp) { + printk(KERN_ERR "pdev_sort_resources(): kmalloc() failed!\n"); + continue; + } tmp->next = ln; tmp->res = r; tmp->dev = dev; @@ -180,7 +185,7 @@ u16 cmd; int i; - DBGC(("PCI enable device: (%s)\n", dev->name)); + DBGC((KERN_ERR "PCI enable device: (%s)\n", dev->name)); pci_read_config_word(dev, PCI_COMMAND, &cmd); @@ -225,5 +230,5 @@ /* Enable the appropriate bits in the PCI command register. */ pci_write_config_word(dev, PCI_COMMAND, cmd); - DBGC((" cmd reg 0x%x\n", cmd)); + DBGC((KERN_ERR " cmd reg 0x%x\n", cmd)); } |
From: Andy P. <at...@us...> - 2002-04-09 17:08:09
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/s390x/boot In directory usw-pr-cvs1:/tmp/cvs-serv13825/s390x/boot Modified Files: Makefile Log Message: synch 2.4.15 commit 29 Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/s390x/boot/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- Makefile 25 Feb 2001 23:15:23 -0000 1.1.1.1 +++ Makefile 9 Apr 2002 17:03:17 -0000 1.2 @@ -25,7 +25,7 @@ image: $(CONFIGURE) $(TOPDIR)/vmlinux \ iplfba.boot ipleckd.boot ipldump.boot $(OBJCOPY) -O binary $(TOPDIR)/vmlinux image - $(NM) $(TOPDIR)/vmlinux | grep -v '\(compiled\)\|\( [aU] \)\|\(\.\)\|\(LASH[RL]DI\)' | sort > $(TOPDIR)/System.map + $(NM) $(TOPDIR)/vmlinux | grep -v '\(compiled\)\|\( [aUw] \)\|\(\.\)\|\(LASH[RL]DI\)' | sort > $(TOPDIR)/System.map listing: ../../../vmlinux $(OBJDUMP) --disassemble --disassemble-all --disassemble-zeroes --reloc $(TOPDIR)/vmlinux > listing |
From: Andy P. <at...@us...> - 2002-04-09 17:08:08
|
Update of /cvsroot/linux-vax/kernel-2.4/Documentation/mips/pci In directory usw-pr-cvs1:/tmp/cvs-serv6779/mips/pci Log Message: Directory /cvsroot/linux-vax/kernel-2.4/Documentation/mips/pci added to the repository |
From: Andy P. <at...@us...> - 2002-04-09 17:08:07
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/s390/tools/dasdfmt In directory usw-pr-cvs1:/tmp/cvs-serv13825/s390/tools/dasdfmt Removed Files: Makefile dasdfmt.8 dasdfmt.c Log Message: synch 2.4.15 commit 29 --- Makefile DELETED --- --- dasdfmt.8 DELETED --- --- dasdfmt.c DELETED --- |
From: Andy P. <at...@us...> - 2002-04-09 17:08:07
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/s390x In directory usw-pr-cvs1:/tmp/cvs-serv13825/s390x Modified Files: Makefile config.in defconfig vmlinux.lds Added Files: vmlinux-shared.lds Log Message: synch 2.4.15 commit 29 --- NEW FILE --- /* ld script to make s390 Linux kernel * Written by Martin Schwidefsky (sch...@de...) */ OUTPUT_FORMAT("elf64-s390", "elf64-s390", "elf64-s390") OUTPUT_ARCH(s390) ENTRY(_start) SECTIONS { . = 0x00000000; _text = .; /* Text and read-only data */ .text : { *(.text) *(.fixup) *(.gnu.warning) } = 0x0700 .text.lock : { *(.text.lock) } /* out-of-line lock text */ .rodata : { *(.rodata) } .kstrtab : { *(.kstrtab) } . = ALIGN(16); /* Exception table */ __start___ex_table = .; __ex_table : { *(__ex_table) } __stop___ex_table = .; __start___ksymtab = .; /* Kernel symbol table */ __ksymtab : { *(__ksymtab) } __stop___ksymtab = .; __start___kallsyms = .; /* All kernel symbols */ __kallsyms : { *(__kallsyms) } __stop___kallsyms = .; . = ALIGN(1048576); /* VM shared segments are 1MB aligned */ _etext = .; /* End of text section */ .data : { /* Data */ *(.data) CONSTRUCTORS } _edata = .; /* End of data section */ . = ALIGN(16384); /* init_task */ .data.init_task : { *(.data.init_task) } . = ALIGN(4096); /* Init code and data */ __init_begin = .; .text.init : { *(.text.init) } .data.init : { *(.data.init) } . = ALIGN(4096); __init_end = .; __setup_start = .; .setup.init : { *(.setup.init) } __setup_end = .; __initcall_start = .; .initcall.init : { *(.initcall.init) } __initcall_end = .; . = ALIGN(4096); __init_end = .; . = ALIGN(32); .data.cacheline_aligned : { *(.data.cacheline_aligned) } . = ALIGN(4096); .data.page_aligned : { *(.data.idt) } __bss_start = .; /* BSS */ .bss : { *(.bss) } _end = . ; /* Stabs debugging sections. */ .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } .stab.excl 0 : { *(.stab.excl) } .stab.exclstr 0 : { *(.stab.exclstr) } .stab.index 0 : { *(.stab.index) } .stab.indexstr 0 : { *(.stab.indexstr) } .comment 0 : { *(.comment) } } Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/s390x/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- Makefile 25 Feb 2001 23:15:23 -0000 1.1.1.1 +++ Makefile 9 Apr 2002 17:03:17 -0000 1.2 @@ -17,7 +17,11 @@ CPP=$(CC) -E OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S LDFLAGS=-e start +ifeq ($(CONFIG_SHARED_KERNEL),y) +LINKFLAGS =-T $(TOPDIR)/arch/s390x/vmlinux-shared.lds $(LDFLAGS) +else LINKFLAGS =-T $(TOPDIR)/arch/s390x/vmlinux.lds $(LDFLAGS) +endif MODFLAGS += -fpic CFLAGS_PIPE := -pipe @@ -28,8 +32,8 @@ SUBDIRS := $(SUBDIRS) arch/s390x/mm arch/s390x/kernel arch/s390x/lib \ drivers/s390 -CORE_FILES := arch/s390x/mm/mm.o arch/s390x/kernel/kernel.o $(CORE_FILES) \ - drivers/s390/io.o +CORE_FILES := arch/s390x/mm/mm.o arch/s390x/kernel/kernel.o $(CORE_FILES) +DRIVERS := $(DRIVERS) drivers/s390/io.o LIBS := $(TOPDIR)/arch/s390x/lib/lib.a $(LIBS) $(TOPDIR)/arch/s390x/lib/lib.a all: image listing @@ -47,16 +51,6 @@ $(MAKE) linuxsubdirs SUBDIRS=drivers/s390 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot - -MAKESILO = $(MAKE) -C arch/$(ARCH)/tools/silo - -MAKEDASDFMT = $(MAKE) -C arch/$(ARCH)/tools/dasdfmt - -silo: - @$(MAKE) -C arch/$(ARCH)/tools/silo - -dasdfmt: - @$(MAKE) -C arch/$(ARCH)/tools/dasdfmt image: vmlinux @$(MAKEBOOT) image Index: config.in =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/s390x/config.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- config.in 25 Feb 2001 23:15:23 -0000 1.1.1.1 +++ config.in 9 Apr 2002 17:03:17 -0000 1.2 @@ -6,6 +6,9 @@ define_bool CONFIG_ISA n define_bool CONFIG_EISA n define_bool CONFIG_MCA n +define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y +define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n +define_bool CONFIG_GENERIC_BUST_SPINLOCK n mainmenu_name "Linux Kernel Configuration" define_bool CONFIG_ARCH_S390 y @@ -47,12 +50,15 @@ bool 'System V IPC' CONFIG_SYSVIPC bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT bool 'Sysctl support' CONFIG_SYSCTL -define CONFIG_KCORE ELF +define_bool CONFIG_KCORE_ELF y tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'Show crashed user process info' CONFIG_PROCESS_DEBUG +bool 'Pseudo page fault support' CONFIG_PFAULT +bool 'VM shared kernel support' CONFIG_SHARED_KERNEL endmenu + source drivers/s390/Config.in if [ "$CONFIG_NET" = "y" ]; then @@ -68,6 +74,6 @@ if [ "$CONFIG_CTC" = "y" ]; then bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG fi -# this does not work. bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ endmenu Index: defconfig =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/s390x/defconfig,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- defconfig 25 Feb 2001 23:15:23 -0000 1.1.1.1 +++ defconfig 9 Apr 2002 17:03:17 -0000 1.2 @@ -1,9 +1,12 @@ # -# Automatically generated by make menuconfig: don't edit +# Automatically generated make config: don't edit # # CONFIG_ISA is not set # CONFIG_EISA is not set # CONFIG_MCA is not set +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set +CONFIG_GENERIC_BUST_SPINLOCK=n CONFIG_ARCH_S390=y CONFIG_ARCH_S390X=y @@ -37,9 +40,12 @@ CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +CONFIG_KCORE_ELF=y CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set # CONFIG_PROCESS_DEBUG is not set +CONFIG_PFAULT=y +# CONFIG_SHARED_KERNEL is not set # # Block device drivers @@ -50,6 +56,10 @@ CONFIG_BLK_DEV_RAM_SIZE=24576 CONFIG_BLK_DEV_INITRD=y CONFIG_BLK_DEV_XPRAM=m + +# +# S/390 block device drivers +# CONFIG_DASD=y CONFIG_DASD_ECKD=y CONFIG_DASD_FBA=y @@ -63,21 +73,36 @@ CONFIG_MD_RAID0=m CONFIG_MD_RAID1=m CONFIG_MD_RAID5=m +# CONFIG_MD_MULTIPATH is not set CONFIG_BLK_DEV_LVM=m -CONFIG_LVM_PROC_FS=y # # Character device drivers # CONFIG_UNIX98_PTYS=y CONFIG_UNIX98_PTY_COUNT=256 -CONFIG_3215=y -CONFIG_3215_CONSOLE=y + +# +# S/390 character device drivers +# +CONFIG_TN3270=y +CONFIG_TN3270_CONSOLE=y +CONFIG_TN3215=y +CONFIG_TN3215_CONSOLE=y CONFIG_HWC=y CONFIG_HWC_CONSOLE=y +CONFIG_HWC_CPI=m CONFIG_S390_TAPE=m + +# +# S/390 tape interface support +# CONFIG_S390_TAPE_CHAR=y CONFIG_S390_TAPE_BLOCK=y + +# +# S/390 tape hardware support +# CONFIG_S390_TAPE_3490=y CONFIG_S390_TAPE_3480=y @@ -86,10 +111,18 @@ # CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set CONFIG_NET_ETHERNET=y CONFIG_TR=y # CONFIG_FDDI is not set -# CONFIG_CHANDEV is not set + +# +# S/390 network device drivers +# +CONFIG_CHANDEV=y +CONFIG_HOTPLUG=y CONFIG_CTC=m CONFIG_IUCV=m @@ -110,11 +143,17 @@ # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set +# CONFIG_IP_MROUTE is not set # CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set -# CONFIG_IPV6 is not set +CONFIG_IPV6=m +# CONFIG_IPV6_NETLINK is not set # CONFIG_KHTTPD is not set # CONFIG_ATM is not set + +# +# +# # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_DECNET is not set @@ -139,28 +178,38 @@ # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_REISERFS_CHECK is not set # CONFIG_ADFS_FS is not set # CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set # CONFIG_BFS_FS is not set +# CONFIG_CMS_FS is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_JBD_DEBUG is not set # CONFIG_FAT_FS is not set # CONFIG_MSDOS_FS is not set # CONFIG_UMSDOS_FS is not set # CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set # CONFIG_JFFS_FS is not set +# CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set +# CONFIG_TMPFS is not set # CONFIG_RAMFS is not set # CONFIG_ISO9660_FS is not set # CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set # CONFIG_MINIX_FS is not set +# CONFIG_FREEVXFS_FS is not set # CONFIG_NTFS_FS is not set # CONFIG_NTFS_RW is not set # CONFIG_HPFS_FS is not set CONFIG_PROC_FS=y -# CONFIG_DEVFS_FS is not set -# CONFIG_DEVFS_MOUNT is not set +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y # CONFIG_DEVFS_DEBUG is not set # CONFIG_DEVPTS_FS is not set # CONFIG_QNX4FS_FS is not set @@ -168,7 +217,6 @@ # CONFIG_ROMFS_FS is not set CONFIG_EXT2_FS=y # CONFIG_SYSV_FS is not set -# CONFIG_SYSV_FS_WRITE is not set # CONFIG_UDF_FS is not set # CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set @@ -178,6 +226,7 @@ # Network File Systems # # CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set # CONFIG_ROOT_NFS is not set @@ -193,10 +242,10 @@ # CONFIG_NCPFS_NFS_NS is not set # CONFIG_NCPFS_OS2_NS is not set # CONFIG_NCPFS_SMALLDOS is not set -# CONFIG_NCPFS_MOUNT_SUBDIR is not set -# CONFIG_NCPFS_NDS_DOMAINS is not set # CONFIG_NCPFS_NLS is not set # CONFIG_NCPFS_EXTRAS is not set +# CONFIG_ZISOFS_FS is not set +# CONFIG_ZLIB_FS_INFLATE is not set # # Partition Types @@ -209,11 +258,14 @@ CONFIG_IBM_PARTITION=y # CONFIG_MAC_PARTITION is not set # CONFIG_MSDOS_PARTITION is not set +# CONFIG_LDM_PARTITION is not set # CONFIG_SGI_PARTITION is not set # CONFIG_ULTRIX_PARTITION is not set # CONFIG_SUN_PARTITION is not set +# CONFIG_SMB_NLS is not set # CONFIG_NLS is not set # # Kernel hacking # +CONFIG_MAGIC_SYSRQ=y Index: vmlinux.lds =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/s390x/vmlinux.lds,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- vmlinux.lds 25 Feb 2001 23:15:23 -0000 1.1.1.1 +++ vmlinux.lds 9 Apr 2002 17:03:17 -0000 1.2 @@ -14,7 +14,7 @@ *(.gnu.warning) } = 0x0700 .text.lock : { *(.text.lock) } /* out-of-line lock text */ - .rodata : { *(.rodata) } + .rodata : { *(.rodata) *(.rodata.*) } .kstrtab : { *(.kstrtab) } . = ALIGN(16); /* Exception table */ @@ -25,6 +25,10 @@ __start___ksymtab = .; /* Kernel symbol table */ __ksymtab : { *(__ksymtab) } __stop___ksymtab = .; + + __start___kallsyms = .; /* All kernel symbols */ + __kallsyms : { *(__kallsyms) } + __stop___kallsyms = .; _etext = .; /* End of text section */ |
From: Andy P. <at...@us...> - 2002-04-09 17:08:07
|
Update of /cvsroot/linux-vax/kernel-2.4/Documentation/i386 In directory usw-pr-cvs1:/tmp/cvs-serv7449/i386 Modified Files: boot.txt Log Message: synch 2.4.15 commit 28 Index: boot.txt =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/i386/boot.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- boot.txt 14 Jan 2001 20:05:28 -0000 1.1.1.1 +++ boot.txt 9 Apr 2002 16:55:41 -0000 1.2 @@ -2,7 +2,7 @@ ---------------------------- H. Peter Anvin <hp...@zy...> - Last update 2000-07-27 + Last update 2000-10-29 On the i386 platform, the Linux kernel uses a rather complicated boot convention. This has evolved partially due to historical aspects, as @@ -145,10 +145,20 @@ most of the fields in the header. The following fields should be filled out, however: + vid_mode: + Please see the section on SPECIAL COMMAND LINE OPTIONS. + type_of_loader: - If your boot loader has an identifier assigned in - arch/i386/boot/setup.S, enter that value. Otherwise, enter - 0xFF here. + If your boot loader has an assigned id (see table below), enter + 0xTV here, where T is an identifier for the boot loader and V is + a version number. Otherwise, enter 0xFF here. + + Assigned boot loader ids: + 0 LILO + 1 Loadlin + 2 bootsect-loader + 3 SYSLINUX + 4 EtherBoot loadflags, heap_end_ptr: If the protocol version is 2.01 or higher, enter the @@ -312,8 +322,8 @@ mem=<size> <size> is an integer in C notation optionally followed by K, M - or G (meaning << 10, << 20 or << 30). This specifies to the - kernel the memory size. This affects the possible placement + or G (meaning << 10, << 20 or << 30). This specifies the end + of memory to the kernel. This affects the possible placement of an initrd, since an initrd should be placed near end of memory. Note that this is an option to *both* the kernel and the bootloader! @@ -385,8 +395,8 @@ appropriate time. The use of these hooks should probably be considered an absolutely last resort! -IMPORTANT: All the hooks are required to preserve %ebp, %esi and %edi -across invocation. +IMPORTANT: All the hooks are required to preserve %esp, %ebp, %esi and +%edi across invocation. realmode_swtch: A 16-bit real mode far subroutine invoked immediately before |
From: Andy P. <at...@us...> - 2002-04-09 17:08:06
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/s390/lib In directory usw-pr-cvs1:/tmp/cvs-serv13825/s390/lib Modified Files: Makefile checksum.c Added Files: misaligned.c Log Message: synch 2.4.15 commit 29 --- NEW FILE --- /* * arch/s390/lib/misaligned.c * S390 misalignment panic stubs * * S390 version * Copyright (C) 2001 IBM Deutschland Entwicklung GmbH, IBM Corporation * Author(s): Martin Schwidefsky (sch...@de...). * * xchg wants to panic if the pointer is not aligned. To avoid multiplying * the panic message over and over again, the panic is done in the helper * functions __misaligned_u32 and __misaligned_u16. */ #include <linux/module.h> #include <linux/kernel.h> void __misaligned_u16(void) { panic("misaligned (__u16 *) in __xchg\n"); } void __misaligned_u32(void) { panic("misaligned (__u32 *) in __xchg\n"); } EXPORT_SYMBOL(__misaligned_u16); EXPORT_SYMBOL(__misaligned_u32); Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/s390/lib/Makefile,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- Makefile 25 Feb 2001 23:15:22 -0000 1.1.1.2 +++ Makefile 9 Apr 2002 17:03:17 -0000 1.2 @@ -12,7 +12,8 @@ L_TARGET = lib.a -obj-y = checksum.o delay.o memset.o strcmp.o strncpy.o uaccess.o +obj-y = checksum.o delay.o memset.o misaligned.o strcmp.o strncpy.o uaccess.o +export-objs += misaligned.o include $(TOPDIR)/Rules.make Index: checksum.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/s390/lib/checksum.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- checksum.c 14 Jan 2001 19:55:44 -0000 1.1.1.1 +++ checksum.c 9 Apr 2002 17:03:17 -0000 1.2 @@ -23,18 +23,17 @@ unsigned int csum_partial (const unsigned char *buff, int len, unsigned int sum) { + register_pair rp; /* * Experiments with ethernet and slip connections show that buff * is aligned on either a 2-byte or 4-byte boundary. */ + rp.subreg.even = (unsigned long) buff; + rp.subreg.odd = (unsigned long) len; __asm__ __volatile__ ( - " lr 2,%1\n" /* address in gpr 2 */ - " lr 3,%2\n" /* length in gpr 3 */ - "0: cksm %0,2\n" /* do checksum on longs */ + "0: cksm %0,%1\n" /* do checksum on longs */ " jo 0b\n" - : "+&d" (sum) - : "d" (buff), "d" (len) - : "cc", "2", "3" ); + : "+&d" (sum), "+&a" (rp) : : "cc" ); return sum; } @@ -43,14 +42,16 @@ */ unsigned short csum_fold(unsigned int sum) { - __asm__ __volatile__ ( - " sr 3,3\n" /* %0 = H*65536 + L */ - " lr 2,%0\n" /* %0 = H L, R2/R3 = H L / 0 0 */ - " srdl 2,16\n" /* %0 = H L, R2/R3 = 0 H / L 0 */ - " alr 2,3\n" /* %0 = H L, R2/R3 = L H / L 0 */ - " alr %0,2\n" /* %0 = H+L+C L+H */ - " srl %0,16\n" /* %0 = H+L+C */ - : "+d" (sum) : : "cc", "2", "3"); - return ((unsigned short) ~sum); + register_pair rp; + + __asm__ __volatile__ ( + " slr %N1,%N1\n" /* %0 = H L */ + " lr %1,%0\n" /* %0 = H L, %1 = H L 0 0 */ + " srdl %1,16\n" /* %0 = H L, %1 = 0 H L 0 */ + " alr %1,%N1\n" /* %0 = H L, %1 = L H L 0 */ + " alr %0,%1\n" /* %0 = H+L+C L+H */ + " srl %0,16\n" /* %0 = H+L+C */ + : "+&d" (sum), "=d" (rp) : : "cc" ); + return ((unsigned short) ~sum); } |
From: Andy P. <at...@us...> - 2002-04-09 17:08:06
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/s390/mm In directory usw-pr-cvs1:/tmp/cvs-serv13825/s390/mm Modified Files: Makefile extable.c fault.c init.c ioremap.c Log Message: synch 2.4.15 commit 29 Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/s390/mm/Makefile,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- Makefile 25 Feb 2001 23:15:22 -0000 1.1.1.2 +++ Makefile 9 Apr 2002 17:03:17 -0000 1.2 @@ -1,5 +1,5 @@ # -# Makefile for the linux i386-specific parts of the memory manager. +# Makefile for the linux s390-specific parts of the memory manager. # # Note! Dependencies are done automagically by 'make dep', which also # removes any old dependencies. DON'T put your own dependencies here Index: extable.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/s390/mm/extable.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- extable.c 14 Jan 2001 19:55:45 -0000 1.1.1.1 +++ extable.c 9 Apr 2002 17:03:17 -0000 1.2 @@ -10,6 +10,7 @@ #include <linux/config.h> #include <linux/module.h> +#include <linux/spinlock.h> #include <asm/uaccess.h> extern const struct exception_table_entry __start___ex_table[]; @@ -36,28 +37,37 @@ return 0; } +extern spinlock_t modlist_lock; + unsigned long search_exception_table(unsigned long addr) { - unsigned long ret; + unsigned long ret = 0; + unsigned long flags; #ifndef CONFIG_MODULES addr &= 0x7fffffff; /* remove amode bit from address */ /* There is only the kernel to search. */ ret = search_one_table(__start___ex_table, __stop___ex_table-1, addr); - if (ret) return FIX_PSW(ret); + if (ret) ret = FIX_PSW(ret); + return ret; #else /* The kernel is the last "module" -- no need to treat it special. */ struct module *mp; addr &= 0x7fffffff; /* remove amode bit from address */ + + spin_lock_irqsave(&modlist_lock, flags); for (mp = module_list; mp != NULL; mp = mp->next) { - if (mp->ex_table_start == NULL) + if (mp->ex_table_start == NULL || !(mp->flags&(MOD_RUNNING|MOD_INITIALIZING))) continue; ret = search_one_table(mp->ex_table_start, mp->ex_table_end - 1, addr); - if (ret) return FIX_PSW(ret); + if (ret) { + ret = FIX_PSW(ret); + break; + } } + spin_unlock_irqrestore(&modlist_lock, flags); + return ret; #endif - - return 0; } Index: fault.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/s390/mm/fault.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- fault.c 25 Feb 2001 23:15:22 -0000 1.1.1.2 +++ fault.c 9 Apr 2002 17:03:17 -0000 1.2 @@ -4,6 +4,7 @@ * S390 version * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation * Author(s): Hartmut Penner (hp...@de...) + * Ulrich Weigand (uwe...@de...) * * Derived from "arch/i386/mm/fault.c" * Copyright (C) 1995 Linus Torvalds @@ -21,6 +22,9 @@ #include <linux/mm.h> #include <linux/smp.h> #include <linux/smp_lock.h> +#include <linux/compatmac.h> +#include <linux/init.h> +#include <linux/console.h> #include <asm/system.h> #include <asm/uaccess.h> @@ -32,6 +36,34 @@ #endif extern void die(const char *,struct pt_regs *,long); +static void force_sigsegv(struct task_struct *tsk, int code, void *address); + +extern spinlock_t timerlist_lock; + +/* + * Unlock any spinlocks which will prevent us from getting the + * message out (timerlist_lock is acquired through the + * console unblank code) + */ +void bust_spinlocks(int yes) +{ + spin_lock_init(&timerlist_lock); + if (yes) { + oops_in_progress = 1; + } else { + int loglevel_save = console_loglevel; + oops_in_progress = 0; + console_unblank(); + /* + * OK, the message is on the console. Now we call printk() + * without oops_in_progress set so that printk will give klogd + * a poke. Hold onto your hats... + */ + console_loglevel = 15; + printk(" "); + console_loglevel = loglevel_save; + } +} /* * This routine handles page faults. It determines the address, @@ -51,18 +83,31 @@ unsigned long address; unsigned long fixup; int write; - unsigned long psw_mask; - unsigned long psw_addr; int si_code = SEGV_MAPERR; int kernel_address = 0; - /* - * get psw mask of Program old psw to find out, - * if user or kernel mode - */ + tsk = current; + mm = tsk->mm; + + /* + * Check for low-address protection. This needs to be treated + * as a special case because the translation exception code + * field is not guaranteed to contain valid data in this case. + */ + if ((error_code & 0xff) == 4 && !(S390_lowcore.trans_exc_code & 4)) { + + /* Low-address protection hit in kernel mode means + NULL pointer write access in kernel mode. */ + if (!(regs->psw.mask & PSW_PROBLEM_STATE)) { + address = 0; + kernel_address = 1; + goto no_context; + } - psw_mask = S390_lowcore.program_old_psw.mask; - psw_addr = S390_lowcore.program_old_psw.addr; + /* Low-address protection hit in user mode 'cannot happen'. */ + die ("Low-address protection", regs, error_code); + do_exit(SIGKILL); + } /* * get the failing address @@ -72,12 +117,6 @@ address = S390_lowcore.trans_exc_code&0x7ffff000; - tsk = current; - mm = tsk->mm; - - if (in_interrupt() || !mm) - goto no_context; - /* * Check which address space the address belongs to @@ -108,6 +147,7 @@ } } die("page fault via unknown access register", regs, error_code); + do_exit(SIGKILL); break; case 2: /* Secondary Segment Table Descriptor */ @@ -116,13 +156,21 @@ break; } + /* + * Check whether we have a user MM in the first place. + */ + if (in_interrupt() || !mm || !(regs->psw.mask & _PSW_IO_MASK_BIT)) + goto no_context; /* * When we get here, the fault happened in the current - * task's user address space, so we search the VMAs + * task's user address space, so we can switch on the + * interrupts again and then search the VMAs */ - down(&mm->mmap_sem); + __sti(); + + down_read(&mm->mmap_sem); vma = find_vma(mm, address); if (!vma) @@ -155,6 +203,7 @@ goto bad_area; } + survive: /* * If for any reason at all we couldn't handle the fault, * make sure we exit gracefully rather than endlessly redo @@ -173,7 +222,7 @@ goto out_of_memory; } - up(&mm->mmap_sem); + up_read(&mm->mmap_sem); return; /* @@ -181,11 +230,10 @@ * Fix it, but check if it's kernel or user first.. */ bad_area: - up(&mm->mmap_sem); + up_read(&mm->mmap_sem); /* User mode accesses just cause a SIGSEGV */ - if (psw_mask & PSW_PROBLEM_STATE) { - struct siginfo si; + if (regs->psw.mask & PSW_PROBLEM_STATE) { tsk->thread.prot_addr = address; tsk->thread.trap_no = error_code; #ifndef CONFIG_SYSCTL @@ -202,10 +250,8 @@ show_regs(regs); } #endif - si.si_signo = SIGSEGV; - si.si_code = si_code; - si.si_addr = (void*) address; - force_sig_info(SIGSEGV, &si, tsk); + + force_sigsegv(tsk, si_code, (void *)address); return; } @@ -227,9 +273,6 @@ else printk(KERN_ALERT "Unable to handle kernel paging request" " at virtual user address %08lx\n", address); -/* - * need to define, which information is useful here - */ die("Oops", regs, error_code); do_exit(SIGKILL); @@ -240,14 +283,20 @@ * us unable to handle the page fault gracefully. */ out_of_memory: - up(&mm->mmap_sem); + up_read(&mm->mmap_sem); + if (tsk->pid == 1) { + tsk->policy |= SCHED_YIELD; + schedule(); + down_read(&mm->mmap_sem); + goto survive; + } printk("VM: killing process %s\n", tsk->comm); - if (psw_mask & PSW_PROBLEM_STATE) + if (regs->psw.mask & PSW_PROBLEM_STATE) do_exit(SIGKILL); goto no_context; do_sigbus: - up(&mm->mmap_sem); + up_read(&mm->mmap_sem); /* * Send a sigbus, regardless of whether we were in kernel @@ -258,8 +307,265 @@ force_sig(SIGBUS, tsk); /* Kernel mode? Handle exceptions or die */ - if (!(psw_mask & PSW_PROBLEM_STATE)) + if (!(regs->psw.mask & PSW_PROBLEM_STATE)) goto no_context; } +/* + * Send SIGSEGV to task. This is an external routine + * to keep the stack usage of do_page_fault small. + */ +static void force_sigsegv(struct task_struct *tsk, int code, void *address) +{ + struct siginfo si; + si.si_signo = SIGSEGV; + si.si_code = code; + si.si_addr = address; + force_sig_info(SIGSEGV, &si, tsk); +} + +typedef struct _pseudo_wait_t { + struct _pseudo_wait_t *next; + wait_queue_head_t queue; + unsigned long address; + int resolved; +} pseudo_wait_t; + +static pseudo_wait_t *pseudo_lock_queue = NULL; +static spinlock_t pseudo_wait_spinlock; /* spinlock to protect lock queue */ + +/* + * This routine handles 'pagex' pseudo page faults. + */ +asmlinkage void +do_pseudo_page_fault(struct pt_regs *regs, unsigned long error_code) +{ + pseudo_wait_t wait_struct; + pseudo_wait_t *ptr, *last, *next; + unsigned long address; + int kernel_address; + + /* + * get the failing address + * more specific the segment and page table portion of + * the address + */ + address = S390_lowcore.trans_exc_code & 0xfffff000; + + if (address & 0x80000000) { + /* high bit set -> a page has been swapped in by VM */ + address &= 0x7fffffff; + spin_lock(&pseudo_wait_spinlock); + last = NULL; + ptr = pseudo_lock_queue; + while (ptr != NULL) { + next = ptr->next; + if (address == ptr->address) { + /* + * This is one of the processes waiting + * for the page. Unchain from the queue. + * There can be more than one process + * waiting for the same page. VM presents + * an initial and a completion interrupt for + * every process that tries to access a + * page swapped out by VM. + */ + if (last == NULL) + pseudo_lock_queue = next; + else + last->next = next; + /* now wake up the process */ + ptr->resolved = 1; + wake_up(&ptr->queue); + } else + last = ptr; + ptr = next; + } + spin_unlock(&pseudo_wait_spinlock); + } else { + /* Pseudo page faults in kernel mode is a bad idea */ + if (!(regs->psw.mask & PSW_PROBLEM_STATE)) { + /* + * VM presents pseudo page faults if the interrupted + * state was not disabled for interrupts. So we can + * get pseudo page fault interrupts while running + * in kernel mode. We simply access the page here + * while we are running disabled. VM will then swap + * in the page synchronously. + */ + kernel_address = 0; + switch (S390_lowcore.trans_exc_code & 3) { + case 0: /* Primary Segment Table Descriptor */ + kernel_address = 1; + break; + case 1: /* STD determined via access register */ + if (S390_lowcore.exc_access_id == 0 || + regs->acrs[S390_lowcore.exc_access_id]==0) + kernel_address = 1; + break; + case 2: /* Secondary Segment Table Descriptor */ + case 3: /* Home Segment Table Descriptor */ + break; + } + if (kernel_address) + /* dereference a virtual kernel address */ + __asm__ __volatile__ ( + " ic 0,0(%0)" + : : "a" (address) : "0"); + else + /* dereference a virtual user address */ + __asm__ __volatile__ ( + " la 2,0(%0)\n" + " sacf 512\n" + " ic 2,0(2)\n" + "0:sacf 0\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 0b,0b\n" + ".previous" + : : "a" (address) : "2" ); + + return; + } + /* initialize and add element to pseudo_lock_queue */ + init_waitqueue_head (&wait_struct.queue); + wait_struct.address = address; + wait_struct.resolved = 0; + spin_lock(&pseudo_wait_spinlock); + wait_struct.next = pseudo_lock_queue; + pseudo_lock_queue = &wait_struct; + spin_unlock(&pseudo_wait_spinlock); + /* go to sleep */ + wait_event(wait_struct.queue, wait_struct.resolved); + } +} + +#ifdef CONFIG_PFAULT +/* + * 'pfault' pseudo page faults routines. + */ +static int pfault_disable = 0; + +static int __init nopfault(char *str) +{ + pfault_disable = 1; + return 1; +} + +__setup("nopfault", nopfault); + +typedef struct { + __u16 refdiagc; + __u16 reffcode; + __u16 refdwlen; + __u16 refversn; + __u64 refgaddr; + __u64 refselmk; + __u64 refcmpmk; + __u64 reserved; +} __attribute__ ((packed)) pfault_refbk_t; + +int pfault_init(void) +{ + pfault_refbk_t refbk = + { 0x258, 0, 5, 2, __LC_KERNEL_STACK, 1ULL << 48, 1ULL << 48, 0ULL }; + int rc; + + if (pfault_disable) + return -1; + __asm__ __volatile__( + " diag %1,%0,0x258\n" + "0: j 2f\n" + "1: la %0,8\n" + "2:\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 0b,1b\n" + ".previous" + : "=d" (rc) : "a" (&refbk) : "cc" ); + __ctl_set_bit(0, 9); + return rc; +} + +void pfault_fini(void) +{ + pfault_refbk_t refbk = + { 0x258, 1, 5, 2, 0ULL, 0ULL, 0ULL, 0ULL }; + + if (pfault_disable) + return; + __ctl_clear_bit(0,9); + __asm__ __volatile__( + " diag %0,0,0x258\n" + "0:\n" + ".section __ex_table,\"a\"\n" + " .align 4\n" + " .long 0b,0b\n" + ".previous" + : : "a" (&refbk) : "cc" ); +} + +asmlinkage void +pfault_interrupt(struct pt_regs *regs, __u16 error_code) +{ + struct task_struct *tsk; + wait_queue_head_t queue; + wait_queue_head_t *qp; + __u16 subcode; + + /* + * Get the external interruption subcode & pfault + * initial/completion signal bit. VM stores this + * in the 'cpu address' field associated with the + * external interrupt. + */ + subcode = S390_lowcore.cpu_addr; + if ((subcode & 0xff00) != 0x0200) + return; + + /* + * Get the token (= address of kernel stack of affected task). + */ + tsk = (struct task_struct *) + (*((unsigned long *) __LC_PFAULT_INTPARM) - THREAD_SIZE); + + /* + * We got all needed information from the lowcore and can + * now safely switch on interrupts. + */ + if (regs->psw.mask & PSW_PROBLEM_STATE) + __sti(); + + if (subcode & 0x0080) { + /* signal bit is set -> a page has been swapped in by VM */ + qp = (wait_queue_head_t *) + xchg(&tsk->thread.pfault_wait, -1); + if (qp != NULL) { + /* Initial interrupt was faster than the completion + * interrupt. pfault_wait is valid. Set pfault_wait + * back to zero and wake up the process. This can + * safely be done because the task is still sleeping + * and can't procude new pfaults. */ + tsk->thread.pfault_wait = 0ULL; + wake_up(qp); + } + } else { + /* signal bit not set -> a real page is missing. */ + init_waitqueue_head (&queue); + qp = (wait_queue_head_t *) + xchg(&tsk->thread.pfault_wait, (addr_t) &queue); + if (qp != NULL) { + /* Completion interrupt was faster than the initial + * interrupt (swapped in a -1 for pfault_wait). Set + * pfault_wait back to zero and exit. This can be + * done safely because tsk is running in kernel + * mode and can't produce new pfaults. */ + tsk->thread.pfault_wait = 0ULL; + } + + /* go to sleep */ + wait_event(queue, tsk->thread.pfault_wait == 0ULL); + } +} +#endif Index: init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/s390/mm/init.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- init.c 25 Feb 2001 23:15:22 -0000 1.1.1.2 +++ init.c 9 Apr 2002 17:03:17 -0000 1.2 @@ -35,113 +35,32 @@ #include <asm/pgalloc.h> #include <asm/dma.h> #include <asm/lowcore.h> +#include <asm/tlb.h> -static unsigned long totalram_pages; +mmu_gather_t mmu_gathers[NR_CPUS]; -/* - * BAD_PAGE is the page that is used for page faults when linux - * is out-of-memory. Older versions of linux just did a - * do_exit(), but using this instead means there is less risk - * for a process dying in kernel mode, possibly leaving an inode - * unused etc.. - * - * BAD_PAGETABLE is the accompanying page-table: it is initialized - * to point to BAD_PAGE entries. - * - * ZERO_PAGE is a special page that is used for zero-initialized - * data and COW. - */ +static unsigned long totalram_pages; pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE))); -char empty_bad_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); char empty_zero_page[PAGE_SIZE] __attribute__((__aligned__(PAGE_SIZE))); -pte_t empty_bad_pte_table[PTRS_PER_PTE] __attribute__((__aligned__(PAGE_SIZE))); - -static int test_access(unsigned long loc) -{ - static const int ssm_mask = 0x07000000L; - int rc, i; - - rc = 0; - for (i=0; i<4; i++) { - __asm__ __volatile__( - " slr %0,%0\n" - " ssm %1\n" - " tprot 0(%2),0\n" - "0: jne 1f\n" - " lhi %0,1\n" - "1: ssm %3\n" - ".section __ex_table,\"a\"\n" - " .align 4\n" - " .long 0b,1b\n" - ".previous" - : "+&d" (rc) : "i" (0), "a" (loc), "m" (ssm_mask) - : "cc"); - if (rc == 0) - break; - loc += 0x100000; - } - return rc; -} - -static pte_t * get_bad_pte_table(void) -{ - pte_t v; - int i; - - v = pte_mkdirty(mk_pte_phys(__pa(empty_bad_page), PAGE_SHARED)); - - for (i = 0; i < PAGE_SIZE/sizeof(pte_t); i++) - empty_bad_pte_table[i] = v; - - return empty_bad_pte_table; -} - -static inline void invalidate_page(pte_t *pte) -{ - int i; - for (i=0;i<PTRS_PER_PTE;i++) - pte_clear(pte++); -} - -pte_t *get_pte_slow(pmd_t *pmd, unsigned long offset) -{ - unsigned long pte; - - pte = (unsigned long) __get_free_page(GFP_KERNEL); - if (pmd_none(*pmd)) { - if (pte) { - invalidate_page((pte_t*) pte); - pmd_val(pmd[0]) = _PAGE_TABLE + __pa(pte); - pmd_val(pmd[1]) = _PAGE_TABLE + __pa(pte)+1024; - pmd_val(pmd[2]) = _PAGE_TABLE + __pa(pte)+2048; - pmd_val(pmd[3]) = _PAGE_TABLE + __pa(pte)+3072; - return (pte_t *) pte + offset; - } - pte = (unsigned long) get_bad_pte_table(); - pmd_val(pmd[0]) = _PAGE_TABLE + __pa(pte); - pmd_val(pmd[1]) = _PAGE_TABLE + __pa(pte)+1024; - pmd_val(pmd[2]) = _PAGE_TABLE + __pa(pte)+2048; - pmd_val(pmd[3]) = _PAGE_TABLE + __pa(pte)+3072; - return NULL; - } - free_page(pte); - if (pmd_bad(*pmd)) - BUG(); - return (pte_t *) pmd_page(*pmd) + offset; -} int do_check_pgt_cache(int low, int high) { int freed = 0; if(pgtable_cache_size > high) { do { - if(pgd_quicklist) - free_pgd_slow(get_pgd_fast()), freed += 2; - if(pmd_quicklist) - free_pmd_slow(get_pmd_fast()), freed++; - if(pte_quicklist) - free_pte_slow(get_pte_fast()), freed++; + if(pgd_quicklist) { + free_pgd_slow(get_pgd_fast()); + freed += 2; + } + if(pmd_quicklist) { + pmd_free_slow(pmd_alloc_one_fast(NULL, 0)); + freed++; + } + if(pte_quicklist) { + pte_free_slow(pte_alloc_one_fast(NULL, 0)); + freed++; + } } while(pgtable_cache_size > low); } return freed; @@ -260,7 +179,6 @@ void __init mem_init(void) { int codesize, reservedpages, datasize, initsize; - int tmp; max_mapnr = num_physpages = max_low_pfn; high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); @@ -271,24 +189,7 @@ /* this will put all low memory onto the freelists */ totalram_pages += free_all_bootmem(); - /* mark usable pages in the mem_map[] and count reserved pages */ reservedpages = 0; - tmp = 0; - do { - if (tmp && (tmp & 0x3ff) == 0 && - test_access(tmp * PAGE_SIZE) == 0) { - printk("4M Segment %lX not available\n",tmp*PAGE_SIZE); - do { - set_bit(PG_reserved, &mem_map[tmp].flags); - reservedpages++; - tmp++; - } while (tmp < max_low_pfn && (tmp & 0x3ff)); - } else { - if (PageReserved(mem_map+tmp)) - reservedpages++; - tmp++; - } - } while (tmp < max_low_pfn); codesize = (unsigned long) &_etext - (unsigned long) &_text; datasize = (unsigned long) &_edata - (unsigned long) &_etext; Index: ioremap.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/s390/mm/ioremap.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- ioremap.c 25 Feb 2001 23:15:22 -0000 1.1.1.2 +++ ioremap.c 9 Apr 2002 17:03:17 -0000 1.2 @@ -54,7 +54,7 @@ if (address >= end) BUG(); do { - pte_t * pte = pte_alloc_kernel(pmd, address); + pte_t * pte = pte_alloc(&init_mm, pmd, address); if (!pte) return -ENOMEM; remap_area_pte(pte, address, end - address, address + phys_addr, flags); @@ -67,6 +67,7 @@ static int remap_area_pages(unsigned long address, unsigned long phys_addr, unsigned long size, unsigned long flags) { + int error; pgd_t * dir; unsigned long end = address + size; @@ -75,17 +76,21 @@ flush_cache_all(); if (address >= end) BUG(); + spin_lock(&init_mm.page_table_lock); do { - pmd_t *pmd = pmd_alloc_kernel(dir, address); + pmd_t *pmd; + pmd = pmd_alloc(&init_mm, dir, address); + error = -ENOMEM; if (!pmd) - return -ENOMEM; + break; if (remap_area_pmd(pmd, address, end - address, phys_addr + address, flags)) - return -ENOMEM; - set_pgdir(address, *dir); + break; + error = 0; address = (address + PGDIR_SIZE) & PGDIR_MASK; dir++; } while (address && (address < end)); + spin_unlock(&init_mm.page_table_lock); flush_tlb_all(); return 0; } |
From: Andy P. <at...@us...> - 2002-04-09 17:08:04
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/s390/tools/silo In directory usw-pr-cvs1:/tmp/cvs-serv13825/s390/tools/silo Removed Files: Makefile cfg.c cfg.h silo.c silo.conf Log Message: synch 2.4.15 commit 29 --- Makefile DELETED --- --- cfg.c DELETED --- --- cfg.h DELETED --- --- silo.c DELETED --- --- silo.conf DELETED --- |
From: Andy P. <at...@us...> - 2002-04-09 17:07:28
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/sh In directory usw-pr-cvs1:/tmp/cvs-serv15874/sh Modified Files: Makefile config.in defconfig vmlinux.lds.S Log Message: synch 2.4.15 commit 30 Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sh/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- Makefile 14 Jan 2001 19:48:19 -0000 1.1.1.1 +++ Makefile 9 Apr 2002 17:07:20 -0000 1.2 @@ -12,11 +12,6 @@ # this architecture # -# -# Select the object file format to substitute into the linker script. -# -tool_prefix = sh-linux-gnu- - ifdef CONFIG_CPU_LITTLE_ENDIAN CFLAGS += -ml AFLAGS += -ml @@ -29,10 +24,6 @@ LDFLAGS := -EB endif -# ifdef CONFIG_CROSSCOMPILE -CROSS_COMPILE = $(tool_prefix) -# endif - LD =$(CROSS_COMPILE)ld $(LDFLAGS) OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -R .stab -R .stabstr -S @@ -46,8 +37,8 @@ AFLAGS += -m3 endif ifdef CONFIG_CPU_SH4 -CFLAGS += -m4-nofpu -AFLAGS += -m4-nofpu +CFLAGS += -m4 -mno-implicit-fp +AFLAGS += -m4 -mno-implicit-fp endif # @@ -75,6 +66,11 @@ MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot +ifneq ($(CONFIG_SH_GENERIC)$(CONFIG_SH_STB1_HARP)$(CONFIG_SH_STB1_OVERDRIVE),) +SUBDIRS += arch/sh/stboards +CORE_FILES += arch/sh/stboards/stboards.o +endif + vmlinux: arch/sh/vmlinux.lds arch/sh/vmlinux.lds: arch/sh/vmlinux.lds.S FORCE @@ -93,6 +89,7 @@ archclean: @$(MAKEBOOT) clean $(MAKE) -C arch/$(ARCH)/kernel clean + $(MAKE) -C arch/$(ARCH)/stboards clean # $(MAKE) -C arch/$(ARCH)/tools clean archmrproper: Index: config.in =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sh/config.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- config.in 14 Jan 2001 19:48:20 -0000 1.1.1.1 +++ config.in 9 Apr 2002 17:07:20 -0000 1.2 @@ -7,6 +7,8 @@ define_bool CONFIG_SUPERH y define_bool CONFIG_UID16 y +define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y +define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n mainmenu_option next_comment comment 'Code maturity level options' @@ -27,7 +29,9 @@ choice 'SuperH system type' \ "Generic CONFIG_SH_GENERIC \ SolutionEngine CONFIG_SH_SOLUTION_ENGINE \ - Overdrive CONFIG_SH_OVERDRIVE \ + SolutionEngine7751 CONFIG_SH_7751_SOLUTION_ENGINE \ + STB1_Harp CONFIG_SH_STB1_HARP \ + STB1_Overdrive CONFIG_SH_STB1_OVERDRIVE \ HP620 CONFIG_SH_HP620 \ HP680 CONFIG_SH_HP680 \ HP690 CONFIG_SH_HP690 \ @@ -35,9 +39,18 @@ DMIDA CONFIG_SH_DMIDA \ EC3104 CONFIG_SH_EC3104 \ Dreamcast CONFIG_SH_DREAMCAST \ + CAT68701 CONFIG_SH_CAT68701 \ + BigSur CONFIG_SH_BIGSUR \ + SH2000 CONFIG_SH_SH2000 \ + ADX CONFIG_SH_ADX \ BareCPU CONFIG_SH_UNKNOWN" Generic -define_bool CONFIG_SH_RTC y +# The SH7750 RTC module is disabled in the Dreamcast +if [ "$CONFIG_SH_DREAMCAST" = "y" ]; then + define_bool CONFIG_SH_RTC n +else + define_bool CONFIG_SH_RTC y +fi if [ "$CONFIG_SH_HP620" = "y" -o "$CONFIG_SH_HP680" = "y" -o \ "$CONFIG_SH_HP690" = "y" ]; then @@ -48,7 +61,9 @@ "SH7707 CONFIG_CPU_SUBTYPE_SH7707 \ SH7708 CONFIG_CPU_SUBTYPE_SH7708 \ SH7709 CONFIG_CPU_SUBTYPE_SH7709 \ - SH7750 CONFIG_CPU_SUBTYPE_SH7750" SH7708 + SH7750 CONFIG_CPU_SUBTYPE_SH7750 \ + SH7751 CONFIG_CPU_SUBTYPE_SH7751 \ + ST40STB1 CONFIG_CPU_SUBTYPE_ST40STB1" SH7708 if [ "$CONFIG_CPU_SUBTYPE_SH7707" = "y" ]; then define_bool CONFIG_CPU_SH3 y define_bool CONFIG_CPU_SH4 n @@ -65,15 +80,58 @@ define_bool CONFIG_CPU_SH3 n define_bool CONFIG_CPU_SH4 y fi +if [ "$CONFIG_CPU_SUBTYPE_SH7751" = "y" ]; then + define_bool CONFIG_CPU_SH3 n + define_bool CONFIG_CPU_SH4 y +fi +if [ "$CONFIG_CPU_SUBTYPE_ST40STB1" = "y" ]; then + define_bool CONFIG_CPU_SH3 n + define_bool CONFIG_CPU_SH4 y +fi bool 'Little Endian' CONFIG_CPU_LITTLE_ENDIAN -if [ "$CONFIG_SH_SOLUTION_ENGINE" = "y" -o "$CONFIG_SH_HP600" = "y" -o \ - "$CONFIG_SH_OVERDRIVE" = "y" ]; then - define_hex CONFIG_MEMORY_START 0c000000 -else - hex 'Physical memory start address' CONFIG_MEMORY_START 08000000 +# Platform-specific memory start and size definitions +if [ "$CONFIG_SH_SOLUTION_ENGINE" = "y" ]; then + define_hex CONFIG_MEMORY_START 0c000000 + define_hex CONFIG_MEMORY_SIZE 02000000 + define_bool CONFIG_MEMORY_SET y +fi +if [ "$CONFIG_SH_7751_SOLUTION_ENGINE" = "y" ]; then + define_hex CONFIG_MEMORY_START 0c000000 + define_hex CONFIG_MEMORY_SIZE 04000000 + define_bool CONFIG_MEMORY_SET y +fi +if [ "$CONFIG_SH_HP600" = "y" -o "$CONFIG_SH_BIGSUR" = "y" -o \ + "$CONFIG_SH_DREAMCAST" = "y" -o "$CONFIG_SH_SH2000" = "y" ]; then + define_hex CONFIG_MEMORY_START 0c000000 + define_hex CONFIG_MEMORY_SIZE 00400000 + define_bool CONFIG_MEMORY_SET y +fi +if [ "$CONFIG_CPU_SUBTYPE_ST40STB1" = "y" ]; then + bool 'Memory on LMI' CONFIG_ST40_LMI_MEMORY + if [ "$CONFIG_ST40_LMI_MEMORY" = "y" ] ; then + define_hex CONFIG_MEMORY_START 08000000 + define_hex CONFIG_MEMORY_SIZE 00400000 + define_bool CONFIG_MEMORY_SET y + fi +fi +if [ "$CONFIG_SH_ADX" = "y" ]; then + define_hex CONFIG_MEMORY_START 08000000 + define_hex CONFIG_MEMORY_SIZE 00400000 + define_bool CONFIG_MEMORY_SET y +fi +# If none of the above have set memory start/size, ask the user. +if [ "$CONFIG_MEMORY_SET" != "y" ]; then + hex 'Physical memory start address' CONFIG_MEMORY_START 08000000 + hex 'Physical memory size' CONFIG_MEMORY_SIZE 00400000 fi endmenu +if [ "$CONFIG_SH_HP690" = "y" ]; then + define_bool CONFIG_DISCONTIGMEM y +else + define_bool CONFIG_DISCONTIGMEM n +fi + mainmenu_option next_comment comment 'General setup' @@ -87,10 +145,24 @@ bool 'Networking support' CONFIG_NET -if [ "$CONFIG_SH_GENERIC" = "y" -o "$CONFIG_SH_SOLUTION_ENGINE" = "y" -o "$CONFIG_SH_UNKNOWN" = "y" ]; then +if [ "$CONFIG_SH_GENERIC" = "y" -o "$CONFIG_SH_SOLUTION_ENGINE" = "y" -o \ + "$CONFIG_SH_UNKNOWN" = "y" -o "$CONFIG_SH_CAT68701" = "y" -o \ + "$CONFIG_SH_ADX" = "y" ]; then bool 'Compact Flash Enabler support' CONFIG_CF_ENABLER fi +if [ "$CONFIG_CF_ENABLER" = "y" ]; then + choice 'Compact Flash Connection Area' \ + "Area5 CONFIG_CF_AREA5 \ + Area6 CONFIG_CF_AREA6" Area6 + if [ "$CONFIG_CF_AREA5" = "y" ]; then + define_hex CONFIG_CF_BASE_ADDR b4000000 + fi + if [ "$CONFIG_CF_AREA6" = "y" ]; then + define_hex CONFIG_CF_BASE_ADDR b8000000 + fi +fi + bool 'Hitachi HD64461 companion chip support' CONFIG_HD64461 if [ "$CONFIG_HD64461" = "y" ]; then int 'HD64461 IRQ' CONFIG_HD64461_IRQ 36 @@ -99,9 +171,12 @@ bool 'Hitachi HD64465 companion chip support' CONFIG_HD64465 if [ "$CONFIG_HD64465" = "y" ]; then + hex 'HD64465 start address' CONFIG_HD64465_IOBASE b0000000 int 'HD64465 IRQ' CONFIG_HD64465_IRQ 5 fi +bool 'DMA controller (DMAC) support' CONFIG_SH_DMA + bool 'PCI support' CONFIG_PCI if [ "$CONFIG_PCI" = "y" ]; then choice ' PCI access mode' \ @@ -114,6 +189,7 @@ if [ "$CONFIG_PCI_GODIRECT" = "y" -o "$CONFIG_PCI_GOANY" = "y" ]; then define_bool CONFIG_PCI_DIRECT y fi + define_bool CONFIG_SH_PCIDMA_NONCOHERENT n fi source drivers/pci/Config.in @@ -190,11 +266,24 @@ endmenu fi +mainmenu_option next_comment +comment 'Old CD-ROM drivers (not SCSI, not IDE)' + +bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI +if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then + source drivers/cdrom/Config.in +fi +endmenu + # # input before char - char/joystick depends on it. As does USB. # source drivers/input/Config.in +if [ "$CONFIG_SH_DREAMCAST" = "y" ]; then + source drivers/maple/Config.in +fi + mainmenu_option next_comment comment 'Character devices' @@ -215,10 +304,29 @@ fi if [ "$CONFIG_SH_GENERIC" = "y" -o \ - "$CONFIG_SH_OVERDRIVE" = "y" -o "$CONFIG_SH_SOLUTION_ENGINE" = "y" ]; then - bool 'Heartbeat LED' CONFIG_HEARTBEAT + "$CONFIG_SH_CAT68701" = "y" -o \ + "$CONFIG_SH_STB1_HARP" = "y" -o \ + "$CONFIG_SH_STB1_OVERDRIVE" = "y" -o \ + "$CONFIG_SH_BIGSUR" = "y" -o \ + "$CONFIG_SH_7751_SOLUTION_ENGINE" = "y" -o \ + "$CONFIG_SH_SOLUTION_ENGINE" = "y" ]; then + bool 'Heartbeat LED' CONFIG_HEARTBEAT +fi + +if [ "$CONFIG_SH_DREAMCAST" = "y" -a "$CONFIG_MAPLE" != "n" ]; then + mainmenu_option next_comment + comment 'Maple Bus input peripherals' + if [ "$CONFIG_INPUT" != "n" ]; then + dep_tristate ' Maple Bus keyboard support' CONFIG_MAPLE_KEYBOARD $CONFIG_INPUT + dep_tristate ' Maple Bus mouse support' CONFIG_MAPLE_MOUSE $CONFIG_INPUT + else + comment 'Input core support is required for Maple input peripherals' + fi + endmenu fi +source drivers/char/joystick/Config.in + if [ "$CONFIG_PARPORT" != "n" ]; then dep_tristate 'Parallel printer support' CONFIG_PRINTER $CONFIG_PARPORT if [ "$CONFIG_PRINTER" != "n" ]; then @@ -226,14 +334,27 @@ fi dep_tristate 'Support for user-space parallel port device drivers' CONFIG_PPDEV $CONFIG_PARPORT fi +bool 'PS/2 mouse (aka "auxiliary device") support' CONFIG_PSMOUSE + +mainmenu_option next_comment +comment 'Watchdog Cards' +bool 'Watchdog Timer Support' CONFIG_WATCHDOG +if [ "$CONFIG_WATCHDOG" != "n" ]; then + bool ' Disable watchdog shutdown on close' CONFIG_WATCHDOG_NOWAYOUT + dep_tristate ' SH 3/4 Watchdog' CONFIG_SH_WDT $CONFIG_SUPERH +fi endmenu +tristate 'Enhanced Real Time Clock Support' CONFIG_RTC if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then source drivers/char/pcmcia/Config.in fi +endmenu source fs/Config.in +source drivers/media/Config.in + if [ "$CONFIG_VT" = "y" ]; then mainmenu_option next_comment comment 'Console drivers' @@ -262,7 +383,6 @@ bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ bool 'Use LinuxSH standard BIOS' CONFIG_SH_STANDARD_BIOS if [ "$CONFIG_SH_STANDARD_BIOS" = "y" ]; then - bool 'GDB Stub kernel debug' CONFIG_DEBUG_KERNEL_WITH_GDB_STUB bool 'Early printk support' CONFIG_SH_EARLY_PRINTK fi endmenu Index: defconfig =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sh/defconfig,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- defconfig 14 Jan 2001 19:48:21 -0000 1.1.1.1 +++ defconfig 9 Apr 2002 17:07:20 -0000 1.2 @@ -201,6 +201,4 @@ # # CONFIG_MAGIC_SYSRQ is not set CONFIG_SH_STANDARD_BIOS=y -CONFIG_DEBUG_KERNEL_WITH_GDB_STUB=y -CONFIG_GDB_STUB_VBR=a0000000 CONFIG_SH_EARLY_PRINTK=y Index: vmlinux.lds.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sh/vmlinux.lds.S,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- vmlinux.lds.S 14 Jan 2001 19:48:21 -0000 1.1.1.1 +++ vmlinux.lds.S 9 Apr 2002 17:07:20 -0000 1.2 @@ -24,7 +24,7 @@ *(.gnu.warning) } = 0x0009 .text.lock : { *(.text.lock) } /* out-of-line lock text */ - .rodata : { *(.rodata) } + .rodata : { *(.rodata) *(.rodata.*) } .kstrtab : { *(.kstrtab) } . = ALIGN(16); /* Exception table */ @@ -74,7 +74,11 @@ . = ALIGN(4096); .data.page_aligned : { *(.data.idt) } +#ifdef CONFIG_CPU_SH3 + . = ALIGN(16); +#else . = ALIGN(32); +#endif .data.cacheline_aligned : { *(.data.cacheline_aligned) } . = ALIGN(4); |
From: Andy P. <at...@us...> - 2002-04-09 17:07:28
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/parisc/tools In directory usw-pr-cvs1:/tmp/cvs-serv15874/parisc/tools Modified Files: Makefile offset.c Log Message: synch 2.4.15 commit 30 Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/tools/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: offset.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/tools/offset.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 |
From: Andy P. <at...@us...> - 2002-04-09 17:07:28
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/sh/mm In directory usw-pr-cvs1:/tmp/cvs-serv15874/sh/mm Modified Files: Makefile extable.c fault.c init.c ioremap.c Added Files: __clear_user_page-sh4.S __copy_user_page-sh4.S cache-sh3.c cache-sh4.c clear_page.S copy_page.S Removed Files: cache.c Log Message: synch 2.4.15 commit 30 --- NEW FILE --- /* $Id: __clear_user_page-sh4.S,v 1.1 2002/04/09 17:07:20 atp Exp $ * * __clear_user_page implementation of SuperH * * Copyright (C) 2001 Niibe Yutaka & Kaz Kojima * */ /* * __clear_user_page * @to: P1 address (with same color) * @orig_to: P1 address * * void __clear_user_page(void *to, void *orig_to) */ /* * r0 --- scratch * r4 --- to * r5 --- orig_to * r6 --- to + 4096 */ #include <linux/linkage.h> ENTRY(__clear_user_page) mov r4,r6 mov.w .L4096,r0 add r0,r6 mov #0,r0 ! 1: ocbi @r5 add #32,r5 movca.l r0,@r4 mov r4,r1 add #32,r4 mov.l r0,@-r4 mov.l r0,@-r4 mov.l r0,@-r4 mov.l r0,@-r4 mov.l r0,@-r4 mov.l r0,@-r4 mov.l r0,@-r4 add #28,r4 cmp/eq r6,r4 bf/s 1b ocbwb @r1 ! rts nop .L4096: .word 4096 --- NEW FILE --- /* $Id: __copy_user_page-sh4.S,v 1.1 2002/04/09 17:07:20 atp Exp $ * * __copy_user_page implementation of SuperH * * Copyright (C) 2001 Niibe Yutaka & Kaz Kojima * */ /* * __copy_user_page * @to: P1 address (with same color) * @from: P1 address * @orig_to: P1 address * * void __copy_user_page(void *to, void *from, void *orig_to) */ /* * r0, r1, r2, r3, r4, r5, r6, r7 --- scratch * r8 --- from + 4096 * r9 --- orig_to * r10 --- to * r11 --- from */ #include <linux/linkage.h> ENTRY(__copy_user_page) mov.l r8,@-r15 mov.l r9,@-r15 mov.l r10,@-r15 mov.l r11,@-r15 mov r4,r10 mov r5,r11 mov r6,r9 mov r5,r8 mov.w .L4096,r0 add r0,r8 ! 1: ocbi @r9 add #32,r9 mov.l @r11+,r0 mov.l @r11+,r1 mov.l @r11+,r2 mov.l @r11+,r3 mov.l @r11+,r4 mov.l @r11+,r5 mov.l @r11+,r6 mov.l @r11+,r7 movca.l r0,@r10 mov r10,r0 add #32,r10 mov.l r7,@-r10 mov.l r6,@-r10 mov.l r5,@-r10 mov.l r4,@-r10 mov.l r3,@-r10 mov.l r2,@-r10 mov.l r1,@-r10 ocbwb @r0 cmp/eq r11,r8 bf/s 1b add #28,r10 ! mov.l @r15+,r11 mov.l @r15+,r10 mov.l @r15+,r9 mov.l @r15+,r8 rts nop .L4096: .word 4096 --- NEW FILE --- /* $Id: cache-sh3.c,v 1.1 2002/04/09 17:07:20 atp Exp $ * * linux/arch/sh/mm/cache-sh3.c * * Copyright (C) 1999, 2000 Niibe Yutaka * */ #include <linux/init.h> #include <linux/mman.h> #include <linux/mm.h> #include <linux/threads.h> #include <asm/addrspace.h> #include <asm/page.h> #include <asm/pgtable.h> #include <asm/processor.h> #include <asm/cache.h> #include <asm/io.h> #include <asm/uaccess.h> #include <asm/pgalloc.h> #include <asm/mmu_context.h> #define CCR 0xffffffec /* Address of Cache Control Register */ #define CCR_CACHE_CE 0x01 /* Cache Enable */ #define CCR_CACHE_WT 0x02 /* Write-Through (for P0,U0,P3) (else writeback) */ #define CCR_CACHE_CB 0x04 /* Write-Back (for P1) (else writethrough) */ #define CCR_CACHE_CF 0x08 /* Cache Flush */ #define CCR_CACHE_RA 0x20 /* RAM mode */ #define CCR_CACHE_VAL (CCR_CACHE_CB|CCR_CACHE_CE) /* 8k-byte cache, P1-wb, enable */ #define CCR_CACHE_INIT (CCR_CACHE_CF|CCR_CACHE_VAL) /* 8k-byte cache, CF, P1-wb, enable */ #define CACHE_OC_ADDRESS_ARRAY 0xf0000000 #define CACHE_VALID 1 #define CACHE_UPDATED 2 #define CACHE_PHYSADDR_MASK 0x1ffffc00 /* 7709A/7729 has 16K cache (256-entry), while 7702 has only 2K(direct) 7702 is not supported (yet) */ struct _cache_system_info { int way_shift; int entry_mask; int num_entries; }; /* Data at BSS is cleared after setting this variable. So, we Should not placed this variable at BSS section. Initialize this, it is placed at data section. */ static struct _cache_system_info cache_system_info = {0,}; #define CACHE_OC_WAY_SHIFT (cache_system_info.way_shift) #define CACHE_OC_ENTRY_SHIFT 4 #define CACHE_OC_ENTRY_MASK (cache_system_info.entry_mask) #define CACHE_OC_NUM_ENTRIES (cache_system_info.num_entries) #define CACHE_OC_NUM_WAYS 4 #define CACHE_OC_ASSOC_BIT (1<<3) /* * Write back all the cache. * * For SH-4, we only need to flush (write back) Operand Cache, * as Instruction Cache doesn't have "updated" data. * * Assumes that this is called in interrupt disabled context, and P2. * Shuld be INLINE function. */ static inline void cache_wback_all(void) { unsigned long addr, data, i, j; for (i=0; i<CACHE_OC_NUM_ENTRIES; i++) { for (j=0; j<CACHE_OC_NUM_WAYS; j++) { addr = CACHE_OC_ADDRESS_ARRAY|(j<<CACHE_OC_WAY_SHIFT)| (i<<CACHE_OC_ENTRY_SHIFT); data = ctrl_inl(addr); if ((data & (CACHE_UPDATED|CACHE_VALID)) == (CACHE_UPDATED|CACHE_VALID)) ctrl_outl(data & ~CACHE_UPDATED, addr); } } } static void __init detect_cpu_and_cache_system(void) { unsigned long addr0, addr1, data0, data1, data2, data3; jump_to_P2(); /* * Check if the entry shadows or not. * When shadowed, it's 128-entry system. * Otherwise, it's 256-entry system. */ addr0 = CACHE_OC_ADDRESS_ARRAY + (3 << 12); addr1 = CACHE_OC_ADDRESS_ARRAY + (1 << 12); /* First, write back & invalidate */ data0 = ctrl_inl(addr0); ctrl_outl(data0&~(CACHE_VALID|CACHE_UPDATED), addr0); data1 = ctrl_inl(addr1); ctrl_outl(data1&~(CACHE_VALID|CACHE_UPDATED), addr1); /* Next, check if there's shadow or not */ data0 = ctrl_inl(addr0); data0 ^= CACHE_VALID; ctrl_outl(data0, addr0); data1 = ctrl_inl(addr1); data2 = data1 ^ CACHE_VALID; ctrl_outl(data2, addr1); data3 = ctrl_inl(addr0); /* Lastly, invaliate them. */ ctrl_outl(data0&~CACHE_VALID, addr0); ctrl_outl(data2&~CACHE_VALID, addr1); back_to_P1(); if (data0 == data1 && data2 == data3) { /* Shadow */ cache_system_info.way_shift = 11; cache_system_info.entry_mask = 0x7f0; cache_system_info.num_entries = 128; cpu_data->type = CPU_SH7708; } else { /* 7709A or 7729 */ cache_system_info.way_shift = 12; cache_system_info.entry_mask = 0xff0; cache_system_info.num_entries = 256; cpu_data->type = CPU_SH7729; } } void __init cache_init(void) { unsigned long ccr; detect_cpu_and_cache_system(); jump_to_P2(); ccr = ctrl_inl(CCR); if (ccr & CCR_CACHE_CE) /* * XXX: Should check RA here. * If RA was 1, we only need to flush the half of the caches. */ cache_wback_all(); ctrl_outl(CCR_CACHE_INIT, CCR); back_to_P1(); } /* * Write back the dirty D-caches, but not invalidate them. * * Is this really worth it, or should we just alias this routine * to __flush_purge_region too? * * START: Virtual Address (U0, P1, or P3) * SIZE: Size of the region. */ void __flush_wback_region(void *start, int size) { unsigned long v, j; unsigned long begin, end; unsigned long flags; begin = (unsigned long)start & ~(L1_CACHE_BYTES-1); end = ((unsigned long)start + size + L1_CACHE_BYTES-1) & ~(L1_CACHE_BYTES-1); for (v = begin; v < end; v+=L1_CACHE_BYTES) { for (j=0; j<CACHE_OC_NUM_WAYS; j++) { unsigned long data, addr, p; p = __pa(v); addr = CACHE_OC_ADDRESS_ARRAY|(j<<CACHE_OC_WAY_SHIFT)| (v&CACHE_OC_ENTRY_MASK); save_and_cli(flags); data = ctrl_inl(addr); if ((data & CACHE_PHYSADDR_MASK) == (p & CACHE_PHYSADDR_MASK)) { data &= ~CACHE_UPDATED; ctrl_outl(data, addr); restore_flags(flags); break; } restore_flags(flags); } } } /* * Write back the dirty D-caches and invalidate them. * * START: Virtual Address (U0, P1, or P3) * SIZE: Size of the region. */ void __flush_purge_region(void *start, int size) { unsigned long v; unsigned long begin, end; begin = (unsigned long)start & ~(L1_CACHE_BYTES-1); end = ((unsigned long)start + size + L1_CACHE_BYTES-1) & ~(L1_CACHE_BYTES-1); for (v = begin; v < end; v+=L1_CACHE_BYTES) { unsigned long data, addr; data = (v & 0xfffffc00); /* _Virtual_ address, ~U, ~V */ addr = CACHE_OC_ADDRESS_ARRAY | (v&CACHE_OC_ENTRY_MASK) | CACHE_OC_ASSOC_BIT; ctrl_outl(data, addr); } } /* * No write back please * * Except I don't think there's any way to avoid the writeback. So we * just alias it to __flush_purge_region(). dwmw2. */ void __flush_invalidate_region(void *start, int size) __attribute__((alias("__flush_purge_region"))); --- NEW FILE --- /* $Id: cache-sh4.c,v 1.1 2002/04/09 17:07:20 atp Exp $ * * linux/arch/sh/mm/cache.c * * Copyright (C) 1999, 2000 Niibe Yutaka * */ #include <linux/config.h> #include <linux/init.h> #include <linux/mman.h> #include <linux/mm.h> #include <linux/threads.h> #include <asm/addrspace.h> #include <asm/page.h> #include <asm/pgtable.h> #include <asm/processor.h> #include <asm/cache.h> #include <asm/io.h> #include <asm/uaccess.h> #include <asm/pgalloc.h> #include <asm/mmu_context.h> #define CCR 0xff00001c /* Address of Cache Control Register */ #define CCR_CACHE_OCE 0x0001 /* Operand Cache Enable */ #define CCR_CACHE_WT 0x0002 /* Write-Through (for P0,U0,P3) (else writeback)*/ #define CCR_CACHE_CB 0x0004 /* Copy-Back (for P1) (else writethrough) */ #define CCR_CACHE_OCI 0x0008 /* OC Invalidate */ #define CCR_CACHE_ORA 0x0020 /* OC RAM Mode */ #define CCR_CACHE_OIX 0x0080 /* OC Index Enable */ #define CCR_CACHE_ICE 0x0100 /* Instruction Cache Enable */ #define CCR_CACHE_ICI 0x0800 /* IC Invalidate */ #define CCR_CACHE_IIX 0x8000 /* IC Index Enable */ /* Default CCR setup: 8k+16k-byte cache,P1-wb,enable */ #define CCR_CACHE_VAL (CCR_CACHE_ICE|CCR_CACHE_CB|CCR_CACHE_OCE) #define CCR_CACHE_INIT (CCR_CACHE_VAL|CCR_CACHE_OCI|CCR_CACHE_ICI) #define CCR_CACHE_ENABLE (CCR_CACHE_OCE|CCR_CACHE_ICE) #define CACHE_IC_ADDRESS_ARRAY 0xf0000000 #define CACHE_OC_ADDRESS_ARRAY 0xf4000000 #define CACHE_VALID 1 #define CACHE_UPDATED 2 #define CACHE_OC_WAY_SHIFT 13 #define CACHE_IC_WAY_SHIFT 13 #define CACHE_OC_ENTRY_SHIFT 5 #define CACHE_IC_ENTRY_SHIFT 5 #define CACHE_OC_ENTRY_MASK 0x3fe0 #define CACHE_OC_ENTRY_PHYS_MASK 0x0fe0 #define CACHE_IC_ENTRY_MASK 0x1fe0 #define CACHE_IC_NUM_ENTRIES 256 #define CACHE_OC_NUM_ENTRIES 512 static void __init detect_cpu_and_cache_system(void) { #ifdef CONFIG_CPU_SUBTYPE_ST40STB1 cpu_data->type = CPU_ST40STB1; #elif defined(CONFIG_CPU_SUBTYPE_SH7750) || defined(CONFIG_CPU_SUBTYPE_SH7751) cpu_data->type = CPU_SH7750; #else #error Unknown SH4 CPU type #endif } void __init cache_init(void) { unsigned long ccr; detect_cpu_and_cache_system(); jump_to_P2(); ccr = ctrl_inl(CCR); if (ccr & CCR_CACHE_ENABLE) { /* * XXX: Should check RA here. * If RA was 1, we only need to flush the half of the caches. */ unsigned long addr, data; for (addr = CACHE_OC_ADDRESS_ARRAY; addr < (CACHE_OC_ADDRESS_ARRAY+ (CACHE_OC_NUM_ENTRIES << CACHE_OC_ENTRY_SHIFT)); addr += (1 << CACHE_OC_ENTRY_SHIFT)) { data = ctrl_inl(addr); if ((data & (CACHE_UPDATED|CACHE_VALID)) == (CACHE_UPDATED|CACHE_VALID)) ctrl_outl(data & ~CACHE_UPDATED, addr); } } ctrl_outl(CCR_CACHE_INIT, CCR); back_to_P1(); } /* * SH-4 has virtually indexed and physically tagged cache. */ static struct semaphore p3map_sem[4]; void __init p3_cache_init(void) { /* In ioremap.c */ extern int remap_area_pages(unsigned long address, unsigned long phys_addr, unsigned long size, unsigned long flags); if (remap_area_pages(P3SEG, 0, PAGE_SIZE*4, _PAGE_CACHABLE)) panic("p3_cachie_init failed."); sema_init (&p3map_sem[0], 1); sema_init (&p3map_sem[1], 1); sema_init (&p3map_sem[2], 1); sema_init (&p3map_sem[3], 1); } /* * Write back the dirty D-caches, but not invalidate them. * * START: Virtual Address (U0, P1, or P3) * SIZE: Size of the region. */ void __flush_wback_region(void *start, int size) { unsigned long v; unsigned long begin, end; begin = (unsigned long)start & ~(L1_CACHE_BYTES-1); end = ((unsigned long)start + size + L1_CACHE_BYTES-1) & ~(L1_CACHE_BYTES-1); for (v = begin; v < end; v+=L1_CACHE_BYTES) { asm volatile("ocbwb %0" : /* no output */ : "m" (__m(v))); } } /* * Write back the dirty D-caches and invalidate them. * * START: Virtual Address (U0, P1, or P3) * SIZE: Size of the region. */ void __flush_purge_region(void *start, int size) { unsigned long v; unsigned long begin, end; begin = (unsigned long)start & ~(L1_CACHE_BYTES-1); end = ((unsigned long)start + size + L1_CACHE_BYTES-1) & ~(L1_CACHE_BYTES-1); for (v = begin; v < end; v+=L1_CACHE_BYTES) { asm volatile("ocbp %0" : /* no output */ : "m" (__m(v))); } } /* * No write back please */ void __flush_invalidate_region(void *start, int size) { unsigned long v; unsigned long begin, end; begin = (unsigned long)start & ~(L1_CACHE_BYTES-1); end = ((unsigned long)start + size + L1_CACHE_BYTES-1) & ~(L1_CACHE_BYTES-1); for (v = begin; v < end; v+=L1_CACHE_BYTES) { asm volatile("ocbi %0" : /* no output */ : "m" (__m(v))); } } /* * Write back the range of D-cache, and purge the I-cache. * * Called from kernel/module.c:sys_init_module and routine for a.out format. */ void flush_icache_range(unsigned long start, unsigned long end) { flush_cache_all(); } /* * Write back the D-cache and purge the I-cache for signal trampoline. */ void flush_cache_sigtramp(unsigned long addr) { unsigned long v, index; unsigned long flags; v = addr & ~(L1_CACHE_BYTES-1); asm volatile("ocbwb %0" : /* no output */ : "m" (__m(v))); index = CACHE_IC_ADDRESS_ARRAY| (v&CACHE_IC_ENTRY_MASK); save_and_cli(flags); jump_to_P2(); ctrl_outl(0, index); /* Clear out Valid-bit */ back_to_P1(); restore_flags(flags); } /* * Writeback&Invalidate the D-cache of the page */ static void __flush_dcache_page(unsigned long phys) { unsigned long addr, data; unsigned long flags; phys |= CACHE_VALID; save_and_cli(flags); jump_to_P2(); /* Loop all the D-cache */ for (addr = CACHE_OC_ADDRESS_ARRAY; addr < (CACHE_OC_ADDRESS_ARRAY +(CACHE_OC_NUM_ENTRIES<< CACHE_OC_ENTRY_SHIFT)); addr += (1<<CACHE_OC_ENTRY_SHIFT)) { data = ctrl_inl(addr)&(0x1ffff000|CACHE_VALID); if (data == phys) ctrl_outl(0, addr); } #if 0 /* DEBUG DEBUG */ /* Loop all the I-cache */ for (addr = CACHE_IC_ADDRESS_ARRAY; addr < (CACHE_IC_ADDRESS_ARRAY +(CACHE_IC_NUM_ENTRIES<< CACHE_IC_ENTRY_SHIFT)); addr += (1<<CACHE_IC_ENTRY_SHIFT)) { data = ctrl_inl(addr)&(0x1ffff000|CACHE_VALID); if (data == phys) { printk(KERN_INFO "__flush_cache_page: I-cache entry found\n"); ctrl_outl(0, addr); } } #endif back_to_P1(); restore_flags(flags); } /* * Write back & invalidate the D-cache of the page. * (To avoid "alias" issues) */ void flush_dcache_page(struct page *page) { if (test_bit(PG_mapped, &page->flags)) __flush_dcache_page(PHYSADDR(page_address(page))); } void flush_cache_all(void) { extern unsigned long empty_zero_page[1024]; unsigned long flags; unsigned long addr; save_and_cli(flags); /* Prefetch the data to write back D-cache */ for (addr = (unsigned long)empty_zero_page; addr < (unsigned long)empty_zero_page + 1024*16; addr += L1_CACHE_BYTES) asm volatile("pref @%0"::"r" (addr)); jump_to_P2(); /* Flush D-cache/I-cache */ ctrl_outl(CCR_CACHE_INIT, CCR); back_to_P1(); restore_flags(flags); } void flush_cache_mm(struct mm_struct *mm) { /* Is there any good way? */ /* XXX: possibly call flush_cache_range for each vm area */ flush_cache_all(); } /* * Write back and invalidate D-caches. * * START, END: Virtual Address (U0 address) * * NOTE: We need to flush the _physical_ page entry. * Flushing the cache lines for U0 only isn't enough. * We need to flush for P1 too, which may contain aliases. */ void flush_cache_range(struct mm_struct *mm, unsigned long start, unsigned long end) { /* * We could call flush_cache_page for the pages of these range, * but it's not efficient (scan the caches all the time...). * * We can't use A-bit magic, as there's the case we don't have * valid entry on TLB. */ flush_cache_all(); } /* * Write back and invalidate I/D-caches for the page. * * ADDR: Virtual Address (U0 address) */ void flush_cache_page(struct vm_area_struct *vma, unsigned long address) { pgd_t *dir; pmd_t *pmd; pte_t *pte; pte_t entry; unsigned long phys, addr, data; unsigned long flags; dir = pgd_offset(vma->vm_mm, address); pmd = pmd_offset(dir, address); if (pmd_none(*pmd) || pmd_bad(*pmd)) return; pte = pte_offset(pmd, address); entry = *pte; if (pte_none(entry) || !pte_present(entry)) return; phys = pte_val(entry)&PTE_PHYS_MASK; phys |= CACHE_VALID; save_and_cli(flags); jump_to_P2(); /* We only need to flush D-cache when we have alias */ if ((address^phys) & CACHE_ALIAS) { /* Loop 4K of the D-cache */ for (addr = CACHE_OC_ADDRESS_ARRAY | (address & CACHE_ALIAS); addr < (CACHE_OC_ADDRESS_ARRAY + (address & CACHE_ALIAS) +(CACHE_OC_NUM_ENTRIES/4<<CACHE_OC_ENTRY_SHIFT)); addr += (1<<CACHE_OC_ENTRY_SHIFT)) { data = ctrl_inl(addr)&(0x1ffff000|CACHE_VALID); if (data == phys) ctrl_outl(0, addr); } /* Loop another 4K of the D-cache */ for (addr = CACHE_OC_ADDRESS_ARRAY | (phys & CACHE_ALIAS); addr < (CACHE_OC_ADDRESS_ARRAY + (phys & CACHE_ALIAS) +(CACHE_OC_NUM_ENTRIES/4<<CACHE_OC_ENTRY_SHIFT)); addr += (1<<CACHE_OC_ENTRY_SHIFT)) { data = ctrl_inl(addr)&(0x1ffff000|CACHE_VALID); if (data == phys) ctrl_outl(0, addr); } } if (vma->vm_flags & VM_EXEC) /* Loop 4K of the I-cache */ for (addr = CACHE_IC_ADDRESS_ARRAY|(address&0x1000); addr < ((CACHE_IC_ADDRESS_ARRAY|(address&0x1000)) +(CACHE_IC_NUM_ENTRIES/2<<CACHE_IC_ENTRY_SHIFT)); addr += (1<<CACHE_IC_ENTRY_SHIFT)) { data = ctrl_inl(addr)&(0x1ffff000|CACHE_VALID); if (data == phys) ctrl_outl(0, addr); } back_to_P1(); restore_flags(flags); } /* * clear_user_page * @to: P1 address * @address: U0 address to be mapped */ void clear_user_page(void *to, unsigned long address) { struct page *page = virt_to_page(to); __set_bit(PG_mapped, &page->flags); if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) clear_page(to); else { pgprot_t pgprot = __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_CACHABLE | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_HW_SHARED | _PAGE_FLAGS_HARD); unsigned long phys_addr = PHYSADDR(to); unsigned long p3_addr = P3SEG + (address & CACHE_ALIAS); pgd_t *dir = pgd_offset_k(p3_addr); pmd_t *pmd = pmd_offset(dir, p3_addr); pte_t *pte = pte_offset(pmd, p3_addr); pte_t entry; unsigned long flags; entry = mk_pte_phys(phys_addr, pgprot); down(&p3map_sem[(address & CACHE_ALIAS)>>12]); set_pte(pte, entry); save_and_cli(flags); __flush_tlb_page(get_asid(), p3_addr); restore_flags(flags); update_mmu_cache(NULL, p3_addr, entry); __clear_user_page((void *)p3_addr, to); pte_clear(pte); up(&p3map_sem[(address & CACHE_ALIAS)>>12]); } } /* * copy_user_page * @to: P1 address * @from: P1 address * @address: U0 address to be mapped */ void copy_user_page(void *to, void *from, unsigned long address) { struct page *page = virt_to_page(to); __set_bit(PG_mapped, &page->flags); if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) copy_page(to, from); else { pgprot_t pgprot = __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_CACHABLE | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_HW_SHARED | _PAGE_FLAGS_HARD); unsigned long phys_addr = PHYSADDR(to); unsigned long p3_addr = P3SEG + (address & CACHE_ALIAS); pgd_t *dir = pgd_offset_k(p3_addr); pmd_t *pmd = pmd_offset(dir, p3_addr); pte_t *pte = pte_offset(pmd, p3_addr); pte_t entry; unsigned long flags; entry = mk_pte_phys(phys_addr, pgprot); down(&p3map_sem[(address & CACHE_ALIAS)>>12]); set_pte(pte, entry); save_and_cli(flags); __flush_tlb_page(get_asid(), p3_addr); restore_flags(flags); update_mmu_cache(NULL, p3_addr, entry); __copy_user_page((void *)p3_addr, from, to); pte_clear(pte); up(&p3map_sem[(address & CACHE_ALIAS)>>12]); } } --- NEW FILE --- /* $Id: clear_page.S,v 1.1 2002/04/09 17:07:20 atp Exp $ * * clear_page implementation of SuperH * * Copyright (C) 2001 Niibe Yutaka & Kaz Kojima * */ /* * clear_page * @to: P1 address * * void clear_page(void *to) */ /* * r0 --- scratch * r4 --- to * r5 --- to + 4096 */ #include <linux/linkage.h> ENTRY(clear_page) mov r4,r5 mov.w .Llimit,r0 add r0,r5 mov #0,r0 ! 1: #if defined(__sh3__) mov.l r0,@r4 #elif defined(__SH4__) movca.l r0,@r4 mov r4,r1 #endif add #32,r4 mov.l r0,@-r4 mov.l r0,@-r4 mov.l r0,@-r4 mov.l r0,@-r4 mov.l r0,@-r4 mov.l r0,@-r4 mov.l r0,@-r4 #if defined(__SH4__) ocbwb @r1 #endif cmp/eq r5,r4 bf/s 1b add #28,r4 ! rts nop .Llimit: .word (4096-28) --- NEW FILE --- /* $Id: copy_page.S,v 1.1 2002/04/09 17:07:20 atp Exp $ * * copy_page implementation of SuperH * * Copyright (C) 2001 Niibe Yutaka & Kaz Kojima * */ /* * copy_page * @to: P1 address * @from: P1 address * * void copy_page(void *to, void *from) */ /* * r0, r1, r2, r3, r4, r5, r6, r7 --- scratch * r8 --- from + 4096 * r9 --- not used * r10 --- to * r11 --- from */ #include <linux/linkage.h> ENTRY(copy_page) mov.l r8,@-r15 mov.l r10,@-r15 mov.l r11,@-r15 mov r4,r10 mov r5,r11 mov r5,r8 mov.w .L4096,r0 add r0,r8 ! 1: mov.l @r11+,r0 mov.l @r11+,r1 mov.l @r11+,r2 mov.l @r11+,r3 mov.l @r11+,r4 mov.l @r11+,r5 mov.l @r11+,r6 mov.l @r11+,r7 #if defined(__sh3__) mov.l r0,@r10 #elif defined(__SH4__) movca.l r0,@r10 mov r10,r0 #endif add #32,r10 mov.l r7,@-r10 mov.l r6,@-r10 mov.l r5,@-r10 mov.l r4,@-r10 mov.l r3,@-r10 mov.l r2,@-r10 mov.l r1,@-r10 #if defined(__SH4__) ocbwb @r0 #endif cmp/eq r11,r8 bf/s 1b add #28,r10 ! mov.l @r15+,r11 mov.l @r15+,r10 mov.l @r15+,r8 rts nop .L4096: .word 4096 Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sh/mm/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- Makefile 14 Jan 2001 19:48:50 -0000 1.1.1.1 +++ Makefile 9 Apr 2002 17:07:20 -0000 1.2 @@ -8,6 +8,11 @@ # Note 2! The CFLAGS definition is now in the main makefile... O_TARGET := mm.o -obj-y := init.o fault.o extable.o cache.o # ioremap.o +obj-y := init.o fault.o extable.o clear_page.o copy_page.o + +obj-$(CONFIG_CPU_SH3) += cache-sh3.o +obj-$(CONFIG_CPU_SH4) += cache-sh4.o __clear_user_page-sh4.o __copy_user_page-sh4.o ioremap.o + +USE_STANDARD_AS_RULE := true include $(TOPDIR)/Rules.make Index: extable.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sh/mm/extable.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- extable.c 14 Jan 2001 19:48:50 -0000 1.1.1.1 +++ extable.c 9 Apr 2002 17:07:20 -0000 1.2 @@ -46,7 +46,7 @@ /* The kernel is the last "module" -- no need to treat it special. */ struct module *mp; for (mp = module_list; mp != NULL; mp = mp->next) { - if (mp->ex_table_start == NULL) + if (mp->ex_table_start == NULL || !(mp->flags&(MOD_RUNNING|MOD_INITIALIZING))) continue; ret = search_one_table(mp->ex_table_start, mp->ex_table_end - 1, addr); Index: fault.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sh/mm/fault.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- fault.c 14 Jan 2001 19:48:52 -0000 1.1.1.1 +++ fault.c 9 Apr 2002 17:07:20 -0000 1.2 @@ -28,10 +28,6 @@ #include <asm/mmu_context.h> extern void die(const char *,struct pt_regs *,long); -static void __flush_tlb_page(unsigned long asid, unsigned long page); -#if defined(__SH4__) -static void __flush_tlb_phys(unsigned long phys); -#endif /* * Ugly, ugly, but the goto's result in better assembly.. @@ -109,7 +105,7 @@ if (in_interrupt() || !mm) goto no_context; - down(&mm->mmap_sem); + down_read(&mm->mmap_sem); vma = find_vma(mm, address); if (!vma) @@ -138,6 +134,7 @@ * make sure we exit gracefully rather than endlessly redo * the fault. */ +survive: switch (handle_mm_fault(mm, vma, address, writeaccess)) { case 1: tsk->min_flt++; @@ -151,7 +148,7 @@ goto out_of_memory; } - up(&mm->mmap_sem); + up_read(&mm->mmap_sem); return; /* @@ -159,7 +156,7 @@ * Fix it, but check if it's kernel or user first.. */ bad_area: - up(&mm->mmap_sem); + up_read(&mm->mmap_sem); if (user_mode(regs)) { tsk->thread.address = address; @@ -208,14 +205,20 @@ * us unable to handle the page fault gracefully. */ out_of_memory: - up(&mm->mmap_sem); + up_read(&mm->mmap_sem); + if (current->pid == 1) { + current->policy |= SCHED_YIELD; + schedule(); + down_read(&mm->mmap_sem); + goto survive; + } printk("VM: killing process %s\n", tsk->comm); if (user_mode(regs)) do_exit(SIGKILL); goto no_context; do_sigbus: - up(&mm->mmap_sem); + up_read(&mm->mmap_sem); /* * Send a sigbus, regardless of whether we were in kernel @@ -242,8 +245,10 @@ pte_t *pte; pte_t entry; - if (address >= VMALLOC_START && address < VMALLOC_END) + if (address >= P3SEG && address < P4SEG) dir = pgd_offset_k(address); + else if (address >= TASK_SIZE) + return 1; else dir = pgd_offset(current->mm, address); @@ -257,7 +262,7 @@ } pte = pte_offset(pmd, address); entry = *pte; - if (pte_none(entry) || !pte_present(entry) + if (pte_none(entry) || pte_not_present(entry) || (writeaccess && !pte_write(entry))) return 1; @@ -281,37 +286,35 @@ { unsigned long flags; unsigned long pteval; - unsigned long pteaddr; + unsigned long vpn; +#if defined(__SH4__) + struct page *page; unsigned long ptea; +#endif - save_and_cli(flags); + /* Ptrace may call this routine. */ + if (vma && current->active_mm != vma->vm_mm) + return; #if defined(__SH4__) - if (pte_shared(pte)) { - struct page *pg; - - pteval = pte_val(pte); - pteval &= PAGE_MASK; /* Physicall page address */ - __flush_tlb_phys(pteval); - pg = virt_to_page(__va(pteval)); - flush_dcache_page(pg); + page = pte_page(pte); + if (VALID_PAGE(page) && !test_bit(PG_mapped, &page->flags)) { + unsigned long phys = pte_val(pte) & PTE_PHYS_MASK; + __flush_wback_region((void *)P1SEGADDR(phys), PAGE_SIZE); + __set_bit(PG_mapped, &page->flags); } #endif - /* Ptrace may call this routine. */ - if (vma && current->active_mm != vma->vm_mm) { - restore_flags(flags); - return; - } + save_and_cli(flags); /* Set PTEH register */ - pteaddr = (address & MMU_VPN_MASK) | get_asid(); - ctrl_outl(pteaddr, MMU_PTEH); + vpn = (address & MMU_VPN_MASK) | get_asid(); + ctrl_outl(vpn, MMU_PTEH); - /* Set PTEA register */ - /* TODO: make this look less hacky */ pteval = pte_val(pte); #if defined(__SH4__) + /* Set PTEA register */ + /* TODO: make this look less hacky */ ptea = ((pteval >> 28) & 0xe) | (pteval & 0x1); ctrl_outl(ptea, MMU_PTEA); #endif @@ -326,7 +329,7 @@ restore_flags(flags); } -static void __flush_tlb_page(unsigned long asid, unsigned long page) +void __flush_tlb_page(unsigned long asid, unsigned long page) { unsigned long addr, data; @@ -341,40 +344,13 @@ data = (page & 0xfffe0000) | asid; /* VALID bit is off */ ctrl_outl(data, addr); #elif defined(__SH4__) - jump_to_P2(); addr = MMU_UTLB_ADDRESS_ARRAY | MMU_PAGE_ASSOC_BIT; data = page | asid; /* VALID bit is off */ + jump_to_P2(); ctrl_outl(data, addr); back_to_P1(); #endif } - -#if defined(__SH4__) -static void __flush_tlb_phys(unsigned long phys) -{ - int i; - unsigned long addr, data; - - jump_to_P2(); - for (i = 0; i < MMU_UTLB_ENTRIES; i++) { - addr = MMU_UTLB_DATA_ARRAY | (i<<MMU_U_ENTRY_SHIFT); - data = ctrl_inl(addr); - if ((data & MMU_UTLB_VALID) && (data&PAGE_MASK) == phys) { - data &= ~MMU_UTLB_VALID; - ctrl_outl(data, addr); - } - } - for (i = 0; i < MMU_ITLB_ENTRIES; i++) { - addr = MMU_ITLB_DATA_ARRAY | (i<<MMU_I_ENTRY_SHIFT); - data = ctrl_inl(addr); - if ((data & MMU_ITLB_VALID) && (data&PAGE_MASK) == phys) { - data &= ~MMU_ITLB_VALID; - ctrl_outl(data, addr); - } - } - back_to_P1(); -} -#endif void flush_tlb_page(struct vm_area_struct *vma, unsigned long page) { Index: init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sh/mm/init.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- init.c 14 Jan 2001 19:48:53 -0000 1.1.1.1 +++ init.c 9 Apr 2002 17:07:20 -0000 1.2 @@ -34,120 +34,23 @@ #include <asm/pgalloc.h> #include <asm/mmu_context.h> #include <asm/io.h> +#include <asm/tlb.h> + +mmu_gather_t mmu_gathers[NR_CPUS]; /* * Cache of MMU context last used. */ unsigned long mmu_context_cache; +#ifdef CONFIG_DISCONTIGMEM +pg_data_t discontig_page_data[NR_NODES]; +bootmem_data_t discontig_node_bdata[NR_NODES]; +#endif + static unsigned long totalram_pages; static unsigned long totalhigh_pages; -extern unsigned long init_smp_mappings(unsigned long); - -/* - * BAD_PAGE is the page that is used for page faults when linux - * is out-of-memory. Older versions of linux just did a - * do_exit(), but using this instead means there is less risk - * for a process dying in kernel mode, possibly leaving an inode - * unused etc.. - * - * BAD_PAGETABLE is the accompanying page-table: it is initialized - * to point to BAD_PAGE entries. - * - * ZERO_PAGE is a special page that is used for zero-initialized - * data and COW. - */ - -unsigned long empty_bad_page[1024]; -pte_t empty_bad_pte_table[PTRS_PER_PTE]; -extern unsigned long empty_zero_page[1024]; - -static pte_t * get_bad_pte_table(void) -{ - pte_t v; - int i; - - v = pte_mkdirty(mk_pte_phys(__pa(empty_bad_page), PAGE_SHARED)); - - for (i = 0; i < PAGE_SIZE/sizeof(pte_t); i++) - empty_bad_pte_table[i] = v; - - return empty_bad_pte_table; -} - -void __handle_bad_pmd(pmd_t *pmd) -{ - pmd_ERROR(*pmd); - set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(get_bad_pte_table()))); -} - -void __handle_bad_pmd_kernel(pmd_t *pmd) -{ - pmd_ERROR(*pmd); - set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(get_bad_pte_table()))); -} - -pte_t *get_pte_kernel_slow(pmd_t *pmd, unsigned long offset) -{ - pte_t *pte; - - pte = (pte_t *) __get_free_page(GFP_KERNEL); - if (pmd_none(*pmd)) { - if (pte) { - clear_page(pte); - set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(pte))); - return pte + offset; - } - set_pmd(pmd, __pmd(_KERNPG_TABLE + __pa(get_bad_pte_table()))); - return NULL; - } - free_page((unsigned long)pte); - if (pmd_bad(*pmd)) { - __handle_bad_pmd_kernel(pmd); - return NULL; - } - return (pte_t *) pmd_page(*pmd) + offset; -} - -pte_t *get_pte_slow(pmd_t *pmd, unsigned long offset) -{ - unsigned long pte; - - pte = (unsigned long) __get_free_page(GFP_KERNEL); - if (pmd_none(*pmd)) { - if (pte) { - clear_page((void *)pte); - set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte))); - return (pte_t *)pte + offset; - } - set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(get_bad_pte_table()))); - return NULL; - } - free_page(pte); - if (pmd_bad(*pmd)) { - __handle_bad_pmd(pmd); - return NULL; - } - return (pte_t *) pmd_page(*pmd) + offset; -} - -int do_check_pgt_cache(int low, int high) -{ - int freed = 0; - if (pgtable_cache_size > high) { - do { - if (pgd_quicklist) - free_pgd_slow(get_pgd_fast()), freed++; - if (pmd_quicklist) - free_pmd_slow(get_pmd_fast()), freed++; - if (pte_quicklist) - free_pte_slow(get_pte_fast()), freed++; - } while (pgtable_cache_size > low); - } - return freed; -} - void show_mem(void) { int i, total = 0, reserved = 0; @@ -170,7 +73,6 @@ printk("%d reserved pages\n",reserved); printk("%d pages shared\n",shared); printk("%d pages swap cached\n",cached); - printk("%ld pages in page table cache\n",pgtable_cache_size); show_buffers(); } @@ -179,7 +81,7 @@ extern char _text, _etext, _edata, __bss_start, _end; extern char __init_begin, __init_end; -pgd_t swapper_pg_dir[1024]; +pgd_t swapper_pg_dir[PTRS_PER_PGD]; /* It'd be good if these lines were in the standard header file. */ #define START_PFN (NODE_DATA(0)->bdata->node_boot_start >> PAGE_SHIFT) @@ -199,7 +101,7 @@ /* We don't need kernel mapping as hardware support that. */ pg_dir = swapper_pg_dir; - for (i=0; i < USER_PTRS_PER_PGD*2; i++) + for (i=0; i < PTRS_PER_PGD; i++) pgd_val(pg_dir[i]) = 0; /* Enable MMU */ @@ -225,12 +127,18 @@ zones_size[ZONE_DMA] = max_dma - start_pfn; zones_size[ZONE_NORMAL] = low - max_dma; } - free_area_init_node(0, 0, 0, zones_size, __MEMORY_START, 0); + free_area_init_node(0, NODE_DATA(0), 0, zones_size, __MEMORY_START, 0); +#ifdef CONFIG_DISCONTIGMEM + zones_size[ZONE_DMA] = __MEMORY_SIZE_2ND >> PAGE_SHIFT; + zones_size[ZONE_NORMAL] = 0; + free_area_init_node(1, NODE_DATA(1), 0, zones_size, __MEMORY_START_2ND, 0); +#endif } } void __init mem_init(void) { + extern unsigned long empty_zero_page[1024]; int codesize, reservedpages, datasize, initsize; int tmp; @@ -239,10 +147,13 @@ /* clear the zero-page */ memset(empty_zero_page, 0, PAGE_SIZE); - flush_page_to_ram(virt_to_page(empty_zero_page)); + __flush_wback_region(empty_zero_page, PAGE_SIZE); /* this will put all low memory onto the freelists */ - totalram_pages += free_all_bootmem(); + totalram_pages += free_all_bootmem_node(NODE_DATA(0)); +#ifdef CONFIG_DISCONTIGMEM + totalram_pages += free_all_bootmem_node(NODE_DATA(1)); +#endif reservedpages = 0; for (tmp = 0; tmp < num_physpages; tmp++) /* @@ -261,6 +172,8 @@ reservedpages << (PAGE_SHIFT-10), datasize >> 10, initsize >> 10); + + p3_cache_init(); } void free_initmem(void) Index: ioremap.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sh/mm/ioremap.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ioremap.c 14 Jan 2001 19:48:53 -0000 1.1.1.1 +++ ioremap.c 9 Apr 2002 17:07:20 -0000 1.2 @@ -13,8 +13,8 @@ #include <asm/io.h> #include <asm/pgalloc.h> -static inline void remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, - unsigned long phys_addr, unsigned long flags) +static inline void remap_area_pte(pte_t * pte, unsigned long address, + unsigned long size, unsigned long phys_addr, unsigned long flags) { unsigned long end; pgprot_t pgprot = __pgprot(_PAGE_PRESENT | _PAGE_RW | @@ -25,18 +25,22 @@ end = address + size; if (end > PMD_SIZE) end = PMD_SIZE; + if (address >= end) + BUG(); do { - if (!pte_none(*pte)) + if (!pte_none(*pte)) { printk("remap_area_pte: page already exists\n"); + BUG(); + } set_pte(pte, mk_pte_phys(phys_addr, pgprot)); address += PAGE_SIZE; phys_addr += PAGE_SIZE; pte++; - } while (address < end); + } while (address && (address < end)); } -static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size, - unsigned long phys_addr, unsigned long flags) +static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, + unsigned long size, unsigned long phys_addr, unsigned long flags) { unsigned long end; @@ -45,38 +49,48 @@ if (end > PGDIR_SIZE) end = PGDIR_SIZE; phys_addr -= address; + if (address >= end) + BUG(); do { - pte_t * pte = pte_alloc_kernel(pmd, address); + pte_t * pte = pte_alloc(&init_mm, pmd, address); if (!pte) return -ENOMEM; remap_area_pte(pte, address, end - address, address + phys_addr, flags); address = (address + PMD_SIZE) & PMD_MASK; pmd++; - } while (address < end); + } while (address && (address < end)); return 0; } -static int remap_area_pages(unsigned long address, unsigned long phys_addr, - unsigned long size, unsigned long flags) +int remap_area_pages(unsigned long address, unsigned long phys_addr, + unsigned long size, unsigned long flags) { + int error; pgd_t * dir; unsigned long end = address + size; phys_addr -= address; dir = pgd_offset_k(address); flush_cache_all(); - while (address < end) { - pmd_t *pmd = pmd_alloc_kernel(dir, address); + if (address >= end) + BUG(); + spin_lock(&init_mm.page_table_lock); + do { + pmd_t *pmd; + pmd = pmd_alloc(&init_mm, dir, address); + error = -ENOMEM; if (!pmd) - return -ENOMEM; + break; if (remap_area_pmd(pmd, address, end - address, phys_addr + address, flags)) - return -ENOMEM; + break; + error = 0; address = (address + PGDIR_SIZE) & PGDIR_MASK; dir++; - } + } while (address && (address < end)); + spin_unlock(&init_mm.page_table_lock); flush_tlb_all(); - return 0; + return error; } /* @@ -92,7 +106,7 @@ * have to convert them into an offset in a page-aligned mapping, but the * caller shouldn't need to know that small detail. */ -void * __ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags) +void * p3_ioremap(unsigned long phys_addr, unsigned long size, unsigned long flags) { void * addr; struct vm_struct * area; @@ -106,7 +120,7 @@ /* * Don't remap the low PCI/ISA area, it's always mapped.. */ - if (phys_addr >= 0xA0000 && last_addr <= 0x100000) + if (phys_addr >= 0xA0000 && last_addr < 0x100000) return phys_to_virt(phys_addr); /* @@ -136,7 +150,7 @@ return (void *) (offset + (char *)addr); } -void iounmap(void *addr) +void p3_iounmap(void *addr) { if (addr > high_memory) return vfree((void *) (PAGE_MASK & (unsigned long) addr)); --- cache.c DELETED --- |
From: Andy P. <at...@us...> - 2002-04-09 17:07:28
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/sh/lib In directory usw-pr-cvs1:/tmp/cvs-serv15874/sh/lib Modified Files: Makefile checksum.S memchr.S memcpy.S memmove.S memset.S Added Files: strlen.S Log Message: synch 2.4.15 commit 30 --- NEW FILE --- /* $Id: strlen.S,v 1.1 2002/04/09 17:07:20 atp Exp $ * * "strlen" implementation of SuperH * * Copyright (C) 1999 Kaz Kojima * */ /* size_t strlen (const char *s) */ #include <linux/linkage.h> ENTRY(strlen) mov r4,r0 and #3,r0 tst r0,r0 bt/s 1f mov #0,r2 add #-1,r0 shll2 r0 shll r0 braf r0 nop mov.b @r4+,r1 tst r1,r1 bt 8f add #1,r2 mov.b @r4+,r1 tst r1,r1 bt 8f add #1,r2 mov.b @r4+,r1 tst r1,r1 bt 8f add #1,r2 1: mov #0,r3 2: mov.l @r4+,r1 cmp/str r3,r1 bf/s 2b add #4,r2 add #-4,r2 #ifndef __LITTLE_ENDIAN__ swap.b r1,r1 swap.w r1,r1 swap.b r1,r1 #endif extu.b r1,r0 tst r0,r0 bt/s 8f shlr8 r1 add #1,r2 extu.b r1,r0 tst r0,r0 bt/s 8f shlr8 r1 add #1,r2 extu.b r1,r0 tst r0,r0 bt 8f add #1,r2 8: rts mov r2,r0 Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sh/lib/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- Makefile 14 Jan 2001 19:48:47 -0000 1.1.1.1 +++ Makefile 9 Apr 2002 17:07:20 -0000 1.2 @@ -4,7 +4,7 @@ L_TARGET = lib.a obj-y = delay.o memcpy.o memset.o memmove.o memchr.o old-checksum.o \ - checksum.o strcasecmp.o + checksum.o strcasecmp.o strlen.o USE_STANDARD_AS_RULE := true Index: checksum.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sh/lib/checksum.S,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- checksum.S 25 Feb 2001 23:15:21 -0000 1.1.1.2 +++ checksum.S 9 Apr 2002 17:07:20 -0000 1.2 @@ -54,13 +54,14 @@ tst #2, r0 ! Check alignment. bt 2f ! Jump if alignment is ok. ! - add #-2, r5 ! Alignment uses up two bytes. + add #-2, r5 ! Alignment uses up two bytes. cmp/pz r5 ! bt/s 1f ! Jump if we had at least two bytes. clrt bra 6f add #2, r5 ! r5 was < 2. Deal with it. 1: + mov r5, r1 ! Save new len for later use. mov.w @r4+, r0 extu.w r0, r0 addc r0, r6 @@ -90,7 +91,7 @@ addc r3, r6 addc r0, r6 addc r2, r6 - movt r0 + movt r0 dt r5 bf/s 3b cmp/eq #1, r0 @@ -185,48 +186,48 @@ mov.l r5,@-r15 mov.l r6,@-r15 - mov #3, r0 ! Check src and dest are equally aligned - mov r4, r1 - and r0, r1 - and r5, r0 - cmp/eq r1, r0 - bf 3f ! Different alignments, use slow version - tst #1,r0 ! Check dest word aligned - bf 3f ! If not, do it the slow way + mov #3,r0 ! Check src and dest are equally aligned + mov r4,r1 + and r0,r1 + and r5,r0 + cmp/eq r1,r0 + bf 3f ! Different alignments, use slow version + tst #1,r0 ! Check dest word aligned + bf 3f ! If not, do it the slow way mov #2,r0 - tst r0,r5 ! Check dest alignment. - bt 2f ! Jump if alignment is ok. - add #-2,r6 ! Alignment uses up two bytes. - cmp/pz r6 ! Jump if we had at least two bytes. + tst r0,r5 ! Check dest alignment. + bt 2f ! Jump if alignment is ok. + add #-2,r6 ! Alignment uses up two bytes. + cmp/pz r6 ! Jump if we had at least two bytes. bt/s 1f clrt bra 4f - add #2,r6 ! r6 was < 2. Deal with it. + add #2,r6 ! r6 was < 2. Deal with it. -3: ! Handle different src and dest alinments. +3: ! Handle different src and dest alignments. ! This is not common, so simple byte by byte copy will do. - mov r6, r2 + mov r6,r2 shlr r6 - tst r6, r6 + tst r6,r6 bt 4f clrt -5: -SRC( mov.b @r4+,r0 ) -DST( mov.b r0,@r5 ) - add #1, r5 -SRC( mov.b @r4+,r1 ) -DST( mov.b r1,@r5 ) - add #1,r5 - - extu.b r0,r0 + .align 2 +5: +SRC( mov.b @r4+,r1 ) +SRC( mov.b @r4+,r0 ) extu.b r1,r1 +DST( mov.b r1,@r5 ) +DST( mov.b r0,@(1,r5) ) + extu.b r0,r0 + add #2,r5 + #ifdef __LITTLE_ENDIAN__ - shll8 r1 -#else shll8 r0 +#else + shll8 r1 #endif - or r1,r0 + or r1,r0 addc r0,r7 movt r0 @@ -238,16 +239,16 @@ mov r2, r0 tst #1, r0 - bt 7f + bt 7f bra 5f clrt ! src and dest equally aligned, but to a two byte boundary. ! Handle first two bytes as a special case - .align 5 + .align 2 1: -SRC( mov.w @r4+,r0 ) -DST( mov.w r0,@r5 ) +SRC( mov.w @r4+,r0 ) +DST( mov.w r0,@r5 ) add #2,r5 extu.w r0,r0 addc r0,r7 @@ -260,42 +261,36 @@ tst r6,r6 bt/s 2f clrt + .align 2 1: -SRC( mov.l @r4+,r0 ) -SRC( mov.l @r4+,r1 ) +SRC( mov.l @r4+,r0 ) +SRC( mov.l @r4+,r1 ) addc r0,r7 -DST( mov.l r0,@r5 ) - add #4,r5 +DST( mov.l r0,@r5 ) +DST( mov.l r1,@(4,r5) ) addc r1,r7 -DST( mov.l r1,@r5 ) - add #4,r5 -SRC( mov.l @r4+,r0 ) -SRC( mov.l @r4+,r1 ) +SRC( mov.l @r4+,r0 ) +SRC( mov.l @r4+,r1 ) addc r0,r7 -DST( mov.l r0,@r5 ) - add #4,r5 +DST( mov.l r0,@(8,r5) ) +DST( mov.l r1,@(12,r5) ) addc r1,r7 -DST( mov.l r1,@r5 ) - add #4,r5 SRC( mov.l @r4+,r0 ) -SRC( mov.l @r4+,r1 ) +SRC( mov.l @r4+,r1 ) addc r0,r7 -DST( mov.l r0,@r5 ) - add #4,r5 +DST( mov.l r0,@(16,r5) ) +DST( mov.l r1,@(20,r5) ) addc r1,r7 -DST( mov.l r1,@r5 ) - add #4,r5 -SRC( mov.l @r4+,r0 ) -SRC( mov.l @r4+,r1 ) +SRC( mov.l @r4+,r0 ) +SRC( mov.l @r4+,r1 ) addc r0,r7 -DST( mov.l r0,@r5 ) - add #4,r5 +DST( mov.l r0,@(24,r5) ) +DST( mov.l r1,@(28,r5) ) addc r1,r7 -DST( mov.l r1,@r5 ) - add #4,r5 + add #32,r5 movt r0 dt r6 bf/s 1b Index: memchr.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sh/lib/memchr.S,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: memcpy.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sh/lib/memcpy.S,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: memmove.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sh/lib/memmove.S,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: memset.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sh/lib/memset.S,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 |
From: Andy P. <at...@us...> - 2002-04-09 17:07:27
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/parisc/mm In directory usw-pr-cvs1:/tmp/cvs-serv15874/parisc/mm Modified Files: fault.c pa11.c pa20.c Log Message: synch 2.4.15 commit 30 Index: fault.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/mm/fault.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- fault.c 14 Jan 2001 19:57:07 -0000 1.1.1.1 +++ fault.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -175,7 +175,7 @@ if (in_interrupt() || !mm) goto no_context; - down(&mm->mmap_sem); + down_read(&mm->mmap_sem); vma = pa_find_vma(mm, address); if (!vma) goto bad_area; @@ -218,14 +218,14 @@ default: goto out_of_memory; } - up(&mm->mmap_sem); + up_read(&mm->mmap_sem); return; /* * Something tried to access memory that isn't in our memory map.. */ bad_area: - up(&mm->mmap_sem); + up_read(&mm->mmap_sem); if (user_mode(regs)) { struct siginfo si; @@ -275,7 +275,7 @@ parisc_terminate("Bad Address (null pointer deref?)",regs,code,address); out_of_memory: - up(&mm->mmap_sem); + up_read(&mm->mmap_sem); printk("VM: killing process %s\n", current->comm); if (user_mode(regs)) do_exit(SIGKILL); Index: pa11.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/mm/pa11.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- pa11.c 14 Jan 2001 19:57:10 -0000 1.1.1.1 +++ pa11.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -127,8 +127,9 @@ /* * Saved cp0 registers */ - printk("epc : %08lx\nStatus: %08x\nCause : %08x\n", - (unsigned long) regs->cp0_epc, (unsigned int) regs->cp0_status, + printk("epc : %08lx %s\nStatus: %08x\nCause : %08x\n", + (unsigned long) regs->cp0_epc, print_tainted(), + (unsigned int) regs->cp0_status, (unsigned int) regs->cp0_cause); } Index: pa20.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/mm/pa20.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- pa20.c 14 Jan 2001 19:57:10 -0000 1.1.1.1 +++ pa20.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -127,8 +127,9 @@ /* * Saved cp0 registers */ - printk("epc : %08lx\nStatus: %08x\nCause : %08x\n", - (unsigned long) regs->cp0_epc, (unsigned int) regs->cp0_status, + printk("epc : %08lx %s\nStatus: %08x\nCause : %08x\n", + (unsigned long) regs->cp0_epc, print_tainted(), + (unsigned int) regs->cp0_status, (unsigned int) regs->cp0_cause); } |
From: Andy P. <at...@us...> - 2002-04-09 17:07:27
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/parisc/lib In directory usw-pr-cvs1:/tmp/cvs-serv15874/parisc/lib Modified Files: checksum.c Log Message: synch 2.4.15 commit 30 Index: checksum.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/lib/checksum.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 |
From: Andy P. <at...@us...> - 2002-04-09 17:07:26
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel In directory usw-pr-cvs1:/tmp/cvs-serv15874/parisc/kernel Modified Files: cache.c ccio-dma.c ccio-rm-dma.c init_task.c irq.c pci-dma.c pci.c pdc_cons.c ptrace.c sba_iommu.c semaphore.c setup.c sys_parisc.c traps.c Log Message: synch 2.4.15 commit 30 Index: cache.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/cache.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: ccio-dma.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/ccio-dma.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- ccio-dma.c 25 Feb 2001 23:15:22 -0000 1.1.1.2 +++ ccio-dma.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -638,7 +638,7 @@ } -static int ccio_dma_supported( struct pci_dev *dev, dma_addr_t mask) +static int ccio_dma_supported( struct pci_dev *dev, u64 mask) { if (dev == NULL) { printk(MODULE_NAME ": EISA/ISA/et al not supported\n"); Index: ccio-rm-dma.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/ccio-rm-dma.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ccio-rm-dma.c 14 Jan 2001 19:56:04 -0000 1.1.1.1 +++ ccio-rm-dma.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -93,7 +93,7 @@ } -static int ccio_dma_supported( struct pci_dev *dev, dma_addr_t mask) +static int ccio_dma_supported( struct pci_dev *dev, u64 mask) { if (dev == NULL) { printk(MODULE_NAME ": EISA/ISA/et al not supported\n"); Index: init_task.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/init_task.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- init_task.c 14 Jan 2001 19:56:23 -0000 1.1.1.1 +++ init_task.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -6,7 +6,6 @@ #include <asm/pgtable.h> #include <asm/pgalloc.h> -static struct vm_area_struct init_mmap = INIT_MMAP; static struct fs_struct init_fs = INIT_FS; static struct files_struct init_files = INIT_FILES; static struct signal_struct init_signals = INIT_SIGNALS; Index: irq.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/irq.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 Index: pci-dma.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/pci-dma.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- pci-dma.c 25 Feb 2001 23:15:22 -0000 1.1.1.2 +++ pci-dma.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -77,7 +77,7 @@ static inline void dump_resmap(void) {;} #endif -static int pa11_dma_supported( struct pci_dev *dev, dma_addr_t mask) +static int pa11_dma_supported( struct pci_dev *dev, u64 mask) { return 1; } Index: pci.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/pci.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: pdc_cons.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/pdc_cons.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- pdc_cons.c 14 Jan 2001 19:56:45 -0000 1.1.1.1 +++ pdc_cons.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -141,11 +141,7 @@ --pdc_console_initialized; #ifdef CONFIG_VT_CONSOLE - { - /* fixme (needed?): Wait for console-tasklet to finish !*/ - extern struct tasklet_struct console_tasklet; - tasklet_schedule(&console_tasklet); - } + schedule_console_callback(); #endif unregister_console(&pdc_cons); Index: ptrace.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/ptrace.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- ptrace.c 14 Jan 2001 19:56:47 -0000 1.1.1.1 +++ ptrace.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -31,6 +31,20 @@ #define PT_SINGLESTEP 0x10000 #define PT_BLOCKSTEP 0x20000 +/* + * Called by kernel/ptrace.c when detaching.. + * + * Make sure single step bits etc are not set. + */ +void ptrace_disable(struct task_struct *child) +{ + /* make sure the trap bits are not set */ + pa_psw(child)->r = 0; + pa_psw(child)->t = 0; + pa_psw(child)->h = 0; + pa_psw(child)->l = 0; +} + long sys_ptrace(long request, pid_t pid, long addr, long data) { struct task_struct *child; @@ -61,32 +75,7 @@ goto out_tsk; if (request == PTRACE_ATTACH) { - if (child == current) - goto out_tsk; - if ((!child->dumpable || - (current->uid != child->euid) || - (current->uid != child->suid) || - (current->uid != child->uid) || - (current->gid != child->egid) || - (current->gid != child->sgid) || - (!cap_issubset(child->cap_permitted, current->cap_permitted)) || - (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE)) - goto out_tsk; - /* the same process cannot be attached many times */ - if (child->ptrace & PT_PTRACED) - goto out_tsk; - child->ptrace |= PT_PTRACED; - if (child->p_pptr != current) { - unsigned long flags; - - write_lock_irqsave(&tasklist_lock, flags); - REMOVE_LINKS(child); - child->p_pptr = current; - SET_LINKS(child); - write_unlock_irqrestore(&tasklist_lock, flags); - } - send_sig(SIGSTOP, child, 1); - ret = 0; + ret = ptrace_attach(child); goto out_tsk; } ret = -ESRCH; @@ -251,17 +240,8 @@ goto out_wake; case PTRACE_DETACH: - ret = -EIO; - if ((unsigned long) data > _NSIG) - goto out_tsk; - child->ptrace &= ~(PT_PTRACED|PT_TRACESYS|PT_SINGLESTEP|PT_BLOCKSTEP); - child->exit_code = data; - write_lock_irq(&tasklist_lock); - REMOVE_LINKS(child); - child->p_pptr = child->p_opptr; - SET_LINKS(child); - write_unlock_irq(&tasklist_lock); - goto out_wake_notrap; + ret = ptrace_detach(child, data); + goto out_tsk; default: ret = -EIO; Index: sba_iommu.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/sba_iommu.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- sba_iommu.c 25 Feb 2001 23:15:23 -0000 1.1.1.2 +++ sba_iommu.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -779,7 +779,7 @@ } static int -sba_dma_supported( struct pci_dev *dev, dma_addr_t mask) +sba_dma_supported( struct pci_dev *dev, u64 mask) { if (dev == NULL) { printk(MODULE_NAME ": EISA/ISA/et al not supported\n"); Index: semaphore.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/semaphore.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- semaphore.c 14 Jan 2001 19:56:55 -0000 1.1.1.1 +++ semaphore.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -129,111 +129,3 @@ { return waking_non_zero_trylock(sem); } - - -/* Wait for the lock to become unbiased. Readers - * are non-exclusive. =) - */ -void down_read_failed(struct rw_semaphore *sem) -{ - DECLARE_WAITQUEUE(wait, current); - - __up_read(sem); /* this takes care of granting the lock */ - - add_wait_queue(&sem->wait, &wait); - - while (atomic_read(&sem->count) < 0) { - set_task_state(current, TASK_UNINTERRUPTIBLE); - if (atomic_read(&sem->count) >= 0) - break; - schedule(); - } - - remove_wait_queue(&sem->wait, &wait); - current->state = TASK_RUNNING; -} - -void down_read_failed_biased(struct rw_semaphore *sem) -{ - DECLARE_WAITQUEUE(wait, current); - - add_wait_queue(&sem->wait, &wait); /* put ourselves at the head of the list */ - - for (;;) { - if (sem->read_bias_granted && xchg(&sem->read_bias_granted, 0)) - break; - set_task_state(current, TASK_UNINTERRUPTIBLE); - if (!sem->read_bias_granted) - schedule(); - } - - remove_wait_queue(&sem->wait, &wait); - current->state = TASK_RUNNING; -} - - -/* Wait for the lock to become unbiased. Since we're - * a writer, we'll make ourselves exclusive. - */ -void down_write_failed(struct rw_semaphore *sem) -{ - DECLARE_WAITQUEUE(wait, current); - - __up_write(sem); /* this takes care of granting the lock */ - - add_wait_queue_exclusive(&sem->wait, &wait); - - while (atomic_read(&sem->count) < 0) { - set_task_state(current, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); - if (atomic_read(&sem->count) >= 0) - break; /* we must attempt to aquire or bias the lock */ - schedule(); - } - - remove_wait_queue(&sem->wait, &wait); - current->state = TASK_RUNNING; -} - -void down_write_failed_biased(struct rw_semaphore *sem) -{ - DECLARE_WAITQUEUE(wait, current); - - add_wait_queue_exclusive(&sem->write_bias_wait, &wait); /* put ourselves at the end of the list */ - - for (;;) { - if (sem->write_bias_granted && xchg(&sem->write_bias_granted, 0)) - break; - set_task_state(current, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE); - if (!sem->write_bias_granted) - schedule(); - } - - remove_wait_queue(&sem->write_bias_wait, &wait); - current->state = TASK_RUNNING; - - /* if the lock is currently unbiased, awaken the sleepers - * FIXME: this wakes up the readers early in a bit of a - * stampede -> bad! - */ - if (atomic_read(&sem->count) >= 0) - wake_up(&sem->wait); -} - - -/* Called when someone has done an up that transitioned from - * negative to non-negative, meaning that the lock has been - * granted to whomever owned the bias. - */ -void rwsem_wake_readers(struct rw_semaphore *sem) -{ - if (xchg(&sem->read_bias_granted, 1)) - BUG(); - wake_up(&sem->wait); -} - -void rwsem_wake_writer(struct rw_semaphore *sem) -{ - if (xchg(&sem->write_bias_granted, 1)) - BUG(); - wake_up(&sem->write_bias_wait); -} Index: setup.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/setup.c,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 Index: sys_parisc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/sys_parisc.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- sys_parisc.c 14 Jan 2001 19:57:00 -0000 1.1.1.1 +++ sys_parisc.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -51,7 +51,7 @@ struct file * file = NULL; int error; - down(¤t->mm->mmap_sem); + down_write(¤t->mm->mmap_sem); lock_kernel(); if (!(flags & MAP_ANONYMOUS)) { error = -EBADF; @@ -65,7 +65,7 @@ fput(file); out: unlock_kernel(); - up(¤t->mm->mmap_sem); + up_write(¤t->mm->mmap_sem); return error; } Index: traps.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/kernel/traps.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- traps.c 14 Jan 2001 19:57:06 -0000 1.1.1.1 +++ traps.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -82,7 +82,7 @@ printk(" YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI\nPSW: "); printbinary(regs->gr[0], 32); - printk("\n"); + printk(" %s\n", print_tainted()); for (i = 0; i < 32; i += 4) { int j; |
From: Andy P. <at...@us...> - 2002-04-09 17:07:25
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/parisc/hpux In directory usw-pr-cvs1:/tmp/cvs-serv15874/parisc/hpux Modified Files: entry_hpux.S fs.c sys_hpux.c Log Message: synch 2.4.15 commit 30 Index: entry_hpux.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/hpux/entry_hpux.S,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- entry_hpux.S 14 Jan 2001 19:57:15 -0000 1.1.1.1 +++ entry_hpux.S 9 Apr 2002 17:07:19 -0000 1.2 @@ -6,8 +6,6 @@ */ -#define ASSEMBLY - #include <linux/sys.h> #include <linux/linkage.h> #include <asm/unistd.h> Index: fs.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/hpux/fs.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- fs.c 14 Jan 2001 19:57:16 -0000 1.1.1.1 +++ fs.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -52,7 +52,7 @@ #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) #define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1)) -static int filldir(void * __buf, const char * name, int namlen, off_t offset, ino_t ino) +static int filldir(void * __buf, const char * name, int namlen, loff_t offset, ino_t ino) { struct hpux_dirent * dirent; struct getdents_callback * buf = (struct getdents_callback *) __buf; Index: sys_hpux.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/hpux/sys_hpux.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- sys_hpux.c 14 Jan 2001 19:57:17 -0000 1.1.1.1 +++ sys_hpux.c 9 Apr 2002 17:07:19 -0000 1.2 @@ -109,9 +109,11 @@ lock_kernel(); s = get_super(to_kdev_t(dev)); + unlock_kernel(); if (s == NULL) goto out; err = vfs_statfs(s, &sbuf); + drop_super(s); if (err) goto out; @@ -124,7 +126,6 @@ /* Changed to hpux_ustat: */ err = copy_to_user(ubuf,&tmp,sizeof(struct hpux_ustat)) ? -EFAULT : 0; out: - unlock_kernel(); return err; } |
From: Andy P. <at...@us...> - 2002-04-09 17:07:25
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/parisc In directory usw-pr-cvs1:/tmp/cvs-serv15874/parisc Modified Files: config.in vmlinux.lds Log Message: synch 2.4.15 commit 30 Index: config.in =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/config.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- config.in 14 Jan 2001 19:55:55 -0000 1.1.1.1 +++ config.in 9 Apr 2002 17:07:19 -0000 1.2 @@ -7,6 +7,8 @@ define_bool CONFIG_PARISC y define_bool CONFIG_UID16 n +define_bool CONFIG_RWSEM_GENERIC_SPINLOCK y +define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM n mainmenu_option next_comment comment 'Code maturity level options' Index: vmlinux.lds =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/parisc/vmlinux.lds,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- vmlinux.lds 14 Jan 2001 19:55:54 -0000 1.1.1.1 +++ vmlinux.lds 9 Apr 2002 17:07:19 -0000 1.2 @@ -22,7 +22,7 @@ } = 0 . = ALIGN(16); - .rodata : { *(.rodata) } + .rodata : { *(.rodata) *(.rodata.*) } .kstrtab : { *(.kstrtab) } _etext = .; /* End of text section */ |
From: Andy P. <at...@us...> - 2002-04-09 16:56:18
|
Update of /cvsroot/linux-vax/kernel-2.4/Documentation/cdrom In directory usw-pr-cvs1:/tmp/cvs-serv7449/cdrom Modified Files: aztcd cdrom-standard.tex Log Message: synch 2.4.15 commit 28 Index: aztcd =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/cdrom/aztcd,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 Index: cdrom-standard.tex =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/cdrom/cdrom-standard.tex,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 |
From: Andy P. <at...@us...> - 2002-04-09 16:56:16
|
Update of /cvsroot/linux-vax/kernel-2.4/Documentation/arm In directory usw-pr-cvs1:/tmp/cvs-serv7449/arm Modified Files: README Log Message: synch 2.4.15 commit 28 Index: README =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/arm/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- README 14 Jan 2001 20:05:45 -0000 1.1.1.1 +++ README 9 Apr 2002 16:55:40 -0000 1.2 @@ -1,5 +1,5 @@ - ARM Linux 2.4.0test1 - ==================== + ARM Linux 2.4 + ============= Please check ftp.arm.linux.org.uk:/pub/armlinux for latest updates. @@ -7,9 +7,8 @@ --------------------- In order to compile ARM Linux, you will need a compiler capable of - generating ARM ELF code with GNU extensions. GCC-2.7.2.2 ELF, GCC 2.8.1 - and EGCS are good compilers. Note that GCC-2.7.2.2 ELF is rare, and - you probably don't have it. + generating ARM ELF code with GNU extensions. GCC 2.95.1 and EGCS 1.1.2 + are good compilers. To build ARM Linux natively, you shouldn't have to alter the ARCH = line in the top level Makefile. However, if you don't have the ARM Linux ELF @@ -163,7 +162,7 @@ <description of your architecture> Please follow this format - it is an automated system. You should - receive a reply within one day. + receive a reply in short order. --- -Russell King (12/06/2000) +Russell King (26/01/2001) |
Update of /cvsroot/linux-vax/kernel-2.4/Documentation/video4linux/bttv In directory usw-pr-cvs1:/tmp/cvs-serv7449/video4linux/bttv Modified Files: CARDLIST Insmod-options README Sound-FAQ Added Files: Cards README.quirks Tuners Log Message: synch 2.4.15 commit 28 --- NEW FILE --- Suppported cards: Bt848/Bt848a/Bt849/Bt878/Bt879 cards ------------------------------------ All cards with Bt848/Bt848a/Bt849/Bt878/Bt879 and normal Composite/S-VHS inputs are supported. Teletext and Intercast support (PAL only) for ALL cards via VBI sample decoding in software. Some cards with additional multiplexing of inputs are only partially supported (unless specifications by the card manufacturer are given). All other cards only differ by additional components as tuners, sound decoders, EEPROMs, teletext decoders ... MATRIX Vision ------------- MV-Delta - Bt848A - 4 Composite inputs, 1 S-VHS input (shared with 4th composite) - EEPROM http://www.matrix-vision.de/ This card has no tuner but supports all 4 composite (1 shared with an S-VHS input) of the Bt848A. Very nice card if you only have satellite TV but several tuners connected to the card via composite. Many thanks to Matrix-Vision for giving us 2 cards for free which made Bt848a/Bt849 single crytal operation support possible!!! Miro/Pinnacle PCTV ------------------ - Bt848 some (all??) come with 2 crystals for PAL/SECAM and NTSC - PAL, SECAM or NTSC TV tuner (Philips or TEMIC) - MSP34xx sound decoder on add on board decoder is supported but AFAIK does not yet work (other sound MUX setting in GPIO port needed??? somebody who fixed this???) - 1 tuner, 1 composite and 1 S-VHS input - tuner type is autodetected http://www.miro.de/ http://www.miro.com/ Many thanks for the free card which made first NTSC support possible back in 1997! Hauppauge Win/TV pci -------------------- There are many different versions of the Hauppauge cards with different tuners (TV+Radio ...), teletext decoders. Note that even cards with same model numbers have (depending on the revision) different chips on it. - Bt848 (and others but always in 2 crystal operation???) newer cards have a Bt878 - PAL, SECAM, NTSC or tuner with or without Radio support e.g.: PAL: TDA5737: VHF, hyperband and UHF mixer/oscillator for TV and VCR 3-band tuners TSA5522: 1.4 GHz I2C-bus controlled synthesizer, I2C 0xc2-0xc3 NTSC: TDA5731: VHF, hyperband and UHF mixer/oscillator for TV and VCR 3-band tuners TSA5518: no datasheet available on Philips site - Philips SAA5246 or SAA5284 ( or no) Teletext decoder chip with buffer RAM (e.g. Winbond W24257AS-35: 32Kx8 CMOS static RAM) SAA5246 (I2C 0x22) is supported - 256 bytes EEPROM: Microchip 24LC02B or Philips 8582E2Y with configuration information I2C address 0xa0 (24LC02B also responds to 0xa2-0xaf) - 1 tuner, 1 composite and (depending on model) 1 S-VHS input - 14052B: mux for selection of sound source - sound decoder: TDA9800, MSP34xx (stereo cards) CPH-Series (CPH050, ...) ------------------------ Developed by TelSignal(?), OEMed by many vendors (Askey, Typhoon, Anubis, Dynalink) Card series: CPH01x: BT848 capture only CPH03x: BT848 CPH05x: BT878 with FM CPH06x: BT878 (w/o FM) CPH07x: BT878 capture only TV standards: CPH0x0: NTSC-M/M CPH0x1: PAL-B/G CPH0x2: PAL-I/I CPH0x3: PAL-D/K CPH0x4: SECAM-L/L CPH0x5: SECAM-B/G CPH0x6: SECAM-D/K CPH0x7: PAL-N/N CPH0x8: PAL-B/H CPH0x9: PAL-M/M CPH03x was often sold as "TV capturer". Identifying: 1) 878 cards can be identified by PCI Subsystem-ID: 144f:3000 = CPH06x 144F:3002 = CPH05x w/ FM 144F:3005 = CPH06x_LC (w/o remote control) 1) The cards have a sticker with "CPH"-model on the back. 2) These cards have a number printed on the PCB just above the tuner metal box: "80-CP2000300-x" = CPH03X "80-CP2000500-x" = CPH05X "80-CP2000600-x" = CPH06X / CPH06x_LC Askey sells these cards as "Magic TView series", Brand "MagicXpress". Other OEM often call these "Tview", "TView99" or else. Lifeview Flyvideo Series: ------------------------- The naming of these series differs in time and space. Identifying: 1) Some models can be identified by PCI subsystem ID: 1852:1852 = Flyvideo 98 FM 1851:1850 = Flyvideo 98 1851:1851 = Flyvideo 98 EZ (capture only) 2) There is a print on the PCB: LR25 = Flyvideo (Zoran) LR37 Rev.C = Capture only (ZR36120 + SAA7110) LR50 Rev.Q = Flyvideo 98 (w/eeprom and PCI subsystem ID) LR50 Rev.W = Flyvideo 98 (no eeprom) LR51 Rev.E = Flyvideo 98 EZ (capture only) LR90 = Flyvideo 2000 series LR90 Rev.F = Lifetec/Medion LT 9815 LR97 = Flyvideo DVBS "Flyvideo II" had been the name for the 848 cards, nowadays (in Germany) this name is re-used for LR50 Rev.W. The Lifeview website has even more names: Flyvideo III,2100,3000,3100. These cards are sold by many OEMs too. Typhoon TV card series: ----------------------- These can be CPH, Flyvideo, Pixelview or KNC1 series. Typhoon is the brand of Anubis. Model 50680 got re-used, some model no. had different contents over time. Models: 50680 "TV Tuner PCI Pal BG"(old,red package)=can be CPH03x(bt848) or CPH06x(bt878) 50680 "TV Tuner Pal BG" (blue package)= Pixelview PV-BT878P+ (Rev 9B) 50681 "TV Tuner PCI Pal I" (variant of 50680) 50682 "TView TV/FM Tuner Pal BG" = Flyvideo 98FM (LR50 Rev.Q) Note: The package has a picture of CPH05x (which would be a real TView) 50683 "TV Tuner PCI SECAM" (variant of 50680) 50684 "TV Tuner Pal BG" = Pixelview 878TV(Rev.3D) 50686 "TV Tuner" = KNC1 TV Station 50687 "TV Tuner stereo" = KNC1 TV Station pro 50688 "TV Tuner RDS" (black package) = KNC1 TV Station RDS 50692 "TV/FM Tuner" (small PCB) 50868 "TV/FM Tuner Pal I" (variant of 50682) 50999 "TV/FM Tuner Secam" (variant of 50682) Guillemot --------- Maxi TV Video 2 = LR50 Rev.Q (FI1216MF, PAL BG+SECAM) Maxi TV Video 3 = CPH064 (PAL BG + SECAM) Mentor ------ Mentor TV card ("55-878TV-U1") = Pixelview 878TV(Rev.3F) (w/FM w/Remote) Prolink ------- Pixelview Play TV Pro: PV-BT878P+rev.9B (Play TV Pro w/FM w/NICAM) PV-BT878P+rev.8X PV-BT878P+rev.4C (Play TV Pro) PV-BT878P+rev.4E (Play TV Pak) PV-BT878P+rev.2F PV-BT878TV PixelView Play TV PV-BT848P+ Dynalink -------- These are CPH series. Phoebemicro ----------- TV Master = CPH030 or CPH060 TV Master FM = CPH050 Genius/Kye ---------- Video Wonder/Genius Internet Video Kit = LR37 Rev.C --- NEW FILE --- Below is what the bt878 data book says about the PCI bug compatibility modes of the bt878 chip. The triton1 insmod option sets the EN_TBFX bit in the control register. The vsfx insmod option does the same for EN_VSFX bit. If you have stability problems you can try if one of these options makes your box work solid. drivers/pci/quirks.c knows about these issues, this way these bits are enabled automagically for known-buggy chipsets (look at the kernel messages, bttv tells you). HTH, Gerd ---------------------------- cut here -------------------------- Normal PCI Mode --------------- The PCI REQ signal is the logical-or of the incoming function requests. The inter-nal GNT[0:1] signals are gated asynchronously with GNT and demultiplexed by the audio request signal. Thus the arbiter defaults to the video function at power-up and parks there during no requests for bus access. This is desirable since the video will request the bus more often. However, the audio will have highest bus access priority. Thus the audio will have first access to the bus even when issuing a request after the video request but before the PCI external arbiter has granted access to the Bt879. Neither function can preempt the other once on the bus. The duration to empty the entire video PCI FIFO onto the PCI bus is very short compared to the bus access latency the audio PCI FIFO can tolerate. 430FX Compatibility Mode ------------------------ When using the 430FX PCI, the following rules will ensure compatibility: (1) Deassert REQ at the same time as asserting FRAME. (2) Do not reassert REQ to request another bus transaction until after finish-ing the previous transaction. Since the individual bus masters do not have direct control of REQ, a simple logical-or of video and audio requests would violate the rules. Thus, both the arbiter and the initiator contain 430FX compatibility mode logic. To enable 430FX mode, set the EN_TBFX bit as indicated in Device Control Register on page 104. When EN_TBFX is enabled, the arbiter ensures that the two compatibility rules are satisfied. Before GNT is asserted by the PCI arbiter, this internal arbiter may still logical-or the two requests. However, once the GNT is issued, this arbiter must lock in its decision and now route only the granted request to the REQ pin. The arbiter decision lock happens regardless of the state of FRAME because it does not know when FRAME will be asserted (typically - each initiator will assert FRAME on the cycle following GNT). When FRAME is asserted, it is the initiator s responsibility to remove its request at the same time. It is the arbiters responsibility to allow this request to flow through to REQ and not allow the other request to hold REQ asserted. The decision lock may be removed at the end of the transaction: for example, when the bus is idle (FRAME and IRDY). The arbiter decision may then continue asynchronously until GNT is again asserted. Interfacing with Non-PCI 2.1 Compliant Core Logic ------------------------------------------------- A small percentage of core logic devices may start a bus transaction during the same cycle that GNT is de-asserted. This is non PCI 2.1 compliant. To ensure compatibility when using PCs with these PCI controllers, the EN_VSFX bit must be enabled (refer to Device Control Register on page 104). When in this mode, the arbiter does not pass GNT to the internal functions unless REQ is asserted. This prevents a bus transaction from starting the same cycle as GNT is de-asserted. This also has the side effect of not being able to take advantage of bus parking, thus lowering arbitration performance. The Bt879 drivers must query for these non-compliant devices, and set the EN_VSFX bit only if required. --- NEW FILE --- SAMSUNG Tuner identification: (e.g. TCPM9091PD27) TCP [ABCJLMNQ] 90[89][125] [DP] [ACD] 27 [ABCD] [ABCJLMNQ]: A= BG+DK B= BG C= I+DK J= NTSC-Japan L= Secam LL M= BG+I+DK N= NTSC Q= BG+I+DK+LL [125]: 2: No FM 5: With FM [DP]: D= NTSC P= PAL [ACD]: A= F-connector C= Phono connector D= Din Jack [ABCD]: 3-wire/I2C tuning, 2-band/3-band Philips Tuner identification: (e.g. FM1216MF) F[IRMQ]12[1345]{MF|ME|MP} [IRMQ]: I: Tuner Series R: Tuner + Radio IF M: Tuner + FM Q,MR: specials TD15xx: Digital Tuner ATSC [1345] 1: PAL BG 3: NTSC 4: PAL I 5: Pal DK {MF|ME|MP} MF: w/ Secam ME: BD DK I LL MP: BG DK I MR: BG DK M (?) MG: BG DKI M (?) Temic Tuner identification: (.e.g 4006FH5) 4[01][0136][269]F[HYNR]5 40x2: Tuner (5V/33V), different I2C programming from Philips ! 40x6: Tuner 5V 41xx: Tuner compact 40x9: Tuner+FM compact [0136] 0: PAL BG 1: Pal DK, Secam LL 3: NTSC 6: PAL I F[HYNR]5 FH5: Pal BG FY5: others FN5: multistandard FR5: w/ FM radio 3X xxxx: order number with specific connector LG Innotek Tuner: TPI8NSR11 : NTSC J/M (TPI8NSR01 w/FM) (P,210/497) TPI8PSB11 : PAL B/G (TPI8PSB01 w/FM) (P,170/450) TAPC-I701 : PAL I (TAPC-I001 w/FM) (P,170/450) TPI8PSB12 : PAL D/K+B/G (TPI8PSB02 w/FM) (P,170/450) TAPC-H701P: NTSC_JP (TAPC-H001P w/FM) (L,170/450) TAPC-G701P: PAL B/G (TAPC-G001P w/FM) (L,170/450) TAPC-W701P: PAL I (TAPC-W001P w/FM) (L,170/450) TAPC-Q703P: PAL D/K (TAPC-Q001P w/FM) (L,170/450) TAPC-Q704P: PAL D/K+I (L,170/450) TAPC-G702P: PAL D/K+B/G (L,170/450) TADC-H002F: NTSC (L,175/410?; 2-B, C-W+11, W+12-69) TADC-M201D: PAL D/K+B/G+I (L,143/425) (sound control at I2C address 0xc8) TADC-T003F: NTSC Taiwan (L,175/410?; 2-B, C-W+11, W+12-69) (API,Lo-Hi-takeover/Hi-UHF-takeover) I2C APIs: L= LG programming (VHF_LO=0x01, VHF_HI=0x02, UHF=0x08, radio=0x04) P= Philips progr. (VHF_LO=0xA0, VHF_HI=0x90, UHF=0x30, radio=0x04) T= Temic progr. (VHF_LO=0x02, VHF_HI=0x04, UHF=0x01) Suffix: P= Standard phono female socket D= IEC female socket F= F-connector Index: CARDLIST =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/video4linux/bttv/CARDLIST,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- CARDLIST 25 Feb 2001 23:15:25 -0000 1.1.1.2 +++ CARDLIST 9 Apr 2002 16:55:47 -0000 1.2 @@ -1,15 +1,15 @@ bttv.o - card=0 - *** UNKNOWN *** + card=0 - *** UNKNOWN/GENERIC *** card=1 - MIRO PCTV - card=2 - Hauppauge old + card=2 - Hauppauge (bt848) card=3 - STB card=4 - Intel card=5 - Diamond DTV2000 card=6 - AVerMedia TVPhone card=7 - MATRIX-Vision MV-Delta - card=8 - Fly Video II + card=8 - Fly Video II (Bt848) card=9 - TurboTV - card=10 - Hauppauge new (bt878) + card=10 - Hauppauge (bt878) card=11 - MIRO PCTV pro card=12 - ADS Technologies Channel Surfer TV card=13 - AVerMedia TVCapture 98 @@ -23,7 +23,7 @@ card=21 - Lucky Star Image World ConferenceTV card=22 - Phoebe Tv Master + FM card=23 - Modular Technology MM205 PCTV, bt878 - card=24 - Askey/Typhoon/Anubis Magic TView CPH051/061 (bt878) + card=24 - [many vendors] CPH05X/06X (bt878) card=25 - Terratec/Vobis TV-Boostar card=26 - Newer Hauppauge WinCam (bt878) card=27 - MAXI TV Video PCI2 @@ -34,10 +34,10 @@ card=32 - Intel Create and Share PCI card=33 - Terratec TerraTValue card=34 - Leadtek WinFast 2000 - card=35 - Chronos Video Shuttle II - card=36 - Typhoon TView TV/FM Tuner + card=35 - Flyvideo 98 (LR50Q) / Chronos Video Shuttle II + card=36 - Flyvideo 98FM (LR50Q) / Typhoon TView TV/FM Tuner card=37 - PixelView PlayTV pro - card=38 - TView99 CPH063 + card=38 - TView99 CPH06X card=39 - Pinnacle PCTV Studio/Rave card=40 - STB2 card=41 - AVerMedia TVPhone 98 @@ -49,15 +49,29 @@ card=47 - Terratec TV/Radio+ card=48 - Dynalink Magic TView card=49 - GV-BCTV3 - card=50 - Prolink PV-BT878P+4E (PixelView PlayTV PAK) + card=50 - Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP card=51 - Eagle Wireless Capricorn2 (bt878A) card=52 - Pinnacle PCTV Studio Pro - card=53 - Typhoon TView RDS / FM Stereo - card=54 - Livetec 9415 TV + card=53 - Typhoon TView RDS + FM Stereo / KNC1 TV Station RDS + card=54 - Lifetec LT 9415 TV (LR90 Rev.F) card=55 - BESTBUY Easy TV card=56 - FlyVideo '98/FM card=57 - GrandTec 'Grand Video Capture' card=58 - Phoebe TV Master Only (No FM) + card=59 - TV Capturer + card=60 - MM100PCTV + card=61 - AG Electronics GMV1 + card=62 - BESTBUY Easy TV (bt878) + card=63 - ATI TV-Wonder + card=64 - ATI TV-Wonder VE + card=65 - FlyVideo 2000S + card=66 - Terratec TValueRadio + card=67 - GV-BCTV4/PCI + card=68 - 3Dfx VoodooTV FM (Euro), VoodooTV 200 (USA) + card=69 - Active Imaging AIMMS + card=70 - PV-BT878P+ + card=71 - Flyvideo 98EZ (capture only) + card=72 - Prolink PV-BT878P+9B (PlayTV Pro rev.9B FM+NICAM) tuner.o type=0 - Temic PAL (4002 FH5) @@ -74,7 +88,7 @@ type=11 - Alps TSBB5 type=12 - Alps TSBE5 type=13 - Alps TSBC5 - type=14 - Temic PAL_I (4006FH5) + type=14 - Temic PAL_BG (4006FH5) type=15 - Alps TSCH6 type=16 - Temic PAL_DK (4016 FY5) type=17 - Philips NTSC_M (MK2) @@ -85,3 +99,16 @@ type=22 - Temic PAL/SECAM multi (4046 FM5) type=23 - Philips PAL_DK type=24 - Philips PAL/SECAM multi (FQ1216ME) + type=25 - LG PAL_I+FM (TAPC-I001D) + type=26 - LG PAL_I (TAPC-I701D) + type=27 - LG NTSC+FM (TPI8NSR01F) + type=28 - LG PAL_BG+FM (TPI8PSB01D) + type=29 - LG PAL_BG (TPI8PSB11D) + type=30 - Temic PAL* auto + FM (4009 FN5) + type=31 - SHARP NTSC_JP (2U5JF5540) + type=32 - Samsung PAL TCPM9091PD27 + type=33 - MT2032 universal + type=34 - Temic PAL_BG (4106 FH5) + type=35 - Temic PAL_DK/SECAM_L (4012 FY5) + type=36 - Temic NTSC (4136 FY5) + type=37 - LG PAL (newer TAPC series) Index: Insmod-options =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/video4linux/bttv/Insmod-options,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- Insmod-options 25 Feb 2001 23:15:25 -0000 1.1.1.2 +++ Insmod-options 9 Apr 2002 16:55:47 -0000 1.2 @@ -1,6 +1,6 @@ bttv.o - the bt848 (grabber chip) driver + the bt848/878 (grabber chip) driver insmod args: card=n card type, see CARDLIST for a list. @@ -10,9 +10,11 @@ 0: don't use PLL 1: 28 MHz crystal installed 2: 35 MHz crystal installed - triton1=0/1 for Triton1 compatibility - Triton1 is automatically recognized - but this might also help with other chipsets + + triton1=0/1 for Triton1 (+others) compatibility + vsfx=0/1 yet another chipset bug compatibility bit + see README.quirks for details on these two. + bigendian=n Set the endianness of the gfx framebuffer. Default is native endian. fieldnr=0/1 Count fields. Some TV descrambling software @@ -20,8 +22,8 @@ 50 useless IRQs/sec. default is 0 (off). autoload=0/1 autoload helper modules (tuner, audio). default is 1 (on). - bttv_verbose=0/1/2 verbose level (at insmod time, while looking - at the hardware). default is 1. + bttv_verbose=0/1/2 verbose level (at insmod time, while + looking at the hardware). default is 1. bttv_debug=0/1 debug messages (for capture). default is 0 (off). irq_debug=0/1 irq handler debug messages. @@ -77,12 +79,32 @@ tda9850 = 1 The tea6300 can't be autodetected and is tda9855 = 1 therefore off by default, if you have tda9873 = 1 this one on your card (STB uses these) - tea6300 = 0 you have to enable it explicitly. - tea6420 = 1 The two tda985x chips use the same i2c - pic16c54 = 1 address and can't be disturgished from - each other, you might have to disable + tda9874a = 1 you have to enable it explicitly. + tea6300 = 0 The two tda985x chips use the same i2c + tea6420 = 1 address and can't be disturgished from + pic16c54 = 1 each other, you might have to disable the wrong one. debug = 1 print debug messages + + insmod args for tda9874a: + tda9874a_SIF=1/2 select sound IF input pin (1 or 2) + (default is pin 1) + tda9874a_STD=n select TV sound standard (0..8): + 0 - A2, B/G + 1 - A2, M (Korea) + 2 - A2, D/K (1) + 3 - A2, D/K (2) + 4 - A2, D/K (3) + 5 - NICAM, I + 6 - NICAM, B/G + 7 - NICAM, D/K (default) + 8 - NICAM, L + + Note: tda9874a is very similar to tda9874 (without 'A'-suffix), but + this driver will not work for the latter device (will not load). + Note: tda9874a and tda9875 (which is supported separately by + tda9875.o) use the same i2c address so both modules should not be + used at the same time. msp3400.o The driver for the msp34xx sound processor chips. If you have a Index: README =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/video4linux/bttv/README,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- README 25 Feb 2001 23:15:25 -0000 1.1.1.2 +++ README 9 Apr 2002 16:55:47 -0000 1.2 @@ -21,8 +21,7 @@ CONFIG_I2C_ALGOBIT=m CONFIG_VIDEO_DEV=m -The latest bttv version is available here: - http://www.strusel007.de/linux/bttv/ +The latest bttv version is available from http://bytesex.org/bttv/ You'll find Ralphs original (mostly outdated) documentation in the ralphs-doc subdirectory. Index: Sound-FAQ =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/video4linux/bttv/Sound-FAQ,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- Sound-FAQ 25 Feb 2001 23:15:25 -0000 1.1.1.2 +++ Sound-FAQ 9 Apr 2002 16:55:48 -0000 1.2 @@ -109,6 +109,30 @@ in = _in_put bits of the data register, i.e. BT848_GPIO_DATA & ~BT848_GPIO_OUT_EN + + +Other elements of the tvcards array +=================================== + +If you are trying to make a new card work you might find it useful to +know what the other elements in the tvcards array are good for: + +video_inputs - # of video inputs the card has +audio_inputs - historical cruft, not used any more. +tuner - which input is the tuner +svhs - which input is svhs (all others are labled composite) +muxsel - video mux, input->registervalue mapping +pll - same as pll= insmod option +tuner_type - same as tuner= insmod option +*_modulename - hint whenever some card needs this or that audio + module loaded to work properly. +has_radio - whenever this TV card has a radio tuner. + +If some config item is specified both from the tvcards array and as +insmod option, the insmod option takes precedence. + + + Good luck, Gerd @@ -117,4 +141,4 @@ PS: If you have a new working entry, mail it to me. -- -Gerd Knorr <kr...@go...> +Gerd Knorr <kr...@by...> |
From: Andy P. <at...@us...> - 2002-04-09 16:55:53
|
Update of /cvsroot/linux-vax/kernel-2.4/Documentation/usb In directory usw-pr-cvs1:/tmp/cvs-serv7449/usb Modified Files: CREDITS error-codes.txt hotplug.txt scanner.txt uhci.txt usb-serial.txt Added Files: hiddev.txt philips.txt se401.txt Removed Files: input.txt Log Message: synch 2.4.15 commit 28 --- NEW FILE --- Care and feeding of your Human Interface Devices INTRODUCTION In addition to the normal input type HID devices, USB also uses the human interface device protocols for things that are not really human interfaces, but have similar sorts of communication needs. The two big examples for this are power devices (especially uninterruptable power supplies) and monitor control on higher end monitors. To support these disparite requirements, the Linux USB system provides HID events to two seperate interfaces: * the input subsystem, which converts HID events into normal input device interfaces (such as keyboard, mouse and joystick) and a normalised event interface - see Documentation/input/input.txt * the hiddev interface, which provides fairly raw HID events The data flow for a HID event produced by a device is something like the following : usb.c ---> hid.c ----> input.c ----> [keyboard/mouse/joystick/event] | | --> hiddev.c ----> POWER / MONITOR CONTROL In addition, other subsystems (apart from USB) can potentially feed events into the input subsystem, but these have no effect on the hid device interface. USING THE HID DEVICE INTERFACE The hiddev interface is a char interface using the normal USB major, with the minor numbers starting at 96 and finishing at 111. Therefore, you need the following commands: mknod /dev/usb/hiddev0 c 180 96 mknod /dev/usb/hiddev1 c 180 97 mknod /dev/usb/hiddev2 c 180 98 mknod /dev/usb/hiddev3 c 180 99 mknod /dev/usb/hiddev4 c 180 100 mknod /dev/usb/hiddev5 c 180 101 mknod /dev/usb/hiddev6 c 180 102 mknod /dev/usb/hiddev7 c 180 103 mknod /dev/usb/hiddev8 c 180 104 mknod /dev/usb/hiddev9 c 180 105 mknod /dev/usb/hiddev10 c 180 106 mknod /dev/usb/hiddev11 c 180 107 mknod /dev/usb/hiddev12 c 180 108 mknod /dev/usb/hiddev13 c 180 109 mknod /dev/usb/hiddev14 c 180 110 mknod /dev/usb/hiddev15 c 180 111 So you point your hiddev compliant user-space program at the correct interface for your device, and it all just works. Assuming that you have a hiddev compliant user-space program, of course. If you need to write one, read on. THE HIDDEV API This description should be read in conjunction with the HID specification, freely available from http://www.usb.org, and conveniently linked of http://www.linux-usb.org. The hiddev API uses a read() interface, and a set of ioctl() calls. read(): This is the event interface. When the HID device performs an interrupt transfer, indicating a change of state, data will be made available at the associated hiddev device with the content of a struct hiddev_event: struct hiddev_event { unsigned hid; signed int value; }; containing the HID usage identifier for the status that changed, and the value that it was changed to. Note that the structure is defined within <linux/hiddev.h>, along with some other useful #defines and structures. ioctl(): This is the control interface. There are a number of controls: HIDIOCGVERSION - int (read) Gets the version code out of the hiddev driver. HIDIOCAPPLICATION - (none) This ioctl call returns the HID application usage associated with the hid device. The third argument to ioctl() specifies which application index to get. This is useful when the device has more than one application collection. If the index is invalid (greater or equal to the number of application collections this device has) the ioctl returns -1. You can find out beforehand how many application collections the device has from the num_applications field from the hiddev_devinfo structure. HIDIOCGDEVINFO - struct hiddev_devinfo (read) Gets a hiddev_devinfo structure which describes the device. HIDIOCGSTRING - struct struct hiddev_string_descriptor (read/write) Gets a string descriptor from the device. The caller must fill in the "index" field to indicate which descriptor should be returned. HIDIOCINITREPORT - (none) Instructs the kernel to retrieve all input and feature report values from the device. At this point, all the usage structures will contain current values for the device, and will maintain it as the device changes. HIDIOCGNAME - string (variable length) Gets the device name HIDIOCGREPORT - struct hiddev_report_info (write) Instructs the kernel to get a feature or input report from the device, in order to selectively update the usage structures (in contrast to INITREPORT). HIDIOCSREPORT - struct hiddev_report_info (write) Instructs the kernel to send a report to the device. This report can be filled in by the user through HIDIOCSUSAGE calls (below) to fill in individual usage values in the report beforesending the report in full to the device. HIDIOCGREPORTINFO - struct hiddev_report_info (read/write) Fills in a hiddev_report_info structure for the user. The report is looked up by type (input, output or feature) and id, so these fields must be filled in by the user. The ID can be absolute -- the actual report id as reported by the device -- or relative -- HID_REPORT_ID_FIRST for the first report, and (HID_REPORT_ID_NEXT | report_id) for the next report after report_id. Without a-priori information about report ids, the right way to use this ioctl is to use the relative IDs above to enumerate the valid IDs. The ioctl returns non-zero when there is no more next ID. The real report ID is filled into the returned hiddev_report_info structure. HIDIOCGFIELDINFO - struct hiddev_field_info (read/write) Returns the field information associated with a report in a hiddev_field_info structure. The user must fill in report_id and report_type in this structure, as above. The field_index should also be filled in, which should be a number from 0 and maxfield-1, as returned from a previous HIDIOCGREPORTINFO call. HIDIOCGUCODE - struct hiddev_usage_ref (read/write) Returns the usage_code in a hiddev_usage_ref structure, given that given its report type, report id, field index, and index within the field have already been filled into the structure. HIDIOCGUSAGE - struct hiddev_usage_ref (read/write) Returns the value of a usage in a hiddev_usage_ref structure. The usage to be retrieved can be specified as above, or the user can choose to fill in the report_type field and specify the report_id as HID_REPORT_ID_UNKNOWN. In this case, the hiddev_usage_ref will be filled in with the report and field infomation associated with this usage if it is found. HIDIOCSUSAGE - struct hiddev_usage_ref (write) Sets the value of a usage in an output report. --- NEW FILE --- This file contains some additional information for the Philips webcams. E-mail: we...@sm... Last updated: 2001-07-27 The main webpage for the Philips driver is http://www.smcc.demon.nl/webcam/. It contains a lot of extra information, a FAQ, and the binary plugin 'PWCX'. This plugin contains decompression routines that allow you to use higher image sizes and framerates; in addition the webcam uses less bandwidth on the USB bus (handy if you want to run more than 1 camera simultaneously). These routines fall under an NDA, and may therefor not be distributed as source; however, its use is completely optional. You can build this code either into your kernel, or as a module. I recommend the latter, since it makes troubleshooting a lot easier. The built-in microphone is supported through the USB Audio class. (Taken from install.html) When you load the module you can set some default settings for the camera; some programs depend on a particular image-size or -format. The options are: size Can be one of 'sqcif', 'qsif', 'qcif', 'sif', 'cif' or 'vga', for an image size of resp. 128x96, 160x120, 176x144, 320x240, 352x288 and 640x480 (of course, only for those cameras that support these resolutions). fps Specifies the desired framerate. Is an integer in the range of 4-30. fbufs This paramter specifies the number of internal buffers to use for storing frames from the cam. This will help if the process that reads images from the cam is a bit slow or momentarely busy. However, on slow machines it only introduces lag, so choose carefully. The default is 3, which is reasonable. You can set it between 2 and 5. mbufs This is an integer between 1 and 4. It will tell the module the number of buffers to reserve for mmap(), VIDIOCCGMBUF, VIDIOCMCAPTURE and friends. The default is 2, which is adequate for most applications (double buffering). Should you experience a lot of 'Dumping frame...' messages during grabbing with a tool that uses mmap(), you might want to increase if. However, it doesn't really buffer images, it just gives you a bit more slack when your program is behind. But you need a multi-threaded or forked program to really take advantage of these buffers. The absolute maximum is 4, but don't set it too high! Every buffer takes up 1.22 MB of RAM, so unless you have a lot of memory setting this to something more than 2 is an absolute waste. This memory is only allocated during open(), so nothing is wasted when the camera is not in use. power_save When power_save is enabled (set to 1), the module will try to shut down the cam on close() and re-activate on open(). This will save power and turn off the LED. Not all cameras support this though (the 645 and 646 don't have power saving at all), and some models don't work either (they will shut down, but never wake up). Consider this experimental. By default this option is disabled. compression (only useful with the plugin) With this option you can control the compression factor that the camera uses to squeeze the image through the USB bus. You can set the parameter between 0 and 3: 0 = prefer uncompressed images; if the requested mode is not available in an uncompressed format, the driver will silently switch to low compression. 1 = low compression. 2 = medium compression. 3 = high compression. High compression takes less bandwidth of course, but it could also introduce some unwanted artefacts. The default is 2, medium compression. See the FAQ on the website for an overview of which modes require compression. The compression parameter only applies to the Vesta & ToUCam cameras. The 645 and 646 have fixed compression parameters. leds This settings takes 2 integers, that define the on/off time for the LED (in milliseconds). One of the interesting things that you can do with this is let the LED blink while the camera is in use. This: leds=500,500 will blink the LED once every second. But with: leds=0,0 the LED never goes on, making it suitable for silent survaillance. By default the camera's LED is on solid while in use, and turned off when the camera is not used anymore. This parameter works only with the ToUCam range of cameras (730, 740, 750). For other cameras this command is silently ignored, and the LED cannot be controlled. trace In order to better detect problems, it is now possible to turn on a 'trace' of some of the calls the module makes; it logs all items in your kernel log at debug level. The trace variable is a bitmask; each bit represents a certain feature. If you want to trace something, look up the bit value(s) in the table below, add the values together and supply that to the trace variable. Value Value Description Default (dec) (hex) 1 0x1 Module initialization; this will log messages On while loading and unloading the module 2 0x2 probe() and disconnect() traces On 4 0x4 Trace open() and close() calls Off 8 0x8 read(), mmap() and associated ioctl() calls Off 16 0x10 Memory allocation of buffers, etc. Off 32 0x20 Showing underflow, overflow and Dumping frame On messages 64 0x40 Show viewport and image sizes Off For example, to trace the open() & read() fuctions, sum 8 + 4 = 12, so you would supply trace=12 during insmod or modprobe. If you want to turn the initialization and probing tracing off, set trace=0. The default value for trace is 35 (0x23). Example: # modprobe pwc size=cif fps=15 power_save=1 The fbufs, mbufs and trace parameters are global and apply to all connected cameras. Each camera has its own set of buffers. size, fps, palette only specify defaults when you open() the device; this is to accommodate some tools that don't set the size or colour palette. You can change these settings after open() with the Video4Linux ioctl() calls. The default of defaults is QCIF size at 10 fps, BGR order. The compression parameter is semiglobal; it sets the initial compression preference for all camera's, but this parameter can be set per camera with the VIDIOCPWCSCQUAL ioctl() call. All parameters are optional. --- NEW FILE --- Linux driver for SE401 based USB cameras Copyright, 2001, Jeroen Vreeken INTRODUCTION: The SE401 chip is the used in low-cost usb webcams. It is produced by Endpoints Inc. (www.endpoints.com). It interfaces directly to a cmos image sensor and USB. The only other major part in a se401 based camera is a dram chip. The following cameras are known to work with this driver: Aox se401 (non-branded) cameras Philips PVCV665 USB VGA webcam 'Vesta Fun' Kensington VideoCAM PC Camera Model 67014 Kensington VideoCAM PC Camera Model 67015 Kensington VideoCAM PC Camera Model 67016 Kensington VideoCAM PC Camera Model 67017 WHAT YOU NEED: - USB support - VIDEO4LINUX support More information about USB support for linux can be found at: http://www.linux-usb.org MODULE OPTIONS: When the driver is compiled as a module you can also use the 'flickerless' option. With it exposure is limited to values that do not interfere with the net frequency. Valid options for this option are 0, 50 and 60. (0=disable, 50=50hz, 60=60hz) KNOWN PROBLEMS: The driver works fine with the usb-ohci and uhci host controller drivers, the default settings also work with usb-uhci. But sending more then one bulk transfer at a time with usb-uhci doesn't work yet. Users of usb-ohci and uhci can safely enlarge SE401_NUMSBUF in se401.h in order to increase the throughput (and thus framerate). HELP: The latest info on this driver can be found at: http://www.chello.nl/~j.vreeken/se401/ And questions to me can be send to: pe...@am... Index: CREDITS =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/usb/CREDITS,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- CREDITS 14 Jan 2001 20:06:45 -0000 1.1.1.1 +++ CREDITS 9 Apr 2002 16:55:47 -0000 1.2 @@ -8,7 +8,7 @@ David Brownell <dbr...@us...> Alan Cox <al...@lx...> Randy Dunlap <ran...@in...> - Johannes Erdfelt <jer...@sv...> + Johannes Erdfelt <joh...@er...> Deti Fliegl <de...@fl...> ham <ha...@un...> Bradley M Keryan <ke...@an...> Index: error-codes.txt =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/usb/error-codes.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- error-codes.txt 14 Jan 2001 20:06:49 -0000 1.1.1.1 +++ error-codes.txt 9 Apr 2002 16:55:47 -0000 1.2 @@ -79,8 +79,7 @@ -EILSEQ CRC mismatch USB_ST_STALL --EPIPE a) babble detect - b) endpoint stalled +-EPIPE endpoint stalled USB_ST_BUFFEROVERRUN -ECOMM During an IN transfer, the host controller @@ -95,7 +94,7 @@ USB_ST_DATAOVERRUN -EOVERFLOW The amount of data returned by the endpoint was greater than either the max packet size of the - endpoint or the remaining buffer size + endpoint or the remaining buffer size. "Babble". USB_ST_DATAUNDERRUN -EREMOTEIO The endpoint returned less than max packet size Index: hotplug.txt =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/usb/hotplug.txt,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- hotplug.txt 25 Feb 2001 23:15:25 -0000 1.1.1.2 +++ hotplug.txt 9 Apr 2002 16:55:47 -0000 1.2 @@ -69,7 +69,10 @@ If "usbdevfs" is configured, DEVICE and DEVFS are also passed. DEVICE is the pathname of the device, and is useful for devices with multiple and/or -alternate interfaces that complicate driver selection. +alternate interfaces that complicate driver selection. By design, USB +hotplugging is independent of "usbdevfs": you can do most essential parts +of USB device setup without using that filesystem, and without running a +user mode daemon to detect changes in system configuration. Currently available policy agent implementations can load drivers for modules, and can invoke driver-specific setup scripts. The newest ones @@ -85,14 +88,26 @@ See <linux/usb.h> for full information about such table entries; or look at existing drivers. Each table entry describes one or more criteria to -be used when matching a driver to a device or class of devices. +be used when matching a driver to a device or class of devices. The +specific criteria are identified by bits set in "match_flags", paired +with field values. You can construct the criteria directly, or with +macros such as these, and use driver_info to store more information. + + USB_DEVICE (vendorId, productId) + ... matching devices with specified vendor and product ids + USB_DEVICE_VER (vendorId, productId, lo, hi) + ... like USB_DEVICE with lo <= productversion <= hi + USB_INTERFACE_INFO (class, subclass, protocol) + ... matching specified interface class info + USB_DEVICE_INFO (class, subclass, protocol) + ... matching specified device class info A short example, for a driver that supports several specific USB devices and their quirks, might have a MODULE_DEVICE_TABLE like this: static const struct usb_device_id mydriver_id_table = { - { idVendor: 0x9999, idProduct 0xaaaa, driver_info: QUIRK_X }, - { idVendor: 0xbbbb, idProduct 0x8888, driver_info: QUIRK_Y|QUIRK_Z }, + { USB_DEVICE (0x9999, 0xaaaa), driver_info: QUIRK_X }, + { USB_DEVICE (0xbbbb, 0x8888), driver_info: QUIRK_Y|QUIRK_Z }, ... { } /* end with an all-zeroes entry */ } Index: scanner.txt =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/usb/scanner.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- scanner.txt 14 Jan 2001 20:06:54 -0000 1.1.1.1 +++ scanner.txt 9 Apr 2002 16:55:47 -0000 1.2 @@ -1,9 +1,11 @@ -Copyright (C) 1999, 2000 David E. Nelson +Copyright (C) 1999, 2000 David E. Nelson <dn...@ju...> April 26, 2000 CHANGES +- Amended for linux-2.4.12 +- Updated devfs support - Amended for linux-2.3.99-pre6-3 - Appended hp_scan.c to end of this README - Removed most references to HP @@ -35,11 +37,9 @@ (Compaq and others) hardware port should work. At the time of this writing, there are two UHCI drivers and one OHCI. -A Linux development kernel (2.3.x) with USB support enabled or a -backported version to linux-2.2.x. See http://www.linux-usb.org for -more information on accomplishing this. - -A Linux kernel with USB Scanner support enabled. +A Linux kernel with USB support enabled or a backported version to +linux-2.2.x. See http://www.linux-usb.org for more information on +accomplishing this. 'lspci' which is only needed to determine the type of USB hardware available/installed in your machine. @@ -75,15 +75,15 @@ YMMV. Beginning with version 0.4 of the driver, up to 16 scanners can be -connected/used simultaneously. If you intend to use more than -one scanner at a time: +connected/used simultaneously. For devfs support, see next section. +If you intend to use more than one scanner at a time w/o devfs support: Add a device for the USB scanner: `mknod /dev/usbscanner0 c 180 48` `mknod /dev/usbscanner1 c 180 49` . . - `mknod /dev/usb/scanner15 180 63` + `mknod /dev/usbscanner15 180 63` If you foresee using only one scanner it is best to: @@ -106,6 +106,32 @@ modprobe usb-uhci modprobe scanner +DEVFS + +The later versions of the Linux kernel (2.4.8'ish) included a dynamic +device filesystem call 'devfs'. With devfs, there is no need to +create the device files as explained above; instead, they are +dynamically created for you. For USB Scanner, the device is created +in /dev/usb/scannerX where X can range from 0 to 15 depending on the +number of scanners connected to the system. + +To see if you have devfs, issue the command `cat /proc/filesytems`. +If devfs is listed you should be ready to go. You sould also have a +process running called 'devfsd'. In order to make sure, issue the +command `ps aux | grep '[d]evfsd'`. + +If you would like to maintain /dev/usbscanner0 in order to maintain +compatibility with applications, then add the following to +/etc/devfsd.conf: + +REGISTER ^usb/scanner0$ CFUNCTION GLOBAL symlink usb/scanner0 usbscanner0 +UNREGISTER ^usb/scanner0$ CFUNCTION GLOBAL unlink usbscanner0 + +Then reset the scanner (reseat the USB connector or power cycle). This +will create the necessary symlinks in /dev to /dev/usb. + +CONCLUSION + That's it. SANE should now be able to access the device. There is a small test program (hp_scan.c -- appended below) that can @@ -121,15 +147,34 @@ MESSAGES -On occasions the message 'usb_control/bulk_msg: timeout' or something -similar will appear in '/var/adm/messages' or on the console or both, -depending on how your system is configured. This is a side effect -that scanners are sometimes very slow at warming up and/or -initializing. In most cases, however, only several of these messages -should appear and is generally considered to be normal. If you see -a message of the type 'excessive NAK's received' then this should -be considered abnormal and generally indicates that the USB system is -unable to communicate with the scanner for some particular reason. +usb_control/bulk_msg: timeout -- On occasions this message will appear +in '/var/adm/messages', on the console, or both depending on how +your system is configured. This is a side effect that scanners are +sometimes very slow at warming up and/or initializing. In most cases, +however, only several of these messages should appear and is generally +considered to be normal. + +excessive NAK's received -- This message should be considered abnormal +and generally indicates that the USB system is unable to communicate +with the scanner for some particular reason. + +probe_scanner: Undetected endpoint -- The USB Scanner driver is fairly +general when it comes to communicating to scanners. Unfortunately, +some vendors have designed their scanners in one way or another that +this driver doesn't account for. + +probe_scanner: Endpoint determination failed -- This means that the +driver is unable to detect a supported configuration for means to +communicate with the scanner. See also 'probe_scanner: Undetected +endpoint'. + +funky result -- Most of the time the data flow between the computer +and the scanner goes smoothly. However, due to whatever reason, +whether it be solar flares or stray neutrons, sometimes the +communications don't work as expected. The driver tries to handle +most types of errors but not all. When this message is seen, +something weird happened. Please contact the maintaner listed at the +top of this file. SUPPORTED SCANNERS Index: uhci.txt =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/usb/uhci.txt,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 Index: usb-serial.txt =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/usb/usb-serial.txt,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- usb-serial.txt 25 Feb 2001 23:15:25 -0000 1.1.1.2 +++ usb-serial.txt 9 Apr 2002 16:55:47 -0000 1.2 @@ -44,28 +44,33 @@ device, including providing a unit to test with. This driver will end up being fully supported. -Current status: - The device's firmware is downloaded on connection, the new firmware - runs properly and all four ports are successfully recognized and connected. - Data can be sent and received through the device on all ports. - Hardware flow control needs to be implemented. + Current status: + The device's firmware is downloaded on connection, the new firmware + runs properly and all four ports are successfully recognized and connected. + Data can be sent and received through the device on all ports. + Hardware flow control needs to be implemented. + For any questions or problems with this driver, please contact Greg + Kroah-Hartman at gr...@kr... -HandSpring Visor USB docking station - -Current status: - Only when the Visor tries to connect to the host, does the docking - station show up as a valid USB device. When this happens, the device is + +HandSpring Visor, Palm USB, and Clié USB driver + + This driver works with all HandSpring USB, Palm USB, and Sony Clié USB + devices. + + Only when the device tries to connect to the host, will the device show + up to the host as a valid USB device. When this happens, the device is properly enumerated, assigned a port, and then communication _should_ be possible. The driver cleans up properly when the device is removed, or - the connection is canceled on the Visor. + the connection is canceled on the device. NOTE: - This means that in order to talk to the Visor, the sync button must be - pressed BEFORE trying to get any program to communicate to the Visor. + This means that in order to talk to the device, the sync button must be + pressed BEFORE trying to get any program to communicate to the device. This goes against the current documentation for pilot-xfer and other packages, but is the only way that it will work due to the hardware - in the Visor. + in the device. When the device is connected, try talking to it on the second port (this is usually /dev/ttyUSB1 if you do not have any other usb-serial @@ -73,37 +78,49 @@ the port to use for the HotSync transfer. The "Generic" port can be used for other device communication, such as a PPP link. + For some Sony Clié devices, /dev/ttyUSB0 must be used to talk to the + device. This is true for all OS version 3.5 devices, and most devices + that have had a flash upgrade to a newer version of the OS. See the + kernel system log for information on which is the correct port to use. + If after pressing the sync button, nothing shows up in the system log, - try resetting the Visor, first a hot reset, and then a cold reset if - necessary. Some Visors need this before they can talk to the USB port + try resetting the device, first a hot reset, and then a cold reset if + necessary. Some devices need this before they can talk to the USB port properly. - There is a webpage and mailing lists for this portion of the driver at: + There is a webpage and mailing lists for this portion of the driver at: http://usbvisor.sourceforge.net/ + For any questions or problems with this driver, please contact Greg + Kroah-Hartman at gr...@kr... + Keyspan PDA Serial Adapter Single port DB-9 serial adapter, pushed as a PDA adapter for iMacs (mostly sold in Macintosh catalogs, comes in a translucent white/green dongle). Fairly simple device. Firmware is homebrew. + This driver also works for the Xircom/Entrgra single port serial adapter. + + Current status: + Things that work: + basic input/output (tested with 'cu') + blocking write when serial line can't keep up + changing baud rates (up to 115200) + getting/setting modem control pins (TIOCM{GET,SET,BIS,BIC}) + sending break (although duration looks suspect) + Things that don't: + device strings (as logged by kernel) have trailing binary garbage + device ID isn't right, might collide with other Keyspan products + changing baud rates ought to flush tx/rx to avoid mangled half characters + Big Things on the todo list: + parity, 7 vs 8 bits per char, 1 or 2 stop bits + HW flow control + not all of the standard USB descriptors are handled: Get_Status, Set_Feature + O_NONBLOCK, select() -Current status: - Things that work: - basic input/output (tested with 'cu') - blocking write when serial line can't keep up - changing baud rates (up to 115200) - getting/setting modem control pins (TIOCM{GET,SET,BIS,BIC}) - sending break (although duration looks suspect) - Things that don't: - device strings (as logged by kernel) have trailing binary garbage - device ID isn't right, might collide with other Keyspan products - changing baud rates ought to flush tx/rx to avoid mangled half characters - Big Things on the todo list: - parity, 7 vs 8 bits per char, 1 or 2 stop bits - HW flow control - not all of the standard USB descriptors are handled: Get_Status, Set_Feature - O_NONBLOCK, select() + For any questions or problems with this driver, please contact Brian + Warner at wa...@lo... Keyspan USA-series Serial Adapters @@ -111,19 +128,22 @@ Single, Dual and Quad port adapters - driver uses Keyspan supplied firmware and is being developed with their support. -Current status: - The USA-18X, USA-28X, USA-19, USA-19W and USA-49W are supported and - have been pretty throughly tested at various baud rates with 8-N-1 - character settings. Other character lengths and parity setups are - presently untested. - - The USA-28 isn't yet supported though doing so should be pretty - straightforward. Contact the maintainer if you require this - functionality. + Current status: + The USA-18X, USA-28X, USA-19, USA-19W and USA-49W are supported and + have been pretty throughly tested at various baud rates with 8-N-1 + character settings. Other character lengths and parity setups are + presently untested. + + The USA-28 isn't yet supported though doing so should be pretty + straightforward. Contact the maintainer if you require this + functionality. More information is available at: - http://www.linuxcare.com.au/hugh/keyspan.html + http://misc.nu/hugh/keyspan.html + For any questions or problems with this driver, please contact Hugh + Blemings at hu...@mi... + FTDI Single Port Serial Driver @@ -131,6 +151,9 @@ device and the Linux driver can be found at: http://reality.sgi.com/bryder_wellington/ftdi_sio/ + For any questions or problems with this driver, please contact Bill Ryder + at br...@sg... + ZyXEL omni.net lcd plus ISDN TA @@ -162,67 +185,123 @@ Belkin USB Serial Adapter F5U103 Single port DB-9/PS-2 serial adapter from Belkin with firmware by eTEK Labs. - The Peracom single port serial adapter also works with this driver. + The Peracom single port serial adapter also works with this driver, as + well as the GoHubs adapter. + + Current status: + The following have been tested and work: + Baud rate 300-230400 + Data bits 5-8 + Stop bits 1-2 + Parity N,E,O,M,S + Handshake None, Software (XON/XOFF), Hardware (CTSRTS,CTSDTR)* + Break Set and clear + Line contrl Input/Output query and control ** + + * Hardware input flow control is only enabled for firmware + levels above 2.06. Read source code comments describing Belkin + firmware errata. Hardware output flow control is working for all + firmware versions. + ** Queries of inputs (CTS,DSR,CD,RI) show the last + reported state. Queries of outputs (DTR,RTS) show the last + requested state and may not reflect current state as set by + automatic hardware flow control. + + TO DO List: + -- Add true modem contol line query capability. Currently tracks the + states reported by the interrupt and the states requested. + -- Add error reporting back to application for UART error conditions. + -- Add support for flush ioctls. + -- Add everything else that is missing :) -Current status: - The following have been tested and work: - Baud rate 300-230400 - Data bits 5-8 - Stop bits 1-2 - Parity N,E,O,M,S - Handshake None, Software (XON/XOFF), Hardware (CTSRTS,CTSDTR)* - Break Set and clear - Line contrl Input/Output query and control ** - - * Hardware input flow control is only enabled for firmware - levels above 2.06. Read source code comments describing Belkin - firmware errata. Hardware output flow control is working for all - firmware versions. - ** Queries of inputs (CTS,DSR,CD,RI) show the last - reported state. Queries of outputs (DTR,RTS) show the last - requested state and may not reflect current state as set by - automatic hardware flow control. - -TO DO List: - -- Add true modem contol line query capability. Currently tracks the - states reported by the interrupt and the states requested. - -- Add error reporting back to application for UART error conditions. - -- Add support for flush ioctls. - -- Add everything else that is missing :) + For any questions or problems with this driver, please contact William + Greathouse at wgr...@sm... -Empeg empeg-car Mark I/II Driver (empeg.c) +Empeg empeg-car Mark I/II Driver This is an experimental driver to provide connectivity support for the client synchronization tools for an Empeg empeg-car mp3 player. Tips: - * Don't forget to create the device nodes for ttyUSB{0,1,2,...} * modprobe empeg (modprobe is your friend) * emptool --usb /dev/ttyUSB0 (or whatever you named your device node) - The driver is still pretty new, so some testing 'in the wild' would be - helpful. :) + For any questions or problems with this driver, please contact Gary + Brubaker at xa...@ix... MCT USB Single Port Serial Adapter U232 - This driver is for the MCT USB-RS232 Converter (25 pin, Model No. - U232-P25) from Magic Control Technology Corp. (there is also a 9 pin - Model No. U232-P9). More information about this device can be found - at the manufacture's web-site: http://www.mct.com.tw. - - The driver is generally working, though it still needs some more - testing. It is derived from the Belkin USB Serial Adapter F5U103 - driver and its TODO list is valid for this driver as well. - - This driver has also been found to work for other products, which have - the same Vendor ID but different Product IDs. Sitecom's U232-P25 - serial converter uses Product ID 0x230 and Vendor ID 0x711 and works with - this driver. Also, D-Link's DU-H3SP USB BAY also works with this driver. + This driver is for the MCT USB-RS232 Converter (25 pin, Model No. + U232-P25) from Magic Control Technology Corp. (there is also a 9 pin + Model No. U232-P9). More information about this device can be found at + the manufacture's web-site: http://www.mct.com.tw. + + The driver is generally working, though it still needs some more testing. + It is derived from the Belkin USB Serial Adapter F5U103 driver and its + TODO list is valid for this driver as well. + + This driver has also been found to work for other products, which have + the same Vendor ID but different Product IDs. Sitecom's U232-P25 serial + converter uses Product ID 0x230 and Vendor ID 0x711 and works with this + driver. Also, D-Link's DU-H3SP USB BAY also works with this driver. + + For any questions or problems with this driver, please contact Wolfgang + Grandegger at wol...@ce... + + +Inside Out Networks Edgeport Driver + + This driver supports all devices made by Inside Out Networks, specifically + the following models: + Edgeport/4 + Rapidport/4 + Edgeport/4t + Edgeport/2 + Edgeport/4i + Edgeport/2i + Edgeport/421 + Edgeport/21 + Edgeport/8 + Edgeport/8 Dual + Edgeport/2D8 + Edgeport/4D8 + Edgeport/8i + Edgeport/2 DIN + Edgeport/4 DIN + Edgeport/16 Dual + + For any questions or problems with this driver, please contact Greg + Kroah-Hartman at gr...@kr... +REINER SCT cyberJack pinpad/e-com USB chipcard reader + + Interface to ISO 7816 compatible contactbased chipcards, e.g. GSM SIMs. + + Current status: + This is the kernel part of the driver for this USB card reader. + There is also a user part for a CT-API driver available. A site + for downloading is TBA. For now, you can request it from the + maintainer (lin...@si...). + + For any questions or problems with this driver, please contact + lin...@si... + + +Prolific PL2303 Driver + + This driver support any device that has the PL2303 chip from Prolific + in it. This includes a number of single port USB to serial + converters and USB GPS devices. Devices from Aten (the UC-232) and + IO-Data work with this driver. + + For any questions or problems with this driver, please contact Greg + Kroah-Hartman at gr...@kr... + + Generic Serial driver If your device is not one of the above listed devices, compatible with @@ -242,13 +321,17 @@ development board, providing a way to develop USB firmware without having to write a custom driver. + For any questions or problems with this driver, please contact Greg + Kroah-Hartman at gr...@kr... + CONTACT: - If anyone has any problems using this driver, with any of the above - specified products, please contact me, or join the Linux-USB mailing - list (information on joining the mailing list, as well as a link to its - searchable archive is at http://www.linux-usb.org/ ) + If anyone has any problems using these drivers, with any of the above + specified products, please contact the specific driver's author listed + above, or join the Linux-USB mailing list (information on joining the + mailing list, as well as a link to its searchable archive is at + http://www.linux-usb.org/ ) Greg Kroah-Hartman --- input.txt DELETED --- |
From: Andy P. <at...@us...> - 2002-04-09 16:55:53
|
Update of /cvsroot/linux-vax/kernel-2.4/Documentation/vm In directory usw-pr-cvs1:/tmp/cvs-serv7449/vm Modified Files: locking Log Message: synch 2.4.15 commit 28 Index: locking =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Documentation/vm/locking,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- locking 14 Jan 2001 20:04:26 -0000 1.1.1.1 +++ locking 9 Apr 2002 16:55:48 -0000 1.2 @@ -4,7 +4,7 @@ from different people about how locking and synchronization is done in the Linux vm code. -page_table_lock +page_table_lock & mmap_sem -------------------------------------- Page stealers pick processes out of the process pool and scan for @@ -23,29 +23,23 @@ Any code that modifies the vmlist, or the vm_start/vm_end/ vm_flags:VM_LOCKED/vm_next of any vma *in the list* must prevent -kswapd from looking at the chain. This does not include driver mmap() -methods, for example, since the vma is still not in the list. +kswapd from looking at the chain. The rules are: -1. To modify the vmlist (add/delete or change fields in an element), -you must hold mmap_sem to guard against clones doing mmap/munmap/faults, -(ie all vm system calls and faults), and from ptrace, swapin due to -swap deletion etc. -2. To modify the vmlist (add/delete or change fields in an element), -you must also hold page_table_lock, to guard against page stealers -scanning the list. -3. To scan the vmlist (find_vma()), you must either - a. grab mmap_sem, which should be done by all cases except - page stealer. -or - b. grab page_table_lock, only done by page stealer. -4. While holding the page_table_lock, you must be able to guarantee -that no code path will lead to page stealing. A better guarantee is -to claim non sleepability, which ensures that you are not sleeping -for a lock, whose holder might in turn be doing page stealing. +1. To scan the vmlist (look but don't touch) you must hold the + mmap_sem with read bias, i.e. down_read(&mm->mmap_sem) +2. To modify the vmlist you need to hold the mmap_sem with + read&write bias, i.e. down_write(&mm->mmap_sem) *AND* + you need to take the page_table_lock. +3. The swapper takes _just_ the page_table_lock, this is done + because the mmap_sem can be an extremely long lived lock + and the swapper just cannot sleep on that. +4. The exception to this rule is expand_stack, which just + takes the read lock and the page_table_lock, this is ok + because it doesn't really modify fields anybody relies on. 5. You must be able to guarantee that while holding page_table_lock -or page_table_lock of mm A, you will not try to get either lock -for mm B. + or page_table_lock of mm A, you will not try to get either lock + for mm B. The caveats are: 1. find_vma() makes use of, and updates, the mmap_cache pointer hint. |