Skip to contentSkip to conversation

Linux 2.5.20

PATCH In review Linus Torvalds 12 participants 35 messages Jun 3, 2002 – Jun 7, 2002

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

ACPI merge, merges from Dave Jones, IDE updates, stuff from Andrew, PPC64 update, e100[0] driver updates, the works..

And no, I still haven't upgraded my changelog scripts, kill me.

Linus

---
Summary of changes from v2.5.19 to v2.5.20
============================================

<[email protected]>
o airo wireless net driver updates:

<[email protected]>
o more file renames
o rename ACPI files to remove acpi_ prefix. Why did we ever name them that way?
o Clean up code based on things flagged by lint
o Properly (?) handle the multiple people who can find PCI root bridges
o ACPI PCI IRQ Improvements:
o ACPI Ancillary files update
o move arch-dependent macros from drivers/acpi/include/platform/acenv.h
o Code cleanups

Andrew Morton <[email protected]>
o direct-to-BIO writeback for writeback-mode ext3
o remove PageSkip() macros
o list_head debugging
o rename block_symlink() to page_symlink()
o remove inode.i_wait
o buffer_boundary() for ext3
o speed up writes
o fix swapcache packing in the radix tree
o dirsync support for minixfs, sysvfs and ufs
o give swapper_space a set_page_dirty a_op
o fix race between writeback and unlink
o swapcache bugfixes
o put in-memory filesystem dirty pages on the correct list
o tmpfs bugfixes
o rename flushpage to invalidatepage

<[email protected]>
o Renames struct bus_type to struct de4x5_bus_type in de4x5 net driver,

<[email protected]>
o pSeries HVC console: add hvc initalisation
o pSeries HVC console: add missing function prototype
o ppc64 signal cleanup: remove old debug and sync with ppc32 signal code
o pSeries HVC console: Disable interrupts in spinlock regions, fix from
o ppc64: signal formatting cleanups
o ppc64: SIGURG fix from Chris Yeoh
o ppc64: cleanup 32 bit signal code
o ppc64: SIGURG fix from Chris Yeoh
o ppc64: update config.in
o ppc64: fixes for 2.5.14
o ppc64: fix compile error caused by machine type changes
o ppc64: Add PREEMPT_ACTIVE and fix HMT macro typo
o ppc64: missed this during Naca -> naca merge
o ppc64: provide default_idle, we shouldnt ever actually use this but
o ppc64: Add TIOCSTOP translation
o ppc64: dont allow tlbiel on large pages.
o add subsys_initcall for pcibios_init
o ppc64: remove old code for stacking signals, its not used any more
o ppc64: reduce differences to the ppc32 signal code.
o ppc64: Take page_table_lock in flush_tlb_mm
o ppc64: Be sure to zero the fpscr in a signal handler, otherwise
o ppc64: Fix a number of problems with our exception reporting, in
o ppc64: use common die() function in bad_page_fault, from ppc32
o ppc64: Add Ingo's irq affinity stuff, from x86
o ppc64: prevsp is not used any more
o ppc64: Paul Mackerras' optimized power4 copy routines
o ppc64: use generic debugger hooks instead of hardwiring xmon
o ppc64: Add get/setaffinity syscalls, from sparc64
o ppc64: dont print "xmon called", it garbles the output when multiple
o ppc64: Up the gcc inline limited, needed for gcc 3.1
o ppc64: No need to handle address space destruction in flush_tlb_mm,
o ppc64: Provide a rough cache_decay_ticks.
o ppc64 defconfig update
o ppc64: Remove last_syscall, we can work the syscall out easily from
o ppc64 segment table rework. We preload segments for both segment
o ppc64: missed during segment handler rework
o ppc64: Recent firmware removes the compatible property on pci bridges.
o ppc64: Fix 32 bit execve to mirror recent generic changes
o ppc64: kill MAP_NR, dont mark free_initmem as __init
o ppc64: mask top 4 bytes of si_code
o remove bogus panic in ppc32_select
o ppc64: quota updates
o ppc64: signal32 updates from Stephen Rothwell - comment changes
o ppc64: more signal32 updates from Stephen Rothwell
o ppc64: Add CONFIG_CMDLINE, from ppc32
o ppc64: more signal32 updates from Stephen Rothwell - replace some
o ppc64: last of the signal32 updates from Stephen Rothwell. Fantastic
o ppc64: Fix clear_user, from ppc32

<anton@superego.(none)>
o add pSeries hypervisor console

Jens Axboe <[email protected]>
o misc generic block tag fixes
o documentation and tq_disk removals
o Re: ufs compile error in 2.5.19]
o update to the update

Martin Dalecki <[email protected]>
o 2.5.19 IDE 76
o 2.5.19 IDE 77
o [PATCH} 2.5.19 IDE 79
o 2.5.19 IDE 78
o 2.5.19 IDE 82
o 2.5.19 IDE 81
o 2.5.19 IDE 80
o 2.5.19 blk.h and more about the ugly kids.

<[email protected]>
o dumb cpqarray init microoptimisation.
o i386 mmx copying bug.
o check misc_register result in efirtc
o ps2esdi resource cleanups
o region handling cleanups for gscd driver
o i386 smp tweaks.
o recognise 2 extra devices for xd.c
o h8 janitor work
o epca janitor work
o dltk driver check_region -> request_region
o ib700wdt janitor work
o elsa check_region() -> request_region()
o mixcomwd janitor work
o esp janitor work
o aztech CD driver janitor work
o ite_gpio region handling cleanups
o istallion janitor work
o better sizing of queue_nr_requests
o forward ioctls on raw devices to underlying devices
o rtc max_user_freq sysctl
o isicom check_region() -> request_region()
o niccy region handling cleanups
o teles3 region handling cleanups
o Some includes that aren't needed.
o Deliver SIGIO to FIFO and pipe devices
o missing binfmt check
o Fix deadlock in nbd
o gazel region handling cleanups
o Conversion of uidhash to use list_t
o hd.c compilation fix.
o avm_a1 check_region -> request_region cleanup
o egcs no longer supported.
o fill in empty hisax_fcpcipnp debug statement
o add spinlocking to w83877f_wdt driver
o struct super_block cleanup - adfs
o missing GPL tags
o Fix up agpgart.

<[email protected]>
o ehci remove warning if no CONFIG_USB_DEBUG

<[email protected]>
o PATCH: USB Scanner Driver 0.4.8 and new maintainer

<[email protected]>
o trivial keyboard driver patch
o pass "page" pointer to clear_user_page()/copy_user_page()
o time-offset patch
o agp support for i460 and zx1 cleanup

<[email protected]>
o dl2k gige net driver updates:

<[email protected]>
o 2.5.19 : drivers/mtd/nftlcore.c

<[email protected]>
o Fix pcnet32 net driver workaround for xSeries250.

<[email protected]>
o USB OHCI driver: Added SA1111 support
o USB kernel-api documentation fix

<[email protected]>
o kbuild: Add (internal) prepare target
o kbuild: Don't rebuild if vmlinux if nothing changed - fix
o kbuild: clean up generation of modversions.h
o kbuild: Clarify the CONFIG_MODVERSIONS logic
o kbuild: Use the real instead of a phony target if we have one
o kbuild: Group targets which need / don't need .config
o kbuild: Get rid of -DMODVERSIONS, further cleanup

<[email protected]>
o USB storage: Dead code, more abort cleanups, and detached device fix

<[email protected]>
o PCI: Make sure id_table is passed to probe callback
o PCI Update:
o Device Model: Add helpers bus_for_each_dev and bus_for_each_drv
o Device Model: Implement centralized device/driver binding
o PCI: Put pci_match_device back for the people that are still using it.
o USB: define usb_bus_type and register on startup
o driverfs update:
o USB: Move URB request code from usb.c to urb.c
o USB:
o USB: Move synchronous message passing code from usb.c to message.c
o USB: Move configuration parsing code from usb.c to config.c
o driverfs: Remove default 'status' file: it had no useful read information, the commands it supported were minimal and probably broken and the comments were wrong.
o device model: remove flags parameter from struct device_driver::remove and fix all users
o device model: Use driver_for_each_dev to unbind drivers from its devices (now that it's implemented)
o devicemode: Implement driver_for_each_dev

<[email protected]>
o suspend-to-ram: clean up according to Andy
o eepro100 net driver trivial cleanup:

<[email protected]>
o Janitor: Add __devinit markers to two net drivers, epic100 and sundance

<[email protected]>
o de4x5 does not compile in 2.5.19 due to bus_type conflict
o missing argument to clear_user_page in v4l

<[email protected]>
o [ARM] Fix makefiles for drivers/acorn/{block,char}/
o [ARM] 2.5.18 Update ARM for TLB shootdown changes
o [ARM] Remove redundant instruction cache code from decompressor.
o [ARM] Tidy up context switch save area initialisation for fork
o [ARM] Remove victor machine type
o [ARM] cpufreq_init takes low and high frequency limits.
o [ARM] Remove an extraneous load from atomic ops
o [ARM] Context switch improvements
o [ARM] Convert for() delay loops to udelay()
o [ARM] Remove hard coded per-architecture memory, ramdisk and initrd

<[email protected]>
o drivers/net/wan/dscc4.c - gross overflow

<[email protected]>
o softirq.c per_cpu fix
o AUDIT 2.5.19: Continuing copy_to/from_user & clear_user

<[email protected]>
o Add ETHTOOL_PHYS_ID ethtool command to linux/ethtool.h.
o e1000 net driver updates 2/4:
o e100 net driver update:
o e1000 net driver update 1/4:
o e1000 net driver update 3/4:
o e1000 net driver update 4/4:

<[email protected]>
o APM patch for idle_period handling
o missing bit from signal patches

<[email protected]>
o Fix free-space leak truncating files in JFS.
o JFS: cleanup dbAlloc
o JFS: misc stuff for 2.5
o JFS: metapage changes
o JFS: support for kNFSD

<[email protected]>
o Fix up ACPI makefile that got broken by the merge.
o Fix PCI irq routing to always look up the bridge swizzling
o Make qla1280 driver print out irq information along with bus location.
o Allow <linux/list.h> to be used even without NULL defined yet.
o Simplify uidhash table allocation - no need to make it dynamic,
o idescsi initialization is done with module_init(), not
o Proper usage of isupper/tolower for build scripts.
o Kernel version 2.5.20
o Felipe W Damasio: add KERN_* to 3c501 driver printk's
o Fix missing piece of uidhash list conversion
o Simplify tlb_flush_mmu() for exit case: makes it easier on the ia64

<[email protected]>
o Fix RAMDISK config problem
o Missing include in drivers/base/bus.c and drivers/pci/pci-driver.c

#1 lore raw

2.5.20 -- suspend.c still breaks the build (originally reported for 2.5.18)

suspend.c: In function `freeze_processes':
suspend.c:234: warning: implicit declaration of function `signal_wake_up'
suspend.c: In function `fill_suspend_header':
suspend.c:286: warning: comparison between pointer and integer
suspend.c:305:2: #error this is broken, FIXME
suspend.c: In function `do_suspend_sync':
suspend.c:306: `tq_disk' undeclared (first use in this function)
suspend.c:306: (Each undeclared identifier is reported only once
suspend.c:306: for each function it appears in.)
suspend.c: In function `write_suspend_image':
suspend.c:431: warning: passing arg 3 of get_swaphandle_info' from incompatible pointer type suspend.c:430: warning: unused variable dummy2'
suspend.c: In function `count_and_copy_data_pages':
suspend.c:536: warning: passing arg 1 of mmx_copy_page' makes pointer from integer without a cast suspend.c:536: warning: passing arg 2 of mmx_copy_page' makes pointer from integer without a cast suspend.c: In function `suspend_save_image':
suspend.c:724: warning: assignment makes integer from pointer without a cast suspend.c: In function `resume_try_to_read':
suspend.c:1059: warning: passing arg 1 of `name_to_kdev_t' discards qualifiers from pointer target type suspend.c:1067: warning: unsigned int format, kdev_t arg (arg 2)
suspend.c:1057: warning: unused variable `blksize'
suspend.c: At top level:
suspend.c:1221: warning: static declaration for `resume_setup' follows non-static make[1]: *** [suspend.o] Error 1
make[1]: Leaving directory `/usr/src/linux/kernel'

#2 lore raw

PATCH 1/1 i386 "General Options" - begone [take 2]

In reply to Linus Torvalds

This patch (a minor update on one that I accidently left lkml out of the To:) removes the "General Options" top level config menu from the i386 build for 2.5.20. It didn't describe what it was doing, and it contained a broad collection of mostly unrelated configuration options.
To replace it, you now get:
"Power management options (ACPI, APM)", which also includes software suspend. "Bus options (PCI, PCMCIA, EISA, MCA, ISA)"
"Executable file formats"

While moving software suspend, I also took the chance to tweak the Config.help entry.

To all those who don't like the expansion in top level directories - I agree, and have the genesis of a plan to build a more logical grouping (eg getting the various mass storage options together, getting the various networking options together, etc). One step at a time though, especially since that would affect multiple architectures.

Brad

Signature · 1 line
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.
arch/i386/Config.help +17 -12
diff -Naur -X dontdiff linux-2.5.20-clean/arch/i386/Config.help linux-2.5.20-config-munging/arch/i386/Config.help
@@ -641,7 +641,8 @@
   off or put into a power conserving "sleep" mode if they are not
   being used.  There are two competing standards for doing this: APM
   and ACPI.  If you want to use either one, say Y here and then also
-  to the requisite support below.
+  to the requisite support below. This option is also required for
+  "software suspend", see below.
 
   Power Management is most important for battery powered laptop
   computers; if you have a laptop, check out the Linux Laptop home
@@ -943,13 +944,15 @@
 
 Software Suspend
 CONFIG_SOFTWARE_SUSPEND
-  Enable the possibilty of suspendig machine. It doesn't need APM.
-  You may suspend your machine by either pressing Sysrq-d or with
-  'swsusp' or 'shutdown -z <time>' (patch for sysvinit needed). It
-  creates an image which is saved in your active swaps. By the next
-  booting the kernel detects the saved image, restores the memory from
-  it and then it continues to run as before you've suspended.
-  If you don't want the previous state to continue use the 'noresume'
+  Enable the possibility of suspending the machine. This does not 
+  require APM. You may suspend your machine by either pressing 
+  Sysrq-d or with 'swsusp' or 'shutdown -z <time>' (patch for 
+  sysvinit needed). It creates an image which is saved in your
+  active swap space. The next time the kernel is booted, the saved
+  image is detected and restored to memory. The machine then 
+  continues to run, in the same configuration as before the suspend.
+
+  If you don't want the previous state to continue, use the 'noresume'
   kernel option. However note that your partitions will be fsck'd and
   you must re-mkswap your swap partitions/files.
 
@@ -958,10 +961,12 @@
   involved in suspending. Also in this case there is a risk that buffers
   on disk won't match with saved ones.
 
-  SMP is supported ``as-is''. There's a code for it but doesn't work.
-  There have been problems reported relating SCSI.
+  SMP is supported ``as-is''. That is, there is code to support SMP
+  but doesn't work. There have also been problems reported relating to 
+  SCSI.
   
-  This option is about getting stable. However there is still some
-  absence of features.
+  This option is becoming progressively more stable. However there are
+  still some missing features, and data corruption is always a 
+  possibility.
 
   For more information take a look at Documentation/swsusp.txt.
arch/i386/config.in +28 -19

72 lines not on this page · raw message

#3 lore raw

Re: [patch] i386 "General Options" - begone [take 2]

In message <[email protected]> you write:

Quoted 2 lines

While moving software suspend, I also took the chance to tweak the Config.help entry.

For trivial at least, please split the patches. It makes it easy for me and/or Linus to accept only one.

Also, please mention clearly if you obsolete a previous trivial patch...

Quoted 1 line

diff -Naur -X dontdiff linux-2.5.20-clean/arch/i386/Config.help linux-2.5.20-

config-munging/arch/i386/Config.help

arch/i386/Config.help

Quoted 2 lines
arch/i386/Config.help +0 -0

2

arch/i386/Config.help line 648

Quoted 10 lines
arch/i386/Config.help +2 -1
@@ -641,7 +641,8 @@
   off or put into a power conserving "sleep" mode if they are not
   being used.  There are two competing standards for doing this: APM
   and ACPI.  If you want to use either one, say Y here and then also
-  to the requisite support below.
+  to the requisite support below. This option is also required for
+  "software suspend", see below.
 
   Power Management is most important for battery powered laptop
   computers; if you have a laptop, check out the Linux Laptop home

Like code, descriptions develop scar tissue when you do the "minimally invasive" change. Consider this classic trap-for-skimmers from the glibc "snprintf" man page, and learn:

Return value
These functions return the number of characters printed (not including the trailing `\0' used to end output to
strings). snprintf and vsnprintf do not write more than
size bytes (including the trailing '\0'), and return -1 if the output was truncated due to this limit. (Thus until glibc 2.0.6. Since glibc 2.1 these functions follow the C99 standard and return the number of characters (exclud� ing the trailing '\0') which would have been written to the final string if enough space had been available.)

Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

#4 lore raw

Oops Linux 2.5.20

In reply to Linus Torvalds

The folowing happens during module load time:

<6>note: modprobe[251] exited with preempt_count 1
kernel BUG at /usr/src/linux/include/linux/device.h:115!

invalid operand: 0000
CPU:    0
EIP:    0010:[<c01924d7>]    Not tainted

Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010246
eax: 00000000 ebx: cafaa000 ecx: cd074f50 edx: cd074f48
esi: 00000000 edi: 00000000 ebp: bfffeba8 esp: cafabf30
ds: 0018 es: 0018 ss: 0018

Stack: 00000010 00000246 c0125450 cafaa000 cd074f48 00000000 bfffeba8 c01911fb
       cd074f48 cd074f48 c0191170 c0192628 cd074f48 c025abe8 00000000 00000000
       cd0715b9 cd074f48 cd06d000 fffffff0 c0119763 cd06d000 cd06d000 fffffff0
Call Trace: [<c0125450>] [<cd074f48>] [<c01911fb>] [<cd074f48>] [<cd074f48>]
   [<c0191170>] [<c0192628>] [<cd074f48>] [<cd0715b9>] [<cd074f48>] [<c0119763>]

[<c011894c>] [<c010740f>]

Code: 0f 0b 73 00 c0 73 23 c0 e9 26 ff ff ff 8d b6 00 00 00 00 8d
Quoted 1 line
Quoted 1 line

EIP; c01924d7 <driver_for_each_dev+e7/130> <=====

Trace; c0125450 <exec_usermodehelper+190/240>
Trace; cd074f48 <[parport].bss.end+9369/b421>
Trace; c01911fb <pci_assign_resource+35b/360>
Trace; cd074f48 <[parport].bss.end+9369/b421>
Trace; cd074f48 <[parport].bss.end+9369/b421>
Trace; c0191170 <pci_assign_resource+2d0/360>
Trace; c0192628 <put_driver+68/c80>
Trace; cd074f48 <[parport].bss.end+9369/b421>
Trace; cd0715b9 <[parport].bss.end+59da/b421>
Trace; cd074f48 <[parport].bss.end+9369/b421>
Trace; c0119763 <try_inc_mod_count+f53/1860>
Trace; c011894c <try_inc_mod_count+13c/1860>
Trace; c010740f <__up_wakeup+1243/2874>
Code; c01924d7 <driver_for_each_dev+e7/130>
00000000 <_EIP>:
Code; c01924d7 <driver_for_each_dev+e7/130> <=====
0: 0f 0b ud2a <=====
Code; c01924d9 <driver_for_each_dev+e9/130>
2: 73 00 jae 4 <_EIP+0x4> c01924db <driver_for_each_
dev+eb/130>
Code; c01924db <driver_for_each_dev+eb/130>
4: c0 (bad)
Code; c01924dc <driver_for_each_dev+ec/130>
5: 73 23 jae 2a <_EIP+0x2a> c0192501 <driver_for_eac
h_dev+111/130>
Code; c01924de <driver_for_each_dev+ee/130>
7: c0 e9 26 shr $0x26,%cl
Code; c01924e1 <driver_for_each_dev+f1/130>
a: ff (bad)
Code; c01924e2 <driver_for_each_dev+f2/130>
b: ff (bad)
Code; c01924e3 <driver_for_each_dev+f3/130>
c: ff 8d b6 00 00 00 decl 0xb6(%ebp)
Code; c01924e9 <driver_for_each_dev+f9/130>
12: 00 8d 00 00 00 00 add %cl,0x0(%ebp)

The module in question is apparently:

IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 1024 buckets, 8Kbytes
TCP: Hash tables configured (established 16384 bind 32768)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 240k freed
usb.c: registered new driver usbfs
usb.c: registered new driver hub
EXT3 FS 2.4-0.9.16, 02 Dec 2001 on ide0(3,5), internal journal kjournald starting. Commit interval 5 seconds
EXT3 FS 2.4-0.9.16, 02 Dec 2001 on ide0(3,1), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
Adding Swap: 400640k swap-space (priority -1)
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI IS APNP enabled
ttyS01 at 0x02f8 (irq = 3) is a 16550A
PCI: Found IRQ 5 for device 00:00.2
PCI: Sharing IRQ 5 with 00:06.0
PCI: Sharing IRQ 5 with 00:0c.1
register_serial(): autoconfig failed
kernel BUG at /usr/src/linux/include/linux/device.h:115!

invalid operand: 0000
CPU:    0
EIP:    0010:[<c01924d7>]    Not tainted
EFLAGS: 00010246
eax: 00000000   ebx: cafaa000   ecx: cd074f50   edx: cd074f48
esi: 00000000   edi: 00000000   ebp: bfffeba8   esp: cafabf30
ds: 0018   es: 0018   ss: 0018
Process modprobe (pid: 251, threadinfo=cafaa000 task=cbc0e080)
Stack: 00000010 00000246 c0125450 cafaa000 cd074f48 00000000 bfffeba8 c01911fb
       cd074f48 cd074f48 c0191170 c0192628 cd074f48 c025abe8 00000000 00000000
       cd0715b9 cd074f48 cd06d000 fffffff0 c0119763 cd06d000 cd06d000 fffffff0
Call Trace: [<c0125450>] [<cd074f48>] [<c01911fb>] [<cd074f48>] [<cd074f48>]
   [<c0191170>] [<c0192628>] [<cd074f48>] [<cd0715b9>] [<cd074f48>] [<c0119763>]

[<c011894c>] [<c010740f>]

Code: 0f 0b 73 00 c0 73 23 c0 e9 26 ff ff ff 8d b6 00 00 00 00 8d
 <6>note: modprobe[251] exited with preempt_count 1

8139too Fast Ethernet driver 0.9.24
PCI: Found IRQ 11 for device 00:09.0
eth0: RealTek RTL8139 Fast Ethernet at 0xcd081000, 00:e0:18:19:6b:77, IRQ 11
eth0: Identified 8139 chip type 'RTL-8139C'
eth0: Setting 100mbps half-duplex based on auto-negotiated partner ability 40a1. Linux Kernel Card Services 3.1.22
options: [pci] [cardbus] [pm]
PCI: Found IRQ 11 for device 00:0c.0
PCI: Sharing IRQ 11 with 00:02.0
PCI: Found IRQ 5 for device 00:0c.1
PCI: Sharing IRQ 5 with 00:00.2
PCI: Sharing IRQ 5 with 00:06.0

This corresponds to the following BUG_ON

static inline struct device_driver * get_driver(struct device_driver * drv)

{
	BUG_ON(!atomic_read(&drv->refcount));
	atomic_inc(&drv->refcount);
	return drv;
}

So apparently the module initialization there is broken in the case of a box without a serial port at all on it.

#5 lore raw

PATCH 1/1 2.5.20 airo wireless - "I can't get no, compilation..."

In reply to Linus Torvalds

Fix namespace clash with proc stuff an compilation warnings.

drivers/net/wireless/airo.c +3 -9
diff -urN linux-2.5.20/drivers/net/wireless/airo.c linux/drivers/net/wireless/airo.c
@@ -191,12 +191,6 @@
 #ifndef RUN_AT
 #define RUN_AT(x) (jiffies+(x))
 #endif
-#ifndef PDE
-static inline struct proc_dir_entry *PDE(const struct inode *inode)
-{
-	return inode->u.generic_ip;
-}
-#endif
 
 
 /* These variables are for insmod, since it seems that the rates
@@ -723,7 +717,7 @@
 
 /* Leave gap of 40 commands after AIROGSTATSD32 for future */
 
-#define AIROPCAP               	AIROGSTATSD32 + 40
+#define AIROPCAP		AIROGSTATSD32 + 40
 #define AIROPVLIST              AIROPCAP      + 1
 #define AIROPSLIST		AIROPVLIST    + 1
 #define AIROPCFG		AIROPSLIST    + 1
@@ -845,7 +839,7 @@
 	struct proc_dir_entry *proc_entry;
 	struct airo_info *next;
         spinlock_t aux_lock;
-        int flags;
+        unsigned long flags;
 #define FLAG_PROMISC   IFF_PROMISC
 #define FLAG_RADIO_OFF 0x02
 #define FLAG_LOCKED    2
@@ -866,7 +860,7 @@
 #ifdef WIRELESS_EXT
 	struct iw_statistics	wstats;		// wireless stats
 	unsigned long		scan_timestamp;	/* Time started to scan */
-	struct tq_struct 	event_task;
+	struct tq_struct	event_task;
 #ifdef WIRELESS_SPY
 	int			spy_number;
 	u_char			spy_address[IW_MAX_SPY][6];
#6 lore raw

]PATCH] 2.5.20 IDE 83

In reply to Linus Torvalds

Mon Jun 3 10:11:54 CEST 2002 ide-clean-83

- Remove last parameter from ide_dump_status. This information is now permanently present in device->staus field, so there is not need to pass it around.

- Patch for DVD read through ide-scsi. There is the possibility that we can get request structures passed down, which don't have the queue field set. At lest on the BIO code path this seems to be something worth further investigation. Found by Adam J. Richter. (Jens?)

- Revert my change to the hostdata handling. I did get it wrong about the way host structures are allocated by the generic SCSI layer. It plays tricks there.

- piix driver updates by Vojtech Pavlik.

- We have a ata_out_regfile, so we should have ata_in_regfile too.

arch/i386/pci/fixup.c +14 -0
diff -urN linux-2.5.20/arch/i386/pci/fixup.c linux/arch/i386/pci/fixup.c
@@ -99,6 +99,17 @@
 		d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0;
 }
 
+static void __devinit pci_fixup_ide_exbar(struct pci_dev *d)
+{
+	/*
+	 * Some new Intel IDE controllers have an EXBAR register for
+	 * MMIO instead of PIO. It's unused, undocumented (though maybe
+	 * functional). BIOSes often assign conflicting memory address
+	 * to this. Just kill it.
+	 */
+	d->resource[5].start = d->resource[5].end = d->resource[5].flags = 0;
+}
+
 static void __devinit  pci_fixup_latency(struct pci_dev *d)
 {
 	/*
@@ -174,6 +185,9 @@
 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_5597,		pci_fixup_latency },
 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_5598,		pci_fixup_latency },
  	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82371AB_3,	pci_fixup_piix4_acpi },
+ 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801CA_10,	pci_fixup_ide_exbar },
+ 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801CA_11,	pci_fixup_ide_exbar },
+ 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801DB_9,	pci_fixup_ide_exbar },
 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8363_0,	pci_fixup_via_northbridge_bug },
 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8622,	        pci_fixup_via_northbridge_bug },
 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8361,	        pci_fixup_via_northbridge_bug },
drivers/ide/Config.help +7 -6
diff -urN linux-2.5.20/drivers/ide/Config.help linux/drivers/ide/Config.help
@@ -409,13 +409,14 @@
   the chip to optimum performance.
 
 CONFIG_BLK_DEV_PIIX_TRY133
-  The ICH2, ICH2-M, ICH3, ICH3-M, ICH3-S and CICH chips can support
-  UDMA133 in hardware, even though the specifications of the chips
-  say otherwise. By enabling this option, you allow the driver to
-  enable the UDMA133 mode on these chips.
+  The ICH2, ICH2-M, ICH3, ICH3-M, ICH3-S, ICH-4 and CICH chips can
+  support UDMA133 in hardware, even though the specifications of
+  the chips say otherwise. By enabling this option, you allow the
+  driver to enable the UDMA133 mode on these chips. Note that if
+  it doesn't work, your data gets lost, you're on your own, don't
+  expect any help. 
 
-  If you want to stay on the safe side, say N here.
-  If you prefer maximum performance, say Y here.
+  Say N here, unless you really know what are you doing.
 
 CONFIG_BLK_DEV_PDC202XX
   Promise Ultra33 or PDC20246
drivers/ide/Config.in +1 -1
diff -urN linux-2.5.20/drivers/ide/Config.in linux/drivers/ide/Config.in
@@ -53,7 +53,7 @@
       dep_bool '    HPT366 chipset support' CONFIG_BLK_DEV_HPT366 $CONFIG_BLK_DEV_IDEDMA_PCI
       dep_bool '    Intel and Efar (SMsC) chipset support' CONFIG_BLK_DEV_PIIX $CONFIG_BLK_DEV_IDEDMA_PCI
       if [ "$CONFIG_BLK_DEV_PIIX" = "y" ]; then
-         dep_bool '      Use UDMA133 even on ICH2, ICH3 and CICH chips (EXPERIMENTAL)' CONFIG_BLK_DEV_PIIX_TRY133 $CONFIG_EXPERIMENTAL
+         dep_bool '      Allow undocumented UDMA133 on ICH chips (EXPERIMENTAL)' CONFIG_BLK_DEV_PIIX_TRY133 $CONFIG_EXPERIMENTAL
       fi
       if [ "$CONFIG_MIPS_ITE8172" = "y" -o "$CONFIG_MIPS_IVR" = "y" ]; then
          dep_mbool '    IT8172 IDE support' CONFIG_BLK_DEV_IT8172 $CONFIG_BLK_DEV_IDEDMA_PCI
drivers/ide/device.c +14 -0
diff -urN linux-2.5.20/drivers/ide/device.c linux/drivers/ide/device.c
@@ -159,4 +159,18 @@
 	OUT_BYTE(rf->high_cylinder, ch->io_ports[IDE_HCYL_OFFSET]);
 }
 
+/*
+ * Output a complete register file.
+ */
+void ata_in_regfile(struct ata_device *drive, struct hd_drive_task_hdr *rf)
+{
+	struct ata_channel *ch = drive->channel;
+
+	rf->sector_count = IN_BYTE(ch->io_ports[IDE_NSECTOR_OFFSET]);
+	rf->sector_number = IN_BYTE(ch->io_ports[IDE_SECTOR_OFFSET]);
+	rf->low_cylinder = IN_BYTE(ch->io_ports[IDE_LCYL_OFFSET]);
+	rf->high_cylinder = IN_BYTE(ch->io_ports[IDE_HCYL_OFFSET]);
+}
+
+
 MODULE_LICENSE("GPL");
drivers/ide/hpt34x.c +1 -1
diff -urN linux-2.5.20/drivers/ide/hpt34x.c linux/drivers/ide/hpt34x.c
@@ -253,7 +253,7 @@
 	unsigned int count;
 	u8 cmd;
 
-	if (!(count = udma_new_table(ch, rq)))
+	if (!(count = udma_new_table(drive, rq)))
 		return 1;	/* try PIO instead of DMA */
 
 	if (rq_data_dir(rq) == READ)
drivers/ide/icside.c +4 -3
diff -urN linux-2.5.20/drivers/ide/icside.c linux/drivers/ide/icside.c
@@ -275,8 +275,9 @@
 #define NR_ENTRIES 256
 #define TABLE_SIZE (NR_ENTRIES * 8)
 
-static int ide_build_sglist(struct ata_channel *ch, struct request *rq)
+static int ide_build_sglist(struct ata_device *drive, struct request *rq)
 {
+	struct ata_channel *ch = drive->channel;
 	struct scatterlist *sg = ch->sg_table;
 	int nents;
 
@@ -294,7 +295,7 @@
 		sg->length = rq->nr_sectors * SECTOR_SIZE;
 		nents = 1;
 	} else {
-		nents = blk_rq_map_sg(rq->q, rq, sg);
+		nents = blk_rq_map_sg(&drive->queue, rq, sg);
 
 		if (rq->q && nents > rq->nr_phys_segments)
 			printk("icside: received %d segments, build %d\n",
@@ -586,7 +587,7 @@
 {
 	printk(KERN_ERR "ATA: %s: UDMA timeout occured:", drive->name);
 	ata_status(drive, 0, 0);
-	ide_dump_status(drive, NULL, "UDMA timeout", drive->status);
+	ata_dump(drive, NULL, "UDMA timeout");
 }
 
 static void icside_irq_lost(struct ata_device *drive)
drivers/ide/ide.c +28 -34

124 lines not on this page · raw message

drivers/ide/ide-cd.c +3 -3
diff -urN linux-2.5.20/drivers/ide/ide-cd.c linux/drivers/ide/ide-cd.c
@@ -614,7 +614,7 @@
 			return 0;
 		} else if (!pc->quiet) {
 			/* Otherwise, print an error. */
-			ide_dump_status(drive, rq, "packet command error", drive->status);
+			ata_dump(drive, rq, "packet command error");
 		}
 
 		/* Set the error flag and complete the request.
@@ -662,13 +662,13 @@
 			   sense_key == DATA_PROTECT) {
 			/* No point in retrying after an illegal
 			   request or data protect error.*/
-			ide_dump_status(drive, rq, "command error", drive->status);
+			ata_dump(drive, rq, "command error");
 			cdrom_end_request(drive, rq,  0);
 		} else if (sense_key == MEDIUM_ERROR) {
 			/* No point in re-trying a zillion times on a bad
 			 * sector.  The error is not correctable at all.
 			 */
-			ide_dump_status(drive, rq, "media error (bad sector)", drive->status);
+			ata_dump(drive, rq, "media error (bad sector)");
 			cdrom_end_request(drive, rq, 0);
 		} else if ((err & ~ABRT_ERR) != 0) {
 			/* Go to the default handler
drivers/ide/pcidma.c +8 -6
diff -urN linux-2.5.20/drivers/ide/pcidma.c linux/drivers/ide/pcidma.c
@@ -58,8 +58,9 @@
  * FIXME: taskfiles should be a map of pages, not a long virt address... /jens
  * FIXME: I agree with Jens --mdcki!
  */
-static int build_sglist(struct ata_channel *ch, struct request *rq)
+static int build_sglist(struct ata_device *drive, struct request *rq)
 {
+	struct ata_channel *ch = drive->channel;
 	struct scatterlist *sg = ch->sg_table;
 	int nents = 0;
 
@@ -69,7 +70,7 @@
 		unsigned char *virt_addr = rq->buffer;
 		int sector_count = rq->nr_sectors;
 #else
-		nents = blk_rq_map_sg(rq->q, rq, ch->sg_table);
+		nents = blk_rq_map_sg(&drive->queue, rq, ch->sg_table);
 
 		if (nents > rq->nr_segments)
 			printk("ide-dma: received %d segments, build %d\n", rq->nr_segments, nents);
@@ -99,7 +100,7 @@
 		sg[nents].length =  sector_count  * SECTOR_SIZE;
 		++nents;
 	} else {
-		nents = blk_rq_map_sg(rq->q, rq, ch->sg_table);
+		nents = blk_rq_map_sg(&drive->queue, rq, ch->sg_table);
 
 		if (rq->q && nents > rq->nr_phys_segments)
 			printk("ide-dma: received %d phys segments, build %d\n", rq->nr_phys_segments, nents);
@@ -150,7 +151,7 @@
 		reading = 1 << 3;
 
 	/* try PIO instead of DMA */
-	if (!udma_new_table(ch, rq))
+	if (!udma_new_table(drive, rq))
 		return 1;
 
 	outl(ch->dmatable_dma, dma_base + 4); /* PRD table */
@@ -306,8 +307,9 @@
  * This prepares a dma request.  Returns 0 if all went okay, returns 1
  * otherwise.  May also be invoked from trm290.c
  */
-int udma_new_table(struct ata_channel *ch, struct request *rq)
+int udma_new_table(struct ata_device *drive, struct request *rq)
 {
+	struct ata_channel *ch = drive->channel;
 	unsigned int *table = ch->dmatable_cpu;
 #ifdef CONFIG_BLK_DEV_TRM290
 	unsigned int is_trm290_chipset = (ch->chipset == ide_trm290);
@@ -318,7 +320,7 @@
 	int i;
 	struct scatterlist *sg;
 
-	ch->sg_nents = i = build_sglist(ch, rq);
+	ch->sg_nents = i = build_sglist(drive, rq);
 	if (!i)
 		return 0;
 
drivers/ide/piix.c +61 -79

218 lines not on this page · raw message

drivers/ide/probe.c +1 -1
diff -urN linux-2.5.20/drivers/ide/probe.c linux/drivers/ide/probe.c
@@ -385,7 +385,7 @@
 	enable_irq(ch->irq);
 
 	if (error) {
-		ide_dump_status(drive, NULL, "set_drive_speed_status", drive->status);
+		ata_dump(drive, NULL, "set drive speed");
 		return error;
 	}
 
drivers/ide/tcq.c +5 -7
diff -urN linux-2.5.20/drivers/ide/tcq.c linux/drivers/ide/tcq.c
@@ -247,8 +247,7 @@
 	OUT_BYTE(WIN_QUEUED_SERVICE, IDE_COMMAND_REG);
 
 	if (wait_altstat(drive, &stat, BUSY_STAT)) {
-		printk(KERN_ERR"%s: BUSY clear took too long\n", __FUNCTION__);
-		ide_dump_status(drive, rq, __FUNCTION__, stat);
+		ata_dump(drive, rq, "BUSY clear took too long");
 		tcq_invalidate_queue(drive);
 
 		return ide_stopped;
@@ -262,7 +261,7 @@
 	 * FIXME, invalidate queue
 	 */
 	if (stat & ERR_STAT) {
-		ide_dump_status(drive, rq, __FUNCTION__, stat);
+		ata_dump(drive, rq, "ERR condition");
 		tcq_invalidate_queue(drive);
 
 		return ide_stopped;
@@ -328,8 +327,7 @@
 	 * must be end of I/O, check status and complete as necessary
 	 */
 	if (!ata_status(drive, READY_STAT, drive->bad_wstat | DRQ_STAT)) {
-		printk(KERN_ERR "%s: %s: error status %x\n", __FUNCTION__, drive->name, drive->status);
-		ide_dump_status(drive, rq, __FUNCTION__, drive->status);
+		ata_dump(drive, rq, __FUNCTION__);
 		tcq_invalidate_queue(drive);
 
 		return ide_stopped;
@@ -557,7 +555,7 @@
 	OUT_BYTE(args->cmd, IDE_COMMAND_REG);
 
 	if (wait_altstat(drive, &stat, BUSY_STAT)) {
-		ide_dump_status(drive, rq, "queued start", stat);
+		ata_dump(drive, rq, "queued start");
 		tcq_invalidate_queue(drive);
 		return ide_stopped;
 	}
@@ -567,7 +565,7 @@
 #endif
 
 	if (stat & ERR_STAT) {
-		ide_dump_status(drive, rq, "tcq_start", stat);
+		ata_dump(drive, rq, "tcq_start");
 		return ide_stopped;
 	}
 
drivers/ide/trm290.c +1 -1
diff -urN linux-2.5.20/drivers/ide/trm290.c linux/drivers/ide/trm290.c
@@ -217,7 +217,7 @@
 		writing = 0;
 	}
 
-	if (!(count = udma_new_table(ch, rq))) {
+	if (!(count = udma_new_table(drive, rq))) {
 		trm290_prepare_drive(drive, 0);	/* select PIO xfer */
 		return 1;	/* try PIO instead of DMA */
 	}
drivers/scsi/ide-scsi.c +14 -11
diff -urN linux-2.5.20/drivers/scsi/ide-scsi.c linux/drivers/scsi/ide-scsi.c
@@ -229,10 +229,15 @@
 	printk("]\n");
 }
 
+static inline idescsi_scsi_t *idescsi_private(struct Scsi_Host *host)
+{
+	return (idescsi_scsi_t*) &host[1];
+}
+
 static int idescsi_end_request(struct ata_device *drive, struct request *rq, int uptodate)
 {
 	struct Scsi_Host *host = drive->driver_data;
-	idescsi_scsi_t *scsi = (idescsi_scsi_t *) host->hostdata[0];
+	idescsi_scsi_t *scsi = idescsi_private(host);
 	struct atapi_packet_command *pc = (struct atapi_packet_command *) rq->special;
 	int log = test_bit(IDESCSI_LOG_CMD, &scsi->log);
 	u8 *scsi_buf;
@@ -289,7 +294,7 @@
 static ide_startstop_t idescsi_pc_intr(struct ata_device *drive, struct request *rq)
 {
 	struct Scsi_Host *host = drive->driver_data;
-	idescsi_scsi_t *scsi = (idescsi_scsi_t *) host->hostdata[0];
+	idescsi_scsi_t *scsi = idescsi_private(host);
 	u8 ireason;
 	int bcount;
 	struct atapi_packet_command *pc=scsi->pc;
@@ -372,7 +377,7 @@
 static ide_startstop_t idescsi_transfer_pc(struct ata_device *drive, struct request *rq)
 {
 	struct Scsi_Host *host = drive->driver_data;
-	idescsi_scsi_t *scsi = (idescsi_scsi_t *) host->hostdata[0];
+	idescsi_scsi_t *scsi = idescsi_private(host);
 	struct atapi_packet_command *pc = scsi->pc;
 	byte ireason;
 	ide_startstop_t startstop;
@@ -398,7 +403,7 @@
 		struct atapi_packet_command *pc)
 {
 	struct Scsi_Host *host = drive->driver_data;
-	idescsi_scsi_t *scsi = (idescsi_scsi_t *) host->hostdata[0];
+	idescsi_scsi_t *scsi = idescsi_private(host);
 	int bcount;
 	int dma_ok = 0;
 
@@ -473,7 +478,6 @@
 	if (ide_unregister_subdriver (drive)) {
 		return 1;
 	}
-	kfree((idescsi_scsi_t *) host->hostdata[0]);
 	scsi_unregister(host);
 
 	return 0;
@@ -515,7 +519,7 @@
 
 static int idescsi_ioctl(Scsi_Device *dev, int cmd, void *arg)
 {
-	idescsi_scsi_t *scsi = (idescsi_scsi_t *) dev->host->hostdata[0];
+	idescsi_scsi_t *scsi = idescsi_private(dev->host);
 
 	if (cmd == SG_SET_TRANSFORM) {
 		if (arg)
@@ -612,7 +616,7 @@
 static inline int should_transform(struct ata_device *drive, Scsi_Cmnd *cmd)
 {
 	struct Scsi_Host *host = drive->driver_data;
-	idescsi_scsi_t *scsi = (idescsi_scsi_t *) host->hostdata[0];
+	idescsi_scsi_t *scsi = idescsi_private(host);
 
 	if (major(cmd->request.rq_dev) == SCSI_GENERIC_MAJOR)
 		return test_bit(IDESCSI_SG_TRANSFORM, &scsi->transform);
@@ -621,7 +625,7 @@
 
 static int idescsi_queue(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
 {
-	idescsi_scsi_t *scsi = (idescsi_scsi_t *) cmd->host->hostdata[0];
+	idescsi_scsi_t *scsi = idescsi_private(cmd->host);
 	struct ata_device *drive = scsi->drive;
 	struct request *rq = NULL;
 	struct atapi_packet_command *pc = NULL;
@@ -691,7 +695,7 @@
 
 static int idescsi_bios(Disk *disk, kdev_t dev, int *parm)
 {
-	idescsi_scsi_t *scsi = (idescsi_scsi_t *) disk->device->host->hostdata[0];
+	idescsi_scsi_t *scsi = idescsi_private(disk->device->host);
 	struct ata_device *drive = scsi->drive;
 
 	if (drive->bios_cyl && drive->bios_head && drive->bios_sect) {
@@ -758,8 +762,7 @@
 	drive->driver_data = host;
 	drive->ready_stat = 0;
 
-	scsi = kmalloc(sizeof(*scsi), GFP_ATOMIC);
-	host->hostdata[0] = (unsigned long) scsi;
+	scsi = idescsi_private(host);
 	memset(scsi,0, sizeof (*scsi));
 	scsi->drive = drive;
 
include/linux/ide.h +3 -6
diff -urN linux-2.5.20/include/linux/ide.h linux/include/linux/ide.h
@@ -610,11 +610,7 @@
 extern void ide_set_handler(struct ata_device *drive, ata_handler_t handler,
 		unsigned long timeout, ata_expiry_t expiry);
 
-/*
- * Error reporting, in human readable form (luxurious, but a memory hog).
- */
-extern u8 ide_dump_status(struct ata_device *, struct request *rq, const char *, u8);
-
+extern u8 ata_dump(struct ata_device *, struct request *, const char *);
 extern ide_startstop_t ata_error(struct ata_device *, struct request *rq, const char *);
 
 extern void ide_fixstring(char *s, const int bytecount, const int byteswap);
@@ -799,7 +795,7 @@
 extern void udma_pci_irq_lost(struct ata_device *);
 extern int udma_pci_setup(struct ata_device *);
 
-extern int udma_new_table(struct ata_channel *, struct request *);
+extern int udma_new_table(struct ata_device *, struct request *);
 extern void udma_destroy_table(struct ata_channel *);
 extern void udma_print(struct ata_device *);
 
@@ -834,5 +830,6 @@
 extern int ata_irq_enable(struct ata_device *, int);
 extern void ata_reset(struct ata_channel *);
 extern void ata_out_regfile(struct ata_device *, struct hd_drive_task_hdr *);
+extern void ata_in_regfile(struct ata_device *, struct hd_drive_task_hdr *);
 
 #endif
#7 lore raw

Re: ]PATCH] 2.5.20 IDE 83

In reply to Linus Torvalds
Quoted 5 lines · Martin Dalecki

- Patch for DVD read through ide-scsi. There is the possibility that we can get
request structures passed down, which don't have the queue field set. At lest on the BIO code path this seems to be something worth further investigation. Found by Adam J. Richter. (Jens?)

It's because of the scsi mid layer queueing private requests which have rq->q cleared. The fix looks correct.

Signature · 1 line
Jens Axboe
#8 lore raw

PATCH 1/1 2.5.20 IDE 84

In reply to Linus Torvalds

Tue Jun 4 08:20:56 CEST 2002 ide-clean-84

- Simplify ide_cmd_type_parse by removing the handling of commands which we never use.

- Realize that pre_task_out_intr and pre_task_mulout_intr are semanticaly identical. Use only pre_task_out_intr(). This allowed us to eliminate the prehandler altogether.

- Updated fix for misconfigured host chips by Vojtech Pavlik.

- Be more permissive about ioctl handling to allow device type drivers to do they own checks.

- ali14xx cleanups by Andrej Panin.

- Unfold usage ide_cmd_type_parser in tcq.c code. This makes this operation local to ide-disk.c. Move it as well as the interrupt handlers used only for the handling of disk requests there too.

- Guard against calling handler before the drive is ready for it in ata_taskfile()! Well this bug was there before, but right now we inform about it.

- Unfold ide_cmd_type_praser in ide-disk.c. Merge the remaining bits of it with get_command. Well it's no more.

- Move recal_intr to ide.c - the only place where it's used.

This doesn't change the "mechanics" of the code but it makes it a lot more "obvious" what's going on.

arch/i386/pci/fixup.c +3 -14
diff -urN linux-2.5.20/arch/i386/pci/fixup.c linux/arch/i386/pci/fixup.c
@@ -99,17 +99,6 @@
 		d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0;
 }
 
-static void __devinit pci_fixup_ide_exbar(struct pci_dev *d)
-{
-	/*
-	 * Some new Intel IDE controllers have an EXBAR register for
-	 * MMIO instead of PIO. It's unused, undocumented (though maybe
-	 * functional). BIOSes often assign conflicting memory address
-	 * to this. Just kill it.
-	 */
-	d->resource[5].start = d->resource[5].end = d->resource[5].flags = 0;
-}
-
 static void __devinit  pci_fixup_latency(struct pci_dev *d)
 {
 	/*
@@ -185,9 +174,9 @@
 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_5597,		pci_fixup_latency },
 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_5598,		pci_fixup_latency },
  	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82371AB_3,	pci_fixup_piix4_acpi },
- 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801CA_10,	pci_fixup_ide_exbar },
- 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801CA_11,	pci_fixup_ide_exbar },
- 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801DB_9,	pci_fixup_ide_exbar },
+ 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801CA_10,	pci_fixup_ide_trash },
+ 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801CA_11,	pci_fixup_ide_trash },
+ 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801DB_9,	pci_fixup_ide_trash },
 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8363_0,	pci_fixup_via_northbridge_bug },
 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8622,	        pci_fixup_via_northbridge_bug },
 	{ PCI_FIXUP_HEADER,	PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8361,	        pci_fixup_via_northbridge_bug },
drivers/ide/ali14xx.c +65 -67

237 lines not on this page · raw message

drivers/ide/ide.c +14 -3
diff -urN linux-2.5.20/drivers/ide/ide.c linux/drivers/ide/ide.c
@@ -67,9 +67,6 @@
 #include "pcihost.h"
 #include "ioctl.h"
 
-/* default maximum number of failures */
-#define IDE_DEFAULT_MAX_FAILURES	1
-
 /*
  * CompactFlash cards and their relatives pretend to be removable hard disks, except:
  *	(1) they never have a slave unit, and
@@ -555,6 +552,19 @@
 #endif
 
 /*
+ * This is invoked on completion of a WIN_RESTORE (recalibrate) cmd.
+ *
+ * FIXME: Why can't be just use task_no_data_intr here?
+ */
+static ide_startstop_t recal_intr(struct ata_device *drive, struct request *rq)
+{
+	if (!ata_status(drive, READY_STAT, BAD_STAT))
+		return ata_error(drive, rq, __FUNCTION__);
+
+	return ide_stopped;
+}
+
+/*
  * We are still on the old request path here so issuing the recalibrate command
  * directly should just work.
  */
@@ -572,6 +582,7 @@
 		args.taskfile.sector_count = drive->sect;
 		args.cmd = WIN_RESTORE;
 		args.handler = recal_intr;
+		args.command_type = IDE_DRIVE_TASK_NO_DATA;
 		ata_taskfile(drive, &args, NULL);
 	}
 
drivers/ide/ide-disk.c +272 -31

417 lines not on this page · raw message

drivers/ide/ide-taskfile.c +89 -504

659 lines not on this page · raw message

drivers/ide/ioctl.c +45 -3

141 lines not on this page · raw message

drivers/ide/tcq.c +8 -4
diff -urN linux-2.5.20/drivers/ide/tcq.c linux/drivers/ide/tcq.c
@@ -406,7 +406,8 @@
 
 	args.taskfile.feature = 0x01;
 	args.cmd = WIN_NOP;
-	ide_cmd_type_parser(&args);
+	args.handler = task_no_data_intr;
+	args.command_type = IDE_DRIVE_TASK_NO_DATA;
 
 	/*
 	 * do taskfile and check ABRT bit -- intelligent adapters will not
@@ -441,7 +442,8 @@
 	memset(&args, 0, sizeof(args));
 	args.taskfile.feature = SETFEATURES_EN_WCACHE;
 	args.cmd = WIN_SETFEATURES;
-	ide_cmd_type_parser(&args);
+	args.handler = task_no_data_intr;
+	args.command_type = IDE_DRIVE_TASK_NO_DATA;
 
 	if (ide_raw_taskfile(drive, &args)) {
 		printk("%s: failed to enable write cache\n", drive->name);
@@ -455,7 +457,8 @@
 	memset(&args, 0, sizeof(args));
 	args.taskfile.feature = SETFEATURES_DIS_RI;
 	args.cmd = WIN_SETFEATURES;
-	ide_cmd_type_parser(&args);
+	args.handler = task_no_data_intr;
+	args.command_type = IDE_DRIVE_TASK_NO_DATA;
 
 	if (ide_raw_taskfile(drive, &args)) {
 		printk("%s: disabling release interrupt fail\n", drive->name);
@@ -469,7 +472,8 @@
 	memset(&args, 0, sizeof(args));
 	args.taskfile.feature = SETFEATURES_EN_SI;
 	args.cmd = WIN_SETFEATURES;
-	ide_cmd_type_parser(&args);
+	args.handler = task_no_data_intr;
+	args.command_type = IDE_DRIVE_TASK_NO_DATA;
 
 	if (ide_raw_taskfile(drive, &args)) {
 		printk("%s: enabling service interrupt fail\n", drive->name);
include/linux/ide.h +18 -5
diff -urN linux-2.5.20/include/linux/ide.h linux/include/linux/ide.h
@@ -664,7 +664,6 @@
 	struct hd_drive_task_hdr  hobfile;
 	u8 cmd;					/* actual ATA command */
 	int command_type;
-	ide_startstop_t (*prehandler)(struct ata_device *, struct request *);
 	ide_startstop_t (*handler)(struct ata_device *, struct request *);
 };
 
@@ -678,17 +677,31 @@
  * Special Flagged Register Validation Caller
  */
 
-extern ide_startstop_t recal_intr(struct ata_device *, struct request *);
-extern ide_startstop_t task_no_data_intr(struct ata_device *, struct request *);
+/*
+ * for now, taskfile requests are special :/
+ */
+static inline char *ide_map_rq(struct request *rq, unsigned long *flags)
+{
+	if (rq->bio)
+		return bio_kmap_irq(rq->bio, flags) + ide_rq_offset(rq);
+	else
+		return rq->buffer + ((rq)->nr_sectors - (rq)->current_nr_sectors) * SECTOR_SIZE;
+}
 
-extern void ide_cmd_type_parser(struct ata_taskfile *args);
+static inline void ide_unmap_rq(struct request *rq, char *to,
+				unsigned long *flags)
+{
+	if (rq->bio)
+		bio_kunmap_irq(to, flags);
+}
+
+extern ide_startstop_t task_no_data_intr(struct ata_device *, struct request *);
 extern int ide_raw_taskfile(struct ata_device *, struct ata_taskfile *);
 
 extern void ide_fix_driveid(struct hd_driveid *id);
 extern int ide_config_drive_speed(struct ata_device *, byte);
 extern byte eighty_ninty_three(struct ata_device *);
 
-
 extern void ide_stall_queue(struct ata_device *, unsigned long);
 
 extern int system_bus_speed;
#9 lore raw

Re: 2.5.20 -- suspend.c still breaks the build (originally reported for 2.5.18)

In reply to Linus Torvalds

Hi!

Quoted 3 lines

suspend.c: In function signal_wake_up'
suspend.c: In function do_suspend_sync':
suspend.c:306:

#10 lore raw

Re: [patch] i386 "General Options" - begone [take 2]

In reply to Linus Torvalds

Hi!

Quoted 8 lines

This patch (a minor update on one that I accidently left lkml out of the To:) removes the "General Options" top level config menu from the i386 build for 2.5.20. It didn't describe what it was doing, and it contained a broad collection of mostly unrelated configuration options.
To replace it, you now get:
"Power management options (ACPI, APM)", which also includes software suspend. "Bus options (PCI, PCMCIA, EISA, MCA, ISA)"
"Executable file formats"

Good.

Quoted 2 lines

While moving software suspend, I also took the chance to tweak the Config.help entry.

Please don't tell people about sysrq-D, I'm going to kill that. OTOH convient way is echo 4 > /proc/acpi/sleep -- that is if you have ACPI enabled.

Swsusp is required for suspend-to-ram, too. I plan to fix that somehow, however.
Pavel

Signature · 2 lines
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.
#11 lore raw

Re: [patch] i386 "General Options" - begone [take 2]

In reply to Linus Torvalds
Quoted 3 lines · Pavel Machek

Please don't tell people about sysrq-D, I'm going to kill that. OTOH convient way is echo 4 > /proc/acpi/sleep -- that is if you have ACPI enabled.

Extract from the patch:
- You may suspend your machine by either pressing Sysrq-d or with <snip>
+ require APM. You may suspend your machine by either pressing
+ Sysrq-d or with 'swsusp' or 'shutdown -z <time>' (patch for

So it is in the original. When you kill the functionality, update the doco.

Brad

Signature · 1 line
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.
#12 lore raw

PATCH 1/1 2.5.20 IDE 85

In reply to Linus Torvalds

Tue Jun 4 16:50:01 CEST 2002 ide-clean-85

- Work a bit on the automatic CRC error recovery handling. System still hangs. But one thing for sure - we don't have to use any specialized irq handler for it.

- Since ioctl don't any longer submit requests to the queue without rq->special set, we can safely remove args_error handling from start_request.

- Make REQ_SPECIAL usage in ide-floppy obvious.

- Use REQ_SPECIAL everywhere instead of REQ_DRIVE_ACB. This is actually a bit dangerous but should work as far as I can see.

- Unfold the now not REQ_SPECIAL specific dequeing part of ide_end_drive_cmd(). Turns out that we can thereafter remove the calls to ide_end_drice_cmd() at places where the request type isn't REQ_SPECIAL all any longer. (tcq.c)

- After the above operation it turns out that there are just two places where ide_end_drive_cmd remains, namely: ata_error, task_no_data_intr drive_cmd_intr.

We can avoid it by changing the logics in ata_error a slightly.

So now just to cases remain where ide_end_drive_cmd remains used:
drive_cmd_intr and task_no_data_intr.

- Now looking a bit closer we can realize that drive_cmd_intr and task_no_data_intr can be easly merged together, since the usage of task_no_data_intr implied taskfile.sector_number == 0.

- Use one single ata_special_intr function for the handling of interrupts submitted through ide_raw_cmd.

- Move the remaining artefacts of ide_end_drive_cmd directly to ata_special_intr. Oh we don't need to check for REQ_SPECIAL any longer there, since the context is already known.

- Set the ata_special_intr handler and command type directly inside ide_raw_taskfile to save code.

drivers/block/ll_rw_blk.c +0 -1
diff -urN linux-2.5.20/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
@@ -507,7 +507,6 @@
 	"REQ_STARTED",
 	"REQ_DONTPREP",
 	"REQ_QUEUED",
-	"REQ_DRIVE_ACB",
 	"REQ_PC",
 	"REQ_BLOCK_PC",
 	"REQ_SENSE",
drivers/ide/icside.c +7 -34

74 lines not on this page · raw message

drivers/ide/ide.c +11 -75

149 lines not on this page · raw message

drivers/ide/ide-disk.c +18 -48

154 lines not on this page · raw message

drivers/ide/ide-floppy.c +4 -6
diff -urN linux-2.5.20/drivers/ide/ide-floppy.c linux/drivers/ide/ide-floppy.c
@@ -308,8 +308,6 @@
 #define	IDEFLOPPY_IOCTL_FORMAT_START		0x4602
 #define IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS	0x4603
 
-#define IDEFLOPPY_RQ			(REQ_SPECIAL)
-
 /*
  *	Error codes which are returned in rq->errors to the higher part
  *	of the driver.
@@ -633,7 +631,7 @@
 	if (!rq)
 		return 0;
 
-	if (!(rq->flags & IDEFLOPPY_RQ)) {
+	if (!(rq->flags & REQ_SPECIAL)) {
 		ide_end_request(drive, rq, uptodate);
 		return 0;
 	}
@@ -717,7 +715,7 @@
 		struct atapi_packet_command *pc, struct request *rq)
 {
 	memset(rq, 0, sizeof(*rq));
-	rq->flags = IDEFLOPPY_RQ;
+	rq->flags = REQ_SPECIAL;
 	/* FIXME: --mdcki */
 	rq->buffer = (char *) pc;
 	(void) ide_do_drive_cmd (drive, rq, ide_preempt);
@@ -1251,7 +1249,7 @@
 		}
 		pc = idefloppy_next_pc_storage(drive);
 		idefloppy_create_rw_cmd (floppy, pc, rq, block);
-	} else if (rq->flags & IDEFLOPPY_RQ) {
+	} else if (rq->flags & REQ_SPECIAL) {
 		/* FIXME: --mdcki */
 		pc = (struct atapi_packet_command *) rq->buffer;
 	} else {
@@ -1274,7 +1272,7 @@
 	memset(&rq, 0, sizeof(rq));
 	/* FIXME: --mdcki */
 	rq.buffer = (char *) pc;
-	rq.flags = IDEFLOPPY_RQ;
+	rq.flags = REQ_SPECIAL;
 
 	return ide_do_drive_cmd(drive, &rq, ide_wait);
 }
drivers/ide/ide-pmac.c +4 -3
diff -urN linux-2.5.20/drivers/ide/ide-pmac.c linux/drivers/ide/ide-pmac.c
@@ -1126,7 +1126,7 @@
 		udelay(1);
 
 	/* Build sglist */
-	if (rq->flags & REQ_DRIVE_ACB) {
+	if (rq->flags & REQ_SPECIAL) {
 		pmac_ide[ix].sg_nents = i = pmac_raw_build_sglist(ix, rq);
 	} else {
 		pmac_ide[ix].sg_nents = i = pmac_ide_build_sglist(ix, rq);
@@ -1437,10 +1437,11 @@
 	if (drive->type != ATA_DISK)
 		return 0;
 	ide_set_handler(drive, ide_dma_intr, WAIT_CMD, NULL);
-	if ((rq->flags & REQ_DRIVE_ACB) &&
+	if ((rq->flags & REQ_SPECIAL) &&
 		(drive->addressing == 1)) {
 		struct ata_taskfile *args = rq->special;
-		OUT_BYTE(args->taskfile.command, IDE_COMMAND_REG);
+		/* FIXME: this is never reached */
+		OUT_BYTE(args->cmd, IDE_COMMAND_REG);
 	} else if (drive->addressing) {
 		OUT_BYTE(reading ? WIN_READDMA_EXT : WIN_WRITEDMA_EXT, IDE_COMMAND_REG);
 	} else {
drivers/ide/ide-taskfile.c +59 -29

107 lines not on this page · raw message

drivers/ide/ioctl.c +2 -26
diff -urN linux-2.5.20/drivers/ide/ioctl.c linux/drivers/ide/ioctl.c
@@ -34,30 +34,6 @@
 #include "ioctl.h"
 
 /*
- * Invoked on completion of a special DRIVE_CMD.
- */
-static ide_startstop_t drive_cmd_intr(struct ata_device *drive, struct request *rq)
-{
-	struct ata_taskfile *ar = rq->special;
-
-	ide__sti();	/* local CPU only */
-	if (!ata_status(drive, 0, DRQ_STAT) && ar->taskfile.sector_number) {
-		int retries = 10;
-
-		ata_read(drive, rq->buffer, ar->taskfile.sector_number * SECTOR_WORDS);
-
-		while (!ata_status(drive, 0, BUSY_STAT) && retries--)
-			udelay(100);
-	}
-
-	if (!ata_status(drive, READY_STAT, BAD_STAT))
-		return ata_error(drive, rq, __FUNCTION__); /* already calls ide_end_drive_cmd */
-	ide_end_drive_cmd(drive, rq);
-
-	return ide_stopped;
-}
-
-/*
  * Implement generic ioctls invoked from userspace to imlpement specific
  * functionality.
  *
@@ -79,7 +55,7 @@
 		return -EFAULT;
 
 	memset(&rq, 0, sizeof(rq));
-	rq.flags = REQ_DRIVE_ACB;
+	rq.flags = REQ_SPECIAL;
 
 	memset(&args, 0, sizeof(args));
 
@@ -107,7 +83,7 @@
 
 	/* Issue ATA command and wait for completion.
 	 */
-	args.handler = drive_cmd_intr;
+	args.handler = ata_special_intr;
 
 	rq.buffer = argbuf + 4;
 	rq.special = &args;
drivers/ide/pcidma.c +4 -8
diff -urN linux-2.5.20/drivers/ide/pcidma.c linux/drivers/ide/pcidma.c
@@ -64,7 +64,7 @@
 	struct scatterlist *sg = ch->sg_table;
 	int nents = 0;
 
-	if (rq->flags & REQ_DRIVE_ACB) {
+	if (rq->flags & REQ_SPECIAL) {
 		struct ata_taskfile *args = rq->special;
 #if 1
 		unsigned char *virt_addr = rq->buffer;
@@ -525,6 +525,7 @@
 	if (ata_start_dma(drive, rq))
 		return 1;
 
+	/* No DMA transfers on ATAPI devices. */
 	if (drive->type != ATA_DISK)
 		return 0;
 
@@ -533,13 +534,8 @@
 	else
 		cmd = 0x00;
 
-	ide_set_handler(drive, ide_dma_intr, WAIT_CMD, dma_timer_expiry);	/* issue cmd to drive */
-	if ((rq->flags & REQ_DRIVE_ACB) && (drive->addressing == 1)) {
-		/* FIXME: this should never happen */
-		struct ata_taskfile *args = rq->special;
-
-		outb(args->cmd, IDE_COMMAND_REG);
-	} else if (drive->addressing)
+	ide_set_handler(drive, ide_dma_intr, WAIT_CMD, dma_timer_expiry);
+	if (drive->addressing)
 		outb(cmd ? WIN_READDMA_EXT : WIN_WRITEDMA_EXT, IDE_COMMAND_REG);
 	else
 		outb(cmd ? WIN_READDMA : WIN_WRITEDMA, IDE_COMMAND_REG);
drivers/ide/tcq.c +6 -17
diff -urN linux-2.5.20/drivers/ide/tcq.c linux/drivers/ide/tcq.c
@@ -60,7 +60,9 @@
 	struct ata_taskfile *args = rq->special;
 
 	ide__sti();
-	ide_end_drive_cmd(drive, rq);
+	blkdev_dequeue_request(rq);
+	drive->rq = NULL;
+	end_that_request_last(rq);
 	kfree(args);
 
 	return ide_stopped;
@@ -402,18 +404,14 @@
 	if (drives <= 1)
 		return 0;
 
-	memset(&args, 0, sizeof(args));
-
-	args.taskfile.feature = 0x01;
-	args.cmd = WIN_NOP;
-	args.handler = task_no_data_intr;
-	args.command_type = IDE_DRIVE_TASK_NO_DATA;
-
 	/*
 	 * do taskfile and check ABRT bit -- intelligent adapters will not
 	 * pass NOP with sub-code 0x01 to device, so the command will not
 	 * fail there
 	 */
+	memset(&args, 0, sizeof(args));
+	args.taskfile.feature = 0x01;
+	args.cmd = WIN_NOP;
 	ide_raw_taskfile(drive, &args);
 	if (args.taskfile.feature & ABRT_ERR)
 		return 1;
@@ -442,9 +440,6 @@
 	memset(&args, 0, sizeof(args));
 	args.taskfile.feature = SETFEATURES_EN_WCACHE;
 	args.cmd = WIN_SETFEATURES;
-	args.handler = task_no_data_intr;
-	args.command_type = IDE_DRIVE_TASK_NO_DATA;
-
 	if (ide_raw_taskfile(drive, &args)) {
 		printk("%s: failed to enable write cache\n", drive->name);
 		return 1;
@@ -457,9 +452,6 @@
 	memset(&args, 0, sizeof(args));
 	args.taskfile.feature = SETFEATURES_DIS_RI;
 	args.cmd = WIN_SETFEATURES;
-	args.handler = task_no_data_intr;
-	args.command_type = IDE_DRIVE_TASK_NO_DATA;
-
 	if (ide_raw_taskfile(drive, &args)) {
 		printk("%s: disabling release interrupt fail\n", drive->name);
 		return 1;
@@ -472,9 +464,6 @@
 	memset(&args, 0, sizeof(args));
 	args.taskfile.feature = SETFEATURES_EN_SI;
 	args.cmd = WIN_SETFEATURES;
-	args.handler = task_no_data_intr;
-	args.command_type = IDE_DRIVE_TASK_NO_DATA;
-
 	if (ide_raw_taskfile(drive, &args)) {
 		printk("%s: enabling service interrupt fail\n", drive->name);
 		return 1;
include/linux/blkdev.h +1 -4
diff -urN linux-2.5.20/include/linux/blkdev.h linux/include/linux/blkdev.h
@@ -81,13 +81,11 @@
 	/*
 	 * for ATA/ATAPI devices
 	 */
-	__REQ_DRIVE_ACB,
-
 	__REQ_PC,	/* packet command (special) */
 	__REQ_BLOCK_PC,	/* queued down pc from block layer */
 	__REQ_SENSE,	/* sense retrival */
 
-	__REQ_SPECIAL,	/* driver special command (currently reset) */
+	__REQ_SPECIAL,	/* driver suplied command */
 
 	__REQ_NR_BITS,	/* stops here */
 };
@@ -100,7 +98,6 @@
 #define REQ_STARTED	(1 << __REQ_STARTED)
 #define REQ_DONTPREP	(1 << __REQ_DONTPREP)
 #define REQ_QUEUED	(1 << __REQ_QUEUED)
-#define REQ_DRIVE_ACB	(1 << __REQ_DRIVE_ACB)
 #define REQ_PC		(1 << __REQ_PC)
 #define REQ_BLOCK_PC	(1 << __REQ_BLOCK_PC)
 #define REQ_SENSE	(1 << __REQ_SENSE)
include/linux/ide.h +1 -6
diff -urN linux-2.5.20/include/linux/ide.h linux/include/linux/ide.h
@@ -654,11 +654,6 @@
 
 extern int ide_do_drive_cmd(struct ata_device *, struct request *, ide_action_t);
 
-/*
- * Clean up after success/failure of an explicit drive cmd.
- */
-extern void ide_end_drive_cmd(struct ata_device *, struct request *);
-
 struct ata_taskfile {
 	struct hd_drive_task_hdr taskfile;
 	struct hd_drive_task_hdr  hobfile;
@@ -695,7 +690,7 @@
 		bio_kunmap_irq(to, flags);
 }
 
-extern ide_startstop_t task_no_data_intr(struct ata_device *, struct request *);
+extern ide_startstop_t ata_special_intr(struct ata_device *, struct request *);
 extern int ide_raw_taskfile(struct ata_device *, struct ata_taskfile *);
 
 extern void ide_fix_driveid(struct hd_driveid *id);
#13 lore raw

Re: [PATCH] 2.5.20 IDE 85

In reply to Linus Torvalds

On Wed, Jun 05 2002, Martin Dalecki wrote:

AFAICS, you just introduced some nasty list races in the interrupt handlers. You must hold the queue locks when calling blkdev_dequeue_request() and end_that_request_last(), for instance.

Signature · 1 line
Jens Axboe
#14 lore raw

Re: [PATCH] 2.5.20 IDE 85

In reply to Linus Torvalds
Quoted 6 lines · Jens Axboe

On Wed, Jun 05 2002, Martin Dalecki wrote:

AFAICS, you just introduced some nasty list races in the interrupt handlers. You must hold the queue locks when calling blkdev_dequeue_request() and end_that_request_last(), for instance.

No. Please be more accurate. Becouse:

1. If anything I have made existing races only "obvious".

2. It is called in the context of do_ide_request or ide_raw_taskfile where we already have the lock.

#15 lore raw

Re: [PATCH] 2.5.20 IDE 85

In reply to Linus Torvalds
Quoted 11 lines · Martin Dalecki
Quoted 6 lines · Jens Axboe

On Wed, Jun 05 2002, Martin Dalecki wrote:

AFAICS, you just introduced some nasty list races in the interrupt handlers. You must hold the queue locks when calling blkdev_dequeue_request() and end_that_request_last(), for instance.

No. Please be more accurate. Becouse:

1. If anything I have made existing races only "obvious".

If anything, you've made a race you introduced earlier more obvious.

Quoted 2 lines

2. It is called in the context of do_ide_request or ide_raw_taskfile where we already have the lock.

?? Both tcq and ata_special_intr look like interrupt handlers to me.

Signature · 1 line
Jens Axboe
#16 lore raw

Re: [PATCH] 2.5.20 IDE 85

In reply to Linus Torvalds
Quoted 11 lines · Jens Axboe
Quoted 10 lines · Martin Dalecki
Quoted 6 lines · Jens Axboe

On Wed, Jun 05 2002, Martin Dalecki wrote:

AFAICS, you just introduced some nasty list races in the interrupt handlers. You must hold the queue locks when calling blkdev_dequeue_request() and end_that_request_last(), for instance.

No. Please be more accurate. Becouse:

Quoted 8 lines
Quoted 1 line

1. If anything I have made existing races only "obvious".

If anything, you've made a race you introduced earlier more obvious.

Quoted 2 lines

2. It is called in the context of do_ide_request or ide_raw_taskfile where we already have the lock.

?? Both tcq and ata_special_intr look like interrupt handlers to me.

BTW, I wanted to look at the code (and not just read the patch), but it's not clear from the patch what it is against. Where do you keep older patches so I can get them? Maybe the ide code could do with a bit of peer review :-)

Signature · 1 line
Jens Axboe
#17 lore raw

Re: [PATCH] 2.5.20 IDE 85

In reply to Linus Torvalds
Quoted 23 lines · Jens Axboe
Quoted 21 lines · Jens Axboe
Quoted 4 lines · Martin Dalecki
Quoted 2 lines · Jens Axboe

On Wed, Jun 05 2002, Martin Dalecki wrote:

Quoted 8 lines
Quoted 4 lines

AFAICS, you just introduced some nasty list races in the interrupt handlers. You must hold the queue locks when calling blkdev_dequeue_request() and end_that_request_last(), for instance.

No. Please be more accurate. Becouse:

1. If anything I have made existing races only "obvious".

If anything, you've made a race you introduced earlier more obvious.

Quoted 2 lines

2. It is called in the context of do_ide_request or ide_raw_taskfile where we already have the lock.

Quoted 8 lines
Quoted 1 line

?? Both tcq and ata_special_intr look like interrupt handlers to me.

BTW, I wanted to look at the code (and not just read the patch), but it's not clear from the patch what it is against. Where do you keep older patches so I can get them? Maybe the ide code could do with a bit of peer review :-)

Well IDE 83 and 84 are already inside the bk repository at linux.bkbits.com. No as far as of now I don't have any public FTP or whatever area for the patches (Well send you everything in one go.)
And I of course agree that the code needs a peer review in this area. Adding the locking isn't difficult.
However I wonder a bit whatever we couldn't just blkdev_dequeue_request() once at request handling start? We drag drive->rq around anyway...

#18 lore raw

Re: [PATCH] 2.5.20 IDE 85

In reply to Linus Torvalds
Quoted 33 lines · Martin Dalecki
Quoted 23 lines · Jens Axboe
Quoted 21 lines · Jens Axboe
Quoted 4 lines · Martin Dalecki
Quoted 2 lines · Jens Axboe

On Wed, Jun 05 2002, Martin Dalecki wrote:

Quoted 8 lines
Quoted 4 lines

AFAICS, you just introduced some nasty list races in the interrupt handlers. You must hold the queue locks when calling blkdev_dequeue_request() and end_that_request_last(), for instance.

No. Please be more accurate. Becouse:

1. If anything I have made existing races only "obvious".

If anything, you've made a race you introduced earlier more obvious.

Quoted 2 lines

2. It is called in the context of do_ide_request or ide_raw_taskfile where we already have the lock.

Quoted 8 lines
Quoted 1 line

?? Both tcq and ata_special_intr look like interrupt handlers to me.

BTW, I wanted to look at the code (and not just read the patch), but it's not clear from the patch what it is against. Where do you keep older patches so I can get them? Maybe the ide code could do with a bit of peer review :-)

Quoted 3 lines

Well IDE 83 and 84 are already inside the bk repository at linux.bkbits.com. No as far as of now I don't have any public FTP or whatever area for the patches (Well send you everything in one go.)

Thanks. Just ask hpa for a kernel.org dir, if you don't have anywhere else to keep it.

Quoted 2 lines

And I of course agree that the code needs a peer review in this area. Adding the locking isn't difficult.

Of course not, discovering the missing locking is most of the work. And of course acknowedging that there's a problem :-)

Quoted 2 lines

However I wonder a bit whatever we couldn't just blkdev_dequeue_request() once at request handling start? We drag drive->rq around anyway...

I did that once a long time ago, but it was very broken because the IDE code would end up in ide_do_request() several times at times before a request was started. I think there are advantages both ways: leaving the request on the queue until it is done allows the i/o scheduler to know what the disk is currently working on. Removing it is potentially a bit cleaner, however most of the reason for that has long been reworked in 2.5 (the plugging and head active stuff).

Signature · 1 line
Jens Axboe
#19 lore raw

Re: [PATCH] 2.5.20 IDE 85

In reply to Linus Torvalds
Quoted 49 lines · Jens Axboe
Quoted 38 lines · Martin Dalecki
Quoted 27 lines · Jens Axboe
Quoted 24 lines · Jens Axboe
Quoted 5 lines · Martin Dalecki
Quoted 2 lines · Jens Axboe

On Wed, Jun 05 2002, Martin Dalecki wrote:

Quoted 8 lines
Quoted 4 lines

AFAICS, you just introduced some nasty list races in the interrupt handlers. You must hold the queue locks when calling blkdev_dequeue_request() and end_that_request_last(), for instance.

No. Please be more accurate. Becouse:

1. If anything I have made existing races only "obvious".

If anything, you've made a race you introduced earlier more obvious.

Quoted 2 lines

2. It is called in the context of do_ide_request or ide_raw_taskfile where we already have the lock.

Quoted 8 lines
Quoted 1 line

?? Both tcq and ata_special_intr look like interrupt handlers to me.

BTW, I wanted to look at the code (and not just read the patch), but it's not clear from the patch what it is against. Where do you keep older patches so I can get them? Maybe the ide code could do with a bit of peer review :-)

Quoted 3 lines

Well IDE 83 and 84 are already inside the bk repository at linux.bkbits.com. No as far as of now I don't have any public FTP or whatever area for the patches (Well send you everything in one go.)

Thanks. Just ask hpa for a kernel.org dir, if you don't have anywhere else to keep it.

Quoted 6 lines
Quoted 2 lines

And I of course agree that the code needs a peer review in this area. Adding the locking isn't difficult.

Of course not, discovering the missing locking is most of the work. And of course acknowedging that there's a problem :-)

Just to make sure that we understand each other. I admitt that you are right there have to be locks there. As well as around any host chip access. Thanks for the reminder.
And well please note that the last patches in esp. are trying hard to reducde the number of possible code flow branch cases.

Quoted 11 lines
Quoted 2 lines

However I wonder a bit whatever we couldn't just blkdev_dequeue_request() once at request handling start? We drag drive->rq around anyway...

I did that once a long time ago, but it was very broken because the IDE code would end up in ide_do_request() several times at times before a request was started. I think there are advantages both ways: leaving the request on the queue until it is done allows the i/o scheduler to know what the disk is currently working on. Removing it is potentially a bit cleaner, however most of the reason for that has long been reworked in 2.5 (the plugging and head active stuff).

Yes I remember - the IDE/SCSI queue head differencies. Making them to behave entierly equal would have some charm too... However the multi ide_do_request entry problems should
have got *much* better due to the reduction of the multiple submitted/injected artifical request (REQ_ and friends) types. The remaining one is now only ide_raw_taskfile
and the regular onces. Well ide-tape and packet command handling aside... but whom I'm telling this ... I'm sure you already know...

#20 lore raw

PATCH 1/1 Cleanup i386 <linux/init.h> abuses

In reply to Linus Torvalds

The following patch cleans up the i386 usage of <linux/init.h>. This remove <linux/init.h> from <asm-i386/system.h> which did not need it, <asm-i386/highmem.h> which only had it due to an extern using __init, which is not needed.
This adds <linux/init.h> to <asm-i386/bugs.h> which actually has numerous __init functions and adds <linux/init.h> to 9 files inside of arch/i386 which were indirectly including <linux/init.h> previously.

Signature · 143 lines
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

===== arch/i386/kernel/setup-visws.c 1.1 vs edited =====
--- 1.1/arch/i386/kernel/setup-visws.c	Tue Feb  5 16:59:42 2002
+++ edited/arch/i386/kernel/setup-visws.c	Wed Jun  5 09:15:52 2002
@@ -3,6 +3,8 @@
  *  Split out from setup.c by [email protected]
  */
 
+#include <linux/init.h>
+
 char visws_board_type = -1;
 char visws_board_rev = -1;
 
===== arch/i386/mm/ioremap.c 1.8 vs edited =====
--- 1.8/arch/i386/mm/ioremap.c	Fri May  3 05:26:39 2002
+++ edited/arch/i386/mm/ioremap.c	Wed Jun  5 09:02:02 2002
@@ -9,6 +9,7 @@
  */
 
 #include <linux/vmalloc.h>
+#include <linux/init.h>
 #include <asm/io.h>
 #include <asm/pgalloc.h>
 #include <asm/fixmap.h>
===== arch/i386/pci/acpi.c 1.7 vs edited =====
--- 1.7/arch/i386/pci/acpi.c	Wed May 29 15:54:35 2002
+++ edited/arch/i386/pci/acpi.c	Wed Jun  5 09:11:10 2002
@@ -1,5 +1,6 @@
 #include <linux/pci.h>
 #include <linux/acpi.h>
+#include <linux/init.h>
 #include "pci.h"
 
 static int __init pci_acpi_init(void)
===== arch/i386/pci/common.c 1.31 vs edited =====
--- 1.31/arch/i386/pci/common.c	Wed May 29 15:54:35 2002
+++ edited/arch/i386/pci/common.c	Wed Jun  5 09:11:18 2002
@@ -7,6 +7,7 @@
 #include <linux/sched.h>
 #include <linux/pci.h>
 #include <linux/ioport.h>
+#include <linux/init.h>
 
 #include <asm/segment.h>
 #include <asm/io.h>
===== arch/i386/pci/direct.c 1.6 vs edited =====
--- 1.6/arch/i386/pci/direct.c	Tue May  7 10:27:29 2002
+++ edited/arch/i386/pci/direct.c	Wed Jun  5 09:08:16 2002
@@ -3,6 +3,7 @@
  */
 
 #include <linux/pci.h>
+#include <linux/init.h>
 #include "pci.h"
 
 /*
===== arch/i386/pci/fixup.c 1.9 vs edited =====
--- 1.9/arch/i386/pci/fixup.c	Tue Jun  4 01:21:43 2002
+++ edited/arch/i386/pci/fixup.c	Wed Jun  5 09:11:20 2002
@@ -3,6 +3,7 @@
  */
 
 #include <linux/pci.h>
+#include <linux/init.h>
 #include "pci.h"
 
 
===== arch/i386/pci/legacy.c 1.6 vs edited =====
--- 1.6/arch/i386/pci/legacy.c	Wed May 29 15:54:35 2002
+++ edited/arch/i386/pci/legacy.c	Wed Jun  5 09:11:22 2002
@@ -1,6 +1,7 @@
 /*
  * legacy.c - traditional, old school PCI bus probing
  */
+#include <linux/init.h>
 #include <linux/pci.h>
 #include "pci.h"
 
===== arch/i386/pci/numa.c 1.7 vs edited =====
--- 1.7/arch/i386/pci/numa.c	Wed May 29 15:54:35 2002
+++ edited/arch/i386/pci/numa.c	Wed Jun  5 09:11:28 2002
@@ -2,6 +2,7 @@
  * numa.c - Low-level PCI access for NUMA-Q machines
  */
 #include <linux/pci.h>
+#include <linux/init.h>
 
 #include "pci.h"
 
===== arch/i386/pci/pcbios.c 1.6 vs edited =====
--- 1.6/arch/i386/pci/pcbios.c	Tue May  7 10:27:29 2002
+++ edited/arch/i386/pci/pcbios.c	Wed Jun  5 09:07:11 2002
@@ -3,6 +3,7 @@
  */
 
 #include <linux/pci.h>
+#include <linux/init.h>
 #include "pci.h"
 
 
===== include/asm-i386/bugs.h 1.6 vs edited =====
--- 1.6/include/asm-i386/bugs.h	Mon May 20 16:07:18 2002
+++ edited/include/asm-i386/bugs.h	Wed Jun  5 08:48:57 2002
@@ -21,6 +21,7 @@
  */
 
 #include <linux/config.h>
+#include <linux/init.h>
 #include <asm/processor.h>
 #include <asm/i387.h>
 #include <asm/msr.h>
===== include/asm-i386/highmem.h 1.6 vs edited =====
--- 1.6/include/asm-i386/highmem.h	Thu Apr  4 21:51:47 2002
+++ edited/include/asm-i386/highmem.h	Wed Jun  5 08:48:57 2002
@@ -21,7 +21,6 @@
 #ifdef __KERNEL__
 
 #include <linux/config.h>
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <asm/kmap_types.h>
 #include <asm/tlbflush.h>
@@ -33,7 +32,7 @@
 extern pgprot_t kmap_prot;
 extern pte_t *pkmap_page_table;
 
-extern void kmap_init(void) __init;
+extern void kmap_init(void);
 
 /*
  * Right now we initialize only a single pte table. It can be extended
===== include/asm-i386/system.h 1.11 vs edited =====
--- 1.11/include/asm-i386/system.h	Tue Feb 12 09:53:18 2002
+++ edited/include/asm-i386/system.h	Wed Jun  5 08:48:57 2002
@@ -3,7 +3,6 @@
 
 #include <linux/config.h>
 #include <linux/kernel.h>
-#include <linux/init.h>
 #include <asm/segment.h>
 #include <linux/bitops.h> /* for LOCK_PREFIX */
#21 lore raw

Re: [PATCH] 2.5.20 IDE 85

In reply to Linus Torvalds
Quoted 5 lines · Jens Axboe
Quoted 2 lines · Martin Dalecki
Quoted 10 lines
Quoted 5 lines

Well IDE 83 and 84 are already inside the bk repository at linux.bkbits.com. No as far as of now I don't have any public FTP or whatever area for the patches (Well send you everything in one go.)

Thanks. Just ask hpa for a kernel.org dir, if you don't have anywhere else to keep it.

Make that [email protected] :)

Jeff

#22 lore raw

PATCH 1/1 Add <linux/kdev_t.h> to <linux/bio.h>

In reply to Linus Torvalds

The following add <linux/kdev_t.h> to <linux/bio.h>.

This is needed since bio_ioctl takes a kdev_t for its first argument.

Signature · 14 lines
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

===== include/linux/bio.h 1.13 vs edited =====
--- 1.13/include/linux/bio.h	Wed Apr 24 13:00:40 2002
+++ edited/include/linux/bio.h	Wed Jun  5 16:20:06 2002
@@ -20,6 +20,7 @@
 #ifndef __LINUX_BIO_H
 #define __LINUX_BIO_H
 
+#include <linux/kdev_t.h>
 /* Platforms may set this to teach the BIO layer about IOMMU hardware. */
 #include <asm/io.h>
 #ifndef BIO_VMERGE_BOUNDARY
#23 lore raw

Re: [PATCH] Add <linux/kdev_t.h> to <linux/bio.h>

In reply to Linus Torvalds
Quoted 3 lines · Tom Rini

The following add <linux/kdev_t.h> to <linux/bio.h>.

This is needed since bio_ioctl takes a kdev_t for its first argument.

This should be fixed by a patch I submitted earlier today (you're getting a build error in fs/mpage.c, right?)

hch asked the very pertinent question though - why isn't kdev_t defined by linux/types.h ?

Signature · 2 lines
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html
#24 lore raw

Re: [PATCH] Add <linux/kdev_t.h> to <linux/bio.h>

In reply to Linus Torvalds
Quoted 7 lines · Russell King
Quoted 3 lines · Tom Rini

The following add <linux/kdev_t.h> to <linux/bio.h>.

This is needed since bio_ioctl takes a kdev_t for its first argument.

This should be fixed by a patch I submitted earlier today (you're getting a build error in fs/mpage.c, right?)

Nope. This was with that applied. I'm breaking up mm.h, slightly, right now and hit that.

Quoted 2 lines

hch asked the very pertinent question though - why isn't kdev_t defined by linux/types.h ?

That is a good question... Possibly because of the other stuff associated with it.

Signature · 2 lines
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
#25 lore raw

Re: [PATCH] 2.5.20 IDE 85

In reply to Linus Torvalds
Quoted 4 lines

BTW, I wanted to look at the code (and not just read the patch), but it's not clear from the patch what it is against. Where do you keep older patches so I can get them? Maybe the ide code could do with a bit of peer review :-)

After having looked at the issue yearstoday, well I have a rather trivial question: Can someone recommend me a good call graph generator for the kernel code? It would be actually helpfull. (No please no trash in perl or therelike...) Is there already any public analyzed for the parse tree dumps which can be generated by GCC 3.xx out there maybe?

#26 lore raw

Re: [patch] i386 "General Options" - begone [take 2]

In reply to Linus Torvalds

Hi!

Quoted 10 lines
Quoted 3 lines

Please don't tell people about sysrq-D, I'm going to kill that. OTOH convient way is echo 4 > /proc/acpi/sleep -- that is if you have ACPI enabled.

Extract from the patch:

(quoted diff) +2 -1
-  You may suspend your machine by either pressing Sysrq-d or with
<snip>
+  require APM. You may suspend your machine by either pressing 
+  Sysrq-d or with 'swsusp' or 'shutdown -z <time>' (patch for 

So it is in the original. When you kill the functionality, update the doco.

Yep, I should do that.

Signature · 2 lines
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.
#27 lore raw

PATCH 1/1 Move vmalloc wrappers out of include/linux/vmalloc.h

In reply to Linus Torvalds

This moves the vmalloc wrappers from <linux/vmalloc.h> into mm/vmalloc.c.

Doing this will later allow us to remove <linux/mm.h> from <linux/vmalloc.h>, along with some other #include fixups.

Signature · 81 lines
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

===== include/linux/vmalloc.h 1.2 vs edited =====
--- 1.2/include/linux/vmalloc.h	Fri Feb  8 20:10:55 2002
+++ edited/include/linux/vmalloc.h	Thu Jun  6 09:54:55 2002
@@ -24,33 +24,13 @@
 extern void vmfree_area_pages(unsigned long address, unsigned long size);
 extern int vmalloc_area_pages(unsigned long address, unsigned long size,
                               int gfp_mask, pgprot_t prot);
-
-/*
- *	Allocate any pages
- */
- 
-static inline void * vmalloc (unsigned long size)
-{
-	return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL);
-}
-
 /*
- *	Allocate ISA addressable pages for broke crap
+ * Various ways to allocate pages.
  */
 
-static inline void * vmalloc_dma (unsigned long size)
-{
-	return __vmalloc(size, GFP_KERNEL|GFP_DMA, PAGE_KERNEL);
-}
-
-/*
- *	vmalloc 32bit PA addressable pages - eg for PCI 32bit devices
- */
- 
-static inline void * vmalloc_32(unsigned long size)
-{
-	return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL);
-}
+extern void * vmalloc(unsigned long size);
+extern void * vmalloc_dma(unsigned long size);
+extern void * vmalloc_32(unsigned long size);
 
 /*
  * vmlist_lock is a read-write spinlock that protects vmlist
===== mm/vmalloc.c 1.14 vs edited =====
--- 1.14/mm/vmalloc.c	Fri May  3 04:27:09 2002
+++ edited/mm/vmalloc.c	Thu Jun  6 09:50:13 2002
@@ -232,6 +232,33 @@
 	printk(KERN_ERR "Trying to vfree() nonexistent vm area (%p)\n", addr);
 }
 
+/*
+ *	Allocate any pages
+ */
+
+void * vmalloc (unsigned long size)
+{
+	return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL);
+}
+
+/*
+ *	Allocate ISA addressable pages for broke crap
+ */
+
+void * vmalloc_dma (unsigned long size)
+{
+	return __vmalloc(size, GFP_KERNEL|GFP_DMA, PAGE_KERNEL);
+}
+
+/*
+ *	vmalloc 32bit PA addressable pages - eg for PCI 32bit devices
+ */
+
+void * vmalloc_32(unsigned long size)
+{
+	return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL);
+}
+
 void * __vmalloc (unsigned long size, int gfp_mask, pgprot_t prot)
 {
 	void * addr;
#28 lore raw

PATCH 1/1 Remove <linux/mm.h> from <linux/vmalloc.h>

In reply to Linus Torvalds

This removes <linux/mm.h> from <linux/vmalloc.h>.

This then goes and fixes all of the files (x86 and PPC) which relied on implicit includes which don't happen anymore. This also takes <linux/kdev_t.h> out of fs/mpage.c and puts it into include/linux/bio.h where it belongs since <linux/bio.h> references 'kdev_t' directly.

A quick summary of the of the added includes:
arch/i386/kernel/microcode.c: needs extern for num_physpages, in linux/mm.h include/linux/spinlock.h: local_irq* is defined in <asm/system.h> but this was never directly included.

This depends on the patch to move the vmalloc wrappers out of <linux/vmalloc.h>

Signature · 81 lines
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

===== arch/i386/kernel/microcode.c 1.10 vs edited =====
--- 1.10/arch/i386/kernel/microcode.c	Thu May 23 09:06:16 2002
+++ edited/arch/i386/kernel/microcode.c	Thu Jun  6 11:01:38 2002
@@ -67,6 +67,7 @@
 #include <linux/miscdevice.h>
 #include <linux/devfs_fs_kernel.h>
 #include <linux/spinlock.h>
+#include <linux/mm.h>
 
 #include <asm/msr.h>
 #include <asm/uaccess.h>
===== fs/mpage.c 1.4 vs edited =====
--- 1.4/fs/mpage.c	Wed May 29 17:34:44 2002
+++ edited/fs/mpage.c	Thu Jun  6 10:45:42 2002
@@ -12,7 +12,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/kdev_t.h>
 #include <linux/bio.h>
 #include <linux/fs.h>
 #include <linux/buffer_head.h>
===== include/asm-i386/pci.h 1.13 vs edited =====
--- 1.13/include/asm-i386/pci.h	Thu Mar 14 03:11:25 2002
+++ edited/include/asm-i386/pci.h	Thu Jun  6 10:23:38 2002
@@ -4,6 +4,7 @@
 #include <linux/config.h>
 
 #ifdef __KERNEL__
+#include <linux/mm.h>		/* for struct page */
 
 /* Can be used to override the logic in pci_scan_bus for skipping
    already-configured bus numbers - to be used for buggy BIOSes
===== include/asm-i386/pgalloc.h 1.15 vs edited =====
--- 1.15/include/asm-i386/pgalloc.h	Wed May 15 23:17:13 2002
+++ edited/include/asm-i386/pgalloc.h	Thu Jun  6 10:19:21 2002
@@ -5,6 +5,7 @@
 #include <asm/processor.h>
 #include <asm/fixmap.h>
 #include <linux/threads.h>
+#include <linux/mm.h>		/* for struct page */
 
 #define pmd_populate_kernel(mm, pmd, pte) \
 		set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte)))
===== include/linux/bio.h 1.13 vs edited =====
--- 1.13/include/linux/bio.h	Wed Apr 24 13:00:40 2002
+++ edited/include/linux/bio.h	Thu Jun  6 11:23:50 2002
@@ -20,6 +20,7 @@
 #ifndef __LINUX_BIO_H
 #define __LINUX_BIO_H
 
+#include <linux/kdev_t.h>
 /* Platforms may set this to teach the BIO layer about IOMMU hardware. */
 #include <asm/io.h>
 #ifndef BIO_VMERGE_BOUNDARY
===== include/linux/spinlock.h 1.9 vs edited =====
--- 1.9/include/linux/spinlock.h	Wed Apr  3 11:46:00 2002
+++ edited/include/linux/spinlock.h	Thu Jun  6 11:23:50 2002
@@ -7,6 +7,8 @@
 #include <linux/thread_info.h>
 #include <linux/kernel.h>
 
+#include <asm/system.h>
+
 /*
  * These are the generic versions of the spinlocks and read-write
  * locks..
===== include/linux/vmalloc.h 1.3 vs edited =====
--- 1.3/include/linux/vmalloc.h	Thu Jun  6 10:15:09 2002
+++ edited/include/linux/vmalloc.h	Thu Jun  6 10:19:16 2002
@@ -1,7 +1,6 @@
 #ifndef __LINUX_VMALLOC_H
 #define __LINUX_VMALLOC_H
 
-#include <linux/mm.h>
 #include <linux/spinlock.h>
 
 #include <asm/pgtable.h>
#29 lore raw

PATCH 1/1 More work on removing <linux/mm.h> from <linux/vmalloc.h>

In reply to Linus Torvalds
Quoted 7 lines · Tom Rini

This removes <linux/mm.h> from <linux/vmalloc.h>.

This then goes and fixes all of the files (x86 and PPC) which relied on implicit includes which don't happen anymore. This also takes <linux/kdev_t.h> out of fs/mpage.c and puts it into include/linux/bio.h where it belongs since <linux/bio.h> references 'kdev_t' directly.

Quoted 7 lines

A quick summary of the of the added includes:
arch/i386/kernel/microcode.c: needs extern for num_physpages, in linux/mm.h include/linux/spinlock.h: local_irq* is defined in <asm/system.h> but this was never directly included.

This depends on the patch to move the vmalloc wrappers out of <linux/vmalloc.h>

And the following is in addition to that patch for stuff that's in the current linux-2.5 tree but wasn't when I tested the inital patch.

Signature · 26 lines
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

===== arch/i386/kernel/cpu/amd.c 1.1 vs edited =====
--- 1.1/arch/i386/kernel/cpu/amd.c	Wed May  8 08:11:31 2002
+++ edited/arch/i386/kernel/cpu/amd.c	Thu Jun  6 13:51:10 2002
@@ -1,5 +1,6 @@
 #include <linux/init.h>
 #include <linux/bitops.h>
+#include <linux/mm.h>
 #include <asm/io.h>
 #include <asm/processor.h>
 
===== include/asm-i386/desc.h 1.4 vs edited =====
--- 1.4/include/asm-i386/desc.h	Sat Apr 27 10:47:46 2002
+++ edited/include/asm-i386/desc.h	Thu Jun  6 13:45:09 2002
@@ -49,6 +49,9 @@
 #define __LDT(n) (((n)<<2) + __FIRST_LDT_ENTRY)
 
 #ifndef __ASSEMBLY__
+
+#include <asm/mmu.h>
+
 struct desc_struct {
 	unsigned long a,b;
 };
#30 lore raw

PATCH 1/1 Include <linux/gfp.h> directly instead of via <linux/mm.h>

In reply to Linus Torvalds

Change to including <linux/gfp.h> directly when possible.

These files used <linux/mm.h> to just get at <linux/gfp.h>, so include it directly. This is part of what's needed to remove it from <linux/mm.h>.

Signature · 39 lines
Tom Rini (TR1265)
http://gate.crashing.org/~trini/


===== include/linux/pagemap.h 1.20 vs edited =====
--- 1.20/include/linux/pagemap.h	Mon May  6 09:21:54 2002
+++ edited/include/linux/pagemap.h	Thu Jun  6 14:05:07 2002
@@ -4,7 +4,7 @@
 /*
  * Copyright 1995 Linus Torvalds
  */
-#include <linux/mm.h>
+#include <linux/gfp.h>
 #include <linux/fs.h>
 #include <linux/list.h>
 #include <linux/highmem.h>
===== kernel/futex.c 1.6 vs edited =====
--- 1.6/kernel/futex.c	Thu Jun  6 10:13:05 2002
+++ edited/kernel/futex.c	Thu Jun  6 14:05:07 2002
@@ -26,7 +26,7 @@
 #include <linux/kernel.h>
 #include <linux/spinlock.h>
 #include <linux/sched.h>
-#include <linux/mm.h>
+#include <linux/gfp.h>
 #include <linux/hash.h>
 #include <linux/init.h>
 #include <linux/fs.h>
===== kernel/ptrace.c 1.11 vs edited =====
--- 1.11/kernel/ptrace.c	Sat Mar 23 15:57:49 2002
+++ edited/kernel/ptrace.c	Thu Jun  6 14:05:07 2002
@@ -9,7 +9,7 @@
 
 #include <linux/sched.h>
 #include <linux/errno.h>
-#include <linux/mm.h>
+#include <linux/gfp.h>
 #include <linux/highmem.h>
 #include <linux/smp_lock.h>
#31 lore raw

PATCH 1/1 Remove numerous includes from <linux/mm.h>

In reply to Linus Torvalds

Remove 4 #includes from <linux/mm.h> and fix up implicit includes.

This remove linux/gfp.h, linux/string.h, linux/mmzone.h and linux/rbtree.h from <linux/mm.h> and fixes the callers which relied on <linux/mm.h> to provide <linux/gfp.h>

This relies on all of the previously sent patches to work.

Signature · 63 lines
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

===== fs/isofs/namei.c 1.9 vs edited =====
--- 1.9/fs/isofs/namei.c	Thu May 23 06:18:50 2002
+++ edited/fs/isofs/namei.c	Thu Jun  6 12:33:14 2002
@@ -13,6 +13,7 @@
 #include <linux/stat.h>
 #include <linux/fcntl.h>
 #include <linux/mm.h>
+#include <linux/gfp.h>
 #include <linux/errno.h>
 #include <linux/config.h>	/* Joliet? */
 #include <linux/smp_lock.h>
===== include/asm-i386/pgalloc.h 1.16 vs edited =====
--- 1.16/include/asm-i386/pgalloc.h	Thu Jun  6 11:35:04 2002
+++ edited/include/asm-i386/pgalloc.h	Thu Jun  6 12:15:09 2002
@@ -6,6 +6,7 @@
 #include <asm/fixmap.h>
 #include <linux/threads.h>
 #include <linux/mm.h>		/* for struct page */
+#include <linux/gfp.h>
 
 #define pmd_populate_kernel(mm, pmd, pte) \
 		set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte)))
===== include/linux/mm.h 1.55 vs edited =====
--- 1.55/include/linux/mm.h	Sat May 25 16:25:47 2002
+++ edited/include/linux/mm.h	Thu Jun  6 12:15:09 2002
@@ -7,12 +7,8 @@
 #ifdef __KERNEL__
 
 #include <linux/config.h>
-#include <linux/gfp.h>
-#include <linux/string.h>
 #include <linux/list.h>
-#include <linux/mmzone.h>
 #include <linux/swap.h>
-#include <linux/rbtree.h>
 #include <linux/fs.h>
 
 extern unsigned long max_mapnr;
===== mm/bootmem.c 1.9 vs edited =====
--- 1.9/mm/bootmem.c	Mon Jun  3 08:24:55 2002
+++ edited/mm/bootmem.c	Thu Jun  6 12:28:37 2002
@@ -10,6 +10,7 @@
  */
 
 #include <linux/mm.h>
+#include <linux/gfp.h>
 #include <linux/kernel_stat.h>
 #include <linux/swap.h>
 #include <linux/swapctl.h>
===== mm/numa.c 1.5 vs edited =====
--- 1.5/mm/numa.c	Sat May 25 16:25:47 2002
+++ edited/mm/numa.c	Thu Jun  6 12:28:35 2002
@@ -4,6 +4,7 @@
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
+#include <linux/gfp.h>
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/mmzone.h>
#32 lore raw

Re: [PATCH] Cleanup i386 <linux/init.h> abuses

In reply to Linus Torvalds

Hi!

Quoted 7 lines

The following patch cleans up the i386 usage of <linux/init.h>. This remove <linux/init.h> from <asm-i386/system.h> which did not need it, <asm-i386/highmem.h> which only had it due to an extern using __init, which is not needed.
This adds <linux/init.h> to <asm-i386/bugs.h> which actually has numerous __init functions and adds <linux/init.h> to 9 files inside of arch/i386 which were indirectly including <linux/init.h> previously.

@@ -33,7 +32,7 @@
extern pgprot_t kmap_prot;
extern pte_t *pkmap_page_table;

-extern void kmap_init(void) __init;
+extern void kmap_init(void);

/*
* Right now we initialize only a single pte table. It can be
extended

__init is usefull as a documentation... Perhaps adding /* This is __init function */ would be good.
Pavel

Signature · 2 lines
(about SSSCA) "I don't say this lightly.  However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
#33 lore raw

Re: [PATCH] Cleanup i386 <linux/init.h> abuses

Hi,

Quoted 6 lines · Pavel Machek

Hi!

+extern void kmap_init(void);

__init is usefull as a documentation... Perhaps adding /* This is __init function */ would be good.

I suppose that's why it's called kmap_init(). That jumps right on me, biting my nose and saying "I am an init function".

Regards,
Thunder

Signature · 4 lines
ship is leaving right on time	|	Thunder from the hill at ngforever
empty harbour, wave goodbye	|
evacuation of the isle		|	free inhabitant not directly
caveman's paintings drowning	|	belonging anywhere
#34 lore raw

Re: [PATCH] Cleanup i386 <linux/init.h> abuses

In reply to Linus Torvalds
Quoted 23 lines · Pavel Machek

Hi!

Quoted 7 lines

The following patch cleans up the i386 usage of <linux/init.h>. This remove <linux/init.h> from <asm-i386/system.h> which did not need it, <asm-i386/highmem.h> which only had it due to an extern using __init, which is not needed.
This adds <linux/init.h> to <asm-i386/bugs.h> which actually has numerous __init functions and adds <linux/init.h> to 9 files inside of arch/i386 which were indirectly including <linux/init.h> previously.

(quoted diff) +1 -1
@@ -33,7 +32,7 @@
 extern pgprot_t kmap_prot;
 extern pte_t *pkmap_page_table;
 
-extern void kmap_init(void) __init;
+extern void kmap_init(void);
 
 /*
  * Right now we initialize only a single pte table. It can be

extended

Quoted 2 lines

__init is usefull as a documentation... Perhaps adding /* This is __init function */ would be good.

The use of __init in externs is done very infrequently right now, and is probably causing <linux/init.h> to be included in a few more headers that probably don't need it and thus masking the bugs in some .c files.

I also think it makes very poor documentation right now since it's done a total of 24 times, and should probably be removed for consistency. Or left alone since <linux/init.h> mentions you can do it.

But personally, I'm against doing it.

Signature · 2 lines
Tom Rini (TR1265)
http://gate.crashing.org/~trini/