From: NIIBE Y. <gn...@m1...> - 2002-03-22 04:21:24
|
Include changes from mainline 2.5.6. 2002-03-22 NIIBE Yutaka <gn...@m1...> Update to 2.5.6. * AGAINST-2.5.6: New file. * AGAINST-2.5.5: Removed. * Makefile: Version 2.5.6. * Makefile, drivers/Makefile, drivers/block/rd.c, drivers/char/Config.help, drivers/char/Makefile, drivers/net/8139too.c, drivers/net/Config.help, drivers/net/Config.in, drivers/pci/pci.ids, init/do_mounts.c, mm/memory.c: Include changes from mainline (2.5.6). Index: Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/Makefile,v retrieving revision 1.10 diff -u -3 -p -r1.10 Makefile --- Makefile 22 Mar 2002 00:59:15 -0000 1.10 +++ Makefile 22 Mar 2002 04:18:29 -0000 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 5 +SUBLEVEL = 6 EXTRAVERSION = -sh KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) @@ -162,6 +162,7 @@ DRIVERS-$(CONFIG_MTD) += drivers/mtd/mtd DRIVERS-$(CONFIG_PCMCIA) += drivers/pcmcia/pcmcia.o DRIVERS-$(CONFIG_NET_PCMCIA) += drivers/net/pcmcia/pcmcia_net.o DRIVERS-$(CONFIG_NET_WIRELESS) += drivers/net/wireless/wireless_net.o +DRIVERS-$(CONFIG_NET_TULIP) += drivers/net/tulip/tulip_net.o DRIVERS-$(CONFIG_PCMCIA_CHRDEV) += drivers/char/pcmcia/pcmcia_char.o DRIVERS-$(CONFIG_DIO) += drivers/dio/dio.a DRIVERS-$(CONFIG_SBUS) += drivers/sbus/sbus_all.o Index: drivers/Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/Makefile,v retrieving revision 1.5 diff -u -3 -p -r1.5 Makefile --- drivers/Makefile 22 Mar 2002 00:59:15 -0000 1.5 +++ drivers/Makefile 22 Mar 2002 04:18:29 -0000 @@ -1,7 +1,7 @@ # # Makefile for the Linux kernel device drivers. # -# 15 Sep 2000, Christoph Hellwig <hc...@ca...> +# 15 Sep 2000, Christoph Hellwig <hc...@in...> # Rewritten to use lists instead of if-statements. # Index: drivers/block/rd.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/block/rd.c,v retrieving revision 1.4 diff -u -3 -p -r1.4 rd.c --- drivers/block/rd.c 15 Jan 2002 07:59:52 -0000 1.4 +++ drivers/block/rd.c 22 Mar 2002 04:18:29 -0000 @@ -268,7 +268,7 @@ static int rd_make_request(request_queue goto fail; set_bit(BIO_UPTODATE, &sbh->bi_flags); - sbh->bi_end_io(sbh, len >> 9); + sbh->bi_end_io(sbh); return 0; fail: bio_io_error(sbh); @@ -311,7 +311,7 @@ static int rd_ioctl(struct inode *inode, case BLKROSET: case BLKROGET: case BLKSSZGET: - error = blk_ioctl(inode->i_rdev, cmd, arg); + error = blk_ioctl(inode->i_bdev, cmd, arg); }; out: return error; Index: drivers/char/Config.help =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/char/Config.help,v retrieving revision 1.2 diff -u -3 -p -r1.2 Config.help --- drivers/char/Config.help 26 Feb 2002 09:15:15 -0000 1.2 +++ drivers/char/Config.help 22 Mar 2002 04:18:30 -0000 @@ -425,6 +425,24 @@ CONFIG_ISTALLION read <file:Documentation/modules.txt>. The module will be called istallion.o. +CONFIG_SERIAL_TX3912 + The TX3912 is a Toshiba RISC processor based o the MIPS 3900 core; + see <http://www.toshiba.com/taec/components/Generic/risc/tx3912.htm>. + Say Y here to enable kernel support for the on-board serial port. + +CONFIG_SERIAL_TX3912_CONSOLE + The TX3912 is a Toshiba RISC processor based o the MIPS 3900 core; + see <http://www.toshiba.com/taec/components/Generic/risc/tx3912.htm>. + Say Y here to direct console I/O to the on-board serial port. + +CONFIG_AU1000_SERIAL_CONSOLE + If you have an Alchemy AU1000 processor (MIPS based) and you want + to use a console on a serial port, say Y. Otherwise, say N. + +CONFIG_AU1000_UART + If you have an Alchemy AU1000 processor (MIPS based) and you want + to use serial ports, say Y. Otherwise, say N. + CONFIG_SYNCLINK Provides support for the SyncLink ISA and PCI multiprotocol serial adapters. These adapters support asynchronous and HDLC bit @@ -941,6 +959,11 @@ CONFIG_W83877F_WDT The module is called mixcomwd.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. Most people will say N. + +CONFIG_EUROTECH_WDT + Enable support for the watchdog timer on the Eurotech CPU-1220 and + CPU-1410 cards. These are PC/104 SBCs. Spec sheets and product + information are at <http://www.eurotech.it/>. CONFIG_IB700_WDT This is the driver for the hardware watchdog on the IB700 Single Index: drivers/char/Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/char/Makefile,v retrieving revision 1.3 diff -u -3 -p -r1.3 Makefile --- drivers/char/Makefile 1 Mar 2002 01:55:10 -0000 1.3 +++ drivers/char/Makefile 22 Mar 2002 04:18:30 -0000 @@ -23,7 +23,7 @@ obj-y += mem.o tty_io.o n_tty.o tty_ioc export-objs := busmouse.o console.o keyboard.o sysrq.o \ misc.o pty.o random.o selection.o serial.o \ - sonypi.o tty_io.o tty_ioctl.o generic_serial.o + sonypi.o tty_io.o tty_ioctl.o generic_serial.o rtc.o mod-subdirs := ftape drm pcmcia Index: drivers/net/8139too.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/net/8139too.c,v retrieving revision 1.8 diff -u -3 -p -r1.8 8139too.c --- drivers/net/8139too.c 22 Mar 2002 00:59:15 -0000 1.8 +++ drivers/net/8139too.c 22 Mar 2002 04:18:30 -0000 @@ -2521,7 +2521,7 @@ static struct pci_driver rtl8139_pci_dri name: DRV_NAME, id_table: rtl8139_pci_tbl, probe: rtl8139_init_one, - remove: rtl8139_remove_one, + remove: __devexit_p(rtl8139_remove_one), #ifdef CONFIG_PM suspend: rtl8139_suspend, resume: rtl8139_resume, Index: drivers/net/Config.help =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/net/Config.help,v retrieving revision 1.3 diff -u -3 -p -r1.3 Config.help --- drivers/net/Config.help 1 Mar 2002 01:55:10 -0000 1.3 +++ drivers/net/Config.help 22 Mar 2002 04:18:30 -0000 @@ -3,6 +3,10 @@ CONFIG_BAGETLANCE MIPS-32-based Baget embedded system. This chipset is better known via the NE2100 cards. +CONFIG_LASI_82596 + Say Y here to support the on-board Intel 82596 ethernet controller + built into Hewlett-Packard PA-RISC machines. + CONFIG_MIPS_JAZZ_SONIC This is the driver for the onboard card of MIPS Magnum 4000, Acer PICA, Olivetti M700-10 and a few other identical OEM systems. @@ -214,6 +218,12 @@ CONFIG_PPPOE pppd, along with binaries of a patched pppd package can be found at: <http://www.shoshin.uwaterloo.ca/~mostrows/>. +CONFIG_PPPOATM + Support PPP (Point to Point Protocol) encapsulated in ATM frames. + This implementation does not yet comply with section 8 of RFC2364, + which can lead to bad results if the ATM peer loses state and + changes its encapsulation unilaterally. + CONFIG_NET_RADIO Support for wireless LANs and everything having to do with radio, but not with amateur radio or FM broadcasting. @@ -793,6 +803,14 @@ CONFIG_SUNGEM Support for the Sun GEM chip, aka Sun GigabitEthernet/P 2.0. See also <http://www.sun.com/products-n-solutions/hardware/docs/pdf/806-3985-10.pdf>. +CONFIG_TIGON3 + This driver supports Broadcom Tigon3 based gigabit Ethernet cards. + + If you want to compile this driver as a module ( = code which can be + inserted in and removed from the running kernel whenever you want), + say M here and read <file:Documentation/modules.txt>. This is + recommended. The module will be called tg3.o. + CONFIG_MYRI_SBUS This driver supports MyriCOM Sbus gigabit Ethernet cards. @@ -812,6 +830,42 @@ CONFIG_DL2K say M here and read <file:Documentation/modules.txt>. This is recommended. The module will be called dl2k.o. +CONFIG_E1000 + This driver supports Intel(R) PRO/1000 gigabit ethernet family of + adapters, which includes: + + Controller Adapter Name Board IDs + ---------- ------------ --------- + 82542 PRO/1000 Gigabit Server Adapter 700262-xxx, + 717037-xxx + 82543 PRO/1000 F Server Adapter 738640-xxx, + A38888-xxx, + A06512-xxx + 82543 PRO/1000 T Server Adapter A19845-xxx, + A33948-xxx + 82544 PRO/1000 XT Server Adapter A51580-xxx + 82544 PRO/1000 XF Server Adapter A50484-xxx + 82544 PRO/1000 T Desktop Adapter A62947-xxx + + For more information on how to identify your adapter, go to the + Adapter & Driver ID Guide at: + + <http://support.intel.com/support/network/adapter/pro100/21397.htm> + + For general information and support, go to the Intel support + website at: + + <http://support.intel.com> + + More specific information on configuring the driver is in + <file:Documentation/networking/e1000.txt>. + + This driver is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module will be called e1000.o. If you want to compile it as a + module, say M here and read <file:Documentation/modules.txt> as well + as <file:Documentation/networking/net-modules.txt>. + CONFIG_LANCE If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from @@ -823,6 +877,10 @@ CONFIG_LANCE say M here and read <file:Documentation/modules.txt>. This is recommended. The module will be called lance.o. +CONFIG_MIPS_AU1000_ENET + If you have an Alchemy Semi AU1000 ethernet controller + on an SGI MIPS system, say Y. Otherwise, say N. + CONFIG_SGI_IOC3_ETH If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from @@ -1281,39 +1339,6 @@ CONFIG_APRICOT <file:Documentation/networking/net-modules.txt>. The module will be called apricot.o. -CONFIG_DE4X5 - This is support for the DIGITAL series of PCI/EISA Ethernet cards. - These include the DE425, DE434, DE435, DE450 and DE500 models. If - you have a network card of this type, say Y and read the - Ethernet-HOWTO, available from - <http://www.linuxdoc.org/docs.html#howto>. More specific - information is contained in - <file:Documentation/networking/de4x5.txt>. - - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called de4x5.o. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt> as well - as <file:Documentation/networking/net-modules.txt>. - -CONFIG_TULIP - This driver is developed for the SMC EtherPower series Ethernet - cards and also works with cards based on the DECchip - 21040/21041/21140 (Tulip series) chips. Some LinkSys PCI cards are - of this type. (If your card is NOT SMC EtherPower 10/100 PCI - (smc9332dst), you can also try the driver for "Generic DECchip" - cards, above. However, most people with a network card of this type - will say Y here.) Do read the Ethernet-HOWTO, available from - <http://www.linuxdoc.org/docs.html#howto>. More specific - information is contained in - <file:Documentation/networking/tulip.txt>. - - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called tulip.o. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt> as well - as <file:Documentation/networking/net-modules.txt>. - CONFIG_DGRS This is support for the Digi International RightSwitch series of PCI/EISA Ethernet switch cards. These include the SE-4 and the SE-6 @@ -1344,6 +1369,11 @@ CONFIG_FEALNX cards. Specifications and data at <http://www.myson.com.hk/mtd/datasheet/>. +CONFIG_LP486E + Say Y here to support the 82596-based on-board Ethernet controller + for the Panther motherboard, which is one of the two shipped in the + Intel Professional Workstation. + CONFIG_ETH16I If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from @@ -1383,17 +1413,15 @@ CONFIG_VIA_RHINE a module, say M here and read <file:Documentation/modules.txt> as well as <file:Documentation/networking/net-modules.txt>. -CONFIG_DM9102 - This driver is for DM9102(A)/DM9132/DM9801 compatible PCI cards from - Davicom (<http://www.davicom.com.tw/>). If you have such a network - (Ethernet) card, say Y. Some information is contained in the file - <file:Documentation/networking/dmfe.txt>. +CONFIG_VIA_RHINE_MMIO + This instructs the driver to use PCI shared memory (MMIO) instead of + programmed I/O ports (PIO). Enabling this gives an improvement in + processing time in parts of the driver. - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called dmfe.o. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt> as well - as <file:Documentation/networking/net-modules.txt>. + It is not known if this works reliably on all "rhine" based cards, + but it has been tested successfully on some DFE-530TX adapters. + + If unsure, say N. CONFIG_ES3210 If you have a network (Ethernet) card of this type, say Y and read @@ -1425,12 +1453,6 @@ CONFIG_SUNDANCE This driver is for the Sundance "Alta" chip. More specific information and updates are available from <http://www.scyld.com/network/sundance.html>. - -CONFIG_WINBOND_840 - This driver is for the Winbond W89c840 chip. It also works with - the TX9882 chip on the Compex RL100-ATX board. - More specific information and updates are available from - <http://www.scyld.com/network/drivers.html>. CONFIG_ZNET The Zenith Z-Note notebook computer has a built-in network Index: drivers/net/Config.in =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/net/Config.in,v retrieving revision 1.5 diff -u -3 -p -r1.5 Config.in --- drivers/net/Config.in 22 Mar 2002 00:59:15 -0000 1.5 +++ drivers/net/Config.in 22 Mar 2002 04:18:30 -0000 @@ -149,23 +149,17 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; the fi if [ "$CONFIG_NET_PCI" = "y" ]; then dep_tristate ' AMD PCnet32 PCI support' CONFIG_PCNET32 $CONFIG_PCI - dep_tristate ' Adaptec Starfire support (EXPERIMENTAL)' CONFIG_ADAPTEC_STARFIRE $CONFIG_PCI $CONFIG_EXPERIMENTAL + dep_tristate ' Adaptec Starfire/DuraLAN support' CONFIG_ADAPTEC_STARFIRE $CONFIG_PCI if [ "$CONFIG_ISA" = "y" -o "$CONFIG_EISA" = "y" ]; then dep_tristate ' Ansel Communications EISA 3200 support (EXPERIMENTAL)' CONFIG_AC3200 $CONFIG_EXPERIMENTAL fi dep_tristate ' Apricot Xen-II on board Ethernet' CONFIG_APRICOT $CONFIG_ISA - dep_tristate ' DECchip Tulip (dc21x4x) PCI support' CONFIG_TULIP $CONFIG_PCI - if [ "$CONFIG_TULIP" = "y" -o "$CONFIG_TULIP" = "m" ]; then - dep_bool ' New bus configuration (EXPERIMENTAL)' CONFIG_TULIP_MWI $CONFIG_EXPERIMENTAL - bool ' Use PCI shared mem for NIC registers' CONFIG_TULIP_MMIO - fi if [ "$CONFIG_PCI" = "y" -o "$CONFIG_EISA" = "y" ]; then - tristate ' Generic DECchip & DIGITAL EtherWORKS PCI/EISA' CONFIG_DE4X5 tristate ' Digi Intl. RightSwitch SE-X support' CONFIG_DGRS fi - dep_tristate ' Davicom DM910x/DM980x support' CONFIG_DM9102 $CONFIG_PCI - dep_tristate ' EtherExpressPro/100 support' CONFIG_EEPRO100 $CONFIG_PCI + dep_tristate ' EtherExpressPro/100 support (eepro100, original Becker driver)' CONFIG_EEPRO100 $CONFIG_PCI + dep_tristate ' EtherExpressPro/100 support (e100, Alternate Intel driver)' CONFIG_E100 $CONFIG_PCI dep_tristate ' Mylex EISA LNE390A/B support (EXPERIMENTAL)' CONFIG_LNE390 $CONFIG_EISA $CONFIG_EXPERIMENTAL dep_tristate ' Myson MTD-8xx PCI Ethernet support' CONFIG_FEALNX $CONFIG_PCI dep_tristate ' National Semiconductor DP8381x series PCI Ethernet support' CONFIG_NATSEMI $CONFIG_PCI @@ -190,7 +184,6 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; the fi dep_tristate ' VIA Rhine support' CONFIG_VIA_RHINE $CONFIG_PCI dep_mbool ' Use MMIO instead of PIO (EXPERIMENTAL)' CONFIG_VIA_RHINE_MMIO $CONFIG_VIA_RHINE $CONFIG_EXPERIMENTAL - dep_tristate ' Winbond W89c840 Ethernet support' CONFIG_WINBOND_840 $CONFIG_PCI if [ "$CONFIG_OBSOLETE" = "y" ]; then dep_bool ' Zenith Z-Note support (EXPERIMENTAL)' CONFIG_ZNET $CONFIG_ISA fi @@ -231,11 +224,13 @@ if [ "$CONFIG_ACENIC" != "n" ]; then bool ' Omit support for old Tigon I based AceNICs' CONFIG_ACENIC_OMIT_TIGON_I fi dep_tristate 'D-Link DL2000-based Gigabit Ethernet support' CONFIG_DL2K $CONFIG_PCI +dep_tristate 'Intel(R) PRO/1000 Gigabit Ethernet support' CONFIG_E1000 $CONFIG_PCI dep_tristate 'MyriCOM Gigabit Ethernet support' CONFIG_MYRI_SBUS $CONFIG_SBUS dep_tristate 'National Semiconduct DP83820 support' CONFIG_NS83820 $CONFIG_PCI dep_tristate 'Packet Engines Hamachi GNIC-II support' CONFIG_HAMACHI $CONFIG_PCI dep_tristate 'Packet Engines Yellowfin Gigabit-NIC support (EXPERIMENTAL)' CONFIG_YELLOWFIN $CONFIG_PCI $CONFIG_EXPERIMENTAL dep_tristate 'SysKonnect SK-98xx support' CONFIG_SK98LIN $CONFIG_PCI +dep_tristate 'Broadcom Tigon3 support' CONFIG_TIGON3 $CONFIG_PCI endmenu @@ -325,6 +320,9 @@ fi source drivers/net/wan/Config.in +if [ "$CONFIG_PCI" = "y" -o "$CONFIG_EISA" = "y" -o "$CONFIG_CARDBUS" != "n" ]; then + source drivers/net/tulip/Config.in +fi if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then source drivers/net/pcmcia/Config.in fi Index: drivers/pci/pci.ids =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/pci/pci.ids,v retrieving revision 1.3 diff -u -3 -p -r1.3 pci.ids --- drivers/pci/pci.ids 22 Mar 2002 00:59:15 -0000 1.3 +++ drivers/pci/pci.ids 22 Mar 2002 04:18:30 -0000 @@ -3954,6 +3954,7 @@ 9511 16PCI954 Function 1 15ed 2000 Macrolink MCCR Serial p4-7 of 8 15ed 2001 Macrolink MCCR Serial p4-15 of 16 + 9521 Oxford Semi OX16PCI952 PCI/dual 16950 UART 1416 Multiwave Innovation pte Ltd 1417 Convergenet Technologies Inc 1418 Kyushu electronics systems Inc @@ -4184,12 +4185,18 @@ 14e3 AMTELCO 14e4 BROADCOM Corporation 1644 NetXtreme BCM5700 Gigabit Ethernet + 1014 0277 Broadcom Vigil B5700 1000Base-T + 1028 00d1 Broadcom BCM5700 + 1028 0106 Broadcom BCM5700 + 1028 0109 Broadcom BCM5700 + 1028 010a Broadcom BCM5700 10b7 1000 3C996-T 1000BaseTX 10b7 1001 3C996B-T 1000BaseTX 10b7 1002 3C996C-T 1000BaseTX 10b7 1003 3C997-T 1000BaseTX 10b7 1004 3C996-SX 1000BaseSX 10b7 1005 3C997-SX 1000BaseSX + 10b7 1008 3C942 Gigabit LOM (31X31) 14e4 0002 NetXtreme 1000BaseSX 14e4 0003 NetXtreme 1000BaseSX 14e4 0004 NetXtreme 1000BaseTX @@ -4198,6 +4205,7 @@ 0e11 007c NC7770 1000BaseTX 0e11 007d NC6770 1000BaseSX 0e11 0085 NC7780 1000BaseTX + 1028 0121 Broadcom BCM5701 10b7 1004 3C996-SX 1000BaseSX 10b7 1006 3C996B-T 1000BaseTX 10b7 1007 3C1000-T 1000BaseTX @@ -4208,7 +4216,16 @@ 14e4 0007 NetXtreme BCM5701 1000BaseSX 14e4 0008 NetXtreme BCM5701 1000BaseTX 14e4 8008 NetXtreme BCM5701 1000BaseTX + 1646 NetXtreme BCM5702 Gigabit Ethernet + 14e4 8009 Broadcom BCM5702 1647 NetXtreme BCM5703 Gigabit Ethernet + 0e11 009a NC7770 + 0e11 0099 NC7780 + 14e4 0009 Broadcom BCM5703 + 14e4 8009 Broadcom BCM5703 + 164d NetXtreme BCM5702FE Gigabit Ethernet + 16a6 NetXtreme BCM5702X Gigabit Ethernet + 16a7 NetXtreme BCM5703X Gigabit Ethernet 5820 BCM5820 Crypto Accelerator 14e5 Pixelfusion Ltd 14e6 SHINING Technology Inc @@ -4648,6 +4665,8 @@ 0400 FarSync T2P (2 port X.21/V.35/V.24) 0440 FarSync T4P (4 port X.21/V.35/V.24) 1668 Action Tec Electronics Inc +173b Altima (nee BroadCom) + 03e8 AC1000 Gigabit Ethernet 1813 Ambient Technologies Inc 1a08 Sierra semiconductor 0000 SC15064 Index: init/do_mounts.c =================================================================== RCS file: /cvsroot/linuxsh/linux/init/do_mounts.c,v retrieving revision 1.2 diff -u -3 -p -r1.2 do_mounts.c --- init/do_mounts.c 15 Jan 2002 07:59:52 -0000 1.2 +++ init/do_mounts.c 22 Mar 2002 04:18:30 -0000 @@ -841,7 +841,7 @@ out: mount_devfs_fs (); } -#ifdef BUILD_CRAMDISK +#if defined(BUILD_CRAMDISK) && defined(CONFIG_BLK_DEV_RAM) /* * gzip declarations @@ -986,4 +986,4 @@ static int __init crd_load(int in_fd, in return result; } -#endif /* BUILD_CRAMDISK */ +#endif /* BUILD_CRAMDISK && CONFIG_BLK_DEV_RAM */ Index: mm/memory.c =================================================================== RCS file: /cvsroot/linuxsh/linux/mm/memory.c,v retrieving revision 1.7 diff -u -3 -p -r1.7 memory.c --- mm/memory.c 22 Mar 2002 00:59:16 -0000 1.7 +++ mm/memory.c 22 Mar 2002 04:18:30 -0000 @@ -1036,31 +1036,35 @@ no_mem: return -1; } -static void vmtruncate_list(struct vm_area_struct *mpnt, unsigned long pgoff) +static void vmtruncate_list(list_t *head, unsigned long pgoff) { - do { - unsigned long start = mpnt->vm_start; - unsigned long end = mpnt->vm_end; - unsigned long len = end - start; - unsigned long diff; + unsigned long start, end, len, diff; + struct vm_area_struct *vma; + list_t *curr; + + list_for_each(curr, head) { + vma = list_entry(curr, struct vm_area_struct, shared); + start = vma->vm_start; + end = vma->vm_end; + len = end - start; /* mapping wholly truncated? */ - if (mpnt->vm_pgoff >= pgoff) { - zap_page_range(mpnt, start, len); + if (vma->vm_pgoff >= pgoff) { + zap_page_range(vma, start, len); continue; } /* mapping wholly unaffected? */ len = len >> PAGE_SHIFT; - diff = pgoff - mpnt->vm_pgoff; + diff = pgoff - vma->vm_pgoff; if (diff >= len) continue; /* Ok, partially affected.. */ start += diff << PAGE_SHIFT; len = (len - diff) << PAGE_SHIFT; - zap_page_range(mpnt, start, len); - } while ((mpnt = mpnt->vm_next_share) != NULL); + zap_page_range(vma, start, len); + } } /* @@ -1081,14 +1085,14 @@ int vmtruncate(struct inode * inode, lof goto do_expand; inode->i_size = offset; spin_lock(&mapping->i_shared_lock); - if (!mapping->i_mmap && !mapping->i_mmap_shared) + if (list_empty(&mapping->i_mmap) && list_empty(&mapping->i_mmap_shared)) goto out_unlock; pgoff = (offset + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; - if (mapping->i_mmap != NULL) - vmtruncate_list(mapping->i_mmap, pgoff); - if (mapping->i_mmap_shared != NULL) - vmtruncate_list(mapping->i_mmap_shared, pgoff); + if (!list_empty(&mapping->i_mmap)) + vmtruncate_list(&mapping->i_mmap, pgoff); + if (!list_empty(&mapping->i_mmap_shared)) + vmtruncate_list(&mapping->i_mmap_shared, pgoff); out_unlock: spin_unlock(&mapping->i_shared_lock); @@ -1484,8 +1488,9 @@ int make_pages_present(unsigned long add /* * Map a vmalloc()-space virtual address to the physical page. */ -struct page * vmalloc_to_page(unsigned long addr) +struct page * vmalloc_to_page(void * vmalloc_addr) { + unsigned long addr = (unsigned long) vmalloc_addr; struct page *page = NULL; pgd_t *pgd = pgd_offset_k(addr); pmd_t *pmd; |